@riverbankcms/sdk 0.171.0 → 0.172.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-xuFmD41p.d.ts → BlocksIslandsHydrator-DtrzTJ77.d.ts} +1 -1
- package/dist/_dts/{Page-4fzXy8H9.d.ts → Page-DViYbakk.d.ts} +7 -7
- package/dist/_dts/{SdkPreviewMode-BlHgMsc8.d.ts → SdkPreviewMode-D-5OeDbT.d.ts} +2 -2
- package/dist/_dts/{client-BPoU758C.d.ts → client-DZBOzd3U.d.ts} +1 -2
- package/dist/_dts/{content-types-TnkhoSls.d.ts → content-types-DS3DrYn_.d.ts} +3 -3
- package/dist/_dts/{contracts-7wrMA79U.d.ts → contracts-C3QGPCUf.d.ts} +3 -3
- package/dist/_dts/{footerPageOutline-DaOsPQ_Q.d.ts → footerPageOutline-D9Q7VIul.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-D9aDEzKK.d.ts → generatePageMetadata-R7NeFT1u.d.ts} +2 -2
- package/dist/_dts/{index-DDKJfaLY.d.ts → index-BnMavhoh.d.ts} +2 -2
- package/dist/_dts/{index-585vn6qb.d.ts → index-C0zjLMAW.d.ts} +49 -38
- package/dist/_dts/{index-W9R3Bnf2.d.ts → index-CpOkfBt1.d.ts} +3 -3
- package/dist/_dts/{index-Cbw0IiY7.d.ts → index-Da4UMgbs.d.ts} +2 -2
- package/dist/_dts/{index-DNCDENic.d.ts → index-DkFV_1Bc.d.ts} +1 -1
- package/dist/_dts/{index-ChNbrcgD.d.ts → index-Dns7OHyl.d.ts} +1 -1
- package/dist/_dts/{index-CZKSUcDs.d.ts → index-MuMYjetm.d.ts} +4 -4
- package/dist/_dts/{loadContent-DPyNAJym.d.ts → loadContent-DJmXHzfi.d.ts} +7 -7
- package/dist/_dts/{request-jXTRN1Y4.d.ts → request-wQ28JWbr.d.ts} +66983 -65876
- package/dist/_dts/{resolveBlockData-BbvE-gsZ.d.ts → resolveBlockData-C-IP53u9.d.ts} +5 -5
- package/dist/_dts/{resolvePageContent-BBgih00D.d.ts → resolvePageContent-Cc4zqaEC.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 +2 -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-kWvBwYK6.d.ts → types-CpjyP5I4.d.ts} +7 -7
- package/dist/_dts/{types-DEAKoDNi.d.ts → types-DrinAfeW.d.ts} +3 -3
- package/dist/_dts/{types-BXuVxDYo.d.ts → types-ZuZoGsZV.d.ts} +2 -2
- package/dist/_dts/{validation-BAO0_ntM.d.ts → validation-CIZ_fP5l.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-DfMsMIej.mjs → BlocksIslandsHydrator-UFmQB1BE.mjs} +17 -17
- package/dist/client/{BookingMailingListNote-aaSicywS.mjs → BookingMailingListNote-VjRYhx1c.mjs} +6 -6
- package/dist/client/{BookingPanelArrangement-OgftZ9QC.mjs → BookingPanelArrangement-DpqnRo-t.mjs} +1 -1
- package/dist/client/{BookingQuestionFields-BlaCItmH.mjs → BookingQuestionFields-CzOT8ZWo.mjs} +4 -4
- package/dist/client/{CalendarNavigationChevron-iMWrY6Hz.mjs → CalendarNavigationChevron-CNckKZct.mjs} +7 -7
- package/dist/client/{CheckboxChoice-B65wFjqx.mjs → CheckboxChoice-b-PJLEXe.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-BCumOTLY.mjs → DemoBookingPortalAccess-CmZLVXOy.mjs} +6 -6
- package/dist/client/{EventCalendar.client-kh7mkYnW.mjs → EventCalendar.client-BU-SxLCn.mjs} +9 -9
- package/dist/client/{EventCombined.client-DXD5i0Ar.mjs → EventCombined.client-f28VltfY.mjs} +8 -8
- package/dist/client/{EventEmbeddedCheckoutStep-DKKRCuta.mjs → EventEmbeddedCheckoutStep-B18VbNS_.mjs} +1 -1
- package/dist/client/{EventItem-BnwcoFQN.mjs → EventItem-sKBofjiW.mjs} +40 -14
- package/dist/client/{EventListWeekNavigation-DuG6z02f.mjs → EventListWeekNavigation-IAcax47T.mjs} +1 -1
- package/dist/client/{EventListing.client-18yfHrcr.mjs → EventListing.client-BEtnRvZr.mjs} +3 -3
- package/dist/client/{EventListing.view-BM7rTVSL.mjs → EventListing.view-BZ4l_rmT.mjs} +189 -73
- package/dist/client/{EventRegistrationPayment-D5J3DR0x.mjs → EventRegistrationPayment-BWb295cD.mjs} +9 -9
- package/dist/client/{LocationMapActions-QahdLtdE.mjs → LocationMapActions-Hsj2HC_1.mjs} +2 -2
- package/dist/client/{MapDrawingSvg-Dy6UMuIw.mjs → MapDrawingSvg-C7E7Lyfa.mjs} +1 -1
- package/dist/client/{Page-DH2sm4Cf.mjs → Page-Ds1s3DuC.mjs} +1425 -490
- package/dist/client/{ProtectedSubmitButton-AOUzjDK9.mjs → ProtectedSubmitButton-C-ql101B.mjs} +1 -1
- package/dist/client/{StepIndicator-CsRlU46Y.mjs → StepIndicator-CSCyAaKY.mjs} +6 -6
- 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-Bbn1-jJ8.mjs → accessibleSurfaces-OsAseM7H.mjs} +57 -42
- package/dist/client/{accordion-DT4MD3Np.mjs → accordion-DgwFZJSx.mjs} +1 -1
- package/dist/client/{booking-form.client-DdqNQNCa.mjs → booking-form.client-CKY9oksp.mjs} +33 -29
- package/dist/client/{bookingForm-CLN396HU.mjs → bookingForm-CsHhcdSF.mjs} +4 -4
- package/dist/client/bookings.mjs +5 -5
- package/dist/client/{boxStyleClassNames-iLF_3KX9.mjs → boxStyleClassNames-B1Z_TGAe.mjs} +1 -1
- package/dist/client/{carousel-DFLomCGm.mjs → carousel-0sw2Kc3a.mjs} +2 -2
- package/dist/client/{carousel.client-YF4mUK5t.mjs → carousel.client-h65clfUO.mjs} +1 -1
- package/dist/client/{cart-BozMM5NK.mjs → cart-CPfvMDGJ.mjs} +3 -3
- package/dist/client/{cart.client-CqOOxPbW.mjs → cart.client-BJBPUTmg.mjs} +1 -1
- package/dist/client/{checkout-CTWF5nbB.mjs → checkout-DU4JFjGT.mjs} +3 -3
- package/dist/client/{checkout.client-CpqxN8e0.mjs → checkout.client-BbNCO4xa.mjs} +1 -1
- package/dist/client/{checkoutUrls-Ccg6yfjq.mjs → checkoutUrls-BQ3OlWlM.mjs} +1 -1
- package/dist/client/client.mjs +151 -6
- package/dist/client/{context-Dzjv2CpA.mjs → context-xNC1Cyjw.mjs} +14 -1
- package/dist/client/{cta-pzQkBLgS.mjs → cta-CNVQHLKs.mjs} +53 -11
- package/dist/client/{dateFormatting-BfurxGwg.mjs → dateFormatting-B6ea-egy.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-D0dcPsRE.mjs → demoPortalMagicLink-BhjGxhX3.mjs} +1 -1
- package/dist/client/{display-Cl6mgSJa.mjs → display-B5DfNb6A.mjs} +1869 -333
- package/dist/client/{enhanceHeaderSection-CJCl0HJC.mjs → enhanceHeaderSection-BFcHLuqk.mjs} +139 -16
- package/dist/client/{event-details.client-Pn9Kxh3I.mjs → event-details.client-WHT5GLn2.mjs} +1 -1
- package/dist/client/{event-registration.client-BAmBdWXE.mjs → event-registration.client-CmnRKELC.mjs} +11 -11
- package/dist/client/{eventCalendar-C5Bh2L8L.mjs → eventCalendar-2NbdCyov.mjs} +4 -4
- package/dist/client/{eventCombined-dELKxxIe.mjs → eventCombined-D1lH1n2T.mjs} +4 -4
- package/dist/client/{eventDetails-Do9D_fJ_.mjs → eventDetails-BHvnF2Tw.mjs} +2 -2
- package/dist/client/{eventListing-B2HTUWLq.mjs → eventListing-EhSDk4UL.mjs} +4 -4
- package/dist/client/{eventRegistration-ByOJnqGc.mjs → eventRegistration-z_0jN_KS.mjs} +4 -4
- package/dist/client/{form-DX70QG-J.mjs → form-BfChzSkS.mjs} +3 -3
- package/dist/client/{form.client-CJoqBrS6.mjs → form.client-D1zehtPk.mjs} +4 -4
- package/dist/client/{form.parts-DTof9pL3.mjs → form.parts-rMDlUQIv.mjs} +3 -3
- package/dist/client/{formatDate-Cjouxh4Y.mjs → formatDate-ymSVT9Y5.mjs} +1 -1
- package/dist/client/gifting/client.mjs +3 -3
- package/dist/client/{headerSection-CJuPX_1K.mjs → headerSection-BX9bQ84k.mjs} +2 -2
- package/dist/client/{newsletter-form.client-CqzNjOft.mjs → newsletter-form.client-DMbuJCtJ.mjs} +5 -5
- package/dist/client/{newsletter-form.parts-DjJsFms2.mjs → newsletter-form.parts-BxrVsoI0.mjs} +2 -2
- package/dist/client/{newsletterForm-D1MHoPbh.mjs → newsletterForm-B_I3FJFS.mjs} +3 -3
- package/dist/client/{noop-poI1m2yW.mjs → noop-CamIX2yK.mjs} +17 -1
- package/dist/client/portal/client.mjs +231 -117
- package/dist/client/{product-detail.client-DOQ7El1d.mjs → product-detail.client-qxuiYCof.mjs} +1 -1
- package/dist/client/{product-list.client-CmxOZbzL.mjs → product-list.client-CDL-jihv.mjs} +1 -1
- package/dist/client/{productDetail-BN3zv5sa.mjs → productDetail-B97m0uZy.mjs} +3 -3
- package/dist/client/{productList-GN_Id4bF.mjs → productList-DE4vSSG_.mjs} +3 -3
- package/dist/client/{propsDecoder-BdmzM3D5.mjs → propsDecoder-BTde6Syh.mjs} +3 -3
- package/dist/client/{registry.server-BOyra8CA.mjs → registry.server-Cn8XjRte.mjs} +1464 -1183
- package/dist/client/rendering/client.mjs +27 -27
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +22 -16
- package/dist/client/{richText-coerce-CtoGLZ_e.mjs → richText-coerce-Bcl3vTb4.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-DnaJ8PQc.mjs → routeIslandApiConfig-BjRoLoMD.mjs} +1 -1
- package/dist/client/{runtimeResponse-BN8PoIVp.mjs → runtimeResponse-B-lrAGhX.mjs} +1 -1
- package/dist/client/{runtimeResponse-B1-cyLXt.mjs → runtimeResponse-CPcA8xSm.mjs} +1 -1
- package/dist/client/{shop-LjBLDBqF.mjs → shop-BC4H0oYT.mjs} +3 -3
- package/dist/client/{shop-commerce-B8aZTdRJ.mjs → shop-commerce-BsY7a71m.mjs} +12 -12
- package/dist/client/{shop-commerce-store-C1FtHYl7.mjs → shop-commerce-store-BZ5j90HD.mjs} +1 -1
- package/dist/client/{shop.client-D0qZ3KZp.mjs → shop.client-WgGVGelc.mjs} +12 -12
- package/dist/client/{shop.interactive-DAKyWK1B.mjs → shop.interactive-Bb67gPLL.mjs} +187 -81
- package/dist/client/{shopShared-CztcSe9i.mjs → shopShared-BE6TEk2A.mjs} +2 -2
- package/dist/client/spam-protection.mjs +1 -1
- package/dist/client/{timetableModel-D1jDTbms.mjs → timetableModel-Bbz_ECL5.mjs} +10 -10
- package/dist/client/{types-B0hJldSt.mjs → types-DjWUR_O6.mjs} +8 -2
- package/dist/client/{useAvailableSlots-ByHedoBi.mjs → useAvailableSlots-CdP14E_b.mjs} +2 -2
- package/dist/client/{useDiscountApply-CHGYDxdM.mjs → useDiscountApply-DvOSso2l.mjs} +1 -1
- package/dist/client/{useDiscountCodeUi-Dew9UAEy.mjs → useDiscountCodeUi-B4fRd2jy.mjs} +1 -1
- package/dist/client/{useEventPagination-BpC7-ksE.mjs → useEventPagination-M3jC8lgP.mjs} +6 -6
- package/dist/client/{view-BxeiAL3c.mjs → view-B0TFnP4y.mjs} +198 -60
- package/dist/client/{view-ShYH3WXh.mjs → view-DNNNbnNj.mjs} +3 -3
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-CKe4cjZ4.mjs → EventEmbeddedCheckoutStep-aRJjq4x8.mjs} +1 -1
- package/dist/preview-next/client/{LocationPickerEnvironment-lW2aLGWd.mjs → LocationPickerEnvironment-D4F_5rnr.mjs} +1 -1
- package/dist/preview-next/client/{MapLibreEditMap-C9InQJpd.mjs → MapLibreEditMap-BKMNxSEJ.mjs} +2 -2
- package/dist/preview-next/client/{PageSectionToolbar-DsSqwrMS.mjs → PageSectionToolbar-D59tHj_L.mjs} +320 -395
- package/dist/preview-next/client/{PreviewEditorSidebar-BEEWzXnU.mjs → PreviewEditorSidebar-CjOIZlUk.mjs} +761 -416
- package/dist/preview-next/client/{PreviewEditorUI-C86Out4V.mjs → PreviewEditorUI--kS9Cwsc.mjs} +126 -137
- 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-CBWYjBvQ.mjs → PreviewShell-Bi8-rclb.mjs} +312 -63
- package/dist/preview-next/client/{SdkPreviewModeRuntime-o-mVqWLx.mjs → SdkPreviewModeRuntime-CWTUw-3L.mjs} +308 -135
- package/dist/preview-next/client/{SiteChromeCustomizeButton-H_ciMNHA.mjs → SiteChromeCustomizeButton-CrgS3I8d.mjs} +1936 -320
- package/dist/preview-next/client/{ThemedButton-CKYjeU_M.mjs → ThemedButton-CVYz7h68.mjs} +8 -2
- package/dist/preview-next/client/{lucide-react-DygTyy7K.mjs → lucide-react-BCNn8dEQ.mjs} +1 -1
- package/dist/preview-next/client/{previewAssistantSlot-CuOcsG_N.mjs → previewAssistantSlot-Caofnr1Z.mjs} +23441 -21340
- package/dist/preview-next/client/{previewChromeRoot-DPeV7KaP.mjs → previewChromeRoot-CbAI_jSH.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +5 -4
- package/dist/preview-next/client/sdk-runtime-DY65_hLk.mjs +6 -0
- package/dist/preview-next/client/{useAutosaveStatus-DNA1Q4L1.mjs → useAutosaveStatus-CakNU3lp.mjs} +2 -2
- package/dist/preview-next/client/{useOpenBlockForSetup-BdnMlHC6.mjs → useOpenBlockForSetup-CCEMkosU.mjs} +126 -11
- package/dist/preview-next/container-responsive.css +215 -4
- package/dist/preview-next/editor-base.css +14 -4
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-CtSgU8UZ.mjs → route-contract-DsKDQoVW.mjs} +147 -2
- package/dist/server/{Block.shared-ifgaBglp.mjs → Block.shared-D7Qy9F4a.mjs} +4 -4
- package/dist/server/{ThemeScopeCore-DGDOH6OU.mjs → ThemeScopeCore-D1NTXZdX.mjs} +15 -10
- package/dist/server/{accessibleSurfaces-BuPNCWAK.mjs → accessibleSurfaces-Dbd2__Le.mjs} +12 -11
- package/dist/server/{bindings-CiYpie1M.mjs → bindings-Bp6OnR3n.mjs} +109 -20
- package/dist/server/{block-kinds-DkzOr19P.mjs → block-kinds-BCY9z3oB.mjs} +1 -0
- package/dist/server/{client-ngWuFsmN.mjs → client-dROAfMRa.mjs} +149 -4
- package/dist/server/config-template-validation.mjs +3 -0
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/index.mjs +3 -3
- package/dist/server/{loadContent-DeLQeJAZ.mjs → loadContent-zOIrtqz-.mjs} +19 -14
- package/dist/server/{loadPage-D4J747FQ.mjs → loadPage-vwFiq1Rk.mjs} +2 -2
- package/dist/server/next.mjs +6 -6
- package/dist/server/{opaqueSurface-ukEz1BaM.mjs → opaqueSurface-COEKXVwk.mjs} +2 -2
- package/dist/server/{overrideResolution-DSuVkpqm.mjs → overrideResolution-DjboggbB.mjs} +1 -1
- package/dist/server/page-converter.mjs +1 -1
- package/dist/server/{pageRenderPlan-DFv3h4Ib.mjs → pageRenderPlan-BR4t1rOw.mjs} +954 -337
- package/dist/server/{pageRuntimeSupport-yHaRNWMj.mjs → pageRuntimeSupport-BKo6XVK-.mjs} +3 -2
- package/dist/server/{pageShared-CAZD0LcY.mjs → pageShared-BJjptSGp.mjs} +1039 -853
- package/dist/server/{parseThemeForPersistence-Dl7LIBJq.mjs → parseThemeForPersistence-B18KDEue.mjs} +2 -2
- package/dist/server/{prebuild-BKOCND3b.mjs → prebuild-CntSkZQI.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-GIoExi8A.mjs → prefetchBlockData-BM9Ds0OQ.mjs} +2 -2
- package/dist/server/{registry-BogXzcOD.mjs → registry-wYH0LH5f.mjs} +7269 -4975
- 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 +7 -7
- package/dist/server/{resolveBlockData-CT4YSBve.mjs → resolveBlockData-Bu_p4HxZ.mjs} +2 -2
- package/dist/server/{resolveButtonColourStates-DVISOQD9.mjs → resolveButtonColourStates-CCPUY9Xh.mjs} +53 -33
- package/dist/server/{schema-C92Q8y0-.mjs → schema-BFOqYIMQ.mjs} +2 -1
- 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-vSBCWU3w.mjs → validation-DAQdPDku.mjs} +4 -4
- package/dist/server/{version-Cw5vFmUY.mjs → version-DAB0O3yx.mjs} +1 -1
- package/dist/styles/index.css +1260 -15
- package/package.json +1 -1
- package/dist/preview-next/client/PreviewQueryProvider-BC0V7iAR.mjs +0 -43
- package/dist/preview-next/client/sdk-runtime-zTTFZ4MM.mjs +0 -5
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as
|
|
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-
|
|
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 { A as offeringDatesBySeries, B as CalendarIcon, D as EventListingFrameView, E as MonthLookView, F as EmptyState, G as selectQuickDateEvents, H as buildMonthDay, I as CardListCollection, J as resolveEventCardBooking, K as formatEventTeacherLine, L as CardListItems, M as derivePreviewRunSchedule, N as createEditorPresentationPageReader, O as OfferingCourseCards, P as createPresentationPageReader, Q as parseStoredVariant, R as EventItem, S as lookPartShown, T as EVENT_REGISTRATION_ANCHOR_ID, U as resolveMonthSelectedDay, V as MapPinIcon, W as formatEventQuickDate, X as resolveEventLinkProps, Y as resolveEventCta, Z as isBookableEvent, _ as publicAppointmentPricingSchema, a as joinSlotKey, b as resolvePageRouteTarget, c as buildLinkedContentEditTarget, 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 buildThemeTokens, o as renderedJoinLayout, p as formatAppointmentDuration, q as formatEventDuration, rt as defaultThemeTokens, s as retargetJoinsAcrossOmissions, u as resolveLinkedEntryInlineFieldEligibility, w as EventHeader, x as resolveRouteTarget, y as resolveEntryRouteTarget, z as eventCategoryBadge } from "./pageRenderPlan-BR4t1rOw.mjs";
|
|
3
|
+
import { $ as RichText, $a as generateNavLinkCSS, $n as listLookControl, $t as formatEventNextDateFact, A as publicRouteCandidatesSchema, Ai as eventReadinessLoaderKey, An as parseTeamMemberSpecialties, Ar as formCopyFragment, At as resolveOfferingsPreviewGroups, B as buildEventCollectionHydration, Br as normalizeBoxStylesBorder, Bs as toUtcIsoDateTimeString, Bt as eventWeekGroupingContext, C as buildProductListInteractiveIslandProps, Ca as arrangementLookHooks, Ci as parseInlineTextFromUnknown, Cn as shouldReserveFeatureCardIconZone, Cr as headingFragment, Ct as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, D as membershipClassesLabel, Di as parseFieldDefinitions, Dn as markEditableSurfaceForwarding, Dr as blogFeaturedPostFragment, Ds as formatDate$1, Dt as offeringRunLifecycle, E as membershipCardListContent, En as composeHeaderSectionWrapperClassName, Er as faqHeadingFragment, Es as mapDrawingSchema, Et as normalizeOfferingsPreviewItemLimit, F as buildEventCalendarListingDisplay, Fo as introCompositionTreatmentValues, Fr as ctaRowFragment, Ft as ThemedDownloadLink, G as catalogueEventCardProps, Gi as addDays, Gn as buildFormInteractiveIslandProps, Gs as publicEventPricingDisplay, Gt as eventDateOptions, H as eventCollectionDisplaySchemaShape, Hs as formatBookingPriceDisplay, Io as offeringsPreviewCompositionTreatmentValues, Ir as isBlockButtonRole, It as getIconComponent, Ji as getOrderedDayNames, Jn as defineInteractiveIslandMetaKeys, Jr as ctaButton, Jt as formatDate, K as listingEventCardProps, Ki as formatDateKey, Kn as buildInteractiveIslandProps, Ks as publicEventPricingType, L as eventListingBlockDefinition, Lr as heroCopyFragment, Ls as parseLocalScheduleTime, Lt as SpinnerNode, M as offeringsCatalogueShape, Mn as teamMemberCardBiography, Mr as testimonialsHeadingFragment, Ms as toScheduledBookingDateTime, Mt as ThemedAuthoredButton, N as eventCalendarBlockDefinition, Na as resolveEffectiveArrangement, Ni as eventReadinessResultSchema, Nn as readRuntimeNow, Nr as ctaCopyFragment, Nt as ThemedButton, O as passCardListContent, Oi as PUBLIC_DOWNLOAD_MEDIA_TYPES, On as splitPositioningClasses, Or as singleButtonFragment, Ot as offeringsListingFor, P as buildEventCalendarInteractiveIslandProps, Pn as resolveDateRuntimeContext, Po as featureCardCompositionTreatmentValues, Pr as heroCtaRowFragment, Ps as getBookingLocalDateKey, Pt as ThemedButtonLink, Q as MediaNodeServer, Qa as buildTextContrastShadow, Qi as isToday, Qn as listItemPresentation, Qt as formatEventHourLabel, R as buildEventListingInteractiveIslandProps, Rs as resolveBookingBusinessTimeZone, Rt as buildEventListWeek, S as buildProductDetailInteractiveIslandProps, Si as isInlineTextEmpty, Sn as resolveFeatureCardGeneratedIconSizePx, Sr as richTextFragment, Ss as normalizeLocationAddressText, T as shopProductPresentation, Tr as faqAccordionFragment, Tt as groupOfferingRunsByCourse, U as eventCollectionHydrationSchema, Ua as requireCuratedSiteStyle, Ui as getLocalDateKey, Us as isPublicEventPricingOptionDisplayable, Ut as buildCalendarViewport, V as buildEventCollectionListingDisplay, Vr as resolveCardRoleForBoxStyles, W as eventCollectionSourceSchemaShape, Wi as getLocalMinuteOfDay, Wn as formBlockDefinition, Wo as bindingSchema, Ws as publicEventPricingCurrency, Xa as generateDefaultCardSystem, Xi as getWeekCalendarDays, Xn as defineClientOwnedBlockRuntime, Xr as bodyCopyFragment, Xt as formatEventCompactDateRail, Y as cardListPresentationSchemaShape, Ya as resolveCardRole, Yi as getWeekCalendarDayTuple, Yn as createZodCodec, Ys as formatCurrencyAmount, Yt as formatEventClockLabel, Za as generateFooterCss, Zi as isSameCalendarDay, Zn as defineProgressiveBlockRuntime, Zr as defineFragment, Zt as formatEventDateParts, _ as productDetailBlockDefinition, _a as selectItemSurfacePresentation, _i as FileSpreadsheetIcon, _n as pageNavigationSchema, _r as formatEventPriceDisplay, _t as previewStageSchema, a as normalizeLocationMapProps, aa as sanitizeHref, ai as el, an as resolveEventTimeZone, ao as headerNeedsPhotoShade, ar as Grid, as as loadedReadinessFact, b as buildCartInteractiveIslandProps, ba as readOpeningToneProjection, bi as PlusIcon, bn as groupPublicEventsByRun, bo as transitionCatalogueEntries, bs as decideLocationSourcePermission, c as newsletterSignupBlockDefinition, ci as parseBlockIconValue, cn as bookingPresentation, ct as getCurrentResolveImageUrlContext, d as buildNewsletterFormInteractiveIslandProps, da as isRecord$4, di as ChevronDownIcon, dn as formatEventRemainingPlaces, ds as firstLiveRunSessionStartMs, dt as getCardOrientation, ea as publicEventsArraySchema, eo as generateEffectsCSS, er as listLookSlot, et as ImagePresets, f as newsletterBlockSubmissionMessage, fa as parseThemeButtonVariantId, fi as CircleMinusIcon, fn as formatTotalCapacity, fo as boundaryRuntimeMetricsForDecorativeTransition, ft as getContainerClass, g as cartBlockDefinition, gi as FileAudioIcon, gn as blockSiteTermsSchema, gr as formatEventPriceAmount, gs as parseMailingListRuntimeContext, gt as bookingNowSchema, h as checkoutBlockDefinition, hi as FileArchiveIcon, hn as isEventFull, hr as formatEventPrice, hs as buildMailingListSignupBlockSourceRef, ht as resolveEventRegistrationEventSource, ia as beforeBookingQuestionsPresentationSchema, ii as runTransforms, in as groupEventsByDate, is as hiddenFromVisitors, j as buildOfferingsCatalogueListing, ja as arrangementManifestFromVariants, jn as teamMemberBiography, jr as testimonialsCarouselFragment, js as formatBookingCompactEnglishTime, jt as resolveOfferingsRenderInput, k as offeringsPreviewBlockDefinition, kr as formEmbedFragment, kt as resolveOfferingsPreviewGroupCta, li as resolveBlockIconRenderValue, ln as browserReadAuthoritySchema, lt as setContextResolveImageUrlContext, m as buildGiftingInteractiveIslandProps, ma as AFFORDANCE_SUPPRESS_CLASS, mi as ClockIcon, mn as getEventAvailabilityStatus, ms as resolveWholeSeriesBookingPhase, mt as buildEventRegistrationInteractiveIslandProps, na as blockBookingConsentSchema, nr as resolvedItemSurfaceProps, ns as chosenString, o as normalizeLocationMapSource, oi as when, on as resolveRuntimeEventDestination, oo as headerRootPaint, or as clsx, os as pageTemplateFromEntry, ot as resolvePublicMediaUrl, p as giftingBlockDefinition, pa as themeButtonSelector, pi as CirclePlusIcon, ps as orderedLiveRunSessions, pt as eventRegistrationBlockDefinition, q as CardListContentPart, qi as getDayOfWeek, qn as createInteractiveIslandCodec, qr as resolveBackgroundColorValue, qt as formatCalendarTitle, r as normalizeBlockContent, ra as bookingConsentCarrierSchema, rn as formatTime, rr as itemRole, rs as admitReadinessFacts, s as resolveLocationMapLocation, si as buildGeneratedBlockIconRenderAssetLookupFromUnknown, ss as unavailableReadinessFact, st as buildResolveImageUrlContext, t as getBlockDefinition, ta as blockBookingPaymentTermsSchema, tc as TokenResolver, tn as formatEventTimeRange, to as generateInteractiveChildInheritanceCSS, tr as lookListPresentationSchemaShape, tt as MediaPlaceholder, u as NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, ua as isObjectRecord, ui as ArrowDownIcon, us as CANCELLED_SESSION_STATUS, ut as EventQuickFacts, v as productListBlockDefinition, vi as FileTextIcon, vn as closedRunCopy, vs as parseMailingListPlacementTargeting, vt as normalizeEventRegistrationPageSurfaceSubject, w as buildShopInteractiveIslandProps, wr as cardFragment, wt as buildOfferingsPreviewListing, x as buildCheckoutInteractiveIslandProps, xi as inlineTextToPlainText, xn as FEATURE_CARD_ICON_TREATMENTS, y as shopBlockDefinition, ya as effectiveHeaderNavLinkStyle, yi as MinusIcon, yn as bookingPageKindSchema, yo as anglePolygonCss, ys as sameMailingListPlacementTargeting, yt as resolveEventRegistrationScopedEvents, z as buildEventCollectionDisplay, zn as staticHeaderChromeRuntime, zo as testimonialsCompositionTreatmentValues, zr as boxStyleClassNames, zs as toBookingTimeZone, zt as eventListWeekDays } from "./registry-wYH0LH5f.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-BFOqYIMQ.mjs";
|
|
6
6
|
import { l as renderableMediaAssetSchema, o as runtimeMediaSchema } from "./media-Brn9FW5s.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-BKo6XVK-.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-Bp6OnR3n.mjs";
|
|
13
|
+
import { t as parseThemeForPersistence } from "./parseThemeForPersistence-B18KDEue.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,
|
|
@@ -4313,95 +3961,448 @@ function clipDraft(segment, rangeStartMinutes, rangeEndMinutes) {
|
|
|
4313
3961
|
}
|
|
4314
3962
|
};
|
|
4315
3963
|
}
|
|
4316
|
-
function buildCell(entry, lane, rangeStartMinutes, rangeMinutes, minHeightPercent) {
|
|
4317
|
-
const heightPercent = Math.max(minHeightPercent, toRangePercent(entry.visibleEnd - entry.visibleStart, rangeMinutes));
|
|
4318
|
-
const rawTopPercent = toRangePercent(entry.visibleStart - rangeStartMinutes, rangeMinutes);
|
|
4319
|
-
const topPercent = Math.min(rawTopPercent, 100 - heightPercent);
|
|
4320
|
-
return {
|
|
4321
|
-
item: entry.segment.draft.item,
|
|
4322
|
-
dateKey: entry.segment.dateKey,
|
|
4323
|
-
startsAtMinutes: entry.segment.startsAtMinutes,
|
|
4324
|
-
endsAtMinutes: entry.segment.endsAtMinutes,
|
|
4325
|
-
visibleStartsAtMinutes: entry.visibleStart,
|
|
4326
|
-
visibleEndsAtMinutes: entry.visibleEnd,
|
|
4327
|
-
topPercent,
|
|
4328
|
-
heightPercent,
|
|
4329
|
-
isClippedStart: entry.segment.continuesBefore || entry.segment.startsAtMinutes < entry.visibleStart,
|
|
4330
|
-
isClippedEnd: entry.segment.continuesAfter || entry.segment.endsAtMinutes > entry.visibleEnd,
|
|
4331
|
-
laneIndex: lane.laneIndex,
|
|
4332
|
-
laneCount: lane.laneCount,
|
|
4333
|
-
color: entry.segment.draft.color
|
|
4334
|
-
};
|
|
3964
|
+
function buildCell(entry, lane, rangeStartMinutes, rangeMinutes, minHeightPercent) {
|
|
3965
|
+
const heightPercent = Math.max(minHeightPercent, toRangePercent(entry.visibleEnd - entry.visibleStart, rangeMinutes));
|
|
3966
|
+
const rawTopPercent = toRangePercent(entry.visibleStart - rangeStartMinutes, rangeMinutes);
|
|
3967
|
+
const topPercent = Math.min(rawTopPercent, 100 - heightPercent);
|
|
3968
|
+
return {
|
|
3969
|
+
item: entry.segment.draft.item,
|
|
3970
|
+
dateKey: entry.segment.dateKey,
|
|
3971
|
+
startsAtMinutes: entry.segment.startsAtMinutes,
|
|
3972
|
+
endsAtMinutes: entry.segment.endsAtMinutes,
|
|
3973
|
+
visibleStartsAtMinutes: entry.visibleStart,
|
|
3974
|
+
visibleEndsAtMinutes: entry.visibleEnd,
|
|
3975
|
+
topPercent,
|
|
3976
|
+
heightPercent,
|
|
3977
|
+
isClippedStart: entry.segment.continuesBefore || entry.segment.startsAtMinutes < entry.visibleStart,
|
|
3978
|
+
isClippedEnd: entry.segment.continuesAfter || entry.segment.endsAtMinutes > entry.visibleEnd,
|
|
3979
|
+
laneIndex: lane.laneIndex,
|
|
3980
|
+
laneCount: lane.laneCount,
|
|
3981
|
+
color: entry.segment.draft.color
|
|
3982
|
+
};
|
|
3983
|
+
}
|
|
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, ...rest] = eligibleRuns;
|
|
4244
|
+
return rest.length === 0 ? {
|
|
4245
|
+
kind: "single",
|
|
4246
|
+
run: first
|
|
4247
|
+
} : {
|
|
4248
|
+
kind: "choice",
|
|
4249
|
+
runs: eligibleRuns
|
|
4250
|
+
};
|
|
4251
|
+
}
|
|
4252
|
+
function isOrdinaryPublicEvent(event) {
|
|
4253
|
+
return event.bookingScope === "single_occurrence";
|
|
4335
4254
|
}
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4255
|
+
/**
|
|
4256
|
+
* Whether a parent Event page advertises this run.
|
|
4257
|
+
*
|
|
4258
|
+
* Visibility admission belongs to the scoped public read. Active, still-open
|
|
4259
|
+
* admitted runs are advertised, and a run that has started,
|
|
4260
|
+
* finished or been cancelled is informational wherever it appears.
|
|
4261
|
+
*
|
|
4262
|
+
* Capacity is deliberately not consulted (decision A24/A30): a full date is
|
|
4263
|
+
* still one of the dates on offer, and its own page shows the full or waitlist
|
|
4264
|
+
* state that the registration engine decides. Hiding it here would leave a
|
|
4265
|
+
* visitor unable to see that the date exists at all.
|
|
4266
|
+
*/
|
|
4267
|
+
function resolveWholeSeriesChooserEligibility(group, now) {
|
|
4268
|
+
const status = group.representative.status;
|
|
4269
|
+
if (status !== void 0 && status !== "active") return {
|
|
4270
|
+
kind: "excluded",
|
|
4271
|
+
reason: "series-not-active"
|
|
4340
4272
|
};
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
endHour: bounds.defaultEndHour
|
|
4273
|
+
const phase = resolveWholeSeriesBookingPhase(group.run, now);
|
|
4274
|
+
return phase.kind === "open" ? { kind: "eligible" } : {
|
|
4275
|
+
kind: "excluded",
|
|
4276
|
+
reason: phase.reason
|
|
4346
4277
|
};
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4278
|
+
}
|
|
4279
|
+
/**
|
|
4280
|
+
* Runs in the order a visitor reads them: soonest first session first.
|
|
4281
|
+
*
|
|
4282
|
+
* A run with no session left to attend has no place in the sequence, so it
|
|
4283
|
+
* sorts last rather than being given an arbitrary date.
|
|
4284
|
+
*/
|
|
4285
|
+
function orderRunsBySchedule(groups) {
|
|
4286
|
+
return [...groups].sort((left, right) => {
|
|
4287
|
+
const leftStart = firstLiveRunSessionStartMs(left.run.sessions);
|
|
4288
|
+
const rightStart = firstLiveRunSessionStartMs(right.run.sessions);
|
|
4289
|
+
if (leftStart === null) return rightStart === null ? 0 : 1;
|
|
4290
|
+
if (rightStart === null) return -1;
|
|
4291
|
+
return leftStart - rightStart;
|
|
4292
|
+
});
|
|
4293
|
+
}
|
|
4294
|
+
function asNonEmpty(groups) {
|
|
4295
|
+
const [first, ...rest] = groups;
|
|
4296
|
+
return first ? [first, ...rest] : null;
|
|
4297
|
+
}
|
|
4298
|
+
/**
|
|
4299
|
+
* What a parent Event path selects.
|
|
4300
|
+
*
|
|
4301
|
+
* The scoped read admits public and unlisted runs for the offering's own page.
|
|
4302
|
+
* The chooser lists the ones still open; when none is, the most recent
|
|
4303
|
+
* admitted run supplies the page's name and copy. Runs from another offering
|
|
4304
|
+
* cannot speak for this page.
|
|
4305
|
+
*/
|
|
4306
|
+
function planWholeSeriesParentSelection(input) {
|
|
4307
|
+
const offeringRuns = orderRunsBySchedule(groupPublicEventsByRun(input.events).filter((group) => group.run.eventOfferingId === input.offeringId));
|
|
4308
|
+
const eligibleRuns = asNonEmpty(offeringRuns.filter((group) => resolveWholeSeriesChooserEligibility(group, input.now).kind === "eligible"));
|
|
4309
|
+
if (eligibleRuns) return {
|
|
4310
|
+
kind: "wholeSeriesParent",
|
|
4311
|
+
admittedRuns: offeringRuns,
|
|
4312
|
+
offeringId: input.offeringId,
|
|
4313
|
+
eligibleRuns
|
|
4354
4314
|
};
|
|
4315
|
+
const informationalRun = offeringRuns.at(-1);
|
|
4316
|
+
return informationalRun ? {
|
|
4317
|
+
kind: "wholeSeriesParentUnavailable",
|
|
4318
|
+
admittedRuns: offeringRuns,
|
|
4319
|
+
offeringId: input.offeringId,
|
|
4320
|
+
informationalRun,
|
|
4321
|
+
bookingClosedDetail: resolveParentBookingClosedDetail(offeringRuns, input.now)
|
|
4322
|
+
} : null;
|
|
4355
4323
|
}
|
|
4356
|
-
|
|
4357
|
-
|
|
4324
|
+
/**
|
|
4325
|
+
* What a course page says when none of its runs is bookable.
|
|
4326
|
+
*
|
|
4327
|
+
* A run whose page is up without bookings carries its own reason, so the course
|
|
4328
|
+
* speaks for the runs it has: if any of them was live and has been taken
|
|
4329
|
+
* offline the course is closed for now, and otherwise it is waiting to open. A
|
|
4330
|
+
* course whose runs are simply cancelled, under way or finished carries no
|
|
4331
|
+
* reason at all, and the page keeps the words it already has for that.
|
|
4332
|
+
*
|
|
4333
|
+
* Only a run with a session still to come counts. A run that was paused a year
|
|
4334
|
+
* ago and whose dates have all passed says nothing about the course now, and
|
|
4335
|
+
* letting it speak would tell a visitor that a newly announced run is closed.
|
|
4336
|
+
*/
|
|
4337
|
+
function resolveParentBookingClosedDetail(runs, now) {
|
|
4338
|
+
const details = runs.flatMap((group) => {
|
|
4339
|
+
const detail = group.representative.bookingClosedDetail;
|
|
4340
|
+
return detail && hasSessionAhead(group, now) ? [detail] : [];
|
|
4341
|
+
});
|
|
4342
|
+
if (details.length === 0) return null;
|
|
4343
|
+
return details.some((detail) => detail.kind === "paused") ? { kind: "paused" } : { kind: "opensSoon" };
|
|
4344
|
+
}
|
|
4345
|
+
/** Whether the run still has a session a visitor could attend. */
|
|
4346
|
+
function hasSessionAhead(group, now) {
|
|
4347
|
+
return orderedLiveRunSessions(group.run.sessions).some((session) => Date.parse(session.startsAt) > now.getTime());
|
|
4348
|
+
}
|
|
4349
|
+
/** What a targeted run path selects, when the named run projected any data. */
|
|
4350
|
+
function planWholeSeriesRunSelection(input) {
|
|
4351
|
+
const group = groupPublicEventsByRun(input.events).find((candidate) => candidate.eventSeriesId === input.eventSeriesId);
|
|
4352
|
+
if (!group) return null;
|
|
4358
4353
|
return {
|
|
4359
|
-
|
|
4360
|
-
|
|
4354
|
+
kind: "wholeSeriesRun",
|
|
4355
|
+
offeringId: group.run.eventOfferingId,
|
|
4356
|
+
run: group
|
|
4361
4357
|
};
|
|
4362
4358
|
}
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4359
|
+
/**
|
|
4360
|
+
* The Event record that speaks for a selection.
|
|
4361
|
+
*
|
|
4362
|
+
* Page metadata, the destination mode and the shared presentation all need one
|
|
4363
|
+
* record; every variant has one, so callers never re-derive it.
|
|
4364
|
+
*/
|
|
4365
|
+
function selectionRepresentativeEvent(selection) {
|
|
4366
|
+
switch (selection.kind) {
|
|
4367
|
+
case "occurrence": return selection.event;
|
|
4368
|
+
case "wholeSeriesParent": return selection.eligibleRuns[0].representative;
|
|
4369
|
+
case "wholeSeriesParentUnavailable": return selection.informationalRun.representative;
|
|
4370
|
+
case "wholeSeriesRun": return selection.run.representative;
|
|
4374
4371
|
}
|
|
4375
|
-
return grouped;
|
|
4376
|
-
}
|
|
4377
|
-
function toRangePercent(minutes, rangeMinutes) {
|
|
4378
|
-
if (rangeMinutes <= 0) return 0;
|
|
4379
|
-
return minutes / rangeMinutes * 100;
|
|
4380
4372
|
}
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4373
|
+
/**
|
|
4374
|
+
* Why this page is not taking bookings, when its own state says so.
|
|
4375
|
+
*
|
|
4376
|
+
* A parent course page answers for its runs; everything else answers for the
|
|
4377
|
+
* record the page is about. `null` leaves the booking column exactly as it was.
|
|
4378
|
+
*/
|
|
4379
|
+
function resolveSelectionBookingClosedDetail(selection) {
|
|
4380
|
+
switch (selection.kind) {
|
|
4381
|
+
case "occurrence": return selection.event.bookingClosedDetail ?? null;
|
|
4382
|
+
case "wholeSeriesRun": return selection.run.representative.bookingClosedDetail ?? null;
|
|
4383
|
+
case "wholeSeriesParent": return null;
|
|
4384
|
+
case "wholeSeriesParentUnavailable": return selection.bookingClosedDetail;
|
|
4385
|
+
}
|
|
4384
4386
|
}
|
|
4385
|
-
function
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
while (formatDateKey(cursor) <= endDateKey) {
|
|
4392
|
-
keys.push(formatDateKey(cursor));
|
|
4393
|
-
cursor = addDays(cursor, 1);
|
|
4387
|
+
function planDropInPanel(selection) {
|
|
4388
|
+
const detail = resolveSelectionBookingClosedDetail(selection);
|
|
4389
|
+
if (detail === null) return { kind: "comeAlong" };
|
|
4390
|
+
switch (detail.kind) {
|
|
4391
|
+
case "opensSoon":
|
|
4392
|
+
case "paused": return { kind: "notRunning" };
|
|
4394
4393
|
}
|
|
4395
|
-
return keys;
|
|
4396
4394
|
}
|
|
4397
|
-
function
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4395
|
+
function getPublicEventCanonicalPath(event) {
|
|
4396
|
+
if (event.path) return event.path;
|
|
4397
|
+
return event.destination.kind === "native" ? event.destination.path : null;
|
|
4398
|
+
}
|
|
4399
|
+
function eventOccurrenceContext(event) {
|
|
4401
4400
|
return {
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4401
|
+
id: event.occurrenceId,
|
|
4402
|
+
seriesId: event.seriesId,
|
|
4403
|
+
startsAt: event.startsAt,
|
|
4404
|
+
endsAt: event.endsAt,
|
|
4405
|
+
timeZone: event.timeZone
|
|
4405
4406
|
};
|
|
4406
4407
|
}
|
|
4407
4408
|
//#endregion
|
|
@@ -4424,39 +4425,6 @@ function eventVenuePlace(venue) {
|
|
|
4424
4425
|
addressWithBooking: false
|
|
4425
4426
|
};
|
|
4426
4427
|
}
|
|
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
4428
|
//#endregion
|
|
4461
4429
|
//#region ../blocks/src/system/runtime/shared/utils/bookingRoute.ts
|
|
4462
4430
|
const BOOK_TARGET_PARAMS = {
|
|
@@ -4893,7 +4861,7 @@ function cropHeightStyle(height, heightAs) {
|
|
|
4893
4861
|
*
|
|
4894
4862
|
* This component is server-safe (uses no client APIs like Intl).
|
|
4895
4863
|
*/
|
|
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 }) => {
|
|
4864
|
+
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 }) => {
|
|
4897
4865
|
const { presentationClass, cardHeadingLevel, formattedDate, formattedTime, cta, cardClass, title, summary, image, category, categoryBadge, hasImage, dateFact, priceText, teacherLine, capacityText, orientationClass } = eventCardFacts({
|
|
4898
4866
|
event,
|
|
4899
4867
|
presentation,
|
|
@@ -4903,7 +4871,8 @@ const EventCard = ({ event, cardRole = "default", buttonVariant = "primary", but
|
|
|
4903
4871
|
showCategory,
|
|
4904
4872
|
showImage,
|
|
4905
4873
|
showCapacity,
|
|
4906
|
-
orientation
|
|
4874
|
+
orientation,
|
|
4875
|
+
now
|
|
4907
4876
|
});
|
|
4908
4877
|
return /* @__PURE__ */ jsxs("article", {
|
|
4909
4878
|
...listLookSlot({
|
|
@@ -5155,13 +5124,13 @@ function EventLookDate({ event, ...presentation }) {
|
|
|
5155
5124
|
})]
|
|
5156
5125
|
});
|
|
5157
5126
|
}
|
|
5158
|
-
function eventCardFacts({ event, presentation, headingLevel, buttonText, cardRole, showCategory, showImage, showCapacity, orientation }) {
|
|
5127
|
+
function eventCardFacts({ event, presentation, headingLevel, buttonText, cardRole, showCategory, showImage, showCapacity, orientation, now }) {
|
|
5159
5128
|
const { presentation: cardPresentation, presentationClass, headingLevel: cardHeadingLevel } = resolveEventCardOptions({
|
|
5160
5129
|
presentation,
|
|
5161
5130
|
headingLevel
|
|
5162
5131
|
});
|
|
5163
5132
|
const { formattedDate, formattedTime } = formatEventCardWhen(event);
|
|
5164
|
-
const booking =
|
|
5133
|
+
const booking = eventCardBooking(event, presentation, buttonText, now);
|
|
5165
5134
|
const { cta } = booking;
|
|
5166
5135
|
const cardClass = boxStyleClassNames({ role: cardRole }, { baseClass: "event-card" });
|
|
5167
5136
|
const title = event.title;
|
|
@@ -5193,6 +5162,9 @@ function eventCardFacts({ event, presentation, headingLevel, buttonText, cardRol
|
|
|
5193
5162
|
orientationClass: eventCardOrientationClass(orientation)
|
|
5194
5163
|
};
|
|
5195
5164
|
}
|
|
5165
|
+
function eventCardBooking(event, presentation, buttonText, now) {
|
|
5166
|
+
return resolveEventCardBooking(event, presentation === "catalogue" ? "series" : "occurrence", buttonText, { now: now ?? null });
|
|
5167
|
+
}
|
|
5196
5168
|
//#endregion
|
|
5197
5169
|
//#region ../blocks/src/system/runtime/nodes/events/shared/EventCompactRow.tsx
|
|
5198
5170
|
/**
|
|
@@ -5310,6 +5282,7 @@ const LegacyEventCompactRow = ({ event, buttonVariant = "primary", buttonText, s
|
|
|
5310
5282
|
* external events retain their canonical destination and target behaviour.
|
|
5311
5283
|
*/
|
|
5312
5284
|
function EventQuickDates({ events, pathname, buttonVariant = "primary", dateStyle }) {
|
|
5285
|
+
const headingId = React.useId();
|
|
5313
5286
|
const quickDateEvents = selectQuickDateEvents(events);
|
|
5314
5287
|
if (quickDateEvents.length === 0) return null;
|
|
5315
5288
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -5317,9 +5290,13 @@ function EventQuickDates({ events, pathname, buttonVariant = "primary", dateStyl
|
|
|
5317
5290
|
"data-event-quick-dates": "true",
|
|
5318
5291
|
children: [/* @__PURE__ */ jsx("h2", {
|
|
5319
5292
|
className: "event-quick-dates-heading",
|
|
5293
|
+
id: headingId,
|
|
5320
5294
|
children: "Next few dates"
|
|
5321
5295
|
}), /* @__PURE__ */ jsx("div", {
|
|
5322
|
-
className: "event-quick-dates-rail rb-overflow-x-auto
|
|
5296
|
+
className: "event-quick-dates-rail rb-overflow-x-auto",
|
|
5297
|
+
role: "region",
|
|
5298
|
+
"aria-labelledby": headingId,
|
|
5299
|
+
tabIndex: 0,
|
|
5323
5300
|
children: quickDateEvents.map((event) => /* @__PURE__ */ jsx(EventQuickDateCard, {
|
|
5324
5301
|
event,
|
|
5325
5302
|
pathname,
|
|
@@ -5360,7 +5337,7 @@ function EventQuickDateCard(props) {
|
|
|
5360
5337
|
const { event } = props;
|
|
5361
5338
|
const { date, bookingLink } = quickDateCardPresentation(props);
|
|
5362
5339
|
return /* @__PURE__ */ jsxs("article", {
|
|
5363
|
-
className: "event-quick-date rb-flex rb-
|
|
5340
|
+
className: "event-quick-date rb-flex rb-flex-col rb-gap-3 rb-rounded-lg rb-border rb-p-4",
|
|
5364
5341
|
children: [
|
|
5365
5342
|
/* @__PURE__ */ jsx("time", {
|
|
5366
5343
|
className: "event-quick-date-when",
|
|
@@ -5459,6 +5436,7 @@ function readinessFactsFromLoaders(stage, input) {
|
|
|
5459
5436
|
const facts = {
|
|
5460
5437
|
mailingList: loaderFactProducers.mailingList(input),
|
|
5461
5438
|
testimonials: loaderFactProducers.testimonials(input),
|
|
5439
|
+
events: loaderFactProducers.events(input),
|
|
5462
5440
|
team: loaderFactProducers.team(input),
|
|
5463
5441
|
forms: loaderFactProducers.forms(input),
|
|
5464
5442
|
products: loaderFactProducers.products(input),
|
|
@@ -5475,6 +5453,7 @@ const loaderFactProducers = {
|
|
|
5475
5453
|
count,
|
|
5476
5454
|
total: "unknown"
|
|
5477
5455
|
})),
|
|
5456
|
+
events: (input) => new Map(projections(input, "events").map(({ id, block }) => [id, loaderFact(input, id, eventReadinessLoaderKey(block.content), eventReadinessResultSchema)])),
|
|
5478
5457
|
team: (input) => firstLoaderFact(input, "team", "members", countSchema),
|
|
5479
5458
|
forms: (input) => new Map(projections(input, "forms").flatMap(({ id, block }) => {
|
|
5480
5459
|
const selection = chosenString(block.requests.form?.params.formSlug ?? block.requests.form?.params.formId);
|
|
@@ -6464,8 +6443,10 @@ const VideoEmbedNode = ({ value, className, style, aspectRatio, blockId: _blockI
|
|
|
6464
6443
|
});
|
|
6465
6444
|
const title = getVideoTitle(embedInfo);
|
|
6466
6445
|
const shouldDeferSrc = getVideoEmbedLoadingStrategy(embedInfo.provider) === "defer-until-near-viewport";
|
|
6446
|
+
const providerHook = "data-slot" in rest ? { "data-video-provider": embedInfo.provider } : {};
|
|
6467
6447
|
return /* @__PURE__ */ jsx("div", {
|
|
6468
6448
|
...rest,
|
|
6449
|
+
...providerHook,
|
|
6469
6450
|
children: /* @__PURE__ */ jsxs("div", {
|
|
6470
6451
|
className,
|
|
6471
6452
|
"data-rb-video-embed-wrapper": shouldDeferSrc ? "true" : void 0,
|
|
@@ -6938,7 +6919,7 @@ function listGroupPresentation(presentation) {
|
|
|
6938
6919
|
* Every renderer of grouped offerings frames its groups from this one answer.
|
|
6939
6920
|
*/
|
|
6940
6921
|
function listGroupFrames(presentation) {
|
|
6941
|
-
const panels = presentation.cardArrangement === "type-columns";
|
|
6922
|
+
const panels = presentation.cardArrangement === "type-columns" || presentation.cardArrangement === "next-cards";
|
|
6942
6923
|
return {
|
|
6943
6924
|
list: panels ? listLookSlot(presentation, "list") : {},
|
|
6944
6925
|
panel: panels ? listLookSlot(presentation, "panel") : {}
|
|
@@ -7539,7 +7520,6 @@ function normalizeBookingSettings(value) {
|
|
|
7539
7520
|
serviceId: readOptionalString(value.serviceId),
|
|
7540
7521
|
serviceIds: readStringArray(value.serviceIds),
|
|
7541
7522
|
resourceId: readOptionalString(value.resourceId),
|
|
7542
|
-
requiresApproval: typeof value.requiresApproval === "boolean" ? value.requiresApproval : void 0,
|
|
7543
7523
|
successMessage: readOptionalString(value.successMessage)
|
|
7544
7524
|
};
|
|
7545
7525
|
}
|
|
@@ -7631,7 +7611,6 @@ const bookingSettingsSchema = z.object({
|
|
|
7631
7611
|
serviceId: z.string().optional(),
|
|
7632
7612
|
serviceIds: z.array(z.string()).optional(),
|
|
7633
7613
|
resourceId: z.string().optional(),
|
|
7634
|
-
requiresApproval: z.boolean().optional(),
|
|
7635
7614
|
successMessage: z.string().optional()
|
|
7636
7615
|
});
|
|
7637
7616
|
const bookingSourceFormSchema = z.object({
|
|
@@ -7669,6 +7648,14 @@ const bookingServiceSchema = z.object({
|
|
|
7669
7648
|
title: z.string(),
|
|
7670
7649
|
description: z.string().nullable().optional().transform((value) => value ?? void 0),
|
|
7671
7650
|
durationMinutes: z.number().optional(),
|
|
7651
|
+
requiresApproval: z.boolean().optional(),
|
|
7652
|
+
onlinePaymentMode: z.enum(["session_or_package", "package_only"]).optional(),
|
|
7653
|
+
onlinePaymentChoices: z.object({
|
|
7654
|
+
perSession: z.boolean(),
|
|
7655
|
+
heldPackage: z.boolean(),
|
|
7656
|
+
buyPackage: z.boolean(),
|
|
7657
|
+
anyAvailable: z.boolean()
|
|
7658
|
+
}).optional(),
|
|
7672
7659
|
pricing: z.custom().optional(),
|
|
7673
7660
|
priceAmount: z.number().nullable().optional(),
|
|
7674
7661
|
priceCurrency: z.string().nullable().optional(),
|
|
@@ -8124,48 +8111,6 @@ function resolveEventDetailsPresentation(input) {
|
|
|
8124
8111
|
};
|
|
8125
8112
|
}
|
|
8126
8113
|
//#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
8114
|
//#region ../blocks/src/system/runtime/nodes/event-details/WholeSeriesPricingDisplay.tsx
|
|
8170
8115
|
/** A course lists every active option, whether or not its sale window is open. */
|
|
8171
8116
|
function wholeSeriesPriceOptions(pricing) {
|
|
@@ -8306,10 +8251,13 @@ function EventFacts({ selection, selected, venue, teamMembers, pricing, showCapa
|
|
|
8306
8251
|
children: [/* @__PURE__ */ jsx("div", {
|
|
8307
8252
|
className: "rb-label rb-mb-2",
|
|
8308
8253
|
children: "Places"
|
|
8309
|
-
}), /* @__PURE__ */ jsx("p", { children: formatTotalCapacity(selected.capacity) })]
|
|
8254
|
+
}), /* @__PURE__ */ jsx("p", { children: formatEventRemainingPlaces(selected) ?? formatTotalCapacity(selected.capacity) })]
|
|
8310
8255
|
}) : null,
|
|
8311
8256
|
pricing,
|
|
8312
|
-
selection.kind === "wholeSeries" ? /* @__PURE__ */ jsx(BookingState, {
|
|
8257
|
+
selection.kind === "wholeSeries" ? /* @__PURE__ */ jsx(BookingState, {
|
|
8258
|
+
phase: selection.bookingPhase,
|
|
8259
|
+
event: selected
|
|
8260
|
+
}) : null
|
|
8313
8261
|
]
|
|
8314
8262
|
});
|
|
8315
8263
|
}
|
|
@@ -8378,7 +8326,7 @@ function runLifecycleLabel(lifecycle) {
|
|
|
8378
8326
|
* the booking panel beside it says cancelled is the contradiction a visitor
|
|
8379
8327
|
* actually notices.
|
|
8380
8328
|
*/
|
|
8381
|
-
function BookingState({ phase }) {
|
|
8329
|
+
function BookingState({ phase, event }) {
|
|
8382
8330
|
return /* @__PURE__ */ jsxs("div", {
|
|
8383
8331
|
className: "rb-mt-6",
|
|
8384
8332
|
children: [
|
|
@@ -8386,7 +8334,7 @@ function BookingState({ phase }) {
|
|
|
8386
8334
|
className: "rb-label rb-mb-2",
|
|
8387
8335
|
children: "Booking"
|
|
8388
8336
|
}),
|
|
8389
|
-
/* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: phase.kind === "
|
|
8337
|
+
/* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: phase.kind === "closed" ? "Closed" : isEventFull(event) ? formatEventRemainingPlaces(event) : "Open" }) }),
|
|
8390
8338
|
phase.kind === "closed" ? /* @__PURE__ */ jsx("p", {
|
|
8391
8339
|
className: "rb-caption",
|
|
8392
8340
|
children: bookingClosedReason(phase.reason)
|
|
@@ -9000,39 +8948,6 @@ function buildLoadedOfferingsPreviewListing(input) {
|
|
|
9000
8948
|
});
|
|
9001
8949
|
}
|
|
9002
8950
|
//#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
8951
|
//#region ../blocks/src/system/runtime/nodes/offerings-preview-catalogue.tsx
|
|
9037
8952
|
function OfferingsCatalogue(props) {
|
|
9038
8953
|
const input = resolveOfferingsRenderInput(props);
|
|
@@ -9062,6 +8977,7 @@ function OfferingsCatalogue(props) {
|
|
|
9062
8977
|
now,
|
|
9063
8978
|
shape
|
|
9064
8979
|
});
|
|
8980
|
+
case "by-course":
|
|
9065
8981
|
case "by-type": return props.lookSlots ? /* @__PURE__ */ jsxs("div", {
|
|
9066
8982
|
...listLookSlot(props, "layout"),
|
|
9067
8983
|
children: [/* @__PURE__ */ jsx("header", {
|
|
@@ -9157,6 +9073,7 @@ function renderCatalogueItems({ props, items, shape, groupTitle }) {
|
|
|
9157
9073
|
style: { gridTemplateColumns: "repeat(auto-fill, minmax(min(100%, 18rem), 1fr))" },
|
|
9158
9074
|
children: events.map((event) => /* @__PURE__ */ jsx(EventCard, {
|
|
9159
9075
|
event,
|
|
9076
|
+
now: props.now,
|
|
9160
9077
|
...catalogueEventCardProps(event, props.buttonVariant ?? "primary")
|
|
9161
9078
|
}, event.seriesId))
|
|
9162
9079
|
});
|
|
@@ -9167,14 +9084,15 @@ function catalogueDates(events, now, shape, pathname) {
|
|
|
9167
9084
|
}
|
|
9168
9085
|
function catalogueCardContent(item, now, dates, typeLabel) {
|
|
9169
9086
|
const event = item.kind === "event" ? item.event : item.run.representative;
|
|
9170
|
-
|
|
9171
|
-
|
|
9172
|
-
|
|
9173
|
-
|
|
9174
|
-
|
|
9175
|
-
|
|
9176
|
-
|
|
9177
|
-
|
|
9087
|
+
const content = eventCardListContent(event, {
|
|
9088
|
+
kind: "catalogue",
|
|
9089
|
+
now,
|
|
9090
|
+
nextStartMs: item.nextStartMs,
|
|
9091
|
+
typeLabel
|
|
9092
|
+
}, catalogueEventCardProps(event).buttonText);
|
|
9093
|
+
return event.bookingScope === "whole_series" ? content : {
|
|
9094
|
+
...content,
|
|
9095
|
+
dates: dates.get(event.seriesId)
|
|
9178
9096
|
};
|
|
9179
9097
|
}
|
|
9180
9098
|
function renderCatalogueEmpty({ props, failed }) {
|
|
@@ -9283,17 +9201,19 @@ const OFFERINGS_PREVIEW_GRID_STYLE = {
|
|
|
9283
9201
|
//#endregion
|
|
9284
9202
|
//#region ../blocks/src/system/runtime/nodes/offerings-preview.tsx
|
|
9285
9203
|
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)] });
|
|
9204
|
+
/** An authored label is kept as typed; an absent one takes the default for the presentation. */
|
|
9205
|
+
function withButtonText(props) {
|
|
9206
|
+
return {
|
|
9207
|
+
...props,
|
|
9208
|
+
buttonText: props.buttonText ?? (props.displayMode !== "catalogue" && props.cardArrangement === "course-groups" ? "View course" : "Book")
|
|
9209
|
+
};
|
|
9295
9210
|
}
|
|
9296
|
-
function
|
|
9211
|
+
function OfferingsPreviewNode(authored) {
|
|
9212
|
+
const props = withButtonText(authored);
|
|
9213
|
+
if (props.displayMode === "catalogue") return OfferingsCatalogue(isPreviewOnlyArrangement(props.cardArrangement) ? {
|
|
9214
|
+
...props,
|
|
9215
|
+
cardArrangement: "cards"
|
|
9216
|
+
} : props);
|
|
9297
9217
|
const input = resolveOfferingsRenderInput(props);
|
|
9298
9218
|
const now = input.now;
|
|
9299
9219
|
const listing = input.kind === "prepared" ? input.listing : buildLoadedOfferingsPreviewListing({
|
|
@@ -9302,6 +9222,16 @@ function renderOfferingsPreview(props) {
|
|
|
9302
9222
|
listingMode: offeringsListingFor(props.cardArrangement ?? "legacy"),
|
|
9303
9223
|
now
|
|
9304
9224
|
});
|
|
9225
|
+
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;
|
|
9226
|
+
return props.lookSlots ? /* @__PURE__ */ jsxs("div", {
|
|
9227
|
+
...listLookSlot(props, "layout"),
|
|
9228
|
+
children: [/* @__PURE__ */ jsx("header", {
|
|
9229
|
+
...listLookSlot(props, "head"),
|
|
9230
|
+
children: props.children
|
|
9231
|
+
}), /* @__PURE__ */ jsx("div", { children: renderOfferingsPreview(props, listing, now) })]
|
|
9232
|
+
}) : /* @__PURE__ */ jsxs(Fragment, { children: [props.children, renderOfferingsPreview(props, listing, now)] });
|
|
9233
|
+
}
|
|
9234
|
+
function renderOfferingsPreview(props, listing, now) {
|
|
9305
9235
|
switch (listing.kind) {
|
|
9306
9236
|
case "no-groups": return props.previewStage === "preview" ? /* @__PURE__ */ jsx(EmptyState, {
|
|
9307
9237
|
className: "offerings-preview-empty",
|
|
@@ -9323,6 +9253,7 @@ function renderOfferingsPreview(props) {
|
|
|
9323
9253
|
}, dates, group.singularLabel))
|
|
9324
9254
|
});
|
|
9325
9255
|
}
|
|
9256
|
+
case "by-course":
|
|
9326
9257
|
case "by-type": return props.lookSlots ? renderOfferingCardGroups({
|
|
9327
9258
|
...props,
|
|
9328
9259
|
states: listing.groups,
|
|
@@ -9513,6 +9444,7 @@ function renderSingleOfferingCard(item, options) {
|
|
|
9513
9444
|
switch (item.kind) {
|
|
9514
9445
|
case "event": return /* @__PURE__ */ jsx(EventCard, {
|
|
9515
9446
|
event: item.event,
|
|
9447
|
+
now: options.now,
|
|
9516
9448
|
buttonVariant: options.buttonVariant,
|
|
9517
9449
|
buttonText: options.buttonText,
|
|
9518
9450
|
showMap: false,
|
|
@@ -9766,8 +9698,10 @@ function RunWithoutLiveDates({ group, path }) {
|
|
|
9766
9698
|
function renderOfferingCardGroups(props) {
|
|
9767
9699
|
const datesBySeries = offeringDatesBySeries(props.quickDateEvents ?? [], props.now);
|
|
9768
9700
|
const frames = listGroupFrames(props);
|
|
9701
|
+
const nextCards = props.cardArrangement === "next-cards";
|
|
9769
9702
|
return /* @__PURE__ */ jsx("div", {
|
|
9770
|
-
className: "rb-flex rb-flex-col rb-gap-10",
|
|
9703
|
+
className: nextCards ? "rb-grid rb-gap-6" : "rb-flex rb-flex-col rb-gap-10",
|
|
9704
|
+
style: nextCards ? { gridTemplateColumns: "repeat(auto-fit, minmax(min(100%, 16rem), 1fr))" } : void 0,
|
|
9771
9705
|
...frames.list,
|
|
9772
9706
|
children: props.states.map((state) => {
|
|
9773
9707
|
const cta = resolveOfferingsPreviewGroupCta({
|
|
@@ -9781,6 +9715,7 @@ function renderOfferingCardGroups(props) {
|
|
|
9781
9715
|
Heading: "h3",
|
|
9782
9716
|
sectionProps: {
|
|
9783
9717
|
...frames.panel,
|
|
9718
|
+
...nextCards ? { className: "rb-flex rb-flex-col rb-gap-4 rb-rounded-lg rb-border rb-border-border rb-p-5" } : {},
|
|
9784
9719
|
"data-offering-source": state.group.sourceKey
|
|
9785
9720
|
},
|
|
9786
9721
|
children: [offeringGroupCards(state, props, datesBySeries), cta ? /* @__PURE__ */ jsx("a", {
|
|
@@ -9805,27 +9740,24 @@ function previewCardContent(item, props, datesBySeries, typeLabel) {
|
|
|
9805
9740
|
...content,
|
|
9806
9741
|
dates: datesBySeries.get(event.seriesId) ?? offeringDatesBySeries([event], props.now).get(event.seriesId)
|
|
9807
9742
|
};
|
|
9808
|
-
const runContent = {
|
|
9809
|
-
...content,
|
|
9810
|
-
dates: offeringRunDates(event, props.now),
|
|
9811
|
-
id: item.run.eventSeriesId
|
|
9812
|
-
};
|
|
9813
|
-
return event.destination.kind === "external" ? runContent : nativeRunCardContent(item, runContent, props);
|
|
9814
|
-
}
|
|
9815
|
-
function nativeRunCardContent(item, content, props) {
|
|
9816
|
-
const open = resolveWholeSeriesBookingPhase(item.run.run, props.now).kind === "open";
|
|
9817
|
-
const path = content.titleLink?.href ?? null;
|
|
9818
9743
|
return {
|
|
9819
9744
|
...content,
|
|
9820
|
-
|
|
9821
|
-
label: open ? path ? props.buttonText || "Book" : "Details coming soon" : "Registration closed",
|
|
9822
|
-
...open && path ? { href: path } : {}
|
|
9823
|
-
}
|
|
9745
|
+
id: item.run.eventSeriesId
|
|
9824
9746
|
};
|
|
9825
9747
|
}
|
|
9826
9748
|
function offeringGroupCards(state, props, dates) {
|
|
9827
9749
|
switch (state.kind) {
|
|
9828
|
-
case "items": return
|
|
9750
|
+
case "items": return props.cardArrangement === "course-groups" ? /* @__PURE__ */ jsx(OfferingCourseCards, {
|
|
9751
|
+
Carousel: props.Carousel,
|
|
9752
|
+
items: state.items,
|
|
9753
|
+
presentation: props,
|
|
9754
|
+
now: props.now,
|
|
9755
|
+
buttonText: props.buttonText
|
|
9756
|
+
}) : props.cardArrangement === "next-cards" ? renderNextOfferingCard(state.items[0], {
|
|
9757
|
+
now: props.now,
|
|
9758
|
+
buttonVariant: props.buttonVariant ?? "primary",
|
|
9759
|
+
buttonText: props.buttonText ?? "Book"
|
|
9760
|
+
}, props) : CardListItems({
|
|
9829
9761
|
Carousel: props.Carousel,
|
|
9830
9762
|
Title: "h4",
|
|
9831
9763
|
presentation: props,
|
|
@@ -9836,6 +9768,74 @@ function offeringGroupCards(state, props, dates) {
|
|
|
9836
9768
|
default: return assertNever$1(state);
|
|
9837
9769
|
}
|
|
9838
9770
|
}
|
|
9771
|
+
/** The existing booking projection owns prices, availability and sold-out/waitlist actions. */
|
|
9772
|
+
function renderNextOfferingCard(item, options, presentation = {}) {
|
|
9773
|
+
const { content, inProgress } = nextOfferingCardContent(item, options);
|
|
9774
|
+
const cardPresentation = {
|
|
9775
|
+
...presentation,
|
|
9776
|
+
buttonVariant: options.buttonVariant
|
|
9777
|
+
};
|
|
9778
|
+
return /* @__PURE__ */ jsxs("article", {
|
|
9779
|
+
...listLookSlot(cardPresentation, "item"),
|
|
9780
|
+
className: "offerings-preview-next-card rb-flex rb-flex-col rb-gap-3",
|
|
9781
|
+
children: [presentation.showPhotos !== false && content.media ? /* @__PURE__ */ jsx("div", {
|
|
9782
|
+
...listLookSlot(cardPresentation, "item-media"),
|
|
9783
|
+
style: {
|
|
9784
|
+
width: "min(100%, 14rem)",
|
|
9785
|
+
aspectRatio: "1",
|
|
9786
|
+
borderRadius: "50%",
|
|
9787
|
+
overflow: "hidden",
|
|
9788
|
+
marginInline: "auto"
|
|
9789
|
+
},
|
|
9790
|
+
children: /* @__PURE__ */ jsx(MediaNodeServer, {
|
|
9791
|
+
...listLookSlot(cardPresentation, "photo"),
|
|
9792
|
+
value: content.media,
|
|
9793
|
+
size: ImagePresets.card,
|
|
9794
|
+
style: {
|
|
9795
|
+
width: "100%",
|
|
9796
|
+
height: "100%",
|
|
9797
|
+
objectFit: "cover"
|
|
9798
|
+
}
|
|
9799
|
+
})
|
|
9800
|
+
}) : null, /* @__PURE__ */ jsxs("div", {
|
|
9801
|
+
...listLookSlot(cardPresentation, "item-body"),
|
|
9802
|
+
className: "rb-flex rb-flex-col rb-gap-3",
|
|
9803
|
+
children: [inProgress ? /* @__PURE__ */ jsx("p", { children: "In progress" }) : null, [
|
|
9804
|
+
"title",
|
|
9805
|
+
"schedule",
|
|
9806
|
+
"facts",
|
|
9807
|
+
"action"
|
|
9808
|
+
].map((part) => /* @__PURE__ */ jsx(React.Fragment, { children: /* @__PURE__ */ jsx(CardListContentPart, {
|
|
9809
|
+
part,
|
|
9810
|
+
item: content,
|
|
9811
|
+
presentation: cardPresentation,
|
|
9812
|
+
Title: "h4"
|
|
9813
|
+
}) }, part))]
|
|
9814
|
+
})]
|
|
9815
|
+
});
|
|
9816
|
+
}
|
|
9817
|
+
function nextOfferingCardContent(item, options) {
|
|
9818
|
+
const event = item.kind === "event" ? item.event : item.run.representative;
|
|
9819
|
+
const projected = eventCardListContent(event, {
|
|
9820
|
+
kind: "offering",
|
|
9821
|
+
now: options.now,
|
|
9822
|
+
nextStartMs: null
|
|
9823
|
+
}, options.buttonText);
|
|
9824
|
+
const inProgress = offeringRunLifecycle(event, options.now) === "in_progress";
|
|
9825
|
+
const course = item.kind === "run" ? item.run.run.listing?.course : void 0;
|
|
9826
|
+
return {
|
|
9827
|
+
content: course ? {
|
|
9828
|
+
...projected,
|
|
9829
|
+
title: course.title,
|
|
9830
|
+
eyebrowFacts: course.facts,
|
|
9831
|
+
quickFacts: void 0
|
|
9832
|
+
} : projected,
|
|
9833
|
+
inProgress
|
|
9834
|
+
};
|
|
9835
|
+
}
|
|
9836
|
+
function isPreviewOnlyArrangement(arrangement) {
|
|
9837
|
+
return arrangement === "next-cards" || arrangement === "course-groups";
|
|
9838
|
+
}
|
|
9839
9839
|
//#endregion
|
|
9840
9840
|
//#region ../blocks/src/system/runtime/nodes/weekly-slot-availability.view.tsx
|
|
9841
9841
|
function pluralizeWeeks(count) {
|
|
@@ -11427,10 +11427,10 @@ function renderCombinedSsr(display, prefetchedEvents) {
|
|
|
11427
11427
|
function renderListSsr(display, hydration) {
|
|
11428
11428
|
const { initialToday, timeZone } = hydration.calendarContext;
|
|
11429
11429
|
const week = display.listBy === "week" ? buildEventListWeek(initialToday, display.startOfWeek, timeZone) : null;
|
|
11430
|
-
const
|
|
11431
|
-
|
|
11432
|
-
|
|
11433
|
-
week: eventListWeekDays(week, initialToday, timeZone)
|
|
11430
|
+
const listDisplay = {
|
|
11431
|
+
...buildEventCalendarListingDisplay(display, hydration.prefetchedEvents),
|
|
11432
|
+
weekGrouping: eventWeekGroupingContext(initialToday, timeZone, display.startOfWeek),
|
|
11433
|
+
...week === null ? {} : { week: eventListWeekDays(week, initialToday, timeZone) }
|
|
11434
11434
|
};
|
|
11435
11435
|
return /* @__PURE__ */ jsxs(Fragment, { children: [week !== null ? /* @__PURE__ */ jsx(EventListWeekNavigation, {
|
|
11436
11436
|
...display,
|
|
@@ -13198,6 +13198,10 @@ const META_PATH_TO_STORE_KEY = {
|
|
|
13198
13198
|
function mapMetaPathToStoreKey(path) {
|
|
13199
13199
|
return META_PATH_TO_STORE_KEY[path] ?? path;
|
|
13200
13200
|
}
|
|
13201
|
+
/** Named bindings follow lexical scope: the nearest declaration wins. */
|
|
13202
|
+
function findNamedScope(context, name) {
|
|
13203
|
+
return [...context.scopes].reverse().find((entry) => entry.name === name);
|
|
13204
|
+
}
|
|
13201
13205
|
const PATH_SEPARATOR_REGEX = /\./g;
|
|
13202
13206
|
const BRACKET_ACCESS_REGEX = /\[([^\]]+)\]/g;
|
|
13203
13207
|
/**
|
|
@@ -13281,7 +13285,7 @@ function derivePreviewLinkedEntryFieldBinding(node, parsedBinding, context) {
|
|
|
13281
13285
|
const [scopeName, ...displaySegments] = splitPath(parsedBinding.from);
|
|
13282
13286
|
if (typeof scopeName !== "string") return null;
|
|
13283
13287
|
if (displaySegments.length === 0) return null;
|
|
13284
|
-
const scoped =
|
|
13288
|
+
const scoped = findNamedScope(context, scopeName);
|
|
13285
13289
|
if (!scoped) return null;
|
|
13286
13290
|
const displayPath = segmentsToPath(displaySegments);
|
|
13287
13291
|
if (!displayPath) return null;
|
|
@@ -13339,7 +13343,7 @@ function contentFieldSegments(fromPath, context) {
|
|
|
13339
13343
|
const [first, ...rest] = splitPath(fromPath);
|
|
13340
13344
|
if (typeof first !== "string" || first === "$root") return void 0;
|
|
13341
13345
|
if (first === "content") return rest;
|
|
13342
|
-
const named =
|
|
13346
|
+
const named = findNamedScope(context, first);
|
|
13343
13347
|
if (named) return scopedContentSegments(named, rest);
|
|
13344
13348
|
const innermost = [...context.scopes].reverse().find((entry) => isPlainObject(entry.value) || Array.isArray(entry.value));
|
|
13345
13349
|
if (!innermost || first in context.viewModel) return void 0;
|
|
@@ -13484,7 +13488,7 @@ function applyTransformsAndFallback(value, binding, context) {
|
|
|
13484
13488
|
function resolveTransformData(context, bindingPath) {
|
|
13485
13489
|
const [first] = splitPath(bindingPath);
|
|
13486
13490
|
if (typeof first === "string" && first !== "$root") {
|
|
13487
|
-
const namedScope = context
|
|
13491
|
+
const namedScope = findNamedScope(context, first);
|
|
13488
13492
|
if (namedScope && isPlainObject(namedScope.value)) return namedScope.value;
|
|
13489
13493
|
}
|
|
13490
13494
|
for (let i = context.scopes.length - 1; i >= 0; i -= 1) {
|
|
@@ -13652,7 +13656,7 @@ function resolveReadBindingValue(binding, context) {
|
|
|
13652
13656
|
source = currentScope.value;
|
|
13653
13657
|
const value = readFromSource(source, segments);
|
|
13654
13658
|
if (value !== void 0) return applyTransformsAndFallback(value, binding, context);
|
|
13655
|
-
const namedScope = context
|
|
13659
|
+
const namedScope = findNamedScope(context, first);
|
|
13656
13660
|
if (namedScope) {
|
|
13657
13661
|
source = namedScope.value;
|
|
13658
13662
|
const namedValue = readFromSource(source, rest);
|
|
@@ -13660,7 +13664,7 @@ function resolveReadBindingValue(binding, context) {
|
|
|
13660
13664
|
}
|
|
13661
13665
|
return applyTransformsAndFallback(readFromSource(context.viewModel, segments), binding, context);
|
|
13662
13666
|
}
|
|
13663
|
-
const namedScope = context
|
|
13667
|
+
const namedScope = findNamedScope(context, first);
|
|
13664
13668
|
if (namedScope) {
|
|
13665
13669
|
source = namedScope.value;
|
|
13666
13670
|
return applyTransformsAndFallback(readFromSource(source, rest), binding, context);
|
|
@@ -13749,9 +13753,11 @@ function resolveRepeater(node, context) {
|
|
|
13749
13753
|
...context,
|
|
13750
13754
|
scopes
|
|
13751
13755
|
};
|
|
13756
|
+
const itemKey = node.key === void 0 ? void 0 : `${node.key}-${idx}`;
|
|
13752
13757
|
const resolved = resolveNode({
|
|
13753
13758
|
...node,
|
|
13754
|
-
$repeat: void 0
|
|
13759
|
+
$repeat: void 0,
|
|
13760
|
+
key: itemKey
|
|
13755
13761
|
}, repeatedContext, idx);
|
|
13756
13762
|
if (resolved === null) return null;
|
|
13757
13763
|
const target = buildLinkedContentEditTarget({
|
|
@@ -13764,7 +13770,7 @@ function resolveRepeater(node, context) {
|
|
|
13764
13770
|
const frame = context.registry.linkedEntryEditFrame;
|
|
13765
13771
|
if (!frame) return resolved;
|
|
13766
13772
|
return React.createElement(frame, {
|
|
13767
|
-
key: idx,
|
|
13773
|
+
key: itemKey ?? idx,
|
|
13768
13774
|
target,
|
|
13769
13775
|
blockId: context.blockId,
|
|
13770
13776
|
blockKind: context.blockKind
|
|
@@ -14404,37 +14410,41 @@ function makeDefaultBlockComponent(args) {
|
|
|
14404
14410
|
}
|
|
14405
14411
|
function createDefaultBlockComponent(manifest) {
|
|
14406
14412
|
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;
|
|
14413
|
+
return resolveDefaultBlockTree(manifest, props);
|
|
14436
14414
|
};
|
|
14437
14415
|
}
|
|
14416
|
+
/** Resolve declarative markup once so page-wide semantics can inspect the same tree that renders. */
|
|
14417
|
+
function resolveDefaultBlockTree(manifest, props) {
|
|
14418
|
+
const perf = beginBlockRenderMeasurement();
|
|
14419
|
+
const prepared = prepareDefaultBlockRender(manifest, props);
|
|
14420
|
+
const result = resolveTree(prepared.layout, {
|
|
14421
|
+
registry: prepared.registry,
|
|
14422
|
+
viewModel: prepared.viewModel,
|
|
14423
|
+
dateContext: prepared.dateContext,
|
|
14424
|
+
now: prepared.now,
|
|
14425
|
+
transforms: props.transforms,
|
|
14426
|
+
theme: prepared.themeForTransforms,
|
|
14427
|
+
proseHoverCandidate: prepared.proseHoverCandidate,
|
|
14428
|
+
pathBase: props.pathBase,
|
|
14429
|
+
blockId: props.blockId,
|
|
14430
|
+
newsletterBlockSubmission: props.newsletterBlockSubmission,
|
|
14431
|
+
blockKind: props.blockKind,
|
|
14432
|
+
blockContent: prepared.mergedContent,
|
|
14433
|
+
blockBindings: props.blockBindings,
|
|
14434
|
+
editableRouteMetadataFieldIds: props.editableRouteMetadataFieldIds,
|
|
14435
|
+
fragmentRegistry: props.fragmentRegistry,
|
|
14436
|
+
fieldConstraints: prepared.fieldConstraints,
|
|
14437
|
+
imageResolveContext: props.imageResolveContext,
|
|
14438
|
+
previewAuthoring: props.previewAuthoring
|
|
14439
|
+
});
|
|
14440
|
+
reportSlowBlockRender(perf, {
|
|
14441
|
+
content: props.content,
|
|
14442
|
+
blockId: props.blockId,
|
|
14443
|
+
blockKind: props.blockKind ?? manifest.name,
|
|
14444
|
+
manifestName: manifest.name
|
|
14445
|
+
});
|
|
14446
|
+
return result;
|
|
14447
|
+
}
|
|
14438
14448
|
function prepareBlockRender(input) {
|
|
14439
14449
|
const mergedContent = mergeContentWithBlockStyleOverrides(input.content, input.themeConfig, input.blockKind);
|
|
14440
14450
|
return {
|
|
@@ -14565,6 +14575,88 @@ function runtimeDateContext(viewModel) {
|
|
|
14565
14575
|
return resolveDateRuntimeContext(typeof root.bookingTimeZone === "string" ? root.bookingTimeZone : void 0);
|
|
14566
14576
|
}
|
|
14567
14577
|
//#endregion
|
|
14578
|
+
//#region ../blocks/src/pageHeadingSemantics.tsx
|
|
14579
|
+
/** Inspect resolved declarative markup, after conditions, bindings and repeaters. Never invoke arbitrary React components. */
|
|
14580
|
+
function elements(tree) {
|
|
14581
|
+
if (Array.isArray(tree)) return tree.flatMap(elements);
|
|
14582
|
+
return React.isValidElement(tree) ? [tree, ...elements(tree.props.children)] : [];
|
|
14583
|
+
}
|
|
14584
|
+
function hasText(value) {
|
|
14585
|
+
if (typeof value === "string") return value.trim().length > 0;
|
|
14586
|
+
const inline = parseInlineTextFromUnknown(value);
|
|
14587
|
+
return inline.ok && inlineTextToPlainText(inline.value).trim().length > 0;
|
|
14588
|
+
}
|
|
14589
|
+
function richTextHasH1(value) {
|
|
14590
|
+
if (!value || typeof value !== "object") return false;
|
|
14591
|
+
const level = Reflect.get(value, "attrs");
|
|
14592
|
+
if (Reflect.get(value, "type") === "heading" && level && typeof level === "object" && Reflect.get(level, "level") === 1) return true;
|
|
14593
|
+
const content = Reflect.get(value, "content");
|
|
14594
|
+
return Array.isArray(content) && content.some(richTextHasH1);
|
|
14595
|
+
}
|
|
14596
|
+
function ownsH1(node, eventDetailsComponent) {
|
|
14597
|
+
if ((node.type === "h1" || node.props.as === "h1") && (hasText(node.props.value) || React.Children.count(node.props.children) > 0)) return true;
|
|
14598
|
+
if (richTextHasH1(node.props.value)) return true;
|
|
14599
|
+
if (node.type !== eventDetailsComponent || !React.isValidElement(node)) return false;
|
|
14600
|
+
const presentation = resolveEventDetailsPresentation({
|
|
14601
|
+
...node.props,
|
|
14602
|
+
subject: normalizeEventRegistrationPageSurfaceSubject(node.props.subject)
|
|
14603
|
+
});
|
|
14604
|
+
return presentation.arrangement === "event-header" && (presentation.selection.kind !== "empty" || Boolean(presentation.entryTitle));
|
|
14605
|
+
}
|
|
14606
|
+
function isSectionHeading(node) {
|
|
14607
|
+
if (node.props.as !== "h2" || !hasText(node.props.value)) return false;
|
|
14608
|
+
const slot = node.props["data-slot"];
|
|
14609
|
+
const path = node.props.path;
|
|
14610
|
+
return slot === "heading" || slot === "headline" || typeof path === "string" && /^blocks\.[^.]+\.[^.]+$/.test(path);
|
|
14611
|
+
}
|
|
14612
|
+
function promote(tree, heading) {
|
|
14613
|
+
if (Array.isArray(tree)) {
|
|
14614
|
+
const items = tree;
|
|
14615
|
+
const children = items.map((child) => promote(child, heading));
|
|
14616
|
+
return children.every((child, index) => child === items[index]) ? items : children;
|
|
14617
|
+
}
|
|
14618
|
+
if (!React.isValidElement(tree)) return tree;
|
|
14619
|
+
if (tree === heading) return React.cloneElement(tree, {
|
|
14620
|
+
as: "h1",
|
|
14621
|
+
className: [tree.props.className, "rb-heading-level-2"].filter(Boolean).join(" ")
|
|
14622
|
+
});
|
|
14623
|
+
const children = promote(tree.props.children, heading);
|
|
14624
|
+
return children === tree.props.children ? tree : React.cloneElement(tree, {}, children);
|
|
14625
|
+
}
|
|
14626
|
+
/** One page-wide choice; callers receive the final trees and do not recompute heading rules. */
|
|
14627
|
+
function applyPageHeadingSemantics(trees, eventDetailsComponent) {
|
|
14628
|
+
const nodes = [...trees.values()].flatMap(elements);
|
|
14629
|
+
if (nodes.some((node) => ownsH1(node, eventDetailsComponent))) return {
|
|
14630
|
+
trees,
|
|
14631
|
+
needsPageTitle: false
|
|
14632
|
+
};
|
|
14633
|
+
const heading = nodes.find(isSectionHeading);
|
|
14634
|
+
return heading ? {
|
|
14635
|
+
trees: new Map([...trees].map(([id, tree]) => [id, promote(tree, heading)])),
|
|
14636
|
+
needsPageTitle: false
|
|
14637
|
+
} : {
|
|
14638
|
+
trees,
|
|
14639
|
+
needsPageTitle: true
|
|
14640
|
+
};
|
|
14641
|
+
}
|
|
14642
|
+
/** Inline hiding also works in SDK sites that do not load utility CSS. */
|
|
14643
|
+
function PageTitleFallback({ name }) {
|
|
14644
|
+
return /* @__PURE__ */ jsx("h1", {
|
|
14645
|
+
style: {
|
|
14646
|
+
position: "absolute",
|
|
14647
|
+
width: 1,
|
|
14648
|
+
height: 1,
|
|
14649
|
+
padding: 0,
|
|
14650
|
+
margin: -1,
|
|
14651
|
+
overflow: "hidden",
|
|
14652
|
+
clipPath: "inset(50%)",
|
|
14653
|
+
whiteSpace: "nowrap",
|
|
14654
|
+
border: 0
|
|
14655
|
+
},
|
|
14656
|
+
children: name
|
|
14657
|
+
});
|
|
14658
|
+
}
|
|
14659
|
+
//#endregion
|
|
14568
14660
|
//#region ../blocks/src/pageRenderAudience.tsx
|
|
14569
14661
|
/**
|
|
14570
14662
|
* The single policy for what a non-renderable block looks like.
|
|
@@ -14902,6 +14994,7 @@ function offeringsPreviewPhotoCount(listing) {
|
|
|
14902
14994
|
case "no-groups":
|
|
14903
14995
|
case "nothing-to-show": return 0;
|
|
14904
14996
|
case "by-date": return listing.items.filter(({ item }) => hasPhoto(item)).length;
|
|
14997
|
+
case "by-course": return listing.groups.reduce((count, load) => count + courseGroupPhotoCount(load), 0);
|
|
14905
14998
|
case "by-type": return listing.groups.reduce((count, load) => count + groupPhotoCount(load), 0);
|
|
14906
14999
|
default: return assertNever$1(listing);
|
|
14907
15000
|
}
|
|
@@ -14921,6 +15014,113 @@ function hasPhoto(item) {
|
|
|
14921
15014
|
default: return assertNever$1(item);
|
|
14922
15015
|
}
|
|
14923
15016
|
}
|
|
15017
|
+
function courseGroupPhotoCount(load) {
|
|
15018
|
+
if (load.kind !== "items") return 0;
|
|
15019
|
+
const courses = groupOfferingRunsByCourse(load.items);
|
|
15020
|
+
const ungrouped = load.items.filter((item) => item.kind !== "run" || !item.run.run.listing);
|
|
15021
|
+
return courses.filter(({ course }) => course.presentation?.image).length + ungrouped.filter(hasPhoto).length;
|
|
15022
|
+
}
|
|
15023
|
+
//#endregion
|
|
15024
|
+
//#region ../blocks/src/blockContentPreparation.ts
|
|
15025
|
+
function prepareBlockContent(kind, content, data, context, audience) {
|
|
15026
|
+
return {
|
|
15027
|
+
...arrangementResolvedContent(kind, content, data, context, audience),
|
|
15028
|
+
data: arrangementResolvedData(kind, content, data)
|
|
15029
|
+
};
|
|
15030
|
+
}
|
|
15031
|
+
function arrangementResolvedData(kind, content, data) {
|
|
15032
|
+
if (kind !== "block.testimonials" || content._effectiveLook === void 0 || !Array.isArray(data?.entries)) return data;
|
|
15033
|
+
return {
|
|
15034
|
+
...data,
|
|
15035
|
+
entries: content._quoteCount === null ? data.entries : data.entries.slice(0, Number(content._quoteCount))
|
|
15036
|
+
};
|
|
15037
|
+
}
|
|
15038
|
+
function arrangementResolvedContent(kind, content, data, context, audience) {
|
|
15039
|
+
if (!data) return {
|
|
15040
|
+
content,
|
|
15041
|
+
publicVisibility: "shown"
|
|
15042
|
+
};
|
|
15043
|
+
if (kind === "block.offerings-preview") return offeringArrangementContent(content, data, context, audience);
|
|
15044
|
+
if (kind === "block.appointment-services" && content._effectiveLook !== void 0) return {
|
|
15045
|
+
content: appointmentArrangementContent(content, data, context),
|
|
15046
|
+
publicVisibility: "shown"
|
|
15047
|
+
};
|
|
15048
|
+
return {
|
|
15049
|
+
content,
|
|
15050
|
+
publicVisibility: "shown"
|
|
15051
|
+
};
|
|
15052
|
+
}
|
|
15053
|
+
/** One listing owns card visibility, public section omission and photo counting. */
|
|
15054
|
+
function offeringArrangementContent(content, data, context, audience) {
|
|
15055
|
+
const normalized = normalizeBlockContent(offeringsPreviewBlockDefinition, content);
|
|
15056
|
+
if (!needsOfferingListing(content, normalized)) return {
|
|
15057
|
+
content,
|
|
15058
|
+
publicVisibility: "shown"
|
|
15059
|
+
};
|
|
15060
|
+
const now = new Date(readRuntimeNow(context?.now));
|
|
15061
|
+
const listing = buildLoadedOfferingsPreviewListing({
|
|
15062
|
+
now,
|
|
15063
|
+
listingMode: offeringsListingFor(cardListArrangementForContent(content) ?? "legacy"),
|
|
15064
|
+
routeCandidates: publicRouteCandidatesSchema.safeParse(data.routeCandidates).data,
|
|
15065
|
+
...normalized,
|
|
15066
|
+
presets: context?.bookingOfferingPresets,
|
|
15067
|
+
catalogueEvents: readPublicEvents(data.catalogueEvents),
|
|
15068
|
+
wholeSeriesRunEvents: readPublicEvents(data.wholeSeriesRunEvents),
|
|
15069
|
+
...Object.fromEntries(OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS.map((definition) => [definition.dataKey, readPublicEvents(data[definition.dataKey])]))
|
|
15070
|
+
});
|
|
15071
|
+
const prepared = {
|
|
15072
|
+
...content,
|
|
15073
|
+
_offeringsPreviewInput: {
|
|
15074
|
+
kind: "prepared",
|
|
15075
|
+
listing,
|
|
15076
|
+
now
|
|
15077
|
+
},
|
|
15078
|
+
...audience === "authoring" ? { _offeringsPreviewShowHiddenPlaceholder: true } : {}
|
|
15079
|
+
};
|
|
15080
|
+
return {
|
|
15081
|
+
content: content._effectiveLook === void 0 ? prepared : withCardListPhotoCount(prepared, content.showPhotos === false ? 0 : offeringsPreviewPhotoCount(listing)),
|
|
15082
|
+
publicVisibility: listing.kind === "no-groups" && listing.reason === "empty-hidden" ? "omitted" : "shown"
|
|
15083
|
+
};
|
|
15084
|
+
}
|
|
15085
|
+
/** Older blocks opt into preparation only when public visibility needs their listing. */
|
|
15086
|
+
function needsOfferingListing(content, normalized) {
|
|
15087
|
+
return content._effectiveLook !== void 0 || normalized.groupOverrides?.some((group) => group.hideWhenEmpty === true) === true;
|
|
15088
|
+
}
|
|
15089
|
+
function readPublicEvents(value) {
|
|
15090
|
+
const parsed = publicEventsArraySchema.safeParse(value);
|
|
15091
|
+
return parsed.success ? parsed.data : void 0;
|
|
15092
|
+
}
|
|
15093
|
+
function appointmentArrangementContent(content, data, context) {
|
|
15094
|
+
const view = buildAppointmentServicesView({
|
|
15095
|
+
arrangement: cardListArrangementForContent(content),
|
|
15096
|
+
services: data.services,
|
|
15097
|
+
categoryId: content.categoryId,
|
|
15098
|
+
pathname: context?.pathname,
|
|
15099
|
+
servicePathPrefix: context?.appointmentServicePathPrefix
|
|
15100
|
+
});
|
|
15101
|
+
const rows = view.kind === "items" ? view.rows : view.kind === "groups" ? view.groups.flatMap((group) => group.rows) : [];
|
|
15102
|
+
const photoCount = content.showPhotos === false ? 0 : rows.filter((row) => row.media).length;
|
|
15103
|
+
return withCardListPhotoCount({
|
|
15104
|
+
...content,
|
|
15105
|
+
_appointmentServicesView: view
|
|
15106
|
+
}, photoCount);
|
|
15107
|
+
}
|
|
15108
|
+
function withCardListPhotoCount(content, photoCount) {
|
|
15109
|
+
const hooks = typeof content._lookHooks === "object" && content._lookHooks !== null ? content._lookHooks : {};
|
|
15110
|
+
return {
|
|
15111
|
+
...content,
|
|
15112
|
+
_lookHooks: {
|
|
15113
|
+
...hooks,
|
|
15114
|
+
"data-has-photo": String(photoCount > 0),
|
|
15115
|
+
"data-photo-count": String(photoCount)
|
|
15116
|
+
}
|
|
15117
|
+
};
|
|
15118
|
+
}
|
|
15119
|
+
function cardListArrangementForContent(content) {
|
|
15120
|
+
const hooks = content._lookHooks;
|
|
15121
|
+
if (typeof hooks !== "object" || hooks === null || !("data-arrangement" in hooks)) return void 0;
|
|
15122
|
+
return cardListPresentationSchemaShape.cardArrangement.safeParse(hooks["data-arrangement"]).data;
|
|
15123
|
+
}
|
|
14924
15124
|
//#endregion
|
|
14925
15125
|
//#region ../blocks/src/system/manifest/hydrateLinks.ts
|
|
14926
15126
|
/**
|
|
@@ -15094,7 +15294,7 @@ function preparePageRenderEntries(input, previous = null) {
|
|
|
15094
15294
|
const prepared = admission.entries.map((entry) => [entry, readPreparedPlanEntry(entry, input, previous, admission.permission)]);
|
|
15095
15295
|
const entries = prepared.map(([, value]) => value);
|
|
15096
15296
|
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");
|
|
15297
|
+
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
15298
|
const surviving = new Set(survivors);
|
|
15099
15299
|
const survivingByEntry = new Map(prepared.filter(([, candidate]) => surviving.has(candidate)));
|
|
15100
15300
|
const regions = {
|
|
@@ -15130,7 +15330,7 @@ function preparationAdmission(input) {
|
|
|
15130
15330
|
const permission = input.dataContext?.businessLocationPermission ?? decideLocationSourcePermission("business_address", input.dataContext?.businessAddressVisibility);
|
|
15131
15331
|
return {
|
|
15132
15332
|
permission,
|
|
15133
|
-
entries: input.plan.entries.filter((entry) => input.audience === "authoring" || !
|
|
15333
|
+
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
15334
|
};
|
|
15135
15335
|
}
|
|
15136
15336
|
function readPreparedPlanEntry(entry, input, previous, permission) {
|
|
@@ -15169,8 +15369,11 @@ function isPublicSourcePermitted(entry, permission) {
|
|
|
15169
15369
|
const rawSource = entry.renderableContent.locationSource;
|
|
15170
15370
|
return normalizeLocationMapSource(typeof rawSource === "string" ? rawSource : null) !== "business_address" || permission.kind === "permitted";
|
|
15171
15371
|
}
|
|
15172
|
-
function
|
|
15173
|
-
return entry.kind === "renderable" && entry.definition.readiness
|
|
15372
|
+
function entryHiddenFromVisitors(entry, facts, interaction) {
|
|
15373
|
+
return entry.kind === "renderable" && entry.definition.readiness !== void 0 && hiddenFromVisitors(entry.definition.readiness.assess(entry.renderableContent, facts, {
|
|
15374
|
+
blockId: entry.block.id ?? null,
|
|
15375
|
+
interaction
|
|
15376
|
+
}));
|
|
15174
15377
|
}
|
|
15175
15378
|
/**
|
|
15176
15379
|
* The only place joins are composed. Plan-time omissions were already
|
|
@@ -15228,26 +15431,32 @@ function buildPreparedContent(entry, content, input) {
|
|
|
15228
15431
|
const routes = input.routeMap ?? dataContext?.routes;
|
|
15229
15432
|
const hydratedContent = routes ? hydrateManifestLinks(entry.definition.manifest, content, routes, dataContext?.pagesByIdentifier, dataContext?.entriesByIdentifier) : content;
|
|
15230
15433
|
const resolved = resolveBlockData(block.id, entry.definition.dataLoaders, dataContext, routes);
|
|
15434
|
+
const { baseProps, publicVisibility } = preparedBlockProps(entry, hydratedContent, resolved, input);
|
|
15231
15435
|
return {
|
|
15232
15436
|
kind: "content",
|
|
15233
|
-
baseProps
|
|
15437
|
+
baseProps,
|
|
15438
|
+
publicVisibility,
|
|
15234
15439
|
component: entry.override ? void 0 : makeDefaultBlockComponent({ manifest: entry.definition.manifest }),
|
|
15235
15440
|
hasResolvedData: !!resolved && typeof resolved === "object" && Object.keys(resolved).length > 0,
|
|
15236
15441
|
routes
|
|
15237
15442
|
};
|
|
15238
15443
|
}
|
|
15239
15444
|
function preparedBlockProps(entry, content, data, input) {
|
|
15445
|
+
const prepared = prepareBlockContent(entry.block.kind, content, data, input.dataContext, input.audience);
|
|
15240
15446
|
return {
|
|
15241
|
-
|
|
15242
|
-
|
|
15243
|
-
|
|
15244
|
-
|
|
15245
|
-
|
|
15246
|
-
|
|
15247
|
-
|
|
15248
|
-
|
|
15249
|
-
|
|
15250
|
-
|
|
15447
|
+
baseProps: {
|
|
15448
|
+
...buildBlockOverrideProps({
|
|
15449
|
+
content: prepared.content,
|
|
15450
|
+
data: prepared.data,
|
|
15451
|
+
block: entry.block,
|
|
15452
|
+
themeResources: input.themeResources,
|
|
15453
|
+
dataContext: input.dataContext,
|
|
15454
|
+
imageResolveContext: input.imageResolveContext,
|
|
15455
|
+
routeMap: input.routeMap
|
|
15456
|
+
}),
|
|
15457
|
+
bookingTimeZone: input.dataContext?.bookingTimeZone
|
|
15458
|
+
},
|
|
15459
|
+
publicVisibility: prepared.publicVisibility
|
|
15251
15460
|
};
|
|
15252
15461
|
}
|
|
15253
15462
|
/**
|
|
@@ -15314,82 +15523,6 @@ function blockSubjectProps(dataContext) {
|
|
|
15314
15523
|
subject
|
|
15315
15524
|
};
|
|
15316
15525
|
}
|
|
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
15526
|
function preparedPlanEntry(entry, prepared) {
|
|
15394
15527
|
return {
|
|
15395
15528
|
entry: entry.kind === "renderable" && prepared.kind === "content" ? {
|
|
@@ -15519,12 +15652,32 @@ function PageRendererCore(props) {
|
|
|
15519
15652
|
dataContext,
|
|
15520
15653
|
themeResources
|
|
15521
15654
|
});
|
|
15522
|
-
if (!page || preparation.entries.length === 0) return props.wrapPage ? props.wrapPage(plan, presentEmptyPage(audience)) : presentEmptyPage(audience);
|
|
15523
15655
|
setContextResolveImageUrlContext(imageResolveContext);
|
|
15524
|
-
const
|
|
15656
|
+
const resolvedRegistry = props.registry ?? getDefaultComponentRegistry();
|
|
15657
|
+
const readSystemTrees = React$1.useMemo(createPageSystemTreeReader, []);
|
|
15658
|
+
const headingPresentation = React$1.useMemo(() => applyPageHeadingSemantics(readSystemTrees({
|
|
15659
|
+
preparation,
|
|
15660
|
+
dataContext,
|
|
15661
|
+
registry: resolvedRegistry,
|
|
15662
|
+
previewAuthoring: props.previewAuthoring,
|
|
15663
|
+
imageResolveContext
|
|
15664
|
+
}), resolvedRegistry["event-details"]), [
|
|
15665
|
+
preparation,
|
|
15666
|
+
dataContext,
|
|
15667
|
+
resolvedRegistry,
|
|
15668
|
+
props.previewAuthoring,
|
|
15669
|
+
imageResolveContext,
|
|
15670
|
+
readSystemTrees
|
|
15671
|
+
]);
|
|
15672
|
+
return wrapRenderedPage(props, plan, !page || preparation.entries.length === 0 ? renderEmptyPage(page, audience) : renderPreparedPage(props, preparation, themeResources, imageResolveContext, headingPresentation));
|
|
15673
|
+
}
|
|
15674
|
+
function renderEmptyPage(page, audience) {
|
|
15675
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [page ? /* @__PURE__ */ jsx(PageTitleFallback, { name: page.name }) : null, presentEmptyPage(audience)] });
|
|
15676
|
+
}
|
|
15677
|
+
function wrapRenderedPage(props, plan, rendered) {
|
|
15525
15678
|
return props.wrapPage ? props.wrapPage(plan, rendered) : rendered;
|
|
15526
15679
|
}
|
|
15527
|
-
function renderPreparedPage(props, preparation, themeResources, imageResolveContext) {
|
|
15680
|
+
function renderPreparedPage(props, preparation, themeResources, imageResolveContext, headingPresentation) {
|
|
15528
15681
|
const resolvedRegistry = props.registry ?? getDefaultComponentRegistry();
|
|
15529
15682
|
const joinSlots = joinSlotsByPair(preparation.joins);
|
|
15530
15683
|
const renderRegion = (entries, joins) => entries.map((entry, index) => renderGuardedPlanEntry({
|
|
@@ -15535,24 +15688,30 @@ function renderPreparedPage(props, preparation, themeResources, imageResolveCont
|
|
|
15535
15688
|
themeResources,
|
|
15536
15689
|
imageResolveContext,
|
|
15537
15690
|
resolvedRegistry,
|
|
15691
|
+
systemTrees: headingPresentation.trees,
|
|
15538
15692
|
joinSlots: joins,
|
|
15539
15693
|
wrapBlock: props.wrapBlock,
|
|
15540
15694
|
renderJoin: props.renderJoin
|
|
15541
15695
|
}));
|
|
15542
15696
|
const { main, aside } = preparation.regions;
|
|
15543
|
-
|
|
15697
|
+
const title = headingPresentation.needsPageTitle ? /* @__PURE__ */ jsx(PageTitleFallback, { name: props.page?.name ?? "" }) : null;
|
|
15698
|
+
if (aside.length === 0) return /* @__PURE__ */ jsxs("div", { children: [title, renderRegion(main, joinSlots)] });
|
|
15544
15699
|
return /* @__PURE__ */ jsxs("div", {
|
|
15545
15700
|
className: "rb-page-layout",
|
|
15546
15701
|
"data-page-layout": "main-aside",
|
|
15547
|
-
children: [
|
|
15548
|
-
|
|
15549
|
-
|
|
15550
|
-
|
|
15551
|
-
|
|
15552
|
-
|
|
15553
|
-
|
|
15554
|
-
|
|
15555
|
-
|
|
15702
|
+
children: [
|
|
15703
|
+
title,
|
|
15704
|
+
/* @__PURE__ */ jsx("div", {
|
|
15705
|
+
className: "rb-page-layout__main",
|
|
15706
|
+
"data-page-region": "main",
|
|
15707
|
+
children: renderRegion(main, joinSlots)
|
|
15708
|
+
}),
|
|
15709
|
+
/* @__PURE__ */ jsx("aside", {
|
|
15710
|
+
className: "rb-page-layout__aside rb-sticky-below-site-chrome",
|
|
15711
|
+
"data-page-region": "aside",
|
|
15712
|
+
children: renderRegion(aside, /* @__PURE__ */ new Map())
|
|
15713
|
+
})
|
|
15714
|
+
]
|
|
15556
15715
|
});
|
|
15557
15716
|
}
|
|
15558
15717
|
/**
|
|
@@ -15672,7 +15831,8 @@ function renderPlanEntry(input) {
|
|
|
15672
15831
|
entry: input.entry,
|
|
15673
15832
|
blockKey,
|
|
15674
15833
|
imageResolveContext,
|
|
15675
|
-
registry: resolvedRegistry
|
|
15834
|
+
registry: resolvedRegistry,
|
|
15835
|
+
systemTree: input.systemTrees.get(entry)
|
|
15676
15836
|
});
|
|
15677
15837
|
if (!shouldUseWrapper) {
|
|
15678
15838
|
const rendered = /* @__PURE__ */ jsx(MemoBlockSection, { ...blockSectionProps }, `${blockKey}:block`);
|
|
@@ -15719,6 +15879,7 @@ function resolvePageRendererImageResolveContext(dataContext) {
|
|
|
15719
15879
|
}
|
|
15720
15880
|
function buildBlockSectionProps(input) {
|
|
15721
15881
|
return {
|
|
15882
|
+
systemTree: input.systemTree,
|
|
15722
15883
|
themeResources: input.themeResources,
|
|
15723
15884
|
entry: input.entry,
|
|
15724
15885
|
audience: input.props.audience,
|
|
@@ -15758,14 +15919,13 @@ function blockRootLookups(dataContext, routes) {
|
|
|
15758
15919
|
function renderSystemBlockElement(input) {
|
|
15759
15920
|
const { prepared, dataContext } = input;
|
|
15760
15921
|
const block = input.entry.block;
|
|
15761
|
-
|
|
15762
|
-
if (!BlockComponent) return null;
|
|
15922
|
+
if (!prepared.component) return null;
|
|
15763
15923
|
const rootContext = { $root: {
|
|
15764
15924
|
...buildPageRendererRootRuntime(dataContext),
|
|
15765
15925
|
...blockRootLookups(dataContext, prepared.routes),
|
|
15766
15926
|
...blockSubjectProps(dataContext)
|
|
15767
15927
|
} };
|
|
15768
|
-
return
|
|
15928
|
+
return resolveDefaultBlockTree(input.entry.definition.manifest, {
|
|
15769
15929
|
...prepared.baseProps,
|
|
15770
15930
|
dateContext: rootContext.$root.dateContext,
|
|
15771
15931
|
now: rootContext.$root.now,
|
|
@@ -15781,6 +15941,39 @@ function renderSystemBlockElement(input) {
|
|
|
15781
15941
|
previewAuthoring: input.previewAuthoring
|
|
15782
15942
|
});
|
|
15783
15943
|
}
|
|
15944
|
+
/** Keep resolution failures inside the existing per-block React error boundary. */
|
|
15945
|
+
function FailedSystemBlockTree({ error }) {
|
|
15946
|
+
throw error;
|
|
15947
|
+
}
|
|
15948
|
+
function resolveSystemBlockTree(input) {
|
|
15949
|
+
try {
|
|
15950
|
+
return renderSystemBlockElement(input);
|
|
15951
|
+
} catch (error) {
|
|
15952
|
+
return /* @__PURE__ */ jsx(FailedSystemBlockTree, { error });
|
|
15953
|
+
}
|
|
15954
|
+
}
|
|
15955
|
+
/** Preserve the block memo's reuse rules while resolving page-wide heading facts. */
|
|
15956
|
+
function createPageSystemTreeReader() {
|
|
15957
|
+
const memo = {};
|
|
15958
|
+
return (input) => {
|
|
15959
|
+
const previous = memo.current;
|
|
15960
|
+
const sameSettings = previous && previous.input.registry === input.registry && previous.input.previewAuthoring === input.previewAuthoring && previous.input.imageResolveContext === input.imageResolveContext;
|
|
15961
|
+
const trees = new Map([...input.preparation.regions.main, ...input.preparation.regions.aside].flatMap((candidate) => {
|
|
15962
|
+
const { entry, prepared } = candidate;
|
|
15963
|
+
if (entry.kind !== "renderable" || entry.override || prepared.kind !== "content") return [];
|
|
15964
|
+
return [[candidate, sameSettings && previous.trees.has(candidate) && sameBlockRenderDataContext(previous.input.dataContext, input.dataContext, entry.block.id) ? previous.trees.get(candidate) : resolveSystemBlockTree({
|
|
15965
|
+
...input,
|
|
15966
|
+
entry,
|
|
15967
|
+
prepared
|
|
15968
|
+
})]];
|
|
15969
|
+
}));
|
|
15970
|
+
memo.current = {
|
|
15971
|
+
input,
|
|
15972
|
+
trees
|
|
15973
|
+
};
|
|
15974
|
+
return new Map([...trees].map(([candidate, tree]) => [candidate.entry, tree]));
|
|
15975
|
+
};
|
|
15976
|
+
}
|
|
15784
15977
|
/** Pure diagnostic choice; the audience owner controls its presentation. */
|
|
15785
15978
|
function preparationDiagnostic(prepared, blockKind) {
|
|
15786
15979
|
switch (prepared.kind) {
|
|
@@ -15846,7 +16039,7 @@ function finishBlockRender(node, block, perfStart, meta) {
|
|
|
15846
16039
|
* referential equality of all props that affect rendering. Standard React.memo
|
|
15847
16040
|
* wouldn't catch all the render triggers from the editor store.
|
|
15848
16041
|
*/
|
|
15849
|
-
const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources, entry: preparedEntry, routeMap, audience, dataContext,
|
|
16042
|
+
const MemoBlockSection = React$1.memo(function MemoBlockSection({ systemTree, themeResources, entry: preparedEntry, routeMap, audience, dataContext, wrapBlock, imageResolveContext }) {
|
|
15850
16043
|
const { entry, prepared } = preparedEntry;
|
|
15851
16044
|
const block = entry.block;
|
|
15852
16045
|
const perfStart = globalThis.process?.env?.DEBUG_PERF === "1" && typeof window === "undefined" ? Date.now() : 0;
|
|
@@ -15896,21 +16089,14 @@ const MemoBlockSection = React$1.memo(function MemoBlockSection({ themeResources
|
|
|
15896
16089
|
if (OverrideComponent) rendered = /* @__PURE__ */ jsx(OverrideComponent, { ...prepared.baseProps });
|
|
15897
16090
|
else {
|
|
15898
16091
|
requireThemeResources(themeResources, block.kind);
|
|
15899
|
-
rendered =
|
|
15900
|
-
prepared,
|
|
15901
|
-
entry,
|
|
15902
|
-
dataContext,
|
|
15903
|
-
registry,
|
|
15904
|
-
previewAuthoring,
|
|
15905
|
-
imageResolveContext: resolvedImageResolveContext
|
|
15906
|
-
});
|
|
16092
|
+
rendered = systemTree;
|
|
15907
16093
|
}
|
|
15908
16094
|
return finish(wrapped(rendered), {
|
|
15909
16095
|
override: Boolean(OverrideComponent),
|
|
15910
16096
|
hasResolvedData: prepared.hasResolvedData
|
|
15911
16097
|
});
|
|
15912
16098
|
}, (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;
|
|
16099
|
+
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
16100
|
});
|
|
15915
16101
|
/** Every plan input participates in memo identity; the builder owns all rules. */
|
|
15916
16102
|
function usePageRenderPlan(props) {
|