@riverbankcms/sdk 0.164.0 → 0.166.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_dts/{BlocksIslandsHydrator-CubPwupc.d.ts → BlocksIslandsHydrator-CPvN6RBW.d.ts} +1 -1
- package/dist/_dts/{Page-CDzsagB2.d.ts → Page-rW0xgQCA.d.ts} +18 -256
- package/dist/_dts/{SdkPreviewMode-CPRQbRCI.d.ts → SdkPreviewMode-BWZh2WCk.d.ts} +107 -72
- package/dist/_dts/{client-CbeYTSry.d.ts → client-D4BXQEZc.d.ts} +5 -1
- package/dist/_dts/{content-types--uYRIcIF.d.ts → content-types-MUzta0l9.d.ts} +3 -3
- package/dist/_dts/{contracts-DJQYAOsv.d.ts → contracts-Cl9Xh1DO.d.ts} +4 -4
- package/dist/_dts/{footerPageOutline-CKkhBwgJ.d.ts → footerPageOutline-4BgLKehl.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata--qd7NCIA.d.ts → generatePageMetadata-BsmJ0qKh.d.ts} +2 -2
- package/dist/_dts/{index-wegfy7lf.d.ts → index--qflsCiy.d.ts} +4 -3
- package/dist/_dts/{index-CjdIn9-_.d.ts → index-BgJ2aU5c.d.ts} +2 -2
- package/dist/_dts/{index-BZE-1azr.d.ts → index-Bmboeb49.d.ts} +2 -2
- package/dist/_dts/{index-BpEbwDM7.d.ts → index-DdcwPqQN.d.ts} +4 -4
- package/dist/_dts/{index-DriYVLfT.d.ts → index-ahxQCUc7.d.ts} +2 -2
- package/dist/_dts/{index-DYQFmf--.d.ts → index-kQ5xkM6X.d.ts} +1 -1
- package/dist/_dts/{index-JS8WYgD3.d.ts → index-mMMvLLAJ.d.ts} +2996 -3079
- package/dist/_dts/{index-D_pQO-AS.d.ts → index-wbBZ0awa.d.ts} +49398 -48202
- package/dist/_dts/{loadContent-DUi94Qfk.d.ts → loadContent-BG5IAV-V.d.ts} +9 -6
- package/dist/_dts/resolveBlockData-Cmcle_zV.d.ts +136 -0
- package/dist/_dts/{resolvePageContent-JDE0ry6T.d.ts → resolvePageContent-BRJUTFoH.d.ts} +3 -2
- 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 +9 -6
- 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 +20 -0
- package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +2 -0
- package/dist/_dts/sdk/src/data/types.d.ts +54 -0
- 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 +2 -2
- package/dist/_dts/sdk/src/next/index.d.ts +9 -8
- package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
- package/dist/_dts/sdk/src/page-converter/index.d.ts +36 -48
- package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
- 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 +2 -0
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +3 -0
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +257 -0
- package/dist/_dts/sdk/src/rendering/index.d.ts +8 -7
- package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +3 -3
- package/dist/_dts/{themeAdmission-D_qtGYAT.d.ts → sdk/src/rendering/themeAdmission.d.ts} +3 -1
- package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
- package/dist/_dts/sdk/src/server.d.ts +7 -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/{types-DiciZDrk.d.ts → types-BX3Y-EW3.d.ts} +3 -3
- package/dist/_dts/{types-DubJnBnI.d.ts → types-DF54stxv.d.ts} +8 -7
- package/dist/_dts/{types-W40f2olO.d.ts → types-DuiHLiPo.d.ts} +2 -2
- package/dist/_dts/{validation-BF4_zNkR.d.ts → validation-Bxi0f81D.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-64hFxF02.mjs → BlocksIslandsHydrator-DwiRGtgh.mjs} +31 -24
- package/dist/client/{BookingMailingListNote-CSQyFm9J.mjs → BookingMailingListNote-DOWOZYlK.mjs} +2 -2
- package/dist/client/{CalendarNavigationChevron-Bvkx8Z7Y.mjs → CalendarNavigationChevron-5a0x0vcC.mjs} +7 -7
- package/dist/client/{CheckboxChoice-3PhxDxgR.mjs → CheckboxChoice-CZ-anOqV.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-pt2xXBQp.mjs → DemoBookingPortalAccess-B2qLkPRB.mjs} +6 -6
- package/dist/client/{DemoPortalSignInLink-Qw780EfW.mjs → DemoPortalSignInLink-B9YrzZt2.mjs} +1 -1
- package/dist/client/{EventCalendar.client-DWoboRW5.mjs → EventCalendar.client-BhADnDCg.mjs} +17 -10
- package/dist/client/{EventCombined.client-C98ucpcP.mjs → EventCombined.client-jik34zTb.mjs} +8 -8
- package/dist/client/{EventEmbeddedCheckoutStep-DHRlFfkp.mjs → EventEmbeddedCheckoutStep-D_14yqAU.mjs} +27 -2
- package/dist/client/{EventItem-hrSyTApW.mjs → EventItem-CMKrtkT7.mjs} +33 -12
- package/dist/client/{EventListWeekNavigation-C3t7H13W.mjs → EventListWeekNavigation-AGHjxy6C.mjs} +1 -1
- package/dist/client/{EventListing.client-Cp11sBX_.mjs → EventListing.client-DZeDM0Qt.mjs} +3 -3
- package/dist/client/{EventListing.view-Dd5QHIAf.mjs → EventListing.view-3BBRdNVa.mjs} +70 -15
- package/dist/client/{EventRegistrationPayment-ByT88VHR.mjs → EventRegistrationPayment-CpNcpga4.mjs} +108 -11
- package/dist/client/{LocationMapActions-BsepG5Vv.mjs → LocationMapActions-D5-H9ooQ.mjs} +2 -2
- package/dist/client/{MapDrawingSvg-R4JMT4yd.mjs → MapDrawingSvg-C30geMl-.mjs} +1 -1
- package/dist/client/{Page-Dub71o3c.mjs → Page-DNDZLRlB.mjs} +3388 -11530
- package/dist/client/{ProtectedSubmitButton-DGbgGvdh.mjs → ProtectedSubmitButton-8DuDw2ag.mjs} +1 -1
- package/dist/client/{SpamProtectionWidget-CRsKTQV-.mjs → SpamProtectionWidget-CCF6YLUX.mjs} +5 -3
- package/dist/client/{StepIndicator-Bp7MyutT.mjs → StepIndicator-Bin7YR0A.mjs} +3 -3
- package/dist/client/{TabBarFragment-C4WJyybx.mjs → TabBarFragment-_IAthZVM.mjs} +1 -1
- package/dist/client/{ThemedButton-BGVwNwE-.mjs → ThemedButton-8jUc02mZ.mjs} +64 -2
- package/dist/client/{accordion-vCG_JC5t.mjs → accordion-uVqNowRX.mjs} +1 -1
- package/dist/client/{altchaProtection-BWchRM3v.mjs → altchaProtection-DjIV9A5n.mjs} +1 -1
- package/dist/client/{booking-form.client-CHTbcZJM.mjs → booking-form.client-w-PvyWBv.mjs} +19 -14
- package/dist/client/{bookingForm-BxbUbzUr.mjs → bookingForm-DNMojb6A.mjs} +4 -4
- package/dist/client/bookings.mjs +6 -6
- package/dist/client/{carousel-FM1mkkL0.mjs → carousel-C8kxI3Dm.mjs} +2 -2
- package/dist/client/{carousel.client-ChoLiWwD.mjs → carousel.client-BO7sCEpH.mjs} +1 -1
- package/dist/client/{cart-BDFhbh9j.mjs → cart-DCxjE3Is.mjs} +3 -3
- package/dist/client/{cart.client-x3HOke6T.mjs → cart.client-Ceeng8fB.mjs} +1 -1
- package/dist/client/{checkout-BibhwnTd.mjs → checkout-B0EKbeVv.mjs} +3 -3
- package/dist/client/{checkout.client-CE4jUi0G.mjs → checkout.client-DtPj3fYk.mjs} +1 -1
- package/dist/client/client.mjs +9465 -15
- package/dist/client/{context-BNAM7NsW.mjs → context-n6IZigd3.mjs} +8 -6
- package/dist/client/cta-CDeAwYoN.mjs +121 -0
- package/dist/client/{dateFormatting-QwBSo0hK.mjs → dateFormatting-BWPzdeZE.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-NwKJk6gn.mjs → demoPortalMagicLink-BdXu0fj-.mjs} +1 -1
- package/dist/client/{enhanceHeaderSection-D4zqEBDl.mjs → enhanceHeaderSection-VHfv8M6-.mjs} +3 -3
- package/dist/client/{event-details.client-jFyFjOIC.mjs → event-details.client-Cfr1_Cj4.mjs} +2 -2
- package/dist/client/{event-registration.client-BK_jVv3R.mjs → event-registration.client-BhygihpQ.mjs} +43 -17
- package/dist/client/{eventCalendar-DSkzejQh.mjs → eventCalendar-B4XCL9u6.mjs} +4 -4
- package/dist/client/{eventCombined-BG-BEaYh.mjs → eventCombined-DVjz4wdf.mjs} +4 -4
- package/dist/client/{eventDetails-BhIwXAKe.mjs → eventDetails-B0DA1Nw1.mjs} +2 -2
- package/dist/client/{eventListing-DQtyO1Xj.mjs → eventListing-2-xjn2nz.mjs} +4 -4
- package/dist/client/{eventRegistration-DRTz8X0M.mjs → eventRegistration-ng4iGo9O.mjs} +4 -4
- package/dist/client/{form-GXqjObPC.mjs → form-BeNQiZ2V.mjs} +3 -3
- package/dist/client/{form.client-CoKNba2e.mjs → form.client-BFdCKlp7.mjs} +7 -7
- package/dist/client/{form.parts-magB_epJ.mjs → form.parts-C7gLK3jh.mjs} +3 -3
- package/dist/client/{formatDate-BiloOyjS.mjs → formatDate-CWfelfMt.mjs} +1 -1
- package/dist/client/gifting/client.mjs +4 -5
- package/dist/client/{headerSection-BMQCPHT3.mjs → headerSection-CalNAShx.mjs} +2 -2
- package/dist/client/{mediaAssets-BX-vWwQc.mjs → mediaAssets-DpPauppt.mjs} +1 -1
- package/dist/client/{mediaContext-CdqGYlWl.mjs → mediaContext-BLo4NtjP.mjs} +25 -19
- package/dist/client/{newsletter-form.client-8orCez1z.mjs → newsletter-form.client-Dq7GHGXU.mjs} +9 -9
- package/dist/client/{newsletter-form.parts-D8NgHY_F.mjs → newsletter-form.parts-BSMDYQiS.mjs} +2 -2
- package/dist/client/{newsletterForm-BhBNsS3n.mjs → newsletterForm-snzZ4L6i.mjs} +3 -3
- package/dist/client/{noop-C2vZse15.mjs → noop-D-RG9eR3.mjs} +399 -169
- package/dist/client/portal/client.mjs +13 -14
- package/dist/client/{product-detail.client-CQ0k0fbH.mjs → product-detail.client-Gu0INDb7.mjs} +1 -1
- package/dist/client/{product-list.client-Xlr1P0x9.mjs → product-list.client-BmH40fNf.mjs} +1 -1
- package/dist/client/{productDetail-BsCao6X4.mjs → productDetail-DsPUmJ0z.mjs} +3 -3
- package/dist/client/{productList-Cc-PmbEe.mjs → productList-DjGrjOwD.mjs} +3 -3
- package/dist/client/{propsDecoder-DikkDJ9x.mjs → propsDecoder-kTVPMnfD.mjs} +4 -4
- package/dist/client/{registry.server-BpLZo3bC.mjs → registry.server-CKK_RXZo.mjs} +350 -424
- package/dist/client/rendering/client.mjs +29 -28
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +70 -8
- package/dist/client/{richText-coerce-WuMYrBm3.mjs → richText-coerce-BcjTX-7h.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-DNx6b07x.mjs → routeIslandApiConfig-CaXesATK.mjs} +1 -1
- package/dist/client/{shop-DyXtB5TD.mjs → shop-DLufMauE.mjs} +3 -3
- package/dist/client/{shop-commerce-xjWH7-Ym.mjs → shop-commerce-BxYYXLNK.mjs} +12 -12
- package/dist/client/{shop-commerce-store-CbBsS1kD.mjs → shop-commerce-store-Dp3Nl5YK.mjs} +1 -1
- package/dist/client/{shop.client-QOKqQPgK.mjs → shop.client-CBy9_alG.mjs} +13 -13
- package/dist/client/{shop.interactive-BQdm441g.mjs → shop.interactive-BM0NRsFQ.mjs} +265 -24
- package/dist/client/{shopShared-CyW6MU48.mjs → shopShared-lS23OQE-.mjs} +2 -2
- package/dist/client/site-styles-D8jEPGxA.mjs +3 -0
- package/dist/{preview-next/client/ThemedButton-g7NPrsGp.mjs → client/site-styles-DELkUk9s.mjs} +25654 -17259
- package/dist/client/spam-protection.mjs +2 -2
- package/dist/client/src-DjnxOjXG.mjs +217 -0
- package/dist/client/surfaceTransportMarker-BXepAVF6.mjs +152 -0
- package/dist/client/{timetableModel-BgdkhRuA.mjs → timetableModel-DzRWikCU.mjs} +157 -139
- package/dist/client/types-sF-IrGQr.mjs +633 -0
- package/dist/client/{useAvailableSlots-wmdo6uZ8.mjs → useAvailableSlots-C3LphWDX.mjs} +8 -5
- package/dist/client/{useBookingNowIso-CUExAee1.mjs → useBookingNowIso-Da-f9iHw.mjs} +1 -1
- package/dist/client/{useDiscountApply-BRM-OoTN.mjs → useDiscountApply-SLoWhcen.mjs} +3 -3
- package/dist/client/{useDiscountCodeUi-BEIvL31G.mjs → useDiscountCodeUi-D6a2BJij.mjs} +1 -1
- package/dist/client/{useEventPagination-Dk3g64we.mjs → useEventPagination-Ccr4TZlm.mjs} +12 -159
- package/dist/client/{view-BnaOmrap.mjs → view-8w4GA8rf.mjs} +4 -4
- package/dist/client/{view-vhKGFfC3.mjs → view-DAVEoe8A.mjs} +310 -247
- package/dist/client/{wizardSteps-xqU4q63H.mjs → wizardSteps-DNpajrAH.mjs} +495 -173
- package/dist/preview-next/before-render.mjs +4 -141
- package/dist/preview-next/client/ArrangementLookControls-DY5TzhEa.mjs +31197 -0
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-43wIAWr4.mjs → EventEmbeddedCheckoutStep-C_h1cMYm.mjs} +33 -4
- package/dist/preview-next/client/{LocationPickerEnvironment-QtSG2Bl-.mjs → LocationPickerEnvironment-D56RD3e_.mjs} +1 -1
- package/dist/preview-next/client/{MapLibreEditMap-B-rohNcG.mjs → MapLibreEditMap-DFnyCckr.mjs} +2 -2
- package/dist/preview-next/client/PreviewEditorSidebar-DdnhmdFO.mjs +37049 -0
- package/dist/preview-next/client/PreviewEditorUI-C7ZmYE33.mjs +1189 -0
- package/dist/preview-next/client/PreviewShell-DnO38NaL.mjs +4707 -0
- package/dist/preview-next/client/SdkPreviewModeRuntime-D2OtoRMB.mjs +4258 -0
- package/dist/preview-next/client/SiteChromeCustomizeButton-eIu2RejJ.mjs +71144 -0
- package/dist/preview-next/client/ThemedButton-C0dgGJ5k.mjs +2006 -0
- package/dist/preview-next/client/{lucide-react-CA9cpo0P.mjs → lucide-react-CPBCf6QT.mjs} +15 -2
- package/dist/preview-next/client/previewAssistantSlot-Bp1AlAxx.mjs +110560 -0
- package/dist/preview-next/client/previewChromeSurface-D2cREDJ5.mjs +190 -0
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/sdk-runtime-DK0PUhLL.mjs +5 -0
- package/dist/preview-next/client/useAutosaveStatus--Pw8vnef.mjs +138 -0
- package/dist/preview-next/client/useBlockCustomizeControls-C1Rl73N4.mjs +2724 -0
- package/dist/preview-next/client/useOpenBlockForSetup-CL3842FM.mjs +28 -0
- package/dist/preview-next/keepAlive.mjs +27 -4
- package/dist/preview-next/middleware.mjs +2 -2
- package/dist/preview-next/{route-contract-D5tHZEz5.mjs → route-contract-Bq7SUX3K.mjs} +143 -126
- package/dist/preview-next/{session-P1R_ajT7.mjs → session-DU6zpYUQ.mjs} +1 -1
- package/dist/preview-next/session.mjs +1 -1
- package/dist/server/{Block.shared-Iy7g11iP.mjs → Block.shared-wXr7Iwhs.mjs} +7 -4
- package/dist/server/{src-cbbK3Bho.mjs → ThemeScopeCore-BI2mld9R.mjs} +1153 -2523
- package/dist/server/accessibleSurfaces-CuN8U_iU.mjs +2102 -0
- package/dist/server/{bindings-BVJGgUT0.mjs → bindings-DjdUq9FR.mjs} +2 -3
- package/dist/server/{publicProducts-D3Fc5TKk.mjs → client-07UeMDzA.mjs} +2492 -357
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +33 -2
- package/dist/server/data/dataLoaderContext.mjs +2 -0
- package/dist/server/data/resolveBlockData.mjs +2 -0
- package/dist/server/data/types.mjs +1 -0
- package/dist/server/dataLoaderContext-B3fXA54R.mjs +47 -0
- package/dist/server/identity-Bn9OQiT1.mjs +6 -0
- package/dist/server/index.mjs +3 -3
- package/dist/server/{loadContent-BuintpdO.mjs → loadContent-ClpaSlBb.mjs} +6 -5
- package/dist/server/{loadPage-Dk4wea8M.mjs → loadPage-BwtVqpaA.mjs} +4 -2
- package/dist/server/manifest.mjs +1 -1
- package/dist/server/media-DnlczCMA.mjs +231 -0
- package/dist/server/mode-Cv_TG9gP.mjs +63 -0
- package/dist/server/next/middleware.mjs +1 -1
- package/dist/server/next/revalidate.mjs +1 -1
- package/dist/server/next.mjs +13 -13
- package/dist/server/opaqueSurface-3YSDPtDe.mjs +54 -0
- package/dist/server/{overrideResolution-BDiQWM7D.mjs → overrideResolution-Du_w3LY4.mjs} +2 -1
- package/dist/server/overrides-CD4d-1w7.mjs +177 -0
- package/dist/server/page-converter.mjs +243 -91
- package/dist/server/pageRenderPlan-BShULdc2.mjs +4055 -0
- package/dist/server/{themeAdmission-BdY8lP-K.mjs → pageRuntimeSupport-C4Dh5-mB.mjs} +13 -28
- package/dist/server/{overrides-DVemf-GV.mjs → pageShared-HdKFBpaX.mjs} +3594 -1726
- package/dist/server/parseThemeForPersistence-CJMrEkze.mjs +52 -0
- package/dist/server/{prebuild-DubLNgRH.mjs → prebuild-Cl-bkaMA.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/prefetchBlockData-C4yUmz-r.mjs +786 -0
- package/dist/server/publicProducts-W9hDRwjz.mjs +64 -0
- package/dist/server/{registry-zjd1P2Dl.mjs → registry-TFPJdGQi.mjs} +20901 -792
- package/dist/server/rendering/components/pageShared.mjs +2 -0
- package/dist/server/rendering/helpers/loadPage.mjs +2 -0
- package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +2 -0
- package/dist/server/rendering/server.mjs +5 -4
- package/dist/server/rendering/themeAdmission.mjs +2 -0
- package/dist/server/rendering.mjs +11 -10
- package/dist/server/repeaterFields-MIz7r1ez.mjs +9 -0
- package/dist/server/{resolveBlockData-CZJ--nH6.mjs → resolveBlockData-OHlOXlOE.mjs} +6 -48
- package/dist/server/resolveButtonColourStates-lry2ORwX.mjs +2672 -0
- package/dist/server/{richTextSchema-YYc85FX4.mjs → richTextSchema-Euhuj-7V.mjs} +26 -1
- package/dist/server/routing.mjs +1 -1
- package/dist/server/schema-C2PqHrMo.mjs +2523 -0
- package/dist/server/server.mjs +3 -3
- package/dist/server/theme-bridge.mjs +1031 -1
- package/dist/server/theme.mjs +2 -1
- package/dist/server/themeAdmission-DGSAlFUK.mjs +18 -0
- package/dist/server/{three-pass-converter-Chnb1XD-.mjs → three-pass-converter-_j2UE2tR.mjs} +1 -1
- package/dist/server/validation-CDd6m8Ry.mjs +140 -0
- package/dist/server/{validation-CGH-Xs4E.mjs → validation-DIBFZeMB.mjs} +419 -3
- package/dist/server/{version-DoOG6F13.mjs → version-DZWZM1H6.mjs} +1 -1
- package/dist/styles/index.css +924 -10
- package/package.json +39 -1
- package/dist/_dts/previewCompiler-BVVgDSdq.d.ts +0 -1
- package/dist/client/cta-ChiN1Vgg.mjs +0 -80
- package/dist/client/purchase-BMsWpx8y.mjs +0 -894
- package/dist/client/schema-DMUkBtIO.mjs +0 -15915
- package/dist/client/site-styles-BLHYJ8S7.mjs +0 -12339
- package/dist/client/src-VIsPY-kw.mjs +0 -62
- package/dist/preview-next/client/PreviewEditorSidebar-C3AQVxQt.mjs +0 -5441
- package/dist/preview-next/client/PreviewEditorUI-C-1zDCR_.mjs +0 -756
- package/dist/preview-next/client/SdkPreviewModeRuntime-B47yHFL0.mjs +0 -9130
- package/dist/preview-next/client/SdkPreviewModeRuntime-C6Rhm2NQ.mjs +0 -3
- package/dist/preview-next/client/previewAuthStore-By_zfrS5.mjs +0 -212195
- package/dist/preview-next/client/previewChromeSurface-Cjwxv90x.mjs +0 -85
- package/dist/preview-next/client/result-BjJUoxUF.mjs +0 -16
- package/dist/preview-next/client/sdk-runtime-BG2HYvQj.mjs +0 -4
- package/dist/preview-next/client/siteStyleAccess-BiSyYyyr.mjs +0 -14178
- package/dist/preview-next/client/spinner-DnWpeDp2.mjs +0 -67
- package/dist/preview-next/refresh-contract-uQ6BXgLJ.mjs +0 -25
- package/dist/server/bindings-Dgt_0goJ.mjs +0 -17
- package/dist/server/client-CiKaE8ms.mjs +0 -2330
- package/dist/server/effectiveNavLinkStyle-EDSdd_oK.mjs +0 -11574
- package/dist/server/loadPage-BwjncpJf.mjs +0 -2
- package/dist/server/prefetchBlockData-Bnbwoe5n.mjs +0 -4156
- package/dist/server/schema-BlTWmTSl.mjs +0 -16142
- package/dist/server/site-styles-yHytcXIB.mjs +0 -768
- package/dist/server/siteChromeOverlayClearance-D0uCNZ7E.mjs +0 -802
|
@@ -1,9 +1,173 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { h as ok, m as err, p as parseUuidBrand } from "./surfaceTransportMarker-BXepAVF6.mjs";
|
|
3
|
+
import { Ta as runtimeMediaSchema, Tr as arrangementModes } from "./site-styles-DELkUk9s.mjs";
|
|
2
4
|
import { c as addMonths } from "./src-1PJxc8KO.mjs";
|
|
3
|
-
import { Mr as err, Nr as ok, _t as arrangementModes, sr as runtimeMediaSchema, xr as parseSiteTermsVersionId } from "./schema-DMUkBtIO.mjs";
|
|
4
|
-
import { h as validateBookingPaymentOptionKinds, s as confirmationPaymentSchema } from "./purchase-BMsWpx8y.mjs";
|
|
5
|
-
import "./site-styles-BLHYJ8S7.mjs";
|
|
6
5
|
import { z } from "zod";
|
|
6
|
+
//#region ../core/src/branded/customers.ts
|
|
7
|
+
const unsafeAsSiteTermsVersionId = (id) => id;
|
|
8
|
+
const parseSiteTermsVersionId = (value) => parseUuidBrand(value, unsafeAsSiteTermsVersionId);
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region ../core/src/currency-format.ts
|
|
11
|
+
const CURRENCY_LOCALE_BY_CODE = {
|
|
12
|
+
USD: "en-US",
|
|
13
|
+
GBP: "en-GB",
|
|
14
|
+
EUR: "de-DE",
|
|
15
|
+
AUD: "en-AU",
|
|
16
|
+
CAD: "en-CA",
|
|
17
|
+
NZD: "en-NZ",
|
|
18
|
+
JPY: "ja-JP",
|
|
19
|
+
CNY: "zh-CN",
|
|
20
|
+
CHF: "de-CH"
|
|
21
|
+
};
|
|
22
|
+
function resolveCurrencyLocale(currencyCode, override) {
|
|
23
|
+
return override ?? CURRENCY_LOCALE_BY_CODE[currencyCode] ?? "en";
|
|
24
|
+
}
|
|
25
|
+
function fractionDigitsFor(decimals, exactFormatter, amount) {
|
|
26
|
+
switch (decimals) {
|
|
27
|
+
case "exact": return {};
|
|
28
|
+
case "auto": return exactFormatter.formatToParts(amount).find((part) => part.type === "fraction")?.value === exactFormatter.formatToParts(0).find((part) => part.type === "fraction")?.value ? {
|
|
29
|
+
minimumFractionDigits: 0,
|
|
30
|
+
maximumFractionDigits: exactFormatter.resolvedOptions().maximumFractionDigits
|
|
31
|
+
} : {};
|
|
32
|
+
case "whole": return {
|
|
33
|
+
minimumFractionDigits: 0,
|
|
34
|
+
maximumFractionDigits: 0
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The single currency-amount formatter for the product: minor units in,
|
|
40
|
+
* localized string out.
|
|
41
|
+
*
|
|
42
|
+
* The locale is derived from the currency by default, so output is deterministic
|
|
43
|
+
* across server and client (no SSR/hydration mismatch). All other money
|
|
44
|
+
* formatters in the codebase should delegate here rather than constructing their
|
|
45
|
+
* own `Intl.NumberFormat`.
|
|
46
|
+
*/
|
|
47
|
+
function formatCurrencyAmount(amountCents, currency, options) {
|
|
48
|
+
return formatCurrencyMajorUnits(amountCents / 100, currency, options);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* `formatCurrencyAmount` for an amount already in MAJOR units (29.99 = £29.99),
|
|
52
|
+
* such as a registrar price. Prefer minor units everywhere else.
|
|
53
|
+
*/
|
|
54
|
+
function formatCurrencyMajorUnits(amount, currency, options) {
|
|
55
|
+
const currencyCode = currency.toUpperCase();
|
|
56
|
+
const locale = resolveCurrencyLocale(currencyCode, options?.locale);
|
|
57
|
+
try {
|
|
58
|
+
const exactFormatter = new Intl.NumberFormat(locale, {
|
|
59
|
+
style: "currency",
|
|
60
|
+
currency: currencyCode
|
|
61
|
+
});
|
|
62
|
+
return new Intl.NumberFormat(locale, {
|
|
63
|
+
style: "currency",
|
|
64
|
+
currency: currencyCode,
|
|
65
|
+
...fractionDigitsFor(options?.decimals ?? "exact", exactFormatter, amount)
|
|
66
|
+
}).format(amount);
|
|
67
|
+
} catch {
|
|
68
|
+
return `${amount.toFixed(2)} ${currencyCode}`;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
/** Gift-card copy retains pence only when the amount has a fractional part. */
|
|
72
|
+
function formatGiftCardAmountLabel(amountCents, currency = "GBP") {
|
|
73
|
+
return formatCurrencyAmount(amountCents, currency, {
|
|
74
|
+
locale: "en-GB",
|
|
75
|
+
decimals: amountCents % 100 === 0 ? "whole" : "exact"
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region ../core/src/money-input.ts
|
|
80
|
+
function unsafeAsCents(value) {
|
|
81
|
+
return value;
|
|
82
|
+
}
|
|
83
|
+
function unsafeAsNonNegativeCents(value) {
|
|
84
|
+
return value;
|
|
85
|
+
}
|
|
86
|
+
function unsafeAsPositiveCents(value) {
|
|
87
|
+
return value;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Normalizes a derived amount to non-negative whole cents. This intentionally
|
|
91
|
+
* clamps negatives to zero; use parseNonNegativeCents for validation.
|
|
92
|
+
*/
|
|
93
|
+
function toNonNegativeCents(value) {
|
|
94
|
+
return unsafeAsNonNegativeCents(Math.max(0, Math.trunc(value)));
|
|
95
|
+
}
|
|
96
|
+
function parseCents(value) {
|
|
97
|
+
if (!Number.isFinite(value)) return err({ kind: "invalid-number" });
|
|
98
|
+
if (!Number.isInteger(value)) return err({ kind: "not-whole-cents" });
|
|
99
|
+
return ok(unsafeAsCents(value));
|
|
100
|
+
}
|
|
101
|
+
function parseNonNegativeCents(value) {
|
|
102
|
+
const parsed = parseCents(value);
|
|
103
|
+
if (!parsed.ok) return parsed;
|
|
104
|
+
if (parsed.value < 0) return err({ kind: "negative" });
|
|
105
|
+
return ok(unsafeAsNonNegativeCents(parsed.value));
|
|
106
|
+
}
|
|
107
|
+
function parsePositiveCents(value) {
|
|
108
|
+
const parsed = parseNonNegativeCents(value);
|
|
109
|
+
if (!parsed.ok) return parsed;
|
|
110
|
+
if (parsed.value === 0) return err({ kind: "zero-not-allowed" });
|
|
111
|
+
return ok(unsafeAsPositiveCents(parsed.value));
|
|
112
|
+
}
|
|
113
|
+
function normalizeMoneyInput(value, options) {
|
|
114
|
+
return (options.stripFormatting === true ? value.replace(/[^0-9.-]/g, "") : value).trim();
|
|
115
|
+
}
|
|
116
|
+
function parseFiniteMoneyAmount(value, options) {
|
|
117
|
+
const normalized = normalizeMoneyInput(value, options);
|
|
118
|
+
if (normalized.length === 0) return err({ kind: "empty" });
|
|
119
|
+
const amount = Number(normalized);
|
|
120
|
+
if (!Number.isFinite(amount)) return err({ kind: "invalid-number" });
|
|
121
|
+
return ok(amount);
|
|
122
|
+
}
|
|
123
|
+
function roundMoneyAmountToCents(amount) {
|
|
124
|
+
return Math.round(amount * 100);
|
|
125
|
+
}
|
|
126
|
+
function parsePositiveMoneyInputToCents(value, options = {}) {
|
|
127
|
+
const parsed = parseFiniteMoneyAmount(value, options);
|
|
128
|
+
if (!parsed.ok) return parsed;
|
|
129
|
+
if (parsed.value < 0) return err({ kind: "negative" });
|
|
130
|
+
const amountCents = roundMoneyAmountToCents(parsed.value);
|
|
131
|
+
if (amountCents <= 0) return err({ kind: "zero-not-allowed" });
|
|
132
|
+
return ok(unsafeAsPositiveCents(amountCents));
|
|
133
|
+
}
|
|
134
|
+
//#endregion
|
|
135
|
+
//#region ../core/src/booking-payment-options.ts
|
|
136
|
+
/**
|
|
137
|
+
* One way a customer may pay for a booking. This is the single definition of
|
|
138
|
+
* the option type; `booking-payment-schemas.typetest.ts` keeps it equal to the
|
|
139
|
+
* schema's output in both directions.
|
|
140
|
+
*/
|
|
141
|
+
/** When a course's instalments must all be paid by: before its first or its last live session. */
|
|
142
|
+
const BOOKING_COURSE_INSTALMENT_DEADLINES = ["first_session", "last_session"];
|
|
143
|
+
/** Automatic instalments and a flexible balance cannot share one booking offer. */
|
|
144
|
+
function validateBookingPaymentOptionKinds(kinds) {
|
|
145
|
+
if (kinds.length === 0) return err("no_options");
|
|
146
|
+
const uniqueKinds = new Set(kinds);
|
|
147
|
+
if (uniqueKinds.size !== kinds.length) return err("duplicate_kind");
|
|
148
|
+
if (uniqueKinds.has("instalment_plan") && uniqueKinds.has("flexible_balance")) return err("incompatible_collection_options");
|
|
149
|
+
return ok(void 0);
|
|
150
|
+
}
|
|
151
|
+
//#endregion
|
|
152
|
+
//#region ../core/src/booking-date-time/instant.ts
|
|
153
|
+
function parseUtcIsoDateTimeString(value) {
|
|
154
|
+
const normalized = value.trim();
|
|
155
|
+
const hasUtcSuffix = normalized.endsWith("Z");
|
|
156
|
+
const hasExplicitOffset = /[+-]\d{2}:\d{2}$/u.test(normalized);
|
|
157
|
+
if (!hasUtcSuffix && !hasExplicitOffset) return err("missing-timezone-offset");
|
|
158
|
+
const date = new Date(normalized);
|
|
159
|
+
if (Number.isNaN(date.getTime())) return err("invalid-date-time");
|
|
160
|
+
return ok(date.toISOString());
|
|
161
|
+
}
|
|
162
|
+
function toUtcIsoDateTimeString(value) {
|
|
163
|
+
const parsed = parseUtcIsoDateTimeString(value);
|
|
164
|
+
if (!parsed.ok) {
|
|
165
|
+
const message = parsed.error === "missing-timezone-offset" ? `Expected an offset-aware ISO datetime, received "${value}"` : `Expected a valid ISO datetime, received "${value}"`;
|
|
166
|
+
throw new Error(message);
|
|
167
|
+
}
|
|
168
|
+
return parsed.value;
|
|
169
|
+
}
|
|
170
|
+
//#endregion
|
|
7
171
|
//#region ../core/src/date-time-formatter.ts
|
|
8
172
|
/** Shared Intl engine, internal to core's date presentation owners. */
|
|
9
173
|
const FORMATTER_CACHE_LIMIT = 100;
|
|
@@ -39,6 +203,11 @@ function formatIntlRange(formatter, start, end) {
|
|
|
39
203
|
return output;
|
|
40
204
|
}
|
|
41
205
|
//#endregion
|
|
206
|
+
//#region ../core/src/booking-date-time/parts.ts
|
|
207
|
+
function formatToPartsLookup(date, locale, timeZone, format) {
|
|
208
|
+
return new Map(getDateTimeFormatter(locale, timeZone, format).formatToParts(date).map((part) => [part.type, part.value]));
|
|
209
|
+
}
|
|
210
|
+
//#endregion
|
|
42
211
|
//#region ../core/src/booking-time-zone.ts
|
|
43
212
|
const TIME_ZONE_VALIDITY_CACHE_LIMIT = 100;
|
|
44
213
|
const timeZoneValidityCache = /* @__PURE__ */ new Map();
|
|
@@ -66,32 +235,26 @@ function parseBookingTimeZone(timeZone) {
|
|
|
66
235
|
return ok(normalized);
|
|
67
236
|
}
|
|
68
237
|
//#endregion
|
|
69
|
-
//#region ../core/src/booking-date-time.ts
|
|
238
|
+
//#region ../core/src/booking-date-time/time-zone.ts
|
|
70
239
|
const FALLBACK_TIMEZONE = "UTC";
|
|
71
|
-
const START_OF_DAY = {
|
|
72
|
-
hour: 0,
|
|
73
|
-
minute: 0,
|
|
74
|
-
second: 0
|
|
75
|
-
};
|
|
76
|
-
const LOCAL_DATE_PATTERN = /^(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})$/u;
|
|
77
240
|
function getSafeTimeZone(timeZone) {
|
|
78
241
|
const normalized = typeof timeZone === "string" ? timeZone.trim() : "";
|
|
79
242
|
return normalized.length > 0 && isValidBookingTimeZone(normalized) ? normalized : FALLBACK_TIMEZONE;
|
|
80
243
|
}
|
|
81
|
-
function
|
|
82
|
-
|
|
83
|
-
return parsed.ok ? parsed.value : null;
|
|
244
|
+
function toBookingTimeZone(timeZone) {
|
|
245
|
+
return getSafeTimeZone(timeZone);
|
|
84
246
|
}
|
|
85
|
-
function
|
|
86
|
-
|
|
87
|
-
case "invalid_starts_at": return `Expected a valid UTC/offset-aware ISO datetime in startsAt, received "${error.value}"`;
|
|
88
|
-
case "invalid_ends_at": return `Expected a valid UTC/offset-aware ISO datetime in endsAt, received "${error.value ?? ""}"`;
|
|
89
|
-
case "invalid_time_zone": return `Expected a valid IANA timezone in timeZone, received "${error.value}"`;
|
|
90
|
-
}
|
|
247
|
+
function resolveBookingTimeZoneId(...candidates) {
|
|
248
|
+
return candidates.map((candidate) => typeof candidate === "string" ? candidate.trim() : "").find((candidate) => candidate.length > 0 && isValidBookingTimeZone(candidate)) ?? FALLBACK_TIMEZONE;
|
|
91
249
|
}
|
|
92
|
-
|
|
93
|
-
|
|
250
|
+
/** Canonical business-zone admission, shared by server and public wire boundaries. */
|
|
251
|
+
const DEFAULT_BOOKING_BUSINESS_TIME_ZONE = "Europe/London";
|
|
252
|
+
function resolveBookingBusinessTimeZone(value) {
|
|
253
|
+
return resolveBookingTimeZoneId(value, DEFAULT_BOOKING_BUSINESS_TIME_ZONE);
|
|
94
254
|
}
|
|
255
|
+
//#endregion
|
|
256
|
+
//#region ../core/src/booking-date-time/local.ts
|
|
257
|
+
const LOCAL_DATE_PATTERN = /^(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})$/u;
|
|
95
258
|
function getZonedDateTimeParts(date, timeZone) {
|
|
96
259
|
const parts = formatToPartsLookup(date, "en-GB", timeZone, {
|
|
97
260
|
year: "numeric",
|
|
@@ -115,50 +278,152 @@ function getZonedDateTimeParts(date, timeZone) {
|
|
|
115
278
|
function formatDateKey(date) {
|
|
116
279
|
return `${String(date.year).padStart(4, "0")}-${String(date.month).padStart(2, "0")}-${String(date.day).padStart(2, "0")}`;
|
|
117
280
|
}
|
|
118
|
-
function
|
|
119
|
-
return
|
|
281
|
+
function getBookingLocalDateKey(input) {
|
|
282
|
+
return formatDateKey(getLocalScheduleDate(new Date(input.startsAt), input.timeZone));
|
|
120
283
|
}
|
|
121
|
-
function
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
284
|
+
function compareLocalScheduleDates(left, right) {
|
|
285
|
+
return Date.UTC(left.year, left.month - 1, left.day) - Date.UTC(right.year, right.month - 1, right.day);
|
|
286
|
+
}
|
|
287
|
+
function parseBookingLocalDate(value) {
|
|
288
|
+
const match = LOCAL_DATE_PATTERN.exec(value.trim());
|
|
289
|
+
if (match === null || match.groups === void 0) throw new Error(`Invalid booking date format: "${value}" (expected YYYY-MM-DD)`);
|
|
290
|
+
const year = Number(match.groups.year);
|
|
291
|
+
const month = Number(match.groups.month);
|
|
292
|
+
const day = Number(match.groups.day);
|
|
293
|
+
const candidate = new Date(Date.UTC(year, month - 1, day, 12, 0, 0));
|
|
294
|
+
if (Number.isNaN(candidate.getTime()) || candidate.getUTCFullYear() !== year || candidate.getUTCMonth() + 1 !== month || candidate.getUTCDate() !== day) throw new Error(`Invalid booking date format: "${value}" (expected YYYY-MM-DD)`);
|
|
295
|
+
return {
|
|
296
|
+
year,
|
|
297
|
+
month,
|
|
298
|
+
day
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
function parseLocalScheduleTime(value) {
|
|
302
|
+
const match = /^(?<hour>[01]?\d|2[0-3]):(?<minute>[0-5]\d)(?::(?<second>[0-5]\d))?$/u.exec(value.trim());
|
|
303
|
+
if (match === null || match.groups === void 0) throw new Error(`Invalid start time format: "${value}" (expected HH:MM or HH:MM:SS)`);
|
|
304
|
+
return {
|
|
305
|
+
hour: Number(match.groups.hour),
|
|
306
|
+
minute: Number(match.groups.minute),
|
|
307
|
+
second: Number(match.groups.second ?? "0")
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
function getLocalScheduleDate(date, timeZone) {
|
|
311
|
+
const parts = getZonedDateTimeParts(date, getSafeTimeZone(timeZone));
|
|
312
|
+
return {
|
|
313
|
+
year: parts.year,
|
|
314
|
+
month: parts.month,
|
|
315
|
+
day: parts.day
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
function formatLocalScheduleDate(date) {
|
|
319
|
+
return formatDateKey(date);
|
|
320
|
+
}
|
|
321
|
+
function addLocalScheduleDays(date, days) {
|
|
322
|
+
const utcDate = new Date(Date.UTC(date.year, date.month - 1, date.day + days, 12, 0, 0));
|
|
323
|
+
return {
|
|
324
|
+
year: utcDate.getUTCFullYear(),
|
|
325
|
+
month: utcDate.getUTCMonth() + 1,
|
|
326
|
+
day: utcDate.getUTCDate()
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
function localScheduleDateTimeToUtcDate(localDate, localTime, timeZone) {
|
|
330
|
+
const resolvedTimeZone = getSafeTimeZone(timeZone);
|
|
331
|
+
const targetLocalMs = Date.UTC(localDate.year, localDate.month - 1, localDate.day, localTime.hour, localTime.minute, localTime.second, 0);
|
|
332
|
+
return resolveLocalInstant(targetLocalMs, resolvedTimeZone, targetLocalMs, []);
|
|
333
|
+
}
|
|
334
|
+
function resolveLocalInstant(targetLocalMs, timeZone, guess, seen) {
|
|
335
|
+
if (seen.length === 4) return new Date(guess);
|
|
336
|
+
const actual = getZonedDateTimeParts(new Date(guess), timeZone);
|
|
337
|
+
const diff = Date.UTC(actual.year, actual.month - 1, actual.day, actual.hour, actual.minute, actual.second, 0) - targetLocalMs;
|
|
338
|
+
if (diff === 0) return new Date(guess);
|
|
339
|
+
const nextGuess = guess - diff;
|
|
340
|
+
if (nextGuess === guess || seen.includes(nextGuess)) return new Date(Math.max(guess, nextGuess));
|
|
341
|
+
return resolveLocalInstant(targetLocalMs, timeZone, nextGuess, [...seen, guess]);
|
|
342
|
+
}
|
|
343
|
+
//#endregion
|
|
344
|
+
//#region ../core/src/booking-date-time/window.ts
|
|
345
|
+
const START_OF_DAY = {
|
|
346
|
+
hour: 0,
|
|
347
|
+
minute: 0,
|
|
348
|
+
second: 0
|
|
349
|
+
};
|
|
350
|
+
function parseWindowDate(value, field) {
|
|
351
|
+
try {
|
|
352
|
+
return {
|
|
353
|
+
ok: true,
|
|
354
|
+
value: parseBookingLocalDate(value)
|
|
355
|
+
};
|
|
356
|
+
} catch {
|
|
357
|
+
return {
|
|
358
|
+
ok: false,
|
|
359
|
+
field,
|
|
360
|
+
reason: "invalid_date_format",
|
|
361
|
+
value
|
|
362
|
+
};
|
|
125
363
|
}
|
|
126
|
-
return FALLBACK_TIMEZONE;
|
|
127
364
|
}
|
|
128
|
-
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
|
|
365
|
+
function parseBookingUtcDateWindow(input) {
|
|
366
|
+
const timeZone = resolveBookingTimeZoneId(input.timeZone);
|
|
367
|
+
const start = parseWindowDate(input.startDate, "startDate");
|
|
368
|
+
if (!start.ok) return start;
|
|
369
|
+
const end = parseWindowDate(input.endDate, "endDate");
|
|
370
|
+
if (!end.ok) return end;
|
|
371
|
+
const startLocalDate = start.value;
|
|
372
|
+
const endLocalDate = end.value;
|
|
373
|
+
if (compareLocalScheduleDates(startLocalDate, endLocalDate) > 0) return {
|
|
374
|
+
ok: false,
|
|
375
|
+
field: "endDate",
|
|
376
|
+
reason: "invalid_date_range",
|
|
377
|
+
value: input.endDate
|
|
378
|
+
};
|
|
379
|
+
return {
|
|
380
|
+
ok: true,
|
|
381
|
+
value: {
|
|
382
|
+
timeZone,
|
|
383
|
+
startLocalDate,
|
|
384
|
+
endLocalDate,
|
|
385
|
+
startAt: localScheduleDateTimeToUtcDate(startLocalDate, START_OF_DAY, timeZone),
|
|
386
|
+
endExclusive: localScheduleDateTimeToUtcDate(addLocalScheduleDays(endLocalDate, 1), START_OF_DAY, timeZone)
|
|
387
|
+
}
|
|
388
|
+
};
|
|
132
389
|
}
|
|
133
|
-
function
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
const date = new Date(normalized);
|
|
139
|
-
if (Number.isNaN(date.getTime())) return err("invalid-date-time");
|
|
140
|
-
return ok(date.toISOString());
|
|
390
|
+
function buildBookingUtcDateWindow(input) {
|
|
391
|
+
const result = parseBookingUtcDateWindow(input);
|
|
392
|
+
if (result.ok) return result.value;
|
|
393
|
+
if (result.reason === "invalid_date_range") throw new Error(`Invalid booking date range: startDate "${input.startDate}" must be on or before endDate "${input.endDate}"`);
|
|
394
|
+
throw new Error(`Invalid booking date format: "${result.value}" (expected YYYY-MM-DD)`);
|
|
141
395
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
396
|
+
//#endregion
|
|
397
|
+
//#region ../core/src/booking-date-time/scheduled.ts
|
|
398
|
+
function parseStrictBookingTimeZone(timeZone) {
|
|
399
|
+
const parsed = parseBookingTimeZone(timeZone);
|
|
400
|
+
return parsed.ok ? parsed.value : null;
|
|
401
|
+
}
|
|
402
|
+
function formatParseError(error) {
|
|
403
|
+
switch (error.reason) {
|
|
404
|
+
case "invalid_starts_at": return `Expected a valid UTC/offset-aware ISO datetime in startsAt, received "${error.value}"`;
|
|
405
|
+
case "invalid_ends_at": return `Expected a valid UTC/offset-aware ISO datetime in endsAt, received "${error.value ?? ""}"`;
|
|
406
|
+
case "invalid_time_zone": return `Expected a valid IANA timezone in timeZone, received "${error.value}"`;
|
|
147
407
|
}
|
|
148
|
-
return parsed.value;
|
|
149
408
|
}
|
|
150
|
-
function
|
|
151
|
-
let startsAt;
|
|
409
|
+
function parseScheduledStart(value) {
|
|
152
410
|
try {
|
|
153
|
-
|
|
411
|
+
return {
|
|
412
|
+
ok: true,
|
|
413
|
+
value: toUtcIsoDateTimeString(value)
|
|
414
|
+
};
|
|
154
415
|
} catch {
|
|
155
416
|
return {
|
|
156
417
|
ok: false,
|
|
157
418
|
field: "startsAt",
|
|
158
419
|
reason: "invalid_starts_at",
|
|
159
|
-
value
|
|
420
|
+
value
|
|
160
421
|
};
|
|
161
422
|
}
|
|
423
|
+
}
|
|
424
|
+
function parseScheduledBookingDateTime(input) {
|
|
425
|
+
const startsAt = parseScheduledStart(input.startsAt);
|
|
426
|
+
if (!startsAt.ok) return startsAt;
|
|
162
427
|
const timeZone = parseStrictBookingTimeZone(input.timeZone);
|
|
163
428
|
if (timeZone === null) return {
|
|
164
429
|
ok: false,
|
|
@@ -169,7 +434,7 @@ function parseScheduledBookingDateTime(input) {
|
|
|
169
434
|
return {
|
|
170
435
|
ok: true,
|
|
171
436
|
value: {
|
|
172
|
-
startsAt,
|
|
437
|
+
startsAt: startsAt.value,
|
|
173
438
|
timeZone,
|
|
174
439
|
locale: input.locale
|
|
175
440
|
}
|
|
@@ -180,6 +445,8 @@ function toScheduledBookingDateTime(input) {
|
|
|
180
445
|
if (result.ok) return result.value;
|
|
181
446
|
throw new Error(formatParseError(result));
|
|
182
447
|
}
|
|
448
|
+
//#endregion
|
|
449
|
+
//#region ../core/src/booking-date-time/formatting.ts
|
|
183
450
|
/**
|
|
184
451
|
* Formats the compact English event-time presentation used by public surfaces.
|
|
185
452
|
*
|
|
@@ -208,121 +475,6 @@ function compactEnglishClock(parts, seconds) {
|
|
|
208
475
|
if (seconds === "include") return second === void 0 ? null : `${hour}:${minute}:${second}${token}`;
|
|
209
476
|
return `${minute === "00" ? hour : `${hour}:${minute}`}${token}`;
|
|
210
477
|
}
|
|
211
|
-
function getBookingLocalDateKey(input) {
|
|
212
|
-
return formatDateKey(getLocalScheduleDate(new Date(input.startsAt), input.timeZone));
|
|
213
|
-
}
|
|
214
|
-
function compareLocalScheduleDates(left, right) {
|
|
215
|
-
return Date.UTC(left.year, left.month - 1, left.day) - Date.UTC(right.year, right.month - 1, right.day);
|
|
216
|
-
}
|
|
217
|
-
function parseBookingLocalDate(value) {
|
|
218
|
-
const match = LOCAL_DATE_PATTERN.exec(value.trim());
|
|
219
|
-
if (match === null || match.groups === void 0) throw new Error(`Invalid booking date format: "${value}" (expected YYYY-MM-DD)`);
|
|
220
|
-
const year = Number(match.groups.year);
|
|
221
|
-
const month = Number(match.groups.month);
|
|
222
|
-
const day = Number(match.groups.day);
|
|
223
|
-
const candidate = new Date(Date.UTC(year, month - 1, day, 12, 0, 0));
|
|
224
|
-
if (Number.isNaN(candidate.getTime()) || candidate.getUTCFullYear() !== year || candidate.getUTCMonth() + 1 !== month || candidate.getUTCDate() !== day) throw new Error(`Invalid booking date format: "${value}" (expected YYYY-MM-DD)`);
|
|
225
|
-
return {
|
|
226
|
-
year,
|
|
227
|
-
month,
|
|
228
|
-
day
|
|
229
|
-
};
|
|
230
|
-
}
|
|
231
|
-
function parseBookingUtcDateWindow(input) {
|
|
232
|
-
const timeZone = resolveBookingTimeZoneId(input.timeZone);
|
|
233
|
-
let startLocalDate;
|
|
234
|
-
try {
|
|
235
|
-
startLocalDate = parseBookingLocalDate(input.startDate);
|
|
236
|
-
} catch {
|
|
237
|
-
return {
|
|
238
|
-
ok: false,
|
|
239
|
-
field: "startDate",
|
|
240
|
-
reason: "invalid_date_format",
|
|
241
|
-
value: input.startDate
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
let endLocalDate;
|
|
245
|
-
try {
|
|
246
|
-
endLocalDate = parseBookingLocalDate(input.endDate);
|
|
247
|
-
} catch {
|
|
248
|
-
return {
|
|
249
|
-
ok: false,
|
|
250
|
-
field: "endDate",
|
|
251
|
-
reason: "invalid_date_format",
|
|
252
|
-
value: input.endDate
|
|
253
|
-
};
|
|
254
|
-
}
|
|
255
|
-
if (compareLocalScheduleDates(startLocalDate, endLocalDate) > 0) return {
|
|
256
|
-
ok: false,
|
|
257
|
-
field: "endDate",
|
|
258
|
-
reason: "invalid_date_range",
|
|
259
|
-
value: input.endDate
|
|
260
|
-
};
|
|
261
|
-
return {
|
|
262
|
-
ok: true,
|
|
263
|
-
value: {
|
|
264
|
-
timeZone,
|
|
265
|
-
startLocalDate,
|
|
266
|
-
endLocalDate,
|
|
267
|
-
startAt: localScheduleDateTimeToUtcDate(startLocalDate, START_OF_DAY, timeZone),
|
|
268
|
-
endExclusive: localScheduleDateTimeToUtcDate(addLocalScheduleDays(endLocalDate, 1), START_OF_DAY, timeZone)
|
|
269
|
-
}
|
|
270
|
-
};
|
|
271
|
-
}
|
|
272
|
-
function buildBookingUtcDateWindow(input) {
|
|
273
|
-
const result = parseBookingUtcDateWindow(input);
|
|
274
|
-
if (result.ok) return result.value;
|
|
275
|
-
if (result.reason === "invalid_date_range") throw new Error(`Invalid booking date range: startDate "${input.startDate}" must be on or before endDate "${input.endDate}"`);
|
|
276
|
-
throw new Error(`Invalid booking date format: "${result.value}" (expected YYYY-MM-DD)`);
|
|
277
|
-
}
|
|
278
|
-
function parseLocalScheduleTime(value) {
|
|
279
|
-
const match = /^(?<hour>\d{1,2}):(?<minute>\d{2})(?::(?<second>\d{2}))?$/u.exec(value.trim());
|
|
280
|
-
if (match === null || match.groups === void 0) throw new Error(`Invalid start time format: "${value}" (expected HH:MM or HH:MM:SS)`);
|
|
281
|
-
const hour = Number(match.groups.hour);
|
|
282
|
-
const minute = Number(match.groups.minute);
|
|
283
|
-
const second = match.groups.second !== void 0 ? Number(match.groups.second) : 0;
|
|
284
|
-
if (Number.isNaN(hour) || Number.isNaN(minute) || Number.isNaN(second) || hour < 0 || hour > 23 || minute < 0 || minute > 59 || second < 0 || second > 59) throw new Error(`Invalid start time format: "${value}" (expected HH:MM or HH:MM:SS)`);
|
|
285
|
-
return {
|
|
286
|
-
hour,
|
|
287
|
-
minute,
|
|
288
|
-
second
|
|
289
|
-
};
|
|
290
|
-
}
|
|
291
|
-
function getLocalScheduleDate(date, timeZone) {
|
|
292
|
-
const parts = getZonedDateTimeParts(date, getSafeTimeZone(timeZone));
|
|
293
|
-
return {
|
|
294
|
-
year: parts.year,
|
|
295
|
-
month: parts.month,
|
|
296
|
-
day: parts.day
|
|
297
|
-
};
|
|
298
|
-
}
|
|
299
|
-
function formatLocalScheduleDate(date) {
|
|
300
|
-
return formatDateKey(date);
|
|
301
|
-
}
|
|
302
|
-
function addLocalScheduleDays(date, days) {
|
|
303
|
-
const utcDate = new Date(Date.UTC(date.year, date.month - 1, date.day + days, 12, 0, 0));
|
|
304
|
-
return {
|
|
305
|
-
year: utcDate.getUTCFullYear(),
|
|
306
|
-
month: utcDate.getUTCMonth() + 1,
|
|
307
|
-
day: utcDate.getUTCDate()
|
|
308
|
-
};
|
|
309
|
-
}
|
|
310
|
-
function localScheduleDateTimeToUtcDate(localDate, localTime, timeZone) {
|
|
311
|
-
const resolvedTimeZone = getSafeTimeZone(timeZone);
|
|
312
|
-
const targetLocalMs = Date.UTC(localDate.year, localDate.month - 1, localDate.day, localTime.hour, localTime.minute, localTime.second, 0);
|
|
313
|
-
let guess = targetLocalMs;
|
|
314
|
-
const seenGuesses = /* @__PURE__ */ new Set();
|
|
315
|
-
for (let iteration = 0; iteration < 4; iteration += 1) {
|
|
316
|
-
seenGuesses.add(guess);
|
|
317
|
-
const actual = getZonedDateTimeParts(new Date(guess), resolvedTimeZone);
|
|
318
|
-
const diff = Date.UTC(actual.year, actual.month - 1, actual.day, actual.hour, actual.minute, actual.second, 0) - targetLocalMs;
|
|
319
|
-
if (diff === 0) return new Date(guess);
|
|
320
|
-
const nextGuess = guess - diff;
|
|
321
|
-
if (seenGuesses.has(nextGuess)) return new Date(Math.max(guess, nextGuess));
|
|
322
|
-
guess = nextGuess;
|
|
323
|
-
}
|
|
324
|
-
return new Date(guess);
|
|
325
|
-
}
|
|
326
478
|
//#endregion
|
|
327
479
|
//#region ../core/src/date-display.ts
|
|
328
480
|
/** Site-language policy, shared by customer emails and public event adapters. */
|
|
@@ -951,6 +1103,7 @@ function isRichTextDoc(value) {
|
|
|
951
1103
|
}
|
|
952
1104
|
//#endregion
|
|
953
1105
|
//#region ../core/src/booking-payment-schemas.ts
|
|
1106
|
+
const bookingCourseInstalmentDeadlineSchema = z.enum(BOOKING_COURSE_INSTALMENT_DEADLINES);
|
|
954
1107
|
const stripObject = (shape) => z.object(shape);
|
|
955
1108
|
const strictObject = (shape) => z.strictObject(shape);
|
|
956
1109
|
const depositRefundPolicySchema = z.enum(["refundable", "non_refundable"]);
|
|
@@ -1016,7 +1169,8 @@ function buildBookingPaymentOptionSchemas(object) {
|
|
|
1016
1169
|
object({ kind: z.literal("deferred_manual") }),
|
|
1017
1170
|
object({
|
|
1018
1171
|
kind: z.literal("instalment_plan"),
|
|
1019
|
-
plan: instalmentPlan
|
|
1172
|
+
plan: instalmentPlan,
|
|
1173
|
+
courseDeadline: bookingCourseInstalmentDeadlineSchema.optional()
|
|
1020
1174
|
}),
|
|
1021
1175
|
object({
|
|
1022
1176
|
kind: z.literal("flexible_balance"),
|
|
@@ -1120,6 +1274,7 @@ const publicEventLoaderQuerySchemaShape = {
|
|
|
1120
1274
|
seriesIds: z.string().optional(),
|
|
1121
1275
|
runSeriesId: z.string().optional(),
|
|
1122
1276
|
seriesSlug: z.string().optional(),
|
|
1277
|
+
occurrenceIds: z.string().max(4e3).optional(),
|
|
1123
1278
|
includeOccurrenceId: z.string().optional(),
|
|
1124
1279
|
readIntent: z.string().optional(),
|
|
1125
1280
|
detailAdmission: z.string().optional(),
|
|
@@ -1497,7 +1652,11 @@ const eventCalendarListLayoutValues = [
|
|
|
1497
1652
|
"grid",
|
|
1498
1653
|
"compact"
|
|
1499
1654
|
];
|
|
1500
|
-
const arrangementOnlyListLayouts = [
|
|
1655
|
+
const arrangementOnlyListLayouts = [
|
|
1656
|
+
"ledger",
|
|
1657
|
+
"day-groups",
|
|
1658
|
+
"week-columns"
|
|
1659
|
+
];
|
|
1501
1660
|
const eventListArrangementValues = [...eventCalendarListLayoutValues, ...arrangementOnlyListLayouts];
|
|
1502
1661
|
const eventCalendarListLayoutOptions = [
|
|
1503
1662
|
{
|
|
@@ -1743,6 +1902,77 @@ function planCalendarMonthRanges(months) {
|
|
|
1743
1902
|
return ranges;
|
|
1744
1903
|
}
|
|
1745
1904
|
//#endregion
|
|
1905
|
+
//#region ../commerce/src/purchase/settlement.ts
|
|
1906
|
+
function normalizeCurrencyCode(raw) {
|
|
1907
|
+
const normalized = raw.trim().toUpperCase();
|
|
1908
|
+
if (!/^[A-Z]{3}$/.test(normalized)) throw new Error(`Invalid currency code: ${raw}`);
|
|
1909
|
+
return normalized;
|
|
1910
|
+
}
|
|
1911
|
+
//#endregion
|
|
1912
|
+
//#region ../commerce/src/purchase/confirmationPaymentSchema.ts
|
|
1913
|
+
const settledBalanceSchema = z.strictObject({ kind: z.literal("settled") });
|
|
1914
|
+
const dueBalanceSchema = z.strictObject({
|
|
1915
|
+
kind: z.literal("due"),
|
|
1916
|
+
amountCents: z.number().int().positive().transform((value, ctx) => {
|
|
1917
|
+
const cents = parsePositiveCents(value);
|
|
1918
|
+
if (cents.ok) return cents.value;
|
|
1919
|
+
ctx.addIssue({
|
|
1920
|
+
code: "custom",
|
|
1921
|
+
message: "Expected positive whole cents"
|
|
1922
|
+
});
|
|
1923
|
+
return z.NEVER;
|
|
1924
|
+
}),
|
|
1925
|
+
dueAt: z.string().nullable()
|
|
1926
|
+
});
|
|
1927
|
+
const paymentBalanceSchema = z.discriminatedUnion("kind", [settledBalanceSchema, dueBalanceSchema]);
|
|
1928
|
+
const currencySchema = z.string().regex(/^[A-Z]{3}$/).transform(normalizeCurrencyCode);
|
|
1929
|
+
const moneyFields = {
|
|
1930
|
+
amountPaidCents: z.number().int().nonnegative().transform(toNonNegativeCents),
|
|
1931
|
+
currency: currencySchema
|
|
1932
|
+
};
|
|
1933
|
+
const confirmationPaymentSchema = z.discriminatedUnion("kind", [
|
|
1934
|
+
z.strictObject({
|
|
1935
|
+
kind: z.literal("free"),
|
|
1936
|
+
balance: settledBalanceSchema
|
|
1937
|
+
}),
|
|
1938
|
+
z.strictObject({
|
|
1939
|
+
kind: z.literal("waived"),
|
|
1940
|
+
balance: settledBalanceSchema
|
|
1941
|
+
}),
|
|
1942
|
+
z.strictObject({
|
|
1943
|
+
kind: z.literal("pass"),
|
|
1944
|
+
passName: z.string().nullable(),
|
|
1945
|
+
passCreditsUsed: z.number().int().positive().nullable(),
|
|
1946
|
+
balance: settledBalanceSchema
|
|
1947
|
+
}),
|
|
1948
|
+
z.strictObject({
|
|
1949
|
+
kind: z.literal("membership"),
|
|
1950
|
+
membershipName: z.string().nullable(),
|
|
1951
|
+
balance: settledBalanceSchema
|
|
1952
|
+
}),
|
|
1953
|
+
z.strictObject({
|
|
1954
|
+
kind: z.literal("manual_due"),
|
|
1955
|
+
currency: currencySchema,
|
|
1956
|
+
balance: dueBalanceSchema
|
|
1957
|
+
}),
|
|
1958
|
+
z.strictObject({
|
|
1959
|
+
kind: z.literal("managed_balance_due"),
|
|
1960
|
+
...moneyFields,
|
|
1961
|
+
balance: dueBalanceSchema
|
|
1962
|
+
}),
|
|
1963
|
+
z.strictObject({
|
|
1964
|
+
kind: z.literal("monetary"),
|
|
1965
|
+
...moneyFields,
|
|
1966
|
+
paymentMethod: z.enum([
|
|
1967
|
+
"stripe",
|
|
1968
|
+
"store_credit",
|
|
1969
|
+
"mixed",
|
|
1970
|
+
"manual"
|
|
1971
|
+
]),
|
|
1972
|
+
balance: paymentBalanceSchema
|
|
1973
|
+
})
|
|
1974
|
+
]);
|
|
1975
|
+
//#endregion
|
|
1746
1976
|
//#region ../blocks/src/system/runtime/api/schemas/events.ts
|
|
1747
1977
|
const uuid = z.string().uuid();
|
|
1748
1978
|
const eventRegistrationStatusReferenceSchema = z.discriminatedUnion("scope", [z.object({
|
|
@@ -1983,4 +2213,4 @@ const logger = {
|
|
|
1983
2213
|
withFields: (_) => logger
|
|
1984
2214
|
};
|
|
1985
2215
|
//#endregion
|
|
1986
|
-
export {
|
|
2216
|
+
export { isRichTextDoc as $, resolveEventCalendarReadPlan as A, resolveBookingBusinessTimeZone as At, normalizeEventVenueId as B, eventCalendarListLayoutValues as C, addLocalScheduleDays as Ct, isEventCalendarDisplayMode as D, getLocalScheduleDate as Dt, isEventCalendarDefaultView as E, getBookingLocalDateKey as Et, normalizeEventScheduleScope as F, validateBookingPaymentOptionKinds as Ft, publicEventSchema as G, eventVenueDrawingSchema as H, normalizeEventStaffMemberId as I, parsePositiveMoneyInputToCents as It, bookingConsentCarrierSchema as J, publicEventsArraySchema as K, normalizeEventSurfacePresets as L, toNonNegativeCents as Lt, eventSurfaceScopeValues as M, toBookingTimeZone as Mt, normalizeEventCategoryIds as N, parseUtcIsoDateTimeString as Nt, isEventCalendarListLayout as O, parseBookingLocalDate as Ot, normalizeEventCategoryIdsCsv as P, toUtcIsoDateTimeString as Pt, RichTextDocSchema as Q, normalizeEventSurfacePresetsCsv as R, formatCurrencyAmount as Rt, eventCalendarListLayoutOptions as S, buildBookingUtcDateWindow as St, eventListArrangementValues as T, formatLocalScheduleDate as Tt, publicEventDestinationSchema as U, normalizeIdList as V, publicEventLoaderQuerySchemaShape as W, toBookingRequirementConsentField as X, isBookingRequirementConsentFieldId as Y, blockBookingPaymentTermsSchema as Z, resolveCalendarReadProfile as _, formatTimeZoneCityLabel as _t, eventCheckoutReturnResponseSchema as a, normalizeLocationAddressText as at, eventCalendarListGroupingDecision as b, formatBookingCompactEnglishTime as bt, calendarMonthDate as c, publicLocationSchema as ct, calendarQueryKey as d, formatDate as dt, isObjectRecord as et, calendarWindowBounds as f, formatDateRange as ft, planCalendarMonthRanges as g, formatTimeRange as gt, calendarWindowQuerySchema as h, formatTime as ht, eventCheckoutResponseSchema as i, locationValueSchema as it, eventScheduleScopeValues as j, resolveBookingTimeZoneId as jt, normalizeEventCalendarDisplayMode as k, parseLocalScheduleTime as kt, calendarMonthKey as l, toLocationCoordinates as lt, calendarWindowPageSchema as m, formatDateTimeRange as mt, blockSiteTermsSchema as n, WHOLE_SERIES_EVENT_PRESET_VALUES as nt, eventRegisterResponseSchema as o, parseLocationValue as ot, calendarWindowMonths as p, formatDateTime as pt, blockBookingConsentSchema as q, verifiedSiteTermsAcceptanceSchema as r, decideLocationSourcePermission as rt, normalizeCurrencyCode as s, projectPublicLocation as st, logger as t, isRecord as tt, calendarPageResponseError as u, mapDrawingSchema as ut, eventCalendarDefaultViewValues as v, inferSiteDateLocale as vt, eventCalendarVariantMeaning as w, compareLocalScheduleDates as wt, eventCalendarListLayoutCompatibleDisplayModeValues as x, toScheduledBookingDateTime as xt, eventCalendarDisplayModeValues as y, resolveBookingDisplayContext as yt, normalizeEventSurfaceScope as z, formatGiftCardAmountLabel as zt };
|