@riverbankcms/sdk 0.179.0 → 0.180.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/README.md +2 -2
- package/dist/_dts/{BlocksIslandsHydrator-DKwgs95u.d.ts → BlocksIslandsHydrator-DC_AvZwy.d.ts} +1 -1
- package/dist/_dts/{Page-lWenra5i.d.ts → Page-DQOxVtp3.d.ts} +7 -7
- package/dist/_dts/{SdkPreviewMode-BRxhRw4I.d.ts → SdkPreviewMode-DrLgY9_f.d.ts} +3 -2
- package/dist/_dts/{client-qWn7xAwJ.d.ts → client-BP7VBRvs.d.ts} +235 -56
- package/dist/_dts/{content-types-DL6GIvTm.d.ts → content-types-1-K2qi__.d.ts} +2 -2
- package/dist/_dts/{contracts-CzWyAiJj.d.ts → contracts-Dfqz0Tcu.d.ts} +3 -3
- package/dist/_dts/{generatePageMetadata-CBKd0cJ4.d.ts → generatePageMetadata-CSfAqmry.d.ts} +2 -2
- package/dist/_dts/{index-DVSipdrT.d.ts → index-B0_2-65A.d.ts} +3 -3
- package/dist/_dts/{index-DCiSHd-C.d.ts → index-BeM5Ylwf.d.ts} +5 -3
- package/dist/_dts/{index-BYnG_vF5.d.ts → index-Blrw2oVk.d.ts} +1 -1
- package/dist/_dts/{index-CaCum9mM.d.ts → index-CB5Csefo.d.ts} +2 -2
- package/dist/_dts/{index-CZgJrhzT.d.ts → index-DCcxLa8p.d.ts} +2 -2
- package/dist/_dts/{index-7CDBZGb-.d.ts → index-DQBGwBPx.d.ts} +1 -1
- package/dist/_dts/{index-BU9uAkHB.d.ts → index-DQr358-m.d.ts} +4 -4
- package/dist/_dts/{loadContent-CPKbFQyq.d.ts → loadContent-BG2tLGXj.d.ts} +7 -7
- package/dist/_dts/{request-BjKBCS7t.d.ts → request-P08l6mkr.d.ts} +2602 -821
- package/dist/_dts/{resolveBlockData-DupbMCup.d.ts → resolveBlockData-BDHc8lFs.d.ts} +5 -5
- package/dist/_dts/{resolvePageContent-BqNyCHi8.d.ts → resolvePageContent-Y3IZBbtL.d.ts} +1 -1
- package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
- package/dist/_dts/sdk/src/client/types.d.ts +2 -2
- package/dist/_dts/sdk/src/client.d.ts +7 -7
- package/dist/_dts/sdk/src/config/index.d.ts +6 -6
- package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
- package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
- package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
- package/dist/_dts/sdk/src/data/types.d.ts +2 -2
- package/dist/_dts/sdk/src/gifting/client.d.ts +1 -1
- package/dist/_dts/sdk/src/index.d.ts +8 -8
- package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
- package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
- package/dist/_dts/sdk/src/navigation/index.d.ts +3 -3
- package/dist/_dts/sdk/src/next/index.d.ts +8 -8
- package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
- package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
- package/dist/_dts/sdk/src/portal/client.d.ts +3 -3
- package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
- package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/index.d.ts +6 -6
- package/dist/_dts/sdk/src/server.d.ts +5 -5
- package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
- package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
- package/dist/_dts/{serviceBookingOutline-YcsIjvn1.d.ts → serviceBookingOutline-BvtNagjw.d.ts} +8 -7
- package/dist/_dts/{types-BOxSq-Bq.d.ts → types-BrK6SS5c.d.ts} +9 -8
- package/dist/_dts/{types-CT-KOxl_.d.ts → types-DpEAnP4F.d.ts} +7 -2
- package/dist/_dts/{types-B7e6Lmo5.d.ts → types-HAy1-Jjo.d.ts} +3 -3
- package/dist/_dts/{validation-Dz6qccue.d.ts → validation-D6q3tOBA.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-1XifJg6V.mjs → BlocksIslandsHydrator-DJSmdNUJ.mjs} +16 -16
- package/dist/client/{BookingMailingListNote-BsbEgagJ.mjs → BookingMailingListNote-CGxg37zx.mjs} +91 -59
- package/dist/client/{BookingQuestionFields-C8IbeLHj.mjs → BookingQuestionFields-DXegGSnS.mjs} +24 -3
- package/dist/client/{CalendarNavigationChevron-Bbqij1XQ.mjs → CalendarNavigationChevron-VfP50sYm.mjs} +5 -5
- package/dist/client/{DemoBookingPortalAccess-uA9H8LIL.mjs → DemoBookingPortalAccess-0Ua44F1j.mjs} +12 -7
- package/dist/client/{EventCalendar.client-yoSI77ov.mjs → EventCalendar.client-CrpiyDSP.mjs} +9 -9
- package/dist/client/{EventCombined.client-HeCNlliq.mjs → EventCombined.client-D0me9wnz.mjs} +8 -8
- package/dist/client/{EventItem-Duhk1vnF.mjs → EventItem-CJITrGkF.mjs} +5 -4
- package/dist/client/{EventListWeekNavigation-BiutEqPK.mjs → EventListWeekNavigation-BlEm_xjq.mjs} +1 -1
- package/dist/client/{EventListing.client-B5ln77jG.mjs → EventListing.client-BNM_HuS0.mjs} +3 -3
- package/dist/client/{EventListing.view-hUDhNtMv.mjs → EventListing.view-CXfb7RRy.mjs} +7 -210
- package/dist/client/{EventRegistrationPayment-DqtX1vB2.mjs → EventRegistrationPayment-DiD9uYs6.mjs} +1292 -224
- package/dist/client/{Page-ChJ2TGVk.mjs → Page-bX7iy_MK.mjs} +158 -50
- package/dist/client/{SiteTermsAgreementField-CDBU31xW.mjs → SiteTermsAgreementField-BAdW5DvE.mjs} +22 -15
- package/dist/client/{StepIndicator-JQA-VuEH.mjs → StepIndicator-DCfdcb7s.mjs} +1 -1
- package/dist/client/{StepIndicator-2Dl9zon2.mjs → StepIndicator-DCqorVne.mjs} +6 -6
- package/dist/client/{accordion-B6SqU49k.mjs → accordion-wofJY8xY.mjs} +1 -1
- package/dist/client/{booking-form.client-DrEOjQ3N.mjs → booking-form.client-CYl9NrqS.mjs} +410 -77
- package/dist/client/{bookingForm-drZBwEZW.mjs → bookingForm-kgVWtuMe.mjs} +4 -4
- package/dist/client/bookings.mjs +40 -10
- package/dist/client/{boxStyleClassNames-DEh45w16.mjs → boxStyleClassNames-CQHWz5gJ.mjs} +2 -2
- package/dist/client/{carousel-C-YJliD-.mjs → carousel-BE1dEFsD.mjs} +1 -1
- package/dist/client/{cart-acGFWK9R.mjs → cart-BsjsdGZE.mjs} +3 -3
- package/dist/client/{cart.client-BzlOGP2j.mjs → cart.client-DylGUWXY.mjs} +1 -1
- package/dist/client/{checkout-SEontwhy.mjs → checkout-B5KxEUDr.mjs} +3 -3
- package/dist/client/{checkout.client-C0Qvh-d4.mjs → checkout.client-C98fhch3.mjs} +1 -1
- package/dist/client/{checkoutUrls-yUKeq1N9.mjs → checkoutUrls-BMLYTf38.mjs} +1 -1
- package/dist/client/client.mjs +224 -158
- package/dist/client/constants-PfYJsEZF.mjs +101 -0
- package/dist/client/{context-DTrwaQtg.mjs → context-DtKdUdkO.mjs} +199 -27
- package/dist/client/{dateFormatting-Cg8E1r9l.mjs → dateFormatting-BaGPvQS3.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-D0kOJYOX.mjs → demoPortalMagicLink-B8eDjhuG.mjs} +1 -1
- package/dist/client/{enhanceHeaderSection-DyrpZ7ks.mjs → enhanceHeaderSection-DvhD-8eE.mjs} +3 -3
- package/dist/client/{event-registration.client-RLZQWi2V.mjs → event-registration.client-Du9a_xAN.mjs} +1980 -1517
- package/dist/client/{eventCalendar-CphYnImh.mjs → eventCalendar-Di9wDfzl.mjs} +4 -4
- package/dist/client/{eventCombined-BvqjASB_.mjs → eventCombined-CNW6nBsB.mjs} +4 -4
- package/dist/client/{eventListing-BaNAoC_M.mjs → eventListing-CQMxQ8By.mjs} +4 -4
- package/dist/client/{eventRegistration-COMHoRl6.mjs → eventRegistration-CprS9k1D.mjs} +4 -4
- package/dist/client/{form-DyH2juYT.mjs → form-Zl1_8RJ6.mjs} +3 -3
- package/dist/client/{form.client-DBwzkB0M.mjs → form.client-TaMUys6I.mjs} +4 -4
- package/dist/client/{form.parts-CY4kX3mh.mjs → form.parts-CpNPbPPM.mjs} +1 -1
- package/dist/client/{formatDate-CTEN7gxW.mjs → formatDate-hhI1-tzt.mjs} +1 -1
- package/dist/client/gifting/client.mjs +5 -5
- package/dist/client/{gifting-CIx4V378.mjs → gifting-DNVa7-Wj.mjs} +4 -4
- package/dist/client/{gifting.client-BEVPpzJM.mjs → gifting.client-CFUq3GVx.mjs} +4 -4
- package/dist/client/{gifting.parts-VnORjnZK.mjs → gifting.parts-CDQvxA4A.mjs} +2 -2
- package/dist/client/{headerSection-DGcJfRS8.mjs → headerSection-Cg6083rn.mjs} +2 -2
- package/dist/client/{lookSurfaces-IqT_SVnX.mjs → lookSurfaces-gJ3OqPf9.mjs} +92 -2
- package/dist/client/{newsletter-form.client-BvEDkjiD.mjs → newsletter-form.client-VuL9I96G.mjs} +5 -5
- package/dist/client/{newsletter-form.interactive-DCO1lErD.mjs → newsletter-form.interactive-7Of3eYn0.mjs} +18 -24
- package/dist/client/{newsletter-form.parts-BIy4IUT3.mjs → newsletter-form.parts-OBqsfT24.mjs} +1 -1
- package/dist/client/{newsletterForm-CoTXDNFS.mjs → newsletterForm-BkJe_RTv.mjs} +3 -3
- package/dist/client/portal/client.mjs +299 -115
- package/dist/client/{product-detail.client-YHQ2aKX1.mjs → product-detail.client-B2hdxqJN.mjs} +1 -1
- package/dist/client/{product-list.client-DxoZw1vF.mjs → product-list.client-CCEgu9rx.mjs} +1 -1
- package/dist/client/{productDetail-DjuFvkey.mjs → productDetail-CRX_ZRfS.mjs} +3 -3
- package/dist/client/{productList-DE9GEFoZ.mjs → productList-BAdJ6z5S.mjs} +3 -3
- package/dist/client/{propsDecoder-Cyag_HOs.mjs → propsDecoder-BLKAmX0S.mjs} +2 -2
- package/dist/client/{registry.server-BPwV-0Pp.mjs → registry.server-Bj9cmHHF.mjs} +89 -50
- package/dist/client/rendering/client.mjs +22 -22
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +4 -4
- package/dist/client/{richText-coerce-NrRqDeOg.mjs → richText-coerce-Z45OLLEX.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-BWq5gKFK.mjs → routeIslandApiConfig-DHpTTK77.mjs} +1 -1
- package/dist/client/{shop-C3wM0Hr4.mjs → shop-BKsgxm_-.mjs} +3 -3
- package/dist/client/{shop-commerce-34YvcpbX.mjs → shop-commerce-Cbtk_kUW.mjs} +12 -12
- package/dist/client/{shop-commerce-store-B7xHksOs.mjs → shop-commerce-store-B-rv2p5h.mjs} +1 -1
- package/dist/client/{shop-discount-apply.state-BiBnozfO.mjs → shop-discount-apply.state-CiCDLNh7.mjs} +2 -2
- package/dist/client/{shop.client-C0v88nLd.mjs → shop.client-Rnqa74Tk.mjs} +12 -12
- package/dist/client/{shopShared-Ct-BRNez.mjs → shopShared-BaBfhjCq.mjs} +2 -2
- package/dist/client/{src-CCtanNlD.mjs → src-o7WEvbK1.mjs} +118 -3
- package/dist/client/{timetableModel-lhE29TNT.mjs → timetableModel-BOff1Kk5.mjs} +201 -7
- package/dist/client/{useAvailableSlots-BelJviOT.mjs → useAvailableSlots-DQJNh10g.mjs} +3 -23
- package/dist/client/{useDiscountCodeUi-rQRE1-Ho.mjs → useDiscountCodeUi-BcFQRI_7.mjs} +1 -1
- package/dist/client/{useEventPagination-C4rS2Xxl.mjs → useEventPagination-BvdcexDC.mjs} +7 -7
- package/dist/client/{view-LJVHVqsy.mjs → view-CTBwSpKv.mjs} +3 -3
- package/dist/client/{wizardSteps-CNDsxeJH.mjs → wizardSteps-CWIQyRIw.mjs} +1605 -442
- package/dist/preview-next/before-render.mjs +1 -0
- package/dist/preview-next/client/{LocationPickerEnvironment-BHAT81Wx.mjs → LocationPickerEnvironment-BW3dRFIv.mjs} +1 -1
- package/dist/preview-next/client/{MapLibreEditMap-B52hkdIZ.mjs → MapLibreEditMap-Db9BHyXh.mjs} +2 -2
- package/dist/preview-next/client/{PageSectionToolbar-C4TtBPN-.mjs → PageSectionToolbar-CG6KwITA.mjs} +4 -4
- package/dist/preview-next/client/{PreviewEditorSidebar-D6fkE59-.mjs → PreviewEditorSidebar-BGBqrC9m.mjs} +8 -7
- package/dist/preview-next/client/{PreviewEditorUI-amcDlj0O.mjs → PreviewEditorUI-Bwkyx28x.mjs} +5 -5
- package/dist/preview-next/client/{PreviewShell-DeQjx4zk.mjs → PreviewShell-DB1l6JNU.mjs} +7 -7
- package/dist/preview-next/client/{SdkPreviewModeRuntime-Cx0SXnoX.mjs → SdkPreviewModeRuntime-Bs6Cwzr3.mjs} +15 -7
- package/dist/preview-next/client/{lucide-react-McYZeSMb.mjs → lucide-react-00FF_oar.mjs} +13 -1
- package/dist/preview-next/client/{previewAssistantSlot-aqpU34WI.mjs → previewAssistantSlot-T-oDD_Dd.mjs} +5735 -2073
- package/dist/preview-next/client/{previewChromeRoot-D3Gy_Rs0.mjs → previewChromeRoot-BeukcDRy.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-Dzx_RrN7.mjs → sdk-runtime-ceDW_9q2.mjs} +2 -2
- package/dist/preview-next/client/{siteStyleAccess-LHedw83e.mjs → siteStyleAccess-CCB9bScO.mjs} +35 -23
- package/dist/preview-next/client/{useAutosaveStatus-DpSd9aVk.mjs → useAutosaveStatus-D4o0CKq7.mjs} +1 -1
- package/dist/preview-next/client/{useOpenBlockForSetup-BGZn5AT1.mjs → useOpenBlockForSetup-Seccrvwu.mjs} +2 -2
- package/dist/preview-next/container-responsive.css +103 -10
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-DnL-FgSV.mjs → route-contract-FwFj8zGL.mjs} +43 -0
- package/dist/server/{Block.shared-BEbq6EwO.mjs → Block.shared-D6WrRCxX.mjs} +4 -4
- package/dist/server/{ThemeScopeCore-DFEM1a85.mjs → ThemeScopeCore-BQzjDQ2q.mjs} +8 -1
- package/dist/server/{bindings-Bly0dRs7.mjs → bindings-CS6ih1Yc.mjs} +4 -4
- package/dist/server/{client-CGJ2ztYp.mjs → client-m0ylCj_f.mjs} +847 -786
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/index.mjs +2 -2
- package/dist/server/{loadContent-BkK1w3QQ.mjs → loadContent-vgWMz1uD.mjs} +6 -4
- package/dist/server/{loadPage-DTLe0FEs.mjs → loadPage-CIOL3-9t.mjs} +3 -3
- package/dist/server/{lookMediaFrame-CaH018pK.mjs → lookMediaFrame-m-91jGGn.mjs} +36 -0
- package/dist/server/next.mjs +43 -30
- package/dist/server/{overrideResolution-Uy9Zp2Ks.mjs → overrideResolution-BiHmsvTZ.mjs} +1 -1
- package/dist/server/page-converter.mjs +1 -1
- package/dist/server/{pageRenderPlan-JzxBnqfV.mjs → pageRenderPlan-DJo_obpi.mjs} +9 -7
- package/dist/server/{pageRuntimeSupport-DyNSd2Yj.mjs → pageRuntimeSupport-BnSuoHON.mjs} +5 -1
- package/dist/server/{pageShared-DU4ETFPS.mjs → pageShared-BJuOzxzn.mjs} +550 -258
- package/dist/server/{prebuild-8jNtDXmS.mjs → prebuild-Cr8p8T7V.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-xeMG42aw.mjs → prefetchBlockData-BZh57-ua.mjs} +4 -3
- package/dist/server/{registry-DH1VrsCl.mjs → registry-CvhFwbXJ.mjs} +240 -80
- package/dist/server/rendering/components/pageShared.mjs +1 -1
- package/dist/server/rendering/helpers/loadPage.mjs +1 -1
- package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
- package/dist/server/rendering/server.mjs +4 -4
- package/dist/server/rendering.mjs +8 -8
- package/dist/server/{resolveBlockData-BN8tweTx.mjs → resolveBlockData-Cv_W1LVB.mjs} +39 -31
- package/dist/server/{resolvePageContent-DnM16_f9.mjs → resolvePageContent-BWKUZUIn.mjs} +1 -1
- package/dist/server/{responseMedia-F-ElH2Rd.mjs → responseMedia-KRKguBC5.mjs} +56 -1
- package/dist/server/routing.mjs +1 -1
- package/dist/server/server.mjs +3 -3
- package/dist/server/{servicePageContent-B-FezJmH.mjs → servicePageContent-CRKbTm_7.mjs} +14 -10
- package/dist/server/theme-bridge.mjs +1 -1
- package/dist/server/{validation-3jOzYdPL.mjs → validation-DCl-FCk_.mjs} +4 -4
- package/dist/server/{version-8t0o6_jd.mjs → version-DT_R5JAR.mjs} +1 -1
- package/dist/styles/index.css +504 -27
- package/package.json +1 -1
- package/dist/client/constants-4o4_hl34.mjs +0 -6
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { Dt as parseThemeColorToken, Et as parseColorTokenParts, G as hexToRgb, R as contrastRatio, a as formatButtonColourContractError, at as surfaceForegroundValue, c as DEFAULT_BUTTON_SIZES, ct as surfaceInkStyle, d as generateShadowValue$1, et as SURFACE_INK_CSS_VARS, f as DEFAULT_VARIANT_ALIAS_ID, ft as cssVarValue, g as createStandardButtonSurfacePolicy, gt as textColorValue, h as buttonSizeNameSchema, ht as textColorStyle, i as BUTTON_CONTRAST_POLICY, j as expandPalette, mt as rgbColorValue, n as compileButtonColourStates, nt as surfaceForegroundDeclarations, pt as mergeStyles, r as resolveSolidButtonColour, rt as surfaceForegroundInputFromResolved, s as BORDER_WIDTH_MAP, st as surfaceInkDeclarations, u as FONT_SIZE_MAP, ut as backgroundColorStyle, v as unsafeAsOpaqueButtonColourToken } from "./resolveButtonColourStates--6yJp9Tq.mjs";
|
|
2
|
-
import { $ as formatEventDuration, A as OfferingCourseCards, B as EventItem, C as resolvePageRouteTarget, D as EVENT_REGISTRATION_ANCHOR_ID, E as EventHeader, F as createEditorPresentationPageReader, G as eventDisplayTitleText, H as CalendarIcon, I as createPresentationPageReader, J as buildMonthDay, K as formatCourseDatesAfter, L as EmptyState, M as offeringDatesBySeries, N as deriveEventScheduleSummary, O as MonthLookView, P as derivePreviewRunSchedule, Q as formatEventTeacherLine, R as CardListCollection, S as resolveEntryRouteTarget, T as lookPartShown, U as MapPinIcon, V as eventCategoryBadge, W as eventDisplayTitle, X as formatEventQuickDate, Y as resolveMonthSelectedDay, Z as selectQuickDateEvents, _ as publicAppointmentLocationSchema, a as joinSlotKey, ct as buildThemeTokens, d as resolveLinkedEntryInlineFieldEligibility, et as resolveEventCardBooking, g as formatAppointmentPrice, h as formatAppointmentLocation, i as composePageJoins, j as eventCardListContent, k as EventListingFrameView, l as buildLinkedContentEditTarget, lt as defaultThemeTokens, m as formatAppointmentDuration, n as createPageRenderPlanReader, nt as resolveEventLinkProps, o as renderedJoinLayout, p as defaultTransforms, q as formatCourseSessions, rt as parseStoredVariant, s as retargetJoinsAcrossOmissions, tt as resolveEventCta, v as publicAppointmentPricingSchema, w as resolveRouteTarget, z as CardListItems } from "./pageRenderPlan-
|
|
3
|
-
import { $i as PUBLIC_DOWNLOAD_MEDIA_TYPES, $n as composeHeaderSectionWrapperClassName, $r as singleButtonFragment, $s as
|
|
2
|
+
import { $ as formatEventDuration, A as OfferingCourseCards, B as EventItem, C as resolvePageRouteTarget, D as EVENT_REGISTRATION_ANCHOR_ID, E as EventHeader, F as createEditorPresentationPageReader, G as eventDisplayTitleText, H as CalendarIcon, I as createPresentationPageReader, J as buildMonthDay, K as formatCourseDatesAfter, L as EmptyState, M as offeringDatesBySeries, N as deriveEventScheduleSummary, O as MonthLookView, P as derivePreviewRunSchedule, Q as formatEventTeacherLine, R as CardListCollection, S as resolveEntryRouteTarget, T as lookPartShown, U as MapPinIcon, V as eventCategoryBadge, W as eventDisplayTitle, X as formatEventQuickDate, Y as resolveMonthSelectedDay, Z as selectQuickDateEvents, _ as publicAppointmentLocationSchema, a as joinSlotKey, ct as buildThemeTokens, d as resolveLinkedEntryInlineFieldEligibility, et as resolveEventCardBooking, g as formatAppointmentPrice, h as formatAppointmentLocation, i as composePageJoins, j as eventCardListContent, k as EventListingFrameView, l as buildLinkedContentEditTarget, lt as defaultThemeTokens, m as formatAppointmentDuration, n as createPageRenderPlanReader, nt as resolveEventLinkProps, o as renderedJoinLayout, p as defaultTransforms, q as formatCourseSessions, rt as parseStoredVariant, s as retargetJoinsAcrossOmissions, tt as resolveEventCta, v as publicAppointmentPricingSchema, w as resolveRouteTarget, z as CardListItems } from "./pageRenderPlan-DJo_obpi.mjs";
|
|
3
|
+
import { $i as PUBLIC_DOWNLOAD_MEDIA_TYPES, $n as composeHeaderSectionWrapperClassName, $r as singleButtonFragment, $s as getBookingLocalDateKey, $t as eventOnlinePlace, A as membershipClassesLabel, Aa as headerRootIsTransparent, Ai as el, An as isOrdinaryPublicEvent, Ar as Grid, At as groupOfferingRunsByCourse, B as eventListingBlockDefinition, Bi as FileArchiveIcon, Bn as isBookableEvent, Br as formatEventDepositNote, Bs as parseMailingListPlacementTargeting, Bt as ThemedButtonLink, C as buildCartInteractiveIslandProps, Ca as selectItemSurfacePresentation, Cn as groupEventsByDate, Cr as defineProgressiveBlockRuntime, Ct as normalizeEventRegistrationPageSurfaceSubject, D as buildShopInteractiveIslandProps, Da as readOpeningToneProjection, Dn as hasCancelledRegistrationDate, Dr as lookListPresentationSchemaShape, Ds as loadedReadinessFact, E as buildProductListInteractiveIslandProps, Ea as effectiveHeaderNavLinkStyle, En as cancelledDateCopy, Er as listLookSlot, Es as hiddenFromVisitors, F as offeringsCatalogueShape, Fi as ArrowDownIcon, Fn as planWholeSeriesRunSelection, Fo as anglePolygonCss, Fs as resolveWholeSeriesBookingPhase, Ft as resolveOfferingsPreviewGroupCta, G as eventCollectionDisplaySchemaShape, Gi as PlusIcon, Gn as getEventAvailabilityStatus, Gt as eventListWeekDays, H as buildEventCollectionDisplay, Hi as FileSpreadsheetIcon, Hn as formatEventRemainingPlaces, Hr as formatEventPriceAmount, Ht as getIconComponent, I as eventCalendarBlockDefinition, Ii as ChevronDownIcon, Io as transitionCatalogueEntries, Is as resolveWholeSeriesPaymentDates, It as resolveOfferingsPreviewGroups, J as catalogueEventCardProps, Ji as parseInlineTextFromUnknown, Jn as FEATURE_CARD_ICON_TREATMENTS, Jr as headingFragment, Js as formatBookingCompactEnglishTime, K as eventCollectionHydrationSchema, Ki as inlineTextToPlainText, Kn as isEventFull, Kt as eventWeekGroupingContext, L as buildEventCalendarInteractiveIslandProps, Li as CircleMinusIcon, Ln as resolveSelectionBookingClosedDetail, Ls as buildMailingListSignupBlockSourceRef, Lt as resolveOfferingsRenderInput, M as offeringsPreviewBlockDefinition, Mi as buildGeneratedBlockIconRenderAssetLookupFromUnknown, Mn as planOrdinarySeriesSelection, Ms as CANCELLED_SESSION_STATUS, Mt as offeringRunLifecycle, N as publicRouteCandidatesSchema, Na as arrangementLookHooks, Ni as parseBlockIconValue, Nn as planWholeSeriesParentBooking, Nt as offeringsListingFor, O as shopProductPresentation, On as eventOccurrenceContext, Oo as boundaryRuntimeMetricsForDecorativeTransition, Or as resolvedItemSurfaceProps, Os as pageTemplateFromEntry, Ot as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, P as buildOfferingsCatalogueListing, Pi as resolveBlockIconRenderValue, Pn as planWholeSeriesParentSelection, Ps as orderedLiveRunSessions, Pt as readOfferingsGrouping, Q as cardListPresentationSchemaShape, Qi as parseFieldDefinitions, Qr as blogFeaturedPostFragment, Qs as formatLocalScheduleDate, Qt as browserReadAuthoritySchema, R as buildEventCalendarListingDisplay, Ri as CirclePlusIcon, Rn as selectionRepresentativeEvent, Rs as parseMailingListRuntimeContext, Rt as ThemedAuthoredButton, S as shopBlockDefinition, Si as defineFragment, Sn as formatTime, Sr as defineClientOwnedBlockRuntime, St as previewStageSchema, T as buildProductDetailInteractiveIslandProps, Ta as authoredHeaderLinkForeground, Tn as bookingPageKindSchema, Tr as listLookControl, Ts as admitReadinessFacts, U as buildEventCollectionHydration, Ua as resolveEffectiveArrangement, Ui as FileTextIcon, Un as formatTotalCapacity, Us as EVENT_ADDRESS_AFTER_BOOKING_LABEL, Ut as SpinnerNode, V as buildEventListingInteractiveIslandProps, Va as arrangementManifestFromVariants, Vi as FileAudioIcon, Vr as formatEventPrice, Vs as sameMailingListPlacementTargeting, Vt as ThemedDownloadLink, W as buildEventCollectionListingDisplay, Wi as MinusIcon, Ws as formatDate$1, Wt as buildEventListWeek, X as CardListContentPart, Xn as shouldReserveFeatureCardIconZone, Xr as faqAccordionFragment, Xs as addLocalScheduleDays, Y as listingEventCardProps, Yn as resolveFeatureCardGeneratedIconSizePx, Yr as cardFragment, Ys as toScheduledBookingDateTime, Yt as resolveRuntimeEventDestination, Zr as faqHeadingFragment, Zt as bookingPresentation, _ as buildGiftingInteractiveIslandProps, _a as parseThemeButtonVariantId, _n as formatEventHourLabel, _o as generateInteractiveChildInheritanceCSS, _r as buildFormInteractiveIslandProps, _s as blockBookingPaymentTermsSchema, _t as getContainerClass, a as LOCATION_MAP_LOADER_KEYS, aa as eventReadinessLoaderKey, ac as toBookingTimeZone, ai as heroCtaRowFragment, an as closedDatesCopy, ar as teamMemberCardBiography, as as getLocalDateKey, b as productDetailBlockDefinition, ba as resolveHeaderRootForeground, bc as TokenResolver, bn as formatEventTimeRange, br as defineInteractiveIslandMetaKeys, bs as beforeBookingQuestionsPresentationSchema, bt as resolveEventRegistrationEventSource, c as normalizeLocationMapSource, ca as eventReadinessResultSchema, cc as isPublicEventPricingOptionDisplayable, ci as heroCopyFragment, cn as buildCalendarViewport, cs as formatDateKey, d as newsletterSignupBlockDefinition, dc as publicEventPricingType, di as normalizeBoxStylesBorder, do as generateFooterCss, ds as getWeekCalendarDayTuple, ec as getLocalScheduleDate, ei as formEmbedFragment, en as eventPlaceName, er as markEditableSurfaceForwarding, fc as resolveExactOrFreePriceDisplay, fi as resolveCardRoleForBoxStyles, fn as formatCalendarTitle, fo as buildTextContrastShadow, fr as staticHeaderChromeRuntime, fs as getWeekCalendarDays, ft as buildResolveImageUrlContext, g as giftingBlockDefinition, gn as formatEventDateParts, go as resolveEffectPaint, gr as formBlockDefinition, gs as publicEventsArraySchema, gt as getCardOrientation, h as newsletterBlockSubmissionMessage, hn as formatEventCompactDateRail, ho as resolveEffectApplications, ht as EventQuickFacts, ic as resolveBookingBusinessTimeZone, ii as ctaCopyFragment, in as pageNavigationSchema, ir as teamMemberBiography, it as MediaPlaceholder, j as passCardListContent, ja as headerRootPaint, ji as when, jn as planDropInPanel, jr as clsx, jt as normalizeOfferingsPreviewItemLimit, k as membershipCardListContent, ka as headerNeedsPhotoShade, ki as runTransforms, kn as getPublicEventCanonicalPath, kr as itemRole, ks as unavailableReadinessFact, kt as buildOfferingsPreviewListing, l as parseLocationMapLoaderResult, lc as publicEventPricingCurrency, lo as resolveCardRole, ls as getDayOfWeek, lt as resolvePublicMediaUrl, m as buildNewsletterFormInteractiveIslandProps, mc as formatCurrencyAmount, mn as formatEventClockLabel, mo as generateEffectsCSS, ms as isToday, mt as setContextResolveImageUrlContext, na as isRecord$4, nc as parseLocalScheduleTime, ni as testimonialsCarouselFragment, nn as formatEventLocation, nt as RichText, o as describeUnresolvedLocationMapLocation, oi as ctaRowFragment, on as closedRunCopy, or as readRuntimeNow, os as getLocalMinuteOfDay, p as NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, pn as formatDate, po as generateNavLinkCSS, ps as isSameCalendarDay, pt as getCurrentResolveImageUrlContext, q as eventCollectionSourceSchemaShape, qi as isInlineTextEmpty, qn as groupPublicEventsByRun, qo as bindingSchema, qr as richTextFragment, r as normalizeBlockContent, ra as chosenString, rc as toUtcIsoDateTimeString, ri as testimonialsHeadingFragment, rn as blockSiteTermsSchema, ro as requireCuratedSiteStyle, rr as parseTeamMemberSpecialties, rt as ImagePresets, s as normalizeLocationMapProps, sc as formatBookingPriceDisplay, si as isBlockButtonRole, sn as closedDateCopy, sr as resolveDateRuntimeContext, ss as addDays, t as getBlockDefinition, ta as isObjectRecord, tc as parseBookingLocalDate, ti as formCopyFragment, tn as eventVenuePlace, tr as splitPositioningClasses, tt as MediaNodeServer, u as resolveLocationMapLocation, uc as publicEventPricingDisplay, ui as boxStyleClassNames, un as eventDateOptions, uo as generateDefaultCardSystem, us as getOrderedDayNames, v as checkoutBlockDefinition, va as themeButtonSelector, vi as resolveBackgroundColorValue, vn as formatEventNextDateFact, vr as buildInteractiveIslandProps, vs as blockBookingConsentSchema, vt as eventRegistrationBlockDefinition, w as buildCheckoutInteractiveIslandProps, wn as resolveEventTimeZone, wr as listItemPresentation, wt as resolveEventRegistrationScopedEvents, x as productListBlockDefinition, xi as bodyCopyFragment, xr as createZodCodec, xs as sanitizeHref, xt as bookingNowSchema, y as cartBlockDefinition, ya as AFFORDANCE_SUPPRESS_CLASS, yi as ctaButton, yr as createInteractiveIslandCodec, ys as bookingConsentCarrierSchema, yt as buildEventRegistrationInteractiveIslandProps, zi as ClockIcon, zr as formatCoursePrice, zt as ThemedButton } from "./registry-CvhFwbXJ.mjs";
|
|
4
4
|
import { B as HOVER_TEXT_THRESHOLD, C as materializeRuntimeButtonAppearance, F as resolveSurfaceForeground, G as resolveConcreteColorHex, H as contrastThresholdByPolicy, K as resolveOpaqueSurfaceHex, L as surfaceInkPublication, N as freezeOwnedThemeValue, O as mapButtonVisualAppearances, P as ownedThemeSnapshot, S as buttonTypographyDeclarations, U as inkReference, V as certifyPaint, b as buttonShadow, f as compositeHex, g as actionVariableFallback, n as parseSurfaceTree, o as resolveSurface, s as serializeSurfaceTree, v as buttonBorder, w as paddingDeclarations, x as buttonStateAppearanceDeclarations, y as buttonRadius } from "./accessibleSurfaces-CM3QANtw.mjs";
|
|
5
5
|
import { b as siteChromeBackgroundOverrideOwner, m as surfaceCardRoleValues, s as boxBackgroundSchema } from "./schema-BpsqaSSU.mjs";
|
|
6
6
|
import { l as renderableMediaAssetSchema, o as runtimeMediaSchema } from "./media-luf7RF22.mjs";
|
|
7
7
|
import { a as normalizeLocationAddressText, c as publicLocationSchema, d as mapDrawingSchema } from "./mapLocation-BM5WX7FY.mjs";
|
|
8
|
-
import { t as assertNever$
|
|
9
|
-
import { A as MQ_MD_UP, M as MQ_SM_UP, N as MQ_TABLET_ONLY, O as MQ_LG_UP, c as readSdkPreviewPublishedPlacement, h as compileManifestContentContract, j as MQ_SM_DOWN, k as MQ_MD_DOWN, y as validateManifestDraft } from "./pageRuntimeSupport-
|
|
8
|
+
import { t as assertNever$3 } from "./assert-never-ku-PUn9U.mjs";
|
|
9
|
+
import { A as MQ_MD_UP, M as MQ_SM_UP, N as MQ_TABLET_ONLY, O as MQ_LG_UP, c as readSdkPreviewPublishedPlacement, h as compileManifestContentContract, j as MQ_SM_DOWN, k as MQ_MD_DOWN, y as validateManifestDraft } from "./pageRuntimeSupport-BnSuoHON.mjs";
|
|
10
10
|
import { n as RichTextDocSchema } from "./richTextSchema-QLaQrbII.mjs";
|
|
11
|
-
import { M as opaqueSurfaceDeclarations, T as testimonialsCompositionTreatmentValues, j as opaqueSurfaceContextFromTheme, v as featureCardCompositionTreatmentValues, x as offeringsPreviewCompositionTreatmentValues, y as introCompositionTreatmentValues } from "./lookMediaFrame-
|
|
12
|
-
import { l as mergeHeaderNavTypographyPreference, u as readHeaderNavFontSizePreference } from "./bindings-
|
|
13
|
-
import { A as generateShadowCssVars, C as INPUT_ERROR_BORDER_COLOR_VAR, D as RESOLVED_BUTTON_DISABLED_DECLARATIONS, E as generateOpaquePanelCss, M as cardBorderDeclarations, N as cardDecorationPseudoRules, O as resolvedButtonColourDeclarations, S as INPUT_EDGE_COLOR_VAR, T as generateCheckableCss, _ as getResponsiveScopeSpec, a as prefixSelector, b as INPUT_GROUP_SELECTOR, c as parseCustomCssRules, d as THEME_RADIUS_CSS_VARS, f as generateTypographyCss, g as THEME_RESPONSIVE_CONTAINER_NAME, h as DEFAULT_THEME_RESPONSIVE_MODE, i as escapeStyleContent, j as renderCssDeclarations, k as resolvedButtonFocusDeclarations, l as generateAllBlockVarsCss, m as generateStatusCss, n as compileBlockCustomCssRules, o as toKebabCase, p as generateProgressCss, r as compileCustomCssRules, s as parseBlockCustomCssRules, t as ThemeScopeCore, u as generateBlockCustomVarsCss, v as INPUT_GROUP_ERROR_SELECTOR, w as inputEdgeColorValue, x as generateInputGroupCss, y as INPUT_GROUP_FOCUS_SELECTOR } from "./ThemeScopeCore-
|
|
11
|
+
import { M as opaqueSurfaceDeclarations, T as testimonialsCompositionTreatmentValues, j as opaqueSurfaceContextFromTheme, v as featureCardCompositionTreatmentValues, x as offeringsPreviewCompositionTreatmentValues, y as introCompositionTreatmentValues } from "./lookMediaFrame-m-91jGGn.mjs";
|
|
12
|
+
import { l as mergeHeaderNavTypographyPreference, u as readHeaderNavFontSizePreference } from "./bindings-CS6ih1Yc.mjs";
|
|
13
|
+
import { A as generateShadowCssVars, C as INPUT_ERROR_BORDER_COLOR_VAR, D as RESOLVED_BUTTON_DISABLED_DECLARATIONS, E as generateOpaquePanelCss, M as cardBorderDeclarations, N as cardDecorationPseudoRules, O as resolvedButtonColourDeclarations, S as INPUT_EDGE_COLOR_VAR, T as generateCheckableCss, _ as getResponsiveScopeSpec, a as prefixSelector, b as INPUT_GROUP_SELECTOR, c as parseCustomCssRules, d as THEME_RADIUS_CSS_VARS, f as generateTypographyCss, g as THEME_RESPONSIVE_CONTAINER_NAME, h as DEFAULT_THEME_RESPONSIVE_MODE, i as escapeStyleContent, j as renderCssDeclarations, k as resolvedButtonFocusDeclarations, l as generateAllBlockVarsCss, m as generateStatusCss, n as compileBlockCustomCssRules, o as toKebabCase, p as generateProgressCss, r as compileCustomCssRules, s as parseBlockCustomCssRules, t as ThemeScopeCore, u as generateBlockCustomVarsCss, v as INPUT_GROUP_ERROR_SELECTOR, w as inputEdgeColorValue, x as generateInputGroupCss, y as INPUT_GROUP_FOCUS_SELECTOR } from "./ThemeScopeCore-BQzjDQ2q.mjs";
|
|
14
14
|
import { t as parseThemeForPersistence } from "./parseThemeForPersistence-DOsfofCy.mjs";
|
|
15
15
|
import { n as mapOutlineBlocks } from "./pageRegions-BaeEF2MU.mjs";
|
|
16
16
|
import { t as getAtPath } from "./src-DHK4JUlp.mjs";
|
|
@@ -19,6 +19,58 @@ import React, { forwardRef } from "react";
|
|
|
19
19
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
20
20
|
import { z } from "zod";
|
|
21
21
|
import { IslandDelivery } from "#island-delivery";
|
|
22
|
+
//#region ../core/src/booking-instalments.ts
|
|
23
|
+
function isDepositBearingBookingInstalmentPlan(plan) {
|
|
24
|
+
switch (plan.kind) {
|
|
25
|
+
case "deposit_plus_one_remainder":
|
|
26
|
+
case "deposit_plus_scheduled_instalments": return true;
|
|
27
|
+
case "equal_scheduled_instalments": return false;
|
|
28
|
+
default: return assertNever$2(plan);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function getBookingInstalmentProtectedDepositAmountCents(plan) {
|
|
32
|
+
return isDepositBearingBookingInstalmentPlan(plan) ? plan.depositAmountCents : null;
|
|
33
|
+
}
|
|
34
|
+
function clampConfiguredAmount(amountCents, totalAmountCents) {
|
|
35
|
+
return Math.max(0, Math.min(amountCents, totalAmountCents));
|
|
36
|
+
}
|
|
37
|
+
function splitAmountWithRemainderInFirst(totalAmountCents, partCount) {
|
|
38
|
+
if (partCount <= 0) return [];
|
|
39
|
+
const baseAmountCents = Math.floor(totalAmountCents / partCount);
|
|
40
|
+
const remainderCents = totalAmountCents - baseAmountCents * partCount;
|
|
41
|
+
return Array.from({ length: partCount }, (_, index) => index === 0 ? baseAmountCents + remainderCents : baseAmountCents);
|
|
42
|
+
}
|
|
43
|
+
function addIntervalPreservingMonthAnchor(isoString, intervalCount, intervalUnit) {
|
|
44
|
+
const date = new Date(isoString);
|
|
45
|
+
if (!Number.isFinite(date.getTime())) return isoString;
|
|
46
|
+
switch (intervalUnit) {
|
|
47
|
+
case "day":
|
|
48
|
+
date.setUTCDate(date.getUTCDate() + intervalCount);
|
|
49
|
+
return date.toISOString();
|
|
50
|
+
case "week":
|
|
51
|
+
date.setUTCDate(date.getUTCDate() + intervalCount * 7);
|
|
52
|
+
return date.toISOString();
|
|
53
|
+
case "month": return addMonthsPreservingAnchorDay(date, intervalCount).toISOString();
|
|
54
|
+
default: return assertNever$2(intervalUnit);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function omitZeroAmountFutureRows(rows) {
|
|
58
|
+
if (rows.length <= 1) return rows;
|
|
59
|
+
const firstRow = rows[0];
|
|
60
|
+
if (firstRow === void 0) return [];
|
|
61
|
+
return [firstRow, ...rows.slice(1).filter((row) => row.amountCents > 0)];
|
|
62
|
+
}
|
|
63
|
+
function addMonthsPreservingAnchorDay(date, intervalCount) {
|
|
64
|
+
const anchorDay = date.getUTCDate();
|
|
65
|
+
const nextMonth = new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth() + intervalCount, 1, date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.getUTCMilliseconds()));
|
|
66
|
+
const lastDayOfTargetMonth = new Date(Date.UTC(nextMonth.getUTCFullYear(), nextMonth.getUTCMonth() + 1, 0)).getUTCDate();
|
|
67
|
+
nextMonth.setUTCDate(Math.min(anchorDay, lastDayOfTargetMonth));
|
|
68
|
+
return nextMonth;
|
|
69
|
+
}
|
|
70
|
+
function assertNever$2(value) {
|
|
71
|
+
throw new Error(`Unexpected value: ${String(value)}`);
|
|
72
|
+
}
|
|
73
|
+
//#endregion
|
|
22
74
|
//#region ../core/src/appointment-service-categories.ts
|
|
23
75
|
/**
|
|
24
76
|
* Groups services under their categories.
|
|
@@ -160,6 +212,138 @@ function formatOpeningHoursRows(hours, options = {}) {
|
|
|
160
212
|
}, []);
|
|
161
213
|
}
|
|
162
214
|
//#endregion
|
|
215
|
+
//#region ../commerce/src/utils/assertNever.ts
|
|
216
|
+
function assertNever$1(value, message) {
|
|
217
|
+
if (message) throw new Error(message);
|
|
218
|
+
throw new Error(`Unexpected value: ${String(value)}`);
|
|
219
|
+
}
|
|
220
|
+
//#endregion
|
|
221
|
+
//#region ../commerce/src/purchase/bookingInstalmentSchedule.ts
|
|
222
|
+
function resolveBookingInitialInstalmentAmountCents(input) {
|
|
223
|
+
const totalAmountCents = Math.max(0, input.totalAmountCents);
|
|
224
|
+
switch (input.plan.kind) {
|
|
225
|
+
case "deposit_plus_one_remainder":
|
|
226
|
+
case "deposit_plus_scheduled_instalments": return clampConfiguredAmount(input.plan.depositAmountCents, totalAmountCents);
|
|
227
|
+
case "equal_scheduled_instalments": return splitAmountWithRemainderInFirst(totalAmountCents, input.plan.instalmentCount)[0] ?? 0;
|
|
228
|
+
default: return assertNever$1(input.plan);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
function buildBookingInstalmentSchedule(input) {
|
|
232
|
+
const totalAmountCents = Math.max(0, input.totalAmountCents);
|
|
233
|
+
switch (input.plan.kind) {
|
|
234
|
+
case "deposit_plus_one_remainder": {
|
|
235
|
+
const depositAmountCents = resolveBookingInitialInstalmentAmountCents(input);
|
|
236
|
+
const remainderAmountCents = Math.max(0, totalAmountCents - depositAmountCents);
|
|
237
|
+
return omitZeroAmountFutureRows([createScheduleRow({
|
|
238
|
+
sequence: 1,
|
|
239
|
+
stateAtBooking: "paid_today",
|
|
240
|
+
dueAt: input.anchorAt,
|
|
241
|
+
amountCents: depositAmountCents
|
|
242
|
+
}), createScheduleRow({
|
|
243
|
+
sequence: 2,
|
|
244
|
+
stateAtBooking: "scheduled",
|
|
245
|
+
dueAt: addIntervalPreservingMonthAnchor(input.anchorAt, input.plan.remainderDueCount, input.plan.intervalUnit),
|
|
246
|
+
amountCents: remainderAmountCents
|
|
247
|
+
})]);
|
|
248
|
+
}
|
|
249
|
+
case "deposit_plus_scheduled_instalments": {
|
|
250
|
+
const plan = input.plan;
|
|
251
|
+
const depositAmountCents = resolveBookingInitialInstalmentAmountCents(input);
|
|
252
|
+
const instalmentAmounts = splitAmountWithRemainderInFirst(Math.max(0, totalAmountCents - depositAmountCents), plan.instalmentCount);
|
|
253
|
+
return omitZeroAmountFutureRows([createScheduleRow({
|
|
254
|
+
sequence: 1,
|
|
255
|
+
stateAtBooking: "paid_today",
|
|
256
|
+
dueAt: input.anchorAt,
|
|
257
|
+
amountCents: depositAmountCents
|
|
258
|
+
}), ...instalmentAmounts.map((amountCents, index) => createScheduleRow({
|
|
259
|
+
sequence: index + 2,
|
|
260
|
+
stateAtBooking: "scheduled",
|
|
261
|
+
dueAt: addIntervalPreservingMonthAnchor(input.anchorAt, plan.intervalCount * (index + 1), plan.intervalUnit),
|
|
262
|
+
amountCents
|
|
263
|
+
}))]);
|
|
264
|
+
}
|
|
265
|
+
case "equal_scheduled_instalments": {
|
|
266
|
+
const plan = input.plan;
|
|
267
|
+
return omitZeroAmountFutureRows(splitAmountWithRemainderInFirst(totalAmountCents, plan.instalmentCount).map((amountCents, index) => createScheduleRow({
|
|
268
|
+
sequence: index + 1,
|
|
269
|
+
stateAtBooking: index === 0 ? "paid_today" : "scheduled",
|
|
270
|
+
dueAt: index === 0 ? input.anchorAt : addIntervalPreservingMonthAnchor(input.anchorAt, plan.intervalCount * index, plan.intervalUnit),
|
|
271
|
+
amountCents
|
|
272
|
+
})));
|
|
273
|
+
}
|
|
274
|
+
default: return assertNever$1(input.plan);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
function createScheduleRow(input) {
|
|
278
|
+
return {
|
|
279
|
+
id: `payment-${input.sequence}`,
|
|
280
|
+
sequence: input.sequence,
|
|
281
|
+
stateAtBooking: input.stateAtBooking,
|
|
282
|
+
dueAt: input.dueAt,
|
|
283
|
+
amountCents: input.amountCents
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
/** Resolve real rows first: zero future payments do not extend the deadline. */
|
|
287
|
+
function canInstalmentPlanCompleteBefore(input) {
|
|
288
|
+
const deadline = Date.parse(input.deadline);
|
|
289
|
+
if (!Number.isFinite(Date.parse(input.now)) || !Number.isFinite(deadline)) return false;
|
|
290
|
+
return input.schedule.every((row) => Date.parse(row.dueAt) < deadline);
|
|
291
|
+
}
|
|
292
|
+
//#endregion
|
|
293
|
+
//#region ../commerce/src/purchase/bookingPaymentSelection.ts
|
|
294
|
+
function bookingCollectionWindow(option) {
|
|
295
|
+
const now = Date.parse(option.anchorAt);
|
|
296
|
+
const start = Date.parse(option.bookingStartAt ?? "");
|
|
297
|
+
return Number.isFinite(now) && Number.isFinite(start) && start > now ? {
|
|
298
|
+
now,
|
|
299
|
+
start
|
|
300
|
+
} : null;
|
|
301
|
+
}
|
|
302
|
+
/** Instalment due dates don't depend on the amount; this total keeps every row (zero rows are dropped). */
|
|
303
|
+
const SCHEDULE_DATES_TOTAL_CENTS = 1e9;
|
|
304
|
+
/**
|
|
305
|
+
* The date half of `canOfferBookingCollectionOption`, for a configured option
|
|
306
|
+
* before any total is known: whether its dates still allow it to be offered.
|
|
307
|
+
* Amount rules (Stripe minimums, a deposit below the total) are left out, so a
|
|
308
|
+
* `true` here is an offer the total may still refuse. Upfront and pay-directly
|
|
309
|
+
* options have no dates to miss.
|
|
310
|
+
*/
|
|
311
|
+
function bookingCollectionDatesOpen(option, dates) {
|
|
312
|
+
if (option.kind === "upfront" || option.kind === "deferred_manual") return true;
|
|
313
|
+
const window = bookingCollectionWindow({
|
|
314
|
+
anchorAt: dates.nowIso,
|
|
315
|
+
bookingStartAt: dates.bookingStartAt
|
|
316
|
+
});
|
|
317
|
+
if (!window || dates.bookingStartAt === null) return false;
|
|
318
|
+
switch (option.kind) {
|
|
319
|
+
case "flexible_balance": {
|
|
320
|
+
const due = flexibleBalanceDueDay(option.config, dates.bookingStartAt, dates.timeZone);
|
|
321
|
+
const localDay = (at) => formatLocalScheduleDate(getLocalScheduleDate(new Date(at), dates.timeZone));
|
|
322
|
+
return due >= localDay(window.now) && due < localDay(window.start);
|
|
323
|
+
}
|
|
324
|
+
case "instalment_plan": {
|
|
325
|
+
const deadline = dates.instalmentCollectionDeadlineAt === void 0 ? dates.bookingStartAt : dates.instalmentCollectionDeadlineAt;
|
|
326
|
+
if (deadline === null) return false;
|
|
327
|
+
const schedule = buildBookingInstalmentSchedule({
|
|
328
|
+
anchorAt: dates.nowIso,
|
|
329
|
+
totalAmountCents: SCHEDULE_DATES_TOTAL_CENTS,
|
|
330
|
+
plan: option.plan
|
|
331
|
+
});
|
|
332
|
+
return canInstalmentPlanCompleteBefore({
|
|
333
|
+
now: dates.nowIso,
|
|
334
|
+
deadline,
|
|
335
|
+
schedule
|
|
336
|
+
}) && schedule.every((row) => row.stateAtBooking !== "scheduled" || Date.parse(row.dueAt) > window.now);
|
|
337
|
+
}
|
|
338
|
+
default: return assertNever$1(option);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
/** Mirrors private.flexible_balance_due_day: fixed civil date, or local start minus calendar days. */
|
|
342
|
+
function flexibleBalanceDueDay(config, bookingStartAt, timeZone) {
|
|
343
|
+
const rule = config.dueDateRule;
|
|
344
|
+
return formatLocalScheduleDate(rule.kind === "fixed_calendar_date" ? parseBookingLocalDate(rule.dueAt.slice(0, 10)) : addLocalScheduleDays(getLocalScheduleDate(new Date(bookingStartAt), timeZone), -rule.daysBeforeStart));
|
|
345
|
+
}
|
|
346
|
+
//#endregion
|
|
163
347
|
//#region ../calendar/src/lane-packing.ts
|
|
164
348
|
/**
|
|
165
349
|
* Assign lanes to a list of intervals.
|
|
@@ -4499,6 +4683,70 @@ function selectEventDetailsCandidate(events, requested, nowIso) {
|
|
|
4499
4683
|
} : null;
|
|
4500
4684
|
}
|
|
4501
4685
|
//#endregion
|
|
4686
|
+
//#region ../blocks/src/system/runtime/nodes/events/domain/depositOffer.ts
|
|
4687
|
+
const NO_DEPOSIT = { kind: "none" };
|
|
4688
|
+
/**
|
|
4689
|
+
* The event page's deposit note for an event, decided on dates and the prices
|
|
4690
|
+
* shown. A course's dates come from its live sessions, as the server reads
|
|
4691
|
+
* them for the booking panel; a single date starts when it starts.
|
|
4692
|
+
*/
|
|
4693
|
+
function resolvePublicEventDepositOffer(event, input) {
|
|
4694
|
+
const prices = paidPriceSpan(event.pricing);
|
|
4695
|
+
const terms = event.paymentTerms;
|
|
4696
|
+
const payInFullOffered = terms.allowedOptions.some((option) => option.kind === "upfront");
|
|
4697
|
+
const applies = (option) => prices !== null && (depositCents(option) ?? Infinity) < (payInFullOffered ? prices.highestCents : prices.lowestCents);
|
|
4698
|
+
const deposits = depositOptions(terms).filter(applies);
|
|
4699
|
+
if (!prices || deposits.length === 0) return NO_DEPOSIT;
|
|
4700
|
+
const dates = {
|
|
4701
|
+
...input.sessions ? resolveWholeSeriesPaymentDates({
|
|
4702
|
+
sessions: input.sessions,
|
|
4703
|
+
paymentTerms: terms
|
|
4704
|
+
}) : { bookingStartAt: event.startsAt },
|
|
4705
|
+
timeZone: event.siteTimeZone,
|
|
4706
|
+
nowIso: input.nowIso
|
|
4707
|
+
};
|
|
4708
|
+
const open = deposits.find((option) => bookingCollectionDatesOpen(option, dates));
|
|
4709
|
+
if (!open) return terms.allowedOptions.some((option) => option.kind === "deferred_manual") ? NO_DEPOSIT : { kind: "paid_in_full" };
|
|
4710
|
+
return {
|
|
4711
|
+
kind: "deposit",
|
|
4712
|
+
amountCents: depositCents(open) ?? 0,
|
|
4713
|
+
currency: prices.currency,
|
|
4714
|
+
payInFullOffered,
|
|
4715
|
+
balanceDueDay: open.kind === "flexible_balance" && dates.bookingStartAt ? flexibleBalanceDueDay(open.config, dates.bookingStartAt, dates.timeZone) : null
|
|
4716
|
+
};
|
|
4717
|
+
}
|
|
4718
|
+
function depositOptions(paymentTerms) {
|
|
4719
|
+
return paymentTerms.allowedOptions.filter((option) => depositCents(option) !== null);
|
|
4720
|
+
}
|
|
4721
|
+
/** A deposit is an amount taken up front that's less than the whole; equal instalments have none. */
|
|
4722
|
+
function depositCents(option) {
|
|
4723
|
+
switch (option.kind) {
|
|
4724
|
+
case "flexible_balance": return positive(option.config.upfrontAmountCents);
|
|
4725
|
+
case "instalment_plan": return positive(getBookingInstalmentProtectedDepositAmountCents(option.plan));
|
|
4726
|
+
case "upfront":
|
|
4727
|
+
case "deferred_manual": return null;
|
|
4728
|
+
}
|
|
4729
|
+
}
|
|
4730
|
+
const positive = (amount) => amount !== null && amount > 0 ? amount : null;
|
|
4731
|
+
/** The cheapest and dearest paid place shown; null when nothing shown is paid. */
|
|
4732
|
+
function paidPriceSpan(pricing) {
|
|
4733
|
+
const display = publicEventPricingDisplay(pricing);
|
|
4734
|
+
const span = (lowestCents, highestCents) => highestCents > 0 ? {
|
|
4735
|
+
lowestCents: Math.max(lowestCents, 0),
|
|
4736
|
+
highestCents,
|
|
4737
|
+
currency: "currency" in display ? display.currency : ""
|
|
4738
|
+
} : null;
|
|
4739
|
+
switch (display.kind) {
|
|
4740
|
+
case "exact": return span(display.amount, display.amount);
|
|
4741
|
+
case "from": return span(display.amount, Infinity);
|
|
4742
|
+
case "range": return span(display.minAmount, display.maxAmount);
|
|
4743
|
+
case "mixed": return span(display.paidFromAmount, display.paidToAmount);
|
|
4744
|
+
case "free":
|
|
4745
|
+
case "unavailable":
|
|
4746
|
+
case "external": return null;
|
|
4747
|
+
}
|
|
4748
|
+
}
|
|
4749
|
+
//#endregion
|
|
4502
4750
|
//#region ../blocks/src/system/runtime/shared/utils/bookingRoute.ts
|
|
4503
4751
|
const BOOK_TARGET_PARAMS = {
|
|
4504
4752
|
service: "service",
|
|
@@ -4730,201 +4978,6 @@ function StepIndicator$1({ currentStep, totalSteps, stepLabels, classPrefix, emi
|
|
|
4730
4978
|
});
|
|
4731
4979
|
}
|
|
4732
4980
|
//#endregion
|
|
4733
|
-
//#region ../blocks/src/system/runtime/nodes/svg.tsx
|
|
4734
|
-
/**
|
|
4735
|
-
* Strict SVG-`transform` validator.
|
|
4736
|
-
*
|
|
4737
|
-
* Accepts only a whitespace/comma-separated list of the geometric transform
|
|
4738
|
-
* functions (`translate`/`rotate`/`scale`/`skewX`/`skewY`/`matrix`) whose
|
|
4739
|
-
* arguments are plain numbers. This deliberately rejects anything else —
|
|
4740
|
-
* `url(...)`, CSS functions, `javascript:`, angle/length units, stray letters —
|
|
4741
|
-
* so a persisted custom-block tree can't smuggle an executable or exfiltrating
|
|
4742
|
-
* value into the attribute.
|
|
4743
|
-
*/
|
|
4744
|
-
const TRANSFORM_NUMBER = String.raw`-?(?:\d+\.?\d*|\.\d+)(?:e-?\d+)?`;
|
|
4745
|
-
const TRANSFORM_ARGS = String.raw`${TRANSFORM_NUMBER}(?:[\s,]+${TRANSFORM_NUMBER})*`;
|
|
4746
|
-
const TRANSFORM_FN = String.raw`(?:translate|rotate|scale|skewX|skewY|matrix)\(\s*${TRANSFORM_ARGS}\s*\)`;
|
|
4747
|
-
const SAFE_TRANSFORM_RE = new RegExp(String.raw`^\s*${TRANSFORM_FN}(?:[\s,]*${TRANSFORM_FN})*\s*$`);
|
|
4748
|
-
function safeTransform(value) {
|
|
4749
|
-
if (typeof value !== "string") return void 0;
|
|
4750
|
-
const trimmed = value.trim();
|
|
4751
|
-
if (trimmed.length === 0) return void 0;
|
|
4752
|
-
return SAFE_TRANSFORM_RE.test(trimmed) ? trimmed : void 0;
|
|
4753
|
-
}
|
|
4754
|
-
/**
|
|
4755
|
-
* Turn paint props into a CSS style object. Colour values pass through as-is so
|
|
4756
|
-
* they may reference theme tokens via `var()`, which only resolves in a CSS
|
|
4757
|
-
* property context (not in a bare presentation attribute).
|
|
4758
|
-
*/
|
|
4759
|
-
function paintStyle(shape) {
|
|
4760
|
-
const style = {};
|
|
4761
|
-
if (shape.fill !== void 0) style.fill = shape.fill;
|
|
4762
|
-
if (shape.stroke !== void 0) style.stroke = shape.stroke;
|
|
4763
|
-
if (shape.strokeWidth !== void 0) style.strokeWidth = shape.strokeWidth;
|
|
4764
|
-
if (shape.fillOpacity !== void 0) style.fillOpacity = shape.fillOpacity;
|
|
4765
|
-
if (shape.strokeOpacity !== void 0) style.strokeOpacity = shape.strokeOpacity;
|
|
4766
|
-
if (shape.strokeLinecap !== void 0) style.strokeLinecap = shape.strokeLinecap;
|
|
4767
|
-
if (shape.strokeLinejoin !== void 0) style.strokeLinejoin = shape.strokeLinejoin;
|
|
4768
|
-
if (shape.strokeDasharray !== void 0) style.strokeDasharray = shape.strokeDasharray;
|
|
4769
|
-
return style;
|
|
4770
|
-
}
|
|
4771
|
-
function renderShape(shape, key) {
|
|
4772
|
-
const style = paintStyle(shape);
|
|
4773
|
-
const transform = safeTransform(shape.transform);
|
|
4774
|
-
switch (shape.kind) {
|
|
4775
|
-
case "text": return /* @__PURE__ */ jsx("text", {
|
|
4776
|
-
className: shape.className,
|
|
4777
|
-
x: shape.x,
|
|
4778
|
-
y: shape.y,
|
|
4779
|
-
transform,
|
|
4780
|
-
children: shape.text
|
|
4781
|
-
}, key);
|
|
4782
|
-
case "path": return /* @__PURE__ */ jsx("path", {
|
|
4783
|
-
d: shape.d,
|
|
4784
|
-
className: shape.className,
|
|
4785
|
-
fillRule: shape.fillRule,
|
|
4786
|
-
style,
|
|
4787
|
-
transform
|
|
4788
|
-
}, key);
|
|
4789
|
-
case "ellipse": return /* @__PURE__ */ jsx("ellipse", {
|
|
4790
|
-
cx: shape.cx,
|
|
4791
|
-
cy: shape.cy,
|
|
4792
|
-
rx: shape.rx,
|
|
4793
|
-
ry: shape.ry,
|
|
4794
|
-
style,
|
|
4795
|
-
transform
|
|
4796
|
-
}, key);
|
|
4797
|
-
case "circle": return /* @__PURE__ */ jsx("circle", {
|
|
4798
|
-
cx: shape.cx,
|
|
4799
|
-
cy: shape.cy,
|
|
4800
|
-
r: shape.r,
|
|
4801
|
-
style,
|
|
4802
|
-
transform
|
|
4803
|
-
}, key);
|
|
4804
|
-
case "rect": return /* @__PURE__ */ jsx("rect", {
|
|
4805
|
-
x: shape.x,
|
|
4806
|
-
y: shape.y,
|
|
4807
|
-
className: shape.className,
|
|
4808
|
-
width: shape.width,
|
|
4809
|
-
height: shape.height,
|
|
4810
|
-
rx: shape.rx,
|
|
4811
|
-
ry: shape.ry,
|
|
4812
|
-
style,
|
|
4813
|
-
transform
|
|
4814
|
-
}, key);
|
|
4815
|
-
case "line": return /* @__PURE__ */ jsx("line", {
|
|
4816
|
-
x1: shape.x1,
|
|
4817
|
-
y1: shape.y1,
|
|
4818
|
-
x2: shape.x2,
|
|
4819
|
-
y2: shape.y2,
|
|
4820
|
-
style,
|
|
4821
|
-
transform
|
|
4822
|
-
}, key);
|
|
4823
|
-
default: return null;
|
|
4824
|
-
}
|
|
4825
|
-
}
|
|
4826
|
-
const SvgNode = ({ blockId: _blockId, blockKind: _blockKind, blockContent: _blockContent, fragmentRegistry: _fragmentRegistry, pathBase: _pathBase, viewBox, width, height, className, style, ariaHidden = true, ariaLabel, shapes }) => {
|
|
4827
|
-
return /* @__PURE__ */ jsx("svg", {
|
|
4828
|
-
viewBox,
|
|
4829
|
-
width,
|
|
4830
|
-
height,
|
|
4831
|
-
className,
|
|
4832
|
-
style,
|
|
4833
|
-
"aria-hidden": ariaHidden || void 0,
|
|
4834
|
-
role: ariaLabel ? "img" : void 0,
|
|
4835
|
-
"aria-label": ariaLabel,
|
|
4836
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
4837
|
-
fill: "none",
|
|
4838
|
-
children: (Array.isArray(shapes) ? shapes : []).map((shape, index) => renderShape(shape, index))
|
|
4839
|
-
});
|
|
4840
|
-
};
|
|
4841
|
-
//#endregion
|
|
4842
|
-
//#region ../blocks/src/system/runtime/nodes/shared/MapDrawingSvg.tsx
|
|
4843
|
-
const PIN_PATH = "M0 0C-3.5-9-13-15-13-25A13 13 0 1 1 13-25C13-15 3.5-9 0 0ZM0-20.5A4.5 4.5 0 1 0 0-29.5A4.5 4.5 0 1 0 0-20.5Z";
|
|
4844
|
-
const commands = (points) => points.map(([x, y], index) => `${index ? "L" : "M"}${x} ${y}`).join(" ");
|
|
4845
|
-
function pathShape(path) {
|
|
4846
|
-
return path.kind === "polygon" ? {
|
|
4847
|
-
kind: "path",
|
|
4848
|
-
className: path.className,
|
|
4849
|
-
fillRule: path.fillRule,
|
|
4850
|
-
d: path.rings.map((ring) => `${commands(ring)} Z`).join(" ")
|
|
4851
|
-
} : {
|
|
4852
|
-
kind: "path",
|
|
4853
|
-
className: path.className,
|
|
4854
|
-
d: commands(path.points)
|
|
4855
|
-
};
|
|
4856
|
-
}
|
|
4857
|
-
function labelShapes(label) {
|
|
4858
|
-
const [x, y] = label.point, transform = `rotate(${label.angle} ${x} ${y})`;
|
|
4859
|
-
return [label.haloClassName, label.className].map((className) => ({
|
|
4860
|
-
kind: "text",
|
|
4861
|
-
className,
|
|
4862
|
-
x,
|
|
4863
|
-
y,
|
|
4864
|
-
transform,
|
|
4865
|
-
text: label.text
|
|
4866
|
-
}));
|
|
4867
|
-
}
|
|
4868
|
-
/** The drawing the renderer below would show, or null when there's nothing it can draw. */
|
|
4869
|
-
function readableMapDrawing(drawing) {
|
|
4870
|
-
const parsed = mapDrawingSchema.safeParse(drawing);
|
|
4871
|
-
return parsed.success ? parsed.data : null;
|
|
4872
|
-
}
|
|
4873
|
-
/** Untrusted standalone callers retain boundary admission. */
|
|
4874
|
-
function MapDrawingSvg(props) {
|
|
4875
|
-
const drawing = readableMapDrawing(props.drawing);
|
|
4876
|
-
return drawing ? /* @__PURE__ */ jsx(AdmittedMapDrawingSvg, {
|
|
4877
|
-
...props,
|
|
4878
|
-
drawing
|
|
4879
|
-
}) : null;
|
|
4880
|
-
}
|
|
4881
|
-
/** Render an already admitted value without allocating another validation copy. */
|
|
4882
|
-
function AdmittedMapDrawingSvg(props) {
|
|
4883
|
-
const drawing = props.drawing;
|
|
4884
|
-
const name = props.wider ? "wider" : "neighbourhood", frame = drawing.frames[name];
|
|
4885
|
-
const shapes = [
|
|
4886
|
-
{
|
|
4887
|
-
kind: "rect",
|
|
4888
|
-
className: frame.backgroundClass,
|
|
4889
|
-
x: 0,
|
|
4890
|
-
y: 0,
|
|
4891
|
-
width: 800,
|
|
4892
|
-
height: 800
|
|
4893
|
-
},
|
|
4894
|
-
...frame.paths.map(pathShape),
|
|
4895
|
-
...frame.labels.flatMap(labelShapes),
|
|
4896
|
-
{
|
|
4897
|
-
kind: "path",
|
|
4898
|
-
className: frame.pin.className,
|
|
4899
|
-
fillRule: "evenodd",
|
|
4900
|
-
d: PIN_PATH,
|
|
4901
|
-
transform: `translate(${frame.pin.point.join(" ")})`
|
|
4902
|
-
}
|
|
4903
|
-
];
|
|
4904
|
-
return /* @__PURE__ */ jsxs("figure", {
|
|
4905
|
-
className: `rb-map-drawing ${props.className ?? ""}`.trim(),
|
|
4906
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
4907
|
-
className: "rb-map-drawing-crop",
|
|
4908
|
-
style: cropHeightStyle(Math.max(255, props.height ?? 320), props.heightAs ?? "fixed"),
|
|
4909
|
-
children: /* @__PURE__ */ jsx(SvgNode, {
|
|
4910
|
-
className: `map-${name}`,
|
|
4911
|
-
viewBox: frame.viewBox.join(" "),
|
|
4912
|
-
shapes,
|
|
4913
|
-
ariaHidden: false,
|
|
4914
|
-
ariaLabel: props.label ? `Map showing ${props.label}` : "Map showing the arrival pin"
|
|
4915
|
-
})
|
|
4916
|
-
}), /* @__PURE__ */ jsxs("figcaption", { children: ["© ", /* @__PURE__ */ jsx("a", {
|
|
4917
|
-
href: "https://www.openstreetmap.org/copyright",
|
|
4918
|
-
target: "_blank",
|
|
4919
|
-
rel: "noreferrer",
|
|
4920
|
-
children: "OpenStreetMap contributors"
|
|
4921
|
-
})] })]
|
|
4922
|
-
});
|
|
4923
|
-
}
|
|
4924
|
-
function cropHeightStyle(height, heightAs) {
|
|
4925
|
-
return heightAs === "minimum" ? { minHeight: height } : { height };
|
|
4926
|
-
}
|
|
4927
|
-
//#endregion
|
|
4928
4981
|
//#region ../blocks/src/system/runtime/nodes/events/shared/EventCard.tsx
|
|
4929
4982
|
/**
|
|
4930
4983
|
* EventCard Component
|
|
@@ -4980,7 +5033,7 @@ const EventCard = ({ event, cardRole = "default", buttonVariant = "primary", but
|
|
|
4980
5033
|
formattedTime,
|
|
4981
5034
|
hasImage,
|
|
4982
5035
|
headingLevel: cardHeadingLevel,
|
|
4983
|
-
mapSlot
|
|
5036
|
+
mapSlot,
|
|
4984
5037
|
priceText,
|
|
4985
5038
|
showMap,
|
|
4986
5039
|
showSummary,
|
|
@@ -4992,13 +5045,6 @@ const EventCard = ({ event, cardRole = "default", buttonVariant = "primary", but
|
|
|
4992
5045
|
})]
|
|
4993
5046
|
});
|
|
4994
5047
|
};
|
|
4995
|
-
function resolveVenueMapSlot(venue, override) {
|
|
4996
|
-
return override ?? (venue?.drawing ? /* @__PURE__ */ jsx(MapDrawingSvg, {
|
|
4997
|
-
drawing: venue.drawing,
|
|
4998
|
-
label: venue.name,
|
|
4999
|
-
height: 255
|
|
5000
|
-
}) : null);
|
|
5001
|
-
}
|
|
5002
5048
|
function EventCardMedia(props) {
|
|
5003
5049
|
if (props.lookPresentation.lookSlots !== void 0) return /* @__PURE__ */ jsx(EventLookDate, {
|
|
5004
5050
|
event: props.event,
|
|
@@ -6015,6 +6061,201 @@ function LocationMapActions(props) {
|
|
|
6015
6061
|
}) }) : null;
|
|
6016
6062
|
}
|
|
6017
6063
|
//#endregion
|
|
6064
|
+
//#region ../blocks/src/system/runtime/nodes/svg.tsx
|
|
6065
|
+
/**
|
|
6066
|
+
* Strict SVG-`transform` validator.
|
|
6067
|
+
*
|
|
6068
|
+
* Accepts only a whitespace/comma-separated list of the geometric transform
|
|
6069
|
+
* functions (`translate`/`rotate`/`scale`/`skewX`/`skewY`/`matrix`) whose
|
|
6070
|
+
* arguments are plain numbers. This deliberately rejects anything else —
|
|
6071
|
+
* `url(...)`, CSS functions, `javascript:`, angle/length units, stray letters —
|
|
6072
|
+
* so a persisted custom-block tree can't smuggle an executable or exfiltrating
|
|
6073
|
+
* value into the attribute.
|
|
6074
|
+
*/
|
|
6075
|
+
const TRANSFORM_NUMBER = String.raw`-?(?:\d+\.?\d*|\.\d+)(?:e-?\d+)?`;
|
|
6076
|
+
const TRANSFORM_ARGS = String.raw`${TRANSFORM_NUMBER}(?:[\s,]+${TRANSFORM_NUMBER})*`;
|
|
6077
|
+
const TRANSFORM_FN = String.raw`(?:translate|rotate|scale|skewX|skewY|matrix)\(\s*${TRANSFORM_ARGS}\s*\)`;
|
|
6078
|
+
const SAFE_TRANSFORM_RE = new RegExp(String.raw`^\s*${TRANSFORM_FN}(?:[\s,]*${TRANSFORM_FN})*\s*$`);
|
|
6079
|
+
function safeTransform(value) {
|
|
6080
|
+
if (typeof value !== "string") return void 0;
|
|
6081
|
+
const trimmed = value.trim();
|
|
6082
|
+
if (trimmed.length === 0) return void 0;
|
|
6083
|
+
return SAFE_TRANSFORM_RE.test(trimmed) ? trimmed : void 0;
|
|
6084
|
+
}
|
|
6085
|
+
/**
|
|
6086
|
+
* Turn paint props into a CSS style object. Colour values pass through as-is so
|
|
6087
|
+
* they may reference theme tokens via `var()`, which only resolves in a CSS
|
|
6088
|
+
* property context (not in a bare presentation attribute).
|
|
6089
|
+
*/
|
|
6090
|
+
function paintStyle(shape) {
|
|
6091
|
+
const style = {};
|
|
6092
|
+
if (shape.fill !== void 0) style.fill = shape.fill;
|
|
6093
|
+
if (shape.stroke !== void 0) style.stroke = shape.stroke;
|
|
6094
|
+
if (shape.strokeWidth !== void 0) style.strokeWidth = shape.strokeWidth;
|
|
6095
|
+
if (shape.fillOpacity !== void 0) style.fillOpacity = shape.fillOpacity;
|
|
6096
|
+
if (shape.strokeOpacity !== void 0) style.strokeOpacity = shape.strokeOpacity;
|
|
6097
|
+
if (shape.strokeLinecap !== void 0) style.strokeLinecap = shape.strokeLinecap;
|
|
6098
|
+
if (shape.strokeLinejoin !== void 0) style.strokeLinejoin = shape.strokeLinejoin;
|
|
6099
|
+
if (shape.strokeDasharray !== void 0) style.strokeDasharray = shape.strokeDasharray;
|
|
6100
|
+
return style;
|
|
6101
|
+
}
|
|
6102
|
+
function renderShape(shape, key) {
|
|
6103
|
+
const style = paintStyle(shape);
|
|
6104
|
+
const transform = safeTransform(shape.transform);
|
|
6105
|
+
switch (shape.kind) {
|
|
6106
|
+
case "text": return /* @__PURE__ */ jsx("text", {
|
|
6107
|
+
className: shape.className,
|
|
6108
|
+
x: shape.x,
|
|
6109
|
+
y: shape.y,
|
|
6110
|
+
transform,
|
|
6111
|
+
children: shape.text
|
|
6112
|
+
}, key);
|
|
6113
|
+
case "path": return /* @__PURE__ */ jsx("path", {
|
|
6114
|
+
d: shape.d,
|
|
6115
|
+
className: shape.className,
|
|
6116
|
+
fillRule: shape.fillRule,
|
|
6117
|
+
style,
|
|
6118
|
+
transform
|
|
6119
|
+
}, key);
|
|
6120
|
+
case "ellipse": return /* @__PURE__ */ jsx("ellipse", {
|
|
6121
|
+
cx: shape.cx,
|
|
6122
|
+
cy: shape.cy,
|
|
6123
|
+
rx: shape.rx,
|
|
6124
|
+
ry: shape.ry,
|
|
6125
|
+
style,
|
|
6126
|
+
transform
|
|
6127
|
+
}, key);
|
|
6128
|
+
case "circle": return /* @__PURE__ */ jsx("circle", {
|
|
6129
|
+
cx: shape.cx,
|
|
6130
|
+
cy: shape.cy,
|
|
6131
|
+
r: shape.r,
|
|
6132
|
+
style,
|
|
6133
|
+
transform
|
|
6134
|
+
}, key);
|
|
6135
|
+
case "rect": return /* @__PURE__ */ jsx("rect", {
|
|
6136
|
+
x: shape.x,
|
|
6137
|
+
y: shape.y,
|
|
6138
|
+
className: shape.className,
|
|
6139
|
+
width: shape.width,
|
|
6140
|
+
height: shape.height,
|
|
6141
|
+
rx: shape.rx,
|
|
6142
|
+
ry: shape.ry,
|
|
6143
|
+
style,
|
|
6144
|
+
transform
|
|
6145
|
+
}, key);
|
|
6146
|
+
case "line": return /* @__PURE__ */ jsx("line", {
|
|
6147
|
+
x1: shape.x1,
|
|
6148
|
+
y1: shape.y1,
|
|
6149
|
+
x2: shape.x2,
|
|
6150
|
+
y2: shape.y2,
|
|
6151
|
+
style,
|
|
6152
|
+
transform
|
|
6153
|
+
}, key);
|
|
6154
|
+
default: return null;
|
|
6155
|
+
}
|
|
6156
|
+
}
|
|
6157
|
+
const SvgNode = ({ blockId: _blockId, blockKind: _blockKind, blockContent: _blockContent, fragmentRegistry: _fragmentRegistry, pathBase: _pathBase, viewBox, width, height, className, style, ariaHidden = true, ariaLabel, shapes }) => {
|
|
6158
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
6159
|
+
viewBox,
|
|
6160
|
+
width,
|
|
6161
|
+
height,
|
|
6162
|
+
className,
|
|
6163
|
+
style,
|
|
6164
|
+
"aria-hidden": ariaHidden || void 0,
|
|
6165
|
+
role: ariaLabel ? "img" : void 0,
|
|
6166
|
+
"aria-label": ariaLabel,
|
|
6167
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
6168
|
+
fill: "none",
|
|
6169
|
+
children: (Array.isArray(shapes) ? shapes : []).map((shape, index) => renderShape(shape, index))
|
|
6170
|
+
});
|
|
6171
|
+
};
|
|
6172
|
+
//#endregion
|
|
6173
|
+
//#region ../blocks/src/system/runtime/nodes/shared/MapDrawingSvg.tsx
|
|
6174
|
+
const PIN_PATH = "M0 0C-3.5-9-13-15-13-25A13 13 0 1 1 13-25C13-15 3.5-9 0 0ZM0-20.5A4.5 4.5 0 1 0 0-29.5A4.5 4.5 0 1 0 0-20.5Z";
|
|
6175
|
+
const commands = (points) => points.map(([x, y], index) => `${index ? "L" : "M"}${x} ${y}`).join(" ");
|
|
6176
|
+
function pathShape(path) {
|
|
6177
|
+
return path.kind === "polygon" ? {
|
|
6178
|
+
kind: "path",
|
|
6179
|
+
className: path.className,
|
|
6180
|
+
fillRule: path.fillRule,
|
|
6181
|
+
d: path.rings.map((ring) => `${commands(ring)} Z`).join(" ")
|
|
6182
|
+
} : {
|
|
6183
|
+
kind: "path",
|
|
6184
|
+
className: path.className,
|
|
6185
|
+
d: commands(path.points)
|
|
6186
|
+
};
|
|
6187
|
+
}
|
|
6188
|
+
function labelShapes(label) {
|
|
6189
|
+
const [x, y] = label.point, transform = `rotate(${label.angle} ${x} ${y})`;
|
|
6190
|
+
return [label.haloClassName, label.className].map((className) => ({
|
|
6191
|
+
kind: "text",
|
|
6192
|
+
className,
|
|
6193
|
+
x,
|
|
6194
|
+
y,
|
|
6195
|
+
transform,
|
|
6196
|
+
text: label.text
|
|
6197
|
+
}));
|
|
6198
|
+
}
|
|
6199
|
+
/** The drawing the renderer below would show, or null when there's nothing it can draw. */
|
|
6200
|
+
function readableMapDrawing(drawing) {
|
|
6201
|
+
const parsed = mapDrawingSchema.safeParse(drawing);
|
|
6202
|
+
return parsed.success ? parsed.data : null;
|
|
6203
|
+
}
|
|
6204
|
+
/** Untrusted standalone callers retain boundary admission. */
|
|
6205
|
+
function MapDrawingSvg(props) {
|
|
6206
|
+
const drawing = readableMapDrawing(props.drawing);
|
|
6207
|
+
return drawing ? /* @__PURE__ */ jsx(AdmittedMapDrawingSvg, {
|
|
6208
|
+
...props,
|
|
6209
|
+
drawing
|
|
6210
|
+
}) : null;
|
|
6211
|
+
}
|
|
6212
|
+
/** Render an already admitted value without allocating another validation copy. */
|
|
6213
|
+
function AdmittedMapDrawingSvg(props) {
|
|
6214
|
+
const drawing = props.drawing;
|
|
6215
|
+
const name = props.wider ? "wider" : "neighbourhood", frame = drawing.frames[name];
|
|
6216
|
+
const shapes = [
|
|
6217
|
+
{
|
|
6218
|
+
kind: "rect",
|
|
6219
|
+
className: frame.backgroundClass,
|
|
6220
|
+
x: 0,
|
|
6221
|
+
y: 0,
|
|
6222
|
+
width: 800,
|
|
6223
|
+
height: 800
|
|
6224
|
+
},
|
|
6225
|
+
...frame.paths.map(pathShape),
|
|
6226
|
+
...frame.labels.flatMap(labelShapes),
|
|
6227
|
+
{
|
|
6228
|
+
kind: "path",
|
|
6229
|
+
className: frame.pin.className,
|
|
6230
|
+
fillRule: "evenodd",
|
|
6231
|
+
d: PIN_PATH,
|
|
6232
|
+
transform: `translate(${frame.pin.point.join(" ")})`
|
|
6233
|
+
}
|
|
6234
|
+
];
|
|
6235
|
+
return /* @__PURE__ */ jsxs("figure", {
|
|
6236
|
+
className: `rb-map-drawing ${props.className ?? ""}`.trim(),
|
|
6237
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
6238
|
+
className: "rb-map-drawing-crop",
|
|
6239
|
+
style: cropHeightStyle(Math.max(255, props.height ?? 320), props.heightAs ?? "fixed"),
|
|
6240
|
+
children: /* @__PURE__ */ jsx(SvgNode, {
|
|
6241
|
+
className: `map-${name}`,
|
|
6242
|
+
viewBox: frame.viewBox.join(" "),
|
|
6243
|
+
shapes,
|
|
6244
|
+
ariaHidden: false,
|
|
6245
|
+
ariaLabel: props.label ? `Map showing ${props.label}` : "Map showing the arrival pin"
|
|
6246
|
+
})
|
|
6247
|
+
}), /* @__PURE__ */ jsxs("figcaption", { children: ["© ", /* @__PURE__ */ jsx("a", {
|
|
6248
|
+
href: "https://www.openstreetmap.org/copyright",
|
|
6249
|
+
target: "_blank",
|
|
6250
|
+
rel: "noreferrer",
|
|
6251
|
+
children: "OpenStreetMap contributors"
|
|
6252
|
+
})] })]
|
|
6253
|
+
});
|
|
6254
|
+
}
|
|
6255
|
+
function cropHeightStyle(height, heightAs) {
|
|
6256
|
+
return heightAs === "minimum" ? { minHeight: height } : { height };
|
|
6257
|
+
}
|
|
6258
|
+
//#endregion
|
|
6018
6259
|
//#region ../blocks/src/system/runtime/nodes/location-map.view.tsx
|
|
6019
6260
|
function OpeningHoursTable({ hours, lookLayout }) {
|
|
6020
6261
|
if (!hours) return null;
|
|
@@ -7159,7 +7400,7 @@ function viewFromLayout(layout, toRows) {
|
|
|
7159
7400
|
groups: allGroups
|
|
7160
7401
|
};
|
|
7161
7402
|
}
|
|
7162
|
-
default: return assertNever$
|
|
7403
|
+
default: return assertNever$3(layout);
|
|
7163
7404
|
}
|
|
7164
7405
|
}
|
|
7165
7406
|
function buildAppointmentServicesView(input) {
|
|
@@ -7184,7 +7425,7 @@ function categoryViewToListing(view, toRows) {
|
|
|
7184
7425
|
};
|
|
7185
7426
|
case "all":
|
|
7186
7427
|
case "fallback-all": return viewFromLayout(view.layout, toRows);
|
|
7187
|
-
default: return assertNever$
|
|
7428
|
+
default: return assertNever$3(view);
|
|
7188
7429
|
}
|
|
7189
7430
|
}
|
|
7190
7431
|
function AppointmentServiceRows({ rows, RowTitle }) {
|
|
@@ -7332,7 +7573,7 @@ function AppointmentServicesContent({ view, hasSectionHeading, idPrefix }) {
|
|
|
7332
7573
|
hasSectionHeading,
|
|
7333
7574
|
idPrefix
|
|
7334
7575
|
});
|
|
7335
|
-
default: return assertNever$
|
|
7576
|
+
default: return assertNever$3(view);
|
|
7336
7577
|
}
|
|
7337
7578
|
}
|
|
7338
7579
|
function appointmentCardContent(row) {
|
|
@@ -7402,21 +7643,55 @@ const teamMemberCardSchema = z.object({
|
|
|
7402
7643
|
photo: runtimeMediaSchema.refine((value) => value.type === "image").nullish(),
|
|
7403
7644
|
summary: z.string().nullish(),
|
|
7404
7645
|
profilePath: z.string().nullish(),
|
|
7405
|
-
specialties: z.unknown().transform(parseTeamMemberSpecialties)
|
|
7646
|
+
specialties: z.unknown().transform(parseTeamMemberSpecialties),
|
|
7647
|
+
facts: z.array(z.object({
|
|
7648
|
+
label: z.string(),
|
|
7649
|
+
value: z.string()
|
|
7650
|
+
})).nullish()
|
|
7406
7651
|
});
|
|
7407
|
-
/**
|
|
7408
|
-
|
|
7409
|
-
|
|
7410
|
-
|
|
7652
|
+
/**
|
|
7653
|
+
* Staff and manual members meet at one boundary, and this is the one place
|
|
7654
|
+
* that decides what a person's card says and where. Look data chooses the bio's
|
|
7655
|
+
* length, and whether the facts are the person's own quick facts (with the role
|
|
7656
|
+
* above the name, after the bio, and no link to a profile) or the role on its own.
|
|
7657
|
+
*/
|
|
7658
|
+
function teamMemberCards(members, choices = {}) {
|
|
7411
7659
|
return {
|
|
7660
|
+
items: members.map((member, index) => teamMemberCardContent(member, index, choices)),
|
|
7661
|
+
bodyParts: choices.teamFacts === "person" ? [
|
|
7662
|
+
"title",
|
|
7663
|
+
"text",
|
|
7664
|
+
"facts"
|
|
7665
|
+
] : [
|
|
7666
|
+
"title",
|
|
7667
|
+
"facts",
|
|
7668
|
+
"text",
|
|
7669
|
+
"chips",
|
|
7670
|
+
"action"
|
|
7671
|
+
]
|
|
7672
|
+
};
|
|
7673
|
+
}
|
|
7674
|
+
function teamMemberCardContent(member, index, choices) {
|
|
7675
|
+
const biography = cardBiographyFor(member, choices);
|
|
7676
|
+
const role = member.role ? [{
|
|
7677
|
+
label: "Role",
|
|
7678
|
+
value: member.role
|
|
7679
|
+
}] : [];
|
|
7680
|
+
const card = {
|
|
7412
7681
|
id: member.id ?? `member-${index}`,
|
|
7413
7682
|
title: member.name,
|
|
7414
7683
|
media: member.photo,
|
|
7415
|
-
...typeof biography === "string" ? { text: biography } : { textDocument: biography ?? void 0 }
|
|
7416
|
-
|
|
7417
|
-
|
|
7418
|
-
|
|
7419
|
-
|
|
7684
|
+
...typeof biography === "string" ? { text: biography } : { textDocument: biography ?? void 0 }
|
|
7685
|
+
};
|
|
7686
|
+
if (choices.teamFacts === "person") return {
|
|
7687
|
+
...card,
|
|
7688
|
+
eyebrowFacts: role,
|
|
7689
|
+
facts: member.facts ?? []
|
|
7690
|
+
};
|
|
7691
|
+
const href = sanitizeHref(member.profilePath);
|
|
7692
|
+
return {
|
|
7693
|
+
...card,
|
|
7694
|
+
facts: role,
|
|
7420
7695
|
chips: member.specialties,
|
|
7421
7696
|
...href ? { action: {
|
|
7422
7697
|
label: `About ${member.name}`,
|
|
@@ -7424,6 +7699,10 @@ function teamMemberCardContent(member, index, biographySource, cardBiography) {
|
|
|
7424
7699
|
} } : {}
|
|
7425
7700
|
};
|
|
7426
7701
|
}
|
|
7702
|
+
function cardBiographyFor(member, choices) {
|
|
7703
|
+
if (choices.cardBiography === "any") return cardText(teamMemberCardBiography(member));
|
|
7704
|
+
return choices.biographySource === "profile" && member.profileBio ? member.profileBio : member.bio;
|
|
7705
|
+
}
|
|
7427
7706
|
function cardText(biography) {
|
|
7428
7707
|
if (!biography) return null;
|
|
7429
7708
|
return biography.kind === "document" ? biography.document : biography.paragraphs.join("\n\n");
|
|
@@ -7498,18 +7777,13 @@ function TeamMembersNode(props) {
|
|
|
7498
7777
|
...about,
|
|
7499
7778
|
props
|
|
7500
7779
|
});
|
|
7780
|
+
const cards = teamMemberCards(parsed.data, props);
|
|
7501
7781
|
return /* @__PURE__ */ jsx(CardListItems, {
|
|
7502
7782
|
Carousel: props.Carousel,
|
|
7503
|
-
items:
|
|
7783
|
+
items: cards.items,
|
|
7504
7784
|
presentation: {
|
|
7505
7785
|
...props,
|
|
7506
|
-
bodyParts:
|
|
7507
|
-
"title",
|
|
7508
|
-
"facts",
|
|
7509
|
-
"text",
|
|
7510
|
-
"chips",
|
|
7511
|
-
"action"
|
|
7512
|
-
]
|
|
7786
|
+
bodyParts: cards.bodyParts
|
|
7513
7787
|
},
|
|
7514
7788
|
Title: props.sectionHeading?.trim() ? "h3" : "h2",
|
|
7515
7789
|
carouselLabels: {
|
|
@@ -7766,6 +8040,13 @@ const bookingServiceSchema = z.object({
|
|
|
7766
8040
|
buyPackage: z.boolean(),
|
|
7767
8041
|
anyAvailable: z.boolean()
|
|
7768
8042
|
}).optional(),
|
|
8043
|
+
onlinePayments: z.discriminatedUnion("kind", [z.object({ kind: z.literal("available") }), z.object({
|
|
8044
|
+
kind: z.literal("unavailable"),
|
|
8045
|
+
organiserContact: z.object({
|
|
8046
|
+
email: z.string().nullable(),
|
|
8047
|
+
phone: z.string().nullable()
|
|
8048
|
+
}).optional()
|
|
8049
|
+
})]).optional(),
|
|
7769
8050
|
pricing: z.custom().optional(),
|
|
7770
8051
|
priceAmount: z.number().nullable().optional(),
|
|
7771
8052
|
priceCurrency: z.string().nullable().optional(),
|
|
@@ -8171,7 +8452,11 @@ function selectEventDetails(args) {
|
|
|
8171
8452
|
selected,
|
|
8172
8453
|
run,
|
|
8173
8454
|
sessions: run.sessions,
|
|
8174
|
-
timeZone
|
|
8455
|
+
timeZone,
|
|
8456
|
+
depositOffer: resolvePublicEventDepositOffer(selected, {
|
|
8457
|
+
nowIso: args.nowIso,
|
|
8458
|
+
sessions: run.sessions
|
|
8459
|
+
})
|
|
8175
8460
|
};
|
|
8176
8461
|
}
|
|
8177
8462
|
if (!isOrdinaryEvent(selected)) return emptySelection(timeZone);
|
|
@@ -8180,7 +8465,8 @@ function selectEventDetails(args) {
|
|
|
8180
8465
|
mode: mode === "selected" ? "selected" : "next",
|
|
8181
8466
|
selected,
|
|
8182
8467
|
otherDates: otherDates.filter(isOrdinaryEvent),
|
|
8183
|
-
timeZone
|
|
8468
|
+
timeZone,
|
|
8469
|
+
depositOffer: resolvePublicEventDepositOffer(selected, { nowIso: args.nowIso })
|
|
8184
8470
|
};
|
|
8185
8471
|
}
|
|
8186
8472
|
//#endregion
|
|
@@ -8298,7 +8584,8 @@ function formatTicketTypePrice(ticketType, currency) {
|
|
|
8298
8584
|
return formatBookingPriceDisplay(resolveExactOrFreePriceDisplay(ticketType.priceAmount, currency), { decimals: "auto" });
|
|
8299
8585
|
}
|
|
8300
8586
|
function getDisplayablePricingOptions(event) {
|
|
8301
|
-
|
|
8587
|
+
const roomPriceIds = event.rooms?.linkedOptionIds ?? [];
|
|
8588
|
+
return event.pricing.kind === "tiered" ? event.pricing.options.filter(isPublicEventPricingOptionDisplayable).filter((option) => !roomPriceIds.includes(option.id)).sort((left, right) => left.sortOrder - right.sortOrder) : [];
|
|
8302
8589
|
}
|
|
8303
8590
|
function TicketTypePriceList({ ticketTypes, currency }) {
|
|
8304
8591
|
if (ticketTypes.length === 0) return null;
|
|
@@ -8618,7 +8905,8 @@ function EventVenueMap({ venue, drawing, showMap, mapHeight, mapClassName }) {
|
|
|
8618
8905
|
});
|
|
8619
8906
|
}
|
|
8620
8907
|
/** One pricing projection governs the selected panel, including drop-in and whole-series behavior. */
|
|
8621
|
-
function selectedEventPricing(
|
|
8908
|
+
function selectedEventPricing(selection, showCost) {
|
|
8909
|
+
const event = selection.selected;
|
|
8622
8910
|
const isDropIn = isDropInEvent(event);
|
|
8623
8911
|
const wholeSeriesPricing = wholeSeriesPricingOf(event);
|
|
8624
8912
|
const showEventCost = showCost && !isDropIn && wholeSeriesPricing === null;
|
|
@@ -8626,7 +8914,7 @@ function selectedEventPricing(event, showCost) {
|
|
|
8626
8914
|
isDropIn,
|
|
8627
8915
|
wholeSeriesPricingDisplay: showCost ? wholeSeriesPricing : null,
|
|
8628
8916
|
eventCostLabel: showEventCost ? formatEventPrice(event) : null,
|
|
8629
|
-
depositNote: showCost && !isDropIn
|
|
8917
|
+
depositNote: showCost && !isDropIn && isPaid(event) ? formatEventDepositNote(selection.depositOffer) : null,
|
|
8630
8918
|
eventPricingCurrency: publicEventPricingCurrency(event.pricing),
|
|
8631
8919
|
ticketTypes: showEventCost && isPaid(event) ? getDisplayablePricingOptions(event) : []
|
|
8632
8920
|
};
|
|
@@ -8634,14 +8922,13 @@ function selectedEventPricing(event, showCost) {
|
|
|
8634
8922
|
const isDropInEvent = (event) => event.bookingScope === "single_occurrence" && event.requiresRegistration === false;
|
|
8635
8923
|
const wholeSeriesPricingOf = (event) => event.bookingScope === "whole_series" && event.pricing.kind !== "external" ? event.pricing : null;
|
|
8636
8924
|
const isPaid = (event) => publicEventPricingType(event.pricing) !== "free";
|
|
8637
|
-
const paidDepositNote = (event) => isPaid(event) ? formatEventDepositNote(event.pricing, event.paymentTerms, event) : null;
|
|
8638
8925
|
function SelectedEventDetailsView(props) {
|
|
8639
8926
|
const { selection, showVenue, showMap, showOtherDates, showTitle, showDescription, showCapacity, mapHeight, mapClassName, acceptedItems } = props;
|
|
8640
8927
|
const selected = selection.selected;
|
|
8641
8928
|
const venue = showVenue ? selected.venue : void 0;
|
|
8642
8929
|
const online = eventOnlinePlaceShown(selected, showVenue);
|
|
8643
8930
|
const addressAfterBooking = addressAfterBookingShown(selected, showVenue);
|
|
8644
|
-
const pricing = selectedEventPricing(
|
|
8931
|
+
const pricing = selectedEventPricing(selection, props.showCost);
|
|
8645
8932
|
return /* @__PURE__ */ jsxs("div", {
|
|
8646
8933
|
className: "rb-flex rb-flex-col rb-gap-6 rb-text-left",
|
|
8647
8934
|
children: [
|
|
@@ -8772,7 +9059,7 @@ function headerPanelContent(props) {
|
|
|
8772
9059
|
const venue = props.showVenue ? selection.selected.venue : void 0;
|
|
8773
9060
|
const online = eventOnlinePlaceShown(selection.selected, props.showVenue);
|
|
8774
9061
|
const teamMembers = selection.selected.teamMembers ?? [];
|
|
8775
|
-
const pricing = headerPanelPricing(props, selection
|
|
9062
|
+
const pricing = headerPanelPricing(props, selection);
|
|
8776
9063
|
const scheduled = selection.kind === "wholeSeries" ? selection.sessions.length : selection.otherDates.length;
|
|
8777
9064
|
return {
|
|
8778
9065
|
venue,
|
|
@@ -8790,8 +9077,8 @@ function headerPanelContent(props) {
|
|
|
8790
9077
|
* discount, or passes that also admit. Decided from the same projection
|
|
8791
9078
|
* `EventPricingDetails` renders, so a panel is only drawn when it will show something.
|
|
8792
9079
|
*/
|
|
8793
|
-
function headerPanelPricing(props,
|
|
8794
|
-
const pricing = selectedEventPricing(
|
|
9080
|
+
function headerPanelPricing(props, selection) {
|
|
9081
|
+
const pricing = selectedEventPricing(selection, props.showCost ?? true);
|
|
8795
9082
|
if (pricing.isDropIn) return null;
|
|
8796
9083
|
const detail = {
|
|
8797
9084
|
...pricing,
|
|
@@ -9162,7 +9449,7 @@ function OfferingsCatalogue(props) {
|
|
|
9162
9449
|
groups: state.groups,
|
|
9163
9450
|
shape
|
|
9164
9451
|
});
|
|
9165
|
-
default: return assertNever$
|
|
9452
|
+
default: return assertNever$3(state);
|
|
9166
9453
|
}
|
|
9167
9454
|
}
|
|
9168
9455
|
/** The hook the single-offering layout hangs from; absent for several. */
|
|
@@ -9296,7 +9583,7 @@ function catalogueGroupItems(load) {
|
|
|
9296
9583
|
}];
|
|
9297
9584
|
case "empty":
|
|
9298
9585
|
case "failed": return [];
|
|
9299
|
-
default: return assertNever$
|
|
9586
|
+
default: return assertNever$3(load);
|
|
9300
9587
|
}
|
|
9301
9588
|
}
|
|
9302
9589
|
//#endregion
|
|
@@ -9425,7 +9712,7 @@ function renderOfferingsPreview(props, listing, now) {
|
|
|
9425
9712
|
states: listing.groups,
|
|
9426
9713
|
now
|
|
9427
9714
|
});
|
|
9428
|
-
default: return assertNever$
|
|
9715
|
+
default: return assertNever$3(listing);
|
|
9429
9716
|
}
|
|
9430
9717
|
}
|
|
9431
9718
|
function listingMessage(reason, props) {
|
|
@@ -9467,7 +9754,7 @@ function renderOfferingGroupItems(presentation, items, options) {
|
|
|
9467
9754
|
children: items.map((item) => renderOfferingCompactItem(item, options))
|
|
9468
9755
|
})
|
|
9469
9756
|
});
|
|
9470
|
-
default: return assertNever$
|
|
9757
|
+
default: return assertNever$3(presentation, "Unhandled offerings preview presentation");
|
|
9471
9758
|
}
|
|
9472
9759
|
}
|
|
9473
9760
|
function FeaturedOfferingSummary({ item }) {
|
|
@@ -9520,7 +9807,7 @@ function featuredSummaryDetails(item) {
|
|
|
9520
9807
|
deliveryMode: item.run.representative.deliveryMode
|
|
9521
9808
|
}) : null;
|
|
9522
9809
|
}
|
|
9523
|
-
default: return assertNever$
|
|
9810
|
+
default: return assertNever$3(item, "Unhandled offerings preview item");
|
|
9524
9811
|
}
|
|
9525
9812
|
}
|
|
9526
9813
|
function formatFeaturedSummary(summary, place) {
|
|
@@ -9548,7 +9835,7 @@ function formatFeaturedSummary(summary, place) {
|
|
|
9548
9835
|
recurrence: summary.authoredSummary ?? void 0,
|
|
9549
9836
|
sessionCount: `${summary.sessionCount} date${summary.sessionCount === 1 ? "" : "s"}`
|
|
9550
9837
|
});
|
|
9551
|
-
default: return assertNever$
|
|
9838
|
+
default: return assertNever$3(summary, "Unhandled offerings preview schedule summary");
|
|
9552
9839
|
}
|
|
9553
9840
|
}
|
|
9554
9841
|
function detailsFromOccurrences(input) {
|
|
@@ -9923,7 +10210,7 @@ function offeringGroupCards(state, props, dates) {
|
|
|
9923
10210
|
});
|
|
9924
10211
|
case "empty":
|
|
9925
10212
|
case "failed": return /* @__PURE__ */ jsx(EmptyState, { message: listingMessage(state.kind, props) });
|
|
9926
|
-
default: return assertNever$
|
|
10213
|
+
default: return assertNever$3(state);
|
|
9927
10214
|
}
|
|
9928
10215
|
}
|
|
9929
10216
|
/** The existing booking projection owns prices, availability and sold-out/waitlist actions. */
|
|
@@ -10113,7 +10400,7 @@ function bookingActionContent(input) {
|
|
|
10113
10400
|
children: input.buttonText
|
|
10114
10401
|
});
|
|
10115
10402
|
case "unavailable": return null;
|
|
10116
|
-
default: return assertNever$
|
|
10403
|
+
default: return assertNever$3(input.booking);
|
|
10117
10404
|
}
|
|
10118
10405
|
}
|
|
10119
10406
|
function RecurringSchedule({ dateContext = resolveDateRuntimeContext(void 0), schedule, buttonText = "Book", buttonVariant = "primary", showVenue = true, emptyMessage = "Regular schedule details will be added shortly." }) {
|
|
@@ -12546,7 +12833,7 @@ function BookingEntryCard(props) {
|
|
|
12546
12833
|
entry,
|
|
12547
12834
|
...rest
|
|
12548
12835
|
});
|
|
12549
|
-
default: return assertNever$
|
|
12836
|
+
default: return assertNever$3(entry);
|
|
12550
12837
|
}
|
|
12551
12838
|
}
|
|
12552
12839
|
//#endregion
|
|
@@ -13561,7 +13848,7 @@ function previewEditableTargetToPath(target) {
|
|
|
13561
13848
|
case "current-entry-field":
|
|
13562
13849
|
case "current-entry-metadata": return target.path;
|
|
13563
13850
|
case "read-only": return;
|
|
13564
|
-
default: return assertNever$
|
|
13851
|
+
default: return assertNever$3(target);
|
|
13565
13852
|
}
|
|
13566
13853
|
}
|
|
13567
13854
|
function previewEditableTargetToFieldKey(target) {
|
|
@@ -14666,7 +14953,7 @@ function collectNestedPreviewFieldConstraintEntries(field, path) {
|
|
|
14666
14953
|
case "text":
|
|
14667
14954
|
case "time":
|
|
14668
14955
|
case "url": return [];
|
|
14669
|
-
default: return assertNever$
|
|
14956
|
+
default: return assertNever$3(field);
|
|
14670
14957
|
}
|
|
14671
14958
|
}
|
|
14672
14959
|
/** Share the supplied snapshot with transforms and manifest bindings, including standalone components. */
|
|
@@ -15321,7 +15608,7 @@ function offeringsPreviewPhotoCount(listing) {
|
|
|
15321
15608
|
case "by-date": return listing.items.filter(({ item }) => hasPhoto(item)).length;
|
|
15322
15609
|
case "by-course": return listing.groups.reduce((count, load) => count + courseGroupPhotoCount(load), 0);
|
|
15323
15610
|
case "by-type": return listing.groups.reduce((count, load) => count + groupPhotoCount(load), 0);
|
|
15324
|
-
default: return assertNever$
|
|
15611
|
+
default: return assertNever$3(listing);
|
|
15325
15612
|
}
|
|
15326
15613
|
}
|
|
15327
15614
|
function groupPhotoCount(load) {
|
|
@@ -15329,14 +15616,14 @@ function groupPhotoCount(load) {
|
|
|
15329
15616
|
case "empty":
|
|
15330
15617
|
case "failed": return 0;
|
|
15331
15618
|
case "items": return load.items.filter(hasPhoto).length;
|
|
15332
|
-
default: return assertNever$
|
|
15619
|
+
default: return assertNever$3(load);
|
|
15333
15620
|
}
|
|
15334
15621
|
}
|
|
15335
15622
|
function hasPhoto(item) {
|
|
15336
15623
|
switch (item.kind) {
|
|
15337
15624
|
case "event": return Boolean(item.event.presentation?.image);
|
|
15338
15625
|
case "run": return Boolean(item.run.representative.presentation?.image);
|
|
15339
|
-
default: return assertNever$
|
|
15626
|
+
default: return assertNever$3(item);
|
|
15340
15627
|
}
|
|
15341
15628
|
}
|
|
15342
15629
|
function courseGroupPhotoCount(load) {
|
|
@@ -16163,6 +16450,10 @@ function requireEntryBlockOverride(entry, themeResources) {
|
|
|
16163
16450
|
function pageEndingAttribute(flow, position) {
|
|
16164
16451
|
return flow === "main" && (position === "last" || position === "only") ? "" : void 0;
|
|
16165
16452
|
}
|
|
16453
|
+
/** The block's stored identifier, emitted as its section `id` so `#identifier` links land on it. */
|
|
16454
|
+
function blockAnchorId(block) {
|
|
16455
|
+
return block.identifier || void 0;
|
|
16456
|
+
}
|
|
16166
16457
|
/**
|
|
16167
16458
|
* Renders one planned block: its wrapper, style-group data attributes,
|
|
16168
16459
|
* boundary reserve space and the join markup that follows it.
|
|
@@ -16212,6 +16503,7 @@ function renderPlanEntry(input) {
|
|
|
16212
16503
|
after: joinAfter
|
|
16213
16504
|
});
|
|
16214
16505
|
const blockElement = /* @__PURE__ */ jsx("div", {
|
|
16506
|
+
id: blockAnchorId(block),
|
|
16215
16507
|
className: wrapperClassName,
|
|
16216
16508
|
...arrangementHooksFromContent(renderableContent),
|
|
16217
16509
|
"data-block": cleanKind,
|
|
@@ -16747,7 +17039,7 @@ function solvedInksForThemeRuntime(themeRuntime) {
|
|
|
16747
17039
|
case "cms-theme": return "publish";
|
|
16748
17040
|
case "responsive-only":
|
|
16749
17041
|
case "none": return "withhold";
|
|
16750
|
-
default: return assertNever$
|
|
17042
|
+
default: return assertNever$3(themeRuntime);
|
|
16751
17043
|
}
|
|
16752
17044
|
}
|
|
16753
17045
|
function renderWithSdkThemeRuntime({ themeRuntime, theme, children }) {
|
|
@@ -16762,7 +17054,7 @@ function renderWithSdkThemeRuntime({ themeRuntime, theme, children }) {
|
|
|
16762
17054
|
children
|
|
16763
17055
|
});
|
|
16764
17056
|
case "none": return /* @__PURE__ */ jsx(Fragment, { children });
|
|
16765
|
-
default: return assertNever$
|
|
17057
|
+
default: return assertNever$3(themeRuntime);
|
|
16766
17058
|
}
|
|
16767
17059
|
}
|
|
16768
17060
|
function renderWithOverrideOnlyRuntime({ runtime, children }) {
|
|
@@ -16772,7 +17064,7 @@ function renderWithOverrideOnlyRuntime({ runtime, children }) {
|
|
|
16772
17064
|
children
|
|
16773
17065
|
});
|
|
16774
17066
|
case "none": return /* @__PURE__ */ jsx(Fragment, { children });
|
|
16775
|
-
default: return assertNever$
|
|
17067
|
+
default: return assertNever$3(runtime);
|
|
16776
17068
|
}
|
|
16777
17069
|
}
|
|
16778
17070
|
//#endregion
|