@riverbankcms/sdk 0.132.0 → 0.134.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/{PreviewEditorSidebar-DKQ5eFK9.mjs → PreviewEditorSidebar-DfRhJPFQ.mjs} +3 -3
- package/dist/{PreviewEditorUI-CNTcOjCC.mjs → PreviewEditorUI-Dppxcr_g.mjs} +2 -2
- package/dist/{SdkPreviewModeRuntime-DJu3qu33.mjs → SdkPreviewModeRuntime-8CyGCXir.mjs} +46 -15
- package/dist/{SiteChromeCustomizeContext-2TzT3vbj.mjs → SiteChromeCustomizeContext-DVMTMvqA.mjs} +497 -169
- package/dist/_dts/ai/src/contracts/proposals.d.ts +384 -384
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +219 -219
- package/dist/_dts/api/src/accountApi.d.ts +5 -5
- package/dist/_dts/api/src/appointmentEndpointDefinitions.d.ts +1 -1
- package/dist/_dts/api/src/bookingOperations.d.ts +2 -14
- package/dist/_dts/api/src/bookings.d.ts +2 -2
- package/dist/_dts/api/src/contentRuntime.d.ts +1 -1
- package/dist/_dts/api/src/courseEndpointDefinitions.d.ts +2 -2
- package/dist/_dts/api/src/endpoints.d.ts +3 -3
- package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -1
- package/dist/_dts/api/src/navigation/contracts.d.ts +9 -6
- package/dist/_dts/api/src/navigation/linkResolver.d.ts +6 -2
- package/dist/_dts/api/src/navigation/types.d.ts +23 -6
- package/dist/_dts/api/src/navigation.d.ts +1 -1
- package/dist/_dts/api/src/publicBookingService.d.ts +15 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +3 -1
- package/dist/_dts/api/src/publicExperience/wholeSeriesEndpoints.d.ts +2 -0
- package/dist/_dts/api/src/sdk-event-upsert.d.ts +1 -1
- package/dist/_dts/api/src/sdkThemeWire.d.ts +50 -50
- package/dist/_dts/api/src/siteBanner.d.ts +4 -2
- package/dist/_dts/api/src/types.d.ts +1 -1
- package/dist/_dts/api/src/webhooks.d.ts +12 -12
- package/dist/_dts/blocks/src/client.d.ts +1 -1
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +28 -72
- package/dist/_dts/blocks/src/index.d.ts +3 -2
- package/dist/_dts/blocks/src/primitives/content/components/RichText.d.ts +2 -2
- package/dist/_dts/blocks/src/primitives/content/primitives.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +36 -14
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/schemas.d.ts +3 -3
- package/dist/_dts/blocks/src/system/blocks/events/whole-series/types.d.ts +3 -0
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +4 -4
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +148 -148
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/model.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/shared/bookingConsent.d.ts +36 -0
- package/dist/_dts/blocks/src/system/manifest/hydrateLinks.d.ts +9 -2
- package/dist/_dts/blocks/src/system/manifest/resolveBlockData.d.ts +8 -0
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +79 -79
- package/dist/_dts/blocks/src/system/runtime/api/types/appointments.d.ts +2 -11
- package/dist/_dts/blocks/src/system/runtime/api/types/courses.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/components/multi-step/DynamicFormFields.d.ts +3 -19
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/useSelectedAppointmentConsentForm.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.consent.d.ts +10 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.field-values.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.fields.d.ts +21 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.interactive.d.ts +38 -144
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +5 -19
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-runtime-sources.d.ts +3 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/AttendeeDetailsStep.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationSurface.d.ts +18 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +4 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/validation.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/components.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/whole-series/whole-series-registration.headless.contract.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +34 -12
- package/dist/_dts/blocks/src/system/runtime/shared/components/BookingConsentAgreement.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/shared/types.d.ts +1 -0
- package/dist/_dts/blocks/src/system/types/link.d.ts +7 -1
- package/dist/_dts/content-model/src/content-types/schema.d.ts +4 -4
- package/dist/_dts/core/src/booking-consent.d.ts +8 -0
- package/dist/_dts/core/src/index.d.ts +1 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +9 -3
- package/dist/_dts/db/src/schemas/forms.d.ts +21 -21
- package/dist/_dts/db/src/types/jsonb.d.ts +1 -1
- package/dist/_dts/editor/src/primitives/rich-text/RichTextEditorSurface.d.ts +2 -1
- package/dist/_dts/editor/src/primitives/rich-text/config.d.ts +2 -1
- package/dist/_dts/editor/src/primitives/rich-text/toolbar/linkPopoverUtils.d.ts +3 -2
- package/dist/_dts/editor/src/primitives/rich-text/useRichTextEditor.d.ts +3 -4
- package/dist/_dts/media-core/src/usageScanner.d.ts +1 -1
- package/dist/_dts/sdk/src/bookings/types.d.ts +7 -89
- package/dist/_dts/sdk/src/config/validation.d.ts +30 -30
- package/dist/_dts/sdk/src/contracts/content.d.ts +10 -36
- package/dist/_dts/sdk/src/contracts/rendering.d.ts +1 -1
- package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +9 -9
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +6 -19
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/accordions/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/buttons/types.d.ts +12 -12
- package/dist/_dts/theme-core/src/cards/types.d.ts +5 -5
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +72 -72
- package/dist/_dts/theme-core/src/navigation/types.d.ts +4 -4
- package/dist/_dts/theme-core/src/palette/colors.d.ts +1 -1
- package/dist/_dts/theme-core/src/palette/curated/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/schema.d.ts +82 -82
- package/dist/_dts/theme-core/src/site-styles/cardRoleVocabulary.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/designState.d.ts +2 -2
- package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +4 -4
- package/dist/_dts/theme-core/src/site-styles/logoBranding.d.ts +4 -4
- package/dist/_dts/theme-core/src/tokens/themeColorTokens.d.ts +1 -1
- package/dist/_dts/ui/src/badge.d.ts +1 -1
- package/dist/_dts/ui/src/button.d.ts +1 -1
- package/dist/_dts/ui/src/callout.d.ts +1 -1
- package/dist/_dts/ui/src/card.d.ts +1 -1
- package/dist/client/{StepIndicator-CGixP_LW.mjs → BookingConsentAgreement-BxgpGEFD.mjs} +26 -4
- package/dist/client/{DiscountCodeDisclosure-DO7llLxm.mjs → DiscountCodeDisclosure-CfuPOHD0.mjs} +1 -1
- package/dist/client/{EventCombined.client-xID7zN__.mjs → EventCombined.client-DB8Qfzi-.mjs} +3 -3
- package/dist/client/{EventListing.client-CriBslp0.mjs → EventListing.client-DD4X8hp4.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-DYmHnM8g.mjs → LeafletStaticMap-QhgIBQbv.mjs} +1 -1
- package/dist/client/{WholeSeriesRegistrationWizard-BEjzSiOA.mjs → WholeSeriesRegistrationWizard-DwtC7bCs.mjs} +72 -22
- package/dist/client/{accordion-CgFbnnnQ.mjs → accordion-DFXpLvwg.mjs} +1 -1
- package/dist/client/{bookingForm-dUyGpbxc.mjs → bookingForm-sI05d3lk.mjs} +73 -47
- package/dist/client/bookings.mjs +989 -140
- package/dist/client/{carousel-BvBwkUzx.mjs → carousel-wjyWTZCh.mjs} +1 -1
- package/dist/client/{cart-DiZENT2E.mjs → cart-DCwdpA4i.mjs} +3 -3
- package/dist/client/{checkout-Dq13KIgR.mjs → checkout-DTDW3l0R.mjs} +3 -3
- package/dist/client/checkoutUrls-DQYC_Br-.mjs +187 -0
- package/dist/client/client.mjs +556 -237
- package/dist/client/{context-B83PiNzm.mjs → context-TSK1CGx8.mjs} +1 -14
- package/dist/client/{courseRegistration-CKC5NmyH.mjs → courseRegistration-A-Tg7qw_.mjs} +3 -3
- package/dist/client/{eventCalendar-BF0Jatfw.mjs → eventCalendar-B0Zg-i_w.mjs} +5 -5
- package/dist/client/{eventCombined-BuoCF8je.mjs → eventCombined-B8Y2wizd.mjs} +3 -3
- package/dist/client/{eventDetails-CKwh0S9s.mjs → eventDetails-DPDOwURJ.mjs} +3 -3
- package/dist/client/{eventListing-eUxaWFaB.mjs → eventListing-CjBcmSLn.mjs} +3 -3
- package/dist/client/{eventRegistration-CfkNOkPb.mjs → eventRegistration-CK30HsAq.mjs} +111 -64
- package/dist/client/{form-C17H1c_H.mjs → form-CUXfsABE.mjs} +2 -2
- package/dist/client/{headerSection-DEwUmrtt.mjs → headerSection-N-mN3rjr.mjs} +2 -2
- package/dist/client/hooks.mjs +106 -3
- package/dist/client/{locationMap-Pf2QwuvW.mjs → locationMap-oiIDQMBt.mjs} +2 -2
- package/dist/client/{newsletterForm-BWQAH5Sv.mjs → newsletterForm-CkQ2tTrM.mjs} +2 -2
- package/dist/client/{pricing-CVdvbopJ.mjs → pricing-Caa0QWzh.mjs} +1 -1
- package/dist/client/{productDetail-BZi1Fa_G.mjs → productDetail-CnidyrsN.mjs} +3 -3
- package/dist/client/{productList-qq-55DNk.mjs → productList-CttYcS_S.mjs} +3 -3
- package/dist/client/{propsDecoder-BxmqPKdP.mjs → propsDecoder-CeUMxI9a.mjs} +211 -100
- package/dist/client/rendering/client.mjs +428 -151
- package/dist/client/rendering/islands.mjs +18 -18
- package/dist/client/rendering.mjs +643 -324
- package/dist/client/{scrollToBlock-B3CcKdtG.mjs → scrollToBlock-lPr1oqxB.mjs} +1 -1
- package/dist/client/{shop-DNWJPut5.mjs → shop-DXQtMo2O.mjs} +6 -6
- package/dist/client/{shop-commerce-BhvQCosS.mjs → shop-commerce-quDL411J.mjs} +7 -164
- package/dist/client/{shop-commerce-store-B04sCNnW.mjs → shop-commerce-store-Dnu-8Iub.mjs} +1 -1
- package/dist/client/{shopShared-DNNgZlmW.mjs → shopShared-BWPUURvG.mjs} +3 -3
- package/dist/client/{useEventFilters-CUmhE24_.mjs → useEventFilters-DRhWp2_5.mjs} +3 -3
- package/dist/client/{usePolling-M5jG675x.mjs → usePolling-UN4WKnaM.mjs} +2 -2
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/{sdk-runtime-BEXb1wqo.mjs → sdk-runtime-Ca5RD78X.mjs} +1 -1
- package/dist/{separator-DGMuip1D.mjs → separator-CMhj6BTi.mjs} +1 -1
- package/dist/server/components.mjs +117 -37
- package/dist/server/config-validation.mjs +106 -3
- package/dist/server/config.mjs +106 -3
- package/dist/server/data.mjs +106 -3
- package/dist/server/index.mjs +1 -1
- package/dist/server/next.mjs +186 -106
- package/dist/server/page-converter.mjs +105 -2
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +119 -37
- package/dist/server/rendering.mjs +117 -37
- package/dist/server/routing.mjs +132 -73
- package/dist/server/server.mjs +107 -4
- package/dist/server/theme-bridge.mjs +4 -4
- package/package.json +2 -2
- package/dist/client/checkoutUrls-Ct8Mxna3.mjs +0 -26
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { i as getAutoAppliedDiscountPreview, n as discountAvailabilityAllowsManualEntry, r as discountAvailabilityHasDiscounts } from "./DiscountCodeDisclosure-
|
|
2
|
+
import { i as getAutoAppliedDiscountPreview, n as discountAvailabilityAllowsManualEntry, r as discountAvailabilityHasDiscounts } from "./DiscountCodeDisclosure-CfuPOHD0.mjs";
|
|
3
3
|
import { useEffect, useReducer, useRef } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region ../blocks/src/system/runtime/shared/components/CheckIcon.tsx
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { n as useBlockApi } from "./context-
|
|
4
|
-
import { a as CheckIcon, i as StateIcon, n as useDiscountCodeUi, r as TerminalPanel, t as scrollToBlock } from "./scrollToBlock-
|
|
5
|
-
import { t as DiscountCodeDisclosure } from "./DiscountCodeDisclosure-
|
|
2
|
+
import { $ as themeButtonClassName, Et as assertNever, Qt as assertNever$1, o as formatCommercePrice, s as formatInterval, t as defineIslandPropsDecoder } from "./propsDecoder-CeUMxI9a.mjs";
|
|
3
|
+
import { n as useBlockApi } from "./context-TSK1CGx8.mjs";
|
|
4
|
+
import { a as CheckIcon, i as StateIcon, n as useDiscountCodeUi, r as TerminalPanel, t as scrollToBlock } from "./scrollToBlock-lPr1oqxB.mjs";
|
|
5
|
+
import { t as DiscountCodeDisclosure } from "./DiscountCodeDisclosure-CfuPOHD0.mjs";
|
|
6
6
|
import { t as FeedbackMessage } from "./FeedbackMessage-CtLvvS_d.mjs";
|
|
7
7
|
import { t as createBodyThemePortalRoot } from "./themePortalRoot-AGs4cE7t.mjs";
|
|
8
8
|
import { n as consumeSearchParams } from "./urlParams-D71VXFGx.mjs";
|
|
9
9
|
import { t as CrossIcon } from "./CrossIcon-Dn1KRKW5.mjs";
|
|
10
|
-
import { _ as MembershipCardView, a as getDiscountApplyFeedback, b as PassesMembershipsSectionView, d as planDirectShopCheckoutRequest, i as getAppliedDiscountCode, m as useTransientShopAddFeedback, n as useDiscountApply, o as initialDiscountApplyState, p as ShopAddFeedback, r as discountApplyReducer, s as isDiscountApplyInFlight, t as mountShopBlockIsland, v as PassCardView, y as PassPurchaseUnavailable } from "./shopShared-
|
|
11
|
-
import { t as addPassToCommerceCart } from "./shop-commerce-store-
|
|
10
|
+
import { _ as MembershipCardView, a as getDiscountApplyFeedback, b as PassesMembershipsSectionView, d as planDirectShopCheckoutRequest, i as getAppliedDiscountCode, m as useTransientShopAddFeedback, n as useDiscountApply, o as initialDiscountApplyState, p as ShopAddFeedback, r as discountApplyReducer, s as isDiscountApplyInFlight, t as mountShopBlockIsland, v as PassCardView, y as PassPurchaseUnavailable } from "./shopShared-BWPUURvG.mjs";
|
|
11
|
+
import { t as addPassToCommerceCart } from "./shop-commerce-store-Dnu-8Iub.mjs";
|
|
12
12
|
import { t as ModalShell } from "./ModalShell-CqkBvBIC.mjs";
|
|
13
13
|
import React, { useCallback, useEffect, useRef, useState } from "react";
|
|
14
14
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,174 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as DiscountCodeDisclosure } from "./DiscountCodeDisclosure-DO7llLxm.mjs";
|
|
2
|
+
import { $ as themeButtonClassName, Dt as clearWorkflowFeedback, Et as assertNever, a as buildProductDetailDisplay, at as logger, d as deriveCommerceCheckoutState, i as buildProductCardDisplay, jt as reportWorkflowError, n as getShopDisplayForItems, o as formatCommercePrice, p as productItemKey, u as buildProductCartItem, wt as RichTextDocSchema } from "./propsDecoder-CeUMxI9a.mjs";
|
|
3
|
+
import { n as useBlockApi } from "./context-TSK1CGx8.mjs";
|
|
4
|
+
import { t as DiscountCodeDisclosure } from "./DiscountCodeDisclosure-CfuPOHD0.mjs";
|
|
6
5
|
import { t as FeedbackMessage } from "./FeedbackMessage-CtLvvS_d.mjs";
|
|
7
|
-
import { t as buildCheckoutReturnUrls } from "./checkoutUrls-
|
|
6
|
+
import { n as RichText, t as buildCheckoutReturnUrls } from "./checkoutUrls-DQYC_Br-.mjs";
|
|
8
7
|
import { t as consumeSearchParam } from "./urlParams-D71VXFGx.mjs";
|
|
9
8
|
import { t as CarouselNodeClient } from "./carousel.client-59G_WMr4.mjs";
|
|
10
9
|
import { t as resolveDedicatedCheckoutPath } from "./checkoutRoute-ClwHwYVA.mjs";
|
|
11
|
-
import { C as ProductGalleryFrameView, S as ProductDetailView, T as VariantSelectView, a as getDiscountApplyFeedback, c as aggregateCartDiscountUiState, f as planUnifiedCheckoutRequest, g as CheckoutShellView, h as CartShellView, i as getAppliedDiscountCode, l as checkoutFormForDiscountUiState, m as useTransientShopAddFeedback, n as useDiscountApply, o as initialDiscountApplyState, p as ShopAddFeedback, r as discountApplyReducer, s as isDiscountApplyInFlight, u as planCartDiscountAvailabilityRequests, w as ProductListSectionView, x as ProductCardView } from "./shopShared-
|
|
12
|
-
import { n as useCommerceCart } from "./shop-commerce-store-
|
|
10
|
+
import { C as ProductGalleryFrameView, S as ProductDetailView, T as VariantSelectView, a as getDiscountApplyFeedback, c as aggregateCartDiscountUiState, f as planUnifiedCheckoutRequest, g as CheckoutShellView, h as CartShellView, i as getAppliedDiscountCode, l as checkoutFormForDiscountUiState, m as useTransientShopAddFeedback, n as useDiscountApply, o as initialDiscountApplyState, p as ShopAddFeedback, r as discountApplyReducer, s as isDiscountApplyInFlight, u as planCartDiscountAvailabilityRequests, w as ProductListSectionView, x as ProductCardView } from "./shopShared-BWPUURvG.mjs";
|
|
11
|
+
import { n as useCommerceCart } from "./shop-commerce-store-Dnu-8Iub.mjs";
|
|
13
12
|
import * as React$1 from "react";
|
|
14
|
-
import
|
|
13
|
+
import { useEffect, useState } from "react";
|
|
15
14
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
-
//#region ../blocks/src/primitives/content/utils/sanitizeHref.ts
|
|
17
|
-
const SAFE_PROTOCOLS = /* @__PURE__ */ new Set([
|
|
18
|
-
"http:",
|
|
19
|
-
"https:",
|
|
20
|
-
"mailto:",
|
|
21
|
-
"tel:"
|
|
22
|
-
]);
|
|
23
|
-
const CONTROL_CHARS_PATTERN = /[\u0000-\u001F\u007F]+/g;
|
|
24
|
-
function normalizeInput(value) {
|
|
25
|
-
return value.replace(CONTROL_CHARS_PATTERN, "").trim();
|
|
26
|
-
}
|
|
27
|
-
function decodeForSchemeCheck(value) {
|
|
28
|
-
try {
|
|
29
|
-
return decodeURIComponent(value);
|
|
30
|
-
} catch {
|
|
31
|
-
return value;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Returns a safe href for rich-text anchors, or null when the value should not be rendered.
|
|
36
|
-
*
|
|
37
|
-
* Policy:
|
|
38
|
-
* - Allow absolute URLs with protocols: http, https, mailto, tel.
|
|
39
|
-
* - Allow root-relative ("/path") and hash-only ("#section") links.
|
|
40
|
-
* - Reject protocol-relative URLs ("//example.com"), bare domains ("example.com"),
|
|
41
|
-
* executable schemes (javascript/data/vbscript), malformed URLs, and empty values.
|
|
42
|
-
* - Preserve percent-encoding from the original normalized input.
|
|
43
|
-
*/
|
|
44
|
-
function sanitizeHref(raw) {
|
|
45
|
-
if (typeof raw !== "string") return null;
|
|
46
|
-
const normalized = normalizeInput(raw);
|
|
47
|
-
if (!normalized) return null;
|
|
48
|
-
if (normalized.startsWith("//")) return null;
|
|
49
|
-
if (normalized.startsWith("/")) return normalized;
|
|
50
|
-
if (normalized.startsWith("#")) return normalized;
|
|
51
|
-
const schemeMatch = normalizeInput(decodeForSchemeCheck(normalized)).match(/^([a-zA-Z][a-zA-Z0-9+.-]*):/);
|
|
52
|
-
if (!schemeMatch) return null;
|
|
53
|
-
const rawScheme = schemeMatch[1];
|
|
54
|
-
if (!rawScheme) return null;
|
|
55
|
-
const protocol = `${rawScheme.toLowerCase()}:`;
|
|
56
|
-
if (!SAFE_PROTOCOLS.has(protocol)) return null;
|
|
57
|
-
try {
|
|
58
|
-
const parsed = new URL(normalized);
|
|
59
|
-
if (!SAFE_PROTOCOLS.has(parsed.protocol.toLowerCase())) return null;
|
|
60
|
-
} catch {
|
|
61
|
-
return null;
|
|
62
|
-
}
|
|
63
|
-
return normalized;
|
|
64
|
-
}
|
|
65
|
-
//#endregion
|
|
66
|
-
//#region ../blocks/src/primitives/content/components/RichText.tsx
|
|
67
|
-
function parseDimension(value) {
|
|
68
|
-
if (typeof value === "number" && Number.isFinite(value) && value > 0) return Math.round(value);
|
|
69
|
-
if (typeof value === "string" && value.trim().length > 0) {
|
|
70
|
-
const parsed = Number(value);
|
|
71
|
-
if (Number.isFinite(parsed) && parsed > 0) return Math.round(parsed);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
function normalizeRel(target, rel) {
|
|
75
|
-
const normalizedRel = rel?.trim();
|
|
76
|
-
if (target !== "_blank") return normalizedRel && normalizedRel.length > 0 ? normalizedRel : void 0;
|
|
77
|
-
const tokens = new Set((normalizedRel ?? "").split(/\s+/).map((token) => token.trim().toLowerCase()).filter(Boolean));
|
|
78
|
-
tokens.add("noopener");
|
|
79
|
-
tokens.add("noreferrer");
|
|
80
|
-
return Array.from(tokens).join(" ");
|
|
81
|
-
}
|
|
82
|
-
function renderMarks(text, marks, key) {
|
|
83
|
-
if (!marks || marks.length === 0) return text;
|
|
84
|
-
return marks.reduce((acc, mark) => {
|
|
85
|
-
switch (mark.type) {
|
|
86
|
-
case "bold":
|
|
87
|
-
case "strong": return /* @__PURE__ */ jsx("strong", { children: acc }, `${key}-b`);
|
|
88
|
-
case "italic":
|
|
89
|
-
case "em": return /* @__PURE__ */ jsx("em", { children: acc }, `${key}-i`);
|
|
90
|
-
case "link": {
|
|
91
|
-
if (typeof acc === "string" && acc.length === 0) return acc;
|
|
92
|
-
const attrs = mark.attrs ?? {};
|
|
93
|
-
const href = sanitizeHref(attrs.href);
|
|
94
|
-
if (!href) return acc;
|
|
95
|
-
const target = typeof attrs.target === "string" && attrs.target.trim().length > 0 ? attrs.target.trim() : void 0;
|
|
96
|
-
return /* @__PURE__ */ jsx("a", {
|
|
97
|
-
href,
|
|
98
|
-
target,
|
|
99
|
-
rel: normalizeRel(target, typeof attrs.rel === "string" ? attrs.rel : void 0),
|
|
100
|
-
children: acc
|
|
101
|
-
}, `${key}-l`);
|
|
102
|
-
}
|
|
103
|
-
default: return acc;
|
|
104
|
-
}
|
|
105
|
-
}, text);
|
|
106
|
-
}
|
|
107
|
-
function renderDoc(node, key, imageResolveContext) {
|
|
108
|
-
if (!node || !node.type) return null;
|
|
109
|
-
const children = node.content?.map((child, index) => renderDoc(child, `${key}-${index}`, imageResolveContext));
|
|
110
|
-
switch (node.type) {
|
|
111
|
-
case "doc": return /* @__PURE__ */ jsx(Fragment, { children });
|
|
112
|
-
case "paragraph":
|
|
113
|
-
if (!children && !node.text) return /* @__PURE__ */ jsx("p", {}, key);
|
|
114
|
-
return /* @__PURE__ */ jsx("p", { children: children ?? renderMarks(node.text ?? "", node.marks, key) }, key);
|
|
115
|
-
case "heading": {
|
|
116
|
-
const headingTag = `h${Math.min(Math.max(node.attrs?.level ?? 2, 1), 6)}`;
|
|
117
|
-
return React.createElement(headingTag, { key }, children);
|
|
118
|
-
}
|
|
119
|
-
case "bulletList": return /* @__PURE__ */ jsx("ul", { children }, key);
|
|
120
|
-
case "orderedList": return /* @__PURE__ */ jsx("ol", { children }, key);
|
|
121
|
-
case "listItem": return /* @__PURE__ */ jsx("li", { children }, key);
|
|
122
|
-
case "blockquote": return /* @__PURE__ */ jsx("blockquote", { children }, key);
|
|
123
|
-
case "horizontalRule": return /* @__PURE__ */ jsx("hr", {}, key);
|
|
124
|
-
case "hardBreak": return /* @__PURE__ */ jsx("br", {}, key);
|
|
125
|
-
case "image": {
|
|
126
|
-
const attrs = node.attrs ?? {};
|
|
127
|
-
const src = typeof attrs.src === "string" ? attrs.src.trim() : "";
|
|
128
|
-
const identifier = typeof attrs.identifier === "string" ? attrs.identifier.trim() : "";
|
|
129
|
-
const alt = typeof attrs.alt === "string" ? attrs.alt : "";
|
|
130
|
-
const title = typeof attrs.title === "string" && attrs.title.trim().length > 0 ? attrs.title : void 0;
|
|
131
|
-
const width = parseDimension(attrs.width);
|
|
132
|
-
const height = parseDimension(attrs.height);
|
|
133
|
-
const resolvedSrc = src || (identifier ? resolveImageUrlWithContext({
|
|
134
|
-
type: "image",
|
|
135
|
-
identifier
|
|
136
|
-
}, width ? {
|
|
137
|
-
width,
|
|
138
|
-
resize: "contain",
|
|
139
|
-
quality: 85
|
|
140
|
-
} : height ? {
|
|
141
|
-
height,
|
|
142
|
-
resize: "contain",
|
|
143
|
-
quality: 85
|
|
144
|
-
} : ImagePresets.full, imageResolveContext ?? void 0) ?? "" : "");
|
|
145
|
-
if (!resolvedSrc) return null;
|
|
146
|
-
return /* @__PURE__ */ jsx("img", {
|
|
147
|
-
src: resolvedSrc,
|
|
148
|
-
alt,
|
|
149
|
-
title,
|
|
150
|
-
width,
|
|
151
|
-
height,
|
|
152
|
-
loading: "lazy",
|
|
153
|
-
decoding: "async"
|
|
154
|
-
}, key);
|
|
155
|
-
}
|
|
156
|
-
case "text": return renderMarks(node.text ?? "", node.marks, key);
|
|
157
|
-
default: return null;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
const DEFAULT_RICH_TEXT_CLASS = "rb-prose rb-max-w-none";
|
|
161
|
-
function RichText({ as: Comp = "div", className, doc, path }) {
|
|
162
|
-
const imageResolveContext = getCurrentResolveImageUrlContext() ?? null;
|
|
163
|
-
const content = doc ? renderDoc(doc, "doc", imageResolveContext) : null;
|
|
164
|
-
const dataAttributes = path ? { "data-builder-richtext": path } : void 0;
|
|
165
|
-
return /* @__PURE__ */ jsx(Comp, {
|
|
166
|
-
className: className?.trim() || DEFAULT_RICH_TEXT_CLASS,
|
|
167
|
-
...dataAttributes,
|
|
168
|
-
children: content
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
//#endregion
|
|
172
15
|
//#region ../blocks/src/system/runtime/nodes/richText-coerce.ts
|
|
173
16
|
function parseRichTextDoc(value) {
|
|
174
17
|
const parsed = RichTextDocSchema.safeParse(value);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { c as EMPTY_COMMERCE_CART_STATE, f as parseStoredCommerceCartState, l as buildPassCartItem, m as reduceCommerceCart } from "./propsDecoder-
|
|
2
|
+
import { c as EMPTY_COMMERCE_CART_STATE, f as parseStoredCommerceCartState, l as buildPassCartItem, m as reduceCommerceCart } from "./propsDecoder-CeUMxI9a.mjs";
|
|
3
3
|
import * as React$1 from "react";
|
|
4
4
|
//#region ../blocks/src/system/runtime/nodes/shop-commerce-store.ts
|
|
5
5
|
const EMPTY_STATE = EMPTY_COMMERCE_CART_STATE;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { E as ok, T as err } from "./colorStyles-CrxJrPjJ.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { t as BlockApiProvider } from "./context-
|
|
5
|
-
import { i as getAutoAppliedDiscountPreview, n as discountAvailabilityAllowsManualEntry, r as discountAvailabilityHasDiscounts } from "./DiscountCodeDisclosure-
|
|
3
|
+
import { Et as assertNever } from "./propsDecoder-CeUMxI9a.mjs";
|
|
4
|
+
import { t as BlockApiProvider } from "./context-TSK1CGx8.mjs";
|
|
5
|
+
import { i as getAutoAppliedDiscountPreview, n as discountAvailabilityAllowsManualEntry, r as discountAvailabilityHasDiscounts } from "./DiscountCodeDisclosure-CfuPOHD0.mjs";
|
|
6
6
|
import { t as FeedbackMessage } from "./FeedbackMessage-CtLvvS_d.mjs";
|
|
7
7
|
import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
|
|
8
8
|
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-UNsfPcYq.mjs";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { d as hexToRgb, u as relativeLuminance } from "./colorStyles-CrxJrPjJ.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { $ as themeButtonClassName, B as formatEventTeacherLine, D as SEMANTIC_SPACING_VALUES, Et as assertNever, F as formatDate, G as resolveEventCta, I as formatEventCompactDateRail, J as getEventAvailability, M as normalizeCsvIds, N as normalizeCsvString, O as isSemanticSpacing, P as normalizeOptionalId, R as formatEventPrice, V as formatTime, et as boxBackgroundSchema, it as normalizeCardRole, j as getEventRuntimeFiltersKey, k as resolveSpacing, nt as resolveOnColorForThemeToken, rt as resolveTokenOrCssColorValue, tt as isCssColorLiteral } from "./propsDecoder-CeUMxI9a.mjs";
|
|
4
4
|
import { a as getCurrentResolveImageUrlContext, i as computeMediaTransformStyle, l as resolveMediaNodeResponsiveImage, n as MediaPlaceholder, o as renderAudio, s as renderVideo, t as ImagePresets } from "./media-BOHuueS5.mjs";
|
|
5
|
-
import { n as useBlockApi } from "./context-
|
|
6
|
-
import { t as LeafletStaticMap } from "./LeafletStaticMap-
|
|
5
|
+
import { n as useBlockApi } from "./context-TSK1CGx8.mjs";
|
|
6
|
+
import { t as LeafletStaticMap } from "./LeafletStaticMap-QhgIBQbv.mjs";
|
|
7
7
|
import { useCallback, useEffect, useId, useMemo, useReducer, useRef, useState } from "react";
|
|
8
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
//#region ../theme-core/src/palette/utils/textColor.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Et as assertNever$2 } from "./propsDecoder-CeUMxI9a.mjs";
|
|
3
|
+
import { i as formatPrice } from "./BookingConsentAgreement-BxgpGEFD.mjs";
|
|
4
4
|
import { useCallback, useEffect, useReducer, useRef } from "react";
|
|
5
5
|
//#region ../core/src/date-math.ts
|
|
6
6
|
function addDaysToDate(date, dayCount) {
|
|
@@ -4,13 +4,13 @@ import React from "react";
|
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/preview-next/client/runtime.tsx
|
|
6
6
|
const LazySdkPreviewMode = React.lazy(async () => {
|
|
7
|
-
return { default: (await import("../../SdkPreviewModeRuntime-
|
|
7
|
+
return { default: (await import("../../SdkPreviewModeRuntime-8CyGCXir.mjs").then((n) => n.n)).SdkPreviewModeRuntime };
|
|
8
8
|
});
|
|
9
9
|
const LazyPreviewShell = React.lazy(async () => {
|
|
10
|
-
return { default: (await import("../../sdk-runtime-
|
|
10
|
+
return { default: (await import("../../sdk-runtime-Ca5RD78X.mjs")).PreviewShell };
|
|
11
11
|
});
|
|
12
12
|
const LazyPreviewShellLayout = React.lazy(async () => {
|
|
13
|
-
return { default: (await import("../../sdk-runtime-
|
|
13
|
+
return { default: (await import("../../sdk-runtime-Ca5RD78X.mjs")).PreviewShellLayout };
|
|
14
14
|
});
|
|
15
15
|
function SdkPreviewMode(props) {
|
|
16
16
|
return /* @__PURE__ */ jsx(React.Suspense, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "./PreviewQueryProvider-D51gQaG3.mjs";
|
|
3
|
-
import { i as PreviewShellLayout, r as PreviewShell } from "./SdkPreviewModeRuntime-
|
|
3
|
+
import { i as PreviewShellLayout, r as PreviewShell } from "./SdkPreviewModeRuntime-8CyGCXir.mjs";
|
|
4
4
|
export { PreviewShell, PreviewShellLayout };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { Oa as Primitive, ja as cn } from "./SiteChromeCustomizeContext-DVMTMvqA.mjs";
|
|
3
3
|
import * as React$1 from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region ../../node_modules/.pnpm/@radix-ui+react-separator@1.1.10_@types+react-dom@19.2.3_@types+react@19.2.17__@types+r_adfab47c9055efb8b0c4b77a2b96b053/node_modules/@radix-ui/react-separator/dist/index.mjs
|
|
@@ -9495,6 +9495,11 @@ z$1.object({
|
|
|
9495
9495
|
//#endregion
|
|
9496
9496
|
//#region ../blocks/src/system/types/link.ts
|
|
9497
9497
|
const nullableString = z$1.union([z$1.string().min(1), z$1.null()]);
|
|
9498
|
+
const RESOLVED_INTERNAL_LINK_ENTITY_TYPES = [
|
|
9499
|
+
"page",
|
|
9500
|
+
"content",
|
|
9501
|
+
"pageSurface"
|
|
9502
|
+
];
|
|
9498
9503
|
const resolvedInternalLinkKeys = [
|
|
9499
9504
|
"entityId",
|
|
9500
9505
|
"entityType",
|
|
@@ -9516,7 +9521,7 @@ const internalResolvedLinkSchema = z$1.object({
|
|
|
9516
9521
|
kind: z$1.literal("internal"),
|
|
9517
9522
|
routeId: z$1.string().min(1),
|
|
9518
9523
|
entityId: z$1.string().min(1),
|
|
9519
|
-
entityType: z$1.enum(
|
|
9524
|
+
entityType: z$1.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
9520
9525
|
href: z$1.string().min(1),
|
|
9521
9526
|
title: z$1.string().min(1),
|
|
9522
9527
|
typeLabel: z$1.string().min(1),
|
|
@@ -31660,6 +31665,22 @@ const blockBookingPaymentCollectionOptionSchema = z$1.union([
|
|
|
31660
31665
|
})
|
|
31661
31666
|
]);
|
|
31662
31667
|
const blockBookingPaymentTermsSchema = z$1.object({ allowedOptions: z$1.array(blockBookingPaymentCollectionOptionSchema).min(1) });
|
|
31668
|
+
const blockBookingConsentSchema = z$1.object({
|
|
31669
|
+
requirementId: z$1.string(),
|
|
31670
|
+
title: z$1.string(),
|
|
31671
|
+
agreement: RichTextDocSchema,
|
|
31672
|
+
checkboxLabel: z$1.string()
|
|
31673
|
+
});
|
|
31674
|
+
const bookingRequirementConsentFieldSchema = z$1.object({
|
|
31675
|
+
id: z$1.string(),
|
|
31676
|
+
label: z$1.string(),
|
|
31677
|
+
type: z$1.literal("booking_requirement_consent"),
|
|
31678
|
+
required: z$1.literal(true),
|
|
31679
|
+
agreement: RichTextDocSchema,
|
|
31680
|
+
checkboxLabel: z$1.string().min(1)
|
|
31681
|
+
});
|
|
31682
|
+
/** The two live public carriers for consent copy: Event data and appointment fields. */
|
|
31683
|
+
const bookingConsentCarrierSchema = z$1.union([blockBookingConsentSchema, bookingRequirementConsentFieldSchema]);
|
|
31663
31684
|
//#endregion
|
|
31664
31685
|
//#region ../blocks/src/system/blocks/events/whole-series/pricing.ts
|
|
31665
31686
|
function isSaleWindowOpen(option, now) {
|
|
@@ -31899,6 +31920,7 @@ const publicWholeSeriesOfferingSchema = z$1.object({
|
|
|
31899
31920
|
pricing: wholeSeriesPricingSchema,
|
|
31900
31921
|
currency: z$1.string(),
|
|
31901
31922
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
31923
|
+
consent: blockBookingConsentSchema.nullable(),
|
|
31902
31924
|
enrollmentCapacity: z$1.number().nullable(),
|
|
31903
31925
|
acceptsMemberships: z$1.boolean(),
|
|
31904
31926
|
status: z$1.enum([
|
|
@@ -32216,6 +32238,7 @@ const publicEventSchema = z$1.object({
|
|
|
32216
32238
|
timeZone: z$1.string(),
|
|
32217
32239
|
pricing: publicEventPricingSchema,
|
|
32218
32240
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
32241
|
+
consent: blockBookingConsentSchema.nullable(),
|
|
32219
32242
|
accessRestriction: accessRestrictionSchema,
|
|
32220
32243
|
allowedCategoryIds: z$1.array(z$1.string()),
|
|
32221
32244
|
requireGuestDetails: z$1.boolean().optional(),
|
|
@@ -32590,6 +32613,25 @@ function resolveEventRegistrationScopedEvents(events, context) {
|
|
|
32590
32613
|
return applyEventRegistrationScope(events, resolveEventRegistrationScope(context));
|
|
32591
32614
|
}
|
|
32592
32615
|
//#endregion
|
|
32616
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationSurface.ts
|
|
32617
|
+
function planEventRegistrationScope(input) {
|
|
32618
|
+
const subject = input.subject;
|
|
32619
|
+
const selectedRunOffering = input.wholeSeriesOffering;
|
|
32620
|
+
if (subject?.kind !== "eventOffering" || !selectedRunOffering) return {
|
|
32621
|
+
kind: "context",
|
|
32622
|
+
events: resolveEventRegistrationScopedEvents(input.events, {
|
|
32623
|
+
occurrenceContext: input.occurrenceContext,
|
|
32624
|
+
subject
|
|
32625
|
+
})
|
|
32626
|
+
};
|
|
32627
|
+
if (!(selectedRunOffering.eventOfferingId === subject.eventOfferingId && subject.availableEventSeriesIds.some((seriesId) => seriesId === selectedRunOffering.eventSeriesId))) return { kind: "invalidSelectedRun" };
|
|
32628
|
+
return {
|
|
32629
|
+
kind: "selectedRun",
|
|
32630
|
+
events: input.events.filter((event) => event.seriesId === selectedRunOffering.eventSeriesId),
|
|
32631
|
+
offering: selectedRunOffering
|
|
32632
|
+
};
|
|
32633
|
+
}
|
|
32634
|
+
//#endregion
|
|
32593
32635
|
//#region ../blocks/src/system/runtime/nodes/events/shared/destination.ts
|
|
32594
32636
|
function isRecord$24(value) {
|
|
32595
32637
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -33000,10 +33042,13 @@ function buildEventRegistrationShellStepLabels(source) {
|
|
|
33000
33042
|
}) : false).map((step) => shellLabelForRegistrationStep(step, scopedEvents));
|
|
33001
33043
|
}
|
|
33002
33044
|
function scopeEventRegistrationEvents(source) {
|
|
33003
|
-
|
|
33045
|
+
const scope = planEventRegistrationScope({
|
|
33046
|
+
events: toRegistrationEvents(source.events ?? []),
|
|
33047
|
+
wholeSeriesOffering: source.wholeSeriesOffering,
|
|
33004
33048
|
occurrenceContext: source.occurrenceContext,
|
|
33005
33049
|
subject: source.subject
|
|
33006
33050
|
});
|
|
33051
|
+
return scope.kind === "invalidSelectedRun" ? [] : scope.events;
|
|
33007
33052
|
}
|
|
33008
33053
|
function shellLabelForRegistrationStep(step, events) {
|
|
33009
33054
|
switch (step) {
|
|
@@ -38836,6 +38881,7 @@ function normalizeGroupPresentation(value) {
|
|
|
38836
38881
|
function resolveAutoCtaPath(source, routes) {
|
|
38837
38882
|
const routeByNormalizedPath = /* @__PURE__ */ new Map();
|
|
38838
38883
|
for (const route of routes ?? []) {
|
|
38884
|
+
if (route.kind === "pageSurface") continue;
|
|
38839
38885
|
const normalized = normalizeRoutePath(route.path);
|
|
38840
38886
|
if (normalized && !routeByNormalizedPath.has(normalized)) routeByNormalizedPath.set(normalized, route.path);
|
|
38841
38887
|
}
|
|
@@ -38886,7 +38932,7 @@ const publicRouteCandidatesSchema = z$1.object({ routes: z$1.array(z$1.object({
|
|
|
38886
38932
|
entityId: z$1.string(),
|
|
38887
38933
|
path: z$1.string(),
|
|
38888
38934
|
title: z$1.string(),
|
|
38889
|
-
kind: z$1.enum(
|
|
38935
|
+
kind: z$1.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
38890
38936
|
contentTypeKey: z$1.string().nullable().optional()
|
|
38891
38937
|
})) });
|
|
38892
38938
|
const groupOverrideFields = [
|
|
@@ -45214,7 +45260,7 @@ function normalizeRel(target, rel) {
|
|
|
45214
45260
|
tokens.add("noreferrer");
|
|
45215
45261
|
return Array.from(tokens).join(" ");
|
|
45216
45262
|
}
|
|
45217
|
-
function renderMarks(text, marks, key) {
|
|
45263
|
+
function renderMarks(text, marks, key, linkTarget) {
|
|
45218
45264
|
if (!marks || marks.length === 0) return text;
|
|
45219
45265
|
return marks.reduce((acc, mark) => {
|
|
45220
45266
|
switch (mark.type) {
|
|
@@ -45227,7 +45273,8 @@ function renderMarks(text, marks, key) {
|
|
|
45227
45273
|
const attrs = mark.attrs ?? {};
|
|
45228
45274
|
const href = sanitizeHref(attrs.href);
|
|
45229
45275
|
if (!href) return acc;
|
|
45230
|
-
const
|
|
45276
|
+
const storedTarget = typeof attrs.target === "string" && attrs.target.trim().length > 0 ? attrs.target.trim() : void 0;
|
|
45277
|
+
const target = linkTarget === "new-tab" ? "_blank" : storedTarget;
|
|
45231
45278
|
return /* @__PURE__ */ jsx("a", {
|
|
45232
45279
|
href,
|
|
45233
45280
|
target,
|
|
@@ -45239,14 +45286,14 @@ function renderMarks(text, marks, key) {
|
|
|
45239
45286
|
}
|
|
45240
45287
|
}, text);
|
|
45241
45288
|
}
|
|
45242
|
-
function renderDoc(node, key, imageResolveContext) {
|
|
45289
|
+
function renderDoc(node, key, imageResolveContext, linkTarget) {
|
|
45243
45290
|
if (!node || !node.type) return null;
|
|
45244
|
-
const children = node.content?.map((child, index) => renderDoc(child, `${key}-${index}`, imageResolveContext));
|
|
45291
|
+
const children = node.content?.map((child, index) => renderDoc(child, `${key}-${index}`, imageResolveContext, linkTarget));
|
|
45245
45292
|
switch (node.type) {
|
|
45246
45293
|
case "doc": return /* @__PURE__ */ jsx(Fragment, { children });
|
|
45247
45294
|
case "paragraph":
|
|
45248
45295
|
if (!children && !node.text) return /* @__PURE__ */ jsx("p", {}, key);
|
|
45249
|
-
return /* @__PURE__ */ jsx("p", { children: children ?? renderMarks(node.text ?? "", node.marks, key) }, key);
|
|
45296
|
+
return /* @__PURE__ */ jsx("p", { children: children ?? renderMarks(node.text ?? "", node.marks, key, linkTarget) }, key);
|
|
45250
45297
|
case "heading": {
|
|
45251
45298
|
const headingTag = `h${Math.min(Math.max(node.attrs?.level ?? 2, 1), 6)}`;
|
|
45252
45299
|
return React.createElement(headingTag, { key }, children);
|
|
@@ -45288,14 +45335,14 @@ function renderDoc(node, key, imageResolveContext) {
|
|
|
45288
45335
|
decoding: "async"
|
|
45289
45336
|
}, key);
|
|
45290
45337
|
}
|
|
45291
|
-
case "text": return renderMarks(node.text ?? "", node.marks, key);
|
|
45338
|
+
case "text": return renderMarks(node.text ?? "", node.marks, key, linkTarget);
|
|
45292
45339
|
default: return null;
|
|
45293
45340
|
}
|
|
45294
45341
|
}
|
|
45295
45342
|
const DEFAULT_RICH_TEXT_CLASS = "rb-prose rb-max-w-none";
|
|
45296
|
-
function RichText$2({ as: Comp = "div", className, doc, path }) {
|
|
45343
|
+
function RichText$2({ as: Comp = "div", className, doc, path, linkTarget = "stored" }) {
|
|
45297
45344
|
const imageResolveContext = getCurrentResolveImageUrlContext() ?? null;
|
|
45298
|
-
const content = doc ? renderDoc(doc, "doc", imageResolveContext) : null;
|
|
45345
|
+
const content = doc ? renderDoc(doc, "doc", imageResolveContext, linkTarget) : null;
|
|
45299
45346
|
const dataAttributes = path ? { "data-builder-richtext": path } : void 0;
|
|
45300
45347
|
return /* @__PURE__ */ jsx(Comp, {
|
|
45301
45348
|
className: className?.trim() || DEFAULT_RICH_TEXT_CLASS,
|
|
@@ -46651,7 +46698,6 @@ function readBookingFieldType(value) {
|
|
|
46651
46698
|
case "select":
|
|
46652
46699
|
case "radio":
|
|
46653
46700
|
case "checkbox":
|
|
46654
|
-
case "booking_requirement_consent":
|
|
46655
46701
|
case "tel":
|
|
46656
46702
|
case "url":
|
|
46657
46703
|
case "number":
|
|
@@ -46686,7 +46732,7 @@ function normalizeBookingSettings(value) {
|
|
|
46686
46732
|
};
|
|
46687
46733
|
}
|
|
46688
46734
|
function isBookingFormService(value) {
|
|
46689
|
-
return isRecord$13(value) && typeof value.id === "string" && typeof value.siteId === "string" && typeof value.title === "string";
|
|
46735
|
+
return isRecord$13(value) && typeof value.id === "string" && typeof value.siteId === "string" && typeof value.title === "string" && (value.consent === void 0 || blockBookingConsentSchema.safeParse(value.consent).success);
|
|
46690
46736
|
}
|
|
46691
46737
|
function readNonEmptyString(value) {
|
|
46692
46738
|
if (typeof value !== "string") return null;
|
|
@@ -46711,6 +46757,15 @@ const bookingFieldOptionSchema = z$1.object({
|
|
|
46711
46757
|
value: z$1.string(),
|
|
46712
46758
|
label: z$1.string()
|
|
46713
46759
|
});
|
|
46760
|
+
const standardBookingFieldRules = {
|
|
46761
|
+
options: z$1.array(bookingFieldOptionSchema).optional(),
|
|
46762
|
+
multiple: z$1.boolean().optional(),
|
|
46763
|
+
minLength: z$1.number().optional(),
|
|
46764
|
+
maxLength: z$1.number().optional(),
|
|
46765
|
+
pattern: z$1.string().optional(),
|
|
46766
|
+
min: z$1.number().optional(),
|
|
46767
|
+
max: z$1.number().optional()
|
|
46768
|
+
};
|
|
46714
46769
|
const bookingFieldSchema = z$1.object({
|
|
46715
46770
|
id: z$1.string(),
|
|
46716
46771
|
label: z$1.string(),
|
|
@@ -46721,7 +46776,6 @@ const bookingFieldSchema = z$1.object({
|
|
|
46721
46776
|
"select",
|
|
46722
46777
|
"radio",
|
|
46723
46778
|
"checkbox",
|
|
46724
|
-
"booking_requirement_consent",
|
|
46725
46779
|
"tel",
|
|
46726
46780
|
"url",
|
|
46727
46781
|
"number",
|
|
@@ -46731,13 +46785,7 @@ const bookingFieldSchema = z$1.object({
|
|
|
46731
46785
|
required: z$1.boolean().optional(),
|
|
46732
46786
|
placeholder: z$1.string().optional(),
|
|
46733
46787
|
helpText: z$1.string().optional(),
|
|
46734
|
-
|
|
46735
|
-
multiple: z$1.boolean().optional(),
|
|
46736
|
-
minLength: z$1.number().optional(),
|
|
46737
|
-
maxLength: z$1.number().optional(),
|
|
46738
|
-
pattern: z$1.string().optional(),
|
|
46739
|
-
min: z$1.number().optional(),
|
|
46740
|
-
max: z$1.number().optional()
|
|
46788
|
+
...standardBookingFieldRules
|
|
46741
46789
|
});
|
|
46742
46790
|
const bookingSettingsSchema = z$1.object({
|
|
46743
46791
|
type: z$1.literal("booking"),
|
|
@@ -46780,7 +46828,8 @@ const bookingServiceSchema = z$1.object({
|
|
|
46780
46828
|
priceAmount: z$1.number().nullable().optional(),
|
|
46781
46829
|
priceCurrency: z$1.string().nullable().optional(),
|
|
46782
46830
|
paymentTerms: blockBookingPaymentTermsSchema.optional(),
|
|
46783
|
-
paymentTermsAvailability: blockBookingPaymentTermsAvailabilitySchema.optional()
|
|
46831
|
+
paymentTermsAvailability: blockBookingPaymentTermsAvailabilitySchema.optional(),
|
|
46832
|
+
consent: blockBookingConsentSchema.optional()
|
|
46784
46833
|
});
|
|
46785
46834
|
const bookingServicesSourceSchema = z$1.union([
|
|
46786
46835
|
z$1.array(bookingServiceSchema),
|
|
@@ -52371,12 +52420,46 @@ function collectConstrainedVideoMediaValues(options) {
|
|
|
52371
52420
|
*/
|
|
52372
52421
|
function hydrateManifestLinks(manifest, content, routes, pagesByIdentifier, entriesByIdentifier) {
|
|
52373
52422
|
if (!routes || !manifest?.fields?.length) return content;
|
|
52374
|
-
return
|
|
52423
|
+
return hydrateLinks(content, routes, pagesByIdentifier, entriesByIdentifier);
|
|
52424
|
+
}
|
|
52425
|
+
/** Hydrate identifier-aware links in data loaded after manifest content. */
|
|
52426
|
+
function hydrateLinks(value, routes, pagesByIdentifier, entriesByIdentifier) {
|
|
52427
|
+
return hydrateValue(value, {
|
|
52375
52428
|
routes,
|
|
52376
52429
|
pagesByIdentifier,
|
|
52377
52430
|
entriesByIdentifier
|
|
52378
52431
|
});
|
|
52379
52432
|
}
|
|
52433
|
+
/**
|
|
52434
|
+
* Hydrate links only inside resolved booking-consent documents. Loader payloads are
|
|
52435
|
+
* otherwise opaque and may legitimately contain objects that resemble link values.
|
|
52436
|
+
*/
|
|
52437
|
+
function hydrateResolvedBookingConsentLinks(value, routes, pagesByIdentifier, entriesByIdentifier) {
|
|
52438
|
+
return hydrateResolvedBookingConsentValue(value, {
|
|
52439
|
+
routes,
|
|
52440
|
+
pagesByIdentifier,
|
|
52441
|
+
entriesByIdentifier
|
|
52442
|
+
});
|
|
52443
|
+
}
|
|
52444
|
+
function hydrateResolvedBookingConsentValue(value, context) {
|
|
52445
|
+
if (Array.isArray(value)) {
|
|
52446
|
+
const hydratedItems = value.map((item) => hydrateResolvedBookingConsentValue(item, context));
|
|
52447
|
+
return hydratedItems.every((item, index) => item === value[index]) ? value : hydratedItems;
|
|
52448
|
+
}
|
|
52449
|
+
if (!isRecord$27(value)) return value;
|
|
52450
|
+
if (isBookingConsentCarrier(value)) {
|
|
52451
|
+
const agreement = hydrateValue(value.agreement, context);
|
|
52452
|
+
return agreement === value.agreement ? value : {
|
|
52453
|
+
...value,
|
|
52454
|
+
agreement
|
|
52455
|
+
};
|
|
52456
|
+
}
|
|
52457
|
+
const hydratedEntries = Object.entries(value).map(([key, entry]) => [key, hydrateResolvedBookingConsentValue(entry, context)]);
|
|
52458
|
+
return hydratedEntries.every(([key, entry]) => entry === value[key]) ? value : Object.fromEntries(hydratedEntries);
|
|
52459
|
+
}
|
|
52460
|
+
function isBookingConsentCarrier(value) {
|
|
52461
|
+
return bookingConsentCarrierSchema.safeParse(value).success;
|
|
52462
|
+
}
|
|
52380
52463
|
function hydrateValue(value, context) {
|
|
52381
52464
|
try {
|
|
52382
52465
|
if (Array.isArray(value)) {
|
|
@@ -52445,6 +52528,13 @@ function hydrateEntryLink(link, context) {
|
|
|
52445
52528
|
};
|
|
52446
52529
|
}
|
|
52447
52530
|
//#endregion
|
|
52531
|
+
//#region ../blocks/src/system/manifest/resolveBlockData.ts
|
|
52532
|
+
function resolveBlockData$1(blockId, dataLoaders, dataContext, routes) {
|
|
52533
|
+
const raw = blockId ? dataContext?.resolvedData?.[blockId] : void 0;
|
|
52534
|
+
if (isRecord$27(raw)) return routes ? hydrateResolvedBookingConsentLinks(raw, routes, dataContext?.pagesByIdentifier, dataContext?.entriesByIdentifier) : raw;
|
|
52535
|
+
return dataLoaders && typeof dataLoaders === "object" && Object.keys(dataLoaders).length > 0 ? {} : void 0;
|
|
52536
|
+
}
|
|
52537
|
+
//#endregion
|
|
52448
52538
|
//#region ../blocks/src/sdkBlockTransform.ts
|
|
52449
52539
|
/**
|
|
52450
52540
|
* Transforms an SDK custom block into a BlockManifest.
|
|
@@ -53039,8 +53129,8 @@ function generateInputCss({ themeId, theme, inputSystem }) {
|
|
|
53039
53129
|
const radioSelector = `${rootSelector} .form-radio`;
|
|
53040
53130
|
const checkableRules = [];
|
|
53041
53131
|
checkableRules.push("appearance: none");
|
|
53042
|
-
checkableRules.push("width:
|
|
53043
|
-
checkableRules.push("height:
|
|
53132
|
+
checkableRules.push("width: 1.125rem");
|
|
53133
|
+
checkableRules.push("height: 1.125rem");
|
|
53044
53134
|
checkableRules.push("flex-shrink: 0");
|
|
53045
53135
|
checkableRules.push(`border: ${borderPx} solid ${rgbColorValue(inputSystem.base.border.colorToken)}`);
|
|
53046
53136
|
if (inputSystem.base.background.type === "transparent") checkableRules.push("background-color: transparent");
|
|
@@ -56824,11 +56914,7 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources
|
|
|
56824
56914
|
try {
|
|
56825
56915
|
const routes = routeMap ?? dataContext?.routes;
|
|
56826
56916
|
const hydratedContent = routes ? hydrateManifestLinks(definition.manifest, data, routes, dataContext?.pagesByIdentifier, dataContext?.entriesByIdentifier) : data;
|
|
56827
|
-
const resolved = resolveBlockData$1(
|
|
56828
|
-
block,
|
|
56829
|
-
definition,
|
|
56830
|
-
dataContext
|
|
56831
|
-
});
|
|
56917
|
+
const resolved = resolveBlockData$1(block.id, definition.dataLoaders, dataContext, routes);
|
|
56832
56918
|
const hasResolvedData = !!resolved && typeof resolved === "object" && Object.keys(resolved).length > 0;
|
|
56833
56919
|
const baseProps = {
|
|
56834
56920
|
content: hydratedContent,
|
|
@@ -56918,12 +57004,6 @@ function shouldDebugCustomBlocks() {
|
|
|
56918
57004
|
return false;
|
|
56919
57005
|
}
|
|
56920
57006
|
}
|
|
56921
|
-
function resolveBlockData$1({ block, definition, dataContext }) {
|
|
56922
|
-
const blockId = block.id ?? null;
|
|
56923
|
-
const raw = blockId ? dataContext?.resolvedData?.[blockId] : void 0;
|
|
56924
|
-
if (isObjectRecord$1(raw)) return { ...raw };
|
|
56925
|
-
return definition.dataLoaders && Object.keys(definition.dataLoaders).length > 0 ? {} : void 0;
|
|
56926
|
-
}
|
|
56927
57007
|
/**
|
|
56928
57008
|
* Resolves block content based on stage priority.
|
|
56929
57009
|
* For draft/preview: draftContent takes priority over content.
|
|
@@ -74944,7 +75024,7 @@ const internalLinkPayloadSchema = z$1.object({
|
|
|
74944
75024
|
kind: z$1.literal("internal"),
|
|
74945
75025
|
routeId: z$1.string().uuid(),
|
|
74946
75026
|
entityId: z$1.string().uuid(),
|
|
74947
|
-
entityType: z$1.enum(
|
|
75027
|
+
entityType: z$1.enum(RESOLVED_INTERNAL_LINK_ENTITY_TYPES),
|
|
74948
75028
|
href: z$1.string().min(1),
|
|
74949
75029
|
title: z$1.string().min(1),
|
|
74950
75030
|
typeLabel: z$1.string().min(1),
|