@riverbankcms/sdk 0.171.1 → 0.173.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-D-6cWDDC.d.ts → BlocksIslandsHydrator-O50mTMCY.d.ts} +1 -1
- package/dist/_dts/{Page-4jkUDm4D.d.ts → Page-Bk99sJwV.d.ts} +7 -7
- package/dist/_dts/{SdkPreviewMode-DEvzvovi.d.ts → SdkPreviewMode-DzAue6Kj.d.ts} +2 -2
- package/dist/_dts/{client-CXPH5esD.d.ts → client-ZlNEIvlU.d.ts} +1002 -140
- package/dist/_dts/{content-types-DsCr4-ny.d.ts → content-types-DBXPNc0h.d.ts} +3 -3
- package/dist/_dts/{contracts-BlmXM7xP.d.ts → contracts-D9bhu0bb.d.ts} +4 -3
- package/dist/_dts/{footerPageOutline-BA0DnxWU.d.ts → footerPageOutline-Bfap3soN.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-B7IRJCFG.d.ts → generatePageMetadata-DwCdg31h.d.ts} +2 -2
- package/dist/_dts/{index-BZ8-c4iQ.d.ts → index-BnatulTs.d.ts} +3 -3
- package/dist/_dts/{index-Sua-7CF1.d.ts → index-C611wjIL.d.ts} +1 -1
- package/dist/_dts/{index-C9_OTCFQ.d.ts → index-CJzs-yIJ.d.ts} +2 -2
- package/dist/_dts/{index-B3gfKNI-.d.ts → index-DW3eeNph.d.ts} +4 -4
- package/dist/_dts/{index-DlABXDte.d.ts → index-Dq_AboWN.d.ts} +1 -1
- package/dist/_dts/{index-DScYSl03.d.ts → index-DutLU2d2.d.ts} +49 -38
- package/dist/_dts/{index-BQPJbOkU.d.ts → index-KXh8FQ2s.d.ts} +2 -2
- package/dist/_dts/{loadContent-Dx4fW3Pa.d.ts → loadContent-Bde2y870.d.ts} +7 -7
- package/dist/_dts/{request-DUTkELQn.d.ts → request-Bysk4QPI.d.ts} +2862 -508
- package/dist/_dts/{resolveBlockData-Cze35i_N.d.ts → resolveBlockData-ChbNvpSF.d.ts} +5 -5
- package/dist/_dts/{resolvePageContent-zf6-E-C3.d.ts → resolvePageContent-CGa6QMgc.d.ts} +2 -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 +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/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 +6 -2
- package/dist/_dts/sdk/src/next/index.d.ts +7 -7
- 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 +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 +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 +5 -5
- 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 +18 -1
- package/dist/_dts/{types-JD-36x3P.d.ts → types-BoEk9ZON.d.ts} +3 -3
- package/dist/_dts/{types-BCzfYDW2.d.ts → types-BwitGNTl.d.ts} +7 -7
- package/dist/_dts/{types-CPHk5Voq.d.ts → types-kpp8XyXv.d.ts} +2 -2
- package/dist/_dts/{validation-0MyQlzWJ.d.ts → validation-ChftKX-o.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-vTHQyBQF.mjs → BlocksIslandsHydrator-BnUeSE3d.mjs} +17 -17
- package/dist/client/{BookingMailingListNote-Blge9FJo.mjs → BookingMailingListNote-LHQMODqB.mjs} +14 -8
- package/dist/client/{BookingPanelArrangement-wm6eeuin.mjs → BookingPanelArrangement-Be704P85.mjs} +1 -1
- package/dist/client/{BookingQuestionFields-BlaCItmH.mjs → BookingQuestionFields-BewbU_cV.mjs} +4 -4
- package/dist/client/{CalendarNavigationChevron-DRH9qFny.mjs → CalendarNavigationChevron-BMZp3RS3.mjs} +42 -35
- package/dist/client/{CheckboxChoice-B65wFjqx.mjs → CheckboxChoice-b-PJLEXe.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-DPGZArG9.mjs → DemoBookingPortalAccess-CARUWQ_E.mjs} +23 -23
- package/dist/client/{EventCalendar.client-FGg6yCLH.mjs → EventCalendar.client-CaI6upCX.mjs} +12 -11
- package/dist/client/{EventCombined.client-218_Gqgp.mjs → EventCombined.client-CoRUaYHY.mjs} +12 -11
- package/dist/client/{EventEmbeddedCheckoutStep-DKKRCuta.mjs → EventEmbeddedCheckoutStep-B18VbNS_.mjs} +1 -1
- package/dist/client/{EventItem-DKdZSW_R.mjs → EventItem-Doe4KodB.mjs} +60 -25
- package/dist/client/{EventListWeekNavigation-DZJ5qBhg.mjs → EventListWeekNavigation-CXWLKDfa.mjs} +1 -1
- package/dist/client/{EventListing.client-CCdsrqHc.mjs → EventListing.client-DvJ5tGTx.mjs} +3 -3
- package/dist/client/{EventListing.view-BVoHnVZA.mjs → EventListing.view-BmfyK7S5.mjs} +220 -81
- package/dist/client/{EventRegistrationPayment-BVxHCnxs.mjs → EventRegistrationPayment-DwMlJB2V.mjs} +847 -146
- package/dist/client/{LocationMapActions-QahdLtdE.mjs → LocationMapActions-CdRPU6gp.mjs} +2 -2
- package/dist/client/{MapDrawingSvg-Dy6UMuIw.mjs → MapDrawingSvg-DCLtxOnt.mjs} +1 -1
- package/dist/client/{Page-CT4HaEMr.mjs → Page-D46Dmr7b.mjs} +1976 -532
- package/dist/client/{ProtectedSubmitButton-AOUzjDK9.mjs → ProtectedSubmitButton-C-ql101B.mjs} +1 -1
- package/dist/client/{StepIndicator-DRJy4eU3.mjs → StepIndicator-CrSZCZn1.mjs} +83 -12
- package/dist/client/{TabBarFragment-CsAufYwT.mjs → TabBarFragment-BqfRLojo.mjs} +1 -1
- package/dist/client/{ThemedButton-BMDHwnM6.mjs → ThemedButton-DuaYtnvG.mjs} +1 -1
- package/dist/client/{accessibleSurfaces-BnyVRqdU.mjs → accessibleSurfaces-D4DhWo9j.mjs} +37 -38
- package/dist/client/{accordion-BOApxi9U.mjs → accordion-P8xcfKxq.mjs} +1 -1
- package/dist/client/bookability-SargNwlO.mjs +17 -0
- package/dist/client/{booking-form.client-DDf8Lmo5.mjs → booking-form.client-BM2s-NqR.mjs} +33 -29
- package/dist/client/{bookingForm-DWrgG-Xx.mjs → bookingForm-JnaZPZge.mjs} +4 -4
- package/dist/client/bookings.mjs +5 -5
- package/dist/client/{boxStyleClassNames-7MVCNWgc.mjs → boxStyleClassNames-Cahps5kR.mjs} +1 -1
- package/dist/client/{carousel-DeI76SEP.mjs → carousel-CQQ_m0KA.mjs} +2 -2
- package/dist/client/{carousel.client-YF4mUK5t.mjs → carousel.client-h65clfUO.mjs} +1 -1
- package/dist/client/{cart-D_uxULCO.mjs → cart-0Q4fjw_K.mjs} +3 -3
- package/dist/client/{cart.client-BxSMse88.mjs → cart.client-BI0IaHX3.mjs} +1 -1
- package/dist/client/{checkout-DIbh4g5e.mjs → checkout-1J-3ftxF.mjs} +3 -3
- package/dist/client/{checkout.client-x4Lkw8-E.mjs → checkout.client-DOGYDlDk.mjs} +1 -1
- package/dist/client/{checkoutUrls-DqN3L-kl.mjs → checkoutUrls-CwHqcqzP.mjs} +1 -1
- package/dist/client/client.mjs +183 -4
- package/dist/client/{context-Dzjv2CpA.mjs → context-D0KCgbOq.mjs} +94 -14
- package/dist/client/course-CmOuoZHN.mjs +237 -0
- package/dist/client/{dateFormatting-BfurxGwg.mjs → dateFormatting-Dmfaczzq.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-D0dcPsRE.mjs → demoPortalMagicLink-CL7KGRta.mjs} +1 -1
- package/dist/client/{display-ChgDe9Da.mjs → display-lL-YRApN.mjs} +4460 -888
- package/dist/client/{enhanceHeaderSection-BEjg_h_6.mjs → enhanceHeaderSection-B-eLGs2C.mjs} +139 -16
- package/dist/client/{event-details.client-COmbQ3mc.mjs → event-details.client-DH1-Jxsh.mjs} +1 -1
- package/dist/client/{event-registration.client-BvQG3qEY.mjs → event-registration.client-GuuElczW.mjs} +1316 -554
- package/dist/client/{eventCalendar-DiitbUpV.mjs → eventCalendar-BiCINPkV.mjs} +4 -4
- package/dist/client/{eventCombined-Da9Z8KDq.mjs → eventCombined-BtzmH6FW.mjs} +4 -4
- package/dist/client/{eventDetails-Cf-kg7d6.mjs → eventDetails-BJpAD10-.mjs} +2 -2
- package/dist/client/{eventListing-xwXgVp7a.mjs → eventListing-jLB8iRqp.mjs} +4 -4
- package/dist/client/{eventRegistration-hlFYlgTA.mjs → eventRegistration-WhtpDEbq.mjs} +4 -4
- package/dist/client/{form-ERv_X_oZ.mjs → form-DO6qKH3M.mjs} +3 -3
- package/dist/client/{form.client-Cz24FYNj.mjs → form.client-D12ljYiX.mjs} +4 -4
- package/dist/client/{form.parts-DeaH4kIe.mjs → form.parts-C8QHaQOI.mjs} +3 -3
- package/dist/client/{formatDate-Cjouxh4Y.mjs → formatDate-BnhfIpCa.mjs} +1 -1
- package/dist/client/gifting/client.mjs +3 -3
- package/dist/client/{headerSection-CJvt0ZP4.mjs → headerSection-BtFWtoUm.mjs} +2 -2
- package/dist/client/{newsletter-form.client-WuGDEzdD.mjs → newsletter-form.client-oHrqM_Ao.mjs} +5 -5
- package/dist/client/{newsletter-form.parts-DhnW6tdB.mjs → newsletter-form.parts-D5U-FuVy.mjs} +2 -2
- package/dist/client/{newsletterForm-DxG7NV8U.mjs → newsletterForm-CBYbFxSx.mjs} +3 -3
- package/dist/client/{noop-poI1m2yW.mjs → noop-CN0o0yjH.mjs} +131 -12
- package/dist/client/portal/client.mjs +231 -117
- package/dist/client/{product-detail.client-DsSfbmdV.mjs → product-detail.client-d_sNCapC.mjs} +1 -1
- package/dist/client/{product-list.client-Byzow88i.mjs → product-list.client-DkSpw6WQ.mjs} +1 -1
- package/dist/client/{productDetail-iXkmQpxG.mjs → productDetail-DaqM-LgL.mjs} +3 -3
- package/dist/client/{productList-HoFGQXFl.mjs → productList-CMx4-XlG.mjs} +3 -3
- package/dist/client/{propsDecoder-CH2-LJME.mjs → propsDecoder-BZbUKstC.mjs} +3 -3
- package/dist/client/{registry.server-ed20Q7bV.mjs → registry.server-Cdot3dMk.mjs} +2705 -2397
- package/dist/client/rendering/client.mjs +27 -27
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +38 -63
- package/dist/client/{richText-coerce-CtoGLZ_e.mjs → richText-coerce-ByApwB4q.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-CBUO-xuz.mjs → routeIslandApiConfig-DTET8f__.mjs} +1 -1
- package/dist/client/{runtimeResponse-3brbt2Jq.mjs → runtimeResponse-IkOwKZD0.mjs} +1 -1
- package/dist/client/runtimeResponse-Wd6kwhE_.mjs +3 -0
- package/dist/client/{shop-DXyeSNgi.mjs → shop-Cy6xXDM7.mjs} +3 -3
- package/dist/client/{shop-commerce--klkHNzu.mjs → shop-commerce-oDR76k1q.mjs} +13 -12
- package/dist/client/{shop-commerce-store-BdpIWdc4.mjs → shop-commerce-store-DjoUpL3a.mjs} +1 -1
- package/dist/client/shop-discount-apply.state-WsGb9DD8.mjs +166 -0
- package/dist/client/{shop.client-Sv7QVDmj.mjs → shop.client-Brha4BSM.mjs} +13 -12
- package/dist/client/{shop.interactive-C0IjiWOs.mjs → shop.interactive-CXhYl0DW.mjs} +218 -89
- package/dist/client/{shopShared-Jt4TzcAG.mjs → shopShared-JCa_SRhP.mjs} +2 -2
- package/dist/client/spam-protection.mjs +1 -1
- package/dist/client/stable-json-D0XAEIXc.mjs +22 -0
- package/dist/client/{timetableModel-BxbnEJCi.mjs → timetableModel-CZeJwMxP.mjs} +11 -11
- package/dist/client/{types-B0hJldSt.mjs → types-DjWUR_O6.mjs} +8 -2
- package/dist/client/{useAvailableSlots-ByHedoBi.mjs → useAvailableSlots-DfbSkWop.mjs} +17 -6
- package/dist/client/{useDiscountApply-dToQs9oY.mjs → useDiscountApply-Dq-wjb1d.mjs} +4 -167
- package/dist/client/{useDiscountCodeUi-C_aa_H69.mjs → useDiscountCodeUi-Cyy0meCH.mjs} +1 -1
- package/dist/client/{useEventPagination--MFZBoJt.mjs → useEventPagination-CCAGQHsD.mjs} +6 -6
- package/dist/client/{view-DhEwiTJG.mjs → view-D6yebI4r.mjs} +223 -65
- package/dist/client/{view-C_brMDU2.mjs → view-Sw075FOY.mjs} +3 -3
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-CKe4cjZ4.mjs → EventEmbeddedCheckoutStep-aRJjq4x8.mjs} +1 -1
- package/dist/preview-next/client/{LocationPickerEnvironment-OwAxA2C0.mjs → LocationPickerEnvironment-D4F_5rnr.mjs} +1 -1
- package/dist/preview-next/client/{MapLibreEditMap-CaUOTCSh.mjs → MapLibreEditMap-BKMNxSEJ.mjs} +2 -2
- package/dist/preview-next/client/{PageSectionToolbar-Dfi8Y3AI.mjs → PageSectionToolbar-DG2rXUmo.mjs} +48 -36
- package/dist/preview-next/client/{PreviewEditorSidebar-DJlX4sXP.mjs → PreviewEditorSidebar-BDY5vdHU.mjs} +113 -416
- package/dist/preview-next/client/{PreviewEditorUI-FVAibBlC.mjs → PreviewEditorUI-CqZCfOaz.mjs} +5 -5
- package/dist/preview-next/client/PreviewLayoutContext-Dy0LwcHc.mjs +26 -0
- package/dist/preview-next/client/PreviewQueryProvider-BgIucg_5.mjs +21 -0
- package/dist/preview-next/client/{PreviewShell-9eAon7Z8.mjs → PreviewShell-Bv2HZ7JY.mjs} +313 -64
- package/dist/preview-next/client/{SdkPreviewModeRuntime-Byf-KW1x.mjs → SdkPreviewModeRuntime-BMTcR-MW.mjs} +300 -174
- package/dist/preview-next/client/{SiteChromeCustomizeButton-eU-zMftO.mjs → SiteChromeCustomizeButton-D1MGyN_Z.mjs} +3246 -1079
- package/dist/preview-next/client/{ThemedButton-CKYjeU_M.mjs → ThemedButton-CVYz7h68.mjs} +8 -2
- package/dist/preview-next/client/{lucide-react-X0DjcFij.mjs → lucide-react-BCNn8dEQ.mjs} +1 -1
- package/dist/preview-next/client/{previewAssistantSlot-3FZrzbK8.mjs → previewAssistantSlot-La6MerV_.mjs} +11994 -6013
- package/dist/preview-next/client/{previewChromeRoot-C4gyNQXE.mjs → previewChromeRoot-BcOQqJIP.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +5 -4
- package/dist/preview-next/client/sdk-runtime-BkckHox4.mjs +6 -0
- package/dist/preview-next/client/{useAutosaveStatus-OIMkhbkP.mjs → useAutosaveStatus-CPAHgGqI.mjs} +2 -2
- package/dist/preview-next/client/{useOpenBlockForSetup-BNG9P9sM.mjs → useOpenBlockForSetup-BDkuSZxQ.mjs} +20 -8
- package/dist/preview-next/container-responsive.css +215 -4
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-BLY4ycq6.mjs → route-contract-CPV30ABr.mjs} +179 -0
- package/dist/server/{Block.shared-BC3jPIP4.mjs → Block.shared-BaMMstO1.mjs} +5 -5
- package/dist/server/{ThemeScopeCore-B7Ey6AWT.mjs → ThemeScopeCore-D1NTXZdX.mjs} +14 -9
- package/dist/server/{accessibleSurfaces-BxsHs-jf.mjs → accessibleSurfaces-Dbd2__Le.mjs} +12 -11
- package/dist/server/{bindings-xQ9v3zrn.mjs → bindings-Dge4sqel.mjs} +109 -20
- package/dist/server/{block-kinds-DkzOr19P.mjs → block-kinds-BCY9z3oB.mjs} +1 -0
- package/dist/server/{client-DCwLR0kQ.mjs → client-VVIQjC4r.mjs} +183 -4
- package/dist/server/config-template-validation.mjs +3 -0
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +3 -3
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/{identity-20XHqyuO.mjs → identity-DQD_8lNO.mjs} +1 -1
- package/dist/server/index.mjs +4 -4
- package/dist/server/{loadContent-C4I3ltU_.mjs → loadContent-BIJb3WAK.mjs} +19 -15
- package/dist/server/{loadPage-COvxWN0r.mjs → loadPage-DjTU19y7.mjs} +2 -2
- package/dist/server/{media-Brn9FW5s.mjs → media-luf7RF22.mjs} +2 -2
- package/dist/server/{navigation-DAwbICEL.mjs → navigation-iC_hXjJI.mjs} +3 -1
- package/dist/server/navigation.mjs +1 -1
- package/dist/server/next.mjs +6 -6
- package/dist/server/{opaqueSurface-QiUjZmEV.mjs → opaqueSurface-COEKXVwk.mjs} +2 -2
- package/dist/server/{overrideResolution-BqQg6Iws.mjs → overrideResolution-1Ru3NMQj.mjs} +1 -1
- package/dist/server/page-converter.mjs +1 -1
- package/dist/server/{pageRenderPlan-CVCGTj5S.mjs → pageRenderPlan-CytPhrI9.mjs} +1084 -351
- package/dist/server/{pageRuntimeSupport-C7Be9suN.mjs → pageRuntimeSupport-DWspU5EZ.mjs} +4 -3
- package/dist/server/{pageShared-H_bSBPLd.mjs → pageShared-Bhx8bVe1.mjs} +1187 -902
- package/dist/server/{parseThemeForPersistence-Bk0o95m6.mjs → parseThemeForPersistence-CtgRtvo3.mjs} +2 -2
- package/dist/server/{prebuild-HQNOeCs9.mjs → prebuild-BjvFb0CA.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-CbRsnhta.mjs → prefetchBlockData-Db3stNpp.mjs} +3 -3
- package/dist/server/{registry-CaeRTf4E.mjs → registry-BMCfcev6.mjs} +10282 -7366
- 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 +3 -3
- package/dist/server/rendering.mjs +8 -8
- package/dist/server/{resolveBlockData-CUMjWbXQ.mjs → resolveBlockData--yUbI-Ll.mjs} +2 -2
- package/dist/server/{resolveButtonColourStates-euZnRMIu.mjs → resolveButtonColourStates-CCPUY9Xh.mjs} +32 -9
- package/dist/server/{responseMedia-t6gs0cB7.mjs → responseMedia-DpBC1hTM.mjs} +1 -1
- package/dist/server/{schema-CxBsE9Dv.mjs → schema-D5Vfmqzw.mjs} +396 -2
- package/dist/server/server.mjs +3 -3
- package/dist/server/theme-bridge.mjs +2 -2
- package/dist/server/theme.mjs +2 -2
- package/dist/server/{validation-CvmhnkDr.mjs → validation-EgTtnTcY.mjs} +5 -5
- package/dist/server/{version-Clp2evCf.mjs → version-LjgU0Cq1.mjs} +1 -1
- package/dist/styles/index.css +1434 -15
- package/package.json +1 -1
- package/dist/client/cta-CP9l112u.mjs +0 -121
- package/dist/client/runtimeResponse-CTarP5K6.mjs +0 -3
- package/dist/preview-next/client/PreviewQueryProvider-BC0V7iAR.mjs +0 -43
- package/dist/preview-next/client/sdk-runtime-DtyRbz4E.mjs +0 -5
- package/dist/server/rich-text-CRcONdyM.mjs +0 -33
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { $ as
|
|
4
|
-
import { B as certifyPaint, C as materializeRuntimeButtonAppearance, F as resolveSurfaceForeground, G as resolveOpaqueSurfaceHex, H as inkReference, L as surfaceInkPublication, N as freezeOwnedThemeValue, O as mapButtonVisualAppearances, P as ownedThemeSnapshot, S as buttonTypographyDeclarations, V as contrastThresholdByPolicy, W as resolveConcreteColorHex, 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, z as HOVER_TEXT_THRESHOLD } from "./accessibleSurfaces-
|
|
5
|
-
import { h as surfaceCardRoleValues, s as boxBackgroundSchema, x as siteChromeBackgroundOverrideOwner } from "./schema-
|
|
6
|
-
import { l as renderableMediaAssetSchema, o as runtimeMediaSchema } from "./media-
|
|
1
|
+
import { Dt as parseThemeColorToken, G as hexToRgb, a as formatButtonColourContractError, at as surfaceForegroundValue, c as DEFAULT_BUTTON_SIZES, ct as surfaceInkStyle, d as generateShadowValue$1, dt as cssVarValue, et as SURFACE_INK_CSS_VARS, f as DEFAULT_VARIANT_ALIAS_ID, ft as mergeStyles, g as createStandardButtonSurfacePolicy, gt as textColorValue, h as buttonSizeNameSchema, ht as textColorStyle, i as BUTTON_CONTRAST_POLICY, j as expandPalette, lt as backgroundColorStyle, n as compileButtonColourStates, nt as surfaceForegroundDeclarations, pt as rgbColorValue, r as resolveSolidButtonColour, rt as surfaceForegroundInputFromResolved, s as BORDER_WIDTH_MAP, st as surfaceInkDeclarations, u as FONT_SIZE_MAP, v as unsafeAsOpaqueButtonColourToken } from "./resolveButtonColourStates-CCPUY9Xh.mjs";
|
|
2
|
+
import { $ as resolveEventCta, A as offeringDatesBySeries, B as CalendarIcon, D as EventListingFrameView, E as MonthLookView, F as EmptyState, G as formatCourseSessions, H as eventDisplayTitle, I as CardListCollection, J as formatEventQuickDate, K as buildMonthDay, L as CardListItems, M as derivePreviewRunSchedule, N as createEditorPresentationPageReader, O as OfferingCourseCards, P as createPresentationPageReader, Q as resolveEventCardBooking, R as EventItem, S as lookPartShown, T as EVENT_REGISTRATION_ANCHOR_ID, U as eventDisplayTitleText, V as MapPinIcon, W as formatCourseDatesAfter, X as formatEventTeacherLine, Y as selectQuickDateEvents, Z as formatEventDuration, _ as publicAppointmentPricingSchema, a as joinSlotKey, b as resolvePageRouteTarget, c as buildLinkedContentEditTarget, et as resolveEventLinkProps, f as defaultTransforms, g as publicAppointmentLocationSchema, h as formatAppointmentPrice, i as composePageJoins, j as deriveEventScheduleSummary, k as eventCardListContent, m as formatAppointmentLocation, n as createPageRenderPlanReader, nt as parseStoredVariant, o as renderedJoinLayout, ot as buildThemeTokens, p as formatAppointmentDuration, q as resolveMonthSelectedDay, s as retargetJoinsAcrossOmissions, st as defaultThemeTokens, tt as isBookableEvent, u as resolveLinkedEntryInlineFieldEligibility, w as EventHeader, x as resolveRouteTarget, y as resolveEntryRouteTarget, z as eventCategoryBadge } from "./pageRenderPlan-CytPhrI9.mjs";
|
|
3
|
+
import { $ as RichText, $a as buildTextContrastShadow, $i as isToday, $n as listLookControl, $t as formatEventNextDateFact, A as publicRouteCandidatesSchema, An as parseTeamMemberSpecialties, Ar as formEmbedFragment, At as resolveOfferingsPreviewGroups, B as buildEventCollectionHydration, Bo as testimonialsCompositionTreatmentValues, Br as boxStyleClassNames, Bs as resolveBookingBusinessTimeZone, Bt as eventWeekGroupingContext, C as buildProductListInteractiveIslandProps, Ci as isInlineTextEmpty, Cn as shouldReserveFeatureCardIconZone, Cr as richTextFragment, Ct as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, D as membershipClassesLabel, Dn as markEditableSurfaceForwarding, Dr as faqHeadingFragment, Dt as offeringRunLifecycle, E as membershipCardListContent, En as composeHeaderSectionWrapperClassName, Er as faqAccordionFragment, Et as normalizeOfferingsPreviewItemLimit, F as buildEventCalendarListingDisplay, Fo as featureCardCompositionTreatmentValues, Fr as heroCtaRowFragment, Ft as ThemedDownloadLink, G as catalogueEventCardProps, Gi as getLocalMinuteOfDay, Gn as buildFormInteractiveIslandProps, Go as bindingSchema, Gs as isPublicEventPricingOptionDisplayable, Gt as eventDateOptions, H as eventCollectionDisplaySchemaShape, Hr as resolveCardRoleForBoxStyles, Hs as toUtcIsoDateTimeString, Io as introCompositionTreatmentValues, Ir as ctaRowFragment, Is as getBookingLocalDateKey, It as getIconComponent, Ji as getDayOfWeek, Jn as defineInteractiveIslandMetaKeys, Jr as resolveBackgroundColorValue, Js as publicEventPricingType, Jt as formatDate, K as listingEventCardProps, Ki as addDays, Kn as buildInteractiveIslandProps, Ks as publicEventPricingCurrency, L as eventListingBlockDefinition, Lo as offeringsPreviewCompositionTreatmentValues, Lr as isBlockButtonRole, Lt as SpinnerNode, M as offeringsCatalogueShape, Ma as arrangementManifestFromVariants, Mn as teamMemberCardBiography, Mr as testimonialsCarouselFragment, Mt as ThemedAuthoredButton, N as eventCalendarBlockDefinition, Nn as readRuntimeNow, Nr as testimonialsHeadingFragment, Ns as formatBookingCompactEnglishTime, Nt as ThemedButton, O as passCardListContent, Oi as parseFieldDefinitions, On as splitPositioningClasses, Or as blogFeaturedPostFragment, Os as mapDrawingSchema, Ot as offeringsListingFor, P as buildEventCalendarInteractiveIslandProps, Pa as resolveEffectiveArrangement, Pi as eventReadinessResultSchema, Pn as resolveDateRuntimeContext, Pr as ctaCopyFragment, Ps as toScheduledBookingDateTime, Pt as ThemedButtonLink, Q as MediaNodeServer, Qa as generateFooterCss, Qi as isSameCalendarDay, Qn as listItemPresentation, Qr as defineFragment, Qt as formatEventHourLabel, R as buildEventListingInteractiveIslandProps, Rr as heroCopyFragment, Rt as buildEventListWeek, S as buildProductDetailInteractiveIslandProps, Si as inlineTextToPlainText, Sn as resolveFeatureCardGeneratedIconSizePx, Ss as decideLocationSourcePermission, T as shopProductPresentation, Tr as cardFragment, Tt as groupOfferingRunsByCourse, U as eventCollectionHydrationSchema, Ut as buildCalendarViewport, V as buildEventCollectionListingDisplay, Vr as normalizeBoxStylesBorder, Vs as toBookingTimeZone, W as eventCollectionSourceSchemaShape, Wa as requireCuratedSiteStyle, Wi as getLocalDateKey, Wn as formBlockDefinition, Ws as formatBookingPriceDisplay, Xa as resolveCardRole, Xi as getWeekCalendarDayTuple, Xn as defineClientOwnedBlockRuntime, Xt as formatEventCompactDateRail, Y as cardListPresentationSchemaShape, Yi as getOrderedDayNames, Yn as createZodCodec, Yr as ctaButton, Yt as formatEventClockLabel, Za as generateDefaultCardSystem, Zi as getWeekCalendarDays, Zn as defineProgressiveBlockRuntime, Zr as bodyCopyFragment, Zs as formatCurrencyAmount, Zt as formatEventDateParts, _ as productDetailBlockDefinition, _i as FileAudioIcon, _r as formatEventPriceAmount, _s as parseMailingListRuntimeContext, _t as previewStageSchema, a as normalizeLocationMapProps, aa as beforeBookingQuestionsPresentationSchema, ai as runTransforms, an as resolveEventTimeZone, ar as Grid, as as hiddenFromVisitors, b as buildCartInteractiveIslandProps, ba as effectiveHeaderNavLinkStyle, bi as MinusIcon, bn as groupPublicEventsByRun, bo as anglePolygonCss, bs as sameMailingListPlacementTargeting, c as newsletterSignupBlockDefinition, ci as buildGeneratedBlockIconRenderAssetLookupFromUnknown, cn as bookingPresentation, cs as unavailableReadinessFact, ct as getCurrentResolveImageUrlContext, d as buildNewsletterFormInteractiveIslandProps, da as isObjectRecord, di as ArrowDownIcon, dn as pageNavigationSchema, ds as CANCELLED_SESSION_STATUS, dt as getCardOrientation, eo as generateNavLinkCSS, er as listLookSlot, et as ImagePresets, f as newsletterBlockSubmissionMessage, fa as isRecord$4, fi as ChevronDownIcon, fn as closedRunCopy, fs as firstLiveRunSessionStartMs, ft as getContainerClass, g as cartBlockDefinition, gi as FileArchiveIcon, gn as formatTotalCapacity, gr as formatEventPrice, gs as buildMailingListSignupBlockSourceRef, gt as bookingNowSchema, h as checkoutBlockDefinition, ha as AFFORDANCE_SUPPRESS_CLASS, hi as ClockIcon, hn as formatEventRemainingPlaces, hr as formatCoursePrice, hs as resolveWholeSeriesBookingPhase, ht as resolveEventRegistrationEventSource, ia as bookingConsentCarrierSchema, in as groupEventsByDate, is as admitReadinessFacts, j as buildOfferingsCatalogueListing, ji as eventReadinessLoaderKey, jn as teamMemberBiography, jr as formCopyFragment, jt as resolveOfferingsRenderInput, k as offeringsPreviewBlockDefinition, ki as PUBLIC_DOWNLOAD_MEDIA_TYPES, kr as singleButtonFragment, ks as formatDate$1, kt as resolveOfferingsPreviewGroupCta, li as parseBlockIconValue, ln as browserReadAuthoritySchema, lt as setContextResolveImageUrlContext, m as buildGiftingInteractiveIslandProps, ma as themeButtonSelector, mi as CirclePlusIcon, ms as orderedLiveRunSessions, mt as buildEventRegistrationInteractiveIslandProps, na as blockBookingPaymentTermsSchema, no as generateInteractiveChildInheritanceCSS, nr as resolvedItemSurfaceProps, o as normalizeLocationMapSource, oa as sanitizeHref, oi as el, on as resolveRuntimeEventDestination, oo as headerNeedsPhotoShade, or as clsx, os as loadedReadinessFact, ot as resolvePublicMediaUrl, p as giftingBlockDefinition, pa as parseThemeButtonVariantId, pi as CircleMinusIcon, pn as bookingPageKindSchema, po as boundaryRuntimeMetricsForDecorativeTransition, pt as eventRegistrationBlockDefinition, q as CardListContentPart, qi as formatDateKey, qn as createInteractiveIslandCodec, qs as publicEventPricingDisplay, qt as formatCalendarTitle, r as normalizeBlockContent, ra as blockBookingConsentSchema, rc as TokenResolver, rn as formatTime, rr as itemRole, rs as chosenString, s as resolveLocationMapLocation, si as when, so as headerRootPaint, ss as pageTemplateFromEntry, st as buildResolveImageUrlContext, t as getBlockDefinition, ta as publicEventsArraySchema, tn as formatEventTimeRange, to as generateEffectsCSS, tr as lookListPresentationSchemaShape, tt as MediaPlaceholder, u as NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, ui as resolveBlockIconRenderValue, un as blockSiteTermsSchema, ut as EventQuickFacts, v as productListBlockDefinition, va as selectItemSurfacePresentation, vi as FileSpreadsheetIcon, vn as getEventAvailabilityStatus, vt as normalizeEventRegistrationPageSurfaceSubject, w as buildShopInteractiveIslandProps, wa as arrangementLookHooks, wi as parseInlineTextFromUnknown, wr as headingFragment, ws as normalizeLocationAddressText, wt as buildOfferingsPreviewListing, x as buildCheckoutInteractiveIslandProps, xa as readOpeningToneProjection, xi as PlusIcon, xn as FEATURE_CARD_ICON_TREATMENTS, xo as transitionCatalogueEntries, y as shopBlockDefinition, yi as FileTextIcon, yn as isEventFull, ys as parseMailingListPlacementTargeting, yt as resolveEventRegistrationScopedEvents, z as buildEventCollectionDisplay, zn as staticHeaderChromeRuntime, zs as parseLocalScheduleTime, zt as eventListWeekDays } from "./registry-BMCfcev6.mjs";
|
|
4
|
+
import { B as certifyPaint, C as materializeRuntimeButtonAppearance, F as resolveSurfaceForeground, G as resolveOpaqueSurfaceHex, H as inkReference, L as surfaceInkPublication, N as freezeOwnedThemeValue, O as mapButtonVisualAppearances, P as ownedThemeSnapshot, S as buttonTypographyDeclarations, V as contrastThresholdByPolicy, W as resolveConcreteColorHex, 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, z as HOVER_TEXT_THRESHOLD } from "./accessibleSurfaces-Dbd2__Le.mjs";
|
|
5
|
+
import { h as surfaceCardRoleValues, s as boxBackgroundSchema, x as siteChromeBackgroundOverrideOwner } from "./schema-D5Vfmqzw.mjs";
|
|
6
|
+
import { l as renderableMediaAssetSchema, o as runtimeMediaSchema } from "./media-luf7RF22.mjs";
|
|
7
7
|
import { t as assertNever$1 } from "./assert-never-ku-PUn9U.mjs";
|
|
8
|
-
import { A as MQ_TABLET_ONLY, D as MQ_MD_UP, E as MQ_MD_DOWN, O as MQ_SM_DOWN, T as MQ_LG_UP, c as readSdkPreviewPublishedPlacement, g as validateManifestDraft, k as MQ_SM_UP, m as compileManifestContentContract } from "./pageRuntimeSupport-
|
|
8
|
+
import { A as MQ_TABLET_ONLY, D as MQ_MD_UP, E as MQ_MD_DOWN, O as MQ_SM_DOWN, T as MQ_LG_UP, c as readSdkPreviewPublishedPlacement, g as validateManifestDraft, k as MQ_SM_UP, m as compileManifestContentContract } from "./pageRuntimeSupport-DWspU5EZ.mjs";
|
|
9
9
|
import { n as RichTextDocSchema } from "./richTextSchema-QLaQrbII.mjs";
|
|
10
|
-
import { n as opaqueSurfaceDeclarations, t as opaqueSurfaceContextFromTheme } from "./opaqueSurface-
|
|
11
|
-
import { A as cardDecorationPseudoRules, C as generateOpaquePanelCss, D as generateShadowCssVars, E as resolvedButtonFocusDeclarations, O as renderCssDeclarations, S as generateCheckableCss, T as resolvedButtonColourDeclarations, _ 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, k as cardBorderDeclarations, 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 RESOLVED_BUTTON_DISABLED_DECLARATIONS, x as generateInputGroupCss, y as INPUT_GROUP_FOCUS_SELECTOR } from "./ThemeScopeCore-
|
|
12
|
-
import { c as
|
|
13
|
-
import { t as parseThemeForPersistence } from "./parseThemeForPersistence-
|
|
10
|
+
import { n as opaqueSurfaceDeclarations, t as opaqueSurfaceContextFromTheme } from "./opaqueSurface-COEKXVwk.mjs";
|
|
11
|
+
import { A as cardDecorationPseudoRules, C as generateOpaquePanelCss, D as generateShadowCssVars, E as resolvedButtonFocusDeclarations, O as renderCssDeclarations, S as generateCheckableCss, T as resolvedButtonColourDeclarations, _ 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, k as cardBorderDeclarations, 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 RESOLVED_BUTTON_DISABLED_DECLARATIONS, x as generateInputGroupCss, y as INPUT_GROUP_FOCUS_SELECTOR } from "./ThemeScopeCore-D1NTXZdX.mjs";
|
|
12
|
+
import { c as mergeHeaderNavTypographyPreference, l as readHeaderNavFontSizePreference } from "./bindings-Dge4sqel.mjs";
|
|
13
|
+
import { t as parseThemeForPersistence } from "./parseThemeForPersistence-CtgRtvo3.mjs";
|
|
14
14
|
import { n as mapOutlineBlocks } from "./pageRegions-BaeEF2MU.mjs";
|
|
15
15
|
import { t as getAtPath } from "./src-Cxucn-1P.mjs";
|
|
16
16
|
import * as React$1 from "react";
|
|
@@ -2166,26 +2166,22 @@ function generateHeaderNavLinkStyles(header, themeId, tokens, theme, contrastTre
|
|
|
2166
2166
|
//#endregion
|
|
2167
2167
|
//#region ../theme-core/src/header/generateHeaderLogoStyles.ts
|
|
2168
2168
|
function generateHeaderLogoStyles(input) {
|
|
2169
|
-
const { logo, themeId
|
|
2169
|
+
const { logo, themeId } = input;
|
|
2170
2170
|
return `\n${`:where([data-theme-scope="${themeId}"]) .header-logo-text`} {\n ${[
|
|
2171
2171
|
...logoTextColorRules(input),
|
|
2172
2172
|
logo?.fontFamily === "body" ? "font-family: var(--font-body);" : "font-family: var(--font-heading);",
|
|
2173
2173
|
...logoLetterSpacingRules(logo),
|
|
2174
|
-
...logoGradientRules(logo, tokens),
|
|
2175
2174
|
...logoContrastRules(input)
|
|
2176
2175
|
].join("\n ")}\n}\n${mobilePanelLogoColor(input)}`;
|
|
2177
2176
|
}
|
|
2178
2177
|
function mobilePanelLogoColor(input) {
|
|
2179
|
-
if (input.logo?.gradient) return "";
|
|
2180
2178
|
const { themeId, tokens, textColor, fallbackTextColor } = input;
|
|
2181
2179
|
const fallback = tokens.getColor(textColor ?? fallbackTextColor ?? "text");
|
|
2182
2180
|
return `\n${`:where([data-theme-scope="${themeId}"]) .nav-mobile-panel .header-logo-text`},\n${`:where(.nav-mobile-panel[data-theme-scope="${themeId}"]) .header-logo-text`} {\n color: ${surfaceForegroundValue("text", fallback)};\n}\n`;
|
|
2183
2181
|
}
|
|
2184
2182
|
function logoTextColorRules(input) {
|
|
2185
|
-
const {
|
|
2186
|
-
|
|
2187
|
-
const authoredColor = tokens.getColor(textColor ?? fallbackTextColor ?? "text");
|
|
2188
|
-
return [`color: ${useSurfaceTextColor ? surfaceForegroundValue("text", authoredColor) : authoredColor};`];
|
|
2183
|
+
const { textColor, fallbackTextColor, tokens } = input;
|
|
2184
|
+
return [`color: ${surfaceForegroundValue("text", tokens.getColor(textColor ?? fallbackTextColor ?? "text"))};`];
|
|
2189
2185
|
}
|
|
2190
2186
|
function logoLetterSpacingRules(logo) {
|
|
2191
2187
|
const spacing = logo?.letterSpacing;
|
|
@@ -2196,18 +2192,7 @@ function logoLetterSpacingRules(logo) {
|
|
|
2196
2192
|
widest: "0.15em"
|
|
2197
2193
|
}[spacing]};`];
|
|
2198
2194
|
}
|
|
2199
|
-
function logoGradientRules(logo, tokens) {
|
|
2200
|
-
if (!logo?.gradient) return [];
|
|
2201
|
-
return [
|
|
2202
|
-
`background: linear-gradient(to right, ${tokens.getColor("primary")}, ${tokens.getColor("accent")});`,
|
|
2203
|
-
"-webkit-background-clip: text;",
|
|
2204
|
-
"-webkit-text-fill-color: transparent;",
|
|
2205
|
-
"background-clip: text;",
|
|
2206
|
-
"color: transparent;"
|
|
2207
|
-
];
|
|
2208
|
-
}
|
|
2209
2195
|
function logoContrastRules(input) {
|
|
2210
|
-
if (input.logo?.gradient || input.useSurfaceTextColor) return [];
|
|
2211
2196
|
const colorToken = input.textColor?.trim() || input.fallbackTextColor?.trim() || "text";
|
|
2212
2197
|
const shadow = buildTextContrastShadow({
|
|
2213
2198
|
theme: input.theme,
|
|
@@ -2242,8 +2227,7 @@ function generateHeaderCss(options) {
|
|
|
2242
2227
|
theme,
|
|
2243
2228
|
textColor: header.textColor,
|
|
2244
2229
|
fallbackTextColor: header.navLinkStyle?.colorToken,
|
|
2245
|
-
contrastTreatment: headerContrastTreatment ?? void 0
|
|
2246
|
-
useSurfaceTextColor: header.background?.contentOwner === siteChromeBackgroundOverrideOwner
|
|
2230
|
+
contrastTreatment: header.background?.contentOwner === "site-chrome-editor" ? void 0 : headerContrastTreatment ?? void 0
|
|
2247
2231
|
}));
|
|
2248
2232
|
cssChunks.push(generateLogoTextBehaviorStyles(header.logoText, themeId));
|
|
2249
2233
|
cssChunks.push(generateHeaderNavLinkStyles(header, themeId, tokens, theme, headerContrastTreatment, headerNavTextSize));
|
|
@@ -2255,7 +2239,7 @@ function generateHeaderCss(options) {
|
|
|
2255
2239
|
cssChunks.push(generateMobilePanelStyles(themeId, dropdown));
|
|
2256
2240
|
if (header.variant === "floating" && header.container) cssChunks.push(generateFloatingContainerStyles(header, themeId, tokens, responsiveMode));
|
|
2257
2241
|
cssChunks.push(generateNavContainerStyles(header, themeId, tokens, theme, solvedInks));
|
|
2258
|
-
cssChunks.push(generateHeaderCtaTreatmentStyles(header, themeId, tokens));
|
|
2242
|
+
cssChunks.push(generateHeaderCtaTreatmentStyles(header, themeId, tokens, headerGroundButton(header, theme)));
|
|
2259
2243
|
cssChunks.push(generateCtaGapStyles(header, themeId));
|
|
2260
2244
|
return cssChunks.filter(Boolean).join("\n\n");
|
|
2261
2245
|
}
|
|
@@ -2587,10 +2571,10 @@ const HEADER_CTA_GAP_MAP = {
|
|
|
2587
2571
|
* Keep the shared button's structure/effects while making the header own the
|
|
2588
2572
|
* palette relationship for both desktop and mobile CTAs.
|
|
2589
2573
|
*/
|
|
2590
|
-
function generateHeaderCtaTreatmentStyles(header, themeId, tokens) {
|
|
2574
|
+
function generateHeaderCtaTreatmentStyles(header, themeId, tokens, groundButton) {
|
|
2591
2575
|
if (header.ctaTreatment !== "inverted") return "";
|
|
2592
2576
|
const desktopSelector = `:where([data-theme-scope="${themeId}"]) .header-cta`;
|
|
2593
|
-
const mobileSelector = `:where([data-theme-scope="${themeId}"]) .nav-mobile-cta`;
|
|
2577
|
+
const mobileSelector = `:where([data-theme-scope="${themeId}"]) :is(.nav-mobile-cta, .header-mobile-bar-cta)`;
|
|
2594
2578
|
const selectors = `${desktopSelector},\n${mobileSelector}`;
|
|
2595
2579
|
const hoverSelectors = [
|
|
2596
2580
|
`${desktopSelector}:hover`,
|
|
@@ -2601,10 +2585,10 @@ function generateHeaderCtaTreatmentStyles(header, themeId, tokens) {
|
|
|
2601
2585
|
const focusSelectors = [`${desktopSelector}:focus-visible`, `${mobileSelector}:focus-visible`].join(",\n");
|
|
2602
2586
|
return `
|
|
2603
2587
|
${selectors} {
|
|
2604
|
-
background-color: ${tokens.getColor("background")};
|
|
2588
|
+
background-color: ${groundButton?.backgroundCss ?? tokens.getColor("background")};
|
|
2605
2589
|
background-image: none;
|
|
2606
|
-
color: ${tokens.getColor("onBackground")};
|
|
2607
|
-
border-color: currentColor;
|
|
2590
|
+
color: ${groundButton?.foregroundCss ?? tokens.getColor("onBackground")};
|
|
2591
|
+
border-color: ${groundButton?.backgroundCss ?? "currentColor"};
|
|
2608
2592
|
}
|
|
2609
2593
|
|
|
2610
2594
|
${hoverSelectors} {
|
|
@@ -2621,6 +2605,24 @@ ${focusSelectors} {
|
|
|
2621
2605
|
`;
|
|
2622
2606
|
}
|
|
2623
2607
|
/**
|
|
2608
|
+
* A style that names the main button's label colour on the header's own
|
|
2609
|
+
* ground (issue 1713) dresses the inverted CTA as that button, with its fill
|
|
2610
|
+
* as the edge. The colours come from the shared solid-button resolution, so the
|
|
2611
|
+
* label falls back exactly as that button's would. Styles that name only a fill
|
|
2612
|
+
* keep the page-colour CTA with its outline.
|
|
2613
|
+
*/
|
|
2614
|
+
function headerGroundButton(header, theme) {
|
|
2615
|
+
const ground = header.background?.type === "color" ? header.background.color : void 0;
|
|
2616
|
+
const request = typeof ground === "string" ? theme.buttons?.surfaceContexts?.[ground] : void 0;
|
|
2617
|
+
if (!request?.primaryText) return null;
|
|
2618
|
+
const resolved = resolveSolidButtonColour({
|
|
2619
|
+
variantId: "primary",
|
|
2620
|
+
state: "base",
|
|
2621
|
+
palette: expandPalette(theme.palette)
|
|
2622
|
+
}, request.primary, request.primaryText);
|
|
2623
|
+
return resolved.ok ? resolved.colour : null;
|
|
2624
|
+
}
|
|
2625
|
+
/**
|
|
2624
2626
|
* Generate CTA button gap styles (left margin between nav links and CTA)
|
|
2625
2627
|
*/
|
|
2626
2628
|
function generateCtaGapStyles(header, themeId) {
|
|
@@ -2688,6 +2690,18 @@ const waveMaskSvgPaths = {
|
|
|
2688
2690
|
bold: "M0 72V44C90 14 270 14 360 44C450 74 630 74 720 44C810 14 990 14 1080 44C1170 74 1350 74 1440 44V72H0Z",
|
|
2689
2691
|
drift: "M0 72V39C115 31 205 54 340 48C505 41 610 16 760 33C920 51 1015 64 1160 44C1280 27 1375 35 1440 50V72H0Z"
|
|
2690
2692
|
};
|
|
2693
|
+
/**
|
|
2694
|
+
* The arc (issue 1713): the next section's colour rises to a shallow peak in the
|
|
2695
|
+
* middle. With echo, two lines follow the arc below it, cut part-way into the
|
|
2696
|
+
* shape so the colour behind shows through them; that keeps them a blend of the
|
|
2697
|
+
* two sections' colours, whatever the palette. They fade out towards the peak.
|
|
2698
|
+
*/
|
|
2699
|
+
const arcShapePath = "M0 110V60Q720 -30 1440 60V110Z";
|
|
2700
|
+
const arcEchoLinePaths = ["M0 84Q720 -6 1440 84", "M0 102Q720 12 1440 102"];
|
|
2701
|
+
function arcMaskDataUrl(echo) {
|
|
2702
|
+
const lines = arcEchoLinePaths.map((d) => `<path d='${d}' fill='none' stroke='url(#fade)' stroke-width='1.5' vector-effect='non-scaling-stroke'/>`).join("");
|
|
2703
|
+
return svgDataUrl(`<svg viewBox='0 0 1440 110' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'>${echo ? `<defs><linearGradient id='fade' gradientUnits='userSpaceOnUse' x1='0' y1='0' x2='1440' y2='0'><stop offset='0' stop-color='black' stop-opacity='0.42'/><stop offset='0.5' stop-color='black' stop-opacity='0'/><stop offset='1' stop-color='black' stop-opacity='0.42'/></linearGradient><mask id='lines'><rect width='1440' height='110' fill='white'/>${lines}</mask></defs><path d='${arcShapePath}' fill='white' mask='url(#lines)'/>` : `<path d='${arcShapePath}' fill='white'/>`}</svg>`);
|
|
2704
|
+
}
|
|
2691
2705
|
function waveMaskDataUrl(mask) {
|
|
2692
2706
|
return svgDataUrl(`<svg viewBox='0 0 1440 72' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><path d='${waveMaskSvgPaths[mask]}' fill='white'/></svg>`);
|
|
2693
2707
|
}
|
|
@@ -2767,18 +2781,8 @@ function shapeDeclarations(entry) {
|
|
|
2767
2781
|
"background: linear-gradient(to bottom, transparent 0%, var(--boundary-shape-paint) 100%);",
|
|
2768
2782
|
"background: linear-gradient(to bottom, transparent 0%, color-mix(in srgb, var(--boundary-shape-paint) 16%, transparent) 34%, color-mix(in srgb, var(--boundary-shape-paint) 68%, transparent) 78%, var(--boundary-shape-paint) 100%);"
|
|
2769
2783
|
];
|
|
2770
|
-
case "wave":
|
|
2771
|
-
|
|
2772
|
-
return [
|
|
2773
|
-
"background: var(--boundary-shape-paint);",
|
|
2774
|
-
`mask-image: url("${mask}");`,
|
|
2775
|
-
"mask-repeat: no-repeat;",
|
|
2776
|
-
"mask-size: 100% 100%;",
|
|
2777
|
-
`-webkit-mask-image: url("${mask}");`,
|
|
2778
|
-
"-webkit-mask-repeat: no-repeat;",
|
|
2779
|
-
"-webkit-mask-size: 100% 100%;"
|
|
2780
|
-
];
|
|
2781
|
-
}
|
|
2784
|
+
case "wave": return maskDeclarations(waveMaskDataUrl(entry.shape.mask));
|
|
2785
|
+
case "arc": return [...maskDeclarations(arcMaskDataUrl(entry.shape.echo === true)), "height: calc(var(--boundary-height) + 2px);"];
|
|
2782
2786
|
case "angle": return [
|
|
2783
2787
|
"height: calc(var(--boundary-height) + 2px);",
|
|
2784
2788
|
"background: var(--boundary-shape-paint);",
|
|
@@ -2786,6 +2790,17 @@ function shapeDeclarations(entry) {
|
|
|
2786
2790
|
];
|
|
2787
2791
|
}
|
|
2788
2792
|
}
|
|
2793
|
+
function maskDeclarations(mask) {
|
|
2794
|
+
return [
|
|
2795
|
+
"background: var(--boundary-shape-paint);",
|
|
2796
|
+
`mask-image: url("${mask}");`,
|
|
2797
|
+
"mask-repeat: no-repeat;",
|
|
2798
|
+
"mask-size: 100% 100%;",
|
|
2799
|
+
`-webkit-mask-image: url("${mask}");`,
|
|
2800
|
+
"-webkit-mask-repeat: no-repeat;",
|
|
2801
|
+
"-webkit-mask-size: 100% 100%;"
|
|
2802
|
+
];
|
|
2803
|
+
}
|
|
2789
2804
|
function rule(selector, declarations) {
|
|
2790
2805
|
return `${selector} {\n ${declarations.join("\n ")}\n}`;
|
|
2791
2806
|
}
|
|
@@ -3722,432 +3737,65 @@ function generateThemeBlockVarsCss(theme, themeId) {
|
|
|
3722
3737
|
});
|
|
3723
3738
|
}
|
|
3724
3739
|
//#endregion
|
|
3725
|
-
//#region ../
|
|
3726
|
-
const defaultBindFrom = "_sectionStyles.headingDecoration";
|
|
3727
|
-
function headingDecoration({ bindFrom = defaultBindFrom, className } = {}) {
|
|
3728
|
-
return el("div", {
|
|
3729
|
-
"aria-hidden": "true",
|
|
3730
|
-
className: "rb-heading-decoration-row"
|
|
3731
|
-
}, [el("div", { className: { $bind: {
|
|
3732
|
-
from: bindFrom,
|
|
3733
|
-
transforms: [{
|
|
3734
|
-
id: "ui.headingDecorationClassName",
|
|
3735
|
-
options: { baseClass: className }
|
|
3736
|
-
}]
|
|
3737
|
-
} } })], when(`${bindFrom}.family`));
|
|
3738
|
-
}
|
|
3739
|
-
//#endregion
|
|
3740
|
-
//#region ../blocks/src/system/fragments/library/headerCta.ts
|
|
3741
|
-
const headerCtaFragment = defineFragment({
|
|
3742
|
-
variantMeaning: { kind: "arrangement" },
|
|
3743
|
-
id: "headerCta",
|
|
3744
|
-
title: "Header CTA",
|
|
3745
|
-
description: "Single call-to-action button for the site header.",
|
|
3746
|
-
fields: [{
|
|
3747
|
-
id: "cta",
|
|
3748
|
-
type: "group",
|
|
3749
|
-
label: "Call to action",
|
|
3750
|
-
description: "Primary action button displayed on CTA variant layouts.",
|
|
3751
|
-
schema: { fields: [
|
|
3752
|
-
{
|
|
3753
|
-
id: "label",
|
|
3754
|
-
type: "text",
|
|
3755
|
-
label: "Label",
|
|
3756
|
-
description: "Button label shown in the header."
|
|
3757
|
-
},
|
|
3758
|
-
{
|
|
3759
|
-
id: "link",
|
|
3760
|
-
type: "link",
|
|
3761
|
-
label: "Link",
|
|
3762
|
-
description: "Select an internal page or provide a custom destination."
|
|
3763
|
-
},
|
|
3764
|
-
{
|
|
3765
|
-
id: "variant",
|
|
3766
|
-
type: "select",
|
|
3767
|
-
label: "Style",
|
|
3768
|
-
defaultValue: "primary",
|
|
3769
|
-
options: [
|
|
3770
|
-
{
|
|
3771
|
-
value: "primary",
|
|
3772
|
-
label: "Primary"
|
|
3773
|
-
},
|
|
3774
|
-
{
|
|
3775
|
-
value: "secondary",
|
|
3776
|
-
label: "Secondary"
|
|
3777
|
-
},
|
|
3778
|
-
{
|
|
3779
|
-
value: "outline",
|
|
3780
|
-
label: "Outline"
|
|
3781
|
-
}
|
|
3782
|
-
]
|
|
3783
|
-
}
|
|
3784
|
-
] }
|
|
3785
|
-
}],
|
|
3786
|
-
layout: [ctaButton({
|
|
3787
|
-
basePath: "cta",
|
|
3788
|
-
whenPath: "cta.label"
|
|
3789
|
-
})]
|
|
3790
|
-
});
|
|
3791
|
-
//#endregion
|
|
3792
|
-
//#region ../blocks/src/system/fragments/lazyInit.ts
|
|
3793
|
-
let initialized = false;
|
|
3794
|
-
const ALL_FRAGMENTS = [
|
|
3795
|
-
bodyCopyFragment,
|
|
3796
|
-
heroCopyFragment,
|
|
3797
|
-
ctaRowFragment,
|
|
3798
|
-
heroCtaRowFragment,
|
|
3799
|
-
ctaCopyFragment,
|
|
3800
|
-
testimonialsHeadingFragment,
|
|
3801
|
-
testimonialsCarouselFragment,
|
|
3802
|
-
formCopyFragment,
|
|
3803
|
-
formEmbedFragment,
|
|
3804
|
-
headerCtaFragment,
|
|
3805
|
-
singleButtonFragment,
|
|
3806
|
-
blogFeaturedPostFragment,
|
|
3807
|
-
faqHeadingFragment,
|
|
3808
|
-
faqAccordionFragment,
|
|
3809
|
-
cardFragment,
|
|
3810
|
-
headingFragment,
|
|
3811
|
-
richTextFragment
|
|
3812
|
-
];
|
|
3813
|
-
/**
|
|
3814
|
-
* Register all fragment definitions lazily.
|
|
3815
|
-
* This function is called by the registry on first access.
|
|
3816
|
-
*
|
|
3817
|
-
* @param registerFn - Function to register a single fragment
|
|
3818
|
-
*/
|
|
3819
|
-
function lazyRegisterFragments(registerFn) {
|
|
3820
|
-
if (initialized) return;
|
|
3821
|
-
ALL_FRAGMENTS.forEach(registerFn);
|
|
3822
|
-
initialized = true;
|
|
3823
|
-
}
|
|
3824
|
-
//#endregion
|
|
3825
|
-
//#region ../blocks/src/system/fragments/registry.ts
|
|
3826
|
-
const fragmentRegistry = {};
|
|
3827
|
-
/**
|
|
3828
|
-
* Ensure all fragments are registered.
|
|
3829
|
-
* This is called automatically by getFragmentRegistry() and getFragment().
|
|
3830
|
-
* Can also be called explicitly to force registration.
|
|
3831
|
-
*/
|
|
3832
|
-
function ensureInitialized() {
|
|
3833
|
-
lazyRegisterFragments((fragment) => {
|
|
3834
|
-
if (!fragmentRegistry[fragment.id]) fragmentRegistry[fragment.id] = fragment;
|
|
3835
|
-
});
|
|
3836
|
-
}
|
|
3740
|
+
//#region ../calendar/src/lane-packing.ts
|
|
3837
3741
|
/**
|
|
3838
|
-
*
|
|
3839
|
-
* Useful for passing to runtime components.
|
|
3742
|
+
* Assign lanes to a list of intervals.
|
|
3840
3743
|
*
|
|
3841
|
-
*
|
|
3744
|
+
* Returns one result per input in the same order as the input. Internally
|
|
3745
|
+
* sorts a copy by `(start, end, orderKey)` to ensure determinism, then
|
|
3746
|
+
* permutes results back to input order.
|
|
3842
3747
|
*/
|
|
3843
|
-
function
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
const
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
const requestedDate = localDateKey(requested.startsAt, requested.timeZone);
|
|
3865
|
-
return events.find((event) => localDateKey(event.startsAt, event.timeZone) === requestedDate) ?? null;
|
|
3866
|
-
}
|
|
3867
|
-
function selectNextUpcoming(events, nowIso) {
|
|
3868
|
-
return [...events].filter((event) => isFutureOrNow(event.startsAt, nowIso)).sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt))[0] ?? null;
|
|
3869
|
-
}
|
|
3870
|
-
function selectCompletedWholeSeries(events) {
|
|
3871
|
-
if (events.length === 0 || !events.every((event) => event.bookingScope === "whole_series")) return null;
|
|
3872
|
-
return [...events].sort((left, right) => Date.parse(right.startsAt) - Date.parse(left.startsAt))[0] ?? null;
|
|
3873
|
-
}
|
|
3874
|
-
function selectEventDetailsCandidate(events, requested, nowIso) {
|
|
3875
|
-
const selected = selectRequested(events, requested);
|
|
3876
|
-
if (selected) return {
|
|
3877
|
-
event: selected,
|
|
3878
|
-
mode: "selected"
|
|
3879
|
-
};
|
|
3880
|
-
const upcoming = selectNextUpcoming(events, nowIso);
|
|
3881
|
-
if (upcoming) return {
|
|
3882
|
-
event: upcoming,
|
|
3883
|
-
mode: "next"
|
|
3748
|
+
function assignLanes(intervals) {
|
|
3749
|
+
if (intervals.length === 0) return [];
|
|
3750
|
+
const indexed = intervals.map((interval, index) => ({
|
|
3751
|
+
interval,
|
|
3752
|
+
index
|
|
3753
|
+
}));
|
|
3754
|
+
indexed.sort((left, right) => left.interval.start - right.interval.start || left.interval.end - right.interval.end || left.interval.orderKey.localeCompare(right.interval.orderKey));
|
|
3755
|
+
const results = new Array(intervals.length);
|
|
3756
|
+
let cluster = [];
|
|
3757
|
+
let activeLaneEnds = [];
|
|
3758
|
+
let clusterMaxEnd = -Infinity;
|
|
3759
|
+
const closeCluster = () => {
|
|
3760
|
+
if (cluster.length === 0) return;
|
|
3761
|
+
const laneCount = Math.max(1, cluster.reduce((max, entry) => Math.max(max, entry.laneIndex + 1), 0));
|
|
3762
|
+
for (const entry of cluster) results[entry.index] = {
|
|
3763
|
+
laneIndex: entry.laneIndex,
|
|
3764
|
+
laneCount
|
|
3765
|
+
};
|
|
3766
|
+
cluster = [];
|
|
3767
|
+
activeLaneEnds = [];
|
|
3768
|
+
clusterMaxEnd = -Infinity;
|
|
3884
3769
|
};
|
|
3885
|
-
const
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3770
|
+
for (const { interval, index } of indexed) {
|
|
3771
|
+
if (interval.start >= clusterMaxEnd) closeCluster();
|
|
3772
|
+
const laneIndex = firstAvailableLane(activeLaneEnds, interval.start);
|
|
3773
|
+
activeLaneEnds[laneIndex] = interval.end;
|
|
3774
|
+
clusterMaxEnd = Math.max(clusterMaxEnd, interval.end);
|
|
3775
|
+
cluster.push({
|
|
3776
|
+
index,
|
|
3777
|
+
laneIndex
|
|
3778
|
+
});
|
|
3779
|
+
}
|
|
3780
|
+
closeCluster();
|
|
3781
|
+
return results;
|
|
3782
|
+
}
|
|
3783
|
+
function firstAvailableLane(activeLaneEnds, start) {
|
|
3784
|
+
const laneIndex = activeLaneEnds.findIndex((end) => end <= start);
|
|
3785
|
+
return laneIndex >= 0 ? laneIndex : activeLaneEnds.length;
|
|
3890
3786
|
}
|
|
3891
3787
|
//#endregion
|
|
3892
|
-
//#region ../
|
|
3788
|
+
//#region ../calendar/src/timetable.ts
|
|
3893
3789
|
/**
|
|
3894
|
-
*
|
|
3790
|
+
* Timetable model — the package's core surface.
|
|
3895
3791
|
*
|
|
3896
|
-
*
|
|
3897
|
-
*
|
|
3898
|
-
*
|
|
3899
|
-
* path selects a run whose identity spans every one of its sessions. This
|
|
3900
|
-
* module parses those cases once, so the renderer switches over a closed set of
|
|
3901
|
-
* page states instead of probing booking scopes at render time.
|
|
3792
|
+
* Generic over `T`. Takes a list of timed items + a viewport; returns a
|
|
3793
|
+
* day-by-day layout with overlap-packed lanes and percent-based positions
|
|
3794
|
+
* plus a diagnostics list for items dropped during processing.
|
|
3902
3795
|
*
|
|
3903
|
-
*
|
|
3904
|
-
*
|
|
3905
|
-
*
|
|
3906
|
-
* own life, come from `@riverbankcms/core`: the same authority the
|
|
3907
|
-
* public read projection and the write-side run-facts loader use, so a run
|
|
3908
|
-
* cannot report itself open on the storefront and closed at the point of
|
|
3909
|
-
* booking.
|
|
3910
|
-
*/
|
|
3911
|
-
function planWholeSeriesParentBooking(eligibleRuns) {
|
|
3912
|
-
const [first, ...rest] = eligibleRuns;
|
|
3913
|
-
return rest.length === 0 ? {
|
|
3914
|
-
kind: "single",
|
|
3915
|
-
run: first
|
|
3916
|
-
} : {
|
|
3917
|
-
kind: "choice",
|
|
3918
|
-
runs: eligibleRuns
|
|
3919
|
-
};
|
|
3920
|
-
}
|
|
3921
|
-
function isOrdinaryPublicEvent(event) {
|
|
3922
|
-
return event.bookingScope === "single_occurrence";
|
|
3923
|
-
}
|
|
3924
|
-
/**
|
|
3925
|
-
* Whether a parent Event page advertises this run.
|
|
3926
|
-
*
|
|
3927
|
-
* Visibility admission belongs to the scoped public read. Active, still-open
|
|
3928
|
-
* admitted runs are advertised, and a run that has started,
|
|
3929
|
-
* finished or been cancelled is informational wherever it appears.
|
|
3930
|
-
*
|
|
3931
|
-
* Capacity is deliberately not consulted (decision A24/A30): a full date is
|
|
3932
|
-
* still one of the dates on offer, and its own page shows the full or waitlist
|
|
3933
|
-
* state that the registration engine decides. Hiding it here would leave a
|
|
3934
|
-
* visitor unable to see that the date exists at all.
|
|
3935
|
-
*/
|
|
3936
|
-
function resolveWholeSeriesChooserEligibility(group, now) {
|
|
3937
|
-
const status = group.representative.status;
|
|
3938
|
-
if (status !== void 0 && status !== "active") return {
|
|
3939
|
-
kind: "excluded",
|
|
3940
|
-
reason: "series-not-active"
|
|
3941
|
-
};
|
|
3942
|
-
const phase = resolveWholeSeriesBookingPhase(group.run, now);
|
|
3943
|
-
return phase.kind === "open" ? { kind: "eligible" } : {
|
|
3944
|
-
kind: "excluded",
|
|
3945
|
-
reason: phase.reason
|
|
3946
|
-
};
|
|
3947
|
-
}
|
|
3948
|
-
/**
|
|
3949
|
-
* Runs in the order a visitor reads them: soonest first session first.
|
|
3950
|
-
*
|
|
3951
|
-
* A run with no session left to attend has no place in the sequence, so it
|
|
3952
|
-
* sorts last rather than being given an arbitrary date.
|
|
3953
|
-
*/
|
|
3954
|
-
function orderRunsBySchedule(groups) {
|
|
3955
|
-
return [...groups].sort((left, right) => {
|
|
3956
|
-
const leftStart = firstLiveRunSessionStartMs(left.run.sessions);
|
|
3957
|
-
const rightStart = firstLiveRunSessionStartMs(right.run.sessions);
|
|
3958
|
-
if (leftStart === null) return rightStart === null ? 0 : 1;
|
|
3959
|
-
if (rightStart === null) return -1;
|
|
3960
|
-
return leftStart - rightStart;
|
|
3961
|
-
});
|
|
3962
|
-
}
|
|
3963
|
-
function asNonEmpty(groups) {
|
|
3964
|
-
const [first, ...rest] = groups;
|
|
3965
|
-
return first ? [first, ...rest] : null;
|
|
3966
|
-
}
|
|
3967
|
-
/**
|
|
3968
|
-
* What a parent Event path selects.
|
|
3969
|
-
*
|
|
3970
|
-
* The scoped read admits public and unlisted runs for the offering's own page.
|
|
3971
|
-
* The chooser lists the ones still open; when none is, the most recent
|
|
3972
|
-
* admitted run supplies the page's name and copy. Runs from another offering
|
|
3973
|
-
* cannot speak for this page.
|
|
3974
|
-
*/
|
|
3975
|
-
function planWholeSeriesParentSelection(input) {
|
|
3976
|
-
const offeringRuns = orderRunsBySchedule(groupPublicEventsByRun(input.events).filter((group) => group.run.eventOfferingId === input.offeringId));
|
|
3977
|
-
const eligibleRuns = asNonEmpty(offeringRuns.filter((group) => resolveWholeSeriesChooserEligibility(group, input.now).kind === "eligible"));
|
|
3978
|
-
if (eligibleRuns) return {
|
|
3979
|
-
kind: "wholeSeriesParent",
|
|
3980
|
-
admittedRuns: offeringRuns,
|
|
3981
|
-
offeringId: input.offeringId,
|
|
3982
|
-
eligibleRuns
|
|
3983
|
-
};
|
|
3984
|
-
const informationalRun = offeringRuns.at(-1);
|
|
3985
|
-
return informationalRun ? {
|
|
3986
|
-
kind: "wholeSeriesParentUnavailable",
|
|
3987
|
-
admittedRuns: offeringRuns,
|
|
3988
|
-
offeringId: input.offeringId,
|
|
3989
|
-
informationalRun,
|
|
3990
|
-
bookingClosedDetail: resolveParentBookingClosedDetail(offeringRuns, input.now)
|
|
3991
|
-
} : null;
|
|
3992
|
-
}
|
|
3993
|
-
/**
|
|
3994
|
-
* What a course page says when none of its runs is bookable.
|
|
3995
|
-
*
|
|
3996
|
-
* A run whose page is up without bookings carries its own reason, so the course
|
|
3997
|
-
* speaks for the runs it has: if any of them was live and has been taken
|
|
3998
|
-
* offline the course is closed for now, and otherwise it is waiting to open. A
|
|
3999
|
-
* course whose runs are simply cancelled, under way or finished carries no
|
|
4000
|
-
* reason at all, and the page keeps the words it already has for that.
|
|
4001
|
-
*
|
|
4002
|
-
* Only a run with a session still to come counts. A run that was paused a year
|
|
4003
|
-
* ago and whose dates have all passed says nothing about the course now, and
|
|
4004
|
-
* letting it speak would tell a visitor that a newly announced run is closed.
|
|
4005
|
-
*/
|
|
4006
|
-
function resolveParentBookingClosedDetail(runs, now) {
|
|
4007
|
-
const details = runs.flatMap((group) => {
|
|
4008
|
-
const detail = group.representative.bookingClosedDetail;
|
|
4009
|
-
return detail && hasSessionAhead(group, now) ? [detail] : [];
|
|
4010
|
-
});
|
|
4011
|
-
if (details.length === 0) return null;
|
|
4012
|
-
return details.some((detail) => detail.kind === "paused") ? { kind: "paused" } : { kind: "opensSoon" };
|
|
4013
|
-
}
|
|
4014
|
-
/** Whether the run still has a session a visitor could attend. */
|
|
4015
|
-
function hasSessionAhead(group, now) {
|
|
4016
|
-
return orderedLiveRunSessions(group.run.sessions).some((session) => Date.parse(session.startsAt) > now.getTime());
|
|
4017
|
-
}
|
|
4018
|
-
/** What a targeted run path selects, when the named run projected any data. */
|
|
4019
|
-
function planWholeSeriesRunSelection(input) {
|
|
4020
|
-
const group = groupPublicEventsByRun(input.events).find((candidate) => candidate.eventSeriesId === input.eventSeriesId);
|
|
4021
|
-
if (!group) return null;
|
|
4022
|
-
return {
|
|
4023
|
-
kind: "wholeSeriesRun",
|
|
4024
|
-
offeringId: group.run.eventOfferingId,
|
|
4025
|
-
run: group
|
|
4026
|
-
};
|
|
4027
|
-
}
|
|
4028
|
-
/**
|
|
4029
|
-
* The Event record that speaks for a selection.
|
|
4030
|
-
*
|
|
4031
|
-
* Page metadata, the destination mode and the shared presentation all need one
|
|
4032
|
-
* record; every variant has one, so callers never re-derive it.
|
|
4033
|
-
*/
|
|
4034
|
-
function selectionRepresentativeEvent(selection) {
|
|
4035
|
-
switch (selection.kind) {
|
|
4036
|
-
case "occurrence": return selection.event;
|
|
4037
|
-
case "wholeSeriesParent": return selection.eligibleRuns[0].representative;
|
|
4038
|
-
case "wholeSeriesParentUnavailable": return selection.informationalRun.representative;
|
|
4039
|
-
case "wholeSeriesRun": return selection.run.representative;
|
|
4040
|
-
}
|
|
4041
|
-
}
|
|
4042
|
-
/**
|
|
4043
|
-
* Why this page is not taking bookings, when its own state says so.
|
|
4044
|
-
*
|
|
4045
|
-
* A parent course page answers for its runs; everything else answers for the
|
|
4046
|
-
* record the page is about. `null` leaves the booking column exactly as it was.
|
|
4047
|
-
*/
|
|
4048
|
-
function resolveSelectionBookingClosedDetail(selection) {
|
|
4049
|
-
switch (selection.kind) {
|
|
4050
|
-
case "occurrence": return selection.event.bookingClosedDetail ?? null;
|
|
4051
|
-
case "wholeSeriesRun": return selection.run.representative.bookingClosedDetail ?? null;
|
|
4052
|
-
case "wholeSeriesParent": return null;
|
|
4053
|
-
case "wholeSeriesParentUnavailable": return selection.bookingClosedDetail;
|
|
4054
|
-
}
|
|
4055
|
-
}
|
|
4056
|
-
function planDropInPanel(selection) {
|
|
4057
|
-
const detail = resolveSelectionBookingClosedDetail(selection);
|
|
4058
|
-
if (detail === null) return { kind: "comeAlong" };
|
|
4059
|
-
switch (detail.kind) {
|
|
4060
|
-
case "opensSoon":
|
|
4061
|
-
case "paused": return { kind: "notRunning" };
|
|
4062
|
-
}
|
|
4063
|
-
}
|
|
4064
|
-
function getPublicEventCanonicalPath(event) {
|
|
4065
|
-
if (event.path) return event.path;
|
|
4066
|
-
return event.destination.kind === "native" ? event.destination.path : null;
|
|
4067
|
-
}
|
|
4068
|
-
function eventOccurrenceContext(event) {
|
|
4069
|
-
return {
|
|
4070
|
-
id: event.occurrenceId,
|
|
4071
|
-
seriesId: event.seriesId,
|
|
4072
|
-
startsAt: event.startsAt,
|
|
4073
|
-
endsAt: event.endsAt,
|
|
4074
|
-
timeZone: event.timeZone
|
|
4075
|
-
};
|
|
4076
|
-
}
|
|
4077
|
-
//#endregion
|
|
4078
|
-
//#region ../blocks/src/system/runtime/nodes/events/domain/bookability.ts
|
|
4079
|
-
/**
|
|
4080
|
-
* Whether a public event has a registration path a visitor can take.
|
|
4081
|
-
*
|
|
4082
|
-
* Lifecycle admission comes from the public booking-availability contract;
|
|
4083
|
-
* capacity comes from the shared event-domain helpers so uncapped, fallback,
|
|
4084
|
-
* and hybrid attendance-mode cases agree with the registration runtime.
|
|
4085
|
-
*/
|
|
4086
|
-
function isBookableEvent(event) {
|
|
4087
|
-
if (!event.requiresRegistration) return false;
|
|
4088
|
-
if (event.bookingAvailability.kind !== "open") return false;
|
|
4089
|
-
return !isEventFull(event) || canJoinEventWaitlistOnAnyMode(event);
|
|
4090
|
-
}
|
|
4091
|
-
//#endregion
|
|
4092
|
-
//#region ../calendar/src/lane-packing.ts
|
|
4093
|
-
/**
|
|
4094
|
-
* Assign lanes to a list of intervals.
|
|
4095
|
-
*
|
|
4096
|
-
* Returns one result per input in the same order as the input. Internally
|
|
4097
|
-
* sorts a copy by `(start, end, orderKey)` to ensure determinism, then
|
|
4098
|
-
* permutes results back to input order.
|
|
4099
|
-
*/
|
|
4100
|
-
function assignLanes(intervals) {
|
|
4101
|
-
if (intervals.length === 0) return [];
|
|
4102
|
-
const indexed = intervals.map((interval, index) => ({
|
|
4103
|
-
interval,
|
|
4104
|
-
index
|
|
4105
|
-
}));
|
|
4106
|
-
indexed.sort((left, right) => left.interval.start - right.interval.start || left.interval.end - right.interval.end || left.interval.orderKey.localeCompare(right.interval.orderKey));
|
|
4107
|
-
const results = new Array(intervals.length);
|
|
4108
|
-
let cluster = [];
|
|
4109
|
-
let activeLaneEnds = [];
|
|
4110
|
-
let clusterMaxEnd = -Infinity;
|
|
4111
|
-
const closeCluster = () => {
|
|
4112
|
-
if (cluster.length === 0) return;
|
|
4113
|
-
const laneCount = Math.max(1, cluster.reduce((max, entry) => Math.max(max, entry.laneIndex + 1), 0));
|
|
4114
|
-
for (const entry of cluster) results[entry.index] = {
|
|
4115
|
-
laneIndex: entry.laneIndex,
|
|
4116
|
-
laneCount
|
|
4117
|
-
};
|
|
4118
|
-
cluster = [];
|
|
4119
|
-
activeLaneEnds = [];
|
|
4120
|
-
clusterMaxEnd = -Infinity;
|
|
4121
|
-
};
|
|
4122
|
-
for (const { interval, index } of indexed) {
|
|
4123
|
-
if (interval.start >= clusterMaxEnd) closeCluster();
|
|
4124
|
-
const laneIndex = firstAvailableLane(activeLaneEnds, interval.start);
|
|
4125
|
-
activeLaneEnds[laneIndex] = interval.end;
|
|
4126
|
-
clusterMaxEnd = Math.max(clusterMaxEnd, interval.end);
|
|
4127
|
-
cluster.push({
|
|
4128
|
-
index,
|
|
4129
|
-
laneIndex
|
|
4130
|
-
});
|
|
4131
|
-
}
|
|
4132
|
-
closeCluster();
|
|
4133
|
-
return results;
|
|
4134
|
-
}
|
|
4135
|
-
function firstAvailableLane(activeLaneEnds, start) {
|
|
4136
|
-
const laneIndex = activeLaneEnds.findIndex((end) => end <= start);
|
|
4137
|
-
return laneIndex >= 0 ? laneIndex : activeLaneEnds.length;
|
|
4138
|
-
}
|
|
4139
|
-
//#endregion
|
|
4140
|
-
//#region ../calendar/src/timetable.ts
|
|
4141
|
-
/**
|
|
4142
|
-
* Timetable model — the package's core surface.
|
|
4143
|
-
*
|
|
4144
|
-
* Generic over `T`. Takes a list of timed items + a viewport; returns a
|
|
4145
|
-
* day-by-day layout with overlap-packed lanes and percent-based positions
|
|
4146
|
-
* plus a diagnostics list for items dropped during processing.
|
|
4147
|
-
*
|
|
4148
|
-
* The function is pure: given identical input (including `now`), it returns
|
|
4149
|
-
* the same output. The model has no opinion on what an item is — pass
|
|
4150
|
-
* accessors.
|
|
3796
|
+
* The function is pure: given identical input (including `now`), it returns
|
|
3797
|
+
* the same output. The model has no opinion on what an item is — pass
|
|
3798
|
+
* accessors.
|
|
4151
3799
|
*/
|
|
4152
3800
|
const DEFAULT_BOUNDS = {
|
|
4153
3801
|
minStartHour: 5,
|
|
@@ -4333,75 +3981,477 @@ function buildCell(entry, lane, rangeStartMinutes, rangeMinutes, minHeightPercen
|
|
|
4333
3981
|
color: entry.segment.draft.color
|
|
4334
3982
|
};
|
|
4335
3983
|
}
|
|
4336
|
-
function resolveBounds(bounds) {
|
|
4337
|
-
return {
|
|
4338
|
-
...DEFAULT_BOUNDS,
|
|
4339
|
-
...bounds
|
|
3984
|
+
function resolveBounds(bounds) {
|
|
3985
|
+
return {
|
|
3986
|
+
...DEFAULT_BOUNDS,
|
|
3987
|
+
...bounds
|
|
3988
|
+
};
|
|
3989
|
+
}
|
|
3990
|
+
function resolveHourRange(segments, bounds) {
|
|
3991
|
+
if (segments.length === 0) return {
|
|
3992
|
+
startHour: bounds.defaultStartHour,
|
|
3993
|
+
endHour: bounds.defaultEndHour
|
|
3994
|
+
};
|
|
3995
|
+
const earliestStart = Math.min(...segments.map((segment) => segment.startsAtMinutes));
|
|
3996
|
+
const latestEnd = Math.max(...segments.map((segment) => segment.endsAtMinutes));
|
|
3997
|
+
const startHour = Math.max(bounds.minStartHour, Math.floor((earliestStart - bounds.marginMinutes) / 60));
|
|
3998
|
+
const endHour = Math.min(bounds.maxEndHour, Math.ceil((latestEnd + bounds.marginMinutes) / 60));
|
|
3999
|
+
return {
|
|
4000
|
+
startHour,
|
|
4001
|
+
endHour: Math.max(startHour + 1, endHour)
|
|
4002
|
+
};
|
|
4003
|
+
}
|
|
4004
|
+
function fixedHourRange(hours) {
|
|
4005
|
+
const startHour = Math.min(23, Math.max(0, Math.floor(hours.startHour)));
|
|
4006
|
+
return {
|
|
4007
|
+
startHour,
|
|
4008
|
+
endHour: Math.min(24, Math.max(startHour + 1, Math.ceil(hours.endHour)))
|
|
4009
|
+
};
|
|
4010
|
+
}
|
|
4011
|
+
function buildHourTicks(startHour, endHour) {
|
|
4012
|
+
const ticks = [];
|
|
4013
|
+
for (let hour = startHour; hour <= endHour; hour += 1) ticks.push(hour);
|
|
4014
|
+
return ticks;
|
|
4015
|
+
}
|
|
4016
|
+
function groupSegmentsByDate(segments) {
|
|
4017
|
+
const grouped = /* @__PURE__ */ new Map();
|
|
4018
|
+
for (const segment of segments) {
|
|
4019
|
+
const existing = grouped.get(segment.dateKey) ?? [];
|
|
4020
|
+
existing.push(segment);
|
|
4021
|
+
grouped.set(segment.dateKey, existing);
|
|
4022
|
+
}
|
|
4023
|
+
return grouped;
|
|
4024
|
+
}
|
|
4025
|
+
function toRangePercent(minutes, rangeMinutes) {
|
|
4026
|
+
if (rangeMinutes <= 0) return 0;
|
|
4027
|
+
return minutes / rangeMinutes * 100;
|
|
4028
|
+
}
|
|
4029
|
+
function getTimetableDays(viewDate, view, startOfWeek) {
|
|
4030
|
+
if (view === "day") return [viewDate];
|
|
4031
|
+
return getWeekCalendarDays(viewDate, startOfWeek);
|
|
4032
|
+
}
|
|
4033
|
+
function enumerateDateKeys(startDateKey, endDateKey) {
|
|
4034
|
+
if (startDateKey > endDateKey) throw new Error(`Invalid timetable date range: ${startDateKey} is after ${endDateKey}`);
|
|
4035
|
+
const start = parseDateKey(startDateKey);
|
|
4036
|
+
parseDateKey(endDateKey);
|
|
4037
|
+
const keys = [];
|
|
4038
|
+
let cursor = start;
|
|
4039
|
+
while (formatDateKey(cursor) <= endDateKey) {
|
|
4040
|
+
keys.push(formatDateKey(cursor));
|
|
4041
|
+
cursor = addDays(cursor, 1);
|
|
4042
|
+
}
|
|
4043
|
+
return keys;
|
|
4044
|
+
}
|
|
4045
|
+
function parseDateKey(dateKey) {
|
|
4046
|
+
const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(dateKey);
|
|
4047
|
+
if (match === null) throw new Error(`Invalid timetable date key: ${dateKey}`);
|
|
4048
|
+
const [, year, month, day] = match;
|
|
4049
|
+
return {
|
|
4050
|
+
year: Number(year),
|
|
4051
|
+
month: Number(month),
|
|
4052
|
+
day: Number(day)
|
|
4053
|
+
};
|
|
4054
|
+
}
|
|
4055
|
+
//#endregion
|
|
4056
|
+
//#region ../blocks/src/system/node/fragments/headingDecoration.ts
|
|
4057
|
+
const defaultBindFrom = "_sectionStyles.headingDecoration";
|
|
4058
|
+
function headingDecoration({ bindFrom = defaultBindFrom, className } = {}) {
|
|
4059
|
+
return el("div", {
|
|
4060
|
+
"aria-hidden": "true",
|
|
4061
|
+
className: "rb-heading-decoration-row"
|
|
4062
|
+
}, [el("div", { className: { $bind: {
|
|
4063
|
+
from: bindFrom,
|
|
4064
|
+
transforms: [{
|
|
4065
|
+
id: "ui.headingDecorationClassName",
|
|
4066
|
+
options: { baseClass: className }
|
|
4067
|
+
}]
|
|
4068
|
+
} } })], when(`${bindFrom}.family`));
|
|
4069
|
+
}
|
|
4070
|
+
//#endregion
|
|
4071
|
+
//#region ../blocks/src/system/fragments/library/headerCta.ts
|
|
4072
|
+
const headerCtaFragment = defineFragment({
|
|
4073
|
+
variantMeaning: { kind: "arrangement" },
|
|
4074
|
+
id: "headerCta",
|
|
4075
|
+
title: "Header CTA",
|
|
4076
|
+
description: "Single call-to-action button for the site header.",
|
|
4077
|
+
fields: [{
|
|
4078
|
+
id: "cta",
|
|
4079
|
+
type: "group",
|
|
4080
|
+
label: "Call to action",
|
|
4081
|
+
description: "Primary action button displayed on CTA variant layouts.",
|
|
4082
|
+
schema: { fields: [
|
|
4083
|
+
{
|
|
4084
|
+
id: "label",
|
|
4085
|
+
type: "text",
|
|
4086
|
+
label: "Label",
|
|
4087
|
+
description: "Button label shown in the header."
|
|
4088
|
+
},
|
|
4089
|
+
{
|
|
4090
|
+
id: "link",
|
|
4091
|
+
type: "link",
|
|
4092
|
+
label: "Link",
|
|
4093
|
+
description: "Select an internal page or provide a custom destination."
|
|
4094
|
+
},
|
|
4095
|
+
{
|
|
4096
|
+
id: "variant",
|
|
4097
|
+
type: "select",
|
|
4098
|
+
label: "Style",
|
|
4099
|
+
defaultValue: "primary",
|
|
4100
|
+
options: [
|
|
4101
|
+
{
|
|
4102
|
+
value: "primary",
|
|
4103
|
+
label: "Primary"
|
|
4104
|
+
},
|
|
4105
|
+
{
|
|
4106
|
+
value: "secondary",
|
|
4107
|
+
label: "Secondary"
|
|
4108
|
+
},
|
|
4109
|
+
{
|
|
4110
|
+
value: "outline",
|
|
4111
|
+
label: "Outline"
|
|
4112
|
+
}
|
|
4113
|
+
]
|
|
4114
|
+
}
|
|
4115
|
+
] }
|
|
4116
|
+
}],
|
|
4117
|
+
layout: [ctaButton({
|
|
4118
|
+
basePath: "cta",
|
|
4119
|
+
whenPath: "cta.label"
|
|
4120
|
+
})]
|
|
4121
|
+
});
|
|
4122
|
+
//#endregion
|
|
4123
|
+
//#region ../blocks/src/system/fragments/lazyInit.ts
|
|
4124
|
+
let initialized = false;
|
|
4125
|
+
const ALL_FRAGMENTS = [
|
|
4126
|
+
bodyCopyFragment,
|
|
4127
|
+
heroCopyFragment,
|
|
4128
|
+
ctaRowFragment,
|
|
4129
|
+
heroCtaRowFragment,
|
|
4130
|
+
ctaCopyFragment,
|
|
4131
|
+
testimonialsHeadingFragment,
|
|
4132
|
+
testimonialsCarouselFragment,
|
|
4133
|
+
formCopyFragment,
|
|
4134
|
+
formEmbedFragment,
|
|
4135
|
+
headerCtaFragment,
|
|
4136
|
+
singleButtonFragment,
|
|
4137
|
+
blogFeaturedPostFragment,
|
|
4138
|
+
faqHeadingFragment,
|
|
4139
|
+
faqAccordionFragment,
|
|
4140
|
+
cardFragment,
|
|
4141
|
+
headingFragment,
|
|
4142
|
+
richTextFragment
|
|
4143
|
+
];
|
|
4144
|
+
/**
|
|
4145
|
+
* Register all fragment definitions lazily.
|
|
4146
|
+
* This function is called by the registry on first access.
|
|
4147
|
+
*
|
|
4148
|
+
* @param registerFn - Function to register a single fragment
|
|
4149
|
+
*/
|
|
4150
|
+
function lazyRegisterFragments(registerFn) {
|
|
4151
|
+
if (initialized) return;
|
|
4152
|
+
ALL_FRAGMENTS.forEach(registerFn);
|
|
4153
|
+
initialized = true;
|
|
4154
|
+
}
|
|
4155
|
+
//#endregion
|
|
4156
|
+
//#region ../blocks/src/system/fragments/registry.ts
|
|
4157
|
+
const fragmentRegistry = {};
|
|
4158
|
+
/**
|
|
4159
|
+
* Ensure all fragments are registered.
|
|
4160
|
+
* This is called automatically by getFragmentRegistry() and getFragment().
|
|
4161
|
+
* Can also be called explicitly to force registration.
|
|
4162
|
+
*/
|
|
4163
|
+
function ensureInitialized() {
|
|
4164
|
+
lazyRegisterFragments((fragment) => {
|
|
4165
|
+
if (!fragmentRegistry[fragment.id]) fragmentRegistry[fragment.id] = fragment;
|
|
4166
|
+
});
|
|
4167
|
+
}
|
|
4168
|
+
/**
|
|
4169
|
+
* Get the full fragment registry.
|
|
4170
|
+
* Useful for passing to runtime components.
|
|
4171
|
+
*
|
|
4172
|
+
* @returns The complete fragment registry
|
|
4173
|
+
*/
|
|
4174
|
+
function getFragmentRegistry() {
|
|
4175
|
+
ensureInitialized();
|
|
4176
|
+
return fragmentRegistry;
|
|
4177
|
+
}
|
|
4178
|
+
//#endregion
|
|
4179
|
+
//#region ../blocks/src/system/blocks/events/shared/detailsSelection.ts
|
|
4180
|
+
function isFutureOrNow(iso, nowIso) {
|
|
4181
|
+
const ts = Date.parse(iso);
|
|
4182
|
+
const now = Date.parse(nowIso);
|
|
4183
|
+
if (!Number.isFinite(ts) || !Number.isFinite(now)) return false;
|
|
4184
|
+
return ts >= now;
|
|
4185
|
+
}
|
|
4186
|
+
const localDateKey = (startsAt, timeZone) => getBookingLocalDateKey(toScheduledBookingDateTime({
|
|
4187
|
+
startsAt,
|
|
4188
|
+
timeZone
|
|
4189
|
+
}));
|
|
4190
|
+
function selectRequested(events, requested) {
|
|
4191
|
+
if (!requested) return null;
|
|
4192
|
+
const byId = events.find((event) => event.occurrenceId === requested.id || event.id === requested.id);
|
|
4193
|
+
if (byId) return byId;
|
|
4194
|
+
if (!requested.startsAt || !requested.timeZone) return null;
|
|
4195
|
+
const requestedDate = localDateKey(requested.startsAt, requested.timeZone);
|
|
4196
|
+
return events.find((event) => localDateKey(event.startsAt, event.timeZone) === requestedDate) ?? null;
|
|
4197
|
+
}
|
|
4198
|
+
function selectNextUpcoming(events, nowIso) {
|
|
4199
|
+
return [...events].filter((event) => isFutureOrNow(event.startsAt, nowIso)).sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt))[0] ?? null;
|
|
4200
|
+
}
|
|
4201
|
+
function selectCompletedWholeSeries(events) {
|
|
4202
|
+
if (events.length === 0 || !events.every((event) => event.bookingScope === "whole_series")) return null;
|
|
4203
|
+
return [...events].sort((left, right) => Date.parse(right.startsAt) - Date.parse(left.startsAt))[0] ?? null;
|
|
4204
|
+
}
|
|
4205
|
+
function selectEventDetailsCandidate(events, requested, nowIso) {
|
|
4206
|
+
const selected = selectRequested(events, requested);
|
|
4207
|
+
if (selected) return {
|
|
4208
|
+
event: selected,
|
|
4209
|
+
mode: "selected"
|
|
4210
|
+
};
|
|
4211
|
+
const upcoming = selectNextUpcoming(events, nowIso);
|
|
4212
|
+
if (upcoming) return {
|
|
4213
|
+
event: upcoming,
|
|
4214
|
+
mode: "next"
|
|
4215
|
+
};
|
|
4216
|
+
const completed = selectCompletedWholeSeries(events);
|
|
4217
|
+
return completed ? {
|
|
4218
|
+
event: completed,
|
|
4219
|
+
mode: "completed"
|
|
4220
|
+
} : null;
|
|
4221
|
+
}
|
|
4222
|
+
//#endregion
|
|
4223
|
+
//#region ../blocks/src/system/blocks/events/shared/pageSelection.ts
|
|
4224
|
+
/**
|
|
4225
|
+
* What a system-managed Event URL actually selected.
|
|
4226
|
+
*
|
|
4227
|
+
* The resolver used to assume that one returned `PublicEvent` meant one
|
|
4228
|
+
* occurrence. A whole-series Event breaks that assumption in two directions: a
|
|
4229
|
+
* parent Event path selects nothing concrete until a run is chosen, and a run
|
|
4230
|
+
* path selects a run whose identity spans every one of its sessions. This
|
|
4231
|
+
* module parses those cases once, so the renderer switches over a closed set of
|
|
4232
|
+
* page states instead of probing booking scopes at render time.
|
|
4233
|
+
*
|
|
4234
|
+
* Everything here is pure. Loading events and resolving run slugs is the
|
|
4235
|
+
* resolver's job; deciding what the page is and which runs the chooser
|
|
4236
|
+
* advertises happens here. When a run is open to join, and where it sits in its
|
|
4237
|
+
* own life, come from `@riverbankcms/core`: the same authority the
|
|
4238
|
+
* public read projection and the write-side run-facts loader use, so a run
|
|
4239
|
+
* cannot report itself open on the storefront and closed at the point of
|
|
4240
|
+
* booking.
|
|
4241
|
+
*/
|
|
4242
|
+
function planWholeSeriesParentBooking(eligibleRuns) {
|
|
4243
|
+
const [first, second, ...rest] = eligibleRuns;
|
|
4244
|
+
if (!second) return {
|
|
4245
|
+
kind: "single",
|
|
4246
|
+
run: first
|
|
4247
|
+
};
|
|
4248
|
+
return eligibleRuns.every((group) => group.representative.allowsMultipleBooking) ? {
|
|
4249
|
+
kind: "bookTogether",
|
|
4250
|
+
runs: [
|
|
4251
|
+
first,
|
|
4252
|
+
second,
|
|
4253
|
+
...rest
|
|
4254
|
+
]
|
|
4255
|
+
} : {
|
|
4256
|
+
kind: "choice",
|
|
4257
|
+
runs: eligibleRuns
|
|
4258
|
+
};
|
|
4259
|
+
}
|
|
4260
|
+
function isOrdinaryPublicEvent(event) {
|
|
4261
|
+
return event.bookingScope === "single_occurrence";
|
|
4262
|
+
}
|
|
4263
|
+
/**
|
|
4264
|
+
* What a series' own page shows when its URL names no date.
|
|
4265
|
+
*
|
|
4266
|
+
* Two or more dates a visitor can book make a choice: the page lists every
|
|
4267
|
+
* date whose booking is open and lets the visitor pick, so a full date still
|
|
4268
|
+
* shows as full rather than vanishing. One bookable date isn't a choice, so the
|
|
4269
|
+
* page books that date. With none, the first date speaks for the page and shows
|
|
4270
|
+
* its own full or closed state.
|
|
4271
|
+
*
|
|
4272
|
+
* The caller passes every date it read for the series, not the cards a listing
|
|
4273
|
+
* happened to show, so the one-date shortcut is decided on the complete set.
|
|
4274
|
+
* "Has places" isn't enough on its own: only a date whose booking is open
|
|
4275
|
+
* counts, and a drop-in date never does.
|
|
4276
|
+
*/
|
|
4277
|
+
function planOrdinarySeriesSelection(events) {
|
|
4278
|
+
const ordinary = events.filter(isOrdinaryPublicEvent);
|
|
4279
|
+
const firstSeriesId = ordinary[0]?.seriesId;
|
|
4280
|
+
if (!firstSeriesId || ordinary.some((event) => event.seriesId !== firstSeriesId)) return null;
|
|
4281
|
+
const [first, second] = ordinary.filter(isBookableEvent);
|
|
4282
|
+
if (first && second) {
|
|
4283
|
+
const [a, b, ...rest] = [...ordinary].filter(isOpenForBooking).sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt));
|
|
4284
|
+
if (a && b) return {
|
|
4285
|
+
kind: "dateChoice",
|
|
4286
|
+
dates: [
|
|
4287
|
+
a,
|
|
4288
|
+
b,
|
|
4289
|
+
...rest
|
|
4290
|
+
]
|
|
4291
|
+
};
|
|
4292
|
+
}
|
|
4293
|
+
const event = first ?? ordinary[0];
|
|
4294
|
+
return event ? {
|
|
4295
|
+
kind: "occurrence",
|
|
4296
|
+
event
|
|
4297
|
+
} : null;
|
|
4298
|
+
}
|
|
4299
|
+
function isOpenForBooking(event) {
|
|
4300
|
+
return event.requiresRegistration && event.bookingAvailability.kind === "open";
|
|
4301
|
+
}
|
|
4302
|
+
/**
|
|
4303
|
+
* Whether a parent Event page advertises this run.
|
|
4304
|
+
*
|
|
4305
|
+
* Visibility admission belongs to the scoped public read. Active, still-open
|
|
4306
|
+
* admitted runs are advertised, and a run that has started,
|
|
4307
|
+
* finished or been cancelled is informational wherever it appears.
|
|
4308
|
+
*
|
|
4309
|
+
* Capacity is deliberately not consulted (decision A24/A30): a full date is
|
|
4310
|
+
* still one of the dates on offer, and its own page shows the full or waitlist
|
|
4311
|
+
* state that the registration engine decides. Hiding it here would leave a
|
|
4312
|
+
* visitor unable to see that the date exists at all.
|
|
4313
|
+
*/
|
|
4314
|
+
function resolveWholeSeriesChooserEligibility(group, now) {
|
|
4315
|
+
const status = group.representative.status;
|
|
4316
|
+
if (status !== void 0 && status !== "active") return {
|
|
4317
|
+
kind: "excluded",
|
|
4318
|
+
reason: "series-not-active"
|
|
4319
|
+
};
|
|
4320
|
+
const phase = resolveWholeSeriesBookingPhase(group.run, now);
|
|
4321
|
+
return phase.kind === "open" ? { kind: "eligible" } : {
|
|
4322
|
+
kind: "excluded",
|
|
4323
|
+
reason: phase.reason
|
|
4324
|
+
};
|
|
4325
|
+
}
|
|
4326
|
+
/**
|
|
4327
|
+
* Runs in the order a visitor reads them: soonest first session first.
|
|
4328
|
+
*
|
|
4329
|
+
* A run with no session left to attend has no place in the sequence, so it
|
|
4330
|
+
* sorts last rather than being given an arbitrary date.
|
|
4331
|
+
*/
|
|
4332
|
+
function orderRunsBySchedule(groups) {
|
|
4333
|
+
return [...groups].sort((left, right) => {
|
|
4334
|
+
const leftStart = firstLiveRunSessionStartMs(left.run.sessions);
|
|
4335
|
+
const rightStart = firstLiveRunSessionStartMs(right.run.sessions);
|
|
4336
|
+
if (leftStart === null) return rightStart === null ? 0 : 1;
|
|
4337
|
+
if (rightStart === null) return -1;
|
|
4338
|
+
return leftStart - rightStart;
|
|
4339
|
+
});
|
|
4340
|
+
}
|
|
4341
|
+
function asNonEmpty(groups) {
|
|
4342
|
+
const [first, ...rest] = groups;
|
|
4343
|
+
return first ? [first, ...rest] : null;
|
|
4344
|
+
}
|
|
4345
|
+
/**
|
|
4346
|
+
* What a parent Event path selects.
|
|
4347
|
+
*
|
|
4348
|
+
* The scoped read admits public and unlisted runs for the offering's own page.
|
|
4349
|
+
* The chooser lists the ones still open; when none is, the most recent
|
|
4350
|
+
* admitted run supplies the page's name and copy. Runs from another offering
|
|
4351
|
+
* cannot speak for this page.
|
|
4352
|
+
*/
|
|
4353
|
+
function planWholeSeriesParentSelection(input) {
|
|
4354
|
+
const offeringRuns = orderRunsBySchedule(groupPublicEventsByRun(input.events).filter((group) => group.run.eventOfferingId === input.offeringId));
|
|
4355
|
+
const eligibleRuns = asNonEmpty(offeringRuns.filter((group) => resolveWholeSeriesChooserEligibility(group, input.now).kind === "eligible"));
|
|
4356
|
+
if (eligibleRuns) return {
|
|
4357
|
+
kind: "wholeSeriesParent",
|
|
4358
|
+
admittedRuns: offeringRuns,
|
|
4359
|
+
offeringId: input.offeringId,
|
|
4360
|
+
eligibleRuns
|
|
4340
4361
|
};
|
|
4362
|
+
const informationalRun = offeringRuns.at(-1);
|
|
4363
|
+
return informationalRun ? {
|
|
4364
|
+
kind: "wholeSeriesParentUnavailable",
|
|
4365
|
+
admittedRuns: offeringRuns,
|
|
4366
|
+
offeringId: input.offeringId,
|
|
4367
|
+
informationalRun,
|
|
4368
|
+
bookingClosedDetail: resolveParentBookingClosedDetail(offeringRuns, input.now)
|
|
4369
|
+
} : null;
|
|
4341
4370
|
}
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4371
|
+
/**
|
|
4372
|
+
* What a course page says when none of its runs is bookable.
|
|
4373
|
+
*
|
|
4374
|
+
* A run whose page is up without bookings carries its own reason, so the course
|
|
4375
|
+
* speaks for the runs it has: if any of them was live and has been taken
|
|
4376
|
+
* offline the course is closed for now, and otherwise it is waiting to open. A
|
|
4377
|
+
* course whose runs are simply cancelled, under way or finished carries no
|
|
4378
|
+
* reason at all, and the page keeps the words it already has for that.
|
|
4379
|
+
*
|
|
4380
|
+
* Only a run with a session still to come counts. A run that was paused a year
|
|
4381
|
+
* ago and whose dates have all passed says nothing about the course now, and
|
|
4382
|
+
* letting it speak would tell a visitor that a newly announced run is closed.
|
|
4383
|
+
*/
|
|
4384
|
+
function resolveParentBookingClosedDetail(runs, now) {
|
|
4385
|
+
const details = runs.flatMap((group) => {
|
|
4386
|
+
const detail = group.representative.bookingClosedDetail;
|
|
4387
|
+
return detail && hasSessionAhead(group, now) ? [detail] : [];
|
|
4388
|
+
});
|
|
4389
|
+
if (details.length === 0) return null;
|
|
4390
|
+
return details.some((detail) => detail.kind === "paused") ? { kind: "paused" } : { kind: "opensSoon" };
|
|
4355
4391
|
}
|
|
4356
|
-
|
|
4357
|
-
|
|
4392
|
+
/** Whether the run still has a session a visitor could attend. */
|
|
4393
|
+
function hasSessionAhead(group, now) {
|
|
4394
|
+
return orderedLiveRunSessions(group.run.sessions).some((session) => Date.parse(session.startsAt) > now.getTime());
|
|
4395
|
+
}
|
|
4396
|
+
/** What a targeted run path selects, when the named run projected any data. */
|
|
4397
|
+
function planWholeSeriesRunSelection(input) {
|
|
4398
|
+
const group = groupPublicEventsByRun(input.events).find((candidate) => candidate.eventSeriesId === input.eventSeriesId);
|
|
4399
|
+
if (!group) return null;
|
|
4358
4400
|
return {
|
|
4359
|
-
|
|
4360
|
-
|
|
4401
|
+
kind: "wholeSeriesRun",
|
|
4402
|
+
offeringId: group.run.eventOfferingId,
|
|
4403
|
+
run: group
|
|
4361
4404
|
};
|
|
4362
4405
|
}
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4406
|
+
/**
|
|
4407
|
+
* The Event record that speaks for a selection.
|
|
4408
|
+
*
|
|
4409
|
+
* Page metadata, the destination mode and the shared presentation all need one
|
|
4410
|
+
* record; every variant has one, so callers never re-derive it.
|
|
4411
|
+
*/
|
|
4412
|
+
function selectionRepresentativeEvent(selection) {
|
|
4413
|
+
switch (selection.kind) {
|
|
4414
|
+
case "occurrence": return selection.event;
|
|
4415
|
+
case "dateChoice": return selection.dates[0];
|
|
4416
|
+
case "wholeSeriesParent": return selection.eligibleRuns[0].representative;
|
|
4417
|
+
case "wholeSeriesParentUnavailable": return selection.informationalRun.representative;
|
|
4418
|
+
case "wholeSeriesRun": return selection.run.representative;
|
|
4374
4419
|
}
|
|
4375
|
-
return grouped;
|
|
4376
|
-
}
|
|
4377
|
-
function toRangePercent(minutes, rangeMinutes) {
|
|
4378
|
-
if (rangeMinutes <= 0) return 0;
|
|
4379
|
-
return minutes / rangeMinutes * 100;
|
|
4380
4420
|
}
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4421
|
+
/**
|
|
4422
|
+
* Why this page is not taking bookings, when its own state says so.
|
|
4423
|
+
*
|
|
4424
|
+
* A parent course page answers for its runs; everything else answers for the
|
|
4425
|
+
* record the page is about. `null` leaves the booking column exactly as it was.
|
|
4426
|
+
*/
|
|
4427
|
+
function resolveSelectionBookingClosedDetail(selection) {
|
|
4428
|
+
switch (selection.kind) {
|
|
4429
|
+
case "occurrence": return selection.event.bookingClosedDetail ?? null;
|
|
4430
|
+
case "wholeSeriesRun": return selection.run.representative.bookingClosedDetail ?? null;
|
|
4431
|
+
case "dateChoice":
|
|
4432
|
+
case "wholeSeriesParent": return null;
|
|
4433
|
+
case "wholeSeriesParentUnavailable": return selection.bookingClosedDetail;
|
|
4434
|
+
}
|
|
4384
4435
|
}
|
|
4385
|
-
function
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
while (formatDateKey(cursor) <= endDateKey) {
|
|
4392
|
-
keys.push(formatDateKey(cursor));
|
|
4393
|
-
cursor = addDays(cursor, 1);
|
|
4436
|
+
function planDropInPanel(selection) {
|
|
4437
|
+
const detail = resolveSelectionBookingClosedDetail(selection);
|
|
4438
|
+
if (detail === null) return { kind: "comeAlong" };
|
|
4439
|
+
switch (detail.kind) {
|
|
4440
|
+
case "opensSoon":
|
|
4441
|
+
case "paused": return { kind: "notRunning" };
|
|
4394
4442
|
}
|
|
4395
|
-
return keys;
|
|
4396
4443
|
}
|
|
4397
|
-
function
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4444
|
+
function getPublicEventCanonicalPath(event) {
|
|
4445
|
+
if (event.path) return event.path;
|
|
4446
|
+
return event.destination.kind === "native" ? event.destination.path : null;
|
|
4447
|
+
}
|
|
4448
|
+
function eventOccurrenceContext(event) {
|
|
4401
4449
|
return {
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4450
|
+
id: event.occurrenceId,
|
|
4451
|
+
seriesId: event.seriesId,
|
|
4452
|
+
startsAt: event.startsAt,
|
|
4453
|
+
endsAt: event.endsAt,
|
|
4454
|
+
timeZone: event.timeZone
|
|
4405
4455
|
};
|
|
4406
4456
|
}
|
|
4407
4457
|
//#endregion
|
|
@@ -4424,39 +4474,6 @@ function eventVenuePlace(venue) {
|
|
|
4424
4474
|
addressWithBooking: false
|
|
4425
4475
|
};
|
|
4426
4476
|
}
|
|
4427
|
-
/**
|
|
4428
|
-
* Select the next occurrence-targeted events for a quick-book rail.
|
|
4429
|
-
*
|
|
4430
|
-
* The API normally returns valid timestamps, but malformed values sort after
|
|
4431
|
-
* valid events so one bad record cannot displace an otherwise useful rail.
|
|
4432
|
-
* Sorting before deduplication means a duplicate occurrence keeps its earliest
|
|
4433
|
-
* deterministic representation.
|
|
4434
|
-
*/
|
|
4435
|
-
function selectQuickDateEvents(events) {
|
|
4436
|
-
return orderedUniqueEventOccurrences(events.filter((event) => event.bookingScope !== "whole_series" && isBookableEvent(event))).slice(0, 4);
|
|
4437
|
-
}
|
|
4438
|
-
/** Shared ordering and identity selection, independent of booking capacity. */
|
|
4439
|
-
function orderedUniqueEventOccurrences(events) {
|
|
4440
|
-
const sorted = [...events].sort(compareQuickDateEvents);
|
|
4441
|
-
return sorted.filter((event, index) => sorted.findIndex((candidate) => candidate.occurrenceId === event.occurrenceId) === index);
|
|
4442
|
-
}
|
|
4443
|
-
function formatEventQuickDate(event, style = "legacy") {
|
|
4444
|
-
const options = eventDateOptions(event);
|
|
4445
|
-
const dateRail = formatEventCompactDateRail(event.startsAt, options, style === "site" ? "as-written" : "capitals");
|
|
4446
|
-
return {
|
|
4447
|
-
dateTime: event.startsAt,
|
|
4448
|
-
label: `${dateRail.weekday} ${dateRail.day} ${dateRail.month}, ${formatTime(event.startsAt, options)}`
|
|
4449
|
-
};
|
|
4450
|
-
}
|
|
4451
|
-
function compareQuickDateEvents(left, right) {
|
|
4452
|
-
const startsAtOrder = compareTimestamp(left.startsAt, right.startsAt);
|
|
4453
|
-
return startsAtOrder === 0 ? left.occurrenceId.localeCompare(right.occurrenceId) : startsAtOrder;
|
|
4454
|
-
}
|
|
4455
|
-
function compareTimestamp(left, right) {
|
|
4456
|
-
const leftTime = Date.parse(left);
|
|
4457
|
-
const rightTime = Date.parse(right);
|
|
4458
|
-
return (Number.isNaN(leftTime) ? Number.POSITIVE_INFINITY : leftTime) - (Number.isNaN(rightTime) ? Number.POSITIVE_INFINITY : rightTime);
|
|
4459
|
-
}
|
|
4460
4477
|
//#endregion
|
|
4461
4478
|
//#region ../blocks/src/system/runtime/shared/utils/bookingRoute.ts
|
|
4462
4479
|
const BOOK_TARGET_PARAMS = {
|
|
@@ -4893,8 +4910,8 @@ function cropHeightStyle(height, heightAs) {
|
|
|
4893
4910
|
*
|
|
4894
4911
|
* This component is server-safe (uses no client APIs like Intl).
|
|
4895
4912
|
*/
|
|
4896
|
-
const EventCard = ({ event, cardRole = "default", buttonVariant = "primary", buttonText, showVenue = true, showMap = true, mapSlot, allowMap = true, lookSlots, surfacePresentation, showCapacity = true, showImage = true, showCategory = true, showSummary = true, orientation = "vertical", presentation, headingLevel, imageResolveContext }) => {
|
|
4897
|
-
const { presentationClass, cardHeadingLevel, formattedDate, formattedTime, cta, cardClass, title, summary, image, category, categoryBadge, hasImage, dateFact, priceText, teacherLine, capacityText, orientationClass } = eventCardFacts({
|
|
4913
|
+
const EventCard = ({ event, cardRole = "default", buttonVariant = "primary", buttonText, showVenue = true, showMap = true, mapSlot, allowMap = true, lookSlots, surfacePresentation, showCapacity = true, showImage = true, showCategory = true, showSummary = true, orientation = "vertical", presentation, headingLevel, imageResolveContext, now }) => {
|
|
4914
|
+
const { presentationClass, cardHeadingLevel, formattedDate, formattedTime, cta, cardClass, title, runName, summary, image, category, categoryBadge, hasImage, dateFact, priceText, teacherLine, capacityText, orientationClass } = eventCardFacts({
|
|
4898
4915
|
event,
|
|
4899
4916
|
presentation,
|
|
4900
4917
|
headingLevel,
|
|
@@ -4903,7 +4920,8 @@ const EventCard = ({ event, cardRole = "default", buttonVariant = "primary", but
|
|
|
4903
4920
|
showCategory,
|
|
4904
4921
|
showImage,
|
|
4905
4922
|
showCapacity,
|
|
4906
|
-
orientation
|
|
4923
|
+
orientation,
|
|
4924
|
+
now
|
|
4907
4925
|
});
|
|
4908
4926
|
return /* @__PURE__ */ jsxs("article", {
|
|
4909
4927
|
...listLookSlot({
|
|
@@ -4945,7 +4963,8 @@ const EventCard = ({ event, cardRole = "default", buttonVariant = "primary", but
|
|
|
4945
4963
|
showVenue,
|
|
4946
4964
|
summary,
|
|
4947
4965
|
teacherLine,
|
|
4948
|
-
title
|
|
4966
|
+
title,
|
|
4967
|
+
runName
|
|
4949
4968
|
})]
|
|
4950
4969
|
});
|
|
4951
4970
|
};
|
|
@@ -4998,6 +5017,8 @@ function EventCardMedia(props) {
|
|
|
4998
5017
|
}
|
|
4999
5018
|
function EventCardContent(props) {
|
|
5000
5019
|
const { event } = props;
|
|
5020
|
+
const courseSessions = formatCourseSessions(event);
|
|
5021
|
+
const moreDates = formatCourseDatesAfter(event);
|
|
5001
5022
|
const Heading = props.headingLevel === 4 ? "h4" : "h3";
|
|
5002
5023
|
return /* @__PURE__ */ jsxs("div", {
|
|
5003
5024
|
...listLookSlot(props, "item-body"),
|
|
@@ -5018,6 +5039,10 @@ function EventCardContent(props) {
|
|
|
5018
5039
|
children: props.title
|
|
5019
5040
|
})
|
|
5020
5041
|
}),
|
|
5042
|
+
props.runName ? /* @__PURE__ */ jsx("p", {
|
|
5043
|
+
className: "event-card-run-name rb-caption rb-mb-3",
|
|
5044
|
+
children: props.runName
|
|
5045
|
+
}) : null,
|
|
5021
5046
|
/* @__PURE__ */ jsx(EventQuickFacts, {
|
|
5022
5047
|
facts: event.facts,
|
|
5023
5048
|
context: "card"
|
|
@@ -5027,10 +5052,21 @@ function EventCardContent(props) {
|
|
|
5027
5052
|
className: "rb-mb-2 rb-caption",
|
|
5028
5053
|
children: /* @__PURE__ */ jsxs("div", {
|
|
5029
5054
|
className: "rb-flex rb-items-center rb-gap-2",
|
|
5030
|
-
children: [/* @__PURE__ */ jsx(CalendarIcon, { className: "rb-shrink-0" }), /* @__PURE__ */ jsxs("div", { children: [
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5055
|
+
children: [/* @__PURE__ */ jsx(CalendarIcon, { className: "rb-shrink-0" }), /* @__PURE__ */ jsxs("div", { children: [
|
|
5056
|
+
/* @__PURE__ */ jsx("time", { children: props.formattedDate }),
|
|
5057
|
+
moreDates ? /* @__PURE__ */ jsxs("span", {
|
|
5058
|
+
className: "event-card-more-dates",
|
|
5059
|
+
children: [" ", moreDates]
|
|
5060
|
+
}) : null,
|
|
5061
|
+
/* @__PURE__ */ jsx("p", {
|
|
5062
|
+
className: "rb-pl-6",
|
|
5063
|
+
children: props.formattedTime
|
|
5064
|
+
}),
|
|
5065
|
+
courseSessions ? /* @__PURE__ */ jsx("p", {
|
|
5066
|
+
className: "event-card-course-sessions rb-pl-6",
|
|
5067
|
+
children: courseSessions
|
|
5068
|
+
}) : null
|
|
5069
|
+
] })]
|
|
5034
5070
|
})
|
|
5035
5071
|
}),
|
|
5036
5072
|
/* @__PURE__ */ jsx(EventCardVenue, {
|
|
@@ -5155,16 +5191,16 @@ function EventLookDate({ event, ...presentation }) {
|
|
|
5155
5191
|
})]
|
|
5156
5192
|
});
|
|
5157
5193
|
}
|
|
5158
|
-
function eventCardFacts({ event, presentation, headingLevel, buttonText, cardRole, showCategory, showImage, showCapacity, orientation }) {
|
|
5194
|
+
function eventCardFacts({ event, presentation, headingLevel, buttonText, cardRole, showCategory, showImage, showCapacity, orientation, now }) {
|
|
5159
5195
|
const { presentation: cardPresentation, presentationClass, headingLevel: cardHeadingLevel } = resolveEventCardOptions({
|
|
5160
5196
|
presentation,
|
|
5161
5197
|
headingLevel
|
|
5162
5198
|
});
|
|
5163
5199
|
const { formattedDate, formattedTime } = formatEventCardWhen(event);
|
|
5164
|
-
const booking =
|
|
5200
|
+
const booking = eventCardBooking(event, presentation, buttonText, now);
|
|
5165
5201
|
const { cta } = booking;
|
|
5166
5202
|
const cardClass = boxStyleClassNames({ role: cardRole }, { baseClass: "event-card" });
|
|
5167
|
-
const title = event
|
|
5203
|
+
const { title, runName } = eventDisplayTitle(event);
|
|
5168
5204
|
const summary = event.presentation?.summary ?? event.description;
|
|
5169
5205
|
const image = event.presentation?.image ?? null;
|
|
5170
5206
|
const category = event.eventCategory;
|
|
@@ -5176,6 +5212,7 @@ function eventCardFacts({ event, presentation, headingLevel, buttonText, cardRol
|
|
|
5176
5212
|
cta,
|
|
5177
5213
|
cardClass,
|
|
5178
5214
|
title,
|
|
5215
|
+
runName,
|
|
5179
5216
|
summary,
|
|
5180
5217
|
image,
|
|
5181
5218
|
category,
|
|
@@ -5193,6 +5230,9 @@ function eventCardFacts({ event, presentation, headingLevel, buttonText, cardRol
|
|
|
5193
5230
|
orientationClass: eventCardOrientationClass(orientation)
|
|
5194
5231
|
};
|
|
5195
5232
|
}
|
|
5233
|
+
function eventCardBooking(event, presentation, buttonText, now) {
|
|
5234
|
+
return resolveEventCardBooking(event, presentation === "catalogue" ? "series" : "occurrence", buttonText, { now: now ?? null });
|
|
5235
|
+
}
|
|
5196
5236
|
//#endregion
|
|
5197
5237
|
//#region ../blocks/src/system/runtime/nodes/events/shared/EventCompactRow.tsx
|
|
5198
5238
|
/**
|
|
@@ -5246,9 +5286,13 @@ const LegacyEventCompactRow = ({ event, buttonVariant = "primary", buttonText, s
|
|
|
5246
5286
|
children: /* @__PURE__ */ jsx("a", {
|
|
5247
5287
|
className: "event-title-link",
|
|
5248
5288
|
...resolveEventLinkProps(event),
|
|
5249
|
-
children: event.title
|
|
5289
|
+
children: eventDisplayTitle(event).title
|
|
5250
5290
|
})
|
|
5251
5291
|
}),
|
|
5292
|
+
eventDisplayTitle(event).runName ? /* @__PURE__ */ jsx("p", {
|
|
5293
|
+
className: "event-compact-row-run-name rb-caption",
|
|
5294
|
+
children: eventDisplayTitle(event).runName
|
|
5295
|
+
}) : null,
|
|
5252
5296
|
/* @__PURE__ */ jsx(EventQuickFacts, {
|
|
5253
5297
|
facts: event.facts,
|
|
5254
5298
|
context: "card"
|
|
@@ -5310,6 +5354,7 @@ const LegacyEventCompactRow = ({ event, buttonVariant = "primary", buttonText, s
|
|
|
5310
5354
|
* external events retain their canonical destination and target behaviour.
|
|
5311
5355
|
*/
|
|
5312
5356
|
function EventQuickDates({ events, pathname, buttonVariant = "primary", dateStyle }) {
|
|
5357
|
+
const headingId = React.useId();
|
|
5313
5358
|
const quickDateEvents = selectQuickDateEvents(events);
|
|
5314
5359
|
if (quickDateEvents.length === 0) return null;
|
|
5315
5360
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -5317,9 +5362,13 @@ function EventQuickDates({ events, pathname, buttonVariant = "primary", dateStyl
|
|
|
5317
5362
|
"data-event-quick-dates": "true",
|
|
5318
5363
|
children: [/* @__PURE__ */ jsx("h2", {
|
|
5319
5364
|
className: "event-quick-dates-heading",
|
|
5365
|
+
id: headingId,
|
|
5320
5366
|
children: "Next few dates"
|
|
5321
5367
|
}), /* @__PURE__ */ jsx("div", {
|
|
5322
|
-
className: "event-quick-dates-rail rb-overflow-x-auto
|
|
5368
|
+
className: "event-quick-dates-rail rb-overflow-x-auto",
|
|
5369
|
+
role: "region",
|
|
5370
|
+
"aria-labelledby": headingId,
|
|
5371
|
+
tabIndex: 0,
|
|
5323
5372
|
children: quickDateEvents.map((event) => /* @__PURE__ */ jsx(EventQuickDateCard, {
|
|
5324
5373
|
event,
|
|
5325
5374
|
pathname,
|
|
@@ -5360,7 +5409,7 @@ function EventQuickDateCard(props) {
|
|
|
5360
5409
|
const { event } = props;
|
|
5361
5410
|
const { date, bookingLink } = quickDateCardPresentation(props);
|
|
5362
5411
|
return /* @__PURE__ */ jsxs("article", {
|
|
5363
|
-
className: "event-quick-date rb-flex rb-
|
|
5412
|
+
className: "event-quick-date rb-flex rb-flex-col rb-gap-3 rb-rounded-lg rb-border rb-p-4",
|
|
5364
5413
|
children: [
|
|
5365
5414
|
/* @__PURE__ */ jsx("time", {
|
|
5366
5415
|
className: "event-quick-date-when",
|
|
@@ -5436,15 +5485,18 @@ function CalendarDayHeaders({ dayNames }) {
|
|
|
5436
5485
|
* exists so a sold-out or closed offering stays reachable (issue 1372); the
|
|
5437
5486
|
* `.event-title-link` rule lives in theme-core's event-list.css.
|
|
5438
5487
|
*/
|
|
5439
|
-
function OfferingTitle({ className, path, title }) {
|
|
5440
|
-
return /* @__PURE__ */ jsx("h3", {
|
|
5488
|
+
function OfferingTitle({ className, path, title, runName }) {
|
|
5489
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("h3", {
|
|
5441
5490
|
className,
|
|
5442
5491
|
children: path ? /* @__PURE__ */ jsx("a", {
|
|
5443
5492
|
className: "event-title-link",
|
|
5444
5493
|
href: path,
|
|
5445
5494
|
children: title
|
|
5446
5495
|
}) : title
|
|
5447
|
-
})
|
|
5496
|
+
}), runName ? /* @__PURE__ */ jsx("p", {
|
|
5497
|
+
className: "offering-run-name rb-caption",
|
|
5498
|
+
children: runName
|
|
5499
|
+
}) : null] });
|
|
5448
5500
|
}
|
|
5449
5501
|
//#endregion
|
|
5450
5502
|
//#region ../blocks/src/system/data/readinessFacts.ts
|
|
@@ -5459,6 +5511,7 @@ function readinessFactsFromLoaders(stage, input) {
|
|
|
5459
5511
|
const facts = {
|
|
5460
5512
|
mailingList: loaderFactProducers.mailingList(input),
|
|
5461
5513
|
testimonials: loaderFactProducers.testimonials(input),
|
|
5514
|
+
events: loaderFactProducers.events(input),
|
|
5462
5515
|
team: loaderFactProducers.team(input),
|
|
5463
5516
|
forms: loaderFactProducers.forms(input),
|
|
5464
5517
|
products: loaderFactProducers.products(input),
|
|
@@ -5475,6 +5528,7 @@ const loaderFactProducers = {
|
|
|
5475
5528
|
count,
|
|
5476
5529
|
total: "unknown"
|
|
5477
5530
|
})),
|
|
5531
|
+
events: (input) => new Map(projections(input, "events").map(({ id, block }) => [id, loaderFact(input, id, eventReadinessLoaderKey(block.content), eventReadinessResultSchema)])),
|
|
5478
5532
|
team: (input) => firstLoaderFact(input, "team", "members", countSchema),
|
|
5479
5533
|
forms: (input) => new Map(projections(input, "forms").flatMap(({ id, block }) => {
|
|
5480
5534
|
const selection = chosenString(block.requests.form?.params.formSlug ?? block.requests.form?.params.formId);
|
|
@@ -6464,8 +6518,10 @@ const VideoEmbedNode = ({ value, className, style, aspectRatio, blockId: _blockI
|
|
|
6464
6518
|
});
|
|
6465
6519
|
const title = getVideoTitle(embedInfo);
|
|
6466
6520
|
const shouldDeferSrc = getVideoEmbedLoadingStrategy(embedInfo.provider) === "defer-until-near-viewport";
|
|
6521
|
+
const providerHook = "data-slot" in rest ? { "data-video-provider": embedInfo.provider } : {};
|
|
6467
6522
|
return /* @__PURE__ */ jsx("div", {
|
|
6468
6523
|
...rest,
|
|
6524
|
+
...providerHook,
|
|
6469
6525
|
children: /* @__PURE__ */ jsxs("div", {
|
|
6470
6526
|
className,
|
|
6471
6527
|
"data-rb-video-embed-wrapper": shouldDeferSrc ? "true" : void 0,
|
|
@@ -6938,7 +6994,7 @@ function listGroupPresentation(presentation) {
|
|
|
6938
6994
|
* Every renderer of grouped offerings frames its groups from this one answer.
|
|
6939
6995
|
*/
|
|
6940
6996
|
function listGroupFrames(presentation) {
|
|
6941
|
-
const panels = presentation.cardArrangement === "type-columns";
|
|
6997
|
+
const panels = presentation.cardArrangement === "type-columns" || presentation.cardArrangement === "next-cards";
|
|
6942
6998
|
return {
|
|
6943
6999
|
list: panels ? listLookSlot(presentation, "list") : {},
|
|
6944
7000
|
panel: panels ? listLookSlot(presentation, "panel") : {}
|
|
@@ -7539,7 +7595,6 @@ function normalizeBookingSettings(value) {
|
|
|
7539
7595
|
serviceId: readOptionalString(value.serviceId),
|
|
7540
7596
|
serviceIds: readStringArray(value.serviceIds),
|
|
7541
7597
|
resourceId: readOptionalString(value.resourceId),
|
|
7542
|
-
requiresApproval: typeof value.requiresApproval === "boolean" ? value.requiresApproval : void 0,
|
|
7543
7598
|
successMessage: readOptionalString(value.successMessage)
|
|
7544
7599
|
};
|
|
7545
7600
|
}
|
|
@@ -7631,7 +7686,6 @@ const bookingSettingsSchema = z.object({
|
|
|
7631
7686
|
serviceId: z.string().optional(),
|
|
7632
7687
|
serviceIds: z.array(z.string()).optional(),
|
|
7633
7688
|
resourceId: z.string().optional(),
|
|
7634
|
-
requiresApproval: z.boolean().optional(),
|
|
7635
7689
|
successMessage: z.string().optional()
|
|
7636
7690
|
});
|
|
7637
7691
|
const bookingSourceFormSchema = z.object({
|
|
@@ -7669,6 +7723,14 @@ const bookingServiceSchema = z.object({
|
|
|
7669
7723
|
title: z.string(),
|
|
7670
7724
|
description: z.string().nullable().optional().transform((value) => value ?? void 0),
|
|
7671
7725
|
durationMinutes: z.number().optional(),
|
|
7726
|
+
requiresApproval: z.boolean().optional(),
|
|
7727
|
+
onlinePaymentMode: z.enum(["session_or_package", "package_only"]).optional(),
|
|
7728
|
+
onlinePaymentChoices: z.object({
|
|
7729
|
+
perSession: z.boolean(),
|
|
7730
|
+
heldPackage: z.boolean(),
|
|
7731
|
+
buyPackage: z.boolean(),
|
|
7732
|
+
anyAvailable: z.boolean()
|
|
7733
|
+
}).optional(),
|
|
7672
7734
|
pricing: z.custom().optional(),
|
|
7673
7735
|
priceAmount: z.number().nullable().optional(),
|
|
7674
7736
|
priceCurrency: z.string().nullable().optional(),
|
|
@@ -8124,48 +8186,6 @@ function resolveEventDetailsPresentation(input) {
|
|
|
8124
8186
|
};
|
|
8125
8187
|
}
|
|
8126
8188
|
//#endregion
|
|
8127
|
-
//#region ../blocks/src/system/customize/lookParts.ts
|
|
8128
|
-
const lookParts = {
|
|
8129
|
-
"block.cta-full": [{
|
|
8130
|
-
part: "figure",
|
|
8131
|
-
fields: ["figure", "figureNote"],
|
|
8132
|
-
shownIn: ["figure"]
|
|
8133
|
-
}],
|
|
8134
|
-
"block.location-map": [{
|
|
8135
|
-
part: "entrance photo",
|
|
8136
|
-
fields: ["entrancePhoto"],
|
|
8137
|
-
shownIn: ["photo-and-details"]
|
|
8138
|
-
}],
|
|
8139
|
-
"block.feature-cards": [{
|
|
8140
|
-
part: "eyebrow",
|
|
8141
|
-
fields: ["eyebrow"],
|
|
8142
|
-
shownIn: [
|
|
8143
|
-
"lead-support",
|
|
8144
|
-
"index",
|
|
8145
|
-
"sequence",
|
|
8146
|
-
"slides",
|
|
8147
|
-
"track"
|
|
8148
|
-
]
|
|
8149
|
-
}],
|
|
8150
|
-
"block.event-details": [{
|
|
8151
|
-
part: "title",
|
|
8152
|
-
fields: ["showTitle"],
|
|
8153
|
-
shownIn: ["details-panel"]
|
|
8154
|
-
}, {
|
|
8155
|
-
part: "description",
|
|
8156
|
-
fields: ["showDescription"],
|
|
8157
|
-
shownIn: ["details-panel"]
|
|
8158
|
-
}]
|
|
8159
|
-
};
|
|
8160
|
-
/** Fields the arrangement leaves out. Nothing on an older style, where no arrangement Look shows the block. */
|
|
8161
|
-
function fieldsNotShownIn(blockKind, arrangement) {
|
|
8162
|
-
if (arrangement === null) return [];
|
|
8163
|
-
return (lookParts[blockKind] ?? []).flatMap((part) => part.shownIn.includes(arrangement) ? [] : part.fields);
|
|
8164
|
-
}
|
|
8165
|
-
function lookPartShown(blockKind, field, arrangement) {
|
|
8166
|
-
return !fieldsNotShownIn(blockKind, arrangement).includes(field);
|
|
8167
|
-
}
|
|
8168
|
-
//#endregion
|
|
8169
8189
|
//#region ../blocks/src/system/runtime/nodes/event-details/WholeSeriesPricingDisplay.tsx
|
|
8170
8190
|
/** A course lists every active option, whether or not its sale window is open. */
|
|
8171
8191
|
function wholeSeriesPriceOptions(pricing) {
|
|
@@ -8306,10 +8326,13 @@ function EventFacts({ selection, selected, venue, teamMembers, pricing, showCapa
|
|
|
8306
8326
|
children: [/* @__PURE__ */ jsx("div", {
|
|
8307
8327
|
className: "rb-label rb-mb-2",
|
|
8308
8328
|
children: "Places"
|
|
8309
|
-
}), /* @__PURE__ */ jsx("p", { children: formatTotalCapacity(selected.capacity) })]
|
|
8329
|
+
}), /* @__PURE__ */ jsx("p", { children: formatEventRemainingPlaces(selected) ?? formatTotalCapacity(selected.capacity) })]
|
|
8310
8330
|
}) : null,
|
|
8311
8331
|
pricing,
|
|
8312
|
-
selection.kind === "wholeSeries" ? /* @__PURE__ */ jsx(BookingState, {
|
|
8332
|
+
selection.kind === "wholeSeries" ? /* @__PURE__ */ jsx(BookingState, {
|
|
8333
|
+
phase: selection.bookingPhase,
|
|
8334
|
+
event: selected
|
|
8335
|
+
}) : null
|
|
8313
8336
|
]
|
|
8314
8337
|
});
|
|
8315
8338
|
}
|
|
@@ -8378,7 +8401,7 @@ function runLifecycleLabel(lifecycle) {
|
|
|
8378
8401
|
* the booking panel beside it says cancelled is the contradiction a visitor
|
|
8379
8402
|
* actually notices.
|
|
8380
8403
|
*/
|
|
8381
|
-
function BookingState({ phase }) {
|
|
8404
|
+
function BookingState({ phase, event }) {
|
|
8382
8405
|
return /* @__PURE__ */ jsxs("div", {
|
|
8383
8406
|
className: "rb-mt-6",
|
|
8384
8407
|
children: [
|
|
@@ -8386,7 +8409,7 @@ function BookingState({ phase }) {
|
|
|
8386
8409
|
className: "rb-label rb-mb-2",
|
|
8387
8410
|
children: "Booking"
|
|
8388
8411
|
}),
|
|
8389
|
-
/* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: phase.kind === "
|
|
8412
|
+
/* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: phase.kind === "closed" ? "Closed" : isEventFull(event) ? formatEventRemainingPlaces(event) : "Open" }) }),
|
|
8390
8413
|
phase.kind === "closed" ? /* @__PURE__ */ jsx("p", {
|
|
8391
8414
|
className: "rb-caption",
|
|
8392
8415
|
children: bookingClosedReason(phase.reason)
|
|
@@ -9000,39 +9023,6 @@ function buildLoadedOfferingsPreviewListing(input) {
|
|
|
9000
9023
|
});
|
|
9001
9024
|
}
|
|
9002
9025
|
//#endregion
|
|
9003
|
-
//#region ../blocks/src/system/runtime/nodes/events/shared/offeringNextDates.ts
|
|
9004
|
-
/** A bounded display sample only: capacity and booking admission belong to the booking destination. */
|
|
9005
|
-
function offeringDatesBySeries(events, now, booking) {
|
|
9006
|
-
const groups = events.reduce((result, event) => new Map([...result, [event.seriesId, [...result.get(event.seriesId) ?? [], event]]]), /* @__PURE__ */ new Map());
|
|
9007
|
-
return new Map([...groups].map(([seriesId, occurrences]) => [seriesId, orderedUniqueEventOccurrences(occurrences.filter((event) => event.bookingScope !== "whole_series" && Date.parse(event.startsAt) >= now.getTime())).slice(0, 3).map((event) => offeringDateRow(event, event, booking))]));
|
|
9008
|
-
}
|
|
9009
|
-
/** Whole-series sessions share the run-level booking capacity, by contract. */
|
|
9010
|
-
function offeringRunDates(event, now) {
|
|
9011
|
-
if (event.bookingScope !== "whole_series") return [];
|
|
9012
|
-
const nextStart = nextLiveRunSessionStartMs(event.run.sessions, now);
|
|
9013
|
-
return nextStart === null ? [] : orderedLiveRunSessions(event.run.sessions).filter((session) => Date.parse(session.startsAt) >= nextStart).slice(0, 3).map((session) => offeringDateRow(session, event));
|
|
9014
|
-
}
|
|
9015
|
-
function offeringDateRow(session, event, booking) {
|
|
9016
|
-
const options = eventDateOptions({
|
|
9017
|
-
...event,
|
|
9018
|
-
timeZone: session.timeZone
|
|
9019
|
-
});
|
|
9020
|
-
const date = formatEventCompactDateRail(session.startsAt, options, "as-written");
|
|
9021
|
-
const capacity = getEventAvailability(event);
|
|
9022
|
-
const status = getEventAvailabilityStatus(event);
|
|
9023
|
-
const label = `${date.weekday} ${date.day} ${date.month}, ${formatTime(session.startsAt, options)}`;
|
|
9024
|
-
const bookingLink = booking?.(event, label) ?? null;
|
|
9025
|
-
return {
|
|
9026
|
-
startsAt: session.startsAt,
|
|
9027
|
-
label,
|
|
9028
|
-
...bookingLink ? { booking: bookingLink } : {},
|
|
9029
|
-
places: capacity.available === null ? null : {
|
|
9030
|
-
label: capacity.isFull ? "Sold out" : `${capacity.available} place${capacity.available === 1 ? "" : "s"} left`,
|
|
9031
|
-
status: capacity.isFull ? "full" : status.status === "filling" ? "low" : "available"
|
|
9032
|
-
}
|
|
9033
|
-
};
|
|
9034
|
-
}
|
|
9035
|
-
//#endregion
|
|
9036
9026
|
//#region ../blocks/src/system/runtime/nodes/offerings-preview-catalogue.tsx
|
|
9037
9027
|
function OfferingsCatalogue(props) {
|
|
9038
9028
|
const input = resolveOfferingsRenderInput(props);
|
|
@@ -9062,6 +9052,7 @@ function OfferingsCatalogue(props) {
|
|
|
9062
9052
|
now,
|
|
9063
9053
|
shape
|
|
9064
9054
|
});
|
|
9055
|
+
case "by-course":
|
|
9065
9056
|
case "by-type": return props.lookSlots ? /* @__PURE__ */ jsxs("div", {
|
|
9066
9057
|
...listLookSlot(props, "layout"),
|
|
9067
9058
|
children: [/* @__PURE__ */ jsx("header", {
|
|
@@ -9157,6 +9148,7 @@ function renderCatalogueItems({ props, items, shape, groupTitle }) {
|
|
|
9157
9148
|
style: { gridTemplateColumns: "repeat(auto-fill, minmax(min(100%, 18rem), 1fr))" },
|
|
9158
9149
|
children: events.map((event) => /* @__PURE__ */ jsx(EventCard, {
|
|
9159
9150
|
event,
|
|
9151
|
+
now: props.now,
|
|
9160
9152
|
...catalogueEventCardProps(event, props.buttonVariant ?? "primary")
|
|
9161
9153
|
}, event.seriesId))
|
|
9162
9154
|
});
|
|
@@ -9167,14 +9159,15 @@ function catalogueDates(events, now, shape, pathname) {
|
|
|
9167
9159
|
}
|
|
9168
9160
|
function catalogueCardContent(item, now, dates, typeLabel) {
|
|
9169
9161
|
const event = item.kind === "event" ? item.event : item.run.representative;
|
|
9170
|
-
|
|
9171
|
-
|
|
9172
|
-
|
|
9173
|
-
|
|
9174
|
-
|
|
9175
|
-
|
|
9176
|
-
|
|
9177
|
-
|
|
9162
|
+
const content = eventCardListContent(event, {
|
|
9163
|
+
kind: "catalogue",
|
|
9164
|
+
now,
|
|
9165
|
+
nextStartMs: item.nextStartMs,
|
|
9166
|
+
typeLabel
|
|
9167
|
+
}, catalogueEventCardProps(event).buttonText);
|
|
9168
|
+
return event.bookingScope === "whole_series" ? content : {
|
|
9169
|
+
...content,
|
|
9170
|
+
dates: dates.get(event.seriesId)
|
|
9178
9171
|
};
|
|
9179
9172
|
}
|
|
9180
9173
|
function renderCatalogueEmpty({ props, failed }) {
|
|
@@ -9283,17 +9276,19 @@ const OFFERINGS_PREVIEW_GRID_STYLE = {
|
|
|
9283
9276
|
//#endregion
|
|
9284
9277
|
//#region ../blocks/src/system/runtime/nodes/offerings-preview.tsx
|
|
9285
9278
|
const OFFERINGS_WHOLE_SERIES_CARD_CLASS = boxStyleClassNames({ role: "default" }, { baseClass: "group rb-flex rb-h-full rb-flex-col event-card offerings-preview-whole-series-card" });
|
|
9286
|
-
|
|
9287
|
-
|
|
9288
|
-
return
|
|
9289
|
-
...
|
|
9290
|
-
|
|
9291
|
-
|
|
9292
|
-
children: props.children
|
|
9293
|
-
}), /* @__PURE__ */ jsx("div", { children: renderOfferingsPreview(props) })]
|
|
9294
|
-
}) : /* @__PURE__ */ jsxs(Fragment, { children: [props.children, renderOfferingsPreview(props)] });
|
|
9279
|
+
/** An authored label is kept as typed; an absent one takes the default for the presentation. */
|
|
9280
|
+
function withButtonText(props) {
|
|
9281
|
+
return {
|
|
9282
|
+
...props,
|
|
9283
|
+
buttonText: props.buttonText ?? (props.displayMode !== "catalogue" && props.cardArrangement === "course-groups" ? "View course" : "Book")
|
|
9284
|
+
};
|
|
9295
9285
|
}
|
|
9296
|
-
function
|
|
9286
|
+
function OfferingsPreviewNode(authored) {
|
|
9287
|
+
const props = withButtonText(authored);
|
|
9288
|
+
if (props.displayMode === "catalogue") return OfferingsCatalogue(isPreviewOnlyArrangement(props.cardArrangement) ? {
|
|
9289
|
+
...props,
|
|
9290
|
+
cardArrangement: "cards"
|
|
9291
|
+
} : props);
|
|
9297
9292
|
const input = resolveOfferingsRenderInput(props);
|
|
9298
9293
|
const now = input.now;
|
|
9299
9294
|
const listing = input.kind === "prepared" ? input.listing : buildLoadedOfferingsPreviewListing({
|
|
@@ -9302,6 +9297,16 @@ function renderOfferingsPreview(props) {
|
|
|
9302
9297
|
listingMode: offeringsListingFor(props.cardArrangement ?? "legacy"),
|
|
9303
9298
|
now
|
|
9304
9299
|
});
|
|
9300
|
+
if (listing.kind === "no-groups" && listing.reason === "empty-hidden") return props.showHiddenPlaceholder || props.previewStage === "preview" ? /* @__PURE__ */ jsxs(Fragment, { children: [props.children, /* @__PURE__ */ jsx(EmptyState, { message: "Visitors won't see this section at the moment, because none of its cards has anything coming up." })] }) : null;
|
|
9301
|
+
return props.lookSlots ? /* @__PURE__ */ jsxs("div", {
|
|
9302
|
+
...listLookSlot(props, "layout"),
|
|
9303
|
+
children: [/* @__PURE__ */ jsx("header", {
|
|
9304
|
+
...listLookSlot(props, "head"),
|
|
9305
|
+
children: props.children
|
|
9306
|
+
}), /* @__PURE__ */ jsx("div", { children: renderOfferingsPreview(props, listing, now) })]
|
|
9307
|
+
}) : /* @__PURE__ */ jsxs(Fragment, { children: [props.children, renderOfferingsPreview(props, listing, now)] });
|
|
9308
|
+
}
|
|
9309
|
+
function renderOfferingsPreview(props, listing, now) {
|
|
9305
9310
|
switch (listing.kind) {
|
|
9306
9311
|
case "no-groups": return props.previewStage === "preview" ? /* @__PURE__ */ jsx(EmptyState, {
|
|
9307
9312
|
className: "offerings-preview-empty",
|
|
@@ -9323,6 +9328,7 @@ function renderOfferingsPreview(props) {
|
|
|
9323
9328
|
}, dates, group.singularLabel))
|
|
9324
9329
|
});
|
|
9325
9330
|
}
|
|
9331
|
+
case "by-course":
|
|
9326
9332
|
case "by-type": return props.lookSlots ? renderOfferingCardGroups({
|
|
9327
9333
|
...props,
|
|
9328
9334
|
states: listing.groups,
|
|
@@ -9513,6 +9519,7 @@ function renderSingleOfferingCard(item, options) {
|
|
|
9513
9519
|
switch (item.kind) {
|
|
9514
9520
|
case "event": return /* @__PURE__ */ jsx(EventCard, {
|
|
9515
9521
|
event: item.event,
|
|
9522
|
+
now: options.now,
|
|
9516
9523
|
buttonVariant: options.buttonVariant,
|
|
9517
9524
|
buttonText: options.buttonText,
|
|
9518
9525
|
showMap: false,
|
|
@@ -9547,7 +9554,7 @@ function WholeSeriesRunCompactRow({ group, path, now }) {
|
|
|
9547
9554
|
});
|
|
9548
9555
|
const dateRail = formatEventCompactDateRail(firstSession.startsAt, options);
|
|
9549
9556
|
const timeRange = formatRunScheduleTime(schedule, options);
|
|
9550
|
-
const price =
|
|
9557
|
+
const price = formatCoursePrice(group.representative.pricing);
|
|
9551
9558
|
const statusLabel = resolveWholeSeriesBookingPhase(group.run, now).kind === "open" ? null : "Registration closed";
|
|
9552
9559
|
return /* @__PURE__ */ jsxs("article", {
|
|
9553
9560
|
className: "event-compact-row offerings-preview-whole-series-row",
|
|
@@ -9577,7 +9584,7 @@ function WholeSeriesRunCompactRow({ group, path, now }) {
|
|
|
9577
9584
|
/* @__PURE__ */ jsx(OfferingTitle, {
|
|
9578
9585
|
className: "event-compact-row-title",
|
|
9579
9586
|
path,
|
|
9580
|
-
|
|
9587
|
+
...eventDisplayTitle(group.representative)
|
|
9581
9588
|
}),
|
|
9582
9589
|
/* @__PURE__ */ jsx(EventQuickFacts, {
|
|
9583
9590
|
facts: group.representative.facts,
|
|
@@ -9594,13 +9601,9 @@ function WholeSeriesRunCompactRow({ group, path, now }) {
|
|
|
9594
9601
|
className: "event-compact-row-price",
|
|
9595
9602
|
children: price
|
|
9596
9603
|
}),
|
|
9597
|
-
/* @__PURE__ */
|
|
9604
|
+
/* @__PURE__ */ jsx("span", {
|
|
9598
9605
|
className: "event-compact-row-price",
|
|
9599
|
-
children:
|
|
9600
|
-
sessionsCount,
|
|
9601
|
-
" session",
|
|
9602
|
-
sessionsCount === 1 ? "" : "s"
|
|
9603
|
-
]
|
|
9606
|
+
children: formatCourseSessions(group.representative) ?? `${sessionsCount} session${sessionsCount === 1 ? "" : "s"}`
|
|
9604
9607
|
})
|
|
9605
9608
|
]
|
|
9606
9609
|
})
|
|
@@ -9640,7 +9643,7 @@ function WholeSeriesRunFeatureCard({ group, now, path, buttonVariant, buttonText
|
|
|
9640
9643
|
});
|
|
9641
9644
|
const formattedDate = formatEventCompactDateRail(firstSession.startsAt, options).label;
|
|
9642
9645
|
const timeRange = formatRunScheduleTime(schedule, options);
|
|
9643
|
-
const price =
|
|
9646
|
+
const price = formatCoursePrice(group.representative.pricing);
|
|
9644
9647
|
const statusLabel = resolveWholeSeriesBookingPhase(group.run, now).kind === "open" ? null : "Registration closed";
|
|
9645
9648
|
const description = group.representative.description;
|
|
9646
9649
|
return /* @__PURE__ */ jsx("article", {
|
|
@@ -9651,7 +9654,7 @@ function WholeSeriesRunFeatureCard({ group, now, path, buttonVariant, buttonText
|
|
|
9651
9654
|
/* @__PURE__ */ jsx(OfferingTitle, {
|
|
9652
9655
|
className: "card-title rb-mb-3",
|
|
9653
9656
|
path,
|
|
9654
|
-
|
|
9657
|
+
...eventDisplayTitle(group.representative)
|
|
9655
9658
|
}),
|
|
9656
9659
|
/* @__PURE__ */ jsx(EventQuickFacts, {
|
|
9657
9660
|
facts: group.representative.facts,
|
|
@@ -9749,7 +9752,7 @@ function RunWithoutLiveDates({ group, path }) {
|
|
|
9749
9752
|
/* @__PURE__ */ jsx(OfferingTitle, {
|
|
9750
9753
|
className: "rb-heading-xs",
|
|
9751
9754
|
path,
|
|
9752
|
-
|
|
9755
|
+
...eventDisplayTitle(group.representative)
|
|
9753
9756
|
}),
|
|
9754
9757
|
/* @__PURE__ */ jsx(EventQuickFacts, {
|
|
9755
9758
|
facts: group.representative.facts,
|
|
@@ -9766,8 +9769,10 @@ function RunWithoutLiveDates({ group, path }) {
|
|
|
9766
9769
|
function renderOfferingCardGroups(props) {
|
|
9767
9770
|
const datesBySeries = offeringDatesBySeries(props.quickDateEvents ?? [], props.now);
|
|
9768
9771
|
const frames = listGroupFrames(props);
|
|
9772
|
+
const nextCards = props.cardArrangement === "next-cards";
|
|
9769
9773
|
return /* @__PURE__ */ jsx("div", {
|
|
9770
|
-
className: "rb-flex rb-flex-col rb-gap-10",
|
|
9774
|
+
className: nextCards ? "rb-grid rb-gap-6" : "rb-flex rb-flex-col rb-gap-10",
|
|
9775
|
+
style: nextCards ? { gridTemplateColumns: "repeat(auto-fit, minmax(min(100%, 16rem), 1fr))" } : void 0,
|
|
9771
9776
|
...frames.list,
|
|
9772
9777
|
children: props.states.map((state) => {
|
|
9773
9778
|
const cta = resolveOfferingsPreviewGroupCta({
|
|
@@ -9781,6 +9786,7 @@ function renderOfferingCardGroups(props) {
|
|
|
9781
9786
|
Heading: "h3",
|
|
9782
9787
|
sectionProps: {
|
|
9783
9788
|
...frames.panel,
|
|
9789
|
+
...nextCards ? { className: "rb-flex rb-flex-col rb-gap-4 rb-rounded-lg rb-border rb-border-border rb-p-5" } : {},
|
|
9784
9790
|
"data-offering-source": state.group.sourceKey
|
|
9785
9791
|
},
|
|
9786
9792
|
children: [offeringGroupCards(state, props, datesBySeries), cta ? /* @__PURE__ */ jsx("a", {
|
|
@@ -9805,36 +9811,101 @@ function previewCardContent(item, props, datesBySeries, typeLabel) {
|
|
|
9805
9811
|
...content,
|
|
9806
9812
|
dates: datesBySeries.get(event.seriesId) ?? offeringDatesBySeries([event], props.now).get(event.seriesId)
|
|
9807
9813
|
};
|
|
9808
|
-
|
|
9814
|
+
return {
|
|
9809
9815
|
...content,
|
|
9810
|
-
dates: offeringRunDates(event, props.now),
|
|
9811
9816
|
id: item.run.eventSeriesId
|
|
9812
9817
|
};
|
|
9813
|
-
return event.destination.kind === "external" ? runContent : nativeRunCardContent(item, runContent, props);
|
|
9814
9818
|
}
|
|
9815
|
-
function
|
|
9816
|
-
|
|
9817
|
-
|
|
9819
|
+
function offeringGroupCards(state, props, dates) {
|
|
9820
|
+
switch (state.kind) {
|
|
9821
|
+
case "items": return props.cardArrangement === "course-groups" ? /* @__PURE__ */ jsx(OfferingCourseCards, {
|
|
9822
|
+
Carousel: props.Carousel,
|
|
9823
|
+
items: state.items,
|
|
9824
|
+
presentation: props,
|
|
9825
|
+
now: props.now,
|
|
9826
|
+
buttonText: props.buttonText
|
|
9827
|
+
}) : props.cardArrangement === "next-cards" ? renderNextOfferingCard(state.items[0], {
|
|
9828
|
+
now: props.now,
|
|
9829
|
+
buttonVariant: props.buttonVariant ?? "primary",
|
|
9830
|
+
buttonText: props.buttonText ?? "Book"
|
|
9831
|
+
}, props) : CardListItems({
|
|
9832
|
+
Carousel: props.Carousel,
|
|
9833
|
+
Title: "h4",
|
|
9834
|
+
presentation: props,
|
|
9835
|
+
items: state.items.map((item) => previewCardContent(item, props, dates))
|
|
9836
|
+
});
|
|
9837
|
+
case "empty":
|
|
9838
|
+
case "failed": return /* @__PURE__ */ jsx(EmptyState, { message: listingMessage(state.kind, props) });
|
|
9839
|
+
default: return assertNever$1(state);
|
|
9840
|
+
}
|
|
9841
|
+
}
|
|
9842
|
+
/** The existing booking projection owns prices, availability and sold-out/waitlist actions. */
|
|
9843
|
+
function renderNextOfferingCard(item, options, presentation = {}) {
|
|
9844
|
+
const { content, inProgress } = nextOfferingCardContent(item, options);
|
|
9845
|
+
const cardPresentation = {
|
|
9846
|
+
...presentation,
|
|
9847
|
+
buttonVariant: options.buttonVariant
|
|
9848
|
+
};
|
|
9849
|
+
return /* @__PURE__ */ jsxs("article", {
|
|
9850
|
+
...listLookSlot(cardPresentation, "item"),
|
|
9851
|
+
className: "offerings-preview-next-card rb-flex rb-flex-col rb-gap-3",
|
|
9852
|
+
children: [presentation.showPhotos !== false && content.media ? /* @__PURE__ */ jsx("div", {
|
|
9853
|
+
...listLookSlot(cardPresentation, "item-media"),
|
|
9854
|
+
style: {
|
|
9855
|
+
width: "min(100%, 14rem)",
|
|
9856
|
+
aspectRatio: "1",
|
|
9857
|
+
borderRadius: "50%",
|
|
9858
|
+
overflow: "hidden",
|
|
9859
|
+
marginInline: "auto"
|
|
9860
|
+
},
|
|
9861
|
+
children: /* @__PURE__ */ jsx(MediaNodeServer, {
|
|
9862
|
+
...listLookSlot(cardPresentation, "photo"),
|
|
9863
|
+
value: content.media,
|
|
9864
|
+
size: ImagePresets.card,
|
|
9865
|
+
style: {
|
|
9866
|
+
width: "100%",
|
|
9867
|
+
height: "100%",
|
|
9868
|
+
objectFit: "cover"
|
|
9869
|
+
}
|
|
9870
|
+
})
|
|
9871
|
+
}) : null, /* @__PURE__ */ jsxs("div", {
|
|
9872
|
+
...listLookSlot(cardPresentation, "item-body"),
|
|
9873
|
+
className: "rb-flex rb-flex-col rb-gap-3",
|
|
9874
|
+
children: [inProgress ? /* @__PURE__ */ jsx("p", { children: "In progress" }) : null, [
|
|
9875
|
+
"title",
|
|
9876
|
+
"schedule",
|
|
9877
|
+
"facts",
|
|
9878
|
+
"action"
|
|
9879
|
+
].map((part) => /* @__PURE__ */ jsx(React.Fragment, { children: /* @__PURE__ */ jsx(CardListContentPart, {
|
|
9880
|
+
part,
|
|
9881
|
+
item: content,
|
|
9882
|
+
presentation: cardPresentation,
|
|
9883
|
+
Title: "h4"
|
|
9884
|
+
}) }, part))]
|
|
9885
|
+
})]
|
|
9886
|
+
});
|
|
9887
|
+
}
|
|
9888
|
+
function nextOfferingCardContent(item, options) {
|
|
9889
|
+
const event = item.kind === "event" ? item.event : item.run.representative;
|
|
9890
|
+
const projected = eventCardListContent(event, {
|
|
9891
|
+
kind: "offering",
|
|
9892
|
+
now: options.now,
|
|
9893
|
+
nextStartMs: null
|
|
9894
|
+
}, options.buttonText);
|
|
9895
|
+
const inProgress = offeringRunLifecycle(event, options.now) === "in_progress";
|
|
9896
|
+
const course = item.kind === "run" ? item.run.run.listing?.course : void 0;
|
|
9818
9897
|
return {
|
|
9819
|
-
|
|
9820
|
-
|
|
9821
|
-
|
|
9822
|
-
|
|
9823
|
-
|
|
9898
|
+
content: course ? {
|
|
9899
|
+
...projected,
|
|
9900
|
+
title: course.title,
|
|
9901
|
+
eyebrowFacts: course.facts,
|
|
9902
|
+
quickFacts: void 0
|
|
9903
|
+
} : projected,
|
|
9904
|
+
inProgress
|
|
9824
9905
|
};
|
|
9825
9906
|
}
|
|
9826
|
-
function
|
|
9827
|
-
|
|
9828
|
-
case "items": return CardListItems({
|
|
9829
|
-
Carousel: props.Carousel,
|
|
9830
|
-
Title: "h4",
|
|
9831
|
-
presentation: props,
|
|
9832
|
-
items: state.items.map((item) => previewCardContent(item, props, dates))
|
|
9833
|
-
});
|
|
9834
|
-
case "empty":
|
|
9835
|
-
case "failed": return /* @__PURE__ */ jsx(EmptyState, { message: listingMessage(state.kind, props) });
|
|
9836
|
-
default: return assertNever$1(state);
|
|
9837
|
-
}
|
|
9907
|
+
function isPreviewOnlyArrangement(arrangement) {
|
|
9908
|
+
return arrangement === "next-cards" || arrangement === "course-groups";
|
|
9838
9909
|
}
|
|
9839
9910
|
//#endregion
|
|
9840
9911
|
//#region ../blocks/src/system/runtime/nodes/weekly-slot-availability.view.tsx
|
|
@@ -10815,7 +10886,7 @@ function AgendaModalCard({ event, showCapacity, calendarTimeZone, onClick }) {
|
|
|
10815
10886
|
}))
|
|
10816
10887
|
}), /* @__PURE__ */ jsx("span", {
|
|
10817
10888
|
className: "event-agenda-card-title",
|
|
10818
|
-
children: event
|
|
10889
|
+
children: eventDisplayTitleText(event)
|
|
10819
10890
|
})]
|
|
10820
10891
|
}), /* @__PURE__ */ jsxs("div", {
|
|
10821
10892
|
className: "event-agenda-card-details status-muted",
|
|
@@ -10869,33 +10940,40 @@ function AgendaLinkCard({ event, showCapacity, showVenue, buttonVariant, buttonT
|
|
|
10869
10940
|
}),
|
|
10870
10941
|
/* @__PURE__ */ jsxs("div", {
|
|
10871
10942
|
className: "event-agenda-card-content",
|
|
10872
|
-
children: [
|
|
10873
|
-
|
|
10874
|
-
|
|
10875
|
-
|
|
10876
|
-
|
|
10877
|
-
|
|
10878
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
10879
|
-
className: "event-agenda-card-details status-muted",
|
|
10880
|
-
children: [
|
|
10881
|
-
showVenue ? /* @__PURE__ */ jsxs("span", {
|
|
10882
|
-
className: "event-agenda-card-location",
|
|
10883
|
-
children: [/* @__PURE__ */ jsx(LocationIcon, {}), location]
|
|
10884
|
-
}) : null,
|
|
10885
|
-
/* @__PURE__ */ jsx("span", {
|
|
10886
|
-
className: "event-agenda-card-duration",
|
|
10887
|
-
children: duration
|
|
10888
|
-
}),
|
|
10889
|
-
teacherLine && /* @__PURE__ */ jsx("span", {
|
|
10890
|
-
className: "event-agenda-card-teacher",
|
|
10891
|
-
children: teacherLine
|
|
10892
|
-
}),
|
|
10893
|
-
capacity && /* @__PURE__ */ jsx("span", {
|
|
10894
|
-
className: `event-agenda-card-capacity ${isEventFull(event) ? "event-agenda-card-capacity--full status-error" : ""}`,
|
|
10895
|
-
children: capacity
|
|
10943
|
+
children: [
|
|
10944
|
+
/* @__PURE__ */ jsx("h5", {
|
|
10945
|
+
className: "event-agenda-card-title",
|
|
10946
|
+
children: /* @__PURE__ */ jsx("a", {
|
|
10947
|
+
...eventLinkProps,
|
|
10948
|
+
children: eventDisplayTitle(event).title
|
|
10896
10949
|
})
|
|
10897
|
-
|
|
10898
|
-
|
|
10950
|
+
}),
|
|
10951
|
+
eventDisplayTitle(event).runName ? /* @__PURE__ */ jsx("p", {
|
|
10952
|
+
className: "event-agenda-card-run-name rb-caption",
|
|
10953
|
+
children: eventDisplayTitle(event).runName
|
|
10954
|
+
}) : null,
|
|
10955
|
+
/* @__PURE__ */ jsxs("div", {
|
|
10956
|
+
className: "event-agenda-card-details status-muted",
|
|
10957
|
+
children: [
|
|
10958
|
+
showVenue ? /* @__PURE__ */ jsxs("span", {
|
|
10959
|
+
className: "event-agenda-card-location",
|
|
10960
|
+
children: [/* @__PURE__ */ jsx(LocationIcon, {}), location]
|
|
10961
|
+
}) : null,
|
|
10962
|
+
/* @__PURE__ */ jsx("span", {
|
|
10963
|
+
className: "event-agenda-card-duration",
|
|
10964
|
+
children: duration
|
|
10965
|
+
}),
|
|
10966
|
+
teacherLine && /* @__PURE__ */ jsx("span", {
|
|
10967
|
+
className: "event-agenda-card-teacher",
|
|
10968
|
+
children: teacherLine
|
|
10969
|
+
}),
|
|
10970
|
+
capacity && /* @__PURE__ */ jsx("span", {
|
|
10971
|
+
className: `event-agenda-card-capacity ${isEventFull(event) ? "event-agenda-card-capacity--full status-error" : ""}`,
|
|
10972
|
+
children: capacity
|
|
10973
|
+
})
|
|
10974
|
+
]
|
|
10975
|
+
})
|
|
10976
|
+
]
|
|
10899
10977
|
}),
|
|
10900
10978
|
/* @__PURE__ */ jsxs("div", {
|
|
10901
10979
|
className: "event-agenda-card-action",
|
|
@@ -11082,7 +11160,7 @@ const WeekBoardCard = ({ event, showCapacity, calendarTimeZone }) => {
|
|
|
11082
11160
|
children: [
|
|
11083
11161
|
/* @__PURE__ */ jsx("span", {
|
|
11084
11162
|
className: "event-week-board-card-title",
|
|
11085
|
-
children: event
|
|
11163
|
+
children: eventDisplayTitleText(event)
|
|
11086
11164
|
}),
|
|
11087
11165
|
/* @__PURE__ */ jsx("span", {
|
|
11088
11166
|
className: "event-week-board-card-time",
|
|
@@ -11427,10 +11505,10 @@ function renderCombinedSsr(display, prefetchedEvents) {
|
|
|
11427
11505
|
function renderListSsr(display, hydration) {
|
|
11428
11506
|
const { initialToday, timeZone } = hydration.calendarContext;
|
|
11429
11507
|
const week = display.listBy === "week" ? buildEventListWeek(initialToday, display.startOfWeek, timeZone) : null;
|
|
11430
|
-
const
|
|
11431
|
-
|
|
11432
|
-
|
|
11433
|
-
week: eventListWeekDays(week, initialToday, timeZone)
|
|
11508
|
+
const listDisplay = {
|
|
11509
|
+
...buildEventCalendarListingDisplay(display, hydration.prefetchedEvents),
|
|
11510
|
+
weekGrouping: eventWeekGroupingContext(initialToday, timeZone, display.startOfWeek),
|
|
11511
|
+
...week === null ? {} : { week: eventListWeekDays(week, initialToday, timeZone) }
|
|
11434
11512
|
};
|
|
11435
11513
|
return /* @__PURE__ */ jsxs(Fragment, { children: [week !== null ? /* @__PURE__ */ jsx(EventListWeekNavigation, {
|
|
11436
11514
|
...display,
|
|
@@ -11511,7 +11589,7 @@ function renderCalendarSsr(display, hydration) {
|
|
|
11511
11589
|
children: [day.visibleEntries.map(({ event, timeZone }) => /* @__PURE__ */ jsxs("a", {
|
|
11512
11590
|
...resolveEventLinkProps(event),
|
|
11513
11591
|
className: "event-calendar-event",
|
|
11514
|
-
title: `${event
|
|
11592
|
+
title: `${eventDisplayTitleText(event)} at ${formatTime(event.startsAt, eventDateOptions({
|
|
11515
11593
|
...event,
|
|
11516
11594
|
timeZone
|
|
11517
11595
|
}))}`,
|
|
@@ -11526,7 +11604,7 @@ function renderCalendarSsr(display, hydration) {
|
|
|
11526
11604
|
" ",
|
|
11527
11605
|
/* @__PURE__ */ jsx("span", {
|
|
11528
11606
|
className: "event-calendar-event-title",
|
|
11529
|
-
children: event
|
|
11607
|
+
children: eventDisplayTitleText(event)
|
|
11530
11608
|
})
|
|
11531
11609
|
]
|
|
11532
11610
|
}, event.occurrenceId || event.id)), day.moreCount > 0 ? /* @__PURE__ */ jsxs("div", {
|
|
@@ -11617,7 +11695,7 @@ function renderTimetableSsr(display, hydration) {
|
|
|
11617
11695
|
}) : day.events.map((cell) => /* @__PURE__ */ jsxs("a", {
|
|
11618
11696
|
...resolveEventLinkProps(cell.event),
|
|
11619
11697
|
className: "event-timetable-event",
|
|
11620
|
-
title: `${cell.event
|
|
11698
|
+
title: `${eventDisplayTitleText(cell.event)}, ${cell.timeLabel}`,
|
|
11621
11699
|
style: {
|
|
11622
11700
|
top: `${cell.topPercent}%`,
|
|
11623
11701
|
height: `${cell.heightPercent}%`,
|
|
@@ -11632,7 +11710,7 @@ function renderTimetableSsr(display, hydration) {
|
|
|
11632
11710
|
}),
|
|
11633
11711
|
/* @__PURE__ */ jsx("span", {
|
|
11634
11712
|
className: "event-timetable-event-title",
|
|
11635
|
-
children: cell.event
|
|
11713
|
+
children: eventDisplayTitleText(cell.event)
|
|
11636
11714
|
}),
|
|
11637
11715
|
cell.teacherLine ? /* @__PURE__ */ jsx("span", {
|
|
11638
11716
|
className: "event-timetable-event-teacher",
|
|
@@ -11940,6 +12018,7 @@ function selectPagePanel(source, events) {
|
|
|
11940
12018
|
eventSeriesId: source.subject.eventSeriesId,
|
|
11941
12019
|
events
|
|
11942
12020
|
});
|
|
12021
|
+
if (!source.occurrenceContext && source.subject?.kind === "eventSeries") return planOrdinarySeriesSelection(events);
|
|
11943
12022
|
return selectOccurrenceForPanel(events, source.occurrenceContext?.id);
|
|
11944
12023
|
}
|
|
11945
12024
|
/** The decided target is also retained for recovery when fresh booking is closed. */
|
|
@@ -11963,6 +12042,7 @@ function planEventBookingPanel({ selection, subject }, now) {
|
|
|
11963
12042
|
const nonBookingPanel = planNonBookingPanel(selection);
|
|
11964
12043
|
switch (selection.kind) {
|
|
11965
12044
|
case "occurrence":
|
|
12045
|
+
case "dateChoice":
|
|
11966
12046
|
case "wholeSeriesRun": {
|
|
11967
12047
|
const registration = selectionRegistrationTarget(selection, subject);
|
|
11968
12048
|
if (nonBookingPanel) return {
|
|
@@ -11979,10 +12059,24 @@ function planEventBookingPanel({ selection, subject }, now) {
|
|
|
11979
12059
|
registration
|
|
11980
12060
|
};
|
|
11981
12061
|
}
|
|
11982
|
-
case "wholeSeriesParent":
|
|
11983
|
-
|
|
11984
|
-
|
|
11985
|
-
|
|
12062
|
+
case "wholeSeriesParent": {
|
|
12063
|
+
if (nonBookingPanel) return {
|
|
12064
|
+
...nonBookingPanel,
|
|
12065
|
+
registration: null
|
|
12066
|
+
};
|
|
12067
|
+
const panel = planWholeSeriesParentBooking(selection.eligibleRuns);
|
|
12068
|
+
return panel.kind === "bookTogether" ? {
|
|
12069
|
+
kind: "registration",
|
|
12070
|
+
registration: {
|
|
12071
|
+
events: panel.runs.map((run) => run.representative),
|
|
12072
|
+
subject,
|
|
12073
|
+
occurrenceContext: null
|
|
12074
|
+
}
|
|
12075
|
+
} : {
|
|
12076
|
+
...panel,
|
|
12077
|
+
registration: null
|
|
12078
|
+
};
|
|
12079
|
+
}
|
|
11986
12080
|
case "wholeSeriesParentUnavailable": return {
|
|
11987
12081
|
...nonBookingPanel ?? { kind: "unavailable" },
|
|
11988
12082
|
registration: null
|
|
@@ -12008,6 +12102,11 @@ function selectionRegistrationTarget(selection, subject) {
|
|
|
12008
12102
|
occurrenceContext: eventOccurrenceContext(selection.event),
|
|
12009
12103
|
subject
|
|
12010
12104
|
};
|
|
12105
|
+
case "dateChoice": return {
|
|
12106
|
+
events: [...selection.dates],
|
|
12107
|
+
occurrenceContext: null,
|
|
12108
|
+
subject
|
|
12109
|
+
};
|
|
12011
12110
|
case "wholeSeriesRun": return {
|
|
12012
12111
|
events: [selection.run.representative],
|
|
12013
12112
|
occurrenceContext: null,
|
|
@@ -13198,6 +13297,10 @@ const META_PATH_TO_STORE_KEY = {
|
|
|
13198
13297
|
function mapMetaPathToStoreKey(path) {
|
|
13199
13298
|
return META_PATH_TO_STORE_KEY[path] ?? path;
|
|
13200
13299
|
}
|
|
13300
|
+
/** Named bindings follow lexical scope: the nearest declaration wins. */
|
|
13301
|
+
function findNamedScope(context, name) {
|
|
13302
|
+
return [...context.scopes].reverse().find((entry) => entry.name === name);
|
|
13303
|
+
}
|
|
13201
13304
|
const PATH_SEPARATOR_REGEX = /\./g;
|
|
13202
13305
|
const BRACKET_ACCESS_REGEX = /\[([^\]]+)\]/g;
|
|
13203
13306
|
/**
|
|
@@ -13281,7 +13384,7 @@ function derivePreviewLinkedEntryFieldBinding(node, parsedBinding, context) {
|
|
|
13281
13384
|
const [scopeName, ...displaySegments] = splitPath(parsedBinding.from);
|
|
13282
13385
|
if (typeof scopeName !== "string") return null;
|
|
13283
13386
|
if (displaySegments.length === 0) return null;
|
|
13284
|
-
const scoped =
|
|
13387
|
+
const scoped = findNamedScope(context, scopeName);
|
|
13285
13388
|
if (!scoped) return null;
|
|
13286
13389
|
const displayPath = segmentsToPath(displaySegments);
|
|
13287
13390
|
if (!displayPath) return null;
|
|
@@ -13339,7 +13442,7 @@ function contentFieldSegments(fromPath, context) {
|
|
|
13339
13442
|
const [first, ...rest] = splitPath(fromPath);
|
|
13340
13443
|
if (typeof first !== "string" || first === "$root") return void 0;
|
|
13341
13444
|
if (first === "content") return rest;
|
|
13342
|
-
const named =
|
|
13445
|
+
const named = findNamedScope(context, first);
|
|
13343
13446
|
if (named) return scopedContentSegments(named, rest);
|
|
13344
13447
|
const innermost = [...context.scopes].reverse().find((entry) => isPlainObject(entry.value) || Array.isArray(entry.value));
|
|
13345
13448
|
if (!innermost || first in context.viewModel) return void 0;
|
|
@@ -13484,7 +13587,7 @@ function applyTransformsAndFallback(value, binding, context) {
|
|
|
13484
13587
|
function resolveTransformData(context, bindingPath) {
|
|
13485
13588
|
const [first] = splitPath(bindingPath);
|
|
13486
13589
|
if (typeof first === "string" && first !== "$root") {
|
|
13487
|
-
const namedScope = context
|
|
13590
|
+
const namedScope = findNamedScope(context, first);
|
|
13488
13591
|
if (namedScope && isPlainObject(namedScope.value)) return namedScope.value;
|
|
13489
13592
|
}
|
|
13490
13593
|
for (let i = context.scopes.length - 1; i >= 0; i -= 1) {
|
|
@@ -13652,7 +13755,7 @@ function resolveReadBindingValue(binding, context) {
|
|
|
13652
13755
|
source = currentScope.value;
|
|
13653
13756
|
const value = readFromSource(source, segments);
|
|
13654
13757
|
if (value !== void 0) return applyTransformsAndFallback(value, binding, context);
|
|
13655
|
-
const namedScope = context
|
|
13758
|
+
const namedScope = findNamedScope(context, first);
|
|
13656
13759
|
if (namedScope) {
|
|
13657
13760
|
source = namedScope.value;
|
|
13658
13761
|
const namedValue = readFromSource(source, rest);
|
|
@@ -13660,7 +13763,7 @@ function resolveReadBindingValue(binding, context) {
|
|
|
13660
13763
|
}
|
|
13661
13764
|
return applyTransformsAndFallback(readFromSource(context.viewModel, segments), binding, context);
|
|
13662
13765
|
}
|
|
13663
|
-
const namedScope = context
|
|
13766
|
+
const namedScope = findNamedScope(context, first);
|
|
13664
13767
|
if (namedScope) {
|
|
13665
13768
|
source = namedScope.value;
|
|
13666
13769
|
return applyTransformsAndFallback(readFromSource(source, rest), binding, context);
|
|
@@ -13749,9 +13852,11 @@ function resolveRepeater(node, context) {
|
|
|
13749
13852
|
...context,
|
|
13750
13853
|
scopes
|
|
13751
13854
|
};
|
|
13855
|
+
const itemKey = node.key === void 0 ? void 0 : `${node.key}-${idx}`;
|
|
13752
13856
|
const resolved = resolveNode({
|
|
13753
13857
|
...node,
|
|
13754
|
-
$repeat: void 0
|
|
13858
|
+
$repeat: void 0,
|
|
13859
|
+
key: itemKey
|
|
13755
13860
|
}, repeatedContext, idx);
|
|
13756
13861
|
if (resolved === null) return null;
|
|
13757
13862
|
const target = buildLinkedContentEditTarget({
|
|
@@ -13764,7 +13869,7 @@ function resolveRepeater(node, context) {
|
|
|
13764
13869
|
const frame = context.registry.linkedEntryEditFrame;
|
|
13765
13870
|
if (!frame) return resolved;
|
|
13766
13871
|
return React.createElement(frame, {
|
|
13767
|
-
key: idx,
|
|
13872
|
+
key: itemKey ?? idx,
|
|
13768
13873
|
target,
|
|
13769
13874
|
blockId: context.blockId,
|
|
13770
13875
|
blockKind: context.blockKind
|
|
@@ -14404,37 +14509,41 @@ function makeDefaultBlockComponent(args) {
|
|
|
14404
14509
|
}
|
|
14405
14510
|
function createDefaultBlockComponent(manifest) {
|
|
14406
14511
|
return function DefaultBlockComponent(props) {
|
|
14407
|
-
|
|
14408
|
-
const prepared = prepareDefaultBlockRender(manifest, props);
|
|
14409
|
-
const result = resolveTree(prepared.layout, {
|
|
14410
|
-
registry: prepared.registry,
|
|
14411
|
-
viewModel: prepared.viewModel,
|
|
14412
|
-
dateContext: prepared.dateContext,
|
|
14413
|
-
now: prepared.now,
|
|
14414
|
-
transforms: props.transforms,
|
|
14415
|
-
theme: prepared.themeForTransforms,
|
|
14416
|
-
proseHoverCandidate: prepared.proseHoverCandidate,
|
|
14417
|
-
pathBase: props.pathBase,
|
|
14418
|
-
blockId: props.blockId,
|
|
14419
|
-
newsletterBlockSubmission: props.newsletterBlockSubmission,
|
|
14420
|
-
blockKind: props.blockKind,
|
|
14421
|
-
blockContent: prepared.mergedContent,
|
|
14422
|
-
blockBindings: props.blockBindings,
|
|
14423
|
-
editableRouteMetadataFieldIds: props.editableRouteMetadataFieldIds,
|
|
14424
|
-
fragmentRegistry: props.fragmentRegistry,
|
|
14425
|
-
fieldConstraints: prepared.fieldConstraints,
|
|
14426
|
-
imageResolveContext: props.imageResolveContext,
|
|
14427
|
-
previewAuthoring: props.previewAuthoring
|
|
14428
|
-
});
|
|
14429
|
-
reportSlowBlockRender(perf, {
|
|
14430
|
-
content: props.content,
|
|
14431
|
-
blockId: props.blockId,
|
|
14432
|
-
blockKind: props.blockKind ?? manifest.name,
|
|
14433
|
-
manifestName: manifest.name
|
|
14434
|
-
});
|
|
14435
|
-
return result;
|
|
14512
|
+
return resolveDefaultBlockTree(manifest, props);
|
|
14436
14513
|
};
|
|
14437
14514
|
}
|
|
14515
|
+
/** Resolve declarative markup once so page-wide semantics can inspect the same tree that renders. */
|
|
14516
|
+
function resolveDefaultBlockTree(manifest, props) {
|
|
14517
|
+
const perf = beginBlockRenderMeasurement();
|
|
14518
|
+
const prepared = prepareDefaultBlockRender(manifest, props);
|
|
14519
|
+
const result = resolveTree(prepared.layout, {
|
|
14520
|
+
registry: prepared.registry,
|
|
14521
|
+
viewModel: prepared.viewModel,
|
|
14522
|
+
dateContext: prepared.dateContext,
|
|
14523
|
+
now: prepared.now,
|
|
14524
|
+
transforms: props.transforms,
|
|
14525
|
+
theme: prepared.themeForTransforms,
|
|
14526
|
+
proseHoverCandidate: prepared.proseHoverCandidate,
|
|
14527
|
+
pathBase: props.pathBase,
|
|
14528
|
+
blockId: props.blockId,
|
|
14529
|
+
newsletterBlockSubmission: props.newsletterBlockSubmission,
|
|
14530
|
+
blockKind: props.blockKind,
|
|
14531
|
+
blockContent: prepared.mergedContent,
|
|
14532
|
+
blockBindings: props.blockBindings,
|
|
14533
|
+
editableRouteMetadataFieldIds: props.editableRouteMetadataFieldIds,
|
|
14534
|
+
fragmentRegistry: props.fragmentRegistry,
|
|
14535
|
+
fieldConstraints: prepared.fieldConstraints,
|
|
14536
|
+
imageResolveContext: props.imageResolveContext,
|
|
14537
|
+
previewAuthoring: props.previewAuthoring
|
|
14538
|
+
});
|
|
14539
|
+
reportSlowBlockRender(perf, {
|
|
14540
|
+
content: props.content,
|
|
14541
|
+
blockId: props.blockId,
|
|
14542
|
+
blockKind: props.blockKind ?? manifest.name,
|
|
14543
|
+
manifestName: manifest.name
|
|
14544
|
+
});
|
|
14545
|
+
return result;
|
|
14546
|
+
}
|
|
14438
14547
|
function prepareBlockRender(input) {
|
|
14439
14548
|
const mergedContent = mergeContentWithBlockStyleOverrides(input.content, input.themeConfig, input.blockKind);
|
|
14440
14549
|
return {
|
|
@@ -14565,6 +14674,88 @@ function runtimeDateContext(viewModel) {
|
|
|
14565
14674
|
return resolveDateRuntimeContext(typeof root.bookingTimeZone === "string" ? root.bookingTimeZone : void 0);
|
|
14566
14675
|
}
|
|
14567
14676
|
//#endregion
|
|
14677
|
+
//#region ../blocks/src/pageHeadingSemantics.tsx
|
|
14678
|
+
/** Inspect resolved declarative markup, after conditions, bindings and repeaters. Never invoke arbitrary React components. */
|
|
14679
|
+
function elements(tree) {
|
|
14680
|
+
if (Array.isArray(tree)) return tree.flatMap(elements);
|
|
14681
|
+
return React.isValidElement(tree) ? [tree, ...elements(tree.props.children)] : [];
|
|
14682
|
+
}
|
|
14683
|
+
function hasText(value) {
|
|
14684
|
+
if (typeof value === "string") return value.trim().length > 0;
|
|
14685
|
+
const inline = parseInlineTextFromUnknown(value);
|
|
14686
|
+
return inline.ok && inlineTextToPlainText(inline.value).trim().length > 0;
|
|
14687
|
+
}
|
|
14688
|
+
function richTextHasH1(value) {
|
|
14689
|
+
if (!value || typeof value !== "object") return false;
|
|
14690
|
+
const level = Reflect.get(value, "attrs");
|
|
14691
|
+
if (Reflect.get(value, "type") === "heading" && level && typeof level === "object" && Reflect.get(level, "level") === 1) return true;
|
|
14692
|
+
const content = Reflect.get(value, "content");
|
|
14693
|
+
return Array.isArray(content) && content.some(richTextHasH1);
|
|
14694
|
+
}
|
|
14695
|
+
function ownsH1(node, eventDetailsComponent) {
|
|
14696
|
+
if ((node.type === "h1" || node.props.as === "h1") && (hasText(node.props.value) || React.Children.count(node.props.children) > 0)) return true;
|
|
14697
|
+
if (richTextHasH1(node.props.value)) return true;
|
|
14698
|
+
if (node.type !== eventDetailsComponent || !React.isValidElement(node)) return false;
|
|
14699
|
+
const presentation = resolveEventDetailsPresentation({
|
|
14700
|
+
...node.props,
|
|
14701
|
+
subject: normalizeEventRegistrationPageSurfaceSubject(node.props.subject)
|
|
14702
|
+
});
|
|
14703
|
+
return presentation.arrangement === "event-header" && (presentation.selection.kind !== "empty" || Boolean(presentation.entryTitle));
|
|
14704
|
+
}
|
|
14705
|
+
function isSectionHeading(node) {
|
|
14706
|
+
if (node.props.as !== "h2" || !hasText(node.props.value)) return false;
|
|
14707
|
+
const slot = node.props["data-slot"];
|
|
14708
|
+
const path = node.props.path;
|
|
14709
|
+
return slot === "heading" || slot === "headline" || typeof path === "string" && /^blocks\.[^.]+\.[^.]+$/.test(path);
|
|
14710
|
+
}
|
|
14711
|
+
function promote(tree, heading) {
|
|
14712
|
+
if (Array.isArray(tree)) {
|
|
14713
|
+
const items = tree;
|
|
14714
|
+
const children = items.map((child) => promote(child, heading));
|
|
14715
|
+
return children.every((child, index) => child === items[index]) ? items : children;
|
|
14716
|
+
}
|
|
14717
|
+
if (!React.isValidElement(tree)) return tree;
|
|
14718
|
+
if (tree === heading) return React.cloneElement(tree, {
|
|
14719
|
+
as: "h1",
|
|
14720
|
+
className: [tree.props.className, "rb-heading-level-2"].filter(Boolean).join(" ")
|
|
14721
|
+
});
|
|
14722
|
+
const children = promote(tree.props.children, heading);
|
|
14723
|
+
return children === tree.props.children ? tree : React.cloneElement(tree, {}, children);
|
|
14724
|
+
}
|
|
14725
|
+
/** One page-wide choice; callers receive the final trees and do not recompute heading rules. */
|
|
14726
|
+
function applyPageHeadingSemantics(trees, eventDetailsComponent) {
|
|
14727
|
+
const nodes = [...trees.values()].flatMap(elements);
|
|
14728
|
+
if (nodes.some((node) => ownsH1(node, eventDetailsComponent))) return {
|
|
14729
|
+
trees,
|
|
14730
|
+
needsPageTitle: false
|
|
14731
|
+
};
|
|
14732
|
+
const heading = nodes.find(isSectionHeading);
|
|
14733
|
+
return heading ? {
|
|
14734
|
+
trees: new Map([...trees].map(([id, tree]) => [id, promote(tree, heading)])),
|
|
14735
|
+
needsPageTitle: false
|
|
14736
|
+
} : {
|
|
14737
|
+
trees,
|
|
14738
|
+
needsPageTitle: true
|
|
14739
|
+
};
|
|
14740
|
+
}
|
|
14741
|
+
/** Inline hiding also works in SDK sites that do not load utility CSS. */
|
|
14742
|
+
function PageTitleFallback({ name }) {
|
|
14743
|
+
return /* @__PURE__ */ jsx("h1", {
|
|
14744
|
+
style: {
|
|
14745
|
+
position: "absolute",
|
|
14746
|
+
width: 1,
|
|
14747
|
+
height: 1,
|
|
14748
|
+
padding: 0,
|
|
14749
|
+
margin: -1,
|
|
14750
|
+
overflow: "hidden",
|
|
14751
|
+
clipPath: "inset(50%)",
|
|
14752
|
+
whiteSpace: "nowrap",
|
|
14753
|
+
border: 0
|
|
14754
|
+
},
|
|
14755
|
+
children: name
|
|
14756
|
+
});
|
|
14757
|
+
}
|
|
14758
|
+
//#endregion
|
|
14568
14759
|
//#region ../blocks/src/pageRenderAudience.tsx
|
|
14569
14760
|
/**
|
|
14570
14761
|
* The single policy for what a non-renderable block looks like.
|
|
@@ -14902,6 +15093,7 @@ function offeringsPreviewPhotoCount(listing) {
|
|
|
14902
15093
|
case "no-groups":
|
|
14903
15094
|
case "nothing-to-show": return 0;
|
|
14904
15095
|
case "by-date": return listing.items.filter(({ item }) => hasPhoto(item)).length;
|
|
15096
|
+
case "by-course": return listing.groups.reduce((count, load) => count + courseGroupPhotoCount(load), 0);
|
|
14905
15097
|
case "by-type": return listing.groups.reduce((count, load) => count + groupPhotoCount(load), 0);
|
|
14906
15098
|
default: return assertNever$1(listing);
|
|
14907
15099
|
}
|
|
@@ -14921,6 +15113,113 @@ function hasPhoto(item) {
|
|
|
14921
15113
|
default: return assertNever$1(item);
|
|
14922
15114
|
}
|
|
14923
15115
|
}
|
|
15116
|
+
function courseGroupPhotoCount(load) {
|
|
15117
|
+
if (load.kind !== "items") return 0;
|
|
15118
|
+
const courses = groupOfferingRunsByCourse(load.items);
|
|
15119
|
+
const ungrouped = load.items.filter((item) => item.kind !== "run" || !item.run.run.listing);
|
|
15120
|
+
return courses.filter(({ course }) => course.presentation?.image).length + ungrouped.filter(hasPhoto).length;
|
|
15121
|
+
}
|
|
15122
|
+
//#endregion
|
|
15123
|
+
//#region ../blocks/src/blockContentPreparation.ts
|
|
15124
|
+
function prepareBlockContent(kind, content, data, context, audience) {
|
|
15125
|
+
return {
|
|
15126
|
+
...arrangementResolvedContent(kind, content, data, context, audience),
|
|
15127
|
+
data: arrangementResolvedData(kind, content, data)
|
|
15128
|
+
};
|
|
15129
|
+
}
|
|
15130
|
+
function arrangementResolvedData(kind, content, data) {
|
|
15131
|
+
if (kind !== "block.testimonials" || content._effectiveLook === void 0 || !Array.isArray(data?.entries)) return data;
|
|
15132
|
+
return {
|
|
15133
|
+
...data,
|
|
15134
|
+
entries: content._quoteCount === null ? data.entries : data.entries.slice(0, Number(content._quoteCount))
|
|
15135
|
+
};
|
|
15136
|
+
}
|
|
15137
|
+
function arrangementResolvedContent(kind, content, data, context, audience) {
|
|
15138
|
+
if (!data) return {
|
|
15139
|
+
content,
|
|
15140
|
+
publicVisibility: "shown"
|
|
15141
|
+
};
|
|
15142
|
+
if (kind === "block.offerings-preview") return offeringArrangementContent(content, data, context, audience);
|
|
15143
|
+
if (kind === "block.appointment-services" && content._effectiveLook !== void 0) return {
|
|
15144
|
+
content: appointmentArrangementContent(content, data, context),
|
|
15145
|
+
publicVisibility: "shown"
|
|
15146
|
+
};
|
|
15147
|
+
return {
|
|
15148
|
+
content,
|
|
15149
|
+
publicVisibility: "shown"
|
|
15150
|
+
};
|
|
15151
|
+
}
|
|
15152
|
+
/** One listing owns card visibility, public section omission and photo counting. */
|
|
15153
|
+
function offeringArrangementContent(content, data, context, audience) {
|
|
15154
|
+
const normalized = normalizeBlockContent(offeringsPreviewBlockDefinition, content);
|
|
15155
|
+
if (!needsOfferingListing(content, normalized)) return {
|
|
15156
|
+
content,
|
|
15157
|
+
publicVisibility: "shown"
|
|
15158
|
+
};
|
|
15159
|
+
const now = new Date(readRuntimeNow(context?.now));
|
|
15160
|
+
const listing = buildLoadedOfferingsPreviewListing({
|
|
15161
|
+
now,
|
|
15162
|
+
listingMode: offeringsListingFor(cardListArrangementForContent(content) ?? "legacy"),
|
|
15163
|
+
routeCandidates: publicRouteCandidatesSchema.safeParse(data.routeCandidates).data,
|
|
15164
|
+
...normalized,
|
|
15165
|
+
presets: context?.bookingOfferingPresets,
|
|
15166
|
+
catalogueEvents: readPublicEvents(data.catalogueEvents),
|
|
15167
|
+
wholeSeriesRunEvents: readPublicEvents(data.wholeSeriesRunEvents),
|
|
15168
|
+
...Object.fromEntries(OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS.map((definition) => [definition.dataKey, readPublicEvents(data[definition.dataKey])]))
|
|
15169
|
+
});
|
|
15170
|
+
const prepared = {
|
|
15171
|
+
...content,
|
|
15172
|
+
_offeringsPreviewInput: {
|
|
15173
|
+
kind: "prepared",
|
|
15174
|
+
listing,
|
|
15175
|
+
now
|
|
15176
|
+
},
|
|
15177
|
+
...audience === "authoring" ? { _offeringsPreviewShowHiddenPlaceholder: true } : {}
|
|
15178
|
+
};
|
|
15179
|
+
return {
|
|
15180
|
+
content: content._effectiveLook === void 0 ? prepared : withCardListPhotoCount(prepared, content.showPhotos === false ? 0 : offeringsPreviewPhotoCount(listing)),
|
|
15181
|
+
publicVisibility: listing.kind === "no-groups" && listing.reason === "empty-hidden" ? "omitted" : "shown"
|
|
15182
|
+
};
|
|
15183
|
+
}
|
|
15184
|
+
/** Older blocks opt into preparation only when public visibility needs their listing. */
|
|
15185
|
+
function needsOfferingListing(content, normalized) {
|
|
15186
|
+
return content._effectiveLook !== void 0 || normalized.groupOverrides?.some((group) => group.hideWhenEmpty === true) === true;
|
|
15187
|
+
}
|
|
15188
|
+
function readPublicEvents(value) {
|
|
15189
|
+
const parsed = publicEventsArraySchema.safeParse(value);
|
|
15190
|
+
return parsed.success ? parsed.data : void 0;
|
|
15191
|
+
}
|
|
15192
|
+
function appointmentArrangementContent(content, data, context) {
|
|
15193
|
+
const view = buildAppointmentServicesView({
|
|
15194
|
+
arrangement: cardListArrangementForContent(content),
|
|
15195
|
+
services: data.services,
|
|
15196
|
+
categoryId: content.categoryId,
|
|
15197
|
+
pathname: context?.pathname,
|
|
15198
|
+
servicePathPrefix: context?.appointmentServicePathPrefix
|
|
15199
|
+
});
|
|
15200
|
+
const rows = view.kind === "items" ? view.rows : view.kind === "groups" ? view.groups.flatMap((group) => group.rows) : [];
|
|
15201
|
+
const photoCount = content.showPhotos === false ? 0 : rows.filter((row) => row.media).length;
|
|
15202
|
+
return withCardListPhotoCount({
|
|
15203
|
+
...content,
|
|
15204
|
+
_appointmentServicesView: view
|
|
15205
|
+
}, photoCount);
|
|
15206
|
+
}
|
|
15207
|
+
function withCardListPhotoCount(content, photoCount) {
|
|
15208
|
+
const hooks = typeof content._lookHooks === "object" && content._lookHooks !== null ? content._lookHooks : {};
|
|
15209
|
+
return {
|
|
15210
|
+
...content,
|
|
15211
|
+
_lookHooks: {
|
|
15212
|
+
...hooks,
|
|
15213
|
+
"data-has-photo": String(photoCount > 0),
|
|
15214
|
+
"data-photo-count": String(photoCount)
|
|
15215
|
+
}
|
|
15216
|
+
};
|
|
15217
|
+
}
|
|
15218
|
+
function cardListArrangementForContent(content) {
|
|
15219
|
+
const hooks = content._lookHooks;
|
|
15220
|
+
if (typeof hooks !== "object" || hooks === null || !("data-arrangement" in hooks)) return void 0;
|
|
15221
|
+
return cardListPresentationSchemaShape.cardArrangement.safeParse(hooks["data-arrangement"]).data;
|
|
15222
|
+
}
|
|
14924
15223
|
//#endregion
|
|
14925
15224
|
//#region ../blocks/src/system/manifest/hydrateLinks.ts
|
|
14926
15225
|
/**
|
|
@@ -15094,7 +15393,7 @@ function preparePageRenderEntries(input, previous = null) {
|
|
|
15094
15393
|
const prepared = admission.entries.map((entry) => [entry, readPreparedPlanEntry(entry, input, previous, admission.permission)]);
|
|
15095
15394
|
const entries = prepared.map(([, value]) => value);
|
|
15096
15395
|
const constructionFailures = entries.filter((candidate) => candidate.prepared.kind === "render-threw").map((candidate) => candidate.entry);
|
|
15097
|
-
const survivors = input.audience === "authoring" ? entries : entries.filter((candidate) => candidate.prepared.kind !== "render-threw" && candidate.prepared.kind !== "unresolved-location");
|
|
15396
|
+
const survivors = input.audience === "authoring" ? entries : entries.filter((candidate) => candidate.prepared.kind !== "render-threw" && candidate.prepared.kind !== "unresolved-location" && !(candidate.prepared.kind === "content" && candidate.prepared.publicVisibility === "omitted"));
|
|
15098
15397
|
const surviving = new Set(survivors);
|
|
15099
15398
|
const survivingByEntry = new Map(prepared.filter(([, candidate]) => surviving.has(candidate)));
|
|
15100
15399
|
const regions = {
|
|
@@ -15130,7 +15429,7 @@ function preparationAdmission(input) {
|
|
|
15130
15429
|
const permission = input.dataContext?.businessLocationPermission ?? decideLocationSourcePermission("business_address", input.dataContext?.businessAddressVisibility);
|
|
15131
15430
|
return {
|
|
15132
15431
|
permission,
|
|
15133
|
-
entries: input.plan.entries.filter((entry) => input.audience === "authoring" || !
|
|
15432
|
+
entries: input.plan.entries.filter((entry) => input.audience === "authoring" || !entryHiddenFromVisitors(entry, facts, input.dataContext?.interactionContext)).filter((entry) => isPublicSourcePermitted(entry, permission) || input.audience === "authoring" && permission.kind === "hidden")
|
|
15134
15433
|
};
|
|
15135
15434
|
}
|
|
15136
15435
|
function readPreparedPlanEntry(entry, input, previous, permission) {
|
|
@@ -15169,8 +15468,11 @@ function isPublicSourcePermitted(entry, permission) {
|
|
|
15169
15468
|
const rawSource = entry.renderableContent.locationSource;
|
|
15170
15469
|
return normalizeLocationMapSource(typeof rawSource === "string" ? rawSource : null) !== "business_address" || permission.kind === "permitted";
|
|
15171
15470
|
}
|
|
15172
|
-
function
|
|
15173
|
-
return entry.kind === "renderable" && entry.definition.readiness
|
|
15471
|
+
function entryHiddenFromVisitors(entry, facts, interaction) {
|
|
15472
|
+
return entry.kind === "renderable" && entry.definition.readiness !== void 0 && hiddenFromVisitors(entry.definition.readiness.assess(entry.renderableContent, facts, {
|
|
15473
|
+
blockId: entry.block.id ?? null,
|
|
15474
|
+
interaction
|
|
15475
|
+
}));
|
|
15174
15476
|
}
|
|
15175
15477
|
/**
|
|
15176
15478
|
* The only place joins are composed. Plan-time omissions were already
|
|
@@ -15228,26 +15530,32 @@ function buildPreparedContent(entry, content, input) {
|
|
|
15228
15530
|
const routes = input.routeMap ?? dataContext?.routes;
|
|
15229
15531
|
const hydratedContent = routes ? hydrateManifestLinks(entry.definition.manifest, content, routes, dataContext?.pagesByIdentifier, dataContext?.entriesByIdentifier) : content;
|
|
15230
15532
|
const resolved = resolveBlockData(block.id, entry.definition.dataLoaders, dataContext, routes);
|
|
15533
|
+
const { baseProps, publicVisibility } = preparedBlockProps(entry, hydratedContent, resolved, input);
|
|
15231
15534
|
return {
|
|
15232
15535
|
kind: "content",
|
|
15233
|
-
baseProps
|
|
15536
|
+
baseProps,
|
|
15537
|
+
publicVisibility,
|
|
15234
15538
|
component: entry.override ? void 0 : makeDefaultBlockComponent({ manifest: entry.definition.manifest }),
|
|
15235
15539
|
hasResolvedData: !!resolved && typeof resolved === "object" && Object.keys(resolved).length > 0,
|
|
15236
15540
|
routes
|
|
15237
15541
|
};
|
|
15238
15542
|
}
|
|
15239
15543
|
function preparedBlockProps(entry, content, data, input) {
|
|
15544
|
+
const prepared = prepareBlockContent(entry.block.kind, content, data, input.dataContext, input.audience);
|
|
15240
15545
|
return {
|
|
15241
|
-
|
|
15242
|
-
|
|
15243
|
-
|
|
15244
|
-
|
|
15245
|
-
|
|
15246
|
-
|
|
15247
|
-
|
|
15248
|
-
|
|
15249
|
-
|
|
15250
|
-
|
|
15546
|
+
baseProps: {
|
|
15547
|
+
...buildBlockOverrideProps({
|
|
15548
|
+
content: prepared.content,
|
|
15549
|
+
data: prepared.data,
|
|
15550
|
+
block: entry.block,
|
|
15551
|
+
themeResources: input.themeResources,
|
|
15552
|
+
dataContext: input.dataContext,
|
|
15553
|
+
imageResolveContext: input.imageResolveContext,
|
|
15554
|
+
routeMap: input.routeMap
|
|
15555
|
+
}),
|
|
15556
|
+
bookingTimeZone: input.dataContext?.bookingTimeZone
|
|
15557
|
+
},
|
|
15558
|
+
publicVisibility: prepared.publicVisibility
|
|
15251
15559
|
};
|
|
15252
15560
|
}
|
|
15253
15561
|
/**
|
|
@@ -15314,82 +15622,6 @@ function blockSubjectProps(dataContext) {
|
|
|
15314
15622
|
subject
|
|
15315
15623
|
};
|
|
15316
15624
|
}
|
|
15317
|
-
function arrangementResolvedData(kind, content, data) {
|
|
15318
|
-
if (kind !== "block.testimonials" || content._effectiveLook === void 0 || !Array.isArray(data?.entries)) return data;
|
|
15319
|
-
return {
|
|
15320
|
-
...data,
|
|
15321
|
-
entries: content._quoteCount === null ? data.entries : data.entries.slice(0, Number(content._quoteCount))
|
|
15322
|
-
};
|
|
15323
|
-
}
|
|
15324
|
-
function arrangementResolvedContent(kind, content, data, context) {
|
|
15325
|
-
if (content._effectiveLook === void 0 || !data || kind !== "block.offerings-preview" && kind !== "block.appointment-services") return content;
|
|
15326
|
-
if (kind === "block.appointment-services") return appointmentArrangementContent(content, data, context);
|
|
15327
|
-
const normalized = normalizeBlockContent(offeringsPreviewBlockDefinition, content);
|
|
15328
|
-
const now = new Date(readRuntimeNow(context?.now));
|
|
15329
|
-
const listing = buildLoadedOfferingsPreviewListing({
|
|
15330
|
-
now,
|
|
15331
|
-
listingMode: offeringsListingFor(cardListArrangementForContent(content) ?? "legacy"),
|
|
15332
|
-
routeCandidates: publicRouteCandidatesSchema.safeParse(data.routeCandidates).data,
|
|
15333
|
-
...normalized,
|
|
15334
|
-
presets: context?.bookingOfferingPresets,
|
|
15335
|
-
catalogueEvents: readPublicEvents(data.catalogueEvents),
|
|
15336
|
-
wholeSeriesRunEvents: readPublicEvents(data.wholeSeriesRunEvents),
|
|
15337
|
-
...Object.fromEntries(OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS.map((definition) => [definition.dataKey, readPublicEvents(data[definition.dataKey])]))
|
|
15338
|
-
});
|
|
15339
|
-
return withCardListPhotoCount({
|
|
15340
|
-
...content,
|
|
15341
|
-
_offeringsPreviewInput: {
|
|
15342
|
-
kind: "prepared",
|
|
15343
|
-
listing,
|
|
15344
|
-
now
|
|
15345
|
-
}
|
|
15346
|
-
}, content.showPhotos === false ? 0 : offeringsPreviewPhotoCount(listing));
|
|
15347
|
-
}
|
|
15348
|
-
function readPublicEvents(value) {
|
|
15349
|
-
const parsed = publicEventsArraySchema.safeParse(value);
|
|
15350
|
-
return parsed.success ? parsed.data : void 0;
|
|
15351
|
-
}
|
|
15352
|
-
function appointmentArrangementContent(content, data, context) {
|
|
15353
|
-
const view = buildAppointmentServicesView({
|
|
15354
|
-
arrangement: cardListArrangementForContent(content),
|
|
15355
|
-
services: data.services,
|
|
15356
|
-
categoryId: content.categoryId,
|
|
15357
|
-
pathname: context?.pathname,
|
|
15358
|
-
servicePathPrefix: context?.appointmentServicePathPrefix
|
|
15359
|
-
});
|
|
15360
|
-
const rows = view.kind === "items" ? view.rows : view.kind === "groups" ? view.groups.flatMap((group) => group.rows) : [];
|
|
15361
|
-
const photoCount = content.showPhotos === false ? 0 : rows.filter((row) => row.media).length;
|
|
15362
|
-
return withCardListPhotoCount({
|
|
15363
|
-
...content,
|
|
15364
|
-
_appointmentServicesView: view
|
|
15365
|
-
}, photoCount);
|
|
15366
|
-
}
|
|
15367
|
-
function withCardListPhotoCount(content, photoCount) {
|
|
15368
|
-
const hooks = typeof content._lookHooks === "object" && content._lookHooks !== null ? content._lookHooks : {};
|
|
15369
|
-
return {
|
|
15370
|
-
...content,
|
|
15371
|
-
_lookHooks: {
|
|
15372
|
-
...hooks,
|
|
15373
|
-
"data-has-photo": String(photoCount > 0),
|
|
15374
|
-
"data-photo-count": String(photoCount)
|
|
15375
|
-
}
|
|
15376
|
-
};
|
|
15377
|
-
}
|
|
15378
|
-
function cardListArrangementForContent(content) {
|
|
15379
|
-
const hooks = content._lookHooks;
|
|
15380
|
-
if (typeof hooks !== "object" || hooks === null || !("data-arrangement" in hooks)) return void 0;
|
|
15381
|
-
const arrangement = hooks["data-arrangement"];
|
|
15382
|
-
switch (arrangement) {
|
|
15383
|
-
case "cards":
|
|
15384
|
-
case "lead-support":
|
|
15385
|
-
case "index":
|
|
15386
|
-
case "sequence":
|
|
15387
|
-
case "plates":
|
|
15388
|
-
case "slides":
|
|
15389
|
-
case "track": return arrangement;
|
|
15390
|
-
default: return;
|
|
15391
|
-
}
|
|
15392
|
-
}
|
|
15393
15625
|
function preparedPlanEntry(entry, prepared) {
|
|
15394
15626
|
return {
|
|
15395
15627
|
entry: entry.kind === "renderable" && prepared.kind === "content" ? {
|
|
@@ -15519,12 +15751,32 @@ function PageRendererCore(props) {
|
|
|
15519
15751
|
dataContext,
|
|
15520
15752
|
themeResources
|
|
15521
15753
|
});
|
|
15522
|
-
if (!page || preparation.entries.length === 0) return props.wrapPage ? props.wrapPage(plan, presentEmptyPage(audience)) : presentEmptyPage(audience);
|
|
15523
15754
|
setContextResolveImageUrlContext(imageResolveContext);
|
|
15524
|
-
const
|
|
15755
|
+
const resolvedRegistry = props.registry ?? getDefaultComponentRegistry();
|
|
15756
|
+
const readSystemTrees = React$1.useMemo(createPageSystemTreeReader, []);
|
|
15757
|
+
const headingPresentation = React$1.useMemo(() => applyPageHeadingSemantics(readSystemTrees({
|
|
15758
|
+
preparation,
|
|
15759
|
+
dataContext,
|
|
15760
|
+
registry: resolvedRegistry,
|
|
15761
|
+
previewAuthoring: props.previewAuthoring,
|
|
15762
|
+
imageResolveContext
|
|
15763
|
+
}), resolvedRegistry["event-details"]), [
|
|
15764
|
+
preparation,
|
|
15765
|
+
dataContext,
|
|
15766
|
+
resolvedRegistry,
|
|
15767
|
+
props.previewAuthoring,
|
|
15768
|
+
imageResolveContext,
|
|
15769
|
+
readSystemTrees
|
|
15770
|
+
]);
|
|
15771
|
+
return wrapRenderedPage(props, plan, !page || preparation.entries.length === 0 ? renderEmptyPage(page, audience) : renderPreparedPage(props, preparation, themeResources, imageResolveContext, headingPresentation));
|
|
15772
|
+
}
|
|
15773
|
+
function renderEmptyPage(page, audience) {
|
|
15774
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [page ? /* @__PURE__ */ jsx(PageTitleFallback, { name: page.name }) : null, presentEmptyPage(audience)] });
|
|
15775
|
+
}
|
|
15776
|
+
function wrapRenderedPage(props, plan, rendered) {
|
|
15525
15777
|
return props.wrapPage ? props.wrapPage(plan, rendered) : rendered;
|
|
15526
15778
|
}
|
|
15527
|
-
function renderPreparedPage(props, preparation, themeResources, imageResolveContext) {
|
|
15779
|
+
function renderPreparedPage(props, preparation, themeResources, imageResolveContext, headingPresentation) {
|
|
15528
15780
|
const resolvedRegistry = props.registry ?? getDefaultComponentRegistry();
|
|
15529
15781
|
const joinSlots = joinSlotsByPair(preparation.joins);
|
|
15530
15782
|
const renderRegion = (entries, joins) => entries.map((entry, index) => renderGuardedPlanEntry({
|
|
@@ -15535,24 +15787,30 @@ function renderPreparedPage(props, preparation, themeResources, imageResolveCont
|
|
|
15535
15787
|
themeResources,
|
|
15536
15788
|
imageResolveContext,
|
|
15537
15789
|
resolvedRegistry,
|
|
15790
|
+
systemTrees: headingPresentation.trees,
|
|
15538
15791
|
joinSlots: joins,
|
|
15539
15792
|
wrapBlock: props.wrapBlock,
|
|
15540
15793
|
renderJoin: props.renderJoin
|
|
15541
15794
|
}));
|
|
15542
15795
|
const { main, aside } = preparation.regions;
|
|
15543
|
-
|
|
15796
|
+
const title = headingPresentation.needsPageTitle ? /* @__PURE__ */ jsx(PageTitleFallback, { name: props.page?.name ?? "" }) : null;
|
|
15797
|
+
if (aside.length === 0) return /* @__PURE__ */ jsxs("div", { children: [title, renderRegion(main, joinSlots)] });
|
|
15544
15798
|
return /* @__PURE__ */ jsxs("div", {
|
|
15545
15799
|
className: "rb-page-layout",
|
|
15546
15800
|
"data-page-layout": "main-aside",
|
|
15547
|
-
children: [
|
|
15548
|
-
|
|
15549
|
-
|
|
15550
|
-
|
|
15551
|
-
|
|
15552
|
-
|
|
15553
|
-
|
|
15554
|
-
|
|
15555
|
-
|
|
15801
|
+
children: [
|
|
15802
|
+
title,
|
|
15803
|
+
/* @__PURE__ */ jsx("div", {
|
|
15804
|
+
className: "rb-page-layout__main",
|
|
15805
|
+
"data-page-region": "main",
|
|
15806
|
+
children: renderRegion(main, joinSlots)
|
|
15807
|
+
}),
|
|
15808
|
+
/* @__PURE__ */ jsx("aside", {
|
|
15809
|
+
className: "rb-page-layout__aside rb-sticky-below-site-chrome",
|
|
15810
|
+
"data-page-region": "aside",
|
|
15811
|
+
children: renderRegion(aside, /* @__PURE__ */ new Map())
|
|
15812
|
+
})
|
|
15813
|
+
]
|
|
15556
15814
|
});
|
|
15557
15815
|
}
|
|
15558
15816
|
/**
|
|
@@ -15672,7 +15930,8 @@ function renderPlanEntry(input) {
|
|
|
15672
15930
|
entry: input.entry,
|
|
15673
15931
|
blockKey,
|
|
15674
15932
|
imageResolveContext,
|
|
15675
|
-
registry: resolvedRegistry
|
|
15933
|
+
registry: resolvedRegistry,
|
|
15934
|
+
systemTree: input.systemTrees.get(entry)
|
|
15676
15935
|
});
|
|
15677
15936
|
if (!shouldUseWrapper) {
|
|
15678
15937
|
const rendered = /* @__PURE__ */ jsx(MemoBlockSection, { ...blockSectionProps }, `${blockKey}:block`);
|
|
@@ -15719,6 +15978,7 @@ function resolvePageRendererImageResolveContext(dataContext) {
|
|
|
15719
15978
|
}
|
|
15720
15979
|
function buildBlockSectionProps(input) {
|
|
15721
15980
|
return {
|
|
15981
|
+
systemTree: input.systemTree,
|
|
15722
15982
|
themeResources: input.themeResources,
|
|
15723
15983
|
entry: input.entry,
|
|
15724
15984
|
audience: input.props.audience,
|
|
@@ -15758,14 +16018,13 @@ function blockRootLookups(dataContext, routes) {
|
|
|
15758
16018
|
function renderSystemBlockElement(input) {
|
|
15759
16019
|
const { prepared, dataContext } = input;
|
|
15760
16020
|
const block = input.entry.block;
|
|
15761
|
-
|
|
15762
|
-
if (!BlockComponent) return null;
|
|
16021
|
+
if (!prepared.component) return null;
|
|
15763
16022
|
const rootContext = { $root: {
|
|
15764
16023
|
...buildPageRendererRootRuntime(dataContext),
|
|
15765
16024
|
...blockRootLookups(dataContext, prepared.routes),
|
|
15766
16025
|
...blockSubjectProps(dataContext)
|
|
15767
16026
|
} };
|
|
15768
|
-
return
|
|
16027
|
+
return resolveDefaultBlockTree(input.entry.definition.manifest, {
|
|
15769
16028
|
...prepared.baseProps,
|
|
15770
16029
|
dateContext: rootContext.$root.dateContext,
|
|
15771
16030
|
now: rootContext.$root.now,
|
|
@@ -15781,6 +16040,39 @@ function renderSystemBlockElement(input) {
|
|
|
15781
16040
|
previewAuthoring: input.previewAuthoring
|
|
15782
16041
|
});
|
|
15783
16042
|
}
|
|
16043
|
+
/** Keep resolution failures inside the existing per-block React error boundary. */
|
|
16044
|
+
function FailedSystemBlockTree({ error }) {
|
|
16045
|
+
throw error;
|
|
16046
|
+
}
|
|
16047
|
+
function resolveSystemBlockTree(input) {
|
|
16048
|
+
try {
|
|
16049
|
+
return renderSystemBlockElement(input);
|
|
16050
|
+
} catch (error) {
|
|
16051
|
+
return /* @__PURE__ */ jsx(FailedSystemBlockTree, { error });
|
|
16052
|
+
}
|
|
16053
|
+
}
|
|
16054
|
+
/** Preserve the block memo's reuse rules while resolving page-wide heading facts. */
|
|
16055
|
+
function createPageSystemTreeReader() {
|
|
16056
|
+
const memo = {};
|
|
16057
|
+
return (input) => {
|
|
16058
|
+
const previous = memo.current;
|
|
16059
|
+
const sameSettings = previous && previous.input.registry === input.registry && previous.input.previewAuthoring === input.previewAuthoring && previous.input.imageResolveContext === input.imageResolveContext;
|
|
16060
|
+
const trees = new Map([...input.preparation.regions.main, ...input.preparation.regions.aside].flatMap((candidate) => {
|
|
16061
|
+
const { entry, prepared } = candidate;
|
|
16062
|
+
if (entry.kind !== "renderable" || entry.override || prepared.kind !== "content") return [];
|
|
16063
|
+
return [[candidate, sameSettings && previous.trees.has(candidate) && sameBlockRenderDataContext(previous.input.dataContext, input.dataContext, entry.block.id) ? previous.trees.get(candidate) : resolveSystemBlockTree({
|
|
16064
|
+
...input,
|
|
16065
|
+
entry,
|
|
16066
|
+
prepared
|
|
16067
|
+
})]];
|
|
16068
|
+
}));
|
|
16069
|
+
memo.current = {
|
|
16070
|
+
input,
|
|
16071
|
+
trees
|
|
16072
|
+
};
|
|
16073
|
+
return new Map([...trees].map(([candidate, tree]) => [candidate.entry, tree]));
|
|
16074
|
+
};
|
|
16075
|
+
}
|
|
15784
16076
|
/** Pure diagnostic choice; the audience owner controls its presentation. */
|
|
15785
16077
|
function preparationDiagnostic(prepared, blockKind) {
|
|
15786
16078
|
switch (prepared.kind) {
|
|
@@ -15846,7 +16138,7 @@ function finishBlockRender(node, block, perfStart, meta) {
|
|
|
15846
16138
|
* referential equality of all props that affect rendering. Standard React.memo
|
|
15847
16139
|
* wouldn't catch all the render triggers from the editor store.
|
|
15848
16140
|
*/
|
|
15849
|
-
const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources, entry: preparedEntry, routeMap, audience, dataContext,
|
|
16141
|
+
const MemoBlockSection = React$1.memo(function MemoBlockSection({ systemTree, themeResources, entry: preparedEntry, routeMap, audience, dataContext, wrapBlock, imageResolveContext }) {
|
|
15850
16142
|
const { entry, prepared } = preparedEntry;
|
|
15851
16143
|
const block = entry.block;
|
|
15852
16144
|
const perfStart = globalThis.process?.env?.DEBUG_PERF === "1" && typeof window === "undefined" ? Date.now() : 0;
|
|
@@ -15896,21 +16188,14 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources
|
|
|
15896
16188
|
if (OverrideComponent) rendered = /* @__PURE__ */ jsx(OverrideComponent, { ...prepared.baseProps });
|
|
15897
16189
|
else {
|
|
15898
16190
|
requireThemeResources(themeResources, block.kind);
|
|
15899
|
-
rendered =
|
|
15900
|
-
prepared,
|
|
15901
|
-
entry,
|
|
15902
|
-
dataContext,
|
|
15903
|
-
registry,
|
|
15904
|
-
previewAuthoring,
|
|
15905
|
-
imageResolveContext: resolvedImageResolveContext
|
|
15906
|
-
});
|
|
16191
|
+
rendered = systemTree;
|
|
15907
16192
|
}
|
|
15908
16193
|
return finish(wrapped(rendered), {
|
|
15909
16194
|
override: Boolean(OverrideComponent),
|
|
15910
16195
|
hasResolvedData: prepared.hasResolvedData
|
|
15911
16196
|
});
|
|
15912
16197
|
}, (prev, next) => {
|
|
15913
|
-
return prev.entry === next.entry && prev.audience === next.audience && prev.registry === next.registry && sameBlockRenderDataContext(prev.dataContext, next.dataContext, next.entry.entry.block.id) && prev.themeResources === next.themeResources && prev.routeMap === next.routeMap && prev.wrapBlock === next.wrapBlock && prev.imageResolveContext === next.imageResolveContext && prev.previewAuthoring === next.previewAuthoring;
|
|
16198
|
+
return prev.entry === next.entry && prev.systemTree === next.systemTree && prev.audience === next.audience && prev.registry === next.registry && sameBlockRenderDataContext(prev.dataContext, next.dataContext, next.entry.entry.block.id) && prev.themeResources === next.themeResources && prev.routeMap === next.routeMap && prev.wrapBlock === next.wrapBlock && prev.imageResolveContext === next.imageResolveContext && prev.previewAuthoring === next.previewAuthoring;
|
|
15914
16199
|
});
|
|
15915
16200
|
/** Every plan input participates in memo identity; the builder owns all rules. */
|
|
15916
16201
|
function usePageRenderPlan(props) {
|