@loczer/storefront-sdk 0.199.0 → 0.201.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.
@@ -0,0 +1,22 @@
1
+ import { booleanNumberRecordSchema as e, identifierSchema as t, isoDateTimeSchema as n, objectIdStringSchema as r } from "../models/types-rIp4ReXN.js";
2
+ import { productVariantIdentifierSchema as i } from "../models/Product.shared-iVSHRdn4.js";
3
+ import { z as a } from "zod";
4
+ //#region ../booking-engine/dist/schemas/base-asset.js
5
+ var o = a.enum([
6
+ "available",
7
+ "maintenance",
8
+ "lost",
9
+ "blocked"
10
+ ]), s = r.transform((e) => e.toLowerCase()), c = a.object({
11
+ _id: s,
12
+ productId: t,
13
+ shopId: t,
14
+ status: o,
15
+ identifiers: a.array(i).default([]),
16
+ productVariantId: t,
17
+ attributes: e.optional(),
18
+ createdAt: n,
19
+ updatedAt: n
20
+ });
21
+ //#endregion
22
+ export { s as assetIdSchema, c as baseAssetSchema, o as baseAssetStatusSchema };
@@ -9,6 +9,6 @@ import { fulfillmentModeSchema as G, publicBookingEngineConfigurationSchema as K
9
9
  import { DEFAULT_BOOKING_DELIVERY_OPTION as Y, bookingCustomerInputSchema as X, bookingDeliveryOptionSchema as Z, bookingScheduleInputSchema as Q, cartItemInputSchema as $, createBookingInputBaseSchema as ee, createBookingInputSchema as te, resolveBookingDeliveryOption as ne, validateBookingDeliveryAddress as re } from "./schemas/cart-inputs-D1_Wmkca.js";
10
10
  import { bookingInsuranceConsentSourceSchema as ie, bookingInsuranceItemSnapshotSchema as ae, bookingInsuranceSnapshotSchema as oe, buildBookingInsuranceSnapshot as se, calculateInsuranceCalendarDays as ce, insuranceProviderSchema as le } from "./schemas/insurance-CPeHsTss.js";
11
11
  import "./schemas/base-product-BJHQLX8t.js";
12
- import { baseAssetSchema as ue, baseAssetStatusSchema as de } from "./schemas/base-asset-BRQVuIes.js";
13
- import { baseBookingItemSchema as fe, baseBookingSchema as pe, baseBookingStateSchema as me } from "./schemas/base-booking-Bhy2Kww1.js";
14
- export { Y as DEFAULT_BOOKING_DELIVERY_OPTION, B as DEFAULT_CANCELLATION_POLICY, V as DEFAULT_PAYMENT_POLICIES, p as DEFAULT_PRODUCT_KIND, m as PRODUCT_VARIANT_CODE_IDENTIFIER_KIND, h as PRODUCT_VARIANT_CODE_MAX_LENGTH, g as accessoryProductSchema, ue as baseAssetSchema, de as baseAssetStatusSchema, fe as baseBookingItemSchema, pe as baseBookingSchema, me as baseBookingStateSchema, _ as bikeProductSchema, X as bookingCustomerInputSchema, Z as bookingDeliveryOptionSchema, ie as bookingInsuranceConsentSourceSchema, ae as bookingInsuranceItemSnapshotSchema, oe as bookingInsuranceSnapshotSchema, Q as bookingScheduleInputSchema, se as buildBookingInsuranceSnapshot, ce as calculateInsuranceCalendarDays, H as cancellationPolicySchema, U as cancellationPolicyTierSchema, $ as cartItemInputSchema, ee as createBookingInputBaseSchema, te as createBookingInputSchema, e as createLocalizedStringEntry, a as currencyCodeSchema, o as currencyMinorUnitDigits, v as eBikeProductSchema, G as fulfillmentModeSchema, t as getLocalizedStringValue, le as insuranceProviderSchema, y as isProductVariantCodeIdentifierKind, j as isoDateSchema, n as localizedStringArraySchema, r as localizedStringEntrySchema, i as localizedStringSchema, s as majorToMinor, c as minorToMajor, l as moneyMinorSchema, W as paymentPoliciesSchema, d as priceSchema, f as priceUnitSchema, b as productInsuranceSchema, x as productKindSchema, S as productSchema, C as productStorefrontDisplayModeSchema, w as productVariantAttributeSchema, T as productVariantCodeSchema, E as productVariantIdentifierSchema, D as productVariantSchema, K as publicBookingEngineConfigurationSchema, q as publicCheckoutConfigurationSchema, J as publicCheckoutDynamicOptionsSchema, ne as resolveBookingDeliveryOption, O as richTextJsonDocSchema, k as richTextSchema, A as richTextVersionSchema, M as shopConfigurationSchema, N as shopExtraTimeSlotRuleSchema, P as shopOpeningDayIndexSchema, F as shopOpeningDaySchema, I as shopOpeningHoursOverrideSchema, L as shopOpeningHoursPeriodSchema, R as shopOpeningSlotSchema, u as signedMoneyMinorSchema, z as timeOfDaySchema, re as validateBookingDeliveryAddress };
12
+ import { assetIdSchema as ue, baseAssetSchema as de, baseAssetStatusSchema as fe } from "./schemas/base-asset-B4y__1qj.js";
13
+ import { baseBookingItemSchema as pe, baseBookingSchema as me, baseBookingStateSchema as he } from "./schemas/base-booking-Bhy2Kww1.js";
14
+ export { Y as DEFAULT_BOOKING_DELIVERY_OPTION, B as DEFAULT_CANCELLATION_POLICY, V as DEFAULT_PAYMENT_POLICIES, p as DEFAULT_PRODUCT_KIND, m as PRODUCT_VARIANT_CODE_IDENTIFIER_KIND, h as PRODUCT_VARIANT_CODE_MAX_LENGTH, g as accessoryProductSchema, ue as assetIdSchema, de as baseAssetSchema, fe as baseAssetStatusSchema, pe as baseBookingItemSchema, me as baseBookingSchema, he as baseBookingStateSchema, _ as bikeProductSchema, X as bookingCustomerInputSchema, Z as bookingDeliveryOptionSchema, ie as bookingInsuranceConsentSourceSchema, ae as bookingInsuranceItemSnapshotSchema, oe as bookingInsuranceSnapshotSchema, Q as bookingScheduleInputSchema, se as buildBookingInsuranceSnapshot, ce as calculateInsuranceCalendarDays, H as cancellationPolicySchema, U as cancellationPolicyTierSchema, $ as cartItemInputSchema, ee as createBookingInputBaseSchema, te as createBookingInputSchema, e as createLocalizedStringEntry, a as currencyCodeSchema, o as currencyMinorUnitDigits, v as eBikeProductSchema, G as fulfillmentModeSchema, t as getLocalizedStringValue, le as insuranceProviderSchema, y as isProductVariantCodeIdentifierKind, j as isoDateSchema, n as localizedStringArraySchema, r as localizedStringEntrySchema, i as localizedStringSchema, s as majorToMinor, c as minorToMajor, l as moneyMinorSchema, W as paymentPoliciesSchema, d as priceSchema, f as priceUnitSchema, b as productInsuranceSchema, x as productKindSchema, S as productSchema, C as productStorefrontDisplayModeSchema, w as productVariantAttributeSchema, T as productVariantCodeSchema, E as productVariantIdentifierSchema, D as productVariantSchema, K as publicBookingEngineConfigurationSchema, q as publicCheckoutConfigurationSchema, J as publicCheckoutDynamicOptionsSchema, ne as resolveBookingDeliveryOption, O as richTextJsonDocSchema, k as richTextSchema, A as richTextVersionSchema, M as shopConfigurationSchema, N as shopExtraTimeSlotRuleSchema, P as shopOpeningDayIndexSchema, F as shopOpeningDaySchema, I as shopOpeningHoursOverrideSchema, L as shopOpeningHoursPeriodSchema, R as shopOpeningSlotSchema, u as signedMoneyMinorSchema, z as timeOfDaySchema, re as validateBookingDeliveryAddress };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/BookingBikeQuickAddCard/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AA0ErD,KAAK,4BAA4B,GAAG;IAClC,IAAI,EAAE,WAAW,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,uBAAuB,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;IAC3C,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,gBAAgB,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;IAC9B,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IACzD,YAAY,EAAE,MAAM,IAAI,CAAA;IACxB,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,wBAAgB,uBAAuB,CAAC,EACtC,IAAI,EACJ,WAAW,EACX,uBAAuB,EACvB,cAAsB,EACtB,gBAAgB,EAChB,gBAAgB,EAChB,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,UAAU,EACV,MAAM,GACP,EAAE,4BAA4B,2CAwN9B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/BookingBikeQuickAddCard/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAgCrD,KAAK,4BAA4B,GAAG;IAClC,IAAI,EAAE,WAAW,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,uBAAuB,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;IAC3C,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,gBAAgB,EAAE,CAAC,GAAG,CAAC,GAAG,IAAI,CAAA;IAC9B,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IACzD,YAAY,EAAE,MAAM,IAAI,CAAA;IACxB,UAAU,EAAE,MAAM,IAAI,CAAA;IACtB,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,wBAAgB,uBAAuB,CAAC,EACtC,IAAI,EACJ,WAAW,EACX,uBAAuB,EACvB,cAAsB,EACtB,gBAAgB,EAChB,gBAAgB,EAChB,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,UAAU,EACV,MAAM,GACP,EAAE,4BAA4B,2CAwN9B"}
@@ -1,33 +1,26 @@
1
- import { getStorefrontProductVariantDisplay as e } from "../../lib/productVariants.js";
2
- import { Button as t } from "../../ui/button.js";
3
- import { Input as n } from "../../ui/input.js";
4
- import { BikeProductCard as r } from "../BikeProductCard/index.js";
5
- import { useEffect as i, useRef as a, useState as o } from "react";
6
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
7
- import { useTranslation as l } from "react-i18next";
8
- import { cn as u } from "@rpcbase/ui";
9
- import { Plus as d } from "lucide-react";
10
- import { AnimatePresence as f, motion as p } from "framer-motion";
1
+ import { getStorefrontProductVariantDisplay as e, getStorefrontProductVariantHeightRange as t } from "../../lib/productVariants.js";
2
+ import { Button as n } from "../../ui/button.js";
3
+ import { Input as r } from "../../ui/input.js";
4
+ import { BikeProductCard as i } from "../BikeProductCard/index.js";
5
+ import { useEffect as a, useRef as o, useState as s } from "react";
6
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
7
+ import { useTranslation as u } from "react-i18next";
8
+ import { cn as d } from "@rpcbase/ui";
9
+ import { Plus as f } from "lucide-react";
10
+ import { AnimatePresence as p, motion as m } from "framer-motion";
11
11
  //#region src/components/BookingBikeQuickAddCard/index.tsx
12
- var m = () => typeof window < "u" && window.matchMedia("(hover: hover) and (pointer: fine)").matches, h = (e) => {
12
+ var h = () => typeof window < "u" && window.matchMedia("(hover: hover) and (pointer: fine)").matches, g = (e) => {
13
13
  let t = Number.parseInt(e, 10);
14
14
  return !Number.isFinite(t) || t < 1 ? 1 : t;
15
- }, g = (e) => {
16
- let t = e.replace(/\D/g, "");
17
- return t ? String(h(t)) : "";
18
15
  }, _ = (e) => {
19
- if (!e) return;
20
- let t = Number(e.trim().replace(",", "."));
21
- if (!(!Number.isFinite(t) || t <= 0)) return Math.round(t);
22
- }, v = (e) => (e / 100).toFixed(2), y = (e, t) => e.attributes.find((e) => e.key.trim().toLowerCase() === t)?.value, b = (e) => {
23
- let t = _(y(e, "min_height_cm")), n = _(y(e, "max_height_cm")), r = t ? v(t) : null, i = n ? v(n) : null;
24
- return r && i ? `${r} - ${i} m` : r ? `min ${r} m` : i ? `max ${i} m` : null;
16
+ let t = e.replace(/\D/g, "");
17
+ return t ? String(g(t)) : "";
25
18
  };
26
- function x({ bike: _, detailsPath: v, productDetailsLinkState: y, actionDisabled: x = !1, fallbackLanguage: S, dimOnColumnCount: C, onAction: w, onQuickAdd: T, onHoverStart: E, onHoverEnd: D, testId: O }) {
27
- let { t: k } = l(), A = a(null), [j, M] = o(!1), [N, P] = o({}), F = _.productVariants ?? [], I = !x && F.length > 0, L = () => !I || !m() ? !1 : (M(!0), !0), R = () => {
19
+ function v({ bike: v, detailsPath: y, productDetailsLinkState: b, actionDisabled: x = !1, fallbackLanguage: S, dimOnColumnCount: C, onAction: w, onQuickAdd: T, onHoverStart: E, onHoverEnd: D, testId: O }) {
20
+ let { t: k } = u(), A = o(null), [j, M] = s(!1), [N, P] = s({}), F = v.productVariants ?? [], I = !x && F.length > 0, L = () => !I || !h() ? !1 : (M(!0), !0), R = () => {
28
21
  M(!1), P({});
29
22
  };
30
- i(() => {
23
+ a(() => {
31
24
  if (!j) return;
32
25
  let e = (e) => {
33
26
  if (e.pointerType !== "mouse") return;
@@ -61,34 +54,34 @@ function x({ bike: _, detailsPath: v, productDetailsLinkState: y, actionDisabled
61
54
  U(e, "");
62
55
  return;
63
56
  }
64
- U(e, g(n));
57
+ U(e, _(n));
65
58
  }, G = (e) => {
66
- U(e, String(h(H(e))));
59
+ U(e, String(g(H(e))));
67
60
  }, K = (e) => {
68
- let t = h(H(e));
61
+ let t = g(H(e));
69
62
  U(e, String(t)), T(e, t);
70
63
  };
71
- return /* @__PURE__ */ c("div", {
64
+ return /* @__PURE__ */ l("div", {
72
65
  ref: A,
73
66
  "data-testid": O,
74
67
  onPointerEnter: z,
75
68
  onPointerLeave: B,
76
69
  onFocusCapture: L,
77
70
  onBlurCapture: V,
78
- className: u("relative h-full overflow-visible transition-opacity duration-200", C === 1 && "opacity-20 md:opacity-100", C === 2 && "md:opacity-20", j && I && "z-30"),
79
- children: [/* @__PURE__ */ s(r, {
80
- bike: _,
81
- detailsPath: v,
82
- productDetailsLinkState: y,
71
+ className: d("relative h-full overflow-visible transition-opacity duration-200", C === 1 && "opacity-20 md:opacity-100", C === 2 && "md:opacity-20", j && I && "z-30"),
72
+ children: [/* @__PURE__ */ c(i, {
73
+ bike: v,
74
+ detailsPath: y,
75
+ productDetailsLinkState: b,
83
76
  actionLabelKey: "add_to_cart",
84
77
  onAction: w,
85
78
  actionDisabled: x,
86
79
  fallbackLanguage: S,
87
80
  variant: "booking",
88
- className: u("transition-[border-color,box-shadow,border-radius] duration-200 hover:border-primary/20 hover:shadow-md", j && I && "!rounded-b-none border-primary/20 !border-b-white shadow-lg")
89
- }), /* @__PURE__ */ s(f, {
81
+ className: d("transition-[border-color,box-shadow,border-radius] duration-200 hover:border-primary/20 hover:shadow-md", j && I && "!rounded-b-none border-primary/20 !border-b-white shadow-lg")
82
+ }), /* @__PURE__ */ c(p, {
90
83
  initial: !1,
91
- children: j && I ? /* @__PURE__ */ s(p.div, {
84
+ children: j && I ? /* @__PURE__ */ c(m.div, {
92
85
  initial: {
93
86
  opacity: 0,
94
87
  y: -8,
@@ -114,61 +107,61 @@ function x({ bike: _, detailsPath: v, productDetailsLinkState: y, actionDisabled
114
107
  ]
115
108
  },
116
109
  className: "absolute left-0 right-0 top-full z-30 origin-top rounded-b-lg border border-t-0 border-primary/20 bg-white px-3 py-2 shadow-xl",
117
- "data-testid": `storefront-booking-bike-quick-selector-${_.id}`.toLowerCase(),
110
+ "data-testid": `storefront-booking-bike-quick-selector-${v.id}`.toLowerCase(),
118
111
  onClick: (e) => e.stopPropagation(),
119
112
  onKeyDown: (e) => e.stopPropagation(),
120
- children: /* @__PURE__ */ s("div", { children: F.map((r) => {
121
- let { label: i } = e(r), a = b(r), o = `storefront-booking-bike-quick-quantity-${_.id}-${r.id}`.toLowerCase();
122
- return /* @__PURE__ */ c("div", {
113
+ children: /* @__PURE__ */ c("div", { children: F.map((i) => {
114
+ let { label: a } = e(i), o = t(i), s = `storefront-booking-bike-quick-quantity-${v.id}-${i.id}`.toLowerCase();
115
+ return /* @__PURE__ */ l("div", {
123
116
  className: "flex items-center justify-between gap-3 border-b border-slate-100 py-1.5 last:border-b-0",
124
117
  children: [
125
- /* @__PURE__ */ c("div", {
118
+ /* @__PURE__ */ l("div", {
126
119
  className: "flex min-w-0 flex-1 items-baseline gap-2",
127
- children: [/* @__PURE__ */ s("span", {
120
+ children: [/* @__PURE__ */ c("span", {
128
121
  className: "min-w-0 truncate text-sm font-semibold text-slate-950",
129
- title: i,
130
- children: i
131
- }), a ? /* @__PURE__ */ s("span", {
132
- className: "truncate text-xs text-slate-500",
122
+ title: a,
133
123
  children: a
124
+ }), o ? /* @__PURE__ */ c("span", {
125
+ className: "truncate text-xs text-slate-500",
126
+ children: o
134
127
  }) : null]
135
128
  }),
136
- /* @__PURE__ */ s("label", {
129
+ /* @__PURE__ */ c("label", {
137
130
  className: "sr-only",
138
- htmlFor: o,
139
- children: /* @__PURE__ */ s("span", { children: k("quantity_label") })
131
+ htmlFor: s,
132
+ children: /* @__PURE__ */ c("span", { children: k("quantity_label") })
140
133
  }),
141
- /* @__PURE__ */ c("div", {
134
+ /* @__PURE__ */ l("div", {
142
135
  className: "flex shrink-0 items-center",
143
- children: [/* @__PURE__ */ s(n, {
144
- id: o,
136
+ children: [/* @__PURE__ */ c(r, {
137
+ id: s,
145
138
  type: "text",
146
139
  inputMode: "numeric",
147
140
  pattern: "[0-9]*",
148
- value: H(r.id),
149
- onChange: (e) => W(r.id, e),
150
- onBlur: () => G(r.id),
141
+ value: H(i.id),
142
+ onChange: (e) => W(i.id, e),
143
+ onBlur: () => G(i.id),
151
144
  className: "h-8 w-9 rounded-r-none border-r-0 px-1 text-center text-sm focus-visible:z-10",
152
145
  "aria-label": k("quantity_label"),
153
- "data-testid": o
154
- }), /* @__PURE__ */ c(t, {
146
+ "data-testid": s
147
+ }), /* @__PURE__ */ l(n, {
155
148
  type: "button",
156
149
  size: "sm",
157
150
  className: "h-8 gap-1 rounded-l-none px-2 text-xs",
158
- onClick: () => K(r.id),
159
- "data-testid": `storefront-booking-bike-quick-add-${_.id}-${r.id}`.toLowerCase(),
160
- children: [/* @__PURE__ */ s("span", { children: k("add_short") }), /* @__PURE__ */ s(d, {
151
+ onClick: () => K(i.id),
152
+ "data-testid": `storefront-booking-bike-quick-add-${v.id}-${i.id}`.toLowerCase(),
153
+ children: [/* @__PURE__ */ c("span", { children: k("add_short") }), /* @__PURE__ */ c(f, {
161
154
  className: "h-3.5 w-3.5",
162
155
  "aria-hidden": "true"
163
156
  })]
164
157
  })]
165
158
  })
166
159
  ]
167
- }, r.id);
160
+ }, i.id);
168
161
  }) })
169
162
  }, "quick-selector") : null
170
163
  })]
171
164
  });
172
165
  }
173
166
  //#endregion
174
- export { x as BookingBikeQuickAddCard };
167
+ export { v as BookingBikeQuickAddCard };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/BookingBikeVariantDialog/index.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAa3D,KAAK,iCAAiC,GAAG,iBAAiB,GAAG;IAC3D,kBAAkB,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,cAAc,CAAA;CAChE,CAAA;AAWD,KAAK,6BAA6B,GAAG;IACnC,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,iCAAiC,GAAG,IAAI,CAAA;IACjD,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,2BAA2B,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAA;IAClE,sBAAsB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAA;IACvD,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;CAC5D,CAAA;AAED,wBAAgB,wBAAwB,CAAC,EACvC,IAAI,EACJ,OAAO,EACP,YAAY,EACZ,2BAA2B,EAC3B,sBAAsB,EACtB,WAAmB,EACnB,YAAY,GACb,EAAE,6BAA6B,kDAyN/B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/BookingBikeVariantDialog/index.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAiB3D,KAAK,iCAAiC,GAAG,iBAAiB,GAAG;IAC3D,kBAAkB,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,cAAc,CAAA;CAChE,CAAA;AAWD,KAAK,6BAA6B,GAAG;IACnC,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,iCAAiC,GAAG,IAAI,CAAA;IACjD,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,2BAA2B,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAA;IAClE,sBAAsB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAA;IACvD,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;CAC5D,CAAA;AAED,wBAAgB,wBAAwB,CAAC,EACvC,IAAI,EACJ,OAAO,EACP,YAAY,EACZ,2BAA2B,EAC3B,sBAAsB,EACtB,WAAmB,EACnB,YAAY,GACb,EAAE,6BAA6B,kDAiO/B"}
@@ -1,194 +1,201 @@
1
- import { getProductVariantAttributeValue as e, getStorefrontProductVariantDisplay as t } from "../../lib/productVariants.js";
2
- import { getLocalizedValue as n } from "../../localization.js";
3
- import { getAvailabilityVariant as r } from "../../lib/utils.js";
4
- import { Badge as i } from "../../ui/badge.js";
5
- import { Button as a } from "../../ui/button.js";
6
- import { RESPONSIVE_DIALOG_MOBILE_MEDIA_QUERY as o, ResponsiveDialog as s, ResponsiveDialogContent as c, ResponsiveDialogDescription as l, ResponsiveDialogFooter as u, ResponsiveDialogHeader as d, ResponsiveDialogTitle as f } from "../../chunks/pkg/ui/dist/ResponsiveDialog-BVwhTZQo.js";
7
- import { Input as p } from "../../ui/input.js";
8
- import { useStorefrontWorkspaceLanguage as m } from "../../StorefrontContext.js";
9
- import { ProductWarningNotice as h } from "../ProductWarningNotice/index.js";
10
- import { ProductPriceBadge as g } from "../ProductPriceBadge/index.js";
11
- import { resolveProductImageContainerStyle as _ } from "../../lib/productImageStyles.js";
12
- import { useEffect as v, useState as y } from "react";
13
- import { jsx as b, jsxs as x } from "react/jsx-runtime";
14
- import { useMediaQuery as S } from "@rpcbase/client";
15
- import { useTranslation as C } from "react-i18next";
16
- import { cn as w } from "@rpcbase/ui";
17
- import { Bike as T, CheckCircle2 as E, Package as D, Plus as O } from "lucide-react";
1
+ import { getProductVariantAttributeValue as e, getStorefrontProductVariantDisplay as t, getStorefrontProductVariantHeightRange as n } from "../../lib/productVariants.js";
2
+ import { getLocalizedValue as r } from "../../localization.js";
3
+ import { getAvailabilityVariant as i } from "../../lib/utils.js";
4
+ import { Badge as a } from "../../ui/badge.js";
5
+ import { Button as o } from "../../ui/button.js";
6
+ import { RESPONSIVE_DIALOG_MOBILE_MEDIA_QUERY as s, ResponsiveDialog as c, ResponsiveDialogContent as l, ResponsiveDialogDescription as u, ResponsiveDialogFooter as d, ResponsiveDialogHeader as f, ResponsiveDialogTitle as p } from "../../chunks/pkg/ui/dist/ResponsiveDialog-BVwhTZQo.js";
7
+ import { Input as m } from "../../ui/input.js";
8
+ import { useStorefrontWorkspaceLanguage as h } from "../../StorefrontContext.js";
9
+ import { ProductWarningNotice as g } from "../ProductWarningNotice/index.js";
10
+ import { ProductPriceBadge as _ } from "../ProductPriceBadge/index.js";
11
+ import { resolveProductImageContainerStyle as v } from "../../lib/productImageStyles.js";
12
+ import { useEffect as y, useState as b } from "react";
13
+ import { jsx as x, jsxs as S } from "react/jsx-runtime";
14
+ import { useMediaQuery as C } from "@rpcbase/client";
15
+ import { useTranslation as w } from "react-i18next";
16
+ import { cn as T } from "@rpcbase/ui";
17
+ import { Bike as E, CheckCircle2 as D, Package as O, Plus as k } from "lucide-react";
18
18
  //#region src/components/BookingBikeVariantDialog/index.tsx
19
- var k = (e) => {
19
+ var A = (e) => {
20
20
  let t = Number.parseInt(e, 10);
21
21
  return !Number.isFinite(t) || t < 1 ? 1 : t;
22
22
  };
23
- function A({ open: p, product: A, onOpenChange: M, getVariantAvailabilityLabel: N, isVariantOutOfCapacity: P, addDisabled: F = !1, onAddVariant: I }) {
24
- let { t: L, i18n: R } = C(), z = S(o), B = m(), [V, H] = y({});
25
- if (v(() => {
26
- !A || !p || H((A.productVariants ?? []).reduce((e, t) => (e[t.id] = "1", e), {}));
27
- }, [p, A]), !A) return null;
28
- let U = (e, t) => {
29
- H((n) => ({
23
+ function j({ open: m, product: j, onOpenChange: N, getVariantAvailabilityLabel: P, isVariantOutOfCapacity: F, addDisabled: I = !1, onAddVariant: L }) {
24
+ let { t: R, i18n: z } = w(), B = C(s), V = h(), [H, U] = b({});
25
+ if (y(() => {
26
+ !j || !m || U((j.productVariants ?? []).reduce((e, t) => (e[t.id] = "1", e), {}));
27
+ }, [m, j]), !j) return null;
28
+ let W = (e, t) => {
29
+ U((n) => ({
30
30
  ...n,
31
31
  [e]: t
32
32
  }));
33
- }, W = n(A.name, R.language, B), G = n(A.description, R.language, B), K = n(A.warning, R.language, B), q = typeof A.images?.[0] == "string" ? A.images[0].trim() : "", J = _(A.primaryImageStyle), Y = r(A.availabilityStatus), X = A.features?.slice(0, 4) ?? [], Z = A.productVariants ?? [], Q = Z.some((t) => !!e(t, "size")) ? L("product_size_label") : L("product_variant_label");
34
- return /* @__PURE__ */ b(s, {
35
- open: p,
36
- onOpenChange: M,
37
- children: /* @__PURE__ */ b(c, {
33
+ }, G = r(j.name, z.language, V), K = r(j.description, z.language, V), q = r(j.warning, z.language, V), J = typeof j.images?.[0] == "string" ? j.images[0].trim() : "", Y = v(j.primaryImageStyle), X = i(j.availabilityStatus), Z = j.features?.slice(0, 4) ?? [], Q = j.productVariants ?? [], $ = Q.some((t) => !!e(t, "size")) ? R("product_size_label") : R("product_variant_label");
34
+ return /* @__PURE__ */ x(c, {
35
+ open: m,
36
+ onOpenChange: N,
37
+ children: /* @__PURE__ */ x(l, {
38
38
  "data-testid": "storefront-booking-bike-dialog-content",
39
39
  className: "overflow-hidden border-slate-200 bg-white p-0",
40
40
  desktopClassName: "max-w-4xl gap-0",
41
41
  mobileClassName: "max-h-[95dvh] gap-0",
42
- children: /* @__PURE__ */ x("div", {
42
+ children: /* @__PURE__ */ S("div", {
43
43
  "data-testid": "storefront-booking-bike-dialog",
44
44
  className: "flex max-h-[92dvh] flex-col",
45
45
  children: [
46
- /* @__PURE__ */ x(d, {
46
+ /* @__PURE__ */ S(f, {
47
47
  className: "border-b border-slate-200 px-5 py-4 text-left sm:px-6",
48
- children: [/* @__PURE__ */ b(f, {
48
+ children: [/* @__PURE__ */ x(p, {
49
49
  className: "text-left text-lg font-semibold text-slate-950",
50
- children: /* @__PURE__ */ b("span", { children: W })
51
- }), /* @__PURE__ */ b(l, {
50
+ children: /* @__PURE__ */ x("span", { children: G })
51
+ }), /* @__PURE__ */ x(u, {
52
52
  className: "line-clamp-2 text-left text-sm text-slate-600",
53
- children: /* @__PURE__ */ b("span", { children: G })
53
+ children: /* @__PURE__ */ x("span", { children: K })
54
54
  })]
55
55
  }),
56
- /* @__PURE__ */ b("div", {
56
+ /* @__PURE__ */ x("div", {
57
57
  className: "overflow-y-auto",
58
- children: /* @__PURE__ */ x("div", {
58
+ children: /* @__PURE__ */ S("div", {
59
59
  className: "grid gap-5 px-5 py-5 sm:grid-cols-[minmax(0,0.92fr)_minmax(0,1.08fr)] sm:px-6",
60
- children: [/* @__PURE__ */ x("div", {
60
+ children: [/* @__PURE__ */ S("div", {
61
61
  className: "grid gap-4",
62
62
  children: [
63
- /* @__PURE__ */ b("div", {
64
- className: w("relative aspect-[1618/1000] overflow-hidden rounded-2xl", J.className),
65
- style: J.style,
66
- children: q ? /* @__PURE__ */ b("img", {
67
- src: q,
68
- alt: W,
63
+ /* @__PURE__ */ x("div", {
64
+ className: T("relative aspect-[1618/1000] overflow-hidden rounded-2xl", Y.className),
65
+ style: Y.style,
66
+ children: J ? /* @__PURE__ */ x("img", {
67
+ src: J,
68
+ alt: G,
69
69
  className: "absolute inset-0 h-full w-full object-contain p-2",
70
70
  loading: "lazy"
71
- }) : /* @__PURE__ */ b("div", {
71
+ }) : /* @__PURE__ */ x("div", {
72
72
  className: "absolute inset-0 flex items-center justify-center text-slate-400",
73
- children: A.kind === "accessory" ? /* @__PURE__ */ b(D, {
73
+ children: j.kind === "accessory" ? /* @__PURE__ */ x(O, {
74
74
  className: "h-12 w-12",
75
75
  "aria-hidden": "true"
76
- }) : /* @__PURE__ */ b(T, {
76
+ }) : /* @__PURE__ */ x(E, {
77
77
  className: "h-12 w-12",
78
78
  "aria-hidden": "true"
79
79
  })
80
80
  })
81
81
  }),
82
- z ? null : /* @__PURE__ */ x("div", {
82
+ B ? null : /* @__PURE__ */ S("div", {
83
83
  className: "flex flex-wrap items-center gap-2",
84
- children: [/* @__PURE__ */ b(i, {
85
- variant: Y.variant,
86
- children: /* @__PURE__ */ b("span", { children: L(Y.labelKey) })
87
- }), /* @__PURE__ */ b(g, {
88
- prices: A.prices,
89
- openOnHover: A.kind !== "accessory"
84
+ children: [/* @__PURE__ */ x(a, {
85
+ variant: X.variant,
86
+ children: /* @__PURE__ */ x("span", { children: R(X.labelKey) })
87
+ }), /* @__PURE__ */ x(_, {
88
+ prices: j.prices,
89
+ openOnHover: j.kind !== "accessory"
90
90
  })]
91
91
  }),
92
- !z && X.length > 0 ? /* @__PURE__ */ x("div", {
92
+ !B && Z.length > 0 ? /* @__PURE__ */ S("div", {
93
93
  className: "grid gap-2",
94
- children: [/* @__PURE__ */ b("p", {
94
+ children: [/* @__PURE__ */ x("p", {
95
95
  className: "text-sm font-semibold text-slate-950",
96
- children: /* @__PURE__ */ b("span", { children: L("product_features_title") })
97
- }), /* @__PURE__ */ b("ul", {
96
+ children: /* @__PURE__ */ x("span", { children: R("product_features_title") })
97
+ }), /* @__PURE__ */ x("ul", {
98
98
  className: "grid gap-1.5 text-sm text-slate-700",
99
- children: X.map((e, t) => /* @__PURE__ */ x("li", {
99
+ children: Z.map((e, t) => /* @__PURE__ */ S("li", {
100
100
  className: "inline-flex items-start gap-2",
101
- children: [/* @__PURE__ */ b(E, {
101
+ children: [/* @__PURE__ */ x(D, {
102
102
  className: "mt-0.5 h-4 w-4 text-success",
103
103
  "aria-hidden": "true"
104
- }), /* @__PURE__ */ b("span", { children: n(e, R.language, B) })]
105
- }, `${A.id}-${t}`))
104
+ }), /* @__PURE__ */ x("span", { children: r(e, z.language, V) })]
105
+ }, `${j.id}-${t}`))
106
106
  })]
107
107
  }) : null,
108
- z ? null : /* @__PURE__ */ b(h, { warning: K })
108
+ B ? null : /* @__PURE__ */ x(g, { warning: q })
109
109
  ]
110
- }), /* @__PURE__ */ x("div", {
110
+ }), /* @__PURE__ */ S("div", {
111
111
  className: "grid content-start gap-3",
112
112
  children: [
113
- z ? /* @__PURE__ */ x("div", {
113
+ B ? /* @__PURE__ */ S("div", {
114
114
  className: "flex flex-wrap items-center gap-2",
115
- children: [/* @__PURE__ */ b(i, {
116
- variant: Y.variant,
117
- children: /* @__PURE__ */ b("span", { children: L(Y.labelKey) })
118
- }), /* @__PURE__ */ b(g, {
119
- prices: A.prices,
120
- openOnHover: A.kind !== "accessory"
115
+ children: [/* @__PURE__ */ x(a, {
116
+ variant: X.variant,
117
+ children: /* @__PURE__ */ x("span", { children: R(X.labelKey) })
118
+ }), /* @__PURE__ */ x(_, {
119
+ prices: j.prices,
120
+ openOnHover: j.kind !== "accessory"
121
121
  })]
122
122
  }) : null,
123
- z && X.length > 0 ? /* @__PURE__ */ x("details", {
123
+ B && Z.length > 0 ? /* @__PURE__ */ S("details", {
124
124
  className: "group rounded-2xl border border-slate-200 bg-slate-50",
125
- children: [/* @__PURE__ */ x("summary", {
125
+ children: [/* @__PURE__ */ S("summary", {
126
126
  className: "flex cursor-pointer list-none items-center justify-between gap-3 px-3 py-2.5 text-sm font-semibold text-slate-950 [&::-webkit-details-marker]:hidden",
127
- children: [/* @__PURE__ */ b("span", { children: L("product_features_title") }), /* @__PURE__ */ b(O, {
127
+ children: [/* @__PURE__ */ x("span", { children: R("product_features_title") }), /* @__PURE__ */ x(k, {
128
128
  className: "h-4 w-4 shrink-0 transition-transform group-open:rotate-45",
129
129
  "aria-hidden": "true"
130
130
  })]
131
- }), /* @__PURE__ */ b("div", {
131
+ }), /* @__PURE__ */ x("div", {
132
132
  className: "border-t border-slate-200 px-3 py-3",
133
- children: /* @__PURE__ */ b("ul", {
133
+ children: /* @__PURE__ */ x("ul", {
134
134
  className: "grid gap-1.5 text-sm text-slate-700",
135
- children: X.map((e, t) => /* @__PURE__ */ x("li", {
135
+ children: Z.map((e, t) => /* @__PURE__ */ S("li", {
136
136
  className: "inline-flex items-start gap-2",
137
- children: [/* @__PURE__ */ b(E, {
137
+ children: [/* @__PURE__ */ x(D, {
138
138
  className: "mt-0.5 h-4 w-4 text-success",
139
139
  "aria-hidden": "true"
140
- }), /* @__PURE__ */ b("span", { children: n(e, R.language, B) })]
141
- }, `${A.id}-mobile-${t}`))
140
+ }), /* @__PURE__ */ x("span", { children: r(e, z.language, V) })]
141
+ }, `${j.id}-mobile-${t}`))
142
142
  })
143
143
  })]
144
144
  }) : null,
145
- z ? /* @__PURE__ */ b(h, { warning: K }) : null,
146
- /* @__PURE__ */ b("p", {
145
+ B ? /* @__PURE__ */ x(g, { warning: q }) : null,
146
+ /* @__PURE__ */ x("p", {
147
147
  className: "text-2xs font-medium uppercase tracking-[0.18em] text-slate-500",
148
- children: /* @__PURE__ */ b("span", { children: Q })
148
+ children: /* @__PURE__ */ x("span", { children: $ })
149
149
  }),
150
- /* @__PURE__ */ b("div", {
150
+ /* @__PURE__ */ x("div", {
151
151
  className: "grid gap-2",
152
- children: Z.map((e) => {
153
- let n = `storefront-booking-bike-dialog-variant-option-${A.id}-${e.id}`.toLowerCase(), { label: r, description: o } = t(e), s = V[e.id] ?? "1", c = P?.(e.id) === !0, l = N?.(e.id) ?? null;
154
- return /* @__PURE__ */ x("div", {
155
- "data-testid": n,
156
- className: w("flex flex-col gap-3 rounded-2xl border p-3 sm:flex-row sm:items-center sm:justify-between", "border-slate-200 bg-slate-50"),
157
- children: [/* @__PURE__ */ x("div", {
152
+ children: Q.map((e) => {
153
+ let r = `storefront-booking-bike-dialog-variant-option-${j.id}-${e.id}`.toLowerCase(), { label: i, description: s } = t(e), c = n(e), l = H[e.id] ?? "1", u = F?.(e.id) === !0, d = P?.(e.id) ?? null;
154
+ return /* @__PURE__ */ S("div", {
155
+ "data-testid": r,
156
+ className: T("flex flex-col gap-3 rounded-2xl border p-3 sm:flex-row sm:items-center sm:justify-between", "border-slate-200 bg-slate-50"),
157
+ children: [/* @__PURE__ */ S("div", {
158
158
  className: "flex min-w-0 flex-1 flex-col gap-0.5",
159
159
  children: [
160
- /* @__PURE__ */ b("span", {
161
- className: "text-sm font-medium text-slate-950",
162
- children: r
160
+ /* @__PURE__ */ S("div", {
161
+ className: "flex min-w-0 items-baseline gap-2",
162
+ children: [/* @__PURE__ */ x("span", {
163
+ className: "min-w-0 truncate text-sm font-medium text-slate-950",
164
+ title: i,
165
+ children: i
166
+ }), c ? /* @__PURE__ */ x("span", {
167
+ className: "truncate text-xs text-slate-500",
168
+ children: c
169
+ }) : null]
163
170
  }),
164
- o ? /* @__PURE__ */ b("span", {
171
+ s ? /* @__PURE__ */ x("span", {
165
172
  className: "text-xs text-slate-600",
166
- children: o
173
+ children: s
167
174
  }) : null,
168
- l ? /* @__PURE__ */ b("span", {
175
+ d ? /* @__PURE__ */ x("span", {
169
176
  className: "pt-1",
170
- children: /* @__PURE__ */ b(i, {
171
- variant: c ? "destructive" : "outline",
172
- children: /* @__PURE__ */ b("span", { children: l })
177
+ children: /* @__PURE__ */ x(a, {
178
+ variant: u ? "destructive" : "outline",
179
+ children: /* @__PURE__ */ x("span", { children: d })
173
180
  })
174
181
  }) : null
175
182
  ]
176
- }), /* @__PURE__ */ x("div", {
183
+ }), /* @__PURE__ */ S("div", {
177
184
  className: "flex flex-wrap items-center gap-2 sm:justify-end",
178
- children: [/* @__PURE__ */ b(j, {
179
- quantity: s,
180
- ariaLabel: L("quantity_label"),
181
- onQuantityChange: (t) => U(e.id, t),
182
- testIdPrefix: `storefront-booking-bike-dialog-variant-quantity-${A.id}-${e.id}`.toLowerCase()
183
- }), /* @__PURE__ */ x(a, {
185
+ children: [/* @__PURE__ */ x(M, {
186
+ quantity: l,
187
+ ariaLabel: R("quantity_label"),
188
+ onQuantityChange: (t) => W(e.id, t),
189
+ testIdPrefix: `storefront-booking-bike-dialog-variant-quantity-${j.id}-${e.id}`.toLowerCase()
190
+ }), /* @__PURE__ */ S(o, {
184
191
  type: "button",
185
192
  className: "gap-1.5 rounded-xl",
186
- "data-testid": `storefront-booking-bike-dialog-variant-add-${A.id}-${e.id}`.toLowerCase(),
187
- disabled: F,
193
+ "data-testid": `storefront-booking-bike-dialog-variant-add-${j.id}-${e.id}`.toLowerCase(),
194
+ disabled: I,
188
195
  onClick: () => {
189
- I(e.id, k(s));
196
+ L(e.id, A(l));
190
197
  },
191
- children: [/* @__PURE__ */ b("span", { children: L("add_short") }), /* @__PURE__ */ b(O, {
198
+ children: [/* @__PURE__ */ x("span", { children: R("add_short") }), /* @__PURE__ */ x(k, {
192
199
  className: "h-4 w-4",
193
200
  "aria-hidden": "true"
194
201
  })]
@@ -201,14 +208,14 @@ function A({ open: p, product: A, onOpenChange: M, getVariantAvailabilityLabel:
201
208
  })]
202
209
  })
203
210
  }),
204
- /* @__PURE__ */ b(u, {
211
+ /* @__PURE__ */ x(d, {
205
212
  className: "border-t border-slate-200 px-5 py-4 sm:px-6",
206
- children: /* @__PURE__ */ b(a, {
213
+ children: /* @__PURE__ */ x(o, {
207
214
  type: "button",
208
215
  variant: "outline",
209
216
  className: "h-11 w-full rounded-xl sm:w-auto",
210
- onClick: () => M(!1),
211
- children: /* @__PURE__ */ b("span", { children: L("close_modal") })
217
+ onClick: () => N(!1),
218
+ children: /* @__PURE__ */ x("span", { children: R("close_modal") })
212
219
  })
213
220
  })
214
221
  ]
@@ -216,19 +223,19 @@ function A({ open: p, product: A, onOpenChange: M, getVariantAvailabilityLabel:
216
223
  })
217
224
  });
218
225
  }
219
- function j({ ariaLabel: e, onQuantityChange: t, quantity: n, testIdPrefix: r }) {
220
- return /* @__PURE__ */ b("div", {
226
+ function M({ ariaLabel: e, onQuantityChange: t, quantity: n, testIdPrefix: r }) {
227
+ return /* @__PURE__ */ x("div", {
221
228
  className: "flex items-center",
222
- children: /* @__PURE__ */ b(p, {
229
+ children: /* @__PURE__ */ x(m, {
223
230
  type: "text",
224
231
  inputMode: "numeric",
225
232
  pattern: "[0-9]*",
226
233
  value: n,
227
234
  onChange: (e) => {
228
235
  let n = e.target.value.replace(/\D/g, "");
229
- t(n ? String(k(n)) : "");
236
+ t(n ? String(A(n)) : "");
230
237
  },
231
- onBlur: () => t(String(k(n))),
238
+ onBlur: () => t(String(A(n))),
232
239
  className: "h-9 w-16 text-center",
233
240
  "aria-label": e,
234
241
  "data-testid": `${r}-value`
@@ -236,4 +243,4 @@ function j({ ariaLabel: e, onQuantityChange: t, quantity: n, testIdPrefix: r })
236
243
  });
237
244
  }
238
245
  //#endregion
239
- export { A as BookingBikeVariantDialog };
246
+ export { j as BookingBikeVariantDialog };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StorefrontCancellationPolicyNotice/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AAOtE,KAAK,kBAAkB,GAAG,uBAAuB,CAAC,eAAe,CAAC,CAAC,oBAAoB,CAAC,CAAA;AACxF,KAAK,sBAAsB,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAA;AAEjE,KAAK,uCAAuC,GAAG;IAC7C,MAAM,EAAE,kBAAkB,CAAA;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAOD,eAAO,MAAM,6CAA6C,GACxD,QAAQ,kBAAkB,KACzB,sBAAsB,GAAG,IAG3B,CAAA;AAaD,wBAAgB,kCAAkC,CAAC,EACjD,MAAM,EACN,SAAS,GACV,EAAE,uCAAuC,kDA8GzC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StorefrontCancellationPolicyNotice/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AAOtE,KAAK,kBAAkB,GAAG,uBAAuB,CAAC,eAAe,CAAC,CAAC,oBAAoB,CAAC,CAAA;AACxF,KAAK,sBAAsB,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAA;AAEjE,KAAK,uCAAuC,GAAG;IAC7C,MAAM,EAAE,kBAAkB,CAAA;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAOD,eAAO,MAAM,6CAA6C,GACxD,QAAQ,kBAAkB,KACzB,sBAAsB,GAAG,IAG3B,CAAA;AAaD,wBAAgB,kCAAkC,CAAC,EACjD,MAAM,EACN,SAAS,GACV,EAAE,uCAAuC,kDA4GzC"}
@@ -71,12 +71,9 @@ function y({ policy: m, className: y }) {
71
71
  className: "border-b border-slate-200 px-5 py-4 text-left sm:px-6",
72
72
  children: /* @__PURE__ */ c("div", {
73
73
  className: "flex items-start gap-3",
74
- children: [/* @__PURE__ */ s("span", {
75
- className: "mt-0.5 inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-slate-950 text-white",
76
- children: /* @__PURE__ */ s(p, {
77
- className: "h-4 w-4",
78
- "aria-hidden": "true"
79
- })
74
+ children: [/* @__PURE__ */ s(p, {
75
+ className: "mt-0.5 h-5 w-5 shrink-0 text-success",
76
+ "aria-hidden": "true"
80
77
  }), /* @__PURE__ */ c("span", {
81
78
  className: "min-w-0 space-y-1",
82
79
  children: [/* @__PURE__ */ s(o, {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StorefrontInsuranceNotice/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAOrD,KAAK,8BAA8B,GAAG;IACpC,KAAK,EAAE,WAAW,EAAE,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAWD,wBAAgB,yBAAyB,CAAC,EACxC,KAAK,EACL,QAAQ,EACR,SAAS,GACV,EAAE,8BAA8B,2CAiLhC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/StorefrontInsuranceNotice/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAOrD,KAAK,8BAA8B,GAAG;IACpC,KAAK,EAAE,WAAW,EAAE,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAWD,wBAAgB,yBAAyB,CAAC,EACxC,KAAK,EACL,QAAQ,EACR,SAAS,GACV,EAAE,8BAA8B,2CA+KhC"}
@@ -77,12 +77,9 @@ function v({ bikes: v, currency: y, className: b }) {
77
77
  className: "border-b border-slate-200 px-5 py-4 text-left sm:px-6",
78
78
  children: /* @__PURE__ */ l("div", {
79
79
  className: "flex items-start gap-3",
80
- children: [/* @__PURE__ */ c("span", {
81
- className: "mt-0.5 inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-slate-950 text-white",
82
- children: /* @__PURE__ */ c(m, {
83
- className: "h-4 w-4",
84
- "aria-hidden": "true"
85
- })
80
+ children: [/* @__PURE__ */ c(m, {
81
+ className: "mt-0.5 h-5 w-5 shrink-0 text-success",
82
+ "aria-hidden": "true"
86
83
  }), /* @__PURE__ */ l("span", {
87
84
  className: "min-w-0 space-y-1",
88
85
  children: [/* @__PURE__ */ c(s, {
package/dist/index.d.ts CHANGED
@@ -258,6 +258,8 @@ declare type AddressAutocompleteLocationRestriction = {
258
258
 
259
259
  export declare const applyBookingParamsToSearch: (searchParams: URLSearchParams, booking: Partial<StorefrontBookingParams>) => URLSearchParams;
260
260
 
261
+ export declare const assetIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
262
+
261
263
  export declare function Badge({ className, variant, asChild, ...props }: React_2.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
262
264
  asChild?: boolean;
263
265
  }): JSX.Element;
@@ -271,7 +273,7 @@ export declare type BaseAccessoryProduct = z.infer<typeof accessoryProductSchema
271
273
  export declare type BaseAsset = z.infer<typeof baseAssetSchema>;
272
274
 
273
275
  export declare const baseAssetSchema: z.ZodObject<{
274
- _id: z.ZodString;
276
+ _id: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
275
277
  productId: z.ZodString;
276
278
  shopId: z.ZodString;
277
279
  status: z.ZodEnum<{
package/dist/index.js CHANGED
@@ -9,75 +9,75 @@ import { DEFAULT_CANCELLATION_POLICY as B, DEFAULT_PAYMENT_POLICIES as V, cancel
9
9
  import { fulfillmentModeSchema as G, publicBookingEngineConfigurationSchema as K, publicCheckoutConfigurationSchema as q, publicCheckoutDynamicOptionsSchema as J } from "./chunks/pkg/booking-engine/dist/schemas/public-booking-engine-configuration-CEM9mexX.js";
10
10
  import { DEFAULT_BOOKING_DELIVERY_OPTION as Y, bookingCustomerInputSchema as X, bookingDeliveryOptionSchema as Z, bookingScheduleInputSchema as Q, cartItemInputSchema as $, createBookingInputBaseSchema as ee, createBookingInputSchema as te, resolveBookingDeliveryOption as ne, validateBookingDeliveryAddress as re } from "./chunks/pkg/booking-engine/dist/schemas/cart-inputs-D1_Wmkca.js";
11
11
  import { bookingInsuranceConsentSourceSchema as ie, bookingInsuranceItemSnapshotSchema as ae, bookingInsuranceSnapshotSchema as oe, buildBookingInsuranceSnapshot as se, calculateInsuranceCalendarDays as ce, insuranceProviderSchema as le } from "./chunks/pkg/booking-engine/dist/schemas/insurance-CPeHsTss.js";
12
- import { baseAssetSchema as ue, baseAssetStatusSchema as de } from "./chunks/pkg/booking-engine/dist/schemas/base-asset-BRQVuIes.js";
13
- import { baseBookingItemSchema as fe, baseBookingSchema as pe, baseBookingStateSchema as me } from "./chunks/pkg/booking-engine/dist/schemas/base-booking-Bhy2Kww1.js";
14
- import "./chunks/pkg/booking-engine/dist/schemas-BfXM1Dgb.js";
15
- import { STOREFRONT_HERO_MODES as he, storefrontCheckoutModeSchema as ge, storefrontConfigurationSchema as _e, storefrontContentSchema as ve, storefrontFaqItemSchema as ye, storefrontFaqSchema as be, storefrontFulfillmentModeSchema as xe, storefrontHeroModeSchema as Se, storefrontLocalizedRichTextSchema as Ce, storefrontModalMessageSchema as we, storefrontModulesSchema as Te, storefrontReviewsModuleSchema as Ee, storefrontRichTextSchema as De, storefrontSettingsSchema as Oe, storefrontShopSchema as ke, storefrontStatusSchema as Ae, storefrontWorkspaceSchema as je } from "./storefrontSchemas.js";
16
- import { BOOKING_SEARCH_KEYS as Me, TIME_OPTIONS as Ne, applyBookingParamsToSearch as Pe, createBookingPeriodConfigFromBookingEngineConfiguration as Fe, createBookingPeriodConfigFromShopConfiguration as Ie, createBookingPeriodConfigFromStorefrontConfiguration as Le, getBookingDurationLabel as Re, getBookingDurationMinutes as ze, getBookingParamsFromSearch as Be, getBookingSessionStorageKey as Ve, getDefaultBookingParams as He, getDefaultBookingParamsForStorefrontConfiguration as Ue, pickBookingSearchParams as We, readBookingSearchParamsFromSessionStorage as Ge, readBookingSearchParamsFromStorage as Ke, resolveBookingSearchParams as qe, resolveBookingSearchParamsFromSessionStorage as Je, writeBookingSearchParamsToSessionStorage as Ye, writeBookingSearchParamsToStorage as Xe } from "./lib/booking.js";
17
- import { getLocalizedEntry as Ze, getLocalizedValue as Qe } from "./localization.js";
18
- import { CATALOG_PRODUCT_BASE_RATE_UNSET as $e, buildStorefrontProductSlug as et, buildVariantStorefrontProductId as tt, compareCatalogProducts as nt, compareStorefrontAccessoryProducts as rt, compareStorefrontBikeProducts as it, findStorefrontProduct as at, findStorefrontProductBySlug as ot, getCatalogProductBaseRateMinor as st, getCatalogProductPaginationSort as ct, getCatalogProductSortFieldForPriceUnit as lt, getStorefrontBaseDailyRateMinor as ut, getStorefrontCheckoutProductId as dt, getStorefrontProductSelectionDisplayName as ft, getStorefrontRepresentedVariantId as pt, toStorefrontAccessoryProducts as mt, toStorefrontBikeProducts as ht, toStorefrontBookingProducts as gt, toStorefrontBookingProductsCollections as _t } from "./lib/products.js";
19
- import { StorefrontCartProvider as vt, resolveStorefrontCartItemProduct as yt, useStorefrontCart as bt } from "./lib/cart.js";
20
- import { cn as xt, formatPriceMinor as St, getAvailabilityVariant as Ct, getMinDayPriceMinor as wt } from "./lib/utils.js";
21
- import { buildDailyPriceRows as Tt, buildPriceTierLabels as Et, calculateDailyPriceForQuantity as Dt, formatStorefrontPriceMinor as Ot } from "./lib/pricing.js";
22
- import { buildStorefrontCartSummary as kt } from "./lib/cartSummary.js";
23
- import { ROUTE as At, requestSchema as jt, responseSchema as Mt } from "./lib/contactForm.js";
24
- import { formatStorefrontPhoneDisplay as Nt, resolveStorefrontMapsHref as Pt, resolveStorefrontPhoneContact as Ft } from "./lib/storefrontContact.js";
25
- import { buildWhatsAppHref as It, resolveStorefrontWhatsAppContact as Lt, resolveStorefrontWhatsAppHref as Rt } from "./lib/whatsapp.js";
26
- import { ROUTE as zt, requestBaseSchema as Bt, requestCheckoutItemSchema as Vt, requestDeliveryRefinement as Ht, requestSchema as Ut, responseSchema as Wt } from "./lib/checkoutSubmit.js";
27
- import { ROUTE as Gt, requestSchema as Kt, responseSchema as qt, storefrontPublicAccessoryProductSchema as Jt, storefrontPublicBikeAvailabilityStatusSchema as Yt, storefrontPublicBikeProductSchema as Xt, storefrontPublicProductDisplayModeSchema as Zt, storefrontPublicProductPriceSchema as Qt, storefrontPublicProductVariantAttributeSchema as $t, storefrontPublicProductVariantIdentifierSchema as en, storefrontPublicProductVariantSchema as tn } from "./lib/storefrontProducts.js";
28
- import { ROUTE as nn, buildStorefrontAvailabilityKey as rn, doesStorefrontAvailabilityDisplaySoldOut as an, getStorefrontAvailabilityIssue as on, getStorefrontAvailabilityStatus as sn, isStorefrontAvailabilityInsufficient as cn, publicAvailabilityDisplayModeSchema as ln, requestSchema as un, responseSchema as dn, shouldBlockStorefrontUnavailableItem as fn, storefrontAvailabilityProductSchema as pn, storefrontAvailabilityScheduleSchema as mn, storefrontPublicAvailabilityRecordSchema as hn } from "./lib/storefrontAvailability.js";
29
- import { ROUTE as gn, buildStorefrontImageUrl as _n, requestSchema as vn } from "./lib/storefrontImage.js";
30
- import { ROUTE as yn, requestSchema as bn, responseSchema as xn, storefrontTimeSlotSchema as Sn, timeSlotJourneySchema as Cn } from "./lib/storefrontTimeSlots.js";
31
- import { Footer as wn } from "./components/Footer/index.js";
32
- import { Badge as Tn, badgeVariants as En } from "./ui/badge.js";
33
- import { Button as Dn, buttonVariants as On } from "./ui/button.js";
34
- import { Header as kn } from "./components/Header/index.js";
35
- import { storefront as An } from "./i18n/en.js";
36
- import { storefront as jn } from "./i18n/fr.js";
37
- import { PoweredByLoczerBadge as Mn } from "./components/PoweredByLoczerBadge/index.js";
38
- import { PlatformFooter as Nn } from "./components/PlatformFooter/index.js";
39
- import { useWhatsAppFloatingButton as Pn } from "./components/WhatsAppFloatingButton/useWhatsAppFloatingButton.js";
40
- import { WhatsAppFloatingButton as Fn } from "./components/WhatsAppFloatingButton/WhatsAppFloatingButton.js";
12
+ import { assetIdSchema as ue, baseAssetSchema as de, baseAssetStatusSchema as fe } from "./chunks/pkg/booking-engine/dist/schemas/base-asset-B4y__1qj.js";
13
+ import { baseBookingItemSchema as pe, baseBookingSchema as me, baseBookingStateSchema as he } from "./chunks/pkg/booking-engine/dist/schemas/base-booking-Bhy2Kww1.js";
14
+ import "./chunks/pkg/booking-engine/dist/schemas-C2PdkXfm.js";
15
+ import { STOREFRONT_HERO_MODES as ge, storefrontCheckoutModeSchema as _e, storefrontConfigurationSchema as ve, storefrontContentSchema as ye, storefrontFaqItemSchema as be, storefrontFaqSchema as xe, storefrontFulfillmentModeSchema as Se, storefrontHeroModeSchema as Ce, storefrontLocalizedRichTextSchema as we, storefrontModalMessageSchema as Te, storefrontModulesSchema as Ee, storefrontReviewsModuleSchema as De, storefrontRichTextSchema as Oe, storefrontSettingsSchema as ke, storefrontShopSchema as Ae, storefrontStatusSchema as je, storefrontWorkspaceSchema as Me } from "./storefrontSchemas.js";
16
+ import { BOOKING_SEARCH_KEYS as Ne, TIME_OPTIONS as Pe, applyBookingParamsToSearch as Fe, createBookingPeriodConfigFromBookingEngineConfiguration as Ie, createBookingPeriodConfigFromShopConfiguration as Le, createBookingPeriodConfigFromStorefrontConfiguration as Re, getBookingDurationLabel as ze, getBookingDurationMinutes as Be, getBookingParamsFromSearch as Ve, getBookingSessionStorageKey as He, getDefaultBookingParams as Ue, getDefaultBookingParamsForStorefrontConfiguration as We, pickBookingSearchParams as Ge, readBookingSearchParamsFromSessionStorage as Ke, readBookingSearchParamsFromStorage as qe, resolveBookingSearchParams as Je, resolveBookingSearchParamsFromSessionStorage as Ye, writeBookingSearchParamsToSessionStorage as Xe, writeBookingSearchParamsToStorage as Ze } from "./lib/booking.js";
17
+ import { getLocalizedEntry as Qe, getLocalizedValue as $e } from "./localization.js";
18
+ import { CATALOG_PRODUCT_BASE_RATE_UNSET as et, buildStorefrontProductSlug as tt, buildVariantStorefrontProductId as nt, compareCatalogProducts as rt, compareStorefrontAccessoryProducts as it, compareStorefrontBikeProducts as at, findStorefrontProduct as ot, findStorefrontProductBySlug as st, getCatalogProductBaseRateMinor as ct, getCatalogProductPaginationSort as lt, getCatalogProductSortFieldForPriceUnit as ut, getStorefrontBaseDailyRateMinor as dt, getStorefrontCheckoutProductId as ft, getStorefrontProductSelectionDisplayName as pt, getStorefrontRepresentedVariantId as mt, toStorefrontAccessoryProducts as ht, toStorefrontBikeProducts as gt, toStorefrontBookingProducts as _t, toStorefrontBookingProductsCollections as vt } from "./lib/products.js";
19
+ import { StorefrontCartProvider as yt, resolveStorefrontCartItemProduct as bt, useStorefrontCart as xt } from "./lib/cart.js";
20
+ import { cn as St, formatPriceMinor as Ct, getAvailabilityVariant as wt, getMinDayPriceMinor as Tt } from "./lib/utils.js";
21
+ import { buildDailyPriceRows as Et, buildPriceTierLabels as Dt, calculateDailyPriceForQuantity as Ot, formatStorefrontPriceMinor as kt } from "./lib/pricing.js";
22
+ import { buildStorefrontCartSummary as At } from "./lib/cartSummary.js";
23
+ import { ROUTE as jt, requestSchema as Mt, responseSchema as Nt } from "./lib/contactForm.js";
24
+ import { formatStorefrontPhoneDisplay as Pt, resolveStorefrontMapsHref as Ft, resolveStorefrontPhoneContact as It } from "./lib/storefrontContact.js";
25
+ import { buildWhatsAppHref as Lt, resolveStorefrontWhatsAppContact as Rt, resolveStorefrontWhatsAppHref as zt } from "./lib/whatsapp.js";
26
+ import { ROUTE as Bt, requestBaseSchema as Vt, requestCheckoutItemSchema as Ht, requestDeliveryRefinement as Ut, requestSchema as Wt, responseSchema as Gt } from "./lib/checkoutSubmit.js";
27
+ import { ROUTE as Kt, requestSchema as qt, responseSchema as Jt, storefrontPublicAccessoryProductSchema as Yt, storefrontPublicBikeAvailabilityStatusSchema as Xt, storefrontPublicBikeProductSchema as Zt, storefrontPublicProductDisplayModeSchema as Qt, storefrontPublicProductPriceSchema as $t, storefrontPublicProductVariantAttributeSchema as en, storefrontPublicProductVariantIdentifierSchema as tn, storefrontPublicProductVariantSchema as nn } from "./lib/storefrontProducts.js";
28
+ import { ROUTE as rn, buildStorefrontAvailabilityKey as an, doesStorefrontAvailabilityDisplaySoldOut as on, getStorefrontAvailabilityIssue as sn, getStorefrontAvailabilityStatus as cn, isStorefrontAvailabilityInsufficient as ln, publicAvailabilityDisplayModeSchema as un, requestSchema as dn, responseSchema as fn, shouldBlockStorefrontUnavailableItem as pn, storefrontAvailabilityProductSchema as mn, storefrontAvailabilityScheduleSchema as hn, storefrontPublicAvailabilityRecordSchema as gn } from "./lib/storefrontAvailability.js";
29
+ import { ROUTE as _n, buildStorefrontImageUrl as vn, requestSchema as yn } from "./lib/storefrontImage.js";
30
+ import { ROUTE as bn, requestSchema as xn, responseSchema as Sn, storefrontTimeSlotSchema as Cn, timeSlotJourneySchema as wn } from "./lib/storefrontTimeSlots.js";
31
+ import { Footer as Tn } from "./components/Footer/index.js";
32
+ import { Badge as En, badgeVariants as Dn } from "./ui/badge.js";
33
+ import { Button as On, buttonVariants as kn } from "./ui/button.js";
34
+ import { Header as An } from "./components/Header/index.js";
35
+ import { storefront as jn } from "./i18n/en.js";
36
+ import { storefront as Mn } from "./i18n/fr.js";
37
+ import { PoweredByLoczerBadge as Nn } from "./components/PoweredByLoczerBadge/index.js";
38
+ import { PlatformFooter as Pn } from "./components/PlatformFooter/index.js";
39
+ import { useWhatsAppFloatingButton as Fn } from "./components/WhatsAppFloatingButton/useWhatsAppFloatingButton.js";
40
+ import { WhatsAppFloatingButton as In } from "./components/WhatsAppFloatingButton/WhatsAppFloatingButton.js";
41
41
  import "./components/WhatsAppFloatingButton/index.js";
42
- import { Layout as In } from "./components/Layout/index.js";
43
- import { DelayedPlaceholder as Ln, DelayedReveal as Rn } from "./components/DelayedReveal/index.js";
44
- import { BookingPeriodProvider as zn, useBookingPeriod as Bn } from "./components/BookingPeriodSelector/BookingPeriodContext.js";
45
- import { Label as Vn } from "./ui/label.js";
46
- import { BookingStartDateField as Hn } from "./components/BookingPeriodSelector/components/BookingStartDateField.js";
47
- import { BookingStartTimeField as Un } from "./components/BookingPeriodSelector/components/BookingStartTimeField.js";
48
- import { BookingEndDateField as Wn } from "./components/BookingPeriodSelector/components/BookingEndDateField.js";
49
- import { BookingEndTimeField as Gn } from "./components/BookingPeriodSelector/components/BookingEndTimeField.js";
50
- import { BookingTimeSlotsStatus as Kn } from "./components/BookingPeriodSelector/components/BookingTimeSlotsStatus.js";
51
- import { BookingMobileDateDrawer as qn } from "./components/BookingPeriodSelector/components/BookingMobileDateDrawer.js";
52
- import { BookingPeriodSelector as Jn } from "./components/BookingPeriodSelector/index.js";
53
- import { BookingFlowSteps as Yn } from "./components/BookingFlowSteps/index.js";
54
- import { Input as Xn } from "./ui/input.js";
55
- import { DeliveryAddressSelector as Zn } from "./components/DeliveryAddressSelector/index.js";
56
- import { StorefrontContext as Qn, useOptionalStorefront as $n, useStorefront as er, useStorefrontBookingProducts as tr, useStorefrontConfig as nr, useStorefrontProducts as rr, useStorefrontWorkspaceLanguage as ir } from "./StorefrontContext.js";
57
- import { Form as ar, FormControl as or, FormDescription as sr, FormField as cr, FormItem as lr, FormLabel as ur, FormMessage as dr, useFormField as fr } from "./ui/form.js";
58
- import { Textarea as pr } from "./ui/textarea.js";
59
- import { ContactSection as mr } from "./components/ContactSection/index.js";
60
- import { TestimonialsSection as hr } from "./components/TestimonialsSection/index.js";
61
- import { AboutSection as gr } from "./components/AboutSection/index.js";
62
- import { StepSectionTitle as _r } from "./components/StepSectionTitle/index.js";
63
- import { Card as vr, CardAction as yr, CardContent as br, CardDescription as xr, CardFooter as Sr, CardHeader as Cr, CardTitle as wr } from "./ui/card.js";
64
- import { ProductWarningNotice as Tr } from "./components/ProductWarningNotice/index.js";
65
- import { StorefrontCartPanel as Er } from "./components/StorefrontCartPanel/index.js";
66
- import { ProductPriceBadge as Dr } from "./components/ProductPriceBadge/index.js";
67
- import { ContractSaleDocument as Or } from "./components/ContractSaleDocument/Invoice.js";
42
+ import { Layout as Ln } from "./components/Layout/index.js";
43
+ import { DelayedPlaceholder as Rn, DelayedReveal as zn } from "./components/DelayedReveal/index.js";
44
+ import { BookingPeriodProvider as Bn, useBookingPeriod as Vn } from "./components/BookingPeriodSelector/BookingPeriodContext.js";
45
+ import { Label as Hn } from "./ui/label.js";
46
+ import { BookingStartDateField as Un } from "./components/BookingPeriodSelector/components/BookingStartDateField.js";
47
+ import { BookingStartTimeField as Wn } from "./components/BookingPeriodSelector/components/BookingStartTimeField.js";
48
+ import { BookingEndDateField as Gn } from "./components/BookingPeriodSelector/components/BookingEndDateField.js";
49
+ import { BookingEndTimeField as Kn } from "./components/BookingPeriodSelector/components/BookingEndTimeField.js";
50
+ import { BookingTimeSlotsStatus as qn } from "./components/BookingPeriodSelector/components/BookingTimeSlotsStatus.js";
51
+ import { BookingMobileDateDrawer as Jn } from "./components/BookingPeriodSelector/components/BookingMobileDateDrawer.js";
52
+ import { BookingPeriodSelector as Yn } from "./components/BookingPeriodSelector/index.js";
53
+ import { BookingFlowSteps as Xn } from "./components/BookingFlowSteps/index.js";
54
+ import { Input as Zn } from "./ui/input.js";
55
+ import { DeliveryAddressSelector as Qn } from "./components/DeliveryAddressSelector/index.js";
56
+ import { StorefrontContext as $n, useOptionalStorefront as er, useStorefront as tr, useStorefrontBookingProducts as nr, useStorefrontConfig as rr, useStorefrontProducts as ir, useStorefrontWorkspaceLanguage as ar } from "./StorefrontContext.js";
57
+ import { Form as or, FormControl as sr, FormDescription as cr, FormField as lr, FormItem as ur, FormLabel as dr, FormMessage as fr, useFormField as pr } from "./ui/form.js";
58
+ import { Textarea as mr } from "./ui/textarea.js";
59
+ import { ContactSection as hr } from "./components/ContactSection/index.js";
60
+ import { TestimonialsSection as gr } from "./components/TestimonialsSection/index.js";
61
+ import { AboutSection as _r } from "./components/AboutSection/index.js";
62
+ import { StepSectionTitle as vr } from "./components/StepSectionTitle/index.js";
63
+ import { Card as yr, CardAction as br, CardContent as xr, CardDescription as Sr, CardFooter as Cr, CardHeader as wr, CardTitle as Tr } from "./ui/card.js";
64
+ import { ProductWarningNotice as Er } from "./components/ProductWarningNotice/index.js";
65
+ import { StorefrontCartPanel as Dr } from "./components/StorefrontCartPanel/index.js";
66
+ import { ProductPriceBadge as Or } from "./components/ProductPriceBadge/index.js";
67
+ import { ContractSaleDocument as kr } from "./components/ContractSaleDocument/Invoice.js";
68
68
  import "./components/ContractSaleDocument/index.js";
69
- import { RadioGroup as kr, RadioGroupItem as Ar } from "./ui/radio-group.js";
69
+ import { RadioGroup as Ar, RadioGroupItem as jr } from "./ui/radio-group.js";
70
70
  import "./pages/HomePage.js";
71
71
  import "./pages/BookingPage.js";
72
72
  import "./pages/ProductPage.js";
73
73
  import "./pages/CheckoutPage.js";
74
74
  import "./pages/CheckoutSuccessPage.js";
75
75
  import "./pages/NotFoundPage.js";
76
- import { accessories as jr } from "./data/accessories.js";
77
- import Mr from "./data/bikes.js";
78
- import { contractSaleDocumentAcceptanceLevelSchema as Nr, contractSaleDocumentAcceptanceRecordSchema as Pr, contractSaleDocumentAcceptanceSchema as Fr, contractSaleDocumentAddressSchema as Ir, contractSaleDocumentAppendixKindSchema as Lr, contractSaleDocumentAppendixSchema as Rr, contractSaleDocumentContactSchema as zr, contractSaleDocumentKindSchema as Br, contractSaleDocumentLanguageCodeSchema as Vr, contractSaleDocumentLanguageSchema as Hr, contractSaleDocumentLineItemSchema as Ur, contractSaleDocumentRentalSchema as Wr, contractSaleDocumentSchema as Gr, contractSaleDocumentSignatureSchema as Kr } from "./lib/contractSaleDocument.js";
79
- import { ACCEPT_CONTRACT_SALE_DOCUMENT_ROUTE as qr, DOWNLOAD_CONTRACT_SALE_DOCUMENT_PDF_ROUTE as Jr, GET_CONTRACT_SALE_DOCUMENT_ROUTE as Yr, acceptContractSaleDocumentRequestSchema as Xr, acceptContractSaleDocumentResponseSchema as Zr, contractSaleDocumentAcceptanceInputSchema as Qr, contractSaleDocumentAcceptanceRecordInputSchema as $r, contractSaleDocumentApiAcceptanceRecordSchema as ei, contractSaleDocumentApiAcceptanceSchema as ti, contractSaleDocumentApiSchema as ni, contractSaleDocumentApiSignatureSchema as ri, contractSaleDocumentReferenceSchema as ii, contractSaleDocumentReferenceTypeSchema as ai, contractSaleDocumentSignatureInputSchema as oi, downloadContractSaleDocumentPdfRequestSchema as si, getContractSaleDocumentRequestSchema as ci, getContractSaleDocumentResponseSchema as li } from "./lib/contractSaleDocumentApi.js";
80
- import ui from "./routes.js";
81
- import { loader as di } from "./StorefrontProvider.js";
82
- import { Select as fi, SelectContent as pi, SelectGroup as mi, SelectIcon as hi, SelectItem as gi, SelectItemIndicator as _i, SelectItemText as vi, SelectLabel as yi, SelectScrollDownButton as bi, SelectScrollUpButton as xi, SelectSeparator as Si, SelectTrigger as Ci, SelectValue as wi } from "./ui/select.js";
83
- export { qr as ACCEPT_CONTRACT_SALE_DOCUMENT_ROUTE, gr as AboutSection, Me as BOOKING_SEARCH_KEYS, Tn as Badge, Wn as BookingEndDateField, Gn as BookingEndTimeField, Yn as BookingFlowSteps, qn as BookingMobileDateDrawer, zn as BookingPeriodProvider, Jn as BookingPeriodSelector, Hn as BookingStartDateField, Un as BookingStartTimeField, Kn as BookingTimeSlotsStatus, Dn as Button, $e as CATALOG_PRODUCT_BASE_RATE_UNSET, vr as Card, yr as CardAction, br as CardContent, xr as CardDescription, Sr as CardFooter, Cr as CardHeader, wr as CardTitle, mr as ContactSection, Or as ContractSaleDocument, Y as DEFAULT_BOOKING_DELIVERY_OPTION, B as DEFAULT_CANCELLATION_POLICY, V as DEFAULT_PAYMENT_POLICIES, p as DEFAULT_PRODUCT_KIND, Jr as DOWNLOAD_CONTRACT_SALE_DOCUMENT_PDF_ROUTE, Ln as DelayedPlaceholder, Rn as DelayedReveal, Zn as DeliveryAddressSelector, wn as Footer, ar as Form, or as FormControl, sr as FormDescription, cr as FormField, lr as FormItem, ur as FormLabel, dr as FormMessage, Yr as GET_CONTRACT_SALE_DOCUMENT_ROUTE, kn as Header, Xn as Input, Vn as Label, In as Layout, m as PRODUCT_VARIANT_CODE_IDENTIFIER_KIND, h as PRODUCT_VARIANT_CODE_MAX_LENGTH, Nn as PlatformFooter, Mn as PoweredByLoczerBadge, Dr as ProductPriceBadge, Tr as ProductWarningNotice, At as ROUTE, kr as RadioGroup, Ar as RadioGroupItem, nn as STOREFRONT_AVAILABILITY_ROUTE, zt as STOREFRONT_CHECKOUT_SUBMIT_ROUTE, he as STOREFRONT_HERO_MODES, gn as STOREFRONT_IMAGE_ROUTE, Gt as STOREFRONT_PRODUCTS_ROUTE, yn as STOREFRONT_TIME_SLOTS_ROUTE, fi as Select, pi as SelectContent, mi as SelectGroup, hi as SelectIcon, gi as SelectItem, _i as SelectItemIndicator, vi as SelectItemText, yi as SelectLabel, bi as SelectScrollDownButton, xi as SelectScrollUpButton, Si as SelectSeparator, Ci as SelectTrigger, wi as SelectValue, _r as StepSectionTitle, Er as StorefrontCartPanel, vt as StorefrontCartProvider, Qn as StorefrontContext, Ne as TIME_OPTIONS, hr as TestimonialsSection, pr as Textarea, Fn as WhatsAppFloatingButton, Xr as acceptContractSaleDocumentRequestSchema, Zr as acceptContractSaleDocumentResponseSchema, jr as accessories, g as accessoryProductSchema, Pe as applyBookingParamsToSearch, En as badgeVariants, ue as baseAssetSchema, de as baseAssetStatusSchema, fe as baseBookingItemSchema, pe as baseBookingSchema, me as baseBookingStateSchema, _ as bikeProductSchema, Mr as bikes, X as bookingCustomerInputSchema, Z as bookingDeliveryOptionSchema, ie as bookingInsuranceConsentSourceSchema, ae as bookingInsuranceItemSnapshotSchema, oe as bookingInsuranceSnapshotSchema, Q as bookingScheduleInputSchema, se as buildBookingInsuranceSnapshot, Tt as buildDailyPriceRows, Et as buildPriceTierLabels, rn as buildStorefrontAvailabilityKey, kt as buildStorefrontCartSummary, _n as buildStorefrontImageUrl, et as buildStorefrontProductSlug, tt as buildVariantStorefrontProductId, It as buildWhatsAppHref, On as buttonVariants, Dt as calculateDailyPriceForQuantity, ce as calculateInsuranceCalendarDays, H as cancellationPolicySchema, U as cancellationPolicyTierSchema, $ as cartItemInputSchema, xt as cn, nt as compareCatalogProducts, rt as compareStorefrontAccessoryProducts, it as compareStorefrontBikeProducts, Qr as contractSaleDocumentAcceptanceInputSchema, Nr as contractSaleDocumentAcceptanceLevelSchema, $r as contractSaleDocumentAcceptanceRecordInputSchema, Pr as contractSaleDocumentAcceptanceRecordSchema, Fr as contractSaleDocumentAcceptanceSchema, Ir as contractSaleDocumentAddressSchema, ei as contractSaleDocumentApiAcceptanceRecordSchema, ti as contractSaleDocumentApiAcceptanceSchema, ni as contractSaleDocumentApiSchema, ri as contractSaleDocumentApiSignatureSchema, Lr as contractSaleDocumentAppendixKindSchema, Rr as contractSaleDocumentAppendixSchema, zr as contractSaleDocumentContactSchema, Br as contractSaleDocumentKindSchema, Vr as contractSaleDocumentLanguageCodeSchema, Hr as contractSaleDocumentLanguageSchema, Ur as contractSaleDocumentLineItemSchema, ii as contractSaleDocumentReferenceSchema, ai as contractSaleDocumentReferenceTypeSchema, Wr as contractSaleDocumentRentalSchema, Gr as contractSaleDocumentSchema, oi as contractSaleDocumentSignatureInputSchema, Kr as contractSaleDocumentSignatureSchema, ee as createBookingInputBaseSchema, te as createBookingInputSchema, Fe as createBookingPeriodConfigFromBookingEngineConfiguration, Ie as createBookingPeriodConfigFromShopConfiguration, Le as createBookingPeriodConfigFromStorefrontConfiguration, e as createLocalizedStringEntry, a as currencyCodeSchema, o as currencyMinorUnitDigits, an as doesStorefrontAvailabilityDisplaySoldOut, si as downloadContractSaleDocumentPdfRequestSchema, v as eBikeProductSchema, at as findStorefrontProduct, ot as findStorefrontProductBySlug, St as formatPriceMinor, Nt as formatStorefrontPhoneDisplay, Ot as formatStorefrontPriceMinor, G as fulfillmentModeSchema, Ct as getAvailabilityVariant, Re as getBookingDurationLabel, ze as getBookingDurationMinutes, Be as getBookingParamsFromSearch, Ve as getBookingSessionStorageKey, st as getCatalogProductBaseRateMinor, ct as getCatalogProductPaginationSort, lt as getCatalogProductSortFieldForPriceUnit, ci as getContractSaleDocumentRequestSchema, li as getContractSaleDocumentResponseSchema, He as getDefaultBookingParams, Ue as getDefaultBookingParamsForStorefrontConfiguration, Ze as getLocalizedEntry, t as getLocalizedStringValue, Qe as getLocalizedValue, wt as getMinDayPriceMinor, on as getStorefrontAvailabilityIssue, sn as getStorefrontAvailabilityStatus, ut as getStorefrontBaseDailyRateMinor, dt as getStorefrontCheckoutProductId, ft as getStorefrontProductSelectionDisplayName, pt as getStorefrontRepresentedVariantId, le as insuranceProviderSchema, y as isProductVariantCodeIdentifierKind, cn as isStorefrontAvailabilityInsufficient, j as isoDateSchema, di as loader, n as localizedStringArraySchema, r as localizedStringEntrySchema, i as localizedStringSchema, s as majorToMinor, c as minorToMajor, l as moneyMinorSchema, W as paymentPoliciesSchema, We as pickBookingSearchParams, d as priceSchema, f as priceUnitSchema, b as productInsuranceSchema, x as productKindSchema, S as productSchema, C as productStorefrontDisplayModeSchema, w as productVariantAttributeSchema, T as productVariantCodeSchema, E as productVariantIdentifierSchema, D as productVariantSchema, ln as publicAvailabilityDisplayModeSchema, K as publicBookingEngineConfigurationSchema, q as publicCheckoutConfigurationSchema, J as publicCheckoutDynamicOptionsSchema, Ge as readBookingSearchParamsFromSessionStorage, Ke as readBookingSearchParamsFromStorage, jt as requestSchema, ne as resolveBookingDeliveryOption, qe as resolveBookingSearchParams, Je as resolveBookingSearchParamsFromSessionStorage, yt as resolveStorefrontCartItemProduct, Pt as resolveStorefrontMapsHref, Ft as resolveStorefrontPhoneContact, Lt as resolveStorefrontWhatsAppContact, Rt as resolveStorefrontWhatsAppHref, Mt as responseSchema, O as richTextJsonDocSchema, k as richTextSchema, A as richTextVersionSchema, M as shopConfigurationSchema, N as shopExtraTimeSlotRuleSchema, P as shopOpeningDayIndexSchema, F as shopOpeningDaySchema, I as shopOpeningHoursOverrideSchema, L as shopOpeningHoursPeriodSchema, R as shopOpeningSlotSchema, fn as shouldBlockStorefrontUnavailableItem, u as signedMoneyMinorSchema, pn as storefrontAvailabilityProductSchema, un as storefrontAvailabilityRequestSchema, dn as storefrontAvailabilityResponseSchema, mn as storefrontAvailabilityScheduleSchema, ge as storefrontCheckoutModeSchema, Ht as storefrontCheckoutSubmitDeliveryRefinement, Vt as storefrontCheckoutSubmitItemSchema, Bt as storefrontCheckoutSubmitRequestBaseSchema, Ut as storefrontCheckoutSubmitRequestSchema, Wt as storefrontCheckoutSubmitResponseSchema, _e as storefrontConfigurationSchema, ve as storefrontContentSchema, An as storefrontEn, ye as storefrontFaqItemSchema, be as storefrontFaqSchema, jn as storefrontFr, xe as storefrontFulfillmentModeSchema, Se as storefrontHeroModeSchema, vn as storefrontImageRequestSchema, Ce as storefrontLocalizedRichTextSchema, we as storefrontModalMessageSchema, Te as storefrontModulesSchema, Kt as storefrontProductsRequestSchema, qt as storefrontProductsResponseSchema, Jt as storefrontPublicAccessoryProductSchema, hn as storefrontPublicAvailabilityRecordSchema, Yt as storefrontPublicBikeAvailabilityStatusSchema, Xt as storefrontPublicBikeProductSchema, Zt as storefrontPublicProductDisplayModeSchema, Qt as storefrontPublicProductPriceSchema, $t as storefrontPublicProductVariantAttributeSchema, en as storefrontPublicProductVariantIdentifierSchema, tn as storefrontPublicProductVariantSchema, Ee as storefrontReviewsModuleSchema, De as storefrontRichTextSchema, ui as storefrontRoutes, Oe as storefrontSettingsSchema, ke as storefrontShopSchema, Ae as storefrontStatusSchema, Cn as storefrontTimeSlotJourneySchema, Sn as storefrontTimeSlotSchema, bn as storefrontTimeSlotsRequestSchema, xn as storefrontTimeSlotsResponseSchema, je as storefrontWorkspaceSchema, z as timeOfDaySchema, mt as toStorefrontAccessoryProducts, ht as toStorefrontBikeProducts, gt as toStorefrontBookingProducts, _t as toStorefrontBookingProductsCollections, Bn as useBookingPeriod, fr as useFormField, $n as useOptionalStorefront, er as useStorefront, tr as useStorefrontBookingProducts, bt as useStorefrontCart, nr as useStorefrontConfig, rr as useStorefrontProducts, ir as useStorefrontWorkspaceLanguage, Pn as useWhatsAppFloatingButton, re as validateBookingDeliveryAddress, Ye as writeBookingSearchParamsToSessionStorage, Xe as writeBookingSearchParamsToStorage };
76
+ import { accessories as Mr } from "./data/accessories.js";
77
+ import Nr from "./data/bikes.js";
78
+ import { contractSaleDocumentAcceptanceLevelSchema as Pr, contractSaleDocumentAcceptanceRecordSchema as Fr, contractSaleDocumentAcceptanceSchema as Ir, contractSaleDocumentAddressSchema as Lr, contractSaleDocumentAppendixKindSchema as Rr, contractSaleDocumentAppendixSchema as zr, contractSaleDocumentContactSchema as Br, contractSaleDocumentKindSchema as Vr, contractSaleDocumentLanguageCodeSchema as Hr, contractSaleDocumentLanguageSchema as Ur, contractSaleDocumentLineItemSchema as Wr, contractSaleDocumentRentalSchema as Gr, contractSaleDocumentSchema as Kr, contractSaleDocumentSignatureSchema as qr } from "./lib/contractSaleDocument.js";
79
+ import { ACCEPT_CONTRACT_SALE_DOCUMENT_ROUTE as Jr, DOWNLOAD_CONTRACT_SALE_DOCUMENT_PDF_ROUTE as Yr, GET_CONTRACT_SALE_DOCUMENT_ROUTE as Xr, acceptContractSaleDocumentRequestSchema as Zr, acceptContractSaleDocumentResponseSchema as Qr, contractSaleDocumentAcceptanceInputSchema as $r, contractSaleDocumentAcceptanceRecordInputSchema as ei, contractSaleDocumentApiAcceptanceRecordSchema as ti, contractSaleDocumentApiAcceptanceSchema as ni, contractSaleDocumentApiSchema as ri, contractSaleDocumentApiSignatureSchema as ii, contractSaleDocumentReferenceSchema as ai, contractSaleDocumentReferenceTypeSchema as oi, contractSaleDocumentSignatureInputSchema as si, downloadContractSaleDocumentPdfRequestSchema as ci, getContractSaleDocumentRequestSchema as li, getContractSaleDocumentResponseSchema as ui } from "./lib/contractSaleDocumentApi.js";
80
+ import di from "./routes.js";
81
+ import { loader as fi } from "./StorefrontProvider.js";
82
+ import { Select as pi, SelectContent as mi, SelectGroup as hi, SelectIcon as gi, SelectItem as _i, SelectItemIndicator as vi, SelectItemText as yi, SelectLabel as bi, SelectScrollDownButton as xi, SelectScrollUpButton as Si, SelectSeparator as Ci, SelectTrigger as wi, SelectValue as Ti } from "./ui/select.js";
83
+ export { Jr as ACCEPT_CONTRACT_SALE_DOCUMENT_ROUTE, _r as AboutSection, Ne as BOOKING_SEARCH_KEYS, En as Badge, Gn as BookingEndDateField, Kn as BookingEndTimeField, Xn as BookingFlowSteps, Jn as BookingMobileDateDrawer, Bn as BookingPeriodProvider, Yn as BookingPeriodSelector, Un as BookingStartDateField, Wn as BookingStartTimeField, qn as BookingTimeSlotsStatus, On as Button, et as CATALOG_PRODUCT_BASE_RATE_UNSET, yr as Card, br as CardAction, xr as CardContent, Sr as CardDescription, Cr as CardFooter, wr as CardHeader, Tr as CardTitle, hr as ContactSection, kr as ContractSaleDocument, Y as DEFAULT_BOOKING_DELIVERY_OPTION, B as DEFAULT_CANCELLATION_POLICY, V as DEFAULT_PAYMENT_POLICIES, p as DEFAULT_PRODUCT_KIND, Yr as DOWNLOAD_CONTRACT_SALE_DOCUMENT_PDF_ROUTE, Rn as DelayedPlaceholder, zn as DelayedReveal, Qn as DeliveryAddressSelector, Tn as Footer, or as Form, sr as FormControl, cr as FormDescription, lr as FormField, ur as FormItem, dr as FormLabel, fr as FormMessage, Xr as GET_CONTRACT_SALE_DOCUMENT_ROUTE, An as Header, Zn as Input, Hn as Label, Ln as Layout, m as PRODUCT_VARIANT_CODE_IDENTIFIER_KIND, h as PRODUCT_VARIANT_CODE_MAX_LENGTH, Pn as PlatformFooter, Nn as PoweredByLoczerBadge, Or as ProductPriceBadge, Er as ProductWarningNotice, jt as ROUTE, Ar as RadioGroup, jr as RadioGroupItem, rn as STOREFRONT_AVAILABILITY_ROUTE, Bt as STOREFRONT_CHECKOUT_SUBMIT_ROUTE, ge as STOREFRONT_HERO_MODES, _n as STOREFRONT_IMAGE_ROUTE, Kt as STOREFRONT_PRODUCTS_ROUTE, bn as STOREFRONT_TIME_SLOTS_ROUTE, pi as Select, mi as SelectContent, hi as SelectGroup, gi as SelectIcon, _i as SelectItem, vi as SelectItemIndicator, yi as SelectItemText, bi as SelectLabel, xi as SelectScrollDownButton, Si as SelectScrollUpButton, Ci as SelectSeparator, wi as SelectTrigger, Ti as SelectValue, vr as StepSectionTitle, Dr as StorefrontCartPanel, yt as StorefrontCartProvider, $n as StorefrontContext, Pe as TIME_OPTIONS, gr as TestimonialsSection, mr as Textarea, In as WhatsAppFloatingButton, Zr as acceptContractSaleDocumentRequestSchema, Qr as acceptContractSaleDocumentResponseSchema, Mr as accessories, g as accessoryProductSchema, Fe as applyBookingParamsToSearch, ue as assetIdSchema, Dn as badgeVariants, de as baseAssetSchema, fe as baseAssetStatusSchema, pe as baseBookingItemSchema, me as baseBookingSchema, he as baseBookingStateSchema, _ as bikeProductSchema, Nr as bikes, X as bookingCustomerInputSchema, Z as bookingDeliveryOptionSchema, ie as bookingInsuranceConsentSourceSchema, ae as bookingInsuranceItemSnapshotSchema, oe as bookingInsuranceSnapshotSchema, Q as bookingScheduleInputSchema, se as buildBookingInsuranceSnapshot, Et as buildDailyPriceRows, Dt as buildPriceTierLabels, an as buildStorefrontAvailabilityKey, At as buildStorefrontCartSummary, vn as buildStorefrontImageUrl, tt as buildStorefrontProductSlug, nt as buildVariantStorefrontProductId, Lt as buildWhatsAppHref, kn as buttonVariants, Ot as calculateDailyPriceForQuantity, ce as calculateInsuranceCalendarDays, H as cancellationPolicySchema, U as cancellationPolicyTierSchema, $ as cartItemInputSchema, St as cn, rt as compareCatalogProducts, it as compareStorefrontAccessoryProducts, at as compareStorefrontBikeProducts, $r as contractSaleDocumentAcceptanceInputSchema, Pr as contractSaleDocumentAcceptanceLevelSchema, ei as contractSaleDocumentAcceptanceRecordInputSchema, Fr as contractSaleDocumentAcceptanceRecordSchema, Ir as contractSaleDocumentAcceptanceSchema, Lr as contractSaleDocumentAddressSchema, ti as contractSaleDocumentApiAcceptanceRecordSchema, ni as contractSaleDocumentApiAcceptanceSchema, ri as contractSaleDocumentApiSchema, ii as contractSaleDocumentApiSignatureSchema, Rr as contractSaleDocumentAppendixKindSchema, zr as contractSaleDocumentAppendixSchema, Br as contractSaleDocumentContactSchema, Vr as contractSaleDocumentKindSchema, Hr as contractSaleDocumentLanguageCodeSchema, Ur as contractSaleDocumentLanguageSchema, Wr as contractSaleDocumentLineItemSchema, ai as contractSaleDocumentReferenceSchema, oi as contractSaleDocumentReferenceTypeSchema, Gr as contractSaleDocumentRentalSchema, Kr as contractSaleDocumentSchema, si as contractSaleDocumentSignatureInputSchema, qr as contractSaleDocumentSignatureSchema, ee as createBookingInputBaseSchema, te as createBookingInputSchema, Ie as createBookingPeriodConfigFromBookingEngineConfiguration, Le as createBookingPeriodConfigFromShopConfiguration, Re as createBookingPeriodConfigFromStorefrontConfiguration, e as createLocalizedStringEntry, a as currencyCodeSchema, o as currencyMinorUnitDigits, on as doesStorefrontAvailabilityDisplaySoldOut, ci as downloadContractSaleDocumentPdfRequestSchema, v as eBikeProductSchema, ot as findStorefrontProduct, st as findStorefrontProductBySlug, Ct as formatPriceMinor, Pt as formatStorefrontPhoneDisplay, kt as formatStorefrontPriceMinor, G as fulfillmentModeSchema, wt as getAvailabilityVariant, ze as getBookingDurationLabel, Be as getBookingDurationMinutes, Ve as getBookingParamsFromSearch, He as getBookingSessionStorageKey, ct as getCatalogProductBaseRateMinor, lt as getCatalogProductPaginationSort, ut as getCatalogProductSortFieldForPriceUnit, li as getContractSaleDocumentRequestSchema, ui as getContractSaleDocumentResponseSchema, Ue as getDefaultBookingParams, We as getDefaultBookingParamsForStorefrontConfiguration, Qe as getLocalizedEntry, t as getLocalizedStringValue, $e as getLocalizedValue, Tt as getMinDayPriceMinor, sn as getStorefrontAvailabilityIssue, cn as getStorefrontAvailabilityStatus, dt as getStorefrontBaseDailyRateMinor, ft as getStorefrontCheckoutProductId, pt as getStorefrontProductSelectionDisplayName, mt as getStorefrontRepresentedVariantId, le as insuranceProviderSchema, y as isProductVariantCodeIdentifierKind, ln as isStorefrontAvailabilityInsufficient, j as isoDateSchema, fi as loader, n as localizedStringArraySchema, r as localizedStringEntrySchema, i as localizedStringSchema, s as majorToMinor, c as minorToMajor, l as moneyMinorSchema, W as paymentPoliciesSchema, Ge as pickBookingSearchParams, d as priceSchema, f as priceUnitSchema, b as productInsuranceSchema, x as productKindSchema, S as productSchema, C as productStorefrontDisplayModeSchema, w as productVariantAttributeSchema, T as productVariantCodeSchema, E as productVariantIdentifierSchema, D as productVariantSchema, un as publicAvailabilityDisplayModeSchema, K as publicBookingEngineConfigurationSchema, q as publicCheckoutConfigurationSchema, J as publicCheckoutDynamicOptionsSchema, Ke as readBookingSearchParamsFromSessionStorage, qe as readBookingSearchParamsFromStorage, Mt as requestSchema, ne as resolveBookingDeliveryOption, Je as resolveBookingSearchParams, Ye as resolveBookingSearchParamsFromSessionStorage, bt as resolveStorefrontCartItemProduct, Ft as resolveStorefrontMapsHref, It as resolveStorefrontPhoneContact, Rt as resolveStorefrontWhatsAppContact, zt as resolveStorefrontWhatsAppHref, Nt as responseSchema, O as richTextJsonDocSchema, k as richTextSchema, A as richTextVersionSchema, M as shopConfigurationSchema, N as shopExtraTimeSlotRuleSchema, P as shopOpeningDayIndexSchema, F as shopOpeningDaySchema, I as shopOpeningHoursOverrideSchema, L as shopOpeningHoursPeriodSchema, R as shopOpeningSlotSchema, pn as shouldBlockStorefrontUnavailableItem, u as signedMoneyMinorSchema, mn as storefrontAvailabilityProductSchema, dn as storefrontAvailabilityRequestSchema, fn as storefrontAvailabilityResponseSchema, hn as storefrontAvailabilityScheduleSchema, _e as storefrontCheckoutModeSchema, Ut as storefrontCheckoutSubmitDeliveryRefinement, Ht as storefrontCheckoutSubmitItemSchema, Vt as storefrontCheckoutSubmitRequestBaseSchema, Wt as storefrontCheckoutSubmitRequestSchema, Gt as storefrontCheckoutSubmitResponseSchema, ve as storefrontConfigurationSchema, ye as storefrontContentSchema, jn as storefrontEn, be as storefrontFaqItemSchema, xe as storefrontFaqSchema, Mn as storefrontFr, Se as storefrontFulfillmentModeSchema, Ce as storefrontHeroModeSchema, yn as storefrontImageRequestSchema, we as storefrontLocalizedRichTextSchema, Te as storefrontModalMessageSchema, Ee as storefrontModulesSchema, qt as storefrontProductsRequestSchema, Jt as storefrontProductsResponseSchema, Yt as storefrontPublicAccessoryProductSchema, gn as storefrontPublicAvailabilityRecordSchema, Xt as storefrontPublicBikeAvailabilityStatusSchema, Zt as storefrontPublicBikeProductSchema, Qt as storefrontPublicProductDisplayModeSchema, $t as storefrontPublicProductPriceSchema, en as storefrontPublicProductVariantAttributeSchema, tn as storefrontPublicProductVariantIdentifierSchema, nn as storefrontPublicProductVariantSchema, De as storefrontReviewsModuleSchema, Oe as storefrontRichTextSchema, di as storefrontRoutes, ke as storefrontSettingsSchema, Ae as storefrontShopSchema, je as storefrontStatusSchema, wn as storefrontTimeSlotJourneySchema, Cn as storefrontTimeSlotSchema, xn as storefrontTimeSlotsRequestSchema, Sn as storefrontTimeSlotsResponseSchema, Me as storefrontWorkspaceSchema, z as timeOfDaySchema, ht as toStorefrontAccessoryProducts, gt as toStorefrontBikeProducts, _t as toStorefrontBookingProducts, vt as toStorefrontBookingProductsCollections, Vn as useBookingPeriod, pr as useFormField, er as useOptionalStorefront, tr as useStorefront, nr as useStorefrontBookingProducts, xt as useStorefrontCart, rr as useStorefrontConfig, ir as useStorefrontProducts, ar as useStorefrontWorkspaceLanguage, Fn as useWhatsAppFloatingButton, re as validateBookingDeliveryAddress, Xe as writeBookingSearchParamsToSessionStorage, Ze as writeBookingSearchParamsToStorage };
@@ -1,5 +1,5 @@
1
1
  import { DEFAULT_BOOKING_DELIVERY_OPTION as e } from "../chunks/pkg/booking-engine/dist/schemas/cart-inputs-D1_Wmkca.js";
2
- import "../chunks/pkg/booking-engine/dist/schemas-BfXM1Dgb.js";
2
+ import "../chunks/pkg/booking-engine/dist/schemas-C2PdkXfm.js";
3
3
  import { getDefaultBookingPeriod as t, parseTimeToMinutes as n } from "./booking-period.js";
4
4
  import { differenceInMinutes as r, format as i } from "date-fns";
5
5
  //#region src/lib/booking.ts
@@ -1,6 +1,6 @@
1
1
  import { productKindSchema as e } from "../chunks/pkg/booking-engine/dist/models/Product.shared-iVSHRdn4.js";
2
2
  import { DEFAULT_BOOKING_DELIVERY_OPTION as t, bookingScheduleInputSchema as n } from "../chunks/pkg/booking-engine/dist/schemas/cart-inputs-D1_Wmkca.js";
3
- import "../chunks/pkg/booking-engine/dist/schemas-BfXM1Dgb.js";
3
+ import "../chunks/pkg/booking-engine/dist/schemas-C2PdkXfm.js";
4
4
  import { storefrontFulfillmentModeSchema as r } from "../storefrontSchemas.js";
5
5
  import { MISSING_ONLINE_PAYMENT_PROVIDER_ERROR_CODE as i, checkoutPaymentErrorCodeSchema as a } from "./checkoutPaymentDecision.js";
6
6
  import { z as o } from "zod";
@@ -4,6 +4,7 @@ type ProductVariantLike = {
4
4
  attributes?: unknown;
5
5
  };
6
6
  export declare function getProductVariantAttributeValue(variant: ProductVariantLike, key: string): string | undefined;
7
+ export declare function getStorefrontProductVariantHeightRange(variant: ProductVariantLike): string | null;
7
8
  export declare function getProductVariantDisplay(variant: ProductVariantLike): {
8
9
  label: string;
9
10
  description?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"productVariants.d.ts","sourceRoot":"","sources":["../../src/lib/productVariants.ts"],"names":[],"mappings":"AAKA,KAAK,kBAAkB,GAAG;IACxB,EAAE,CAAC,EAAE,OAAO,CAAA;IACZ,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAcD,wBAAgB,+BAA+B,CAAC,OAAO,EAAE,kBAAkB,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAW5G;AAiDD,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,kBAAkB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAiB7G;AAED,eAAO,MAAM,kCAAkC,iCAA2B,CAAA"}
1
+ {"version":3,"file":"productVariants.d.ts","sourceRoot":"","sources":["../../src/lib/productVariants.ts"],"names":[],"mappings":"AAKA,KAAK,kBAAkB,GAAG;IACxB,EAAE,CAAC,EAAE,OAAO,CAAA;IACZ,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AA2BD,wBAAgB,+BAA+B,CAAC,OAAO,EAAE,kBAAkB,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAW5G;AAED,wBAAgB,sCAAsC,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,GAAG,IAAI,CAmBjG;AAiDD,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,kBAAkB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAiB7G;AAED,eAAO,MAAM,kCAAkC,iCAA2B,CAAA"}
@@ -6,15 +6,27 @@ function r(t) {
6
6
  function i(e) {
7
7
  return Array.isArray(e.attributes) ? e.attributes : [];
8
8
  }
9
- function a(t, n) {
10
- let r = n.trim();
11
- if (r) for (let n of i(t)) {
12
- if (e(n?.key) !== r) continue;
9
+ function a(e) {
10
+ if (!e) return;
11
+ let t = Number(e.trim().replace(",", "."));
12
+ if (!(!Number.isFinite(t) || t <= 0)) return Math.round(t);
13
+ }
14
+ function o(e) {
15
+ return (e / 100).toFixed(2);
16
+ }
17
+ function s(t, n) {
18
+ let a = r(n);
19
+ if (a) for (let n of i(t)) {
20
+ if (r(n?.key) !== a) continue;
13
21
  let t = e(n?.value);
14
22
  if (t) return t;
15
23
  }
16
24
  }
17
- function o(a) {
25
+ function c(e) {
26
+ let t = a(s(e, "min_height_cm")), n = a(s(e, "max_height_cm")), r = t ? o(t) : null, i = n ? o(n) : null;
27
+ return r && i ? `${r} - ${i} m` : r ? `min ${r} m` : i ? `max ${i} m` : null;
28
+ }
29
+ function l(a) {
18
30
  let o = [], s = [];
19
31
  for (let c of i(a)) {
20
32
  let i = e(c.value);
@@ -30,28 +42,28 @@ function o(a) {
30
42
  }
31
43
  return [...o, ...s];
32
44
  }
33
- function s(e) {
45
+ function u(e) {
34
46
  return e.trim().replace(/\s+/g, " ").toLowerCase();
35
47
  }
36
- function c(e, t) {
48
+ function d(e, t) {
37
49
  if (!e || t.length === 0) return !1;
38
50
  let n = e.split(/\s+\/\s+/).map((e) => {
39
51
  let t = e.indexOf(":");
40
- return s(t >= 0 ? e.slice(t + 1) : e);
41
- }).filter((e) => e.length > 0).sort(), r = t.map(s).sort();
52
+ return u(t >= 0 ? e.slice(t + 1) : e);
53
+ }).filter((e) => e.length > 0).sort(), r = t.map(u).sort();
42
54
  return n.length === r.length && n.every((e, t) => e === r[t]);
43
55
  }
44
- function l(t) {
45
- let n = e(t.id), r = e(t.computedName), i = o(t), a = [
56
+ function f(t) {
57
+ let n = e(t.id), r = e(t.computedName), i = l(t), a = [
46
58
  i.join(" · "),
47
59
  r,
48
60
  n
49
- ].find((e) => e.length > 0) ?? n, s = r.length > 0 && r !== a && !c(r, i) ? r : "";
61
+ ].find((e) => e.length > 0) ?? n, o = r.length > 0 && r !== a && !d(r, i) ? r : "";
50
62
  return {
51
63
  label: a || n,
52
- description: s || void 0
64
+ description: o || void 0
53
65
  };
54
66
  }
55
- var u = l;
67
+ var p = f;
56
68
  //#endregion
57
- export { a as getProductVariantAttributeValue, l as getProductVariantDisplay, u as getStorefrontProductVariantDisplay };
69
+ export { s as getProductVariantAttributeValue, f as getProductVariantDisplay, p as getStorefrontProductVariantDisplay, c as getStorefrontProductVariantHeightRange };
@@ -1,6 +1,6 @@
1
1
  import { timeOfDaySchema as e } from "./chunks/pkg/booking-engine/dist/schemas/shop-opening-hours-BlLD1gfz.js";
2
2
  import { publicBookingEngineConfigurationSchema as t } from "./chunks/pkg/booking-engine/dist/schemas/public-booking-engine-configuration-CEM9mexX.js";
3
- import "./chunks/pkg/booking-engine/dist/schemas-BfXM1Dgb.js";
3
+ import "./chunks/pkg/booking-engine/dist/schemas-C2PdkXfm.js";
4
4
  import { z as n } from "zod";
5
5
  //#region src/storefrontSchemas.ts
6
6
  var r = n.string().trim().regex(/^\+[1-9]\d{1,14}$/, { message: "Invalid phone number format (expected E.164, e.g. +14155552671)." }), i = n.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loczer/storefront-sdk",
3
- "version": "0.199.0",
3
+ "version": "0.201.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org/"
@@ -1,22 +0,0 @@
1
- import { booleanNumberRecordSchema as e, identifierSchema as t, isoDateTimeSchema as n } from "../models/types-rIp4ReXN.js";
2
- import { productVariantIdentifierSchema as r } from "../models/Product.shared-iVSHRdn4.js";
3
- import { z as i } from "zod";
4
- //#region ../booking-engine/dist/schemas/base-asset.js
5
- var a = i.enum([
6
- "available",
7
- "maintenance",
8
- "lost",
9
- "blocked"
10
- ]), o = i.object({
11
- _id: t,
12
- productId: t,
13
- shopId: t,
14
- status: a,
15
- identifiers: i.array(r).default([]),
16
- productVariantId: t,
17
- attributes: e.optional(),
18
- createdAt: n,
19
- updatedAt: n
20
- });
21
- //#endregion
22
- export { o as baseAssetSchema, a as baseAssetStatusSchema };