@riverbankcms/sdk 0.173.0 → 0.174.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -1
- package/dist/_dts/{BlocksIslandsHydrator-O50mTMCY.d.ts → BlocksIslandsHydrator-YRmc-Yxz.d.ts} +1 -1
- package/dist/_dts/{Page-Bk99sJwV.d.ts → Page-Du0zX1B-.d.ts} +27 -16
- package/dist/_dts/{SdkPreviewMode-DzAue6Kj.d.ts → SdkPreviewMode-4L8v3FkY.d.ts} +14 -7
- package/dist/_dts/{client-ZlNEIvlU.d.ts → client-B1J6Akyf.d.ts} +1 -1
- package/dist/_dts/{content-types-DBXPNc0h.d.ts → content-types-CGGYI0u_.d.ts} +2 -2
- package/dist/_dts/{contracts-D9bhu0bb.d.ts → contracts-CHMlw9hT.d.ts} +5 -4
- package/dist/_dts/{footerPageOutline-Bfap3soN.d.ts → footerPageOutline-DIHSU1Vr.d.ts} +6 -6
- package/dist/_dts/{generatePageMetadata-DwCdg31h.d.ts → generatePageMetadata-JITXD6BU.d.ts} +2 -2
- package/dist/_dts/{index-Dq_AboWN.d.ts → index-BLEKFHt1.d.ts} +1 -1
- package/dist/_dts/{index-BnatulTs.d.ts → index-BgOr1Xyz.d.ts} +3 -3
- package/dist/_dts/{index-KXh8FQ2s.d.ts → index-CF62FntA.d.ts} +2 -2
- package/dist/_dts/{index-CJzs-yIJ.d.ts → index-CXZSy_9M.d.ts} +2 -2
- package/dist/_dts/{index-DutLU2d2.d.ts → index-D9ZYmGAJ.d.ts} +2 -1
- package/dist/_dts/{index-DW3eeNph.d.ts → index-DpJm0NpL.d.ts} +4 -4
- package/dist/_dts/{index-C611wjIL.d.ts → index-yWDbUojb.d.ts} +1 -1
- package/dist/_dts/{loadContent-Bde2y870.d.ts → loadContent-M-s0p0rq.d.ts} +11 -11
- package/dist/_dts/{request-Bysk4QPI.d.ts → request-BK-pHf0P.d.ts} +3685 -1762
- package/dist/_dts/{resolveBlockData-ChbNvpSF.d.ts → resolveBlockData-DZAlnhwt.d.ts} +5 -5
- package/dist/_dts/{resolvePageContent-CGa6QMgc.d.ts → resolvePageContent-DXUCWJ3y.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 +9 -9
- 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 +3 -3
- 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 +4 -2
- 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 +13 -8
- 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 +36 -204
- package/dist/_dts/{types-BwitGNTl.d.ts → types-CwmB2NHU.d.ts} +7 -7
- package/dist/_dts/{types-BoEk9ZON.d.ts → types-DjVNADXR.d.ts} +3 -3
- package/dist/_dts/{types-kpp8XyXv.d.ts → types-Dmow_FI6.d.ts} +2 -2
- package/dist/_dts/{validation-ChftKX-o.d.ts → validation-h8t1HLlL.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-BnUeSE3d.mjs → BlocksIslandsHydrator-DRVx_XLi.mjs} +17 -17
- package/dist/client/{BookingMailingListNote-LHQMODqB.mjs → BookingMailingListNote-CwrMzj-k.mjs} +10 -10
- package/dist/client/{BookingPanelArrangement-Be704P85.mjs → BookingPanelArrangement-C2_hFT6K.mjs} +1 -1
- package/dist/client/{BookingQuestionFields-BewbU_cV.mjs → BookingQuestionFields-DZMrGvBh.mjs} +3 -3
- package/dist/client/{CalendarNavigationChevron-BMZp3RS3.mjs → CalendarNavigationChevron-Az1-TIEI.mjs} +6 -6
- package/dist/client/{DemoBookingPortalAccess-CARUWQ_E.mjs → DemoBookingPortalAccess-1p-pJ1lg.mjs} +5 -5
- package/dist/client/{EventCalendar.client-CaI6upCX.mjs → EventCalendar.client-CDkkP-Lv.mjs} +9 -9
- package/dist/client/{EventCombined.client-CoRUaYHY.mjs → EventCombined.client-DK3aaz62.mjs} +7 -7
- package/dist/client/{EventItem-Doe4KodB.mjs → EventItem-WeUipfIP.mjs} +4 -4
- package/dist/client/{EventListWeekNavigation-CXWLKDfa.mjs → EventListWeekNavigation-D3sbAeDo.mjs} +1 -1
- package/dist/client/{EventListing.client-DvJ5tGTx.mjs → EventListing.client-DL3gGGmF.mjs} +3 -3
- package/dist/client/{EventListing.view-BmfyK7S5.mjs → EventListing.view-DKFImKOx.mjs} +6 -6
- package/dist/client/{EventRegistrationPayment-DwMlJB2V.mjs → EventRegistrationPayment-Dn9TpWyL.mjs} +45 -18
- package/dist/client/{LocationMapActions-CdRPU6gp.mjs → LocationMapActions-BJT7MqP2.mjs} +1 -1
- package/dist/client/{MapDrawingSvg-DCLtxOnt.mjs → MapDrawingSvg-DCIwlON6.mjs} +1 -1
- package/dist/client/{Page-D46Dmr7b.mjs → Page-BpeP9xdt.mjs} +731 -1549
- package/dist/client/{StepIndicator-CrSZCZn1.mjs → StepIndicator-CP6zrwkl.mjs} +6 -242
- package/dist/client/{accessibleSurfaces-D4DhWo9j.mjs → accessibleSurfaces-DN8it_Cx.mjs} +35 -7
- package/dist/client/{accordion-P8xcfKxq.mjs → accordion-nR7D4m1a.mjs} +1 -1
- package/dist/client/{booking-form.client-BM2s-NqR.mjs → booking-form.client-Ce-mQZ7W.mjs} +362 -47
- package/dist/client/{bookingForm-JnaZPZge.mjs → bookingForm-B-qT_AQB.mjs} +4 -4
- package/dist/client/bookings.mjs +6 -6
- package/dist/client/{boxStyleClassNames-Cahps5kR.mjs → boxStyleClassNames-CrE3TDpW.mjs} +2 -29
- package/dist/client/{carousel-CQQ_m0KA.mjs → carousel-CVUOatsY.mjs} +1 -1
- package/dist/client/{cart-0Q4fjw_K.mjs → cart-DE0K6E0R.mjs} +3 -3
- package/dist/client/{cart.client-BI0IaHX3.mjs → cart.client-C23E6WQ5.mjs} +1 -1
- package/dist/client/{checkout-1J-3ftxF.mjs → checkout-76cdHyPL.mjs} +3 -3
- package/dist/client/{checkout.client-DOGYDlDk.mjs → checkout.client-DJOzqb26.mjs} +1 -1
- package/dist/client/{checkoutUrls-CwHqcqzP.mjs → checkoutUrls-CvIP5DCO.mjs} +1 -1
- package/dist/client/client.mjs +159 -7
- package/dist/client/{context-D0KCgbOq.mjs → context-CNlesLfF.mjs} +1 -1
- package/dist/client/{course-CmOuoZHN.mjs → course-DHIrXqNT.mjs} +2 -2
- package/dist/client/{creditProducts-BTRX4edc.mjs → creditProducts-KYMVIH3J.mjs} +2 -84
- package/dist/client/{dateFormatting-Dmfaczzq.mjs → dateFormatting-B73Ll0s4.mjs} +9 -1
- package/dist/client/{demoPortalMagicLink-CL7KGRta.mjs → demoPortalMagicLink-BVbLD4pi.mjs} +1 -1
- package/dist/client/{display-lL-YRApN.mjs → display-Cf_j5stk.mjs} +2574 -763
- package/dist/client/{enhanceHeaderSection-B-eLGs2C.mjs → enhanceHeaderSection-5GD5o4Mt.mjs} +3 -3
- package/dist/client/{event-details.client-DH1-Jxsh.mjs → event-details.client-D7Oz1q2L.mjs} +1 -1
- package/dist/client/{event-registration.client-GuuElczW.mjs → event-registration.client-zbuX36aA.mjs} +137 -131
- package/dist/client/{eventCalendar-BiCINPkV.mjs → eventCalendar-uZrksODt.mjs} +4 -4
- package/dist/client/{eventCombined-BtzmH6FW.mjs → eventCombined-DxhvNAx8.mjs} +4 -4
- package/dist/client/{eventDetails-BJpAD10-.mjs → eventDetails-DCIH4BYG.mjs} +2 -2
- package/dist/client/{eventListing-jLB8iRqp.mjs → eventListing-B9KrnPvc.mjs} +4 -4
- package/dist/client/{eventRegistration-WhtpDEbq.mjs → eventRegistration-TjnURMKl.mjs} +4 -4
- package/dist/client/{form-DO6qKH3M.mjs → form-CfqIAhfN.mjs} +3 -3
- package/dist/client/{form.client-D12ljYiX.mjs → form.client-CL6fF0cW.mjs} +6 -6
- package/dist/client/{form.parts-C8QHaQOI.mjs → form.parts-Bf-L66Gg.mjs} +1 -1
- package/dist/client/{formatDate-BnhfIpCa.mjs → formatDate-Dp7POa9Y.mjs} +1 -1
- package/dist/client/gifting/client.mjs +2 -2
- package/dist/client/{headerSection-BtFWtoUm.mjs → headerSection-WVXtOcuW.mjs} +2 -2
- package/dist/client/{newsletter-form.client-oHrqM_Ao.mjs → newsletter-form.client-Bb7GAZpO.mjs} +9 -7
- package/dist/client/{newsletter-form.parts-D5U-FuVy.mjs → newsletter-form.parts-BqOVRdIc.mjs} +1 -1
- package/dist/client/{newsletterForm-CBYbFxSx.mjs → newsletterForm-DOVe-qY3.mjs} +3 -3
- package/dist/client/{noop-CN0o0yjH.mjs → noop-D5mFWXtN.mjs} +30 -6
- package/dist/client/portal/client.mjs +346 -272
- package/dist/client/{product-detail.client-d_sNCapC.mjs → product-detail.client-CNzeFnFf.mjs} +1 -1
- package/dist/client/{product-list.client-DkSpw6WQ.mjs → product-list.client-LKpzC7pj.mjs} +1 -1
- package/dist/client/{productDetail-DaqM-LgL.mjs → productDetail-D2JNeEgx.mjs} +3 -3
- package/dist/client/{productList-CMx4-XlG.mjs → productList-DTgZXOEq.mjs} +3 -3
- package/dist/client/{propsDecoder-BZbUKstC.mjs → propsDecoder-mpBQt2AT.mjs} +3 -3
- package/dist/client/{registry.server-Cdot3dMk.mjs → registry.server-DdTJyar2.mjs} +31 -47
- package/dist/client/rendering/client.mjs +26 -26
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +16 -13
- package/dist/client/{richText-coerce-ByApwB4q.mjs → richText-coerce-C32cRQ03.mjs} +1 -1
- package/dist/client/{routeIslandApiConfig-DTET8f__.mjs → routeIslandApiConfig-8cfSgT0E.mjs} +1 -1
- package/dist/client/{runtimeResponse-IkOwKZD0.mjs → runtimeResponse-9v8q2NBc.mjs} +1 -1
- package/dist/client/runtimeResponse-CVkM0dHy.mjs +3 -0
- package/dist/client/{shop-Cy6xXDM7.mjs → shop-5LBhftWx.mjs} +3 -3
- package/dist/client/{shop-commerce-oDR76k1q.mjs → shop-commerce-DkValjZj.mjs} +12 -12
- package/dist/client/{shop-commerce-store-DjoUpL3a.mjs → shop-commerce-store-BOmXFmk_.mjs} +1 -1
- package/dist/client/{shop-discount-apply.state-WsGb9DD8.mjs → shop-discount-apply.state-D0ifS6KX.mjs} +2 -2
- package/dist/client/{shop.client-Brha4BSM.mjs → shop.client-BTtZqNmv.mjs} +13 -13
- package/dist/client/{shop.interactive-CXhYl0DW.mjs → shop.interactive-DNRqG4aX.mjs} +18 -24
- package/dist/client/{shopShared-JCa_SRhP.mjs → shopShared-Nky6kPYr.mjs} +2 -2
- package/dist/client/{timetableModel-CZeJwMxP.mjs → timetableModel-DZArznD_.mjs} +25 -152
- package/dist/client/{useAvailableSlots-DfbSkWop.mjs → useAvailableSlots-CUVRD1nx.mjs} +24 -4
- package/dist/client/{useDiscountApply-Dq-wjb1d.mjs → useDiscountApply-BBnStWXU.mjs} +1 -1
- package/dist/client/{useDiscountCodeUi-Cyy0meCH.mjs → useDiscountCodeUi-d7viY_mu.mjs} +1 -1
- package/dist/client/{useEventPagination-CCAGQHsD.mjs → useEventPagination-Da2JqxGC.mjs} +6 -6
- package/dist/client/{view-Sw075FOY.mjs → view-BvuYmQJ5.mjs} +2 -2
- package/dist/client/{view-D6yebI4r.mjs → view-D9ObkFtz.mjs} +12 -11
- package/dist/preview-next/client/{LocationPickerEnvironment-D4F_5rnr.mjs → LocationPickerEnvironment-8iKKoYZr.mjs} +1 -1
- package/dist/preview-next/client/{MapLibreEditMap-BKMNxSEJ.mjs → MapLibreEditMap-AIUPN1Zx.mjs} +2 -2
- package/dist/preview-next/client/{PageSectionToolbar-DG2rXUmo.mjs → PageSectionToolbar-DwxHT-2k.mjs} +57 -144
- package/dist/preview-next/client/{PreviewEditorSidebar-BDY5vdHU.mjs → PreviewEditorSidebar-D4SBxGU6.mjs} +758 -1279
- package/dist/preview-next/client/{PreviewEditorUI-CqZCfOaz.mjs → PreviewEditorUI-D8mUct32.mjs} +29 -26
- package/dist/preview-next/client/{PreviewShell-Bv2HZ7JY.mjs → PreviewShell-L2AEdNUQ.mjs} +50 -30
- package/dist/preview-next/client/{SdkPreviewModeRuntime-BMTcR-MW.mjs → SdkPreviewModeRuntime-bhVAU2D2.mjs} +47 -19
- package/dist/preview-next/client/{lucide-react-BCNn8dEQ.mjs → lucide-react-Dfgl3Vtq.mjs} +7 -1
- package/dist/preview-next/client/{previewAssistantSlot-La6MerV_.mjs → previewAssistantSlot-Jpj_HDra.mjs} +101003 -51855
- package/dist/preview-next/client/{previewChromeRoot-BcOQqJIP.mjs → previewChromeRoot-CYTDvx4u.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-BkckHox4.mjs → sdk-runtime-CZHX6J_4.mjs} +2 -2
- package/dist/preview-next/client/siteStyleAccess-DmGIG9Hk.mjs +9356 -0
- package/dist/preview-next/client/{useAutosaveStatus-CPAHgGqI.mjs → useAutosaveStatus-DQCyswQ-.mjs} +2 -2
- package/dist/preview-next/client/{useOpenBlockForSetup-BDkuSZxQ.mjs → useOpenBlockForSetup-LwE5yXvL.mjs} +19 -4
- package/dist/preview-next/container-responsive.css +117 -32
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-CPV30ABr.mjs → route-contract-BOuNcOcN.mjs} +153 -2
- package/dist/server/{Block.shared-BaMMstO1.mjs → Block.shared-wfJfhs08.mjs} +10 -5
- package/dist/server/{ThemeScopeCore-D1NTXZdX.mjs → ThemeScopeCore-BtrJNHTB.mjs} +23 -6
- package/dist/server/{accessibleSurfaces-Dbd2__Le.mjs → accessibleSurfaces-CM3QANtw.mjs} +22 -5
- package/dist/server/{bindings-Dge4sqel.mjs → bindings-P1CF2Gm6.mjs} +6 -4
- package/dist/server/{client-VVIQjC4r.mjs → client-CGtU5fHI.mjs} +156 -4
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/customCss-BGB8gMVb.mjs +210 -0
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/index.mjs +2 -2
- package/dist/server/{loadContent-BIJb3WAK.mjs → loadContent-ChnkJSay.mjs} +8 -9
- package/dist/server/{loadPage-DjTU19y7.mjs → loadPage-DesHhgxj.mjs} +3 -3
- package/dist/server/lookMediaFrame-BBr0mkze.mjs +2626 -0
- package/dist/server/manifest.mjs +2 -2
- package/dist/server/next.mjs +9 -8
- package/dist/server/{overrideResolution-1Ru3NMQj.mjs → overrideResolution-DHEkHcZs.mjs} +3 -4
- package/dist/server/page-converter.mjs +2 -2
- package/dist/server/{pageRenderPlan-CytPhrI9.mjs → pageRenderPlan-0jvm0RBk.mjs} +29 -331
- package/dist/server/{pageRuntimeSupport-DWspU5EZ.mjs → pageRuntimeSupport-8-f1Zr9e.mjs} +14 -6
- package/dist/server/{pageShared-Bhx8bVe1.mjs → pageShared-CuVFoV4z.mjs} +370 -291
- package/dist/server/{parseThemeForPersistence-CtgRtvo3.mjs → parseThemeForPersistence-Cwqb5pZx.mjs} +2 -2
- package/dist/server/{portal-Ce1Prfl3.mjs → portal-BjVHMAUC.mjs} +1 -1
- package/dist/server/portal.mjs +1 -1
- package/dist/server/{prebuild-BjvFb0CA.mjs → prebuild-Bms_Y7wQ.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-Db3stNpp.mjs → prefetchBlockData-5oC5kyHe.mjs} +2 -2
- package/dist/server/{registry-BMCfcev6.mjs → registry-DmqxC8th.mjs} +1258 -3166
- 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 +2 -2
- package/dist/server/rendering/server.mjs +3 -3
- package/dist/server/rendering.mjs +7 -7
- package/dist/server/{resolveBlockData--yUbI-Ll.mjs → resolveBlockData-EYogtwQc.mjs} +1 -1
- package/dist/server/{resolveButtonColourStates-CCPUY9Xh.mjs → resolveButtonColourStates--6yJp9Tq.mjs} +15 -4
- package/dist/server/{schema-D5Vfmqzw.mjs → schema-CUDHMirj.mjs} +46 -153
- package/dist/server/server.mjs +3 -3
- package/dist/server/{src-Cxucn-1P.mjs → src-DHK4JUlp.mjs} +4 -1
- package/dist/server/theme-bridge.mjs +21 -15
- package/dist/server/theme.mjs +2 -2
- package/dist/server/{three-pass-converter-Bsfdy_ZV.mjs → three-pass-converter-39SXCCnh.mjs} +1 -1
- package/dist/server/{titleSourceSchema-DwKJfMYb.mjs → titleSourceSchema-Cu-3PRvv.mjs} +0 -1
- package/dist/server/{validation-EgTtnTcY.mjs → validation-Bt_8IL1g.mjs} +4 -4
- package/dist/server/{version-LjgU0Cq1.mjs → version-DT_efohp.mjs} +1 -1
- package/dist/styles/index.css +989 -279
- package/package.json +1 -1
- package/dist/client/bookability-SargNwlO.mjs +0 -17
- package/dist/client/runtimeResponse-Wd6kwhE_.mjs +0 -3
- package/dist/preview-next/client/SiteChromeCustomizeButton-D1MGyN_Z.mjs +0 -55403
- package/dist/server/customCss-QymcmOZ-.mjs +0 -97
- package/dist/server/opaqueSurface-COEKXVwk.mjs +0 -54
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { c as unsafeAsMediaAssetId, d as parseUuidBrand, f as err, i as resolveManagedMediaReference, l as unsafeAsStorageBucketName, o as parseCanonicalMediaIdentifier, p as ok$1, u as unsafeAsStoragePath } from "./renderableMediaAssetAdmission-BlfqYLJW.mjs";
|
|
3
|
-
import { $ as
|
|
4
|
-
import { A as
|
|
3
|
+
import { $ as assetMediaSchema, $t as compareLocalScheduleDates, A as eventListTreatmentValues, Bt as formatDate$2, D as accordionIconSetValues, E as accordionIconMotionValues, Et as normalizeCurrencyCode, F as tileTreatmentValues, Gt as formatTimeRange, H as blockBookingPaymentTermsSchema, Ht as formatDateTime, I as visibleHeadingDecorationFamilyValues, J as bookingQuestionsAnswerValueSchema, Jt as resolveBookingDisplayContext, K as toBookingRequirementConsentField, M as headingDecorationColorTokenValues, N as headingDecorationOverrideValues, O as arrangementModes, P as isArrangementMode, Qt as addLocalScheduleDays, T as accordionIconColorTokenValues, Tt as allocateReductionCents, U as blockBookingConsentSchema, Ut as formatDateTimeRange, Vt as formatDateRange, Wt as formatTime$2, Xt as toScheduledBookingDateTime, _ as eventCalendarListLayoutOptions, an as resolveBookingBusinessTimeZone, at as videoMediaSchema, cn as parseUtcIsoDateTimeString, dt as eventCalendarListLayoutCompatibleDisplayModeValues, en as formatLocalScheduleDate, et as externalMediaSchema, ft as eventCalendarListLayoutValues, in as parseLocalScheduleTime, it as runtimeMediaSchema, j as eyebrowTreatmentValues, k as decorativeTransitionIntentValues, ln as toUtcIsoDateTimeString, lt as eventCalendarDefaultViewValues, mn as formatCurrencyAmount, n as blockSiteTermsSchema, nn as getLocalScheduleDate, nt as mediaSchema, on as resolveBookingTimeZoneId, pn as toNonNegativeCents, q as beforeBookingQuestionsPresentationSchema, qt as inferSiteDateLocale, rn as parseBookingLocalDate, sn as toBookingTimeZone, tn as getBookingLocalDateKey, tt as imageMediaSchema, un as validateBookingPaymentOptionKinds, ut as eventCalendarDisplayModeValues, wt as unsafeAsPositiveCheckoutQuantity } from "./noop-D5mFWXtN.mjs";
|
|
4
|
+
import { A as assertNever$2, C as addIntervalPreservingMonthAnchor, D as getBookingInstalmentPlanIntervalCount, E as getBookingInstalmentDepositRefundability, O as omitZeroAmountFutureRows, S as formatCreditProductUnits, a as buildBookingQuestionsSubmission, b as creditProductUnitNoun, d as resolveBookingQuestionsAnswerMode, j as parseAppointmentServiceId, k as splitAmountWithRemainderInFirst, l as initialBookingQuestionsAnswerMode, o as checkBookingQuestionsAnswered, p as assertNever$3, t as deriveCreditProductLabels, u as initialBookingQuestionsValues, w as clampConfiguredAmount } from "./creditProducts-KYMVIH3J.mjs";
|
|
5
5
|
import { t as stableJsonStringify } from "./stable-json-D0XAEIXc.mjs";
|
|
6
6
|
import { l as buildCalendarViewport$1, n as calendarLinks, r as groupItemsByDate } from "./src-xrjaKaCj.mjs";
|
|
7
|
-
import { Ct as
|
|
8
|
-
import { C as paletteColorsFromEntries, D as parseThemeColorToken, E as parseColorTokenParts, O as themeColorTokenSchema, S as paletteColorEntries, T as paletteModeSchema, b as isThemeColorToken, c as buttonEffectApplicationSchema, f as buttonVisualStatesSchema, g as VARIANT_ROLES, l as buttonPressOffsetSchema, s as unsafeAsOpaqueButtonColourToken, u as buttonSystemSchema, w as paletteColorsSchema, y as hexColorSchema } from "./types-DjWUR_O6.mjs";
|
|
7
|
+
import { At as featuresFromHex, Ct as resolveOpaqueSurfaceHex, Et as requirePaletteColorsFromEntries, F as defineButtonStyleRecipe, G as mergeStyles, H as backgroundColorStyle, I as mapButtonRoleAppearances, K as rgbColorValue, L as mapButtonVisualAppearances, Ot as preparePaletteColourIndex, P as PUBLIC_BUTTON_ROLES, St as resolveConcreteColorHex, Tt as paletteValueKeySchema, Y as resolveSurfaceForeground, _ as contextualButtonSurfaceResetStyles, _t as surfaceInkDeclarations, a as requireResolvedSurface, b as BUTTON_CONTRAST_POLICY, bt as freezeOwnedThemeValue, c as surfaceButtonRequest, d as toAccessibleColorSurfaceIntent, dt as SURFACE_INK_CSS_VARS, ft as surfaceForegroundDeclarations, h as scrimTone, ht as surfaceForegroundValue, i as prepareThemeSurfaceRevision, it as contrastThresholdByPolicy, j as ELEVATION_OFFSET, m as minimumScrimOpacity, o as resolveSurface, ot as expandPalette, p as gradientScrimSamples, q as textColorStyle, t as parseResolvedSurface, u as surfaceTransportContext, ut as SURFACE_FOREGROUND_CSS_VARS, wt as paletteValueKey, xt as ownedThemeSnapshot } from "./accessibleSurfaces-DN8it_Cx.mjs";
|
|
8
|
+
import { C as paletteColorsFromEntries, D as parseThemeColorToken, E as parseColorTokenParts, O as themeColorTokenSchema, S as paletteColorEntries, T as paletteModeSchema, b as isThemeColorToken, c as buttonEffectApplicationSchema, f as buttonVisualStatesSchema, g as VARIANT_ROLES, l as buttonPressOffsetSchema, s as unsafeAsOpaqueButtonColourToken, u as buttonSystemSchema, v as blockColorTokenNames, w as paletteColorsSchema, y as hexColorSchema } from "./types-DjWUR_O6.mjs";
|
|
9
9
|
import { S as clsx } from "./ThemedButton-DuaYtnvG.mjs";
|
|
10
10
|
import { a as getSupabaseUrl, i as getSiteId, n as getCurrentResolveImageUrlContext, r as getMediaAssetIndex } from "./mediaContext-Fusweriw.mjs";
|
|
11
11
|
import React from "react";
|
|
@@ -201,7 +201,7 @@ function formatBookingPriceDisplay(display, options = {}) {
|
|
|
201
201
|
case "exact": return formatCurrencyAmount(display.amount, display.currency, options);
|
|
202
202
|
case "from": return `From ${formatCurrencyAmount(display.amount, display.currency, options)}`;
|
|
203
203
|
case "range": return `${formatCurrencyAmount(display.minAmount, display.currency, options)}–${formatCurrencyAmount(display.maxAmount, display.currency, options)}`;
|
|
204
|
-
case "mixed": return display.paidToAmount > display.paidFromAmount ? `Free
|
|
204
|
+
case "mixed": return display.paidToAmount > display.paidFromAmount ? `Free or ${formatCurrencyAmount(display.paidFromAmount, display.currency, options)}–${formatCurrencyAmount(display.paidToAmount, display.currency, options)}` : `Free or ${formatCurrencyAmount(display.paidFromAmount, display.currency, options)}`;
|
|
205
205
|
case "unavailable": return "Pricing unavailable";
|
|
206
206
|
case "external": return display.label;
|
|
207
207
|
default: return assertNever$2(display);
|
|
@@ -410,6 +410,14 @@ function deriveTotalTicketQuantity(lines) {
|
|
|
410
410
|
return parsed.ok ? parsed.value : null;
|
|
411
411
|
}
|
|
412
412
|
//#endregion
|
|
413
|
+
//#region ../core/src/booking-flexible-balance.ts
|
|
414
|
+
function clampFlexibleBalanceConfiguredAmount(amountCents, totalAmountCents) {
|
|
415
|
+
return Math.max(0, Math.min(amountCents, totalAmountCents));
|
|
416
|
+
}
|
|
417
|
+
function resolveFlexibleBalanceInitialPaymentCents(input) {
|
|
418
|
+
return clampFlexibleBalanceConfiguredAmount(input.config.upfrontAmountCents, input.totalAmountCents);
|
|
419
|
+
}
|
|
420
|
+
//#endregion
|
|
413
421
|
//#region ../core/src/mailing-list-identifiers.ts
|
|
414
422
|
const UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/iu;
|
|
415
423
|
const OPAQUE_ID_PATTERN = /^[A-Za-z0-9_-]{1,100}$/u;
|
|
@@ -868,6 +876,54 @@ function getBookingLaterInstalments(schedule) {
|
|
|
868
876
|
return schedule.filter((row) => row.stateAtBooking === "scheduled");
|
|
869
877
|
}
|
|
870
878
|
//#endregion
|
|
879
|
+
//#region ../commerce/src/purchase/stripeMinimumCharge.ts
|
|
880
|
+
const STRIPE_MINIMUM_CHARGE_CENTS_BY_CURRENCY = {
|
|
881
|
+
GBP: 30,
|
|
882
|
+
USD: 50,
|
|
883
|
+
EUR: 50,
|
|
884
|
+
AED: 200,
|
|
885
|
+
AUD: 50,
|
|
886
|
+
BGN: 100,
|
|
887
|
+
BRL: 50,
|
|
888
|
+
CAD: 50,
|
|
889
|
+
CHF: 50,
|
|
890
|
+
CZK: 1500,
|
|
891
|
+
DKK: 250,
|
|
892
|
+
HKD: 400,
|
|
893
|
+
HUF: 17500,
|
|
894
|
+
JPY: 50,
|
|
895
|
+
MXN: 1e3,
|
|
896
|
+
MYR: 200,
|
|
897
|
+
NOK: 300,
|
|
898
|
+
NZD: 50,
|
|
899
|
+
PLN: 200,
|
|
900
|
+
RON: 200,
|
|
901
|
+
SEK: 300,
|
|
902
|
+
SGD: 50,
|
|
903
|
+
THB: 1e3
|
|
904
|
+
};
|
|
905
|
+
function isStripeMinimumChargeCurrency(currency) {
|
|
906
|
+
return currency in STRIPE_MINIMUM_CHARGE_CENTS_BY_CURRENCY;
|
|
907
|
+
}
|
|
908
|
+
function getStripeMinimumChargeRequirement(rawCurrency) {
|
|
909
|
+
let currency;
|
|
910
|
+
try {
|
|
911
|
+
currency = normalizeCurrencyCode(rawCurrency);
|
|
912
|
+
} catch {
|
|
913
|
+
return null;
|
|
914
|
+
}
|
|
915
|
+
const currencyKey = currency;
|
|
916
|
+
if (!isStripeMinimumChargeCurrency(currencyKey)) return null;
|
|
917
|
+
return {
|
|
918
|
+
currency,
|
|
919
|
+
minimumAmountCents: STRIPE_MINIMUM_CHARGE_CENTS_BY_CURRENCY[currencyKey]
|
|
920
|
+
};
|
|
921
|
+
}
|
|
922
|
+
function isStripeChargeBelowMinimum(options) {
|
|
923
|
+
const requirement = getStripeMinimumChargeRequirement(options.currency);
|
|
924
|
+
return Boolean(requirement && options.amountCents > 0 && options.amountCents < requirement.minimumAmountCents);
|
|
925
|
+
}
|
|
926
|
+
//#endregion
|
|
871
927
|
//#region ../commerce/src/purchase/bookingPaymentSelection.ts
|
|
872
928
|
/** Identity is decided against the authoritative quote, before display repricing. */
|
|
873
929
|
function resolveAvailableBookingCollectionOptions(input) {
|
|
@@ -878,17 +934,15 @@ function resolveAvailableBookingCollectionOptions(input) {
|
|
|
878
934
|
option,
|
|
879
935
|
totalCents: input.totalCents,
|
|
880
936
|
anchorAt: input.now,
|
|
881
|
-
bookingStartAt: input.bookingStartAt
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
deadline,
|
|
885
|
-
schedule: option.schedule
|
|
886
|
-
}));
|
|
937
|
+
bookingStartAt: input.bookingStartAt,
|
|
938
|
+
timeZone: input.timeZone
|
|
939
|
+
})).filter((option) => canOfferBookingCollectionOption(option, input.currency ?? "USD", deadline));
|
|
887
940
|
const upfront = resolveBookingCollectionOptionFacts({
|
|
888
941
|
option: { kind: "upfront" },
|
|
889
942
|
totalCents: input.totalCents,
|
|
890
943
|
anchorAt: input.now,
|
|
891
|
-
bookingStartAt: input.bookingStartAt
|
|
944
|
+
bookingStartAt: input.bookingStartAt,
|
|
945
|
+
timeZone: input.timeZone
|
|
892
946
|
});
|
|
893
947
|
const collapsed = available.map((option) => isBookingCollectionEquivalentToUpfront(option) ? upfront : option);
|
|
894
948
|
const unique = collapsed.filter((option, index) => collapsed.findIndex((other) => other.kind === option.kind) === index);
|
|
@@ -907,7 +961,8 @@ function resolveBookingCollectionOptionFacts(input) {
|
|
|
907
961
|
const money = {
|
|
908
962
|
totalCents: input.totalCents,
|
|
909
963
|
anchorAt: input.anchorAt,
|
|
910
|
-
bookingStartAt: input.bookingStartAt
|
|
964
|
+
bookingStartAt: input.bookingStartAt,
|
|
965
|
+
timeZone: input.timeZone ?? "UTC"
|
|
911
966
|
};
|
|
912
967
|
switch (input.option.kind) {
|
|
913
968
|
case "upfront": return {
|
|
@@ -946,10 +1001,7 @@ function resolveBookingCollectionOptionFacts(input) {
|
|
|
946
1001
|
config: input.option.config,
|
|
947
1002
|
dueNowCents,
|
|
948
1003
|
remainingBalanceCents: Math.max(0, input.totalCents - dueNowCents),
|
|
949
|
-
|
|
950
|
-
bookingStartAt: input.bookingStartAt ?? input.anchorAt,
|
|
951
|
-
dueDateRule: input.option.config.dueDateRule
|
|
952
|
-
})
|
|
1004
|
+
balanceDueDay: flexibleBalanceDueDay(input.option.config, input.bookingStartAt ?? input.anchorAt, money.timeZone)
|
|
953
1005
|
};
|
|
954
1006
|
}
|
|
955
1007
|
default: return assertNever$1(input.option);
|
|
@@ -957,13 +1009,63 @@ function resolveBookingCollectionOptionFacts(input) {
|
|
|
957
1009
|
}
|
|
958
1010
|
/** Discounts change preview money, never an already admitted collection identity. */
|
|
959
1011
|
function repriceBookingCollectionOptions(input) {
|
|
960
|
-
|
|
1012
|
+
const repriced = input.options.map((option) => option.totalCents === input.totalCents ? option : resolveBookingCollectionOptionFacts({
|
|
961
1013
|
option,
|
|
962
1014
|
totalCents: input.totalCents,
|
|
963
1015
|
anchorAt: option.anchorAt,
|
|
964
|
-
bookingStartAt: option.bookingStartAt
|
|
1016
|
+
bookingStartAt: option.bookingStartAt,
|
|
1017
|
+
timeZone: option.timeZone
|
|
1018
|
+
}));
|
|
1019
|
+
const available = repriced.filter((option) => canOfferBookingCollectionOption(option, input.currency, input.instalmentCollectionDeadlineAt));
|
|
1020
|
+
const first = repriced[0];
|
|
1021
|
+
return available.length > 0 || !first ? available : [resolveBookingCollectionOptionFacts({
|
|
1022
|
+
option: { kind: "upfront" },
|
|
1023
|
+
totalCents: input.totalCents,
|
|
1024
|
+
anchorAt: first.anchorAt,
|
|
1025
|
+
bookingStartAt: first.bookingStartAt,
|
|
1026
|
+
timeZone: first.timeZone
|
|
1027
|
+
})];
|
|
1028
|
+
}
|
|
1029
|
+
/** The same admission is used for the offer and the submitted selection. */
|
|
1030
|
+
function canOfferBookingCollectionOption(option, currency, deadline = option.bookingStartAt) {
|
|
1031
|
+
if (option.kind === "upfront" || option.kind === "deferred_manual") return true;
|
|
1032
|
+
const window = bookingCollectionWindow(option);
|
|
1033
|
+
if (!window) return false;
|
|
1034
|
+
const { now, start } = window;
|
|
1035
|
+
if (option.kind === "flexible_balance") return flexibleBalanceCanBeCollected(option, currency, now, start);
|
|
1036
|
+
return deadline !== null && canInstalmentPlanCompleteBefore({
|
|
1037
|
+
now: option.anchorAt,
|
|
1038
|
+
deadline,
|
|
1039
|
+
schedule: option.schedule
|
|
1040
|
+
}) && laterInstalmentsCanBeCollected(option, currency, now);
|
|
1041
|
+
}
|
|
1042
|
+
function laterInstalmentsCanBeCollected(option, currency, now) {
|
|
1043
|
+
return option.schedule.filter((row) => row.stateAtBooking === "scheduled").every((row) => Date.parse(row.dueAt) > now && !isStripeChargeBelowMinimum({
|
|
1044
|
+
amountCents: row.amountCents,
|
|
1045
|
+
currency
|
|
965
1046
|
}));
|
|
966
1047
|
}
|
|
1048
|
+
function flexibleBalanceCanBeCollected(option, currency, now, start) {
|
|
1049
|
+
const today = formatLocalScheduleDate(getLocalScheduleDate(new Date(now), option.timeZone));
|
|
1050
|
+
const startDay = formatLocalScheduleDate(getLocalScheduleDate(new Date(start), option.timeZone));
|
|
1051
|
+
return option.balanceDueDay >= today && option.balanceDueDay < startDay && !isStripeChargeBelowMinimum({
|
|
1052
|
+
amountCents: option.remainingBalanceCents,
|
|
1053
|
+
currency
|
|
1054
|
+
});
|
|
1055
|
+
}
|
|
1056
|
+
function bookingCollectionWindow(option) {
|
|
1057
|
+
const now = Date.parse(option.anchorAt);
|
|
1058
|
+
const start = Date.parse(option.bookingStartAt ?? "");
|
|
1059
|
+
return Number.isFinite(now) && Number.isFinite(start) && start > now ? {
|
|
1060
|
+
now,
|
|
1061
|
+
start
|
|
1062
|
+
} : null;
|
|
1063
|
+
}
|
|
1064
|
+
/** Mirrors private.flexible_balance_due_day: fixed civil date, or local start minus calendar days. */
|
|
1065
|
+
function flexibleBalanceDueDay(config, bookingStartAt, timeZone) {
|
|
1066
|
+
const rule = config.dueDateRule;
|
|
1067
|
+
return formatLocalScheduleDate(rule.kind === "fixed_calendar_date" ? parseBookingLocalDate(rule.dueAt.slice(0, 10)) : addLocalScheduleDays(getLocalScheduleDate(new Date(bookingStartAt), timeZone), -rule.daysBeforeStart));
|
|
1068
|
+
}
|
|
967
1069
|
//#endregion
|
|
968
1070
|
//#region ../commerce/src/purchase/checkoutPaymentFlow.ts
|
|
969
1071
|
function planCheckoutPaymentFlow(options) {
|
|
@@ -1044,50 +1146,6 @@ function planFlexibleBalanceCreditFirst(input) {
|
|
|
1044
1146
|
};
|
|
1045
1147
|
}
|
|
1046
1148
|
//#endregion
|
|
1047
|
-
//#region ../commerce/src/purchase/stripeMinimumCharge.ts
|
|
1048
|
-
const STRIPE_MINIMUM_CHARGE_CENTS_BY_CURRENCY = {
|
|
1049
|
-
GBP: 30,
|
|
1050
|
-
USD: 50,
|
|
1051
|
-
EUR: 50,
|
|
1052
|
-
AED: 200,
|
|
1053
|
-
AUD: 50,
|
|
1054
|
-
BGN: 100,
|
|
1055
|
-
BRL: 50,
|
|
1056
|
-
CAD: 50,
|
|
1057
|
-
CHF: 50,
|
|
1058
|
-
CZK: 1500,
|
|
1059
|
-
DKK: 250,
|
|
1060
|
-
HKD: 400,
|
|
1061
|
-
HUF: 17500,
|
|
1062
|
-
JPY: 50,
|
|
1063
|
-
MXN: 1e3,
|
|
1064
|
-
MYR: 200,
|
|
1065
|
-
NOK: 300,
|
|
1066
|
-
NZD: 50,
|
|
1067
|
-
PLN: 200,
|
|
1068
|
-
RON: 200,
|
|
1069
|
-
SEK: 300,
|
|
1070
|
-
SGD: 50,
|
|
1071
|
-
THB: 1e3
|
|
1072
|
-
};
|
|
1073
|
-
function isStripeMinimumChargeCurrency(currency) {
|
|
1074
|
-
return currency in STRIPE_MINIMUM_CHARGE_CENTS_BY_CURRENCY;
|
|
1075
|
-
}
|
|
1076
|
-
function getStripeMinimumChargeRequirement(rawCurrency) {
|
|
1077
|
-
let currency;
|
|
1078
|
-
try {
|
|
1079
|
-
currency = normalizeCurrencyCode(rawCurrency);
|
|
1080
|
-
} catch {
|
|
1081
|
-
return null;
|
|
1082
|
-
}
|
|
1083
|
-
const currencyKey = currency;
|
|
1084
|
-
if (!isStripeMinimumChargeCurrency(currencyKey)) return null;
|
|
1085
|
-
return {
|
|
1086
|
-
currency,
|
|
1087
|
-
minimumAmountCents: STRIPE_MINIMUM_CHARGE_CENTS_BY_CURRENCY[currencyKey]
|
|
1088
|
-
};
|
|
1089
|
-
}
|
|
1090
|
-
//#endregion
|
|
1091
1149
|
//#region ../commerce/src/purchase/checkoutCopy.ts
|
|
1092
1150
|
/**
|
|
1093
1151
|
* Customer copy shared by checkout surfaces, so one approved wording reaches
|
|
@@ -3083,6 +3141,19 @@ const componentShadowSchema = z.object({ elevation: z.enum([
|
|
|
3083
3141
|
"2xl"
|
|
3084
3142
|
]).default("sm") });
|
|
3085
3143
|
//#endregion
|
|
3144
|
+
//#region ../site-contracts/src/siteStyle/footerPreferences.ts
|
|
3145
|
+
const footerEdgeIntentValues = decorativeTransitionIntentValues.filter((id) => id !== "wave-edge-echo");
|
|
3146
|
+
const footerEdgePreferenceSchema = z.discriminatedUnion("kind", [
|
|
3147
|
+
z.strictObject({ kind: z.literal("style-default") }),
|
|
3148
|
+
z.strictObject({ kind: z.literal("none") }),
|
|
3149
|
+
z.strictObject({
|
|
3150
|
+
kind: z.literal("option"),
|
|
3151
|
+
id: z.enum(footerEdgeIntentValues)
|
|
3152
|
+
})
|
|
3153
|
+
]);
|
|
3154
|
+
z.strictObject({ edge: footerEdgePreferenceSchema });
|
|
3155
|
+
z.strictObject({ edge: footerEdgePreferenceSchema });
|
|
3156
|
+
//#endregion
|
|
3086
3157
|
//#region ../site-contracts/src/theme/tokenOrColor.ts
|
|
3087
3158
|
/**
|
|
3088
3159
|
* Runtime color-reference fields intentionally accept any string, including
|
|
@@ -3934,26 +4005,7 @@ const headerSchema = z.object({
|
|
|
3934
4005
|
ctaInMobileBar: z.literal(true).optional(),
|
|
3935
4006
|
dropdownStyle: dropdownStyleSchema
|
|
3936
4007
|
});
|
|
3937
|
-
const footerVariant = z.enum([
|
|
3938
|
-
"simple",
|
|
3939
|
-
"columns",
|
|
3940
|
-
"split",
|
|
3941
|
-
"centred"
|
|
3942
|
-
]).transform((value) => value === "columns" ? "simple" : value);
|
|
3943
4008
|
const footerMaxWidth = z.enum(["container", "full"]);
|
|
3944
|
-
const footerNavLayoutMode = z.enum([
|
|
3945
|
-
"stack",
|
|
3946
|
-
"inline",
|
|
3947
|
-
"inline-wrap"
|
|
3948
|
-
]);
|
|
3949
|
-
const footerSpacing = z.enum([
|
|
3950
|
-
"none",
|
|
3951
|
-
"tight",
|
|
3952
|
-
"compact",
|
|
3953
|
-
"default",
|
|
3954
|
-
"relaxed",
|
|
3955
|
-
"spacious"
|
|
3956
|
-
]);
|
|
3957
4009
|
const footerLogoSize = z.enum([
|
|
3958
4010
|
"sm",
|
|
3959
4011
|
"md",
|
|
@@ -3972,53 +4024,49 @@ const footerBottomTextLinkStyleSchema = z.object({
|
|
|
3972
4024
|
decorationColorToken: themeColorTokenSchema.nullable().optional(),
|
|
3973
4025
|
underline: z.boolean().optional()
|
|
3974
4026
|
});
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
"medium",
|
|
3993
|
-
"thick"
|
|
3994
|
-
]).optional()
|
|
3995
|
-
}).optional()
|
|
4027
|
+
/**
|
|
4028
|
+
* One footer area's paint: a solid ground and, only where a style needs it, the
|
|
4029
|
+
* text colour to try first. Inks come from the ground's surface resolution.
|
|
4030
|
+
*/
|
|
4031
|
+
const footerBandPaintSchema = z.object({
|
|
4032
|
+
ground: themeColorTokenSchema,
|
|
4033
|
+
textColor: themeColorTokenSchema.optional()
|
|
4034
|
+
});
|
|
4035
|
+
/**
|
|
4036
|
+
* The footer's areas. `main` is the footer's own ground; an unpainted area
|
|
4037
|
+
* (`null`) sits on it under a hairline rule.
|
|
4038
|
+
*/
|
|
4039
|
+
const footerBandsSchema = z.object({
|
|
4040
|
+
main: footerBandPaintSchema,
|
|
4041
|
+
band: footerBandPaintSchema.nullable(),
|
|
4042
|
+
strip: footerBandPaintSchema.nullable(),
|
|
4043
|
+
base: footerBandPaintSchema.nullable()
|
|
3996
4044
|
});
|
|
3997
|
-
const footerNavLayoutSchema = z.object({ layout: footerNavLayoutMode.optional() });
|
|
3998
4045
|
const footerLogoSchema = z.object({
|
|
3999
4046
|
size: footerLogoSize.optional(),
|
|
4000
|
-
maxHeight: footerLogoMaxHeight.optional()
|
|
4001
|
-
align: z.enum([
|
|
4002
|
-
"start",
|
|
4003
|
-
"center",
|
|
4004
|
-
"end"
|
|
4005
|
-
]).optional()
|
|
4047
|
+
maxHeight: footerLogoMaxHeight.optional()
|
|
4006
4048
|
});
|
|
4007
4049
|
const footerSchema = z.object({
|
|
4008
|
-
|
|
4050
|
+
layout: z.enum([
|
|
4051
|
+
"beside-links",
|
|
4052
|
+
"centred",
|
|
4053
|
+
"compact"
|
|
4054
|
+
]).default("beside-links"),
|
|
4009
4055
|
maxWidth: footerMaxWidth,
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4056
|
+
bands: footerBandsSchema.default({
|
|
4057
|
+
main: { ground: "surface" },
|
|
4058
|
+
band: null,
|
|
4059
|
+
strip: null,
|
|
4060
|
+
base: null
|
|
4013
4061
|
}),
|
|
4014
4062
|
navStyle: headerNavStyle.default("minimal"),
|
|
4015
4063
|
navColor: themeColorTokenSchema.nullable().optional(),
|
|
4016
4064
|
navWeight: navFontWeight.default("medium"),
|
|
4017
4065
|
navLinkStyle: navLinkStyleSchema.optional(),
|
|
4018
4066
|
bottomTextLinkStyle: footerBottomTextLinkStyleSchema.optional(),
|
|
4019
|
-
navLayout: footerNavLayoutSchema.optional(),
|
|
4020
4067
|
logo: footerLogoSchema.optional(),
|
|
4021
|
-
|
|
4068
|
+
/** The shape the footer draws where the page above meets it; absent draws none. */
|
|
4069
|
+
edge: z.enum(footerEdgeIntentValues).optional()
|
|
4022
4070
|
});
|
|
4023
4071
|
const containerPaddingPresetSchema = z.enum([
|
|
4024
4072
|
"tight",
|
|
@@ -4153,6 +4201,18 @@ const themeSchema = z.object({
|
|
|
4153
4201
|
styleGroups: z.record(z.string(), z.array(z.string())).optional()
|
|
4154
4202
|
});
|
|
4155
4203
|
//#endregion
|
|
4204
|
+
//#region ../theme-core/src/tokens/blockColorTokens.ts
|
|
4205
|
+
const blockColorTokenNameSet = new Set(blockColorTokenNames);
|
|
4206
|
+
function isBlockColorToken(value) {
|
|
4207
|
+
if (typeof value !== "string") return false;
|
|
4208
|
+
const parts = parseColorTokenParts(value);
|
|
4209
|
+
return parts.kind === "token" && blockColorTokenNameSet.has(parts.token);
|
|
4210
|
+
}
|
|
4211
|
+
function parseBlockColorToken(value) {
|
|
4212
|
+
if (!isBlockColorToken(value)) return null;
|
|
4213
|
+
return value.trim();
|
|
4214
|
+
}
|
|
4215
|
+
//#endregion
|
|
4156
4216
|
//#region ../theme-core/src/tokens/resolver.ts
|
|
4157
4217
|
/**
|
|
4158
4218
|
* Resolves theme tokens to CSS variables
|
|
@@ -4314,7 +4374,14 @@ const arrangementSlotNames = [
|
|
|
4314
4374
|
"controls",
|
|
4315
4375
|
"control",
|
|
4316
4376
|
"counter",
|
|
4317
|
-
"point"
|
|
4377
|
+
"point",
|
|
4378
|
+
"band",
|
|
4379
|
+
"main",
|
|
4380
|
+
"brand",
|
|
4381
|
+
"links",
|
|
4382
|
+
"details",
|
|
4383
|
+
"signup",
|
|
4384
|
+
"strip"
|
|
4318
4385
|
];
|
|
4319
4386
|
//#endregion
|
|
4320
4387
|
//#region ../theme-core/src/surfaces/logoVariant.ts
|
|
@@ -4463,6 +4530,7 @@ const lookKnobBlocks = {
|
|
|
4463
4530
|
showPhotos: cardListKnobBlocks,
|
|
4464
4531
|
cardMarker: cardListFamilyBlocks,
|
|
4465
4532
|
dates: "block.offerings-preview",
|
|
4533
|
+
grouping: "block.offerings-preview",
|
|
4466
4534
|
columns: "block.feature-cards",
|
|
4467
4535
|
listColumns: "block.event-calendar",
|
|
4468
4536
|
blackAndWhite: "block.image-gallery",
|
|
@@ -4663,8 +4731,13 @@ function defineCardListLook(id, name, arrangement, requires, knobs, input) {
|
|
|
4663
4731
|
blockKinds: cardListFamilyBlocks.filter((block) => requires.every((part) => cardListBlockParts[block].includes(part))),
|
|
4664
4732
|
structure: {
|
|
4665
4733
|
...base.structure,
|
|
4666
|
-
knobs: [
|
|
4734
|
+
knobs: [
|
|
4735
|
+
...base.structure.knobs,
|
|
4736
|
+
"dates",
|
|
4737
|
+
"grouping"
|
|
4738
|
+
],
|
|
4667
4739
|
knobDefaults: {
|
|
4740
|
+
grouping: "by-kind",
|
|
4668
4741
|
dates: arrangement === "cards" || arrangement === "plates" ? "next-dates" : "summary",
|
|
4669
4742
|
...base.structure.knobDefaults
|
|
4670
4743
|
},
|
|
@@ -4936,6 +5009,80 @@ function resolveBlockAppearancePresetDesign(preset, layoutProfile = null) {
|
|
|
4936
5009
|
* for a card role; the style owns its paint. Arrangement Looks own structure
|
|
4937
5010
|
* and never a section background. Removing an entry retires its pins to auto.
|
|
4938
5011
|
*/
|
|
5012
|
+
/** Shape knobs override the skin's ordinary photo frame. Corner choices keep its ratio. */
|
|
5013
|
+
const photoShapeFrames = [{
|
|
5014
|
+
knob: "imageShape",
|
|
5015
|
+
values: {
|
|
5016
|
+
circle: {
|
|
5017
|
+
kind: "fixed",
|
|
5018
|
+
aspectRatio: "1/1",
|
|
5019
|
+
borderRadius: "50%"
|
|
5020
|
+
},
|
|
5021
|
+
arch: {
|
|
5022
|
+
kind: "fixed",
|
|
5023
|
+
aspectRatio: "4/5",
|
|
5024
|
+
borderRadius: "9999px 9999px 0.125rem 0.125rem"
|
|
5025
|
+
}
|
|
5026
|
+
}
|
|
5027
|
+
}];
|
|
5028
|
+
const naturalPhotoFrame = {
|
|
5029
|
+
kind: "variable",
|
|
5030
|
+
because: "The photo keeps its own proportions.",
|
|
5031
|
+
aspectRatio: "auto"
|
|
5032
|
+
};
|
|
5033
|
+
const introPhotoFrames = {
|
|
5034
|
+
default: naturalPhotoFrame,
|
|
5035
|
+
bySkin: {
|
|
5036
|
+
haven: {
|
|
5037
|
+
kind: "fixed",
|
|
5038
|
+
aspectRatio: "1/1"
|
|
5039
|
+
},
|
|
5040
|
+
brook: {
|
|
5041
|
+
kind: "fixed",
|
|
5042
|
+
aspectRatio: "4/3"
|
|
5043
|
+
},
|
|
5044
|
+
orbit: {
|
|
5045
|
+
kind: "fixed",
|
|
5046
|
+
aspectRatio: "1/1",
|
|
5047
|
+
borderRadius: "50%"
|
|
5048
|
+
}
|
|
5049
|
+
},
|
|
5050
|
+
byKnob: photoShapeFrames
|
|
5051
|
+
};
|
|
5052
|
+
const mediaTextPhotoFrames = {
|
|
5053
|
+
default: naturalPhotoFrame,
|
|
5054
|
+
bySkin: {
|
|
5055
|
+
poster: {
|
|
5056
|
+
kind: "fixed",
|
|
5057
|
+
aspectRatio: "4/3"
|
|
5058
|
+
},
|
|
5059
|
+
poise: {
|
|
5060
|
+
kind: "fixed",
|
|
5061
|
+
aspectRatio: "4/5"
|
|
5062
|
+
},
|
|
5063
|
+
haven: {
|
|
5064
|
+
kind: "fixed",
|
|
5065
|
+
aspectRatio: "5/4"
|
|
5066
|
+
},
|
|
5067
|
+
loom: {
|
|
5068
|
+
kind: "fixed",
|
|
5069
|
+
aspectRatio: "3/2"
|
|
5070
|
+
},
|
|
5071
|
+
folio: {
|
|
5072
|
+
kind: "fixed",
|
|
5073
|
+
aspectRatio: "4/5"
|
|
5074
|
+
},
|
|
5075
|
+
brook: {
|
|
5076
|
+
kind: "fixed",
|
|
5077
|
+
aspectRatio: "4/3"
|
|
5078
|
+
},
|
|
5079
|
+
orbit: {
|
|
5080
|
+
kind: "fixed",
|
|
5081
|
+
aspectRatio: "4/3"
|
|
5082
|
+
}
|
|
5083
|
+
},
|
|
5084
|
+
byKnob: photoShapeFrames
|
|
5085
|
+
};
|
|
4939
5086
|
const brandScrimOptionGroups = [{
|
|
4940
5087
|
id: "image-surface-treatment",
|
|
4941
5088
|
label: "Photo tint",
|
|
@@ -5001,9 +5148,7 @@ const arrangementLookFits = {
|
|
|
5001
5148
|
"intro-photo-beside-text": { needs: ["photo"] },
|
|
5002
5149
|
"intro-large-photo-beside-text": { needs: ["photo"] }
|
|
5003
5150
|
};
|
|
5004
|
-
|
|
5005
|
-
//#region ../theme-core/src/site-styles/appearancePresetCatalog.ts
|
|
5006
|
-
const appearancePresets = [
|
|
5151
|
+
const blockAppearancePresets = [
|
|
5007
5152
|
defineBlockAppearancePreset({
|
|
5008
5153
|
structure: {
|
|
5009
5154
|
kind: "recipe",
|
|
@@ -5935,16 +6080,38 @@ const appearancePresets = [
|
|
|
5935
6080
|
])], { align: "center" }),
|
|
5936
6081
|
styleFallback: [id$1("newsletter-signup-text-beside")]
|
|
5937
6082
|
}),
|
|
5938
|
-
defineArrangementLook("image-gallery-square-tiles", "image-gallery", "Square tiles", "tiles", ["blackAndWhite"], {
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
6083
|
+
defineArrangementLook("image-gallery-square-tiles", "image-gallery", "Square tiles", "tiles", ["blackAndWhite"], {
|
|
6084
|
+
mediaFrame: { default: {
|
|
6085
|
+
kind: "fixed",
|
|
6086
|
+
aspectRatio: "1/1"
|
|
6087
|
+
} },
|
|
6088
|
+
thumbnail: sketch.page([
|
|
6089
|
+
sketch.title(.4),
|
|
6090
|
+
sketch.across(4, [sketch.photo("short")]),
|
|
6091
|
+
sketch.across(4, [sketch.photo("short")])
|
|
6092
|
+
])
|
|
6093
|
+
}),
|
|
5943
6094
|
defineArrangementLook("image-gallery-arched-captions", "image-gallery", "Arched photos with captions", "tiles", ["blackAndWhite"], {
|
|
6095
|
+
mediaFrame: {
|
|
6096
|
+
default: {
|
|
6097
|
+
kind: "fixed",
|
|
6098
|
+
aspectRatio: "1/1"
|
|
6099
|
+
},
|
|
6100
|
+
bySkin: { lantern: {
|
|
6101
|
+
kind: "fixed",
|
|
6102
|
+
aspectRatio: "3/4",
|
|
6103
|
+
borderRadius: "9999px 9999px 0 0"
|
|
6104
|
+
} }
|
|
6105
|
+
},
|
|
5944
6106
|
thumbnail: sketch.page([sketch.title(.4), sketch.across(3, [sketch.photo("tall", "arch"), sketch.text(1, .7)])]),
|
|
5945
6107
|
styleFallback: [id$1("image-gallery-square-tiles")]
|
|
5946
6108
|
}),
|
|
5947
6109
|
defineArrangementLook("media-text-circle-beside-text", "media-text", "Circle beside the text", "circle-beside", ["imagePosition"], {
|
|
6110
|
+
mediaFrame: { default: {
|
|
6111
|
+
kind: "fixed",
|
|
6112
|
+
aspectRatio: "1/1",
|
|
6113
|
+
borderRadius: "50%"
|
|
6114
|
+
} },
|
|
5948
6115
|
thumbnail: sketch.page([sketch.middle([sketch.photo("medium", "circle")], [sketch.title(.8), sketch.text(3)])]),
|
|
5949
6116
|
forcedKnobs: {
|
|
5950
6117
|
imageShape: "circle",
|
|
@@ -6380,6 +6547,7 @@ const appearancePresets = [
|
|
|
6380
6547
|
styleFallback: [id$1("intro-photo-beside-text")]
|
|
6381
6548
|
}),
|
|
6382
6549
|
defineArrangementLook("intro-photo-beside-text", "intro", "Small photo beside the text", "media-copy", ["imagePosition", "imageShape"], {
|
|
6550
|
+
mediaFrame: introPhotoFrames,
|
|
6383
6551
|
thumbnail: sketch.page([sketch.middle(sketch.weight(1, [sketch.photo("medium")]), sketch.weight(2, [sketch.title(.7), sketch.text(3)]))]),
|
|
6384
6552
|
whenMissing: [{
|
|
6385
6553
|
fact: "photo",
|
|
@@ -6387,6 +6555,7 @@ const appearancePresets = [
|
|
|
6387
6555
|
}]
|
|
6388
6556
|
}),
|
|
6389
6557
|
defineArrangementLook("intro-large-photo-beside-text", "intro", "Large photo beside the text", "media-copy", ["imagePosition"], {
|
|
6558
|
+
mediaFrame: { default: naturalPhotoFrame },
|
|
6390
6559
|
thumbnail: sketch.page([sketch.row(sketch.weight(1, [sketch.photo("tall")]), sketch.weight(1, [sketch.title(.7), sketch.text(5)]))]),
|
|
6391
6560
|
whenMissing: [{
|
|
6392
6561
|
fact: "photo",
|
|
@@ -6394,12 +6563,20 @@ const appearancePresets = [
|
|
|
6394
6563
|
}],
|
|
6395
6564
|
styleFallback: [id$1("intro-photo-beside-text")]
|
|
6396
6565
|
}),
|
|
6397
|
-
defineArrangementLook("media-text-photo-beside-text", "media-text", "Photo beside the text", "default", ["imagePosition", "imageShape"], {
|
|
6398
|
-
|
|
6399
|
-
sketch.
|
|
6400
|
-
|
|
6401
|
-
|
|
6566
|
+
defineArrangementLook("media-text-photo-beside-text", "media-text", "Photo beside the text", "default", ["imagePosition", "imageShape"], {
|
|
6567
|
+
mediaFrame: mediaTextPhotoFrames,
|
|
6568
|
+
thumbnail: sketch.page([sketch.middle([sketch.photo("tall")], [
|
|
6569
|
+
sketch.rule,
|
|
6570
|
+
sketch.title(.8),
|
|
6571
|
+
sketch.text(3)
|
|
6572
|
+
])])
|
|
6573
|
+
}),
|
|
6402
6574
|
defineArrangementLook("media-text-photo-to-edge", "media-text", "Photo to the edge", "default", ["imagePosition"], {
|
|
6575
|
+
mediaFrame: { default: {
|
|
6576
|
+
kind: "variable",
|
|
6577
|
+
because: "The photo fills the section height, which depends on the text and viewport.",
|
|
6578
|
+
aspectRatio: "auto"
|
|
6579
|
+
} },
|
|
6403
6580
|
thumbnail: sketch.page([sketch.row(sketch.weight(1, [
|
|
6404
6581
|
sketch.rule,
|
|
6405
6582
|
sketch.title(.8),
|
|
@@ -6448,6 +6625,7 @@ const appearancePresets = [
|
|
|
6448
6625
|
])])], { arrows: true })]),
|
|
6449
6626
|
itemRoles: { items: "card" },
|
|
6450
6627
|
slotRoles: { date: "highlight" },
|
|
6628
|
+
forcedKnobs: { grouping: "one-list" },
|
|
6451
6629
|
knobDefaults: {
|
|
6452
6630
|
actionStyle: "button",
|
|
6453
6631
|
dates: "summary"
|
|
@@ -6467,6 +6645,7 @@ const appearancePresets = [
|
|
|
6467
6645
|
])], { overflow: true })]),
|
|
6468
6646
|
itemRoles: { items: "card" },
|
|
6469
6647
|
slotRoles: { date: "highlight" },
|
|
6648
|
+
forcedKnobs: { grouping: "one-list" },
|
|
6470
6649
|
knobDefaults: {
|
|
6471
6650
|
actionStyle: "button",
|
|
6472
6651
|
dates: "summary"
|
|
@@ -6510,18 +6689,58 @@ const appearancePresets = [
|
|
|
6510
6689
|
styleFallback: [id$1("faq-questions-two-columns")]
|
|
6511
6690
|
}),
|
|
6512
6691
|
defineArrangementLook("image-gallery-lead-photo", "image-gallery", "One large photo, then smaller ones", "tiles", ["blackAndWhite"], {
|
|
6692
|
+
mediaFrame: { default: {
|
|
6693
|
+
kind: "variable",
|
|
6694
|
+
because: "The lead fills two rows; on phones the lead and a trailing full-width tile are landscape.",
|
|
6695
|
+
aspectRatio: "1/1",
|
|
6696
|
+
firstAspectRatio: "auto",
|
|
6697
|
+
mobileAspectRatio: "4/3"
|
|
6698
|
+
} },
|
|
6513
6699
|
thumbnail: sketch.page([sketch.row(sketch.weight(2, [sketch.photo("tall")]), sketch.weight(1, [sketch.photo("short"), sketch.photo("short")]))]),
|
|
6514
6700
|
styleFallback: [id$1("image-gallery-square-tiles")]
|
|
6515
6701
|
}),
|
|
6516
6702
|
defineArrangementLook("image-gallery-captions-under", "image-gallery", "Photos with captions underneath", "tiles", ["blackAndWhite"], {
|
|
6703
|
+
mediaFrame: {
|
|
6704
|
+
default: {
|
|
6705
|
+
kind: "fixed",
|
|
6706
|
+
aspectRatio: "4/3"
|
|
6707
|
+
},
|
|
6708
|
+
bySkin: { loom: {
|
|
6709
|
+
kind: "fixed",
|
|
6710
|
+
aspectRatio: "1/1"
|
|
6711
|
+
} }
|
|
6712
|
+
},
|
|
6517
6713
|
thumbnail: sketch.page([sketch.title(.4), sketch.across(3, [sketch.photo("medium"), sketch.text(1, .8)])]),
|
|
6518
6714
|
styleFallback: [id$1("image-gallery-arched-captions"), id$1("image-gallery-square-tiles")]
|
|
6519
6715
|
}),
|
|
6520
6716
|
defineArrangementLook("image-gallery-photo-band", "image-gallery", "One photo across the page", "tiles", ["blackAndWhite"], {
|
|
6717
|
+
mediaFrame: {
|
|
6718
|
+
default: {
|
|
6719
|
+
kind: "fixed",
|
|
6720
|
+
aspectRatio: "1/1"
|
|
6721
|
+
},
|
|
6722
|
+
bySkin: { orbit: {
|
|
6723
|
+
kind: "variable",
|
|
6724
|
+
because: "The full-width band has a clamped height and curved edges.",
|
|
6725
|
+
aspectRatio: "auto",
|
|
6726
|
+
height: "clamp(18rem, 38cqi, 36rem)"
|
|
6727
|
+
} }
|
|
6728
|
+
},
|
|
6521
6729
|
thumbnail: sketch.band([sketch.photo("short")]),
|
|
6522
6730
|
styleFallback: [id$1("image-gallery-square-tiles")]
|
|
6523
6731
|
}),
|
|
6524
6732
|
defineArrangementLook("image-gallery-moving-row", "image-gallery", "A moving row of photos", "moving-row", ["blackAndWhite"], {
|
|
6733
|
+
mediaFrame: {
|
|
6734
|
+
default: {
|
|
6735
|
+
kind: "fixed",
|
|
6736
|
+
aspectRatio: "1/1"
|
|
6737
|
+
},
|
|
6738
|
+
bySkin: { orbit: {
|
|
6739
|
+
kind: "fixed",
|
|
6740
|
+
aspectRatio: "1/1",
|
|
6741
|
+
borderRadius: "50%"
|
|
6742
|
+
} }
|
|
6743
|
+
},
|
|
6525
6744
|
thumbnail: sketch.band([sketch.across(5, [sketch.photo("short")], { overflow: true })]),
|
|
6526
6745
|
styleFallback: [id$1("image-gallery-square-tiles")]
|
|
6527
6746
|
}),
|
|
@@ -6742,7 +6961,10 @@ const appearancePresets = [
|
|
|
6742
6961
|
sketch.button
|
|
6743
6962
|
])])]),
|
|
6744
6963
|
knobDefaults: { actionStyle: "button" },
|
|
6745
|
-
forcedKnobs: {
|
|
6964
|
+
forcedKnobs: {
|
|
6965
|
+
dates: "summary",
|
|
6966
|
+
grouping: "by-kind"
|
|
6967
|
+
},
|
|
6746
6968
|
styleFallback: [id$1("card-list-photos-on-top")]
|
|
6747
6969
|
}),
|
|
6748
6970
|
blockKinds: ["block.offerings-preview"]
|
|
@@ -6760,6 +6982,7 @@ const appearancePresets = [
|
|
|
6760
6982
|
sketch.link
|
|
6761
6983
|
])])]),
|
|
6762
6984
|
itemRoles: { items: "card" },
|
|
6985
|
+
forcedKnobs: { grouping: "by-kind" },
|
|
6763
6986
|
styleFallback: [id$1("card-list-photos-on-top")]
|
|
6764
6987
|
}),
|
|
6765
6988
|
blockKinds: ["block.offerings-preview"]
|
|
@@ -6772,6 +6995,7 @@ const appearancePresets = [
|
|
|
6772
6995
|
], [], {
|
|
6773
6996
|
thumbnail: sketch.page([sketch.title(.4), sketch.across(2, [sketch.panel([sketch.title(.5, "small"), sketch.down(3, [sketch.row(sketch.weight(1, [sketch.title(.6, "small")]), sketch.weight(3, [sketch.text(2, .8)]))], { ruled: true })])])]),
|
|
6774
6997
|
slotRoles: { panel: "card" },
|
|
6998
|
+
forcedKnobs: { grouping: "by-kind" },
|
|
6775
6999
|
knobDefaults: { dates: "summary" },
|
|
6776
7000
|
styleFallback: [id$1("feature-cards-index")]
|
|
6777
7001
|
}),
|
|
@@ -6779,6 +7003,9 @@ const appearancePresets = [
|
|
|
6779
7003
|
}
|
|
6780
7004
|
];
|
|
6781
7005
|
//#endregion
|
|
7006
|
+
//#region ../theme-core/src/site-styles/appearancePresetCatalog.ts
|
|
7007
|
+
const appearancePresets = blockAppearancePresets;
|
|
7008
|
+
//#endregion
|
|
6782
7009
|
//#region ../theme-core/src/site-styles/rawStyleFields.ts
|
|
6783
7010
|
const themeV2RuntimeStyleFieldNames = [
|
|
6784
7011
|
"_frameStyles",
|
|
@@ -9637,8 +9864,8 @@ function footerForegroundCandidates(footer, proseHoverCandidate) {
|
|
|
9637
9864
|
if (!footer) return {};
|
|
9638
9865
|
const style = effectiveFooterNavLinkStyle(footer);
|
|
9639
9866
|
return {
|
|
9640
|
-
text: footer.
|
|
9641
|
-
link: style?.colorToken ?? footer.navColor ?? footer.
|
|
9867
|
+
text: footer.bands?.main.textColor ?? (footer.layout === "centred" ? "text" : void 0),
|
|
9868
|
+
link: style?.colorToken ?? footer.navColor ?? footer.bands?.main.textColor,
|
|
9642
9869
|
linkHover: navLinkOwnsHoverForeground(style) ? proseHoverCandidate : navLinkHoverColorCandidate(style)
|
|
9643
9870
|
};
|
|
9644
9871
|
}
|
|
@@ -9708,15 +9935,14 @@ function generateFooterNavLinkStyles(footer, themeId, tokens, theme) {
|
|
|
9708
9935
|
theme,
|
|
9709
9936
|
style,
|
|
9710
9937
|
className: "footer-nav-link",
|
|
9711
|
-
surfaceDependent: true
|
|
9712
|
-
surfaceRestingColor: footer.background?.contentOwner === siteChromeBackgroundOverrideOwner
|
|
9938
|
+
surfaceDependent: true
|
|
9713
9939
|
});
|
|
9714
9940
|
}
|
|
9715
9941
|
function generateFooterBottomTextLinkStyles(footer, themeId, tokens) {
|
|
9716
9942
|
const style = footer.bottomTextLinkStyle;
|
|
9717
9943
|
if (!style) return "";
|
|
9718
9944
|
const scope = `:where([data-theme-scope="${themeId}"])`;
|
|
9719
|
-
const selectors = [`${scope} .block-site-footer [data-
|
|
9945
|
+
const selectors = [`${scope} .block-site-footer [data-slot="base"] .rb-prose a`, `${scope} .block-siteFooter [data-slot="base"] .rb-prose a`];
|
|
9720
9946
|
const baseRules = [];
|
|
9721
9947
|
const decorationColorToken = style.decorationColorToken?.trim();
|
|
9722
9948
|
if (decorationColorToken) baseRules.push(`text-decoration-color: ${tokens.getColor(decorationColorToken)};`);
|
|
@@ -9728,20 +9954,29 @@ function generateFooterBottomTextLinkStyles(footer, themeId, tokens) {
|
|
|
9728
9954
|
}
|
|
9729
9955
|
//#endregion
|
|
9730
9956
|
//#region ../theme-core/src/site-styles/footerLookRecipe.ts
|
|
9957
|
+
const footerSideBands = [
|
|
9958
|
+
"band",
|
|
9959
|
+
"strip",
|
|
9960
|
+
"base"
|
|
9961
|
+
];
|
|
9731
9962
|
/** Reject undeclared references when the curated catalogue is loaded, before rendering. */
|
|
9732
9963
|
function validateFooterRecipeSurfaces(style, recipe) {
|
|
9733
|
-
[recipe.
|
|
9964
|
+
[recipe.bands.main, ...footerSideBands.flatMap((band) => recipe.bands[band] ?? [])].forEach(({ ground }) => {
|
|
9734
9965
|
if (ground.kind === "style-surface" && (style.looks.kind !== "offers" || !style.looks.surfaces[ground.surface])) throw new Error(`Undeclared footer surface: ${ground.surface}`);
|
|
9735
9966
|
});
|
|
9736
9967
|
}
|
|
9737
9968
|
//#endregion
|
|
9738
9969
|
//#region ../theme-core/src/site-styles/footerLookDefaults.ts
|
|
9739
9970
|
const defaultFooterLookRecipes = {
|
|
9740
|
-
"footer-centred
|
|
9741
|
-
|
|
9742
|
-
|
|
9743
|
-
|
|
9744
|
-
|
|
9971
|
+
"footer-centred": {
|
|
9972
|
+
bands: {
|
|
9973
|
+
main: { ground: {
|
|
9974
|
+
kind: "token",
|
|
9975
|
+
token: "surface"
|
|
9976
|
+
} },
|
|
9977
|
+
band: null,
|
|
9978
|
+
strip: null,
|
|
9979
|
+
base: null
|
|
9745
9980
|
},
|
|
9746
9981
|
nav: {
|
|
9747
9982
|
weight: "regular",
|
|
@@ -9749,14 +9984,17 @@ const defaultFooterLookRecipes = {
|
|
|
9749
9984
|
hoverColorToken: "primary",
|
|
9750
9985
|
typography: "body"
|
|
9751
9986
|
},
|
|
9752
|
-
|
|
9753
|
-
brandAlign: "center"
|
|
9987
|
+
edges: []
|
|
9754
9988
|
},
|
|
9755
|
-
"footer-links
|
|
9756
|
-
|
|
9757
|
-
|
|
9758
|
-
|
|
9759
|
-
|
|
9989
|
+
"footer-beside-links": {
|
|
9990
|
+
bands: {
|
|
9991
|
+
main: { ground: {
|
|
9992
|
+
kind: "token",
|
|
9993
|
+
token: "surface"
|
|
9994
|
+
} },
|
|
9995
|
+
band: null,
|
|
9996
|
+
strip: null,
|
|
9997
|
+
base: null
|
|
9760
9998
|
},
|
|
9761
9999
|
nav: {
|
|
9762
10000
|
weight: "regular",
|
|
@@ -9764,8 +10002,25 @@ const defaultFooterLookRecipes = {
|
|
|
9764
10002
|
hoverColorToken: "primary",
|
|
9765
10003
|
typography: "body"
|
|
9766
10004
|
},
|
|
9767
|
-
|
|
9768
|
-
|
|
10005
|
+
edges: []
|
|
10006
|
+
},
|
|
10007
|
+
"footer-compact": {
|
|
10008
|
+
bands: {
|
|
10009
|
+
main: { ground: {
|
|
10010
|
+
kind: "token",
|
|
10011
|
+
token: "surface"
|
|
10012
|
+
} },
|
|
10013
|
+
band: null,
|
|
10014
|
+
strip: null,
|
|
10015
|
+
base: null
|
|
10016
|
+
},
|
|
10017
|
+
nav: {
|
|
10018
|
+
weight: "regular",
|
|
10019
|
+
colorToken: "text",
|
|
10020
|
+
hoverColorToken: "primary",
|
|
10021
|
+
typography: "body"
|
|
10022
|
+
},
|
|
10023
|
+
edges: []
|
|
9769
10024
|
}
|
|
9770
10025
|
};
|
|
9771
10026
|
/** A whole authored recipe replaces the default; facets are never deep-merged. */
|
|
@@ -21216,6 +21471,26 @@ function defineHeaderCuration(input) {
|
|
|
21216
21471
|
const [first, ...remaining] = input;
|
|
21217
21472
|
return [toEntry(first), ...remaining.map(toEntry)];
|
|
21218
21473
|
}
|
|
21474
|
+
/** A brand-coloured bar in the style's own type: its navigation keeps sentence case rather than the catalogue's capitals. */
|
|
21475
|
+
const sentenceCaseBrandBar = {
|
|
21476
|
+
tone: "brand",
|
|
21477
|
+
dropdown: brandHeaderDropdown,
|
|
21478
|
+
background: {
|
|
21479
|
+
kind: "token",
|
|
21480
|
+
token: "primary"
|
|
21481
|
+
},
|
|
21482
|
+
nav: {
|
|
21483
|
+
kind: "minimal",
|
|
21484
|
+
hoverColorToken: "secondary"
|
|
21485
|
+
},
|
|
21486
|
+
navWeight: "semibold",
|
|
21487
|
+
navLinkWeight: "medium",
|
|
21488
|
+
navTypography: "plain",
|
|
21489
|
+
border: "none",
|
|
21490
|
+
shadow: { kind: "absent" },
|
|
21491
|
+
frame: { kind: "none" },
|
|
21492
|
+
cta: { treatment: "inverted" }
|
|
21493
|
+
};
|
|
21219
21494
|
const headerCurationBySiteStyle = {
|
|
21220
21495
|
"site-style:loom": defineHeaderCuration([{
|
|
21221
21496
|
layoutId: "classic",
|
|
@@ -21267,6 +21542,7 @@ const headerCurationBySiteStyle = {
|
|
|
21267
21542
|
"site-style:fulcrum": defineHeaderCuration([{
|
|
21268
21543
|
layoutId: "classic",
|
|
21269
21544
|
styleIds: [
|
|
21545
|
+
"brand-bar",
|
|
21270
21546
|
"fine-line",
|
|
21271
21547
|
"minimal",
|
|
21272
21548
|
"serif-line",
|
|
@@ -21334,7 +21610,11 @@ const headerCurationBySiteStyle = {
|
|
|
21334
21610
|
]),
|
|
21335
21611
|
"site-style:measure": defineHeaderCuration([{
|
|
21336
21612
|
layoutId: "classic",
|
|
21337
|
-
styleIds: [
|
|
21613
|
+
styleIds: [
|
|
21614
|
+
"brand-bar",
|
|
21615
|
+
"fine-line",
|
|
21616
|
+
"minimal"
|
|
21617
|
+
]
|
|
21338
21618
|
}])
|
|
21339
21619
|
};
|
|
21340
21620
|
/** Optional authored overrides remain absent when the catalogue did not supply them. */
|
|
@@ -25882,6 +26162,195 @@ const measureLooks = {
|
|
|
25882
26162
|
],
|
|
25883
26163
|
ownLayoutBlocks
|
|
25884
26164
|
};
|
|
26165
|
+
/** The layouts a style offers (the first is its default), all dressed by one recipe. */
|
|
26166
|
+
function styleFooter(offers, recipe) {
|
|
26167
|
+
return {
|
|
26168
|
+
footerLookRecipes: Object.fromEntries(offers.map((lookId) => [lookId, recipe])),
|
|
26169
|
+
recommendedFooterLookIds: offers
|
|
26170
|
+
};
|
|
26171
|
+
}
|
|
26172
|
+
const footerSurface = (surface) => ({ ground: {
|
|
26173
|
+
kind: "style-surface",
|
|
26174
|
+
surface
|
|
26175
|
+
} });
|
|
26176
|
+
const footerToken = (token) => ({ ground: {
|
|
26177
|
+
kind: "token",
|
|
26178
|
+
token
|
|
26179
|
+
} });
|
|
26180
|
+
/** Orbit: the brand colour under the arc, the signup band and base strip in the darker band colour. */
|
|
26181
|
+
const orbitFooter = styleFooter(["footer-beside-links", "footer-compact"], {
|
|
26182
|
+
bands: {
|
|
26183
|
+
band: footerSurface("deep"),
|
|
26184
|
+
main: footerSurface("brand"),
|
|
26185
|
+
strip: null,
|
|
26186
|
+
base: footerSurface("deep")
|
|
26187
|
+
},
|
|
26188
|
+
nav: {
|
|
26189
|
+
weight: "regular",
|
|
26190
|
+
colorToken: "primaryForeground",
|
|
26191
|
+
hoverColorToken: "primaryForeground",
|
|
26192
|
+
typography: "body"
|
|
26193
|
+
},
|
|
26194
|
+
brandLogoSize: "md",
|
|
26195
|
+
edges: ["arc-edge-echo"]
|
|
26196
|
+
});
|
|
26197
|
+
/** Lantern: the near-black deep ground, a slightly lifted details strip, and rules rather than bands elsewhere. */
|
|
26198
|
+
const lanternFooter = styleFooter(["footer-centred", "footer-compact"], {
|
|
26199
|
+
bands: {
|
|
26200
|
+
band: null,
|
|
26201
|
+
main: footerSurface("deep"),
|
|
26202
|
+
strip: footerToken("secondary-900"),
|
|
26203
|
+
base: null
|
|
26204
|
+
},
|
|
26205
|
+
nav: {
|
|
26206
|
+
weight: "regular",
|
|
26207
|
+
colorToken: "text",
|
|
26208
|
+
hoverColorToken: "primary",
|
|
26209
|
+
typography: "heading"
|
|
26210
|
+
},
|
|
26211
|
+
edges: []
|
|
26212
|
+
});
|
|
26213
|
+
/** Poster: flat blocks of colour, the pop colour for the signup band, the brand block, a deeper brand strip and an ink base. */
|
|
26214
|
+
const posterFooter = styleFooter(["footer-beside-links", "footer-compact"], {
|
|
26215
|
+
bands: {
|
|
26216
|
+
band: footerSurface("pop"),
|
|
26217
|
+
main: footerSurface("brand"),
|
|
26218
|
+
strip: footerToken("primary-800"),
|
|
26219
|
+
base: footerSurface("inverse")
|
|
26220
|
+
},
|
|
26221
|
+
nav: {
|
|
26222
|
+
weight: "medium",
|
|
26223
|
+
colorToken: "primaryForeground",
|
|
26224
|
+
hoverColorToken: "primaryForeground",
|
|
26225
|
+
typography: "body"
|
|
26226
|
+
},
|
|
26227
|
+
edges: []
|
|
26228
|
+
});
|
|
26229
|
+
/** Haven: the soft band colour, the signup on a sheet (the skin sets it in as a rounded card), a page-colour strip and the wash for the base. */
|
|
26230
|
+
const havenFooter = styleFooter([
|
|
26231
|
+
"footer-beside-links",
|
|
26232
|
+
"footer-centred",
|
|
26233
|
+
"footer-compact"
|
|
26234
|
+
], {
|
|
26235
|
+
bands: {
|
|
26236
|
+
band: footerSurface("sheet"),
|
|
26237
|
+
main: footerSurface("band"),
|
|
26238
|
+
strip: footerSurface("base"),
|
|
26239
|
+
base: footerSurface("deep")
|
|
26240
|
+
},
|
|
26241
|
+
nav: {
|
|
26242
|
+
weight: "regular",
|
|
26243
|
+
colorToken: "text",
|
|
26244
|
+
hoverColorToken: "text",
|
|
26245
|
+
typography: "body"
|
|
26246
|
+
},
|
|
26247
|
+
brandLogoSize: "md",
|
|
26248
|
+
edges: ["wave-edge-gentle"]
|
|
26249
|
+
});
|
|
26250
|
+
/** Brook: a dark shade of the secondary colour under the wave, the accent for the signup band, and a deeper shade for the strip and base. */
|
|
26251
|
+
const brookFooter = styleFooter([
|
|
26252
|
+
"footer-beside-links",
|
|
26253
|
+
"footer-centred",
|
|
26254
|
+
"footer-compact"
|
|
26255
|
+
], {
|
|
26256
|
+
bands: {
|
|
26257
|
+
band: footerToken("accent"),
|
|
26258
|
+
main: footerToken("secondary-800"),
|
|
26259
|
+
strip: footerToken("secondary-900"),
|
|
26260
|
+
base: footerToken("secondary-900")
|
|
26261
|
+
},
|
|
26262
|
+
nav: {
|
|
26263
|
+
weight: "regular",
|
|
26264
|
+
colorToken: "background",
|
|
26265
|
+
hoverColorToken: "background",
|
|
26266
|
+
typography: "body"
|
|
26267
|
+
},
|
|
26268
|
+
brandLogoSize: "md",
|
|
26269
|
+
edges: ["wave-edge-balanced"]
|
|
26270
|
+
});
|
|
26271
|
+
/** Fulcrum: one quiet tinted ground, with hairlines rather than bands between the areas. */
|
|
26272
|
+
const fulcrumFooter = styleFooter(["footer-beside-links", "footer-compact"], {
|
|
26273
|
+
bands: {
|
|
26274
|
+
band: null,
|
|
26275
|
+
main: footerSurface("band"),
|
|
26276
|
+
strip: null,
|
|
26277
|
+
base: null
|
|
26278
|
+
},
|
|
26279
|
+
nav: {
|
|
26280
|
+
weight: "regular",
|
|
26281
|
+
colorToken: "text",
|
|
26282
|
+
hoverColorToken: "primary",
|
|
26283
|
+
typography: "body"
|
|
26284
|
+
},
|
|
26285
|
+
edges: []
|
|
26286
|
+
});
|
|
26287
|
+
/** Measure: the page ground, opened by the heavy rule every section has (in the skin). */
|
|
26288
|
+
const measureFooter = styleFooter(["footer-beside-links", "footer-compact"], {
|
|
26289
|
+
bands: {
|
|
26290
|
+
band: null,
|
|
26291
|
+
main: footerSurface("base"),
|
|
26292
|
+
strip: null,
|
|
26293
|
+
base: null
|
|
26294
|
+
},
|
|
26295
|
+
nav: {
|
|
26296
|
+
weight: "regular",
|
|
26297
|
+
colorToken: "text",
|
|
26298
|
+
hoverColorToken: "text",
|
|
26299
|
+
typography: "body"
|
|
26300
|
+
},
|
|
26301
|
+
edges: []
|
|
26302
|
+
});
|
|
26303
|
+
/** Folio: a quiet tinted ground with thin rules between the areas. */
|
|
26304
|
+
const folioFooter = styleFooter(["footer-beside-links", "footer-compact"], {
|
|
26305
|
+
bands: {
|
|
26306
|
+
band: null,
|
|
26307
|
+
main: footerSurface("band"),
|
|
26308
|
+
strip: null,
|
|
26309
|
+
base: null
|
|
26310
|
+
},
|
|
26311
|
+
nav: {
|
|
26312
|
+
weight: "regular",
|
|
26313
|
+
colorToken: "text",
|
|
26314
|
+
hoverColorToken: "primary",
|
|
26315
|
+
typography: "body"
|
|
26316
|
+
},
|
|
26317
|
+
brandLogoSize: "md",
|
|
26318
|
+
edges: []
|
|
26319
|
+
});
|
|
26320
|
+
/** Loom: the deep ground, with the brand colour as the one strong patch behind the signup. */
|
|
26321
|
+
const loomFooter = styleFooter(["footer-beside-links", "footer-compact"], {
|
|
26322
|
+
bands: {
|
|
26323
|
+
band: footerSurface("brand"),
|
|
26324
|
+
main: footerSurface("deep"),
|
|
26325
|
+
strip: null,
|
|
26326
|
+
base: null
|
|
26327
|
+
},
|
|
26328
|
+
nav: {
|
|
26329
|
+
weight: "regular",
|
|
26330
|
+
colorToken: "primaryForeground",
|
|
26331
|
+
hoverColorToken: "primaryForeground",
|
|
26332
|
+
typography: "body"
|
|
26333
|
+
},
|
|
26334
|
+
brandLogoSize: "md",
|
|
26335
|
+
edges: []
|
|
26336
|
+
});
|
|
26337
|
+
/** Poise: the inverse ground, drawn by the skin as a rounded field set in from the page edge like its inverse sections. */
|
|
26338
|
+
const poiseFooter = styleFooter(["footer-beside-links", "footer-compact"], {
|
|
26339
|
+
bands: {
|
|
26340
|
+
band: null,
|
|
26341
|
+
main: footerSurface("inverse"),
|
|
26342
|
+
strip: null,
|
|
26343
|
+
base: null
|
|
26344
|
+
},
|
|
26345
|
+
nav: {
|
|
26346
|
+
weight: "semibold",
|
|
26347
|
+
colorToken: "background",
|
|
26348
|
+
hoverColorToken: "background",
|
|
26349
|
+
typography: "body"
|
|
26350
|
+
},
|
|
26351
|
+
brandLogoSize: "md",
|
|
26352
|
+
edges: []
|
|
26353
|
+
});
|
|
25885
26354
|
const curatedSiteStyles = [
|
|
25886
26355
|
defineCuratedSiteStyle({
|
|
25887
26356
|
id: "site-style:south-west-twerk-school",
|
|
@@ -25935,11 +26404,21 @@ const curatedSiteStyles = [
|
|
|
25935
26404
|
join: asBoundaryOptionId("break:wave")
|
|
25936
26405
|
}]
|
|
25937
26406
|
},
|
|
25938
|
-
footerLookRecipes: { "footer-links
|
|
25939
|
-
|
|
25940
|
-
|
|
25941
|
-
|
|
25942
|
-
|
|
26407
|
+
footerLookRecipes: { "footer-beside-links": {
|
|
26408
|
+
bands: {
|
|
26409
|
+
main: { ground: {
|
|
26410
|
+
kind: "token",
|
|
26411
|
+
token: "primary-800"
|
|
26412
|
+
} },
|
|
26413
|
+
band: null,
|
|
26414
|
+
strip: null,
|
|
26415
|
+
base: {
|
|
26416
|
+
ground: {
|
|
26417
|
+
kind: "token",
|
|
26418
|
+
token: "primary-900"
|
|
26419
|
+
},
|
|
26420
|
+
textColor: "primaryForeground"
|
|
26421
|
+
}
|
|
25943
26422
|
},
|
|
25944
26423
|
nav: {
|
|
25945
26424
|
weight: "medium",
|
|
@@ -25947,28 +26426,14 @@ const curatedSiteStyles = [
|
|
|
25947
26426
|
hoverColorToken: "secondary",
|
|
25948
26427
|
typography: "body"
|
|
25949
26428
|
},
|
|
25950
|
-
|
|
25951
|
-
|
|
25952
|
-
|
|
25953
|
-
background: {
|
|
25954
|
-
kind: "token",
|
|
25955
|
-
token: "primary-900"
|
|
25956
|
-
},
|
|
25957
|
-
textColor: "primaryForeground",
|
|
25958
|
-
textAlign: "center",
|
|
25959
|
-
paddingY: "compact",
|
|
25960
|
-
paddingX: "default",
|
|
25961
|
-
borderTop: { width: "none" }
|
|
25962
|
-
},
|
|
25963
|
-
linkStyle: {
|
|
25964
|
-
colorToken: "secondary",
|
|
25965
|
-
decorationColorToken: "secondary"
|
|
25966
|
-
}
|
|
26429
|
+
legalLinkStyle: {
|
|
26430
|
+
colorToken: "secondary",
|
|
26431
|
+
decorationColorToken: "secondary"
|
|
25967
26432
|
},
|
|
25968
|
-
|
|
26433
|
+
edges: [],
|
|
25969
26434
|
brandLogoSize: "sm"
|
|
25970
26435
|
} },
|
|
25971
|
-
recommendedFooterLookIds: ["footer-links
|
|
26436
|
+
recommendedFooterLookIds: ["footer-beside-links"],
|
|
25972
26437
|
buttonStyleChoices: [
|
|
25973
26438
|
buttonChoice("showtime-pill"),
|
|
25974
26439
|
buttonChoice("confident-chip"),
|
|
@@ -26030,7 +26495,8 @@ const curatedSiteStyles = [
|
|
|
26030
26495
|
},
|
|
26031
26496
|
testimonialQuote: serifDisplayQuote
|
|
26032
26497
|
},
|
|
26033
|
-
|
|
26498
|
+
headerStyleRecipes: { "brand-bar": sentenceCaseBrandBar },
|
|
26499
|
+
...fulcrumFooter,
|
|
26034
26500
|
buttonStyleChoices: [
|
|
26035
26501
|
buttonChoice("fulcrum"),
|
|
26036
26502
|
buttonChoice("editorial-link"),
|
|
@@ -26073,22 +26539,7 @@ const curatedSiteStyles = [
|
|
|
26073
26539
|
accordions: boldBorderedAccordionSystem,
|
|
26074
26540
|
testimonialQuote: accentGlyphQuote
|
|
26075
26541
|
},
|
|
26076
|
-
|
|
26077
|
-
arrangement: "simple",
|
|
26078
|
-
ground: {
|
|
26079
|
-
kind: "token",
|
|
26080
|
-
token: "surface"
|
|
26081
|
-
},
|
|
26082
|
-
nav: {
|
|
26083
|
-
weight: "medium",
|
|
26084
|
-
colorToken: "text",
|
|
26085
|
-
hoverColorToken: "primary",
|
|
26086
|
-
typography: "body"
|
|
26087
|
-
},
|
|
26088
|
-
legal: { bar: null },
|
|
26089
|
-
brandAlign: "start"
|
|
26090
|
-
} },
|
|
26091
|
-
recommendedFooterLookIds: ["footer-links-row"],
|
|
26542
|
+
...posterFooter,
|
|
26092
26543
|
buttonStyleChoices: [
|
|
26093
26544
|
buttonChoice("offset-block"),
|
|
26094
26545
|
buttonChoice("ink-stamp"),
|
|
@@ -26128,22 +26579,7 @@ const curatedSiteStyles = [
|
|
|
26128
26579
|
accordions: warmInsetAccordionSystem,
|
|
26129
26580
|
testimonialQuote: serifDisplayQuote
|
|
26130
26581
|
},
|
|
26131
|
-
|
|
26132
|
-
arrangement: "centred",
|
|
26133
|
-
ground: {
|
|
26134
|
-
kind: "style-surface",
|
|
26135
|
-
surface: "deep"
|
|
26136
|
-
},
|
|
26137
|
-
nav: {
|
|
26138
|
-
weight: "regular",
|
|
26139
|
-
colorToken: "text",
|
|
26140
|
-
hoverColorToken: "primary",
|
|
26141
|
-
typography: "heading"
|
|
26142
|
-
},
|
|
26143
|
-
legal: { bar: null },
|
|
26144
|
-
brandAlign: "center"
|
|
26145
|
-
} },
|
|
26146
|
-
recommendedFooterLookIds: ["footer-centred-name", "footer-links-row"],
|
|
26582
|
+
...lanternFooter,
|
|
26147
26583
|
buttonStyleChoices: [
|
|
26148
26584
|
buttonChoice("gilt-slab"),
|
|
26149
26585
|
buttonChoice("hairline-tab"),
|
|
@@ -26186,7 +26622,8 @@ const curatedSiteStyles = [
|
|
|
26186
26622
|
accordions: editorialDividedAccordionSystem,
|
|
26187
26623
|
testimonialQuote: serifDisplayQuote
|
|
26188
26624
|
},
|
|
26189
|
-
|
|
26625
|
+
headerStyleRecipes: { "brand-bar": sentenceCaseBrandBar },
|
|
26626
|
+
...measureFooter,
|
|
26190
26627
|
buttonStyleChoices: [
|
|
26191
26628
|
buttonChoice("flat-ink", void 0, { corners: "square" }),
|
|
26192
26629
|
buttonChoice("editorial-link"),
|
|
@@ -26205,7 +26642,7 @@ const curatedSiteStyles = [
|
|
|
26205
26642
|
kind: "public",
|
|
26206
26643
|
generation: { kind: "explicit_only" }
|
|
26207
26644
|
},
|
|
26208
|
-
description: "Calm and editorial: a classic serif over a plain sans, soft corners, thin rules and photos with room around them. For
|
|
26645
|
+
description: "Calm and editorial: a classic serif over a plain sans, soft corners, thin rules and photos with room around them. For people who teach classes, see clients and run workshops.",
|
|
26209
26646
|
generationBrief: "Use restrained serif headings, clear sans-serif body copy, natural photography, practical calls to action and concrete class and workshop details.",
|
|
26210
26647
|
headingDecoration: noHeadingDecoration,
|
|
26211
26648
|
tokenRecipes: {
|
|
@@ -26254,34 +26691,7 @@ const curatedSiteStyles = [
|
|
|
26254
26691
|
cta: { treatment: "default" },
|
|
26255
26692
|
openingPlacement: "photo-behind-text"
|
|
26256
26693
|
} },
|
|
26257
|
-
|
|
26258
|
-
arrangement: "simple",
|
|
26259
|
-
ground: {
|
|
26260
|
-
kind: "token",
|
|
26261
|
-
token: "surface"
|
|
26262
|
-
},
|
|
26263
|
-
nav: {
|
|
26264
|
-
weight: "regular",
|
|
26265
|
-
colorToken: "text",
|
|
26266
|
-
hoverColorToken: "primary",
|
|
26267
|
-
typography: "body"
|
|
26268
|
-
},
|
|
26269
|
-
legal: { bar: {
|
|
26270
|
-
fullBleed: false,
|
|
26271
|
-
background: {
|
|
26272
|
-
kind: "token",
|
|
26273
|
-
token: "surface"
|
|
26274
|
-
},
|
|
26275
|
-
textColor: "text",
|
|
26276
|
-
textAlign: "left",
|
|
26277
|
-
paddingY: "tight",
|
|
26278
|
-
paddingX: "none",
|
|
26279
|
-
borderTop: { width: "none" }
|
|
26280
|
-
} },
|
|
26281
|
-
brandAlign: "start",
|
|
26282
|
-
brandLogoSize: "md"
|
|
26283
|
-
} },
|
|
26284
|
-
recommendedFooterLookIds: ["footer-links-row"],
|
|
26694
|
+
...folioFooter,
|
|
26285
26695
|
buttonStyleChoices: [
|
|
26286
26696
|
buttonChoice("quiet-arrow", void 0, {
|
|
26287
26697
|
secondaryTreatment: "solid-accent",
|
|
@@ -26351,37 +26761,7 @@ const curatedSiteStyles = [
|
|
|
26351
26761
|
},
|
|
26352
26762
|
cta: { treatment: "primary" }
|
|
26353
26763
|
} },
|
|
26354
|
-
|
|
26355
|
-
arrangement: "simple",
|
|
26356
|
-
ground: {
|
|
26357
|
-
kind: "style-surface",
|
|
26358
|
-
surface: "deep"
|
|
26359
|
-
},
|
|
26360
|
-
nav: {
|
|
26361
|
-
weight: "regular",
|
|
26362
|
-
colorToken: "primaryForeground",
|
|
26363
|
-
hoverColorToken: "primaryForeground",
|
|
26364
|
-
typography: "body"
|
|
26365
|
-
},
|
|
26366
|
-
legal: { bar: {
|
|
26367
|
-
fullBleed: false,
|
|
26368
|
-
background: {
|
|
26369
|
-
kind: "style-surface",
|
|
26370
|
-
surface: "deep"
|
|
26371
|
-
},
|
|
26372
|
-
textColor: "primaryForeground",
|
|
26373
|
-
textAlign: "left",
|
|
26374
|
-
paddingY: "compact",
|
|
26375
|
-
paddingX: "none",
|
|
26376
|
-
borderTop: {
|
|
26377
|
-
width: "medium",
|
|
26378
|
-
colorToken: "primaryForeground"
|
|
26379
|
-
}
|
|
26380
|
-
} },
|
|
26381
|
-
brandAlign: "start",
|
|
26382
|
-
brandLogoSize: "md"
|
|
26383
|
-
} },
|
|
26384
|
-
recommendedFooterLookIds: ["footer-links-row"],
|
|
26764
|
+
...loomFooter,
|
|
26385
26765
|
buttonStyleChoices: [
|
|
26386
26766
|
buttonChoice("sewn-label"),
|
|
26387
26767
|
buttonChoice("square-outline", void 0, {
|
|
@@ -26450,37 +26830,7 @@ const curatedSiteStyles = [
|
|
|
26450
26830
|
},
|
|
26451
26831
|
cta: { treatment: "primary" }
|
|
26452
26832
|
} },
|
|
26453
|
-
|
|
26454
|
-
arrangement: "simple",
|
|
26455
|
-
ground: {
|
|
26456
|
-
kind: "style-surface",
|
|
26457
|
-
surface: "inverse"
|
|
26458
|
-
},
|
|
26459
|
-
nav: {
|
|
26460
|
-
weight: "semibold",
|
|
26461
|
-
colorToken: "background",
|
|
26462
|
-
hoverColorToken: "background",
|
|
26463
|
-
typography: "body"
|
|
26464
|
-
},
|
|
26465
|
-
legal: { bar: {
|
|
26466
|
-
fullBleed: false,
|
|
26467
|
-
background: {
|
|
26468
|
-
kind: "style-surface",
|
|
26469
|
-
surface: "inverse"
|
|
26470
|
-
},
|
|
26471
|
-
textColor: "background",
|
|
26472
|
-
textAlign: "left",
|
|
26473
|
-
paddingY: "compact",
|
|
26474
|
-
paddingX: "none",
|
|
26475
|
-
borderTop: {
|
|
26476
|
-
width: "thin",
|
|
26477
|
-
colorToken: "background"
|
|
26478
|
-
}
|
|
26479
|
-
} },
|
|
26480
|
-
brandAlign: "start",
|
|
26481
|
-
brandLogoSize: "md"
|
|
26482
|
-
} },
|
|
26483
|
-
recommendedFooterLookIds: ["footer-links-row"],
|
|
26833
|
+
...poiseFooter,
|
|
26484
26834
|
buttonStyleChoices: [
|
|
26485
26835
|
buttonChoice("edged-pill"),
|
|
26486
26836
|
buttonChoice("soft-pill"),
|
|
@@ -26520,37 +26870,7 @@ const curatedSiteStyles = [
|
|
|
26520
26870
|
accordions: editorialDividedAccordionSystem,
|
|
26521
26871
|
testimonialQuote: accentGlyphQuote
|
|
26522
26872
|
},
|
|
26523
|
-
|
|
26524
|
-
arrangement: "simple",
|
|
26525
|
-
ground: {
|
|
26526
|
-
kind: "style-surface",
|
|
26527
|
-
surface: "band"
|
|
26528
|
-
},
|
|
26529
|
-
nav: {
|
|
26530
|
-
weight: "regular",
|
|
26531
|
-
colorToken: "text",
|
|
26532
|
-
hoverColorToken: "text",
|
|
26533
|
-
typography: "body"
|
|
26534
|
-
},
|
|
26535
|
-
legal: { bar: {
|
|
26536
|
-
fullBleed: false,
|
|
26537
|
-
background: {
|
|
26538
|
-
kind: "style-surface",
|
|
26539
|
-
surface: "band"
|
|
26540
|
-
},
|
|
26541
|
-
textColor: "text",
|
|
26542
|
-
textAlign: "left",
|
|
26543
|
-
paddingY: "compact",
|
|
26544
|
-
paddingX: "none",
|
|
26545
|
-
borderTop: {
|
|
26546
|
-
width: "thin",
|
|
26547
|
-
colorToken: "border"
|
|
26548
|
-
}
|
|
26549
|
-
} },
|
|
26550
|
-
brandAlign: "start",
|
|
26551
|
-
brandLogoSize: "md"
|
|
26552
|
-
} },
|
|
26553
|
-
recommendedFooterLookIds: ["footer-links-row"],
|
|
26873
|
+
...havenFooter,
|
|
26554
26874
|
buttonStyleChoices: [
|
|
26555
26875
|
buttonChoice("soft-pill"),
|
|
26556
26876
|
buttonChoice("pebble"),
|
|
@@ -26589,37 +26909,7 @@ const curatedSiteStyles = [
|
|
|
26589
26909
|
accordions: editorialDividedAccordionSystem,
|
|
26590
26910
|
testimonialQuote: serifDisplayQuote
|
|
26591
26911
|
},
|
|
26592
|
-
|
|
26593
|
-
arrangement: "simple",
|
|
26594
|
-
ground: {
|
|
26595
|
-
kind: "style-surface",
|
|
26596
|
-
surface: "base"
|
|
26597
|
-
},
|
|
26598
|
-
nav: {
|
|
26599
|
-
weight: "regular",
|
|
26600
|
-
colorToken: "text",
|
|
26601
|
-
hoverColorToken: "primary",
|
|
26602
|
-
typography: "body"
|
|
26603
|
-
},
|
|
26604
|
-
legal: { bar: {
|
|
26605
|
-
fullBleed: false,
|
|
26606
|
-
background: {
|
|
26607
|
-
kind: "style-surface",
|
|
26608
|
-
surface: "base"
|
|
26609
|
-
},
|
|
26610
|
-
textColor: "text",
|
|
26611
|
-
textAlign: "left",
|
|
26612
|
-
paddingY: "compact",
|
|
26613
|
-
paddingX: "none",
|
|
26614
|
-
borderTop: {
|
|
26615
|
-
width: "thin",
|
|
26616
|
-
colorToken: "border"
|
|
26617
|
-
}
|
|
26618
|
-
} },
|
|
26619
|
-
brandAlign: "start",
|
|
26620
|
-
brandLogoSize: "md"
|
|
26621
|
-
} },
|
|
26622
|
-
recommendedFooterLookIds: ["footer-links-row"],
|
|
26912
|
+
...brookFooter,
|
|
26623
26913
|
buttonStyleChoices: [
|
|
26624
26914
|
buttonChoice("pebble"),
|
|
26625
26915
|
buttonChoice("showtime-pill"),
|
|
@@ -26677,37 +26967,7 @@ const curatedSiteStyles = [
|
|
|
26677
26967
|
mobileBar: "beside-menu"
|
|
26678
26968
|
}
|
|
26679
26969
|
} },
|
|
26680
|
-
|
|
26681
|
-
arrangement: "simple",
|
|
26682
|
-
ground: {
|
|
26683
|
-
kind: "style-surface",
|
|
26684
|
-
surface: "brand"
|
|
26685
|
-
},
|
|
26686
|
-
nav: {
|
|
26687
|
-
weight: "regular",
|
|
26688
|
-
colorToken: "primaryForeground",
|
|
26689
|
-
hoverColorToken: "primaryForeground",
|
|
26690
|
-
typography: "body"
|
|
26691
|
-
},
|
|
26692
|
-
legal: { bar: {
|
|
26693
|
-
fullBleed: false,
|
|
26694
|
-
background: {
|
|
26695
|
-
kind: "style-surface",
|
|
26696
|
-
surface: "brand"
|
|
26697
|
-
},
|
|
26698
|
-
textColor: "primaryForeground",
|
|
26699
|
-
textAlign: "left",
|
|
26700
|
-
paddingY: "compact",
|
|
26701
|
-
paddingX: "none",
|
|
26702
|
-
borderTop: {
|
|
26703
|
-
width: "thin",
|
|
26704
|
-
colorToken: "primaryForeground"
|
|
26705
|
-
}
|
|
26706
|
-
} },
|
|
26707
|
-
brandAlign: "start",
|
|
26708
|
-
brandLogoSize: "md"
|
|
26709
|
-
} },
|
|
26710
|
-
recommendedFooterLookIds: ["footer-links-row"],
|
|
26970
|
+
...orbitFooter,
|
|
26711
26971
|
buttonStyleChoices: [
|
|
26712
26972
|
buttonChoice("orbit-pill"),
|
|
26713
26973
|
buttonChoice("soft-pill"),
|
|
@@ -27364,6 +27624,39 @@ function sectionRhythmSurfaces(style, flow) {
|
|
|
27364
27624
|
});
|
|
27365
27625
|
}
|
|
27366
27626
|
//#endregion
|
|
27627
|
+
//#region ../theme-core/src/site-styles/lookMediaFrame.ts
|
|
27628
|
+
function resolveLookMediaFrame(frames, skin, knobs = {}) {
|
|
27629
|
+
if (!frames) return void 0;
|
|
27630
|
+
const base = (skin ? frames.bySkin?.[skin] : void 0) ?? frames.default;
|
|
27631
|
+
return (frames.byKnob ?? []).reduce((frame, rule) => {
|
|
27632
|
+
const value = knobs[rule.knob];
|
|
27633
|
+
return (typeof value === "string" ? rule.values[value] : void 0) ?? frame;
|
|
27634
|
+
}, base);
|
|
27635
|
+
}
|
|
27636
|
+
function frameVars(frame) {
|
|
27637
|
+
return [
|
|
27638
|
+
`--rb-look-media-ratio: ${frame.aspectRatio};`,
|
|
27639
|
+
...frame.kind === "fixed" && frame.borderRadius ? [`--rb-look-media-radius: ${frame.borderRadius};`] : [],
|
|
27640
|
+
...frame.kind === "variable" && frame.firstAspectRatio ? [`--rb-look-media-first-ratio: ${frame.firstAspectRatio};`] : [],
|
|
27641
|
+
...frame.kind === "variable" && frame.height ? [`--rb-look-media-height: ${frame.height};`] : [],
|
|
27642
|
+
...frame.kind === "variable" && frame.mobileAspectRatio ? [`--rb-look-media-mobile-ratio: ${frame.mobileAspectRatio};`] : []
|
|
27643
|
+
].join(" ");
|
|
27644
|
+
}
|
|
27645
|
+
/** The same declaration supplies the editor frame and the CSS's crop values. */
|
|
27646
|
+
function generateLookMediaFrameCss(themeId) {
|
|
27647
|
+
return blockAppearancePresets.flatMap((look) => {
|
|
27648
|
+
const frames = look.structure.kind === "arrangement" ? look.structure.mediaFrame : void 0;
|
|
27649
|
+
if (!frames) return [];
|
|
27650
|
+
const scope = `:where([data-theme-scope="${themeId}"])`;
|
|
27651
|
+
const selector = `[data-look="${look.id}"]`;
|
|
27652
|
+
return [
|
|
27653
|
+
`${scope} ${selector} { ${frameVars(frames.default)} }`,
|
|
27654
|
+
...Object.entries(frames.bySkin ?? {}).map(([skin, frame]) => `${scope} :is([data-skin="${skin}"], [data-skin="${skin}"] *)${selector} { ${frameVars(frame)} }`),
|
|
27655
|
+
...(frames.byKnob ?? []).flatMap((rule) => Object.entries(rule.values).map(([value, frame]) => `${scope} ${selector}[data-knob-${rule.knob.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`)}="${value}"] { ${frameVars(frame)} }`))
|
|
27656
|
+
];
|
|
27657
|
+
}).join("\n");
|
|
27658
|
+
}
|
|
27659
|
+
//#endregion
|
|
27367
27660
|
//#region ../theme-core/src/site-styles/lookSurfacePresentation.ts
|
|
27368
27661
|
/** Selection is the only per-item operation; all paint has already been decided. */
|
|
27369
27662
|
function selectItemSurfacePresentation(presentation, role) {
|
|
@@ -27546,7 +27839,7 @@ function itemRole(index, count, roles, featured = false) {
|
|
|
27546
27839
|
}
|
|
27547
27840
|
//#endregion
|
|
27548
27841
|
//#region ../blocks/src/system/runtime/lookSurfaces.ts
|
|
27549
|
-
const isPlainObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
27842
|
+
const isPlainObject$1 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
27550
27843
|
function resolvedItemSurfaceProps(surface, slot, style = void 0) {
|
|
27551
27844
|
const declarations = opaqueSurfaceDeclarations(surface, true);
|
|
27552
27845
|
const styles = Object.fromEntries(declarations.map((declaration) => {
|
|
@@ -27557,7 +27850,7 @@ function resolvedItemSurfaceProps(surface, slot, style = void 0) {
|
|
|
27557
27850
|
return {
|
|
27558
27851
|
"data-surface": paint?.kind === "solid" ? paint.token : surface.kind === "inherit" ? "section" : slot,
|
|
27559
27852
|
style: {
|
|
27560
|
-
...isPlainObject(style) ? style : {},
|
|
27853
|
+
...isPlainObject$1(style) ? style : {},
|
|
27561
27854
|
...styles,
|
|
27562
27855
|
...paint?.kind === "solid" ? { background: resolvedSurfaceBackground(surface, paint.token) } : {}
|
|
27563
27856
|
}
|
|
@@ -27695,6 +27988,575 @@ function defineProgressiveBlockRuntime(runtime) {
|
|
|
27695
27988
|
function defineClientOwnedBlockRuntime(runtime) {
|
|
27696
27989
|
return runtime;
|
|
27697
27990
|
}
|
|
27991
|
+
//#endregion
|
|
27992
|
+
//#region ../blocks/src/system/blocks/events/shared/runGrouping.ts
|
|
27993
|
+
function isWholeSeriesPublicEvent(event) {
|
|
27994
|
+
return event.bookingScope === "whole_series";
|
|
27995
|
+
}
|
|
27996
|
+
/**
|
|
27997
|
+
* Group events into one entry per whole-series run.
|
|
27998
|
+
*
|
|
27999
|
+
* Single-occurrence events are ignored. Run order follows first appearance, so
|
|
28000
|
+
* a caller's sort survives the grouping, and an occurrence that arrives twice
|
|
28001
|
+
* is kept once.
|
|
28002
|
+
*/
|
|
28003
|
+
function groupPublicEventsByRun(events) {
|
|
28004
|
+
const occurrencesBySeriesId = /* @__PURE__ */ new Map();
|
|
28005
|
+
const order = [];
|
|
28006
|
+
const seenOccurrenceIds = /* @__PURE__ */ new Set();
|
|
28007
|
+
for (const event of events) {
|
|
28008
|
+
if (!isWholeSeriesPublicEvent(event)) continue;
|
|
28009
|
+
if (seenOccurrenceIds.has(event.occurrenceId)) continue;
|
|
28010
|
+
seenOccurrenceIds.add(event.occurrenceId);
|
|
28011
|
+
const seriesId = event.run.eventSeriesId;
|
|
28012
|
+
const existing = occurrencesBySeriesId.get(seriesId);
|
|
28013
|
+
if (existing) {
|
|
28014
|
+
existing.push(event);
|
|
28015
|
+
continue;
|
|
28016
|
+
}
|
|
28017
|
+
occurrencesBySeriesId.set(seriesId, [event]);
|
|
28018
|
+
order.push(seriesId);
|
|
28019
|
+
}
|
|
28020
|
+
return order.map((eventSeriesId) => {
|
|
28021
|
+
const occurrences = occurrencesBySeriesId.get(eventSeriesId) ?? [];
|
|
28022
|
+
const representative = occurrences[0];
|
|
28023
|
+
if (!representative) throw new Error(`Run ${eventSeriesId} grouped without any occurrence`);
|
|
28024
|
+
return {
|
|
28025
|
+
eventSeriesId,
|
|
28026
|
+
run: representative.run,
|
|
28027
|
+
occurrences,
|
|
28028
|
+
representative
|
|
28029
|
+
};
|
|
28030
|
+
});
|
|
28031
|
+
}
|
|
28032
|
+
//#endregion
|
|
28033
|
+
//#region ../blocks/src/system/runtime/nodes/events/domain/capacity.ts
|
|
28034
|
+
/**
|
|
28035
|
+
* Compute remaining spots for an event from `availableSpots` with a fallback
|
|
28036
|
+
* to `capacity - registeredCount`. Returns `{ available: null, isFull: false }`
|
|
28037
|
+
* for uncapped events so call sites can render no capacity indicator at all.
|
|
28038
|
+
*
|
|
28039
|
+
* The single source of truth for capacity math across event cards, agenda
|
|
28040
|
+
* rows, and timetable cells — keep wording variations in the call sites.
|
|
28041
|
+
*/
|
|
28042
|
+
function getEventAvailability(event) {
|
|
28043
|
+
if (event.capacity == null) return {
|
|
28044
|
+
available: null,
|
|
28045
|
+
isFull: false
|
|
28046
|
+
};
|
|
28047
|
+
if (event.registeredCount === null) return {
|
|
28048
|
+
available: 0,
|
|
28049
|
+
isFull: true
|
|
28050
|
+
};
|
|
28051
|
+
const available = event.availableSpots ?? event.capacity - event.registeredCount;
|
|
28052
|
+
if (available <= 0) return {
|
|
28053
|
+
available: 0,
|
|
28054
|
+
isFull: true
|
|
28055
|
+
};
|
|
28056
|
+
return {
|
|
28057
|
+
available,
|
|
28058
|
+
isFull: false
|
|
28059
|
+
};
|
|
28060
|
+
}
|
|
28061
|
+
/**
|
|
28062
|
+
* Pick the capacity row a booking decision should read: the selected
|
|
28063
|
+
* attendance mode's availability when the visitor has chosen one and the
|
|
28064
|
+
* event publishes it, otherwise the event-level aggregate.
|
|
28065
|
+
*
|
|
28066
|
+
* The mode row is used wholesale. A mode with `capacity: null` on a capped
|
|
28067
|
+
* event is uncapped *by design*: the registration write path applies the
|
|
28068
|
+
* same rule via `getEffectiveOccurrenceCapacityForAttendanceMode`, so falling
|
|
28069
|
+
* back to the event's `availableSpots` here would block bookings the server
|
|
28070
|
+
* accepts. (Waitlist claims are still occurrence-scoped; see issue 1377.)
|
|
28071
|
+
*/
|
|
28072
|
+
function selectEventCapacitySource(event, attendanceMode) {
|
|
28073
|
+
if (!attendanceMode) return event;
|
|
28074
|
+
return (event.attendanceModes ?? []).find((mode) => mode.mode === attendanceMode) ?? event;
|
|
28075
|
+
}
|
|
28076
|
+
/**
|
|
28077
|
+
* Whether the visitor's next step is the waitlist: the source is full *and*
|
|
28078
|
+
* a waitlist is open. The one place this is decided — cards, rows, the
|
|
28079
|
+
* wizard's steps and its action bar all route through here so they agree,
|
|
28080
|
+
* including for producers that omit `availableSpots` and rely on the
|
|
28081
|
+
* `capacity - registeredCount` fallback.
|
|
28082
|
+
*/
|
|
28083
|
+
function canJoinEventWaitlist(event, options) {
|
|
28084
|
+
const source = selectEventCapacitySource(event, options?.attendanceMode);
|
|
28085
|
+
return getEventAvailability(source).isFull && source.waitlistEnabled === true;
|
|
28086
|
+
}
|
|
28087
|
+
/**
|
|
28088
|
+
* Remaining places at or below which an event reads as scarce and the exact
|
|
28089
|
+
* count is worth showing. Above it, no number is shown at all: "147 places
|
|
28090
|
+
* left" is not something a visitor acts on, and it is the figure most likely
|
|
28091
|
+
* to be stale on a cached page.
|
|
28092
|
+
*
|
|
28093
|
+
* max( min(3, ceil(capacity * 0.25)), ceil(capacity * 0.05) )
|
|
28094
|
+
*
|
|
28095
|
+
* The 25% arm stops small groups shouting early (3 of 4 is not urgency); the
|
|
28096
|
+
* 5% floor stops large events staying silent until three remain.
|
|
28097
|
+
* capacity 4 -> 1, 12 -> 3, 40 -> 3, 100 -> 5, 200 -> 10.
|
|
28098
|
+
*/
|
|
28099
|
+
function lowCapacityThreshold(capacity) {
|
|
28100
|
+
return Math.max(Math.min(3, Math.ceil(capacity * .25)), Math.ceil(capacity * .05));
|
|
28101
|
+
}
|
|
28102
|
+
function getRemainingPlaces(source) {
|
|
28103
|
+
const { available, isFull } = getEventAvailability(source);
|
|
28104
|
+
if (available === null) return { kind: "unlimited" };
|
|
28105
|
+
if (isFull) return {
|
|
28106
|
+
kind: "full",
|
|
28107
|
+
waitlist: canJoinEventWaitlist(source)
|
|
28108
|
+
};
|
|
28109
|
+
if (source.capacity !== null && available <= lowCapacityThreshold(source.capacity)) return {
|
|
28110
|
+
kind: "low",
|
|
28111
|
+
remaining: available
|
|
28112
|
+
};
|
|
28113
|
+
return { kind: "open" };
|
|
28114
|
+
}
|
|
28115
|
+
/**
|
|
28116
|
+
* The one place a remaining-places count becomes text. Returns `null` when
|
|
28117
|
+
* nothing should be shown: uncapped events, and capped events above the
|
|
28118
|
+
* scarcity threshold, unless the surface asks for every known count.
|
|
28119
|
+
* Surfaces that need their own full-state wording pass
|
|
28120
|
+
* it in rather than re-deriving the count.
|
|
28121
|
+
*/
|
|
28122
|
+
function formatRemainingPlaces(source, wording = {}) {
|
|
28123
|
+
const remaining = getRemainingPlaces(source);
|
|
28124
|
+
switch (remaining.kind) {
|
|
28125
|
+
case "unlimited": return null;
|
|
28126
|
+
case "open": {
|
|
28127
|
+
const available = getEventAvailability(source).available;
|
|
28128
|
+
return wording.count === "always" && available !== null ? formatPlacesLeft(available, wording.compact === true) : null;
|
|
28129
|
+
}
|
|
28130
|
+
case "low": return formatPlacesLeft(remaining.remaining, wording.compact === true);
|
|
28131
|
+
case "full": return remaining.waitlist ? wording.waitlist ?? "Waitlist" : wording.full ?? "Full";
|
|
28132
|
+
}
|
|
28133
|
+
}
|
|
28134
|
+
function formatPlacesLeft(count, compact) {
|
|
28135
|
+
if (compact) return `${count} left`;
|
|
28136
|
+
return count === 1 ? "1 place left" : `${count} places left`;
|
|
28137
|
+
}
|
|
28138
|
+
function formatTicketTypeRemaining(remainingCapacity) {
|
|
28139
|
+
if (remainingCapacity === null || remainingCapacity > 3) return null;
|
|
28140
|
+
if (remainingCapacity <= 0) return "None left for this ticket type";
|
|
28141
|
+
return `${formatPlacesLeft(remainingCapacity, false)} for this ticket type`;
|
|
28142
|
+
}
|
|
28143
|
+
/** Total capacity as copy ("12 places"), for detail surfaces that state the size of an event. */
|
|
28144
|
+
function formatTotalCapacity(capacity) {
|
|
28145
|
+
if (capacity === null) return null;
|
|
28146
|
+
return capacity === 1 ? "1 place" : `${capacity} places`;
|
|
28147
|
+
}
|
|
28148
|
+
function getEventAvailabilityStatus(event) {
|
|
28149
|
+
const source = selectMostOpenCapacitySource(event);
|
|
28150
|
+
const remaining = getRemainingPlaces(source);
|
|
28151
|
+
const label = formatEventRemainingPlaces(event, { compact: true });
|
|
28152
|
+
switch (remaining.kind) {
|
|
28153
|
+
case "unlimited": return {
|
|
28154
|
+
status: "available",
|
|
28155
|
+
available: null,
|
|
28156
|
+
isFull: false,
|
|
28157
|
+
label
|
|
28158
|
+
};
|
|
28159
|
+
case "open": return {
|
|
28160
|
+
status: "available",
|
|
28161
|
+
available: getEventAvailability(source).available,
|
|
28162
|
+
isFull: false,
|
|
28163
|
+
label
|
|
28164
|
+
};
|
|
28165
|
+
case "low": return {
|
|
28166
|
+
status: "filling",
|
|
28167
|
+
available: remaining.remaining,
|
|
28168
|
+
isFull: false,
|
|
28169
|
+
label
|
|
28170
|
+
};
|
|
28171
|
+
case "full": return {
|
|
28172
|
+
status: "waitlist",
|
|
28173
|
+
available: 0,
|
|
28174
|
+
isFull: true,
|
|
28175
|
+
label
|
|
28176
|
+
};
|
|
28177
|
+
}
|
|
28178
|
+
}
|
|
28179
|
+
/**
|
|
28180
|
+
* Which capacity figure wins when they disagree.
|
|
28181
|
+
*
|
|
28182
|
+
* For a hybrid event that publishes both attendance-mode rows, **the mode
|
|
28183
|
+
* rows are authoritative and the event-level aggregate is only a summary**.
|
|
28184
|
+
* The registration write path admits or refuses per mode
|
|
28185
|
+
* (`getEffectiveOccurrenceCapacityForAttendanceMode` on the server), so the
|
|
28186
|
+
* aggregate can read full while a mode still has room, and can read open
|
|
28187
|
+
* while the mode the visitor wants is full. Believing the aggregate on a
|
|
28188
|
+
* card is how a "places available" event turns into a dead end at step two.
|
|
28189
|
+
*
|
|
28190
|
+
* Everything else — single-mode events, events that publish no rows, and the
|
|
28191
|
+
* aggregate-only helpers {@link getEventAvailability} /
|
|
28192
|
+
* {@link getRemainingPlaces} that existing callers rely on — keeps reading
|
|
28193
|
+
* the aggregate, unchanged.
|
|
28194
|
+
*/
|
|
28195
|
+
function findHybridModeRows(event) {
|
|
28196
|
+
if (event.deliveryMode !== "hybrid") return null;
|
|
28197
|
+
const rows = event.attendanceModes ?? [];
|
|
28198
|
+
const inPerson = rows.find((row) => row.mode === "in_person");
|
|
28199
|
+
const online = rows.find((row) => row.mode === "online");
|
|
28200
|
+
return inPerson && online ? {
|
|
28201
|
+
inPerson,
|
|
28202
|
+
online
|
|
28203
|
+
} : null;
|
|
28204
|
+
}
|
|
28205
|
+
/** Openness rank; higher means more room. A full mode with a waitlist beats one without. */
|
|
28206
|
+
function remainingPlacesRank(remaining) {
|
|
28207
|
+
switch (remaining.kind) {
|
|
28208
|
+
case "unlimited": return 4;
|
|
28209
|
+
case "open": return 3;
|
|
28210
|
+
case "low": return 2;
|
|
28211
|
+
case "full": return remaining.waitlist ? 1 : 0;
|
|
28212
|
+
}
|
|
28213
|
+
}
|
|
28214
|
+
function isMoreOpen(candidate, than) {
|
|
28215
|
+
const rank = remainingPlacesRank(candidate);
|
|
28216
|
+
const otherRank = remainingPlacesRank(than);
|
|
28217
|
+
if (rank !== otherRank) return rank > otherRank;
|
|
28218
|
+
return candidate.kind === "low" && than.kind === "low" ? candidate.remaining > than.remaining : false;
|
|
28219
|
+
}
|
|
28220
|
+
/** True when `candidate` has less room left than `than`. */
|
|
28221
|
+
function isScarcer(candidate, than) {
|
|
28222
|
+
return isMoreOpen(than, candidate);
|
|
28223
|
+
}
|
|
28224
|
+
/**
|
|
28225
|
+
* The capacity row a whole-event decision should read: the most open
|
|
28226
|
+
* attendance mode of a hybrid event, otherwise the aggregate. A hybrid event
|
|
28227
|
+
* is sold out only when both of its modes are, and its waitlist is reachable
|
|
28228
|
+
* when either full mode has one open.
|
|
28229
|
+
*/
|
|
28230
|
+
function selectMostOpenCapacitySource(event) {
|
|
28231
|
+
const rows = findHybridModeRows(event);
|
|
28232
|
+
if (!rows) return event;
|
|
28233
|
+
return isMoreOpen(getRemainingPlaces(rows.online), getRemainingPlaces(rows.inPerson)) ? rows.online : rows.inPerson;
|
|
28234
|
+
}
|
|
28235
|
+
/** True when no attendance mode has room. Hybrid-aware; use this for sold-out decisions. */
|
|
28236
|
+
function isEventFull(event) {
|
|
28237
|
+
return getEventAvailability(selectMostOpenCapacitySource(event)).isFull;
|
|
28238
|
+
}
|
|
28239
|
+
/**
|
|
28240
|
+
* True when the event is full on every mode and at least one of those full
|
|
28241
|
+
* modes has a waitlist open. An event with a mode still bookable is not a
|
|
28242
|
+
* waitlist prospect: it should send the visitor to that mode instead.
|
|
28243
|
+
*/
|
|
28244
|
+
function canJoinEventWaitlistOnAnyMode(event) {
|
|
28245
|
+
return canJoinEventWaitlist(selectMostOpenCapacitySource(event));
|
|
28246
|
+
}
|
|
28247
|
+
const ATTENDANCE_MODE_LABEL = {
|
|
28248
|
+
in_person: "In person",
|
|
28249
|
+
online: "Online"
|
|
28250
|
+
};
|
|
28251
|
+
/** Wording for a mode with room to spare, where the count is deliberately withheld. */
|
|
28252
|
+
const PLACES_AVAILABLE = "Places available";
|
|
28253
|
+
/**
|
|
28254
|
+
* The browse-surface label for an event's remaining places. Single-mode
|
|
28255
|
+
* events get exactly the aggregate label {@link formatRemainingPlaces}
|
|
28256
|
+
* produces, and so does a hybrid event whose two modes tell the same story.
|
|
28257
|
+
* When the modes differ, both sides are named: "available" on a card is a
|
|
28258
|
+
* promise the registration wizard would otherwise have to break.
|
|
28259
|
+
*
|
|
28260
|
+
* Hybrid examples, in person full with 3 online places left:
|
|
28261
|
+
* default -> "Online: 3 places left · In person: Full"
|
|
28262
|
+
* { full: 'Sold out' } -> "Online: 3 places left · In person: Sold out"
|
|
28263
|
+
* { compact: true } -> "Online: 3 left"
|
|
28264
|
+
*/
|
|
28265
|
+
function formatEventRemainingPlaces(event, wording = {}) {
|
|
28266
|
+
const rows = findHybridModeRows(event);
|
|
28267
|
+
if (!rows) return formatRemainingPlaces(event, wording);
|
|
28268
|
+
const inPerson = formatRemainingPlaces(rows.inPerson, wording);
|
|
28269
|
+
const online = formatRemainingPlaces(rows.online, wording);
|
|
28270
|
+
if (inPerson === online) return inPerson;
|
|
28271
|
+
if (wording.compact === true) return formatCompactHybridPlaces(rows, wording);
|
|
28272
|
+
return formatBothHybridSides(rows, {
|
|
28273
|
+
inPerson,
|
|
28274
|
+
online
|
|
28275
|
+
});
|
|
28276
|
+
}
|
|
28277
|
+
/**
|
|
28278
|
+
* Both sides, the one with room first: that is the half a visitor can act on,
|
|
28279
|
+
* and it should not arrive after a full stop's worth of bad news.
|
|
28280
|
+
*/
|
|
28281
|
+
function formatBothHybridSides(rows, labels) {
|
|
28282
|
+
return (isMoreOpen(getRemainingPlaces(rows.online), getRemainingPlaces(rows.inPerson)) ? [["online", labels.online], ["in_person", labels.inPerson]] : [["in_person", labels.inPerson], ["online", labels.online]]).map(([mode, label]) => namedModePlaces(mode, label)).join(" · ");
|
|
28283
|
+
}
|
|
28284
|
+
function namedModePlaces(mode, label) {
|
|
28285
|
+
return `${ATTENDANCE_MODE_LABEL[mode]}: ${label ?? PLACES_AVAILABLE}`;
|
|
28286
|
+
}
|
|
28287
|
+
/**
|
|
28288
|
+
* Pills and timetable cells have room for one short phrase, so they name the
|
|
28289
|
+
* single mode that carries news rather than listing both: the scarce side
|
|
28290
|
+
* when there is a count to show, and otherwise the side that has closed —
|
|
28291
|
+
* "In person: Full", never "Online only", which reads as a statement about
|
|
28292
|
+
* how the event is delivered rather than about its remaining places.
|
|
28293
|
+
*/
|
|
28294
|
+
function formatCompactHybridPlaces(rows, wording) {
|
|
28295
|
+
const inPerson = getRemainingPlaces(rows.inPerson);
|
|
28296
|
+
const online = getRemainingPlaces(rows.online);
|
|
28297
|
+
if (inPerson.kind === "full" && online.kind === "full") return formatRemainingPlaces(inPerson.waitlist ? rows.inPerson : rows.online, wording);
|
|
28298
|
+
if (inPerson.kind === "full" || online.kind === "full") {
|
|
28299
|
+
const fullSide = inPerson.kind === "full" ? "in_person" : "online";
|
|
28300
|
+
const openSide = inPerson.kind === "full" ? "online" : "in_person";
|
|
28301
|
+
const openLabel = formatRemainingPlaces(rowFor(rows, openSide), wording);
|
|
28302
|
+
return openLabel !== null ? namedModePlaces(openSide, openLabel) : namedModePlaces(fullSide, formatRemainingPlaces(rowFor(rows, fullSide), wording));
|
|
28303
|
+
}
|
|
28304
|
+
const scarcerSide = isScarcer(online, inPerson) ? "online" : "in_person";
|
|
28305
|
+
return namedModePlaces(scarcerSide, formatRemainingPlaces(rowFor(rows, scarcerSide), wording));
|
|
28306
|
+
}
|
|
28307
|
+
function rowFor(rows, mode) {
|
|
28308
|
+
return mode === "online" ? rows.online : rows.inPerson;
|
|
28309
|
+
}
|
|
28310
|
+
//#endregion
|
|
28311
|
+
//#region ../blocks/src/system/runtime/nodes/events/domain/bookability.ts
|
|
28312
|
+
/**
|
|
28313
|
+
* Whether a public event has a registration path a visitor can take.
|
|
28314
|
+
*
|
|
28315
|
+
* Lifecycle admission comes from the public booking-availability contract;
|
|
28316
|
+
* capacity comes from the shared event-domain helpers so uncapped, fallback,
|
|
28317
|
+
* and hybrid attendance-mode cases agree with the registration runtime.
|
|
28318
|
+
*/
|
|
28319
|
+
function isBookableEvent(event) {
|
|
28320
|
+
if (!event.requiresRegistration) return false;
|
|
28321
|
+
if (event.bookingAvailability.kind !== "open") return false;
|
|
28322
|
+
return !isEventFull(event) || canJoinEventWaitlistOnAnyMode(event);
|
|
28323
|
+
}
|
|
28324
|
+
//#endregion
|
|
28325
|
+
//#region ../blocks/src/system/blocks/events/shared/pageSelection.ts
|
|
28326
|
+
/**
|
|
28327
|
+
* What a system-managed Event URL actually selected.
|
|
28328
|
+
*
|
|
28329
|
+
* The resolver used to assume that one returned `PublicEvent` meant one
|
|
28330
|
+
* occurrence. A whole-series Event breaks that assumption in two directions: a
|
|
28331
|
+
* parent Event path selects nothing concrete until a run is chosen, and a run
|
|
28332
|
+
* path selects a run whose identity spans every one of its sessions. This
|
|
28333
|
+
* module parses those cases once, so the renderer switches over a closed set of
|
|
28334
|
+
* page states instead of probing booking scopes at render time.
|
|
28335
|
+
*
|
|
28336
|
+
* Everything here is pure. Loading events and resolving run slugs is the
|
|
28337
|
+
* resolver's job; deciding what the page is and which runs the chooser
|
|
28338
|
+
* advertises happens here. When a run is open to join, and where it sits in its
|
|
28339
|
+
* own life, come from `@riverbankcms/core`: the same authority the
|
|
28340
|
+
* public read projection and the write-side run-facts loader use, so a run
|
|
28341
|
+
* cannot report itself open on the storefront and closed at the point of
|
|
28342
|
+
* booking.
|
|
28343
|
+
*/
|
|
28344
|
+
function planWholeSeriesParentBooking(eligibleRuns) {
|
|
28345
|
+
const [first, second, ...rest] = eligibleRuns;
|
|
28346
|
+
if (!second) return {
|
|
28347
|
+
kind: "single",
|
|
28348
|
+
run: first
|
|
28349
|
+
};
|
|
28350
|
+
return eligibleRuns.every((group) => group.representative.allowsMultipleBooking) ? {
|
|
28351
|
+
kind: "bookTogether",
|
|
28352
|
+
runs: [
|
|
28353
|
+
first,
|
|
28354
|
+
second,
|
|
28355
|
+
...rest
|
|
28356
|
+
]
|
|
28357
|
+
} : {
|
|
28358
|
+
kind: "choice",
|
|
28359
|
+
runs: eligibleRuns
|
|
28360
|
+
};
|
|
28361
|
+
}
|
|
28362
|
+
function isOrdinaryPublicEvent(event) {
|
|
28363
|
+
return event.bookingScope === "single_occurrence";
|
|
28364
|
+
}
|
|
28365
|
+
/**
|
|
28366
|
+
* What a series' own page shows when its URL names no date.
|
|
28367
|
+
*
|
|
28368
|
+
* Two or more dates a visitor can book make a choice: the page lists every
|
|
28369
|
+
* date whose booking is open and lets the visitor pick, so a full date still
|
|
28370
|
+
* shows as full rather than vanishing. One bookable date isn't a choice, so the
|
|
28371
|
+
* page books that date. With none, the first date speaks for the page and shows
|
|
28372
|
+
* its own full or closed state.
|
|
28373
|
+
*
|
|
28374
|
+
* The caller passes every date it read for the series, not the cards a listing
|
|
28375
|
+
* happened to show, so the one-date shortcut is decided on the complete set.
|
|
28376
|
+
* "Has places" isn't enough on its own: only a date whose booking is open
|
|
28377
|
+
* counts, and a drop-in date never does.
|
|
28378
|
+
*/
|
|
28379
|
+
function planOrdinarySeriesSelection(events) {
|
|
28380
|
+
const ordinary = events.filter(isOrdinaryPublicEvent);
|
|
28381
|
+
const firstSeriesId = ordinary[0]?.seriesId;
|
|
28382
|
+
if (!firstSeriesId || ordinary.some((event) => event.seriesId !== firstSeriesId)) return null;
|
|
28383
|
+
const [first, second] = ordinary.filter(isBookableEvent);
|
|
28384
|
+
if (first && second) {
|
|
28385
|
+
const [a, b, ...rest] = [...ordinary].filter(isOpenForBooking).sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt));
|
|
28386
|
+
if (a && b) return {
|
|
28387
|
+
kind: "dateChoice",
|
|
28388
|
+
dates: [
|
|
28389
|
+
a,
|
|
28390
|
+
b,
|
|
28391
|
+
...rest
|
|
28392
|
+
]
|
|
28393
|
+
};
|
|
28394
|
+
}
|
|
28395
|
+
const event = first ?? ordinary[0];
|
|
28396
|
+
return event ? {
|
|
28397
|
+
kind: "occurrence",
|
|
28398
|
+
event
|
|
28399
|
+
} : null;
|
|
28400
|
+
}
|
|
28401
|
+
function isOpenForBooking(event) {
|
|
28402
|
+
return event.requiresRegistration && event.bookingAvailability.kind === "open";
|
|
28403
|
+
}
|
|
28404
|
+
/**
|
|
28405
|
+
* Whether a parent Event page advertises this run.
|
|
28406
|
+
*
|
|
28407
|
+
* Visibility admission belongs to the scoped public read. Active, still-open
|
|
28408
|
+
* admitted runs are advertised, and a run that has started,
|
|
28409
|
+
* finished or been cancelled is informational wherever it appears.
|
|
28410
|
+
*
|
|
28411
|
+
* Capacity is deliberately not consulted (decision A24/A30): a full date is
|
|
28412
|
+
* still one of the dates on offer, and its own page shows the full or waitlist
|
|
28413
|
+
* state that the registration engine decides. Hiding it here would leave a
|
|
28414
|
+
* visitor unable to see that the date exists at all.
|
|
28415
|
+
*/
|
|
28416
|
+
function resolveWholeSeriesChooserEligibility(group, now) {
|
|
28417
|
+
const status = group.representative.status;
|
|
28418
|
+
if (status !== void 0 && status !== "active") return {
|
|
28419
|
+
kind: "excluded",
|
|
28420
|
+
reason: "series-not-active"
|
|
28421
|
+
};
|
|
28422
|
+
const phase = resolveWholeSeriesBookingPhase(group.run, now);
|
|
28423
|
+
return phase.kind === "open" ? { kind: "eligible" } : {
|
|
28424
|
+
kind: "excluded",
|
|
28425
|
+
reason: phase.reason
|
|
28426
|
+
};
|
|
28427
|
+
}
|
|
28428
|
+
/**
|
|
28429
|
+
* Runs in the order a visitor reads them: soonest first session first.
|
|
28430
|
+
*
|
|
28431
|
+
* A run with no session left to attend has no place in the sequence, so it
|
|
28432
|
+
* sorts last rather than being given an arbitrary date.
|
|
28433
|
+
*/
|
|
28434
|
+
function orderRunsBySchedule(groups) {
|
|
28435
|
+
return [...groups].sort((left, right) => {
|
|
28436
|
+
const leftStart = firstLiveRunSessionStartMs(left.run.sessions);
|
|
28437
|
+
const rightStart = firstLiveRunSessionStartMs(right.run.sessions);
|
|
28438
|
+
if (leftStart === null) return rightStart === null ? 0 : 1;
|
|
28439
|
+
if (rightStart === null) return -1;
|
|
28440
|
+
return leftStart - rightStart;
|
|
28441
|
+
});
|
|
28442
|
+
}
|
|
28443
|
+
function asNonEmpty(groups) {
|
|
28444
|
+
const [first, ...rest] = groups;
|
|
28445
|
+
return first ? [first, ...rest] : null;
|
|
28446
|
+
}
|
|
28447
|
+
/**
|
|
28448
|
+
* What a parent Event path selects.
|
|
28449
|
+
*
|
|
28450
|
+
* The scoped read admits public and unlisted runs for the offering's own page.
|
|
28451
|
+
* The chooser lists the ones still open; when none is, the most recent
|
|
28452
|
+
* admitted run supplies the page's name and copy. Runs from another offering
|
|
28453
|
+
* cannot speak for this page.
|
|
28454
|
+
*/
|
|
28455
|
+
function planWholeSeriesParentSelection(input) {
|
|
28456
|
+
const offeringRuns = orderRunsBySchedule(groupPublicEventsByRun(input.events).filter((group) => group.run.eventOfferingId === input.offeringId));
|
|
28457
|
+
const eligibleRuns = asNonEmpty(offeringRuns.filter((group) => resolveWholeSeriesChooserEligibility(group, input.now).kind === "eligible"));
|
|
28458
|
+
if (eligibleRuns) return {
|
|
28459
|
+
kind: "wholeSeriesParent",
|
|
28460
|
+
admittedRuns: offeringRuns,
|
|
28461
|
+
offeringId: input.offeringId,
|
|
28462
|
+
eligibleRuns
|
|
28463
|
+
};
|
|
28464
|
+
const informationalRun = offeringRuns.at(-1);
|
|
28465
|
+
return informationalRun ? {
|
|
28466
|
+
kind: "wholeSeriesParentUnavailable",
|
|
28467
|
+
admittedRuns: offeringRuns,
|
|
28468
|
+
offeringId: input.offeringId,
|
|
28469
|
+
informationalRun,
|
|
28470
|
+
bookingClosedDetail: resolveParentBookingClosedDetail(offeringRuns, input.now)
|
|
28471
|
+
} : null;
|
|
28472
|
+
}
|
|
28473
|
+
/**
|
|
28474
|
+
* What a course page says when none of its runs is bookable.
|
|
28475
|
+
*
|
|
28476
|
+
* A run whose page is up without bookings carries its own reason, so the course
|
|
28477
|
+
* speaks for the runs it has: if any of them was live and has been taken
|
|
28478
|
+
* offline the course is closed for now, and otherwise it is waiting to open. A
|
|
28479
|
+
* course whose runs are simply cancelled, under way or finished carries no
|
|
28480
|
+
* reason at all, and the page keeps the words it already has for that.
|
|
28481
|
+
*
|
|
28482
|
+
* Only a run with a session still to come counts. A run that was paused a year
|
|
28483
|
+
* ago and whose dates have all passed says nothing about the course now, and
|
|
28484
|
+
* letting it speak would tell a visitor that a newly announced run is closed.
|
|
28485
|
+
*/
|
|
28486
|
+
function resolveParentBookingClosedDetail(runs, now) {
|
|
28487
|
+
const details = runs.flatMap((group) => {
|
|
28488
|
+
const detail = group.representative.bookingClosedDetail;
|
|
28489
|
+
return detail && hasSessionAhead(group, now) ? [detail] : [];
|
|
28490
|
+
});
|
|
28491
|
+
if (details.length === 0) return null;
|
|
28492
|
+
return details.some((detail) => detail.kind === "paused") ? { kind: "paused" } : { kind: "opensSoon" };
|
|
28493
|
+
}
|
|
28494
|
+
/** Whether the run still has a session a visitor could attend. */
|
|
28495
|
+
function hasSessionAhead(group, now) {
|
|
28496
|
+
return orderedLiveRunSessions(group.run.sessions).some((session) => Date.parse(session.startsAt) > now.getTime());
|
|
28497
|
+
}
|
|
28498
|
+
/** What a targeted run path selects, when the named run projected any data. */
|
|
28499
|
+
function planWholeSeriesRunSelection(input) {
|
|
28500
|
+
const group = groupPublicEventsByRun(input.events).find((candidate) => candidate.eventSeriesId === input.eventSeriesId);
|
|
28501
|
+
if (!group) return null;
|
|
28502
|
+
return {
|
|
28503
|
+
kind: "wholeSeriesRun",
|
|
28504
|
+
offeringId: group.run.eventOfferingId,
|
|
28505
|
+
run: group
|
|
28506
|
+
};
|
|
28507
|
+
}
|
|
28508
|
+
/**
|
|
28509
|
+
* The Event record that speaks for a selection.
|
|
28510
|
+
*
|
|
28511
|
+
* Page metadata, the destination mode and the shared presentation all need one
|
|
28512
|
+
* record; every variant has one, so callers never re-derive it.
|
|
28513
|
+
*/
|
|
28514
|
+
function selectionRepresentativeEvent(selection) {
|
|
28515
|
+
switch (selection.kind) {
|
|
28516
|
+
case "occurrence": return selection.event;
|
|
28517
|
+
case "dateChoice": return selection.dates[0];
|
|
28518
|
+
case "wholeSeriesParent": return selection.eligibleRuns[0].representative;
|
|
28519
|
+
case "wholeSeriesParentUnavailable": return selection.informationalRun.representative;
|
|
28520
|
+
case "wholeSeriesRun": return selection.run.representative;
|
|
28521
|
+
}
|
|
28522
|
+
}
|
|
28523
|
+
/**
|
|
28524
|
+
* Why this page is not taking bookings, when its own state says so.
|
|
28525
|
+
*
|
|
28526
|
+
* A parent course page answers for its runs; everything else answers for the
|
|
28527
|
+
* record the page is about. `null` leaves the booking column exactly as it was.
|
|
28528
|
+
*/
|
|
28529
|
+
function resolveSelectionBookingClosedDetail(selection) {
|
|
28530
|
+
switch (selection.kind) {
|
|
28531
|
+
case "occurrence": return selection.event.bookingClosedDetail ?? null;
|
|
28532
|
+
case "wholeSeriesRun": return selection.run.representative.bookingClosedDetail ?? null;
|
|
28533
|
+
case "dateChoice":
|
|
28534
|
+
case "wholeSeriesParent": return null;
|
|
28535
|
+
case "wholeSeriesParentUnavailable": return selection.bookingClosedDetail;
|
|
28536
|
+
}
|
|
28537
|
+
}
|
|
28538
|
+
function planDropInPanel(selection) {
|
|
28539
|
+
const detail = resolveSelectionBookingClosedDetail(selection);
|
|
28540
|
+
if (detail === null) return { kind: "comeAlong" };
|
|
28541
|
+
switch (detail.kind) {
|
|
28542
|
+
case "opensSoon":
|
|
28543
|
+
case "paused": return { kind: "notRunning" };
|
|
28544
|
+
}
|
|
28545
|
+
}
|
|
28546
|
+
function getPublicEventCanonicalPath(event) {
|
|
28547
|
+
if (event.path) return event.path;
|
|
28548
|
+
return event.destination.kind === "native" ? event.destination.path : null;
|
|
28549
|
+
}
|
|
28550
|
+
function eventOccurrenceContext(event) {
|
|
28551
|
+
return {
|
|
28552
|
+
id: event.occurrenceId,
|
|
28553
|
+
seriesId: event.seriesId,
|
|
28554
|
+
startsAt: event.startsAt,
|
|
28555
|
+
endsAt: event.endsAt,
|
|
28556
|
+
timeZone: event.timeZone,
|
|
28557
|
+
...event.occurrenceTitle ? { overrides: { title: event.occurrenceTitle } } : {}
|
|
28558
|
+
};
|
|
28559
|
+
}
|
|
27698
28560
|
const unsupportedEventRegistrationPageSurfaceSubjectSchema = z.object({
|
|
27699
28561
|
kind: z.literal("unsupported"),
|
|
27700
28562
|
reason: z.enum([
|
|
@@ -27801,6 +28663,14 @@ function resolveEventRegistrationScopedEvents(events, context) {
|
|
|
27801
28663
|
case "unscoped": return [...events];
|
|
27802
28664
|
}
|
|
27803
28665
|
}
|
|
28666
|
+
/** Keep dated detail/recovery targets, but only invite bookings for future choices. */
|
|
28667
|
+
function resolveEventRegistrationChoices(events, context, now) {
|
|
28668
|
+
const scoped = resolveEventRegistrationScopedEvents(events, context);
|
|
28669
|
+
const runs = groupPublicEventsByRun(scoped);
|
|
28670
|
+
if (context.occurrenceContext || context.subject?.kind === "eventSeries" && context.subject.bookingScope === "whole_series" || runs.length === 1 && scoped.every((event) => event.bookingScope === "whole_series")) return scoped;
|
|
28671
|
+
const eligibleRunIds = new Set(runs.filter((group) => resolveWholeSeriesChooserEligibility(group, now).kind === "eligible").map((group) => group.eventSeriesId));
|
|
28672
|
+
return scoped.filter((event) => event.bookingScope === "whole_series" ? eligibleRunIds.has(event.seriesId) : Date.parse(event.startsAt) > now.getTime());
|
|
28673
|
+
}
|
|
27804
28674
|
//#endregion
|
|
27805
28675
|
//#region ../blocks/src/contracts/islands.ts
|
|
27806
28676
|
function isObjectRecord(value) {
|
|
@@ -28488,6 +29358,12 @@ function resolveAppointmentCheckoutVerificationState(input) {
|
|
|
28488
29358
|
if (!input.config) return { tag: "idle" };
|
|
28489
29359
|
const sessionId = input.config.sessionId;
|
|
28490
29360
|
if (input.pollingStatus === "completed") {
|
|
29361
|
+
if (input.result?.checkoutRecovery) return {
|
|
29362
|
+
tag: "unpaid",
|
|
29363
|
+
sessionId,
|
|
29364
|
+
...input.result.checkoutRecovery,
|
|
29365
|
+
startAt: input.result.appointment.startAt
|
|
29366
|
+
};
|
|
28491
29367
|
const confirmed = confirmedAppointmentCheckout(sessionId, input.result);
|
|
28492
29368
|
if (confirmed) return confirmed;
|
|
28493
29369
|
}
|
|
@@ -28513,6 +29389,11 @@ function resolveAppointmentCheckoutVerificationState(input) {
|
|
|
28513
29389
|
};
|
|
28514
29390
|
}
|
|
28515
29391
|
}
|
|
29392
|
+
/** Whether a fresh status read still says exactly what an open checkout's page is showing. */
|
|
29393
|
+
function isSameOpenCheckout(shown, latest) {
|
|
29394
|
+
const recovery = latest.checkoutRecovery;
|
|
29395
|
+
return recovery?.kind === "unpaid" && recovery.checkoutUrl === shown.checkoutUrl && recovery.heldUntil === shown.heldUntil;
|
|
29396
|
+
}
|
|
28516
29397
|
/** Verified payment carries its booked facts instead of asking the view to rebuild them. */
|
|
28517
29398
|
function confirmedAppointmentCheckout(sessionId, result) {
|
|
28518
29399
|
if (!result || !result.appointmentId) return null;
|
|
@@ -28554,11 +29435,17 @@ function deriveBookingFormViewState(input) {
|
|
|
28554
29435
|
kind: "success",
|
|
28555
29436
|
resourceName: input.localSuccessResourceName
|
|
28556
29437
|
};
|
|
28557
|
-
if (input.redirectState.kind === "cancelled") return {
|
|
29438
|
+
if (input.redirectState.kind === "cancelled" && input.verificationState.tag === "idle") return {
|
|
28558
29439
|
kind: "error",
|
|
28559
29440
|
message: "Checkout was cancelled before your appointment was confirmed."
|
|
28560
29441
|
};
|
|
28561
29442
|
switch (input.verificationState.tag) {
|
|
29443
|
+
case "unpaid": return {
|
|
29444
|
+
kind: "unpaid",
|
|
29445
|
+
checkoutUrl: input.verificationState.checkoutUrl,
|
|
29446
|
+
heldUntil: input.verificationState.heldUntil,
|
|
29447
|
+
startAt: input.verificationState.startAt
|
|
29448
|
+
};
|
|
28562
29449
|
case "idle": return { kind: "form" };
|
|
28563
29450
|
case "verifying": return {
|
|
28564
29451
|
kind: "verifying",
|
|
@@ -28756,6 +29643,8 @@ function resolveBookingPaymentStep(input) {
|
|
|
28756
29643
|
};
|
|
28757
29644
|
const [first, ...rest] = resolveAvailableBookingCollectionOptions({
|
|
28758
29645
|
paymentTerms: service.paymentTerms ?? { allowedOptions: [{ kind: "upfront" }] },
|
|
29646
|
+
currency: service.priceCurrency,
|
|
29647
|
+
timeZone: input.timeZone,
|
|
28759
29648
|
totalCents,
|
|
28760
29649
|
bookingStartAt: input.data.selectedSlot ?? null,
|
|
28761
29650
|
now: input.nowIso
|
|
@@ -29193,6 +30082,11 @@ const bookingMailingListContextSchema = z.unknown().transform((value) => {
|
|
|
29193
30082
|
const parsed = parseMailingListRuntimeContext(value);
|
|
29194
30083
|
return parsed.ok ? parsed.value : void 0;
|
|
29195
30084
|
});
|
|
30085
|
+
/** Missing on older payloads and SDK sites, which then word things without a noun. */
|
|
30086
|
+
const businessPersonSchema = z.object({
|
|
30087
|
+
singular: z.string(),
|
|
30088
|
+
plural: z.string()
|
|
30089
|
+
}).nullable().optional();
|
|
29196
30090
|
const bookingDateContextSchema = z.object({
|
|
29197
30091
|
locale: z.string(),
|
|
29198
30092
|
timeZone: z.string().transform(resolveBookingBusinessTimeZone)
|
|
@@ -29206,6 +30100,7 @@ const bookingSourceSchema = z.object({
|
|
|
29206
30100
|
siteTerms: blockSiteTermsSchema.optional(),
|
|
29207
30101
|
pageNavigation: pageNavigationSchema.optional(),
|
|
29208
30102
|
siteName: z.string().optional(),
|
|
30103
|
+
businessPerson: businessPersonSchema,
|
|
29209
30104
|
siteId: z.string().optional(),
|
|
29210
30105
|
apiBaseUrl: z.string().optional(),
|
|
29211
30106
|
portalToken: z.string().nullable().optional(),
|
|
@@ -29242,6 +30137,7 @@ const bookingHydrationSchema = z.object({
|
|
|
29242
30137
|
siteTerms: blockSiteTermsSchema.optional(),
|
|
29243
30138
|
pageNavigation: pageNavigationSchema.optional(),
|
|
29244
30139
|
siteName: z.string().optional(),
|
|
30140
|
+
businessPerson: businessPersonSchema,
|
|
29245
30141
|
formId: z.string().nullable(),
|
|
29246
30142
|
serviceId: z.string().nullable(),
|
|
29247
30143
|
resourceId: z.string().nullable(),
|
|
@@ -29296,6 +30192,7 @@ const bookingFormBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
29296
30192
|
siteTerms: source.siteTerms,
|
|
29297
30193
|
pageNavigation: source.pageNavigation,
|
|
29298
30194
|
siteName: source.siteName,
|
|
30195
|
+
businessPerson: source.businessPerson,
|
|
29299
30196
|
formId: form?.id ?? source.formId ?? null,
|
|
29300
30197
|
serviceId: source.serviceId ?? form?.settings?.serviceId ?? null,
|
|
29301
30198
|
resourceId: source.resourceId ?? form?.settings?.resourceId ?? null,
|
|
@@ -29338,325 +30235,6 @@ function buildBookingFormInteractiveIslandProps(props) {
|
|
|
29338
30235
|
});
|
|
29339
30236
|
}
|
|
29340
30237
|
//#endregion
|
|
29341
|
-
//#region ../blocks/src/system/blocks/events/shared/runGrouping.ts
|
|
29342
|
-
function isWholeSeriesPublicEvent(event) {
|
|
29343
|
-
return event.bookingScope === "whole_series";
|
|
29344
|
-
}
|
|
29345
|
-
/**
|
|
29346
|
-
* Group events into one entry per whole-series run.
|
|
29347
|
-
*
|
|
29348
|
-
* Single-occurrence events are ignored. Run order follows first appearance, so
|
|
29349
|
-
* a caller's sort survives the grouping, and an occurrence that arrives twice
|
|
29350
|
-
* is kept once.
|
|
29351
|
-
*/
|
|
29352
|
-
function groupPublicEventsByRun(events) {
|
|
29353
|
-
const occurrencesBySeriesId = /* @__PURE__ */ new Map();
|
|
29354
|
-
const order = [];
|
|
29355
|
-
const seenOccurrenceIds = /* @__PURE__ */ new Set();
|
|
29356
|
-
for (const event of events) {
|
|
29357
|
-
if (!isWholeSeriesPublicEvent(event)) continue;
|
|
29358
|
-
if (seenOccurrenceIds.has(event.occurrenceId)) continue;
|
|
29359
|
-
seenOccurrenceIds.add(event.occurrenceId);
|
|
29360
|
-
const seriesId = event.run.eventSeriesId;
|
|
29361
|
-
const existing = occurrencesBySeriesId.get(seriesId);
|
|
29362
|
-
if (existing) {
|
|
29363
|
-
existing.push(event);
|
|
29364
|
-
continue;
|
|
29365
|
-
}
|
|
29366
|
-
occurrencesBySeriesId.set(seriesId, [event]);
|
|
29367
|
-
order.push(seriesId);
|
|
29368
|
-
}
|
|
29369
|
-
return order.map((eventSeriesId) => {
|
|
29370
|
-
const occurrences = occurrencesBySeriesId.get(eventSeriesId) ?? [];
|
|
29371
|
-
const representative = occurrences[0];
|
|
29372
|
-
if (!representative) throw new Error(`Run ${eventSeriesId} grouped without any occurrence`);
|
|
29373
|
-
return {
|
|
29374
|
-
eventSeriesId,
|
|
29375
|
-
run: representative.run,
|
|
29376
|
-
occurrences,
|
|
29377
|
-
representative
|
|
29378
|
-
};
|
|
29379
|
-
});
|
|
29380
|
-
}
|
|
29381
|
-
//#endregion
|
|
29382
|
-
//#region ../blocks/src/system/runtime/nodes/events/domain/capacity.ts
|
|
29383
|
-
/**
|
|
29384
|
-
* Compute remaining spots for an event from `availableSpots` with a fallback
|
|
29385
|
-
* to `capacity - registeredCount`. Returns `{ available: null, isFull: false }`
|
|
29386
|
-
* for uncapped events so call sites can render no capacity indicator at all.
|
|
29387
|
-
*
|
|
29388
|
-
* The single source of truth for capacity math across event cards, agenda
|
|
29389
|
-
* rows, and timetable cells — keep wording variations in the call sites.
|
|
29390
|
-
*/
|
|
29391
|
-
function getEventAvailability(event) {
|
|
29392
|
-
if (event.capacity == null) return {
|
|
29393
|
-
available: null,
|
|
29394
|
-
isFull: false
|
|
29395
|
-
};
|
|
29396
|
-
if (event.registeredCount === null) return {
|
|
29397
|
-
available: 0,
|
|
29398
|
-
isFull: true
|
|
29399
|
-
};
|
|
29400
|
-
const available = event.availableSpots ?? event.capacity - event.registeredCount;
|
|
29401
|
-
if (available <= 0) return {
|
|
29402
|
-
available: 0,
|
|
29403
|
-
isFull: true
|
|
29404
|
-
};
|
|
29405
|
-
return {
|
|
29406
|
-
available,
|
|
29407
|
-
isFull: false
|
|
29408
|
-
};
|
|
29409
|
-
}
|
|
29410
|
-
/**
|
|
29411
|
-
* Pick the capacity row a booking decision should read: the selected
|
|
29412
|
-
* attendance mode's availability when the visitor has chosen one and the
|
|
29413
|
-
* event publishes it, otherwise the event-level aggregate.
|
|
29414
|
-
*
|
|
29415
|
-
* The mode row is used wholesale. A mode with `capacity: null` on a capped
|
|
29416
|
-
* event is uncapped *by design*: the registration write path applies the
|
|
29417
|
-
* same rule via `getEffectiveOccurrenceCapacityForAttendanceMode`, so falling
|
|
29418
|
-
* back to the event's `availableSpots` here would block bookings the server
|
|
29419
|
-
* accepts. (Waitlist claims are still occurrence-scoped; see issue 1377.)
|
|
29420
|
-
*/
|
|
29421
|
-
function selectEventCapacitySource(event, attendanceMode) {
|
|
29422
|
-
if (!attendanceMode) return event;
|
|
29423
|
-
return (event.attendanceModes ?? []).find((mode) => mode.mode === attendanceMode) ?? event;
|
|
29424
|
-
}
|
|
29425
|
-
/**
|
|
29426
|
-
* Whether the visitor's next step is the waitlist: the source is full *and*
|
|
29427
|
-
* a waitlist is open. The one place this is decided — cards, rows, the
|
|
29428
|
-
* wizard's steps and its action bar all route through here so they agree,
|
|
29429
|
-
* including for producers that omit `availableSpots` and rely on the
|
|
29430
|
-
* `capacity - registeredCount` fallback.
|
|
29431
|
-
*/
|
|
29432
|
-
function canJoinEventWaitlist(event, options) {
|
|
29433
|
-
const source = selectEventCapacitySource(event, options?.attendanceMode);
|
|
29434
|
-
return getEventAvailability(source).isFull && source.waitlistEnabled === true;
|
|
29435
|
-
}
|
|
29436
|
-
/**
|
|
29437
|
-
* Remaining places at or below which an event reads as scarce and the exact
|
|
29438
|
-
* count is worth showing. Above it, no number is shown at all: "147 places
|
|
29439
|
-
* left" is not something a visitor acts on, and it is the figure most likely
|
|
29440
|
-
* to be stale on a cached page.
|
|
29441
|
-
*
|
|
29442
|
-
* max( min(3, ceil(capacity * 0.25)), ceil(capacity * 0.05) )
|
|
29443
|
-
*
|
|
29444
|
-
* The 25% arm stops small groups shouting early (3 of 4 is not urgency); the
|
|
29445
|
-
* 5% floor stops large events staying silent until three remain.
|
|
29446
|
-
* capacity 4 -> 1, 12 -> 3, 40 -> 3, 100 -> 5, 200 -> 10.
|
|
29447
|
-
*/
|
|
29448
|
-
function lowCapacityThreshold(capacity) {
|
|
29449
|
-
return Math.max(Math.min(3, Math.ceil(capacity * .25)), Math.ceil(capacity * .05));
|
|
29450
|
-
}
|
|
29451
|
-
function getRemainingPlaces(source) {
|
|
29452
|
-
const { available, isFull } = getEventAvailability(source);
|
|
29453
|
-
if (available === null) return { kind: "unlimited" };
|
|
29454
|
-
if (isFull) return {
|
|
29455
|
-
kind: "full",
|
|
29456
|
-
waitlist: canJoinEventWaitlist(source)
|
|
29457
|
-
};
|
|
29458
|
-
if (source.capacity !== null && available <= lowCapacityThreshold(source.capacity)) return {
|
|
29459
|
-
kind: "low",
|
|
29460
|
-
remaining: available
|
|
29461
|
-
};
|
|
29462
|
-
return { kind: "open" };
|
|
29463
|
-
}
|
|
29464
|
-
/**
|
|
29465
|
-
* The one place a remaining-places count becomes text. Returns `null` when
|
|
29466
|
-
* nothing should be shown: uncapped events, and capped events above the
|
|
29467
|
-
* scarcity threshold, unless the surface asks for every known count.
|
|
29468
|
-
* Surfaces that need their own full-state wording pass
|
|
29469
|
-
* it in rather than re-deriving the count.
|
|
29470
|
-
*/
|
|
29471
|
-
function formatRemainingPlaces(source, wording = {}) {
|
|
29472
|
-
const remaining = getRemainingPlaces(source);
|
|
29473
|
-
switch (remaining.kind) {
|
|
29474
|
-
case "unlimited": return null;
|
|
29475
|
-
case "open": {
|
|
29476
|
-
const available = getEventAvailability(source).available;
|
|
29477
|
-
return wording.count === "always" && available !== null ? formatPlacesLeft(available, wording.compact === true) : null;
|
|
29478
|
-
}
|
|
29479
|
-
case "low": return formatPlacesLeft(remaining.remaining, wording.compact === true);
|
|
29480
|
-
case "full": return remaining.waitlist ? wording.waitlist ?? "Waitlist" : wording.full ?? "Full";
|
|
29481
|
-
}
|
|
29482
|
-
}
|
|
29483
|
-
function formatPlacesLeft(count, compact) {
|
|
29484
|
-
if (compact) return `${count} left`;
|
|
29485
|
-
return count === 1 ? "1 place left" : `${count} places left`;
|
|
29486
|
-
}
|
|
29487
|
-
function formatTicketTypeRemaining(remainingCapacity) {
|
|
29488
|
-
if (remainingCapacity === null || remainingCapacity > 3) return null;
|
|
29489
|
-
if (remainingCapacity <= 0) return "None left for this ticket type";
|
|
29490
|
-
return `${formatPlacesLeft(remainingCapacity, false)} for this ticket type`;
|
|
29491
|
-
}
|
|
29492
|
-
/** Total capacity as copy ("12 places"), for detail surfaces that state the size of an event. */
|
|
29493
|
-
function formatTotalCapacity(capacity) {
|
|
29494
|
-
if (capacity === null) return null;
|
|
29495
|
-
return capacity === 1 ? "1 place" : `${capacity} places`;
|
|
29496
|
-
}
|
|
29497
|
-
function getEventAvailabilityStatus(event) {
|
|
29498
|
-
const source = selectMostOpenCapacitySource(event);
|
|
29499
|
-
const remaining = getRemainingPlaces(source);
|
|
29500
|
-
const label = formatEventRemainingPlaces(event, { compact: true });
|
|
29501
|
-
switch (remaining.kind) {
|
|
29502
|
-
case "unlimited": return {
|
|
29503
|
-
status: "available",
|
|
29504
|
-
available: null,
|
|
29505
|
-
isFull: false,
|
|
29506
|
-
label
|
|
29507
|
-
};
|
|
29508
|
-
case "open": return {
|
|
29509
|
-
status: "available",
|
|
29510
|
-
available: getEventAvailability(source).available,
|
|
29511
|
-
isFull: false,
|
|
29512
|
-
label
|
|
29513
|
-
};
|
|
29514
|
-
case "low": return {
|
|
29515
|
-
status: "filling",
|
|
29516
|
-
available: remaining.remaining,
|
|
29517
|
-
isFull: false,
|
|
29518
|
-
label
|
|
29519
|
-
};
|
|
29520
|
-
case "full": return {
|
|
29521
|
-
status: "waitlist",
|
|
29522
|
-
available: 0,
|
|
29523
|
-
isFull: true,
|
|
29524
|
-
label
|
|
29525
|
-
};
|
|
29526
|
-
}
|
|
29527
|
-
}
|
|
29528
|
-
/**
|
|
29529
|
-
* Which capacity figure wins when they disagree.
|
|
29530
|
-
*
|
|
29531
|
-
* For a hybrid event that publishes both attendance-mode rows, **the mode
|
|
29532
|
-
* rows are authoritative and the event-level aggregate is only a summary**.
|
|
29533
|
-
* The registration write path admits or refuses per mode
|
|
29534
|
-
* (`getEffectiveOccurrenceCapacityForAttendanceMode` on the server), so the
|
|
29535
|
-
* aggregate can read full while a mode still has room, and can read open
|
|
29536
|
-
* while the mode the visitor wants is full. Believing the aggregate on a
|
|
29537
|
-
* card is how a "places available" event turns into a dead end at step two.
|
|
29538
|
-
*
|
|
29539
|
-
* Everything else — single-mode events, events that publish no rows, and the
|
|
29540
|
-
* aggregate-only helpers {@link getEventAvailability} /
|
|
29541
|
-
* {@link getRemainingPlaces} that existing callers rely on — keeps reading
|
|
29542
|
-
* the aggregate, unchanged.
|
|
29543
|
-
*/
|
|
29544
|
-
function findHybridModeRows(event) {
|
|
29545
|
-
if (event.deliveryMode !== "hybrid") return null;
|
|
29546
|
-
const rows = event.attendanceModes ?? [];
|
|
29547
|
-
const inPerson = rows.find((row) => row.mode === "in_person");
|
|
29548
|
-
const online = rows.find((row) => row.mode === "online");
|
|
29549
|
-
return inPerson && online ? {
|
|
29550
|
-
inPerson,
|
|
29551
|
-
online
|
|
29552
|
-
} : null;
|
|
29553
|
-
}
|
|
29554
|
-
/** Openness rank; higher means more room. A full mode with a waitlist beats one without. */
|
|
29555
|
-
function remainingPlacesRank(remaining) {
|
|
29556
|
-
switch (remaining.kind) {
|
|
29557
|
-
case "unlimited": return 4;
|
|
29558
|
-
case "open": return 3;
|
|
29559
|
-
case "low": return 2;
|
|
29560
|
-
case "full": return remaining.waitlist ? 1 : 0;
|
|
29561
|
-
}
|
|
29562
|
-
}
|
|
29563
|
-
function isMoreOpen(candidate, than) {
|
|
29564
|
-
const rank = remainingPlacesRank(candidate);
|
|
29565
|
-
const otherRank = remainingPlacesRank(than);
|
|
29566
|
-
if (rank !== otherRank) return rank > otherRank;
|
|
29567
|
-
return candidate.kind === "low" && than.kind === "low" ? candidate.remaining > than.remaining : false;
|
|
29568
|
-
}
|
|
29569
|
-
/** True when `candidate` has less room left than `than`. */
|
|
29570
|
-
function isScarcer(candidate, than) {
|
|
29571
|
-
return isMoreOpen(than, candidate);
|
|
29572
|
-
}
|
|
29573
|
-
/**
|
|
29574
|
-
* The capacity row a whole-event decision should read: the most open
|
|
29575
|
-
* attendance mode of a hybrid event, otherwise the aggregate. A hybrid event
|
|
29576
|
-
* is sold out only when both of its modes are, and its waitlist is reachable
|
|
29577
|
-
* when either full mode has one open.
|
|
29578
|
-
*/
|
|
29579
|
-
function selectMostOpenCapacitySource(event) {
|
|
29580
|
-
const rows = findHybridModeRows(event);
|
|
29581
|
-
if (!rows) return event;
|
|
29582
|
-
return isMoreOpen(getRemainingPlaces(rows.online), getRemainingPlaces(rows.inPerson)) ? rows.online : rows.inPerson;
|
|
29583
|
-
}
|
|
29584
|
-
/** True when no attendance mode has room. Hybrid-aware; use this for sold-out decisions. */
|
|
29585
|
-
function isEventFull(event) {
|
|
29586
|
-
return getEventAvailability(selectMostOpenCapacitySource(event)).isFull;
|
|
29587
|
-
}
|
|
29588
|
-
/**
|
|
29589
|
-
* True when the event is full on every mode and at least one of those full
|
|
29590
|
-
* modes has a waitlist open. An event with a mode still bookable is not a
|
|
29591
|
-
* waitlist prospect: it should send the visitor to that mode instead.
|
|
29592
|
-
*/
|
|
29593
|
-
function canJoinEventWaitlistOnAnyMode(event) {
|
|
29594
|
-
return canJoinEventWaitlist(selectMostOpenCapacitySource(event));
|
|
29595
|
-
}
|
|
29596
|
-
const ATTENDANCE_MODE_LABEL = {
|
|
29597
|
-
in_person: "In person",
|
|
29598
|
-
online: "Online"
|
|
29599
|
-
};
|
|
29600
|
-
/** Wording for a mode with room to spare, where the count is deliberately withheld. */
|
|
29601
|
-
const PLACES_AVAILABLE = "Places available";
|
|
29602
|
-
/**
|
|
29603
|
-
* The browse-surface label for an event's remaining places. Single-mode
|
|
29604
|
-
* events get exactly the aggregate label {@link formatRemainingPlaces}
|
|
29605
|
-
* produces, and so does a hybrid event whose two modes tell the same story.
|
|
29606
|
-
* When the modes differ, both sides are named: "available" on a card is a
|
|
29607
|
-
* promise the registration wizard would otherwise have to break.
|
|
29608
|
-
*
|
|
29609
|
-
* Hybrid examples, in person full with 3 online places left:
|
|
29610
|
-
* default -> "Online: 3 places left · In person: Full"
|
|
29611
|
-
* { full: 'Sold out' } -> "Online: 3 places left · In person: Sold out"
|
|
29612
|
-
* { compact: true } -> "Online: 3 left"
|
|
29613
|
-
*/
|
|
29614
|
-
function formatEventRemainingPlaces(event, wording = {}) {
|
|
29615
|
-
const rows = findHybridModeRows(event);
|
|
29616
|
-
if (!rows) return formatRemainingPlaces(event, wording);
|
|
29617
|
-
const inPerson = formatRemainingPlaces(rows.inPerson, wording);
|
|
29618
|
-
const online = formatRemainingPlaces(rows.online, wording);
|
|
29619
|
-
if (inPerson === online) return inPerson;
|
|
29620
|
-
if (wording.compact === true) return formatCompactHybridPlaces(rows, wording);
|
|
29621
|
-
return formatBothHybridSides(rows, {
|
|
29622
|
-
inPerson,
|
|
29623
|
-
online
|
|
29624
|
-
});
|
|
29625
|
-
}
|
|
29626
|
-
/**
|
|
29627
|
-
* Both sides, the one with room first: that is the half a visitor can act on,
|
|
29628
|
-
* and it should not arrive after a full stop's worth of bad news.
|
|
29629
|
-
*/
|
|
29630
|
-
function formatBothHybridSides(rows, labels) {
|
|
29631
|
-
return (isMoreOpen(getRemainingPlaces(rows.online), getRemainingPlaces(rows.inPerson)) ? [["online", labels.online], ["in_person", labels.inPerson]] : [["in_person", labels.inPerson], ["online", labels.online]]).map(([mode, label]) => namedModePlaces(mode, label)).join(" · ");
|
|
29632
|
-
}
|
|
29633
|
-
function namedModePlaces(mode, label) {
|
|
29634
|
-
return `${ATTENDANCE_MODE_LABEL[mode]}: ${label ?? PLACES_AVAILABLE}`;
|
|
29635
|
-
}
|
|
29636
|
-
/**
|
|
29637
|
-
* Pills and timetable cells have room for one short phrase, so they name the
|
|
29638
|
-
* single mode that carries news rather than listing both: the scarce side
|
|
29639
|
-
* when there is a count to show, and otherwise the side that has closed —
|
|
29640
|
-
* "In person: Full", never "Online only", which reads as a statement about
|
|
29641
|
-
* how the event is delivered rather than about its remaining places.
|
|
29642
|
-
*/
|
|
29643
|
-
function formatCompactHybridPlaces(rows, wording) {
|
|
29644
|
-
const inPerson = getRemainingPlaces(rows.inPerson);
|
|
29645
|
-
const online = getRemainingPlaces(rows.online);
|
|
29646
|
-
if (inPerson.kind === "full" && online.kind === "full") return formatRemainingPlaces(inPerson.waitlist ? rows.inPerson : rows.online, wording);
|
|
29647
|
-
if (inPerson.kind === "full" || online.kind === "full") {
|
|
29648
|
-
const fullSide = inPerson.kind === "full" ? "in_person" : "online";
|
|
29649
|
-
const openSide = inPerson.kind === "full" ? "online" : "in_person";
|
|
29650
|
-
const openLabel = formatRemainingPlaces(rowFor(rows, openSide), wording);
|
|
29651
|
-
return openLabel !== null ? namedModePlaces(openSide, openLabel) : namedModePlaces(fullSide, formatRemainingPlaces(rowFor(rows, fullSide), wording));
|
|
29652
|
-
}
|
|
29653
|
-
const scarcerSide = isScarcer(online, inPerson) ? "online" : "in_person";
|
|
29654
|
-
return namedModePlaces(scarcerSide, formatRemainingPlaces(rowFor(rows, scarcerSide), wording));
|
|
29655
|
-
}
|
|
29656
|
-
function rowFor(rows, mode) {
|
|
29657
|
-
return mode === "online" ? rows.online : rows.inPerson;
|
|
29658
|
-
}
|
|
29659
|
-
//#endregion
|
|
29660
30238
|
//#region ../blocks/src/system/runtime/nodes/events/domain/destination.ts
|
|
29661
30239
|
function isRecord(value) {
|
|
29662
30240
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -29866,6 +30444,1123 @@ function formatEventWeekdayTime(event) {
|
|
|
29866
30444
|
year: "omit"
|
|
29867
30445
|
})} · ${formatEventTimeRange(event, options)}`;
|
|
29868
30446
|
}
|
|
30447
|
+
const inlineTextMarkSchema = z.discriminatedUnion("kind", [
|
|
30448
|
+
z.object({ kind: z.literal("strong") }),
|
|
30449
|
+
z.object({ kind: z.literal("emphasis") }),
|
|
30450
|
+
z.object({
|
|
30451
|
+
kind: z.literal("accent"),
|
|
30452
|
+
tone: z.enum([
|
|
30453
|
+
"accent",
|
|
30454
|
+
"brand",
|
|
30455
|
+
"contrast"
|
|
30456
|
+
])
|
|
30457
|
+
}),
|
|
30458
|
+
z.object({
|
|
30459
|
+
kind: z.literal("highlight"),
|
|
30460
|
+
tone: z.enum([
|
|
30461
|
+
"soft",
|
|
30462
|
+
"accent",
|
|
30463
|
+
"brand"
|
|
30464
|
+
])
|
|
30465
|
+
})
|
|
30466
|
+
]);
|
|
30467
|
+
const inlineTextRunSchema = z.object({
|
|
30468
|
+
text: z.string(),
|
|
30469
|
+
marks: z.array(inlineTextMarkSchema).optional()
|
|
30470
|
+
});
|
|
30471
|
+
z.array(inlineTextRunSchema);
|
|
30472
|
+
const MARK_ORDER = {
|
|
30473
|
+
strong: 0,
|
|
30474
|
+
emphasis: 1,
|
|
30475
|
+
accent: 2,
|
|
30476
|
+
highlight: 3
|
|
30477
|
+
};
|
|
30478
|
+
function plainTextToInlineText(value) {
|
|
30479
|
+
return normalizeInlineText(value.length > 0 ? [{ text: value }] : []);
|
|
30480
|
+
}
|
|
30481
|
+
function inlineTextToPlainText(value) {
|
|
30482
|
+
return value.map((run) => run.text).join("");
|
|
30483
|
+
}
|
|
30484
|
+
function isInlineTextEmpty(value) {
|
|
30485
|
+
return inlineTextToPlainText(value).trim().length === 0;
|
|
30486
|
+
}
|
|
30487
|
+
function coerceInlineTextWithFallback(value, fallbackPlainText) {
|
|
30488
|
+
const parsed = parseInlineTextFromUnknown(value);
|
|
30489
|
+
if (parsed.ok && !isInlineTextEmpty(parsed.value)) return parsed.value;
|
|
30490
|
+
if (fallbackPlainText && fallbackPlainText.length > 0) return plainTextToInlineText(fallbackPlainText);
|
|
30491
|
+
return parsed.ok ? parsed.value : [];
|
|
30492
|
+
}
|
|
30493
|
+
function parseInlineTextFromUnknown(value) {
|
|
30494
|
+
if (!Array.isArray(value)) return {
|
|
30495
|
+
ok: false,
|
|
30496
|
+
error: { kind: "not-array" }
|
|
30497
|
+
};
|
|
30498
|
+
const runs = [];
|
|
30499
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
30500
|
+
const parsed = inlineTextRunSchema.safeParse(value[index]);
|
|
30501
|
+
if (!parsed.success) return {
|
|
30502
|
+
ok: false,
|
|
30503
|
+
error: {
|
|
30504
|
+
kind: "invalid-run",
|
|
30505
|
+
index
|
|
30506
|
+
}
|
|
30507
|
+
};
|
|
30508
|
+
runs.push(parsed.data);
|
|
30509
|
+
}
|
|
30510
|
+
return {
|
|
30511
|
+
ok: true,
|
|
30512
|
+
value: normalizeInlineText(runs)
|
|
30513
|
+
};
|
|
30514
|
+
}
|
|
30515
|
+
function normalizeInlineText(value) {
|
|
30516
|
+
const normalized = [];
|
|
30517
|
+
for (const run of value) {
|
|
30518
|
+
if (run.text.length === 0) continue;
|
|
30519
|
+
const marks = normalizeInlineTextMarks(run.marks ?? []);
|
|
30520
|
+
const nextRun = marks.length > 0 ? {
|
|
30521
|
+
text: run.text,
|
|
30522
|
+
marks
|
|
30523
|
+
} : { text: run.text };
|
|
30524
|
+
const previous = normalized[normalized.length - 1];
|
|
30525
|
+
if (previous && inlineTextMarksEqual(previous.marks ?? [], nextRun.marks ?? [])) {
|
|
30526
|
+
normalized[normalized.length - 1] = previous.marks && previous.marks.length > 0 ? {
|
|
30527
|
+
text: previous.text + nextRun.text,
|
|
30528
|
+
marks: previous.marks
|
|
30529
|
+
} : { text: previous.text + nextRun.text };
|
|
30530
|
+
continue;
|
|
30531
|
+
}
|
|
30532
|
+
normalized.push(nextRun);
|
|
30533
|
+
}
|
|
30534
|
+
return normalized;
|
|
30535
|
+
}
|
|
30536
|
+
function normalizeInlineTextMarks(marks) {
|
|
30537
|
+
let strong = null;
|
|
30538
|
+
let emphasis = null;
|
|
30539
|
+
let accent = null;
|
|
30540
|
+
let highlight = null;
|
|
30541
|
+
for (const mark of marks) switch (mark.kind) {
|
|
30542
|
+
case "strong":
|
|
30543
|
+
strong = { kind: "strong" };
|
|
30544
|
+
break;
|
|
30545
|
+
case "emphasis":
|
|
30546
|
+
emphasis = { kind: "emphasis" };
|
|
30547
|
+
break;
|
|
30548
|
+
case "accent":
|
|
30549
|
+
accent = {
|
|
30550
|
+
kind: "accent",
|
|
30551
|
+
tone: mark.tone
|
|
30552
|
+
};
|
|
30553
|
+
break;
|
|
30554
|
+
case "highlight":
|
|
30555
|
+
highlight = {
|
|
30556
|
+
kind: "highlight",
|
|
30557
|
+
tone: mark.tone
|
|
30558
|
+
};
|
|
30559
|
+
break;
|
|
30560
|
+
}
|
|
30561
|
+
return [
|
|
30562
|
+
strong,
|
|
30563
|
+
emphasis,
|
|
30564
|
+
accent,
|
|
30565
|
+
highlight
|
|
30566
|
+
].filter((mark) => mark !== null).sort((left, right) => MARK_ORDER[left.kind] - MARK_ORDER[right.kind]);
|
|
30567
|
+
}
|
|
30568
|
+
function inlineTextMarksEqual(left, right) {
|
|
30569
|
+
const normalizedLeft = normalizeInlineTextMarks(left);
|
|
30570
|
+
const normalizedRight = normalizeInlineTextMarks(right);
|
|
30571
|
+
if (normalizedLeft.length !== normalizedRight.length) return false;
|
|
30572
|
+
return normalizedLeft.every((mark, index) => inlineTextMarkEqual(mark, normalizedRight[index]));
|
|
30573
|
+
}
|
|
30574
|
+
function inlineTextMarkEqual(left, right) {
|
|
30575
|
+
if (!right || left.kind !== right.kind) return false;
|
|
30576
|
+
switch (left.kind) {
|
|
30577
|
+
case "strong":
|
|
30578
|
+
case "emphasis": return true;
|
|
30579
|
+
case "accent": return right.kind === "accent" && left.tone === right.tone;
|
|
30580
|
+
case "highlight": return right.kind === "highlight" && left.tone === right.tone;
|
|
30581
|
+
}
|
|
30582
|
+
}
|
|
30583
|
+
//#endregion
|
|
30584
|
+
//#region ../blocks/src/system/transforms/registry/core.ts
|
|
30585
|
+
/**
|
|
30586
|
+
* Safely narrows unknown values to partial object shapes used by transforms.
|
|
30587
|
+
* Arrays are intentionally excluded.
|
|
30588
|
+
*/
|
|
30589
|
+
function asPartialObject(value) {
|
|
30590
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) return;
|
|
30591
|
+
return value;
|
|
30592
|
+
}
|
|
30593
|
+
function runTransforms(value, transforms, context, registry) {
|
|
30594
|
+
if (!transforms?.length) return value;
|
|
30595
|
+
return transforms.reduce((acc, step) => {
|
|
30596
|
+
const transform = registry.get(step.id);
|
|
30597
|
+
if (!transform) throw new Error(`Unknown transform: ${step.id}`);
|
|
30598
|
+
const options = transform.schema ? z.parse(transform.schema, step.options ?? {}) : step.options ?? {};
|
|
30599
|
+
return transform.run(acc, options, context);
|
|
30600
|
+
}, value);
|
|
30601
|
+
}
|
|
30602
|
+
function createTransformRegistry(definitions) {
|
|
30603
|
+
const registry = /* @__PURE__ */ new Map();
|
|
30604
|
+
for (const definition of definitions) {
|
|
30605
|
+
if (registry.has(definition.id)) continue;
|
|
30606
|
+
registry.set(definition.id, definition);
|
|
30607
|
+
}
|
|
30608
|
+
return registry;
|
|
30609
|
+
}
|
|
30610
|
+
//#endregion
|
|
30611
|
+
//#region ../blocks/src/system/node/fragments/sectionState.shared.ts
|
|
30612
|
+
const SECTION_STATE_KINDS = [
|
|
30613
|
+
"empty",
|
|
30614
|
+
"unavailable",
|
|
30615
|
+
"coming-soon",
|
|
30616
|
+
"no-results"
|
|
30617
|
+
];
|
|
30618
|
+
const SECTION_STATE_TONE = {
|
|
30619
|
+
empty: "info",
|
|
30620
|
+
unavailable: "warning",
|
|
30621
|
+
"coming-soon": "info",
|
|
30622
|
+
"no-results": "warning"
|
|
30623
|
+
};
|
|
30624
|
+
function isSectionStateKind(value) {
|
|
30625
|
+
return typeof value === "string" && SECTION_STATE_KINDS.includes(value);
|
|
30626
|
+
}
|
|
30627
|
+
function sectionStateToneFromKind(kind) {
|
|
30628
|
+
return SECTION_STATE_TONE[kind];
|
|
30629
|
+
}
|
|
30630
|
+
function sectionStateToneFromUnknown(value) {
|
|
30631
|
+
return isSectionStateKind(value) ? sectionStateToneFromKind(value) : "info";
|
|
30632
|
+
}
|
|
30633
|
+
//#endregion
|
|
30634
|
+
//#region ../blocks/src/system/transforms/registry/ui.ts
|
|
30635
|
+
const joinClasses = (parts) => parts.filter((part) => typeof part === "string" && part.trim().length > 0).join(" ").replace(/\s+/g, " ").trim();
|
|
30636
|
+
const eyebrowTreatmentClassMap = {
|
|
30637
|
+
plain: "",
|
|
30638
|
+
accent: "rb-eyebrow-treatment-accent",
|
|
30639
|
+
pill: "rb-eyebrow-treatment-pill",
|
|
30640
|
+
"accent-pill": "rb-eyebrow-treatment-pill rb-eyebrow-treatment-accent",
|
|
30641
|
+
"pill-bounce": "rb-eyebrow-treatment-pill rb-eyebrow-treatment-pill-bounce",
|
|
30642
|
+
"accent-pill-bounce": "rb-eyebrow-treatment-pill rb-eyebrow-treatment-accent rb-eyebrow-treatment-pill-bounce"
|
|
30643
|
+
};
|
|
30644
|
+
const eyebrowTreatmentSet = new Set(eyebrowTreatmentValues);
|
|
30645
|
+
const headingDecorationFamilySet = new Set(visibleHeadingDecorationFamilyValues);
|
|
30646
|
+
const headingDecorationColorTokenSet = new Set(headingDecorationColorTokenValues);
|
|
30647
|
+
function isEyebrowTreatment(value) {
|
|
30648
|
+
return typeof value === "string" && eyebrowTreatmentSet.has(value);
|
|
30649
|
+
}
|
|
30650
|
+
function isHeadingDecorationFamily(value) {
|
|
30651
|
+
return typeof value === "string" && headingDecorationFamilySet.has(value);
|
|
30652
|
+
}
|
|
30653
|
+
function isHeadingDecorationColorToken(value) {
|
|
30654
|
+
return typeof value === "string" && headingDecorationColorTokenSet.has(value);
|
|
30655
|
+
}
|
|
30656
|
+
const imageGalleryCornerClassMap = {
|
|
30657
|
+
none: "",
|
|
30658
|
+
sm: "rb-rounded-sm",
|
|
30659
|
+
md: "rb-rounded-md",
|
|
30660
|
+
lg: "rb-rounded-lg",
|
|
30661
|
+
xl: "rb-rounded-xl",
|
|
30662
|
+
"2xl": "rb-rounded-2xl",
|
|
30663
|
+
"3xl": "rb-rounded-3xl"
|
|
30664
|
+
};
|
|
30665
|
+
const imageShapeClassMap = {
|
|
30666
|
+
default: "",
|
|
30667
|
+
square: "rb-media-shape-square",
|
|
30668
|
+
rounded: "rb-media-shape-rounded",
|
|
30669
|
+
circle: "rb-media-shape-circle",
|
|
30670
|
+
arch: "rb-media-shape-arch"
|
|
30671
|
+
};
|
|
30672
|
+
const parseRatio = (raw) => {
|
|
30673
|
+
if (typeof raw !== "string") return null;
|
|
30674
|
+
const value = raw.trim();
|
|
30675
|
+
if (!value || value === "auto") return null;
|
|
30676
|
+
const [wRaw, hRaw] = value.split("/").map((part) => part.trim());
|
|
30677
|
+
const w = Number(wRaw);
|
|
30678
|
+
const h = Number(hRaw);
|
|
30679
|
+
if (!Number.isFinite(w) || !Number.isFinite(h)) return null;
|
|
30680
|
+
if (w <= 0 || h <= 0) return null;
|
|
30681
|
+
return {
|
|
30682
|
+
w,
|
|
30683
|
+
h
|
|
30684
|
+
};
|
|
30685
|
+
};
|
|
30686
|
+
const ratioToHeightFactor = (raw) => {
|
|
30687
|
+
const ratio = parseRatio(raw);
|
|
30688
|
+
if (!ratio) return "1";
|
|
30689
|
+
return String(ratio.h / ratio.w);
|
|
30690
|
+
};
|
|
30691
|
+
function resolveBorderColorValue(border) {
|
|
30692
|
+
if (border.enabled === false) return void 0;
|
|
30693
|
+
const rawColorToken = typeof border.colorToken === "string" ? border.colorToken.trim() : "";
|
|
30694
|
+
const parsed = rawColorToken ? parseBlockColorToken(rawColorToken) : null;
|
|
30695
|
+
const baseName = (parsed ? parsed.split("/")[0] : null) ?? "accent";
|
|
30696
|
+
const opacityRaw = typeof border.opacity === "number" ? border.opacity : 30;
|
|
30697
|
+
return rgbColorValue(`${baseName}/${Math.max(0, Math.min(100, opacityRaw))}`);
|
|
30698
|
+
}
|
|
30699
|
+
/**
|
|
30700
|
+
* Get nav link classes based on nav style
|
|
30701
|
+
* Simplified version that reads navStyle enum from theme
|
|
30702
|
+
*/
|
|
30703
|
+
function getNavStyleClasses(navStyle) {
|
|
30704
|
+
const baseClasses = "rb-inline-flex rb-items-center rb-gap-2 rb-px-3 rb-py-2 rb-transition-colors";
|
|
30705
|
+
switch (navStyle) {
|
|
30706
|
+
case "minimal": return baseClasses;
|
|
30707
|
+
case "underline": return `${baseClasses} rb-nav-underline rb-nav-underline-offset-4`;
|
|
30708
|
+
case "underline-grow": return `${baseClasses} nav-underline-grow nav-underline-active`;
|
|
30709
|
+
case "capsule": return "rb-inline-flex rb-items-center rb-gap-2 rb-transition-colors rb-rounded-full rb-px-3 rb-py-1.5";
|
|
30710
|
+
case "scale": return `${baseClasses} rb-transform-gpu rb-will-change-transform rb-motion-safe-hover-scale-105`;
|
|
30711
|
+
case "frosted": return "rb-inline-flex rb-items-center rb-gap-2 rb-transition-colors rb-rounded-lg rb-px-3 rb-py-1.5";
|
|
30712
|
+
case "solid": return baseClasses;
|
|
30713
|
+
default: return baseClasses;
|
|
30714
|
+
}
|
|
30715
|
+
}
|
|
30716
|
+
const headerNavLinkClassTransform = {
|
|
30717
|
+
id: "ui.headerNavLinkClass",
|
|
30718
|
+
kind: "string",
|
|
30719
|
+
summary: "Compose header navigation link classes from theme navStyle",
|
|
30720
|
+
schema: z.object({ base: z.string().optional() }),
|
|
30721
|
+
run: (value, options) => {
|
|
30722
|
+
return joinClasses([getNavStyleClasses(asPartialObject(value)?.navStyle ?? "minimal"), options?.base]);
|
|
30723
|
+
}
|
|
30724
|
+
};
|
|
30725
|
+
const headingClassFromAlignment = {
|
|
30726
|
+
id: "ui.headingClassFromAlignment",
|
|
30727
|
+
kind: "string",
|
|
30728
|
+
summary: "Append text alignment class to a base heading class",
|
|
30729
|
+
run: (value, options) => {
|
|
30730
|
+
const alignClass = (typeof value === "string" && value === "center" ? "center" : "left") === "center" ? "rb-text-center" : "rb-text-left";
|
|
30731
|
+
return `${options.base} ${alignClass}`.trim();
|
|
30732
|
+
}
|
|
30733
|
+
};
|
|
30734
|
+
const bodyClassFromAlignment = {
|
|
30735
|
+
id: "ui.bodyClassFromAlignment",
|
|
30736
|
+
kind: "string",
|
|
30737
|
+
summary: "Append body alignment helper classes to a base class",
|
|
30738
|
+
run: (value, options) => {
|
|
30739
|
+
const extra = (typeof value === "string" && value === "center" ? "center" : "left") === "center" ? "rb-mx-auto rb-text-center" : "";
|
|
30740
|
+
return `${options.base} ${extra}`.trim();
|
|
30741
|
+
}
|
|
30742
|
+
};
|
|
30743
|
+
const stackAlignFromAlignment = {
|
|
30744
|
+
id: "ui.stackAlignFromAlignment",
|
|
30745
|
+
kind: "string",
|
|
30746
|
+
summary: "Map text alignment to stack alignment value",
|
|
30747
|
+
run: (value) => value === "center" ? "center" : "start"
|
|
30748
|
+
};
|
|
30749
|
+
const sectionStateToneTransform = {
|
|
30750
|
+
id: "ui.sectionStateTone",
|
|
30751
|
+
kind: "string",
|
|
30752
|
+
summary: "Map semantic section-state kind to feedback tone",
|
|
30753
|
+
run: (value) => sectionStateToneFromUnknown(value)
|
|
30754
|
+
};
|
|
30755
|
+
const heroTitleLengthThresholds = {
|
|
30756
|
+
medium: {
|
|
30757
|
+
maxCharacters: 42,
|
|
30758
|
+
maxWords: 6
|
|
30759
|
+
},
|
|
30760
|
+
long: {
|
|
30761
|
+
maxCharacters: 78,
|
|
30762
|
+
maxWords: 11
|
|
30763
|
+
}
|
|
30764
|
+
};
|
|
30765
|
+
function isPlainObject(value) {
|
|
30766
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
30767
|
+
}
|
|
30768
|
+
function readString(obj, key) {
|
|
30769
|
+
const v = obj[key];
|
|
30770
|
+
return typeof v === "string" ? v : void 0;
|
|
30771
|
+
}
|
|
30772
|
+
function resolveGeneratedHeroLayoutStyles(content) {
|
|
30773
|
+
const raw = content._heroLayoutStyles;
|
|
30774
|
+
return isPlainObject(raw) ? raw : null;
|
|
30775
|
+
}
|
|
30776
|
+
function readHeroLayoutString(content, generatedKey, fallbackKey = generatedKey) {
|
|
30777
|
+
const explicitValue = readString(content, fallbackKey);
|
|
30778
|
+
if (explicitValue !== void 0) return explicitValue;
|
|
30779
|
+
const generated = resolveGeneratedHeroLayoutStyles(content);
|
|
30780
|
+
return generated && typeof generated[generatedKey] === "string" ? generated[generatedKey] : void 0;
|
|
30781
|
+
}
|
|
30782
|
+
function resolveHeroVariant(content) {
|
|
30783
|
+
const variant = readString(content, "variant");
|
|
30784
|
+
if (variant && variant.trim()) return variant.trim();
|
|
30785
|
+
const layout = readString(content, "layout");
|
|
30786
|
+
if (layout && layout.trim()) return layout.trim();
|
|
30787
|
+
return null;
|
|
30788
|
+
}
|
|
30789
|
+
function resolveHeroContentAlignment(content) {
|
|
30790
|
+
const raw = readHeroLayoutString(content, "contentAlignment");
|
|
30791
|
+
if (raw === "left" || raw === "center" || raw === "right") return raw;
|
|
30792
|
+
const variant = resolveHeroVariant(content);
|
|
30793
|
+
if (variant === "split" || variant === "splitReverse") return "left";
|
|
30794
|
+
return "center";
|
|
30795
|
+
}
|
|
30796
|
+
function resolveHeroVerticalAlignment(content) {
|
|
30797
|
+
const raw = readHeroLayoutString(content, "verticalAlignment");
|
|
30798
|
+
if (raw === "top" || raw === "center" || raw === "bottom") return raw;
|
|
30799
|
+
const minHeight = asPartialObject(content._sectionStyles)?.minHeight;
|
|
30800
|
+
if (minHeight === "banner" || minHeight === "hero" || minHeight === "immersive") return "center";
|
|
30801
|
+
const variant = resolveHeroVariant(content);
|
|
30802
|
+
if (variant === "split" || variant === "splitReverse") return "center";
|
|
30803
|
+
return "top";
|
|
30804
|
+
}
|
|
30805
|
+
function resolveHeroContentMaxWidth(content) {
|
|
30806
|
+
const raw = readHeroLayoutString(content, "contentMaxWidth");
|
|
30807
|
+
if (raw === "default" || raw === "narrow" || raw === "medium" || raw === "wide") return raw;
|
|
30808
|
+
return "default";
|
|
30809
|
+
}
|
|
30810
|
+
function resolveHeroTypographyScale(content) {
|
|
30811
|
+
const titleSize = readString(content, "titleSize");
|
|
30812
|
+
if (titleSize === "quiet" || titleSize === "editorial" || titleSize === "display" || titleSize === "poster") return titleSize;
|
|
30813
|
+
const raw = readHeroLayoutString(content, "typographyScale", "heroTypographyScale");
|
|
30814
|
+
if (raw === "quiet" || raw === "editorial" || raw === "display" || raw === "poster") return raw;
|
|
30815
|
+
return null;
|
|
30816
|
+
}
|
|
30817
|
+
function resolveHeroTitleLength(content, policy = "legacy") {
|
|
30818
|
+
const headline = heroHeadlineText(content, policy);
|
|
30819
|
+
const words = headline.split(/\s+/).filter((word) => word.length > 0);
|
|
30820
|
+
const wordCount = words.length;
|
|
30821
|
+
const longestWord = longestHeroWord(words, policy);
|
|
30822
|
+
if (headline.length > heroTitleLengthThresholds.long.maxCharacters || longestWord > 18 || wordCount > heroTitleLengthThresholds.long.maxWords) return "long";
|
|
30823
|
+
if (headline.length > heroTitleLengthThresholds.medium.maxCharacters || longestWord > 12 || wordCount > heroTitleLengthThresholds.medium.maxWords) return "medium";
|
|
30824
|
+
return "short";
|
|
30825
|
+
}
|
|
30826
|
+
const heroContentWrapperClassTransform = {
|
|
30827
|
+
id: "ui.heroContentWrapperClass",
|
|
30828
|
+
kind: "string",
|
|
30829
|
+
summary: "Resolve hero content wrapper className from alignment + max width controls",
|
|
30830
|
+
schema: z.object({ base: z.string().optional() }),
|
|
30831
|
+
run: (value, options, context) => {
|
|
30832
|
+
const content = isPlainObject(value) ? value : isPlainObject(context.data) ? context.data : {};
|
|
30833
|
+
const alignment = resolveHeroContentAlignment(content);
|
|
30834
|
+
const maxWidth = resolveHeroContentMaxWidth(content);
|
|
30835
|
+
const typographyScale = resolveHeroTypographyScale(content);
|
|
30836
|
+
const titleLength = resolveHeroTitleLength(content);
|
|
30837
|
+
const textAlignClass = alignment === "center" ? "rb-text-center" : alignment === "right" ? "rb-text-right" : "rb-text-left";
|
|
30838
|
+
const maxWidthClass = maxWidth === "narrow" ? "rb-max-w-2xl" : maxWidth === "medium" ? "rb-max-w-3xl" : maxWidth === "wide" ? "rb-max-w-5xl" : "";
|
|
30839
|
+
const positionClass = alignment === "center" ? "rb-mx-auto" : alignment === "right" ? "rb-ml-auto" : "";
|
|
30840
|
+
return joinClasses([
|
|
30841
|
+
options?.base,
|
|
30842
|
+
textAlignClass,
|
|
30843
|
+
maxWidthClass,
|
|
30844
|
+
positionClass,
|
|
30845
|
+
...heroLegacyTypographyClasses(content, typographyScale, titleLength)
|
|
30846
|
+
]);
|
|
30847
|
+
}
|
|
30848
|
+
};
|
|
30849
|
+
const heroCtaJustifyTransform = {
|
|
30850
|
+
id: "ui.heroCtaJustify",
|
|
30851
|
+
kind: "string",
|
|
30852
|
+
summary: "Map hero contentAlignment to CTA row justify value",
|
|
30853
|
+
run: (value, _options, context) => {
|
|
30854
|
+
const alignment = resolveHeroContentAlignment(isPlainObject(value) ? value : isPlainObject(context.data) ? context.data : {});
|
|
30855
|
+
return alignment === "left" ? "start" : alignment === "right" ? "end" : "center";
|
|
30856
|
+
}
|
|
30857
|
+
};
|
|
30858
|
+
const heroStackJustifyFromVerticalAlignmentTransform = {
|
|
30859
|
+
id: "ui.heroStackJustifyFromVerticalAlignment",
|
|
30860
|
+
kind: "string",
|
|
30861
|
+
summary: "Map hero verticalAlignment to stack justify value",
|
|
30862
|
+
run: (value, _options, context) => {
|
|
30863
|
+
const vertical = resolveHeroVerticalAlignment(isPlainObject(value) ? value : isPlainObject(context.data) ? context.data : {});
|
|
30864
|
+
return vertical === "top" ? "start" : vertical === "bottom" ? "end" : "center";
|
|
30865
|
+
}
|
|
30866
|
+
};
|
|
30867
|
+
const heroGridClassFromVerticalAlignmentTransform = {
|
|
30868
|
+
id: "ui.heroGridClassFromVerticalAlignment",
|
|
30869
|
+
kind: "string",
|
|
30870
|
+
summary: "Append align-items class for hero split layouts based on verticalAlignment",
|
|
30871
|
+
schema: z.object({ base: z.string() }),
|
|
30872
|
+
run: (value, options, context) => {
|
|
30873
|
+
const vertical = resolveHeroVerticalAlignment(isPlainObject(value) ? value : isPlainObject(context.data) ? context.data : {});
|
|
30874
|
+
const itemsClass = vertical === "top" ? "rb-items-start" : vertical === "bottom" ? "rb-items-end" : "rb-items-center";
|
|
30875
|
+
return joinClasses([options.base, itemsClass]);
|
|
30876
|
+
}
|
|
30877
|
+
};
|
|
30878
|
+
const imageFragmentClassTransform = {
|
|
30879
|
+
id: "ui.imageFragmentClass",
|
|
30880
|
+
kind: "string",
|
|
30881
|
+
summary: "Return different classes based on aspectRatio (auto vs fixed)",
|
|
30882
|
+
schema: z.object({
|
|
30883
|
+
base: z.string(),
|
|
30884
|
+
whenAuto: z.string(),
|
|
30885
|
+
whenFixed: z.string()
|
|
30886
|
+
}),
|
|
30887
|
+
run: (value, options) => {
|
|
30888
|
+
const aspectRatio = typeof value === "string" ? value.trim() : "auto";
|
|
30889
|
+
const isAuto = aspectRatio === "" || aspectRatio === "auto";
|
|
30890
|
+
return joinClasses([options.base, isAuto ? options.whenAuto : options.whenFixed]);
|
|
30891
|
+
}
|
|
30892
|
+
};
|
|
30893
|
+
const imageFragmentSizeTransform = {
|
|
30894
|
+
id: "ui.imageFragmentSize",
|
|
30895
|
+
kind: "formatter",
|
|
30896
|
+
summary: "Derive Supabase render size options from an aspect ratio",
|
|
30897
|
+
schema: z.object({
|
|
30898
|
+
max: z.number().int().positive().default(1920),
|
|
30899
|
+
quality: z.number().int().min(1).max(100).default(85)
|
|
30900
|
+
}),
|
|
30901
|
+
run: (value, options) => {
|
|
30902
|
+
const ratio = parseRatio(value);
|
|
30903
|
+
const max = options.max ?? 1920;
|
|
30904
|
+
const quality = options.quality ?? 85;
|
|
30905
|
+
if (!ratio) return {
|
|
30906
|
+
width: max,
|
|
30907
|
+
quality,
|
|
30908
|
+
resize: "contain"
|
|
30909
|
+
};
|
|
30910
|
+
const isPortrait = ratio.h > ratio.w;
|
|
30911
|
+
return {
|
|
30912
|
+
width: isPortrait ? Math.round(max * ratio.w / ratio.h) : max,
|
|
30913
|
+
height: isPortrait ? max : Math.round(max * ratio.h / ratio.w),
|
|
30914
|
+
quality,
|
|
30915
|
+
resize: "cover"
|
|
30916
|
+
};
|
|
30917
|
+
}
|
|
30918
|
+
};
|
|
30919
|
+
const conditionalClassTransform = {
|
|
30920
|
+
id: "ui.conditionalClass",
|
|
30921
|
+
kind: "string",
|
|
30922
|
+
summary: "Return different classes based on boolean value",
|
|
30923
|
+
schema: z.object({
|
|
30924
|
+
whenTrue: z.string(),
|
|
30925
|
+
whenFalse: z.string()
|
|
30926
|
+
}),
|
|
30927
|
+
run: (value, options) => {
|
|
30928
|
+
return (typeof value === "boolean" ? value : Boolean(value)) ? options.whenTrue : options.whenFalse;
|
|
30929
|
+
}
|
|
30930
|
+
};
|
|
30931
|
+
const twoColumnContainerClassTransform = {
|
|
30932
|
+
id: "ui.twoColumnContainerClass",
|
|
30933
|
+
kind: "string",
|
|
30934
|
+
summary: "Append a desktop row-reverse class based on imagePosition",
|
|
30935
|
+
schema: z.object({
|
|
30936
|
+
base: z.string(),
|
|
30937
|
+
reverseClass: z.string()
|
|
30938
|
+
}),
|
|
30939
|
+
run: (value, options) => {
|
|
30940
|
+
const position = value === "right" ? "right" : "left";
|
|
30941
|
+
return joinClasses([options.base, position === "right" ? options.reverseClass : null]);
|
|
30942
|
+
}
|
|
30943
|
+
};
|
|
30944
|
+
const twoColumnFlexBasisTransform = {
|
|
30945
|
+
id: "ui.twoColumnFlexBasis",
|
|
30946
|
+
kind: "string",
|
|
30947
|
+
summary: "Map a ratio string to a flex-basis percentage for a 2-column layout",
|
|
30948
|
+
schema: z.object({ side: z.enum(["image", "text"]) }),
|
|
30949
|
+
run: (value, options) => {
|
|
30950
|
+
const ratio = typeof value === "string" ? value.trim() : "1/2";
|
|
30951
|
+
const imagePercent = ratio === "1/4" ? 25 : ratio === "1/3" ? 33.333 : ratio === "2/5" ? 40 : ratio === "2/3" ? 66.667 : 50;
|
|
30952
|
+
return `${options.side === "image" ? imagePercent : 100 - imagePercent}%`;
|
|
30953
|
+
}
|
|
30954
|
+
};
|
|
30955
|
+
const columnsDesktopSpanClassTransform = {
|
|
30956
|
+
id: "ui.columnsDesktopSpanClass",
|
|
30957
|
+
kind: "string",
|
|
30958
|
+
summary: "Append lg col-span class for editorial column layouts",
|
|
30959
|
+
schema: z.object({ base: z.string().optional() }),
|
|
30960
|
+
run: (value, options) => {
|
|
30961
|
+
const raw = typeof value === "string" ? value.trim() : "";
|
|
30962
|
+
const spanClass = raw === "2" ? "rb-lg-col-span-2" : raw === "3" ? "rb-lg-col-span-3" : raw === "4" ? "rb-lg-col-span-4" : "rb-lg-col-span-1";
|
|
30963
|
+
return joinClasses([options.base, spanClass]);
|
|
30964
|
+
}
|
|
30965
|
+
};
|
|
30966
|
+
const resolveColumnsGridCols$1 = (content) => {
|
|
30967
|
+
const items = Array.isArray(content.columns) ? content.columns : [];
|
|
30968
|
+
const count = Math.min(4, Math.max(1, items.length || 1));
|
|
30969
|
+
const configuredDesktopColumnsRaw = typeof content.desktopColumns === "string" ? content.desktopColumns : "auto";
|
|
30970
|
+
const desktopColumns = configuredDesktopColumnsRaw === "2" ? 2 : configuredDesktopColumnsRaw === "3" ? 3 : configuredDesktopColumnsRaw === "4" ? 4 : count;
|
|
30971
|
+
if (desktopColumns <= 1) return { base: 1 };
|
|
30972
|
+
if (desktopColumns === 2) return {
|
|
30973
|
+
base: 1,
|
|
30974
|
+
md: 2
|
|
30975
|
+
};
|
|
30976
|
+
if (desktopColumns === 3) return {
|
|
30977
|
+
base: 1,
|
|
30978
|
+
md: 2,
|
|
30979
|
+
lg: 3
|
|
30980
|
+
};
|
|
30981
|
+
return {
|
|
30982
|
+
base: 1,
|
|
30983
|
+
md: 2,
|
|
30984
|
+
lg: 3,
|
|
30985
|
+
xl: 4
|
|
30986
|
+
};
|
|
30987
|
+
};
|
|
30988
|
+
const uiTransforms = [
|
|
30989
|
+
{
|
|
30990
|
+
id: "look.splitMinHeight",
|
|
30991
|
+
kind: "string",
|
|
30992
|
+
run: (value) => asPartialObject(value)?._lookSlots === void 0 ? "clamp(18rem, 36vw, 34rem)" : void 0
|
|
30993
|
+
},
|
|
30994
|
+
headerNavLinkClassTransform,
|
|
30995
|
+
headingClassFromAlignment,
|
|
30996
|
+
bodyClassFromAlignment,
|
|
30997
|
+
stackAlignFromAlignment,
|
|
30998
|
+
sectionStateToneTransform,
|
|
30999
|
+
heroContentWrapperClassTransform,
|
|
31000
|
+
heroCtaJustifyTransform,
|
|
31001
|
+
heroStackJustifyFromVerticalAlignmentTransform,
|
|
31002
|
+
heroGridClassFromVerticalAlignmentTransform,
|
|
31003
|
+
imageFragmentClassTransform,
|
|
31004
|
+
imageFragmentSizeTransform,
|
|
31005
|
+
{
|
|
31006
|
+
id: "ui.imageShapeClassName",
|
|
31007
|
+
kind: "string",
|
|
31008
|
+
summary: "Apply a constrained media shape class",
|
|
31009
|
+
run: (value, options) => {
|
|
31010
|
+
return joinClasses([typeof options?.baseClass === "string" ? options.baseClass : "", imageShapeClassMap[typeof value === "string" ? value.trim() : "default"] ?? ""]);
|
|
31011
|
+
}
|
|
31012
|
+
},
|
|
31013
|
+
conditionalClassTransform,
|
|
31014
|
+
twoColumnContainerClassTransform,
|
|
31015
|
+
twoColumnFlexBasisTransform,
|
|
31016
|
+
columnsDesktopSpanClassTransform,
|
|
31017
|
+
{
|
|
31018
|
+
id: "ui.columnsGridCols",
|
|
31019
|
+
kind: "formatter",
|
|
31020
|
+
summary: "Resolve responsive grid column counts for columns block",
|
|
31021
|
+
run: (value) => {
|
|
31022
|
+
return resolveColumnsGridCols$1(asPartialObject(value) ?? {});
|
|
31023
|
+
}
|
|
31024
|
+
},
|
|
31025
|
+
{
|
|
31026
|
+
id: "ui.columnsColsAt",
|
|
31027
|
+
kind: "formatter",
|
|
31028
|
+
summary: "Resolve columns count for a specific breakpoint",
|
|
31029
|
+
schema: z.object({ breakpoint: z.enum([
|
|
31030
|
+
"mobile",
|
|
31031
|
+
"md",
|
|
31032
|
+
"lg",
|
|
31033
|
+
"xl"
|
|
31034
|
+
]) }),
|
|
31035
|
+
run: (value, options) => {
|
|
31036
|
+
const cols = resolveColumnsGridCols$1(asPartialObject(value) ?? {});
|
|
31037
|
+
const mobile = cols.base;
|
|
31038
|
+
const md = cols.md ?? mobile;
|
|
31039
|
+
const lg = cols.lg ?? md;
|
|
31040
|
+
const xl = cols.xl ?? lg;
|
|
31041
|
+
const resolved = options.breakpoint === "mobile" ? mobile : options.breakpoint === "md" ? md : options.breakpoint === "lg" ? lg : xl;
|
|
31042
|
+
return String(resolved);
|
|
31043
|
+
}
|
|
31044
|
+
},
|
|
31045
|
+
{
|
|
31046
|
+
id: "ui.ratioToHeightFactor",
|
|
31047
|
+
kind: "formatter",
|
|
31048
|
+
summary: "Convert a width/height aspect ratio string to a height factor (h/w)",
|
|
31049
|
+
run: (value) => ratioToHeightFactor(value)
|
|
31050
|
+
},
|
|
31051
|
+
{
|
|
31052
|
+
id: "ui.imageGalleryFilterClass",
|
|
31053
|
+
kind: "string",
|
|
31054
|
+
summary: "Map image filter selection to rb-* filter utility class",
|
|
31055
|
+
run: (value) => {
|
|
31056
|
+
switch (typeof value === "string" ? value.trim() : "none") {
|
|
31057
|
+
case "grayscale": return "rb-filter-grayscale";
|
|
31058
|
+
case "grayscale-hover-reveal": return "rb-filter-grayscale-hover-reveal";
|
|
31059
|
+
case "sepia": return "rb-filter-sepia";
|
|
31060
|
+
default: return "";
|
|
31061
|
+
}
|
|
31062
|
+
}
|
|
31063
|
+
},
|
|
31064
|
+
{
|
|
31065
|
+
id: "ui.imageGalleryTileClass",
|
|
31066
|
+
kind: "string",
|
|
31067
|
+
summary: "Compose image gallery tile wrapper classes (border + corners)",
|
|
31068
|
+
run: (value) => {
|
|
31069
|
+
const content = asPartialObject(value) ?? {};
|
|
31070
|
+
const cornersClass = imageGalleryCornerClassMap[typeof content.imageCorners === "string" ? content.imageCorners : "3xl"] ?? "rb-rounded-3xl";
|
|
31071
|
+
const border = content.imageBorder && typeof content.imageBorder === "object" ? content.imageBorder : {};
|
|
31072
|
+
const borderEnabled = border.enabled !== false;
|
|
31073
|
+
const borderWidth = typeof border.width === "string" ? border.width : "2";
|
|
31074
|
+
return joinClasses([
|
|
31075
|
+
"rb-overflow-hidden",
|
|
31076
|
+
"rb-relative",
|
|
31077
|
+
cornersClass,
|
|
31078
|
+
!borderEnabled ? "" : borderWidth === "1" ? "rb-border" : borderWidth === "2" ? "rb-border-2" : borderWidth === "3" ? "rb-border-3" : "rb-border-2"
|
|
31079
|
+
]);
|
|
31080
|
+
}
|
|
31081
|
+
},
|
|
31082
|
+
{
|
|
31083
|
+
id: "ui.imageGalleryTileStyle",
|
|
31084
|
+
kind: "formatter",
|
|
31085
|
+
summary: "Build image gallery tile inline styles (border color)",
|
|
31086
|
+
run: (value) => {
|
|
31087
|
+
const content = asPartialObject(value) ?? {};
|
|
31088
|
+
const borderColor = resolveBorderColorValue(content.imageBorder && typeof content.imageBorder === "object" ? content.imageBorder : {});
|
|
31089
|
+
return borderColor ? { borderColor } : void 0;
|
|
31090
|
+
}
|
|
31091
|
+
},
|
|
31092
|
+
{
|
|
31093
|
+
id: "ui.imageGalleryMarqueeTileStyle",
|
|
31094
|
+
kind: "formatter",
|
|
31095
|
+
summary: "Build marquee tile inline styles (border + fixed size)",
|
|
31096
|
+
run: (value) => {
|
|
31097
|
+
const content = asPartialObject(value) ?? {};
|
|
31098
|
+
const size = typeof content.marqueeImageSize === "string" ? content.marqueeImageSize : "md";
|
|
31099
|
+
const pixels = size === "sm" ? 200 : size === "lg" ? 320 : size === "xl" ? 400 : 256;
|
|
31100
|
+
const style = {
|
|
31101
|
+
width: `${pixels}px`,
|
|
31102
|
+
height: `${pixels}px`
|
|
31103
|
+
};
|
|
31104
|
+
const borderColor = resolveBorderColorValue(content.imageBorder && typeof content.imageBorder === "object" ? content.imageBorder : {});
|
|
31105
|
+
if (borderColor) style.borderColor = borderColor;
|
|
31106
|
+
return style;
|
|
31107
|
+
}
|
|
31108
|
+
},
|
|
31109
|
+
{
|
|
31110
|
+
id: "ui.imageGalleryMarqueeDuration",
|
|
31111
|
+
kind: "string",
|
|
31112
|
+
summary: "Map marquee speed selection to CSS duration",
|
|
31113
|
+
run: (value) => {
|
|
31114
|
+
const speed = typeof value === "string" ? value.trim() : "medium";
|
|
31115
|
+
return speed === "slow" ? "60s" : speed === "fast" ? "20s" : "40s";
|
|
31116
|
+
}
|
|
31117
|
+
},
|
|
31118
|
+
{
|
|
31119
|
+
id: "ui.imageGalleryMarqueeDirection",
|
|
31120
|
+
kind: "string",
|
|
31121
|
+
summary: "Map marquee direction selection to animation-direction",
|
|
31122
|
+
run: (value) => value === "right" ? "reverse" : "normal"
|
|
31123
|
+
},
|
|
31124
|
+
{
|
|
31125
|
+
id: "ui.eyebrowClassName",
|
|
31126
|
+
kind: "string",
|
|
31127
|
+
summary: "Apply a constrained Theme V2 eyebrow treatment class",
|
|
31128
|
+
run: (value, options) => {
|
|
31129
|
+
return joinClasses([typeof options?.baseClass === "string" ? options.baseClass : "rb-eyebrow", eyebrowTreatmentClassMap[isEyebrowTreatment(value) ? value : "plain"]]);
|
|
31130
|
+
}
|
|
31131
|
+
},
|
|
31132
|
+
{
|
|
31133
|
+
id: "ui.headingDecorationClassName",
|
|
31134
|
+
kind: "string",
|
|
31135
|
+
summary: "Apply constrained Theme V2 heading decoration classes",
|
|
31136
|
+
run: (value, options) => {
|
|
31137
|
+
const baseClass = typeof options?.baseClass === "string" && options.baseClass.trim() ? options.baseClass : "rb-heading-decoration";
|
|
31138
|
+
const decoration = asPartialObject(value);
|
|
31139
|
+
const family = isHeadingDecorationFamily(decoration?.family) ? decoration.family : null;
|
|
31140
|
+
const colorToken = isHeadingDecorationColorToken(decoration?.colorToken) ? decoration.colorToken : "primary";
|
|
31141
|
+
if (!family) return "rb-hidden";
|
|
31142
|
+
return joinClasses([
|
|
31143
|
+
baseClass,
|
|
31144
|
+
`rb-heading-decoration-${family}`,
|
|
31145
|
+
`rb-heading-decoration-color-${colorToken}`
|
|
31146
|
+
]);
|
|
31147
|
+
}
|
|
31148
|
+
}
|
|
31149
|
+
];
|
|
31150
|
+
function longestHeroWord(words, policy) {
|
|
31151
|
+
return policy === "look" ? Math.max(0, ...words.map((word) => word.length)) : 0;
|
|
31152
|
+
}
|
|
31153
|
+
function heroLegacyTypographyClasses(content, scale, length) {
|
|
31154
|
+
return content._effectiveLook ? [] : [scale ? `rb-hero-typography-${scale}` : "", `rb-hero-title-${length}`];
|
|
31155
|
+
}
|
|
31156
|
+
function heroHeadlineText(content, policy) {
|
|
31157
|
+
const plain = readString(content, "headline");
|
|
31158
|
+
return policy === "look" ? inlineTextToPlainText(coerceInlineTextWithFallback(content.headlineInline, plain)).trim() : plain?.trim() ?? "";
|
|
31159
|
+
}
|
|
31160
|
+
//#endregion
|
|
31161
|
+
//#region ../blocks/src/system/fields/aspectRatio.ts
|
|
31162
|
+
const standardAspectRatioOptions = [
|
|
31163
|
+
{
|
|
31164
|
+
value: "auto",
|
|
31165
|
+
label: "Auto (original)"
|
|
31166
|
+
},
|
|
31167
|
+
{
|
|
31168
|
+
value: "16/9",
|
|
31169
|
+
label: "16:9 (Landscape)"
|
|
31170
|
+
},
|
|
31171
|
+
{
|
|
31172
|
+
value: "4/3",
|
|
31173
|
+
label: "4:3 (Standard)"
|
|
31174
|
+
},
|
|
31175
|
+
{
|
|
31176
|
+
value: "1/1",
|
|
31177
|
+
label: "1:1 (Square)"
|
|
31178
|
+
},
|
|
31179
|
+
{
|
|
31180
|
+
value: "3/4",
|
|
31181
|
+
label: "3:4 (Portrait)"
|
|
31182
|
+
},
|
|
31183
|
+
{
|
|
31184
|
+
value: "9/16",
|
|
31185
|
+
label: "9:16 (Tall portrait)"
|
|
31186
|
+
}
|
|
31187
|
+
];
|
|
31188
|
+
function createAspectRatioField(options = {}) {
|
|
31189
|
+
return {
|
|
31190
|
+
id: options.id ?? "aspectRatio",
|
|
31191
|
+
type: "select",
|
|
31192
|
+
label: options.label ?? "Aspect ratio",
|
|
31193
|
+
...options.description ? { description: options.description } : {},
|
|
31194
|
+
required: false,
|
|
31195
|
+
defaultValue: options.defaultValue ?? "auto",
|
|
31196
|
+
multiple: false,
|
|
31197
|
+
options: [...standardAspectRatioOptions],
|
|
31198
|
+
ui: {
|
|
31199
|
+
intent: options.uiIntent ?? "display",
|
|
31200
|
+
...options.visibleWhen ? { visibleWhen: options.visibleWhen } : {}
|
|
31201
|
+
}
|
|
31202
|
+
};
|
|
31203
|
+
}
|
|
31204
|
+
//#endregion
|
|
31205
|
+
//#region ../blocks/src/system/fields/heroTitleSize.ts
|
|
31206
|
+
/**
|
|
31207
|
+
* The headline sizes owners can pick, the same in the content form and the
|
|
31208
|
+
* Look's knob. Older stored sizes (`editorial`, `poster`) still render.
|
|
31209
|
+
*/
|
|
31210
|
+
const heroTitleSizeOptions = [
|
|
31211
|
+
{
|
|
31212
|
+
value: "quiet",
|
|
31213
|
+
label: "Quieter"
|
|
31214
|
+
},
|
|
31215
|
+
{
|
|
31216
|
+
value: "auto",
|
|
31217
|
+
label: "Standard"
|
|
31218
|
+
},
|
|
31219
|
+
{
|
|
31220
|
+
value: "display",
|
|
31221
|
+
label: "Louder"
|
|
31222
|
+
}
|
|
31223
|
+
];
|
|
31224
|
+
//#endregion
|
|
31225
|
+
//#region ../blocks/src/system/fields/imageShape.ts
|
|
31226
|
+
const standardImageShapeOptions = [
|
|
31227
|
+
{
|
|
31228
|
+
value: "default",
|
|
31229
|
+
label: "Default"
|
|
31230
|
+
},
|
|
31231
|
+
{
|
|
31232
|
+
value: "square",
|
|
31233
|
+
label: "Square corners"
|
|
31234
|
+
},
|
|
31235
|
+
{
|
|
31236
|
+
value: "rounded",
|
|
31237
|
+
label: "Rounded corners"
|
|
31238
|
+
},
|
|
31239
|
+
{
|
|
31240
|
+
value: "circle",
|
|
31241
|
+
label: "Circle"
|
|
31242
|
+
},
|
|
31243
|
+
{
|
|
31244
|
+
value: "arch",
|
|
31245
|
+
label: "Arch"
|
|
31246
|
+
}
|
|
31247
|
+
];
|
|
31248
|
+
function createImageShapeField(options = {}) {
|
|
31249
|
+
return {
|
|
31250
|
+
id: options.id ?? "imageShape",
|
|
31251
|
+
type: "select",
|
|
31252
|
+
label: options.label ?? "Image shape",
|
|
31253
|
+
...options.description ? { description: options.description } : {},
|
|
31254
|
+
required: false,
|
|
31255
|
+
defaultValue: options.defaultValue ?? "default",
|
|
31256
|
+
multiple: false,
|
|
31257
|
+
options: [...standardImageShapeOptions],
|
|
31258
|
+
ui: {
|
|
31259
|
+
intent: options.uiIntent ?? "display",
|
|
31260
|
+
...options.visibleWhen ? { visibleWhen: options.visibleWhen } : {}
|
|
31261
|
+
}
|
|
31262
|
+
};
|
|
31263
|
+
}
|
|
31264
|
+
//#endregion
|
|
31265
|
+
//#region ../blocks/src/system/customize/facets.ts
|
|
31266
|
+
function defineCustomizeFacet(definition) {
|
|
31267
|
+
return definition;
|
|
31268
|
+
}
|
|
31269
|
+
const eventCalendarListLayoutFacet = defineCustomizeFacet({
|
|
31270
|
+
blockKind: "block.event-calendar",
|
|
31271
|
+
id: "eventCalendar.listLayout",
|
|
31272
|
+
label: "List style",
|
|
31273
|
+
legacyOnly: true,
|
|
31274
|
+
values: eventCalendarListLayoutOptions.map((option) => ({
|
|
31275
|
+
value: option.id,
|
|
31276
|
+
label: option.label
|
|
31277
|
+
})),
|
|
31278
|
+
defaultValue: "stack",
|
|
31279
|
+
target: { kind: "event-calendar-list-layout-content" },
|
|
31280
|
+
appliesToLayoutVariants: eventCalendarListLayoutCompatibleDisplayModeValues
|
|
31281
|
+
});
|
|
31282
|
+
const fixedKnob = (blockKind, id, label, values, defaultValue, ordered = false, boolean = false) => ({
|
|
31283
|
+
blockKind,
|
|
31284
|
+
id,
|
|
31285
|
+
label,
|
|
31286
|
+
values,
|
|
31287
|
+
defaultValue,
|
|
31288
|
+
knob: {
|
|
31289
|
+
kind: "fixed",
|
|
31290
|
+
ordered
|
|
31291
|
+
},
|
|
31292
|
+
target: {
|
|
31293
|
+
kind: "content-field",
|
|
31294
|
+
field: id,
|
|
31295
|
+
...boolean ? { boolean: true } : {}
|
|
31296
|
+
}
|
|
31297
|
+
});
|
|
31298
|
+
const textKnob = (id, label, maxLength) => ({
|
|
31299
|
+
blockKind: "block.hero",
|
|
31300
|
+
id,
|
|
31301
|
+
label,
|
|
31302
|
+
values: [],
|
|
31303
|
+
defaultValue: "",
|
|
31304
|
+
knob: {
|
|
31305
|
+
kind: "text",
|
|
31306
|
+
maxLength
|
|
31307
|
+
},
|
|
31308
|
+
target: {
|
|
31309
|
+
kind: "content-field",
|
|
31310
|
+
field: id
|
|
31311
|
+
}
|
|
31312
|
+
});
|
|
31313
|
+
const onOff = [{
|
|
31314
|
+
value: "true",
|
|
31315
|
+
label: "On"
|
|
31316
|
+
}, {
|
|
31317
|
+
value: "false",
|
|
31318
|
+
label: "Off"
|
|
31319
|
+
}];
|
|
31320
|
+
const columnCounts = [
|
|
31321
|
+
{
|
|
31322
|
+
value: "2",
|
|
31323
|
+
label: "2"
|
|
31324
|
+
},
|
|
31325
|
+
{
|
|
31326
|
+
value: "3",
|
|
31327
|
+
label: "3"
|
|
31328
|
+
},
|
|
31329
|
+
{
|
|
31330
|
+
value: "4",
|
|
31331
|
+
label: "4"
|
|
31332
|
+
}
|
|
31333
|
+
];
|
|
31334
|
+
const systemCustomizeFacetDefinitions = [
|
|
31335
|
+
eventCalendarListLayoutFacet,
|
|
31336
|
+
fixedKnob("block.offerings-preview", "grouping", "Grouping", [{
|
|
31337
|
+
value: "by-kind",
|
|
31338
|
+
label: "Grouped by kind"
|
|
31339
|
+
}, {
|
|
31340
|
+
value: "one-list",
|
|
31341
|
+
label: "One list"
|
|
31342
|
+
}], "by-kind"),
|
|
31343
|
+
fixedKnob("block.offerings-preview", "dates", "Dates", [{
|
|
31344
|
+
value: "summary",
|
|
31345
|
+
label: "Summary"
|
|
31346
|
+
}, {
|
|
31347
|
+
value: "next-dates",
|
|
31348
|
+
label: "Next dates"
|
|
31349
|
+
}], "summary"),
|
|
31350
|
+
{
|
|
31351
|
+
...fixedKnob("block.feature-cards", "actionStyle", "Item actions", [{
|
|
31352
|
+
value: "button",
|
|
31353
|
+
label: "Button"
|
|
31354
|
+
}, {
|
|
31355
|
+
value: "link",
|
|
31356
|
+
label: "Link"
|
|
31357
|
+
}], "button"),
|
|
31358
|
+
blockKinds: cardListKnobBlocks
|
|
31359
|
+
},
|
|
31360
|
+
fixedKnob("block.testimonials", "quoteCount", "How many quotes", [
|
|
31361
|
+
{
|
|
31362
|
+
value: "1",
|
|
31363
|
+
label: "1"
|
|
31364
|
+
},
|
|
31365
|
+
{
|
|
31366
|
+
value: "2",
|
|
31367
|
+
label: "2"
|
|
31368
|
+
},
|
|
31369
|
+
{
|
|
31370
|
+
value: "3",
|
|
31371
|
+
label: "3"
|
|
31372
|
+
},
|
|
31373
|
+
{
|
|
31374
|
+
value: "all",
|
|
31375
|
+
label: "All"
|
|
31376
|
+
}
|
|
31377
|
+
], "3", true),
|
|
31378
|
+
{
|
|
31379
|
+
...fixedKnob("block.testimonials", "autoAdvance", "Moves on by itself", onOff, "false", false, true),
|
|
31380
|
+
description: "Moves to the next quote every few seconds, and stops while someone's reading."
|
|
31381
|
+
},
|
|
31382
|
+
fixedKnob("block.testimonials", "tilt", "Tilt the small cards", onOff, "true", false, true),
|
|
31383
|
+
{
|
|
31384
|
+
...fixedKnob("block.testimonials", "archFrame", "Arch frame", onOff, "true", false, true),
|
|
31385
|
+
blockKinds: [
|
|
31386
|
+
"block.testimonials",
|
|
31387
|
+
"block.newsletter-signup",
|
|
31388
|
+
"block.form"
|
|
31389
|
+
]
|
|
31390
|
+
},
|
|
31391
|
+
fixedKnob("block.hero", "photoTint", "Photo tint", [{
|
|
31392
|
+
value: "dark",
|
|
31393
|
+
label: "Dark"
|
|
31394
|
+
}, {
|
|
31395
|
+
value: "brand",
|
|
31396
|
+
label: "Brand colour"
|
|
31397
|
+
}], "dark"),
|
|
31398
|
+
fixedKnob("block.hero", "candleGlow", "Candle glow", onOff, "true", false, true),
|
|
31399
|
+
fixedKnob("block.hero", "columnGuides", "Column guides", onOff, "true", false, true),
|
|
31400
|
+
fixedKnob("block.hero", "titleSize", "Headline size", heroTitleSizeOptions, "auto", true),
|
|
31401
|
+
fixedKnob("block.hero", "imagePosition", "Photo side", [{
|
|
31402
|
+
value: "left",
|
|
31403
|
+
label: "Left"
|
|
31404
|
+
}, {
|
|
31405
|
+
value: "right",
|
|
31406
|
+
label: "Right"
|
|
31407
|
+
}], "right"),
|
|
31408
|
+
fixedKnob("block.intro", "imageShape", "Media shape", standardImageShapeOptions, "default"),
|
|
31409
|
+
fixedKnob("block.intro", "imagePosition", "Photo side", [{
|
|
31410
|
+
value: "left",
|
|
31411
|
+
label: "Left"
|
|
31412
|
+
}, {
|
|
31413
|
+
value: "right",
|
|
31414
|
+
label: "Right"
|
|
31415
|
+
}], "left"),
|
|
31416
|
+
fixedKnob("block.media-text", "imagePosition", "Photo side", [{
|
|
31417
|
+
value: "left",
|
|
31418
|
+
label: "Left"
|
|
31419
|
+
}, {
|
|
31420
|
+
value: "right",
|
|
31421
|
+
label: "Right"
|
|
31422
|
+
}], "left"),
|
|
31423
|
+
fixedKnob("block.media-text", "imageShape", "Media shape", standardImageShapeOptions, "default"),
|
|
31424
|
+
fixedKnob("block.media-text", "aspectRatio", "Media aspect ratio", standardAspectRatioOptions, "auto"),
|
|
31425
|
+
textKnob("stickerLine", "Sticker line", 32),
|
|
31426
|
+
textKnob("smallCaption", "Small caption", 24),
|
|
31427
|
+
{
|
|
31428
|
+
...fixedKnob("block.feature-cards", "showPhotos", "Show photos", onOff, "true", false, true),
|
|
31429
|
+
blockKinds: cardListFamilyBlocks
|
|
31430
|
+
},
|
|
31431
|
+
fixedKnob("block.feature-cards", "columns", "Columns", columnCounts, "3", true),
|
|
31432
|
+
fixedKnob("block.image-gallery", "blackAndWhite", "Black and white", onOff, "false", false, true),
|
|
31433
|
+
fixedKnob("block.event-calendar", "listColumns", "Columns", columnCounts, "3", true),
|
|
31434
|
+
fixedKnob("block.event-calendar", "showPhotos", "Photos", [{
|
|
31435
|
+
value: "true",
|
|
31436
|
+
label: "Show"
|
|
31437
|
+
}, {
|
|
31438
|
+
value: "false",
|
|
31439
|
+
label: "Hide"
|
|
31440
|
+
}], "true", false, true),
|
|
31441
|
+
{
|
|
31442
|
+
...fixedKnob("block.feature-cards", "cardMarker", "Item markers", [
|
|
31443
|
+
{
|
|
31444
|
+
value: "icons",
|
|
31445
|
+
label: "Icons"
|
|
31446
|
+
},
|
|
31447
|
+
{
|
|
31448
|
+
value: "numbers",
|
|
31449
|
+
label: "Numbers"
|
|
31450
|
+
},
|
|
31451
|
+
{
|
|
31452
|
+
value: "none",
|
|
31453
|
+
label: "None"
|
|
31454
|
+
}
|
|
31455
|
+
], "icons"),
|
|
31456
|
+
blockKinds: cardListFamilyBlocks
|
|
31457
|
+
},
|
|
31458
|
+
fixedKnob("block.body-text", "alignment", "Text alignment", [{
|
|
31459
|
+
value: "left",
|
|
31460
|
+
label: "Left"
|
|
31461
|
+
}, {
|
|
31462
|
+
value: "center",
|
|
31463
|
+
label: "Centre"
|
|
31464
|
+
}], "left"),
|
|
31465
|
+
{
|
|
31466
|
+
...fixedKnob("block.event-calendar", "showCapacity", "Places left", onOff, "true", false, true),
|
|
31467
|
+
description: "Show how many places are left on each event"
|
|
31468
|
+
}
|
|
31469
|
+
];
|
|
31470
|
+
systemCustomizeFacetDefinitions.map((definition) => definition.id);
|
|
31471
|
+
Array.from(new Set(systemCustomizeFacetDefinitions.flatMap((definition) => definition.values.map((option) => option.value))));
|
|
31472
|
+
function systemCustomizeFacetDefinitionsForBlock(blockKind) {
|
|
31473
|
+
return systemCustomizeFacetDefinitions.filter((definition) => definition.blockKind === blockKind || "blockKinds" in definition && definition.blockKinds?.some((kind) => kind === blockKind));
|
|
31474
|
+
}
|
|
31475
|
+
//#endregion
|
|
31476
|
+
//#region ../blocks/src/system/customize/arrangementKnobs.ts
|
|
31477
|
+
/**
|
|
31478
|
+
* Content stage for knobs, shared by the renderer and the editor so what the
|
|
31479
|
+
* options show and what renders can't disagree. Knob buffets are the block's
|
|
31480
|
+
* customise facets; the Look exposes, forces or narrows them and the style's
|
|
31481
|
+
* offer can only remove or narrow further.
|
|
31482
|
+
*/
|
|
31483
|
+
function resolveArrangementKnobs(input) {
|
|
31484
|
+
const length = input.blockKind === "block.hero" ? resolveHeroTitleLength({ ...input.content }, "look") : null;
|
|
31485
|
+
const exposure = arrangementKnobExposure(input.blockKind, input.look, length, storedSplitPhotoSide(input.blockKind, input.content));
|
|
31486
|
+
return {
|
|
31487
|
+
length,
|
|
31488
|
+
exposure,
|
|
31489
|
+
knobs: resolveEffectiveKnobs({
|
|
31490
|
+
exposure,
|
|
31491
|
+
content: normalizedHeadlinePreference(input.content)
|
|
31492
|
+
})
|
|
31493
|
+
};
|
|
31494
|
+
}
|
|
31495
|
+
function arrangementKnobExposure(blockKind, look, length, splitPhotoSide) {
|
|
31496
|
+
return systemCustomizeFacetDefinitionsForBlock(blockKind).flatMap((facet) => {
|
|
31497
|
+
if (facet.knob === void 0 || facet.target.kind !== "content-field") return [];
|
|
31498
|
+
const id = facet.target.field;
|
|
31499
|
+
const defaults = look.look.structure.knobDefaults ?? {};
|
|
31500
|
+
const storedDefault = id === "imagePosition" ? splitPhotoSide : null;
|
|
31501
|
+
return [{
|
|
31502
|
+
definition: {
|
|
31503
|
+
id,
|
|
31504
|
+
defaultValue: defaults[id] ?? storedDefault ?? facet.defaultValue,
|
|
31505
|
+
values: facet.values.map((value) => value.value),
|
|
31506
|
+
...knobKindMetadata(facet.knob)
|
|
31507
|
+
},
|
|
31508
|
+
exposed: exposedKnobIds(look).includes(id),
|
|
31509
|
+
forced: look.look.structure.forcedKnobs?.[id],
|
|
31510
|
+
lookValues: look.look.structure.knobValues?.[id],
|
|
31511
|
+
styleValues: look.knobValues[id],
|
|
31512
|
+
lengthValues: id === "titleSize" ? headlineAllowedValues(length) : void 0
|
|
31513
|
+
}];
|
|
31514
|
+
});
|
|
31515
|
+
}
|
|
31516
|
+
/**
|
|
31517
|
+
* A hero stored as "Split, photo on the left" or "Split, photo on the right"
|
|
31518
|
+
* already says which side its photo is on. Under a Look that side is the Photo
|
|
31519
|
+
* side default, so the photo stays where it was until the owner picks a side.
|
|
31520
|
+
*/
|
|
31521
|
+
function storedSplitPhotoSide(blockKind, content) {
|
|
31522
|
+
if (blockKind !== "block.hero") return null;
|
|
31523
|
+
switch (content.variant) {
|
|
31524
|
+
case "split": return "left";
|
|
31525
|
+
case "splitReverse": return "right";
|
|
31526
|
+
default: return null;
|
|
31527
|
+
}
|
|
31528
|
+
}
|
|
31529
|
+
function knobKindMetadata(knob) {
|
|
31530
|
+
return knob.kind === "fixed" ? { ordered: knob.ordered } : {
|
|
31531
|
+
ordered: false,
|
|
31532
|
+
textMaxLength: knob.maxLength
|
|
31533
|
+
};
|
|
31534
|
+
}
|
|
31535
|
+
function headlineAllowedValues(length) {
|
|
31536
|
+
switch (length) {
|
|
31537
|
+
case "long": return ["quiet"];
|
|
31538
|
+
case "medium": return ["quiet", "auto"];
|
|
31539
|
+
case "short": return [
|
|
31540
|
+
"quiet",
|
|
31541
|
+
"auto",
|
|
31542
|
+
"display"
|
|
31543
|
+
];
|
|
31544
|
+
case null: return;
|
|
31545
|
+
}
|
|
31546
|
+
}
|
|
31547
|
+
/** `titleSize` keeps its five stored values; under a Look they read as three steps. */
|
|
31548
|
+
function normalizedHeadlinePreference(content) {
|
|
31549
|
+
switch (content.titleSize) {
|
|
31550
|
+
case "editorial": return {
|
|
31551
|
+
...content,
|
|
31552
|
+
titleSize: "auto"
|
|
31553
|
+
};
|
|
31554
|
+
case "poster": return {
|
|
31555
|
+
...content,
|
|
31556
|
+
titleSize: "display"
|
|
31557
|
+
};
|
|
31558
|
+
default: return content;
|
|
31559
|
+
}
|
|
31560
|
+
}
|
|
31561
|
+
function exposedKnobIds(look) {
|
|
31562
|
+
return [...look.look.structure.knobs, ...look.addKnobs ?? []].filter((id) => !look.removeKnobs.some((removed) => removed === id));
|
|
31563
|
+
}
|
|
29869
31564
|
//#endregion
|
|
29870
31565
|
//#region ../blocks/src/system/media/slotContracts.ts
|
|
29871
31566
|
const DEFAULT_MIN_SOURCE_WIDTH = 1200;
|
|
@@ -30273,14 +31968,68 @@ function resolveStrategyDelivery(blockKind, fieldPath, slotPath, values) {
|
|
|
30273
31968
|
if (blockKind === "block.site-header" && slotPath === "logo") return resolveSmallLogoDeliveryContract();
|
|
30274
31969
|
if (blockKind === "block.site-footer" && slotPath === "logo") return resolveSmallLogoDeliveryContract();
|
|
30275
31970
|
}
|
|
30276
|
-
function
|
|
31971
|
+
function isLookPhotoSlot(blockKind, path) {
|
|
31972
|
+
switch (blockKind) {
|
|
31973
|
+
case "block.image-gallery":
|
|
31974
|
+
case "block.media-text": return /^images\.\d+\.image$/.test(path);
|
|
31975
|
+
case "block.intro": return path === "media";
|
|
31976
|
+
default: return false;
|
|
31977
|
+
}
|
|
31978
|
+
}
|
|
31979
|
+
/** Resolve live editor preferences through the same knob owner as the page planner. */
|
|
31980
|
+
function mediaKnobValues(blockKind, mediaLook, values) {
|
|
31981
|
+
const { knobs } = resolveArrangementKnobs({
|
|
31982
|
+
blockKind,
|
|
31983
|
+
look: mediaLook,
|
|
31984
|
+
content: values
|
|
31985
|
+
});
|
|
31986
|
+
return Object.fromEntries(Object.entries(knobs).flatMap(([key, knob]) => knob.kind === "kept" ? [] : [[key, knob.value]]));
|
|
31987
|
+
}
|
|
31988
|
+
/** Delivery receives content whose knob choices have already been resolved by the page planner. */
|
|
31989
|
+
function renderedLookMediaFrame(values) {
|
|
31990
|
+
const effective = asRecord(values._effectiveLook);
|
|
31991
|
+
const look = blockAppearancePresets.find((candidate) => candidate.id === effectiveLookId(values));
|
|
31992
|
+
if (look?.structure.kind !== "arrangement") return void 0;
|
|
31993
|
+
return resolveLookMediaFrame(look.structure.mediaFrame, asString(effective?.skin), {
|
|
31994
|
+
...values,
|
|
31995
|
+
...look.structure.forcedKnobs
|
|
31996
|
+
});
|
|
31997
|
+
}
|
|
31998
|
+
function editorLookMediaFrame(blockKind, mediaLook, values) {
|
|
31999
|
+
return resolveLookMediaFrame(mediaLook.look.structure.mediaFrame, mediaLook.skin, mediaKnobValues(blockKind, mediaLook, values));
|
|
32000
|
+
}
|
|
32001
|
+
/** Backgrounds and other photos keep their own contract. */
|
|
32002
|
+
function slotLookMediaFrame(blockKind, path, input) {
|
|
32003
|
+
if (!blockKind || !isLookPhotoSlot(blockKind, path)) return void 0;
|
|
32004
|
+
if (input.lookMediaFrame) return input.lookMediaFrame;
|
|
32005
|
+
const values = input.values ?? {};
|
|
32006
|
+
return input.mediaLook ? editorLookMediaFrame(blockKind, input.mediaLook, values) : renderedLookMediaFrame(values);
|
|
32007
|
+
}
|
|
32008
|
+
/** The contract and its decided frame, shared by editor presentation and delivery. */
|
|
32009
|
+
function resolveMediaSlot({ blockKind, fieldPath, values, fieldAspectRatio, fieldUi, lookMediaFrame, mediaLook }) {
|
|
30277
32010
|
const slotPath = normalizeSlotPath(fieldPath);
|
|
30278
32011
|
const variant = asString(values?.variant);
|
|
30279
|
-
const
|
|
32012
|
+
const declared = slotLookMediaFrame(blockKind, fieldPath, {
|
|
32013
|
+
lookMediaFrame,
|
|
32014
|
+
mediaLook,
|
|
32015
|
+
values
|
|
32016
|
+
});
|
|
32017
|
+
const frame = declared?.kind === "fixed" ? declared : void 0;
|
|
32018
|
+
const edit = frame ? {
|
|
32019
|
+
mode: "fixed-aspect",
|
|
32020
|
+
aspectRatio: frame.aspectRatio,
|
|
32021
|
+
...getMinSourceConstraints(frame.aspectRatio, DEFAULT_MIN_SOURCE_WIDTH)
|
|
32022
|
+
} : resolveEditContract(blockKind, fieldPath, slotPath, values, fieldAspectRatio);
|
|
30280
32023
|
const defaultDelivery = resolveDefaultDeliveryContract(slotPath);
|
|
30281
32024
|
const fieldDelivery = resolveFieldUiDeliveryConfig(fieldUi, variant);
|
|
30282
32025
|
const strategyDelivery = resolveStrategyDelivery(blockKind, fieldPath, slotPath, values);
|
|
30283
|
-
return
|
|
32026
|
+
return {
|
|
32027
|
+
contract: buildContract(edit, mergeDelivery(mergeDelivery(defaultDelivery, fieldDelivery), strategyDelivery)),
|
|
32028
|
+
mediaFrame: frame
|
|
32029
|
+
};
|
|
32030
|
+
}
|
|
32031
|
+
function resolveMediaSlotContract(input) {
|
|
32032
|
+
return resolveMediaSlot(input).contract;
|
|
30284
32033
|
}
|
|
30285
32034
|
//#endregion
|
|
30286
32035
|
//#region ../blocks/src/system/runtime/nodes/media.tsx
|
|
@@ -30555,10 +32304,17 @@ const debugMediaNodeLog = (...args) => {
|
|
|
30555
32304
|
if (typeof window === "undefined") return;
|
|
30556
32305
|
if (Reflect.get(window, "__DEBUG_MEDIA_NODE__") === true) console.log("[MediaNode]", ...args);
|
|
30557
32306
|
};
|
|
32307
|
+
/** Keep responsive delivery and transform selection on the slot's decided crop. */
|
|
32308
|
+
function resolveMediaNodeAspectRatios(size, style, slotContract) {
|
|
32309
|
+
const slotAspect = slotContract?.edit.mode === "fixed-aspect" ? slotContract.edit.aspectRatio : void 0;
|
|
32310
|
+
return {
|
|
32311
|
+
targetAspectRatio: parseAspectRatioValue(slotAspect),
|
|
32312
|
+
transformAspectRatio: slotAspect ?? resolveStyleAspectRatio(style) ?? resolveTargetAspectRatio(size)
|
|
32313
|
+
};
|
|
32314
|
+
}
|
|
30558
32315
|
function resolveMediaNodeResponsiveImage(value, size, style, slot, context) {
|
|
30559
|
-
const transformAspectRatio = resolveStyleAspectRatio(style) ?? resolveTargetAspectRatio(size);
|
|
30560
32316
|
const slotContract = resolveSlotContract(slot);
|
|
30561
|
-
const targetAspectRatio =
|
|
32317
|
+
const { targetAspectRatio, transformAspectRatio } = resolveMediaNodeAspectRatios(size, style, slotContract);
|
|
30562
32318
|
const responsive = slotContract ? resolveImageSourceSetWithContext(value, {
|
|
30563
32319
|
widthCandidates: slotContract.delivery.widthCandidates,
|
|
30564
32320
|
sizes: slotContract.delivery.sizes,
|
|
@@ -31138,7 +32894,7 @@ function shownVenue(event, display) {
|
|
|
31138
32894
|
}
|
|
31139
32895
|
/** Full/waitlist explanations remain visible even when optional counts are hidden. */
|
|
31140
32896
|
function placesLeftLabel(source, display, wording = {}) {
|
|
31141
|
-
if ("kind" in source) return ticketPlacesLabel(source
|
|
32897
|
+
if ("kind" in source) return ticketPlacesLabel(source, display);
|
|
31142
32898
|
if (source.deliveryMode === "hybrid" && source.attendanceModes?.length) return hybridPlacesLabel(source, display, wording);
|
|
31143
32899
|
return capacityPlacesLabel(source, display, wording);
|
|
31144
32900
|
}
|
|
@@ -31160,7 +32916,9 @@ function hybridPlacesLabel(event, display, wording) {
|
|
|
31160
32916
|
return label ? [`${mode.mode === "online" ? "Online" : "In person"}: ${label}`] : [];
|
|
31161
32917
|
}).join(" · ") || null;
|
|
31162
32918
|
}
|
|
31163
|
-
function ticketPlacesLabel(
|
|
32919
|
+
function ticketPlacesLabel(source, display) {
|
|
32920
|
+
const { remaining, dateRemaining } = source;
|
|
32921
|
+
if (remaining !== null && dateRemaining !== null && remaining >= dateRemaining) return null;
|
|
31164
32922
|
if (remaining !== null && remaining > 0 && display.placesLeft === "hidden") return null;
|
|
31165
32923
|
return formatTicketTypeRemaining(remaining);
|
|
31166
32924
|
}
|
|
@@ -32053,40 +33811,74 @@ function selectionPreviewKey(code, lines) {
|
|
|
32053
33811
|
if (code !== null && !trimmed || !lines) return null;
|
|
32054
33812
|
return JSON.stringify([trimmed, lines]);
|
|
32055
33813
|
}
|
|
33814
|
+
/**
|
|
33815
|
+
* The lines' sum, shown as "Subtotal" only when something comes off it;
|
|
33816
|
+
* otherwise the lines lead straight to the total.
|
|
33817
|
+
*/
|
|
33818
|
+
function paymentSubtotal(subtotalCents, reductions) {
|
|
33819
|
+
return reductions.length > 0 ? subtotalCents : null;
|
|
33820
|
+
}
|
|
33821
|
+
/** "4 dates, 1 place on each", above the list. */
|
|
33822
|
+
function paymentCaption(several, items, places) {
|
|
33823
|
+
return `${plural(items, several === "runs" ? "run" : "date")}, ${plural(places, "place")} on each`;
|
|
33824
|
+
}
|
|
33825
|
+
/** The multiplier for a line, when its amount splits evenly into a price per place. */
|
|
33826
|
+
function paymentLine(input) {
|
|
33827
|
+
const { key, label, amountCents, places, unitPriceCents } = input;
|
|
33828
|
+
return {
|
|
33829
|
+
key,
|
|
33830
|
+
label,
|
|
33831
|
+
amountCents,
|
|
33832
|
+
multiplier: places > 1 && unitPriceCents !== null && unitPriceCents * places === amountCents ? {
|
|
33833
|
+
places,
|
|
33834
|
+
unitPriceCents
|
|
33835
|
+
} : null
|
|
33836
|
+
};
|
|
33837
|
+
}
|
|
32056
33838
|
const USUAL_PRICE = "At the usual price";
|
|
32057
|
-
function plannedGroups(plan) {
|
|
33839
|
+
function plannedGroups(plan, unitPrices) {
|
|
32058
33840
|
const label = (lineId) => plan.lines.find((row) => row.line.lineId === lineId)?.line.label ?? "";
|
|
32059
33841
|
const combined = plan.applications.map((app, index) => ({
|
|
32060
33842
|
key: `combination-${index}`,
|
|
32061
33843
|
heading: app.offer.label,
|
|
32062
|
-
lines: app.allocations.map((row) => ({
|
|
33844
|
+
lines: app.allocations.map((row) => paymentLine({
|
|
32063
33845
|
key: row.lineId,
|
|
32064
33846
|
label: label(row.lineId),
|
|
32065
|
-
amountCents: row.totalCents
|
|
33847
|
+
amountCents: row.totalCents,
|
|
33848
|
+
places: plan.places,
|
|
33849
|
+
unitPriceCents: null
|
|
32066
33850
|
}))
|
|
32067
33851
|
}));
|
|
32068
|
-
const usual = plan.lines.filter((row) => !row.combined).map((row) => (
|
|
32069
|
-
key: row.line.lineId,
|
|
32070
|
-
label: row.line.label,
|
|
32071
|
-
amountCents: row.listCents
|
|
32072
|
-
}));
|
|
33852
|
+
const usual = plan.lines.filter((row) => !row.combined).map((row) => planLine(plan, unitPrices, row.line.lineId, row.line.label, row.listCents));
|
|
32073
33853
|
return [...combined, ...usual.length > 0 ? [{
|
|
32074
33854
|
key: "usual",
|
|
32075
33855
|
heading: USUAL_PRICE,
|
|
32076
33856
|
lines: usual
|
|
32077
33857
|
}] : []];
|
|
32078
33858
|
}
|
|
32079
|
-
function usualGroups(plan) {
|
|
33859
|
+
function usualGroups(plan, unitPrices) {
|
|
32080
33860
|
return [{
|
|
32081
33861
|
key: "usual",
|
|
32082
33862
|
heading: null,
|
|
32083
|
-
lines: plan.lines.map((row) => (
|
|
32084
|
-
key: row.line.lineId,
|
|
32085
|
-
label: row.line.label,
|
|
32086
|
-
amountCents: row.listCents
|
|
32087
|
-
}))
|
|
33863
|
+
lines: plan.lines.map((row) => planLine(plan, unitPrices, row.line.lineId, row.line.label, row.listCents))
|
|
32088
33864
|
}];
|
|
32089
33865
|
}
|
|
33866
|
+
function selectionUnitPrices(selection, unitPriceOf) {
|
|
33867
|
+
return new Map(selection.flatMap((event) => {
|
|
33868
|
+
const unitPriceCents = unitPriceOf(event);
|
|
33869
|
+
return unitPriceCents === null ? [] : [[lineIdOf(event), unitPriceCents]];
|
|
33870
|
+
}));
|
|
33871
|
+
}
|
|
33872
|
+
/** An item at its usual price, with its known price per place. */
|
|
33873
|
+
function planLine(plan, unitPrices, key, label, amountCents) {
|
|
33874
|
+
return paymentLine({
|
|
33875
|
+
key,
|
|
33876
|
+
label,
|
|
33877
|
+
amountCents,
|
|
33878
|
+
places: plan.places,
|
|
33879
|
+
unitPriceCents: unitPrices.get(key) ?? null
|
|
33880
|
+
});
|
|
33881
|
+
}
|
|
32090
33882
|
function sumKind(reductions, kind) {
|
|
32091
33883
|
return reductions.filter((row) => row.kind === kind).reduce((sum, row) => sum + row.amountCents, 0);
|
|
32092
33884
|
}
|
|
@@ -32108,8 +33900,8 @@ function codeNote(plan, several) {
|
|
|
32108
33900
|
const noun = several === "dates" ? "date" : "run";
|
|
32109
33901
|
return `This code can’t be used with the “${label}” price, so it’s been taken off your other ${others === 1 ? noun : `${noun}s`}.`;
|
|
32110
33902
|
}
|
|
32111
|
-
function
|
|
32112
|
-
return
|
|
33903
|
+
function planCaption(plan, several) {
|
|
33904
|
+
return paymentCaption(several, plan.lines.length, plan.places);
|
|
32113
33905
|
}
|
|
32114
33906
|
/**
|
|
32115
33907
|
* The payment step's list when combinations apply: each combination's items
|
|
@@ -32128,9 +33920,9 @@ function summariseCombinedPayment(input) {
|
|
|
32128
33920
|
if (!planCombines(plan)) return null;
|
|
32129
33921
|
return {
|
|
32130
33922
|
kind: "combined",
|
|
32131
|
-
|
|
32132
|
-
groups: plannedGroups(plan),
|
|
32133
|
-
subtotalCents:
|
|
33923
|
+
caption: planCaption(plan, input.several),
|
|
33924
|
+
groups: plannedGroups(plan, input.unitPrices),
|
|
33925
|
+
subtotalCents: null,
|
|
32134
33926
|
reductions: [],
|
|
32135
33927
|
note: null,
|
|
32136
33928
|
totalCents: plan.totalCents,
|
|
@@ -32167,7 +33959,7 @@ function previewedPayment(input) {
|
|
|
32167
33959
|
const codeRows = code.amountCents > 0 ? [code] : [];
|
|
32168
33960
|
const base = {
|
|
32169
33961
|
kind: "combined",
|
|
32170
|
-
|
|
33962
|
+
caption: planCaption(plan, input.several),
|
|
32171
33963
|
note: null,
|
|
32172
33964
|
totalCents: preview.totalAfterDiscountCents,
|
|
32173
33965
|
savingCents: savingFrom(plan, preview.totalAfterDiscountCents)
|
|
@@ -32177,16 +33969,16 @@ function previewedPayment(input) {
|
|
|
32177
33969
|
const limited = quote.source === "typed" && preview.type === "applied" && preview.codeCombinesWithCombinationPrices === false && code.amountCents > 0;
|
|
32178
33970
|
return {
|
|
32179
33971
|
...base,
|
|
32180
|
-
groups: plannedGroups(plan),
|
|
32181
|
-
subtotalCents: plan.totalCents,
|
|
33972
|
+
groups: plannedGroups(plan, input.unitPrices),
|
|
33973
|
+
subtotalCents: paymentSubtotal(plan.totalCents, codeRows),
|
|
32182
33974
|
reductions: codeRows,
|
|
32183
33975
|
note: limited ? codeNote(plan, input.several) : null
|
|
32184
33976
|
};
|
|
32185
33977
|
}
|
|
32186
33978
|
case "usual": return {
|
|
32187
33979
|
...base,
|
|
32188
|
-
groups: usualGroups(plan),
|
|
32189
|
-
subtotalCents: plan.listTotalCents,
|
|
33980
|
+
groups: usualGroups(plan, input.unitPrices),
|
|
33981
|
+
subtotalCents: paymentSubtotal(plan.listTotalCents, codeRows),
|
|
32190
33982
|
reductions: codeRows
|
|
32191
33983
|
};
|
|
32192
33984
|
case "server": {
|
|
@@ -32198,8 +33990,8 @@ function previewedPayment(input) {
|
|
|
32198
33990
|
const sameBasket = preview.subtotalCents === plan.listTotalCents;
|
|
32199
33991
|
return {
|
|
32200
33992
|
...base,
|
|
32201
|
-
groups: sameBasket ? usualGroups(plan) : [],
|
|
32202
|
-
subtotalCents: preview.subtotalCents,
|
|
33993
|
+
groups: sameBasket ? usualGroups(plan, input.unitPrices) : [],
|
|
33994
|
+
subtotalCents: paymentSubtotal(preview.subtotalCents, rows),
|
|
32203
33995
|
reductions: rows
|
|
32204
33996
|
};
|
|
32205
33997
|
}
|
|
@@ -32530,17 +34322,22 @@ function summariseSelectionPayment(input) {
|
|
|
32530
34322
|
const { several, quote } = input;
|
|
32531
34323
|
if (several === null || input.ready === false) return null;
|
|
32532
34324
|
const combination = input.price.combination;
|
|
34325
|
+
const unitPrices = selectionUnitPrices(input.selection, (event) => itemPriceCents({
|
|
34326
|
+
...input,
|
|
34327
|
+
several
|
|
34328
|
+
}, event)?.unitPriceCents ?? null);
|
|
32533
34329
|
return (combination ? summariseCombinedPayment({
|
|
32534
34330
|
plan: combination,
|
|
32535
34331
|
several,
|
|
32536
|
-
quote
|
|
34332
|
+
quote,
|
|
34333
|
+
unitPrices
|
|
32537
34334
|
}) : null) ?? plainSelectionPayment({
|
|
32538
34335
|
...input,
|
|
32539
34336
|
several,
|
|
32540
34337
|
listTotalCents
|
|
32541
34338
|
});
|
|
32542
34339
|
}
|
|
32543
|
-
/** Several items without combination prices: each at its price
|
|
34340
|
+
/** Several items without combination prices: each at its price for all places, any automatic code, the total. */
|
|
32544
34341
|
function plainSelectionPayment(input) {
|
|
32545
34342
|
const { several, quote, listTotalCents } = input;
|
|
32546
34343
|
const lines = input.selection.map((event) => ({
|
|
@@ -32548,19 +34345,22 @@ function plainSelectionPayment(input) {
|
|
|
32548
34345
|
label: selectionItemName(event, input.selection),
|
|
32549
34346
|
price: itemPriceCents(input, event)
|
|
32550
34347
|
}));
|
|
32551
|
-
const priced = lines.flatMap((line) => line.price === null ? [] : [{
|
|
34348
|
+
const priced = lines.flatMap((line) => line.price === null ? [] : [paymentLine({
|
|
32552
34349
|
key: line.key,
|
|
32553
|
-
label: line.
|
|
32554
|
-
amountCents: line.price.
|
|
32555
|
-
|
|
34350
|
+
label: line.label,
|
|
34351
|
+
amountCents: line.price.subtotalCents,
|
|
34352
|
+
places: input.places,
|
|
34353
|
+
unitPriceCents: line.price.unitPriceCents
|
|
34354
|
+
})]);
|
|
32556
34355
|
const totalCents = quote ? quote.preview.totalAfterDiscountCents : input.price.totalCents;
|
|
32557
34356
|
if (priced.length !== lines.length || listTotalCents === null || totalCents === null) return null;
|
|
34357
|
+
const reductions = quoteReductions(quote);
|
|
32558
34358
|
return {
|
|
32559
34359
|
kind: "plain",
|
|
34360
|
+
caption: paymentCaption(several, priced.length, input.places),
|
|
32560
34361
|
lines: priced,
|
|
32561
|
-
|
|
32562
|
-
|
|
32563
|
-
reductions: quoteReductions(quote),
|
|
34362
|
+
subtotalCents: paymentSubtotal(listTotalCents, reductions),
|
|
34363
|
+
reductions,
|
|
32564
34364
|
totalCents
|
|
32565
34365
|
};
|
|
32566
34366
|
}
|
|
@@ -33823,7 +35623,10 @@ function buildInstalmentOption(input) {
|
|
|
33823
35623
|
function buildFlexibleBalanceOption(input) {
|
|
33824
35624
|
const balance = {
|
|
33825
35625
|
remainingBalance: formatPrice(input.option.remainingBalanceCents, input.currency, input.locale),
|
|
33826
|
-
balanceDueBy:
|
|
35626
|
+
balanceDueBy: formatDate$2({
|
|
35627
|
+
kind: "civil",
|
|
35628
|
+
value: parseBookingLocalDate(input.option.balanceDueDay)
|
|
35629
|
+
}, input.dateContext, { date: "short" }),
|
|
33827
35630
|
depositPolicy: depositPolicy(input.option.config.depositRefundability)
|
|
33828
35631
|
};
|
|
33829
35632
|
return {
|
|
@@ -33832,7 +35635,10 @@ function buildFlexibleBalanceOption(input) {
|
|
|
33832
35635
|
flexibleBalance: balance,
|
|
33833
35636
|
...buildFlexibleBalanceBookingPaymentOptionCopy({
|
|
33834
35637
|
formattedDueToday: formatPrice(input.option.dueNowCents, input.currency, input.locale),
|
|
33835
|
-
dueDateLabel:
|
|
35638
|
+
dueDateLabel: formatDate$2({
|
|
35639
|
+
kind: "civil",
|
|
35640
|
+
value: parseBookingLocalDate(input.option.balanceDueDay)
|
|
35641
|
+
}, input.dateContext, { date: "long" }),
|
|
33836
35642
|
depositRefundability: input.option.config.depositRefundability
|
|
33837
35643
|
}),
|
|
33838
35644
|
...summaryFor({
|
|
@@ -33932,7 +35738,8 @@ function buildReviewedBookingPaymentViewModel(input) {
|
|
|
33932
35738
|
option: input.terms.paymentOption,
|
|
33933
35739
|
totalCents: input.terms.totalCents,
|
|
33934
35740
|
anchorAt: input.anchorAt,
|
|
33935
|
-
bookingStartAt: input.bookingStartAt
|
|
35741
|
+
bookingStartAt: input.bookingStartAt,
|
|
35742
|
+
timeZone: input.dateContext.timeZone
|
|
33936
35743
|
}), input.terms);
|
|
33937
35744
|
return {
|
|
33938
35745
|
...buildBookingPaymentOptionViewModel({
|
|
@@ -34575,10 +36382,14 @@ function buildEventRegistrationPaymentOptionsViewModel(input) {
|
|
|
34575
36382
|
dateContext: input.dateContext,
|
|
34576
36383
|
serviceTitle: input.eventTitle,
|
|
34577
36384
|
availableOptions: repriceBookingCollectionOptions({
|
|
36385
|
+
currency: input.currency,
|
|
36386
|
+
instalmentCollectionDeadlineAt: input.instalmentCollectionDeadlineAt,
|
|
34578
36387
|
options: resolveAvailableBookingCollectionOptions({
|
|
34579
36388
|
paymentTerms: { allowedOptions: approvedOptions },
|
|
34580
36389
|
now: input.nowIso,
|
|
36390
|
+
timeZone: input.dateContext.timeZone,
|
|
34581
36391
|
instalmentCollectionDeadlineAt: input.instalmentCollectionDeadlineAt,
|
|
36392
|
+
currency: input.currency,
|
|
34582
36393
|
bookingStartAt: input.startsAt ?? null,
|
|
34583
36394
|
totalCents: input.quotedSubtotalCents
|
|
34584
36395
|
}),
|
|
@@ -35870,4 +37681,4 @@ function membershipCardListContent(display) {
|
|
|
35870
37681
|
};
|
|
35871
37682
|
}
|
|
35872
37683
|
//#endregion
|
|
35873
|
-
export { resolveHeadlessEventRegistrationStatus as $, arrangementStyleAvailability as $a, resolveBookingPackagePaymentSelection as $i, getSingleSelectedPricingOptionId as $n, transitionCatalogueEntries as $o, formatTotalCapacity as $r, asPageFlowPresetId as $s, runPricingChoice as $t, createInitialRegistrationFlowState as A, requestSignIn as Aa, resolveExactOrFreePriceDisplay as Ac, projectSelectedAppointmentConsentIntoForm as Ai, formatDate as An, buildTextContrastShadow as Ao, buildCalendarViewport as Ar, arrangementSlotNames as As, toEventSignInDraft as At, placeCountCeiling as B, defineProgressiveBlockRuntime as Ba, decideBookingQuestionsRestoration as Bi, transformRegistrationOptionsResponse as Bn, sectionShapeForGround as Bo, formatEventHourLabel as Br, boxlessCardVariantValue as Bs, toRunRequirementsSnapshots as Bt, panelShouldOpen as C, browserReadAuthoritySchema as Ca, formatBookingPriceDisplay as Cc, resolveBookingSelectedService as Ci, selectionPreviewKey as Cn, gradientToCss as Co, renderAudio as Cr, toNonEmptyReadonlyArray as Cs, toRegistrationEvents as Ct, registrationStepLabel as D, canonicalUrl as Da, publicEventPricingDisplay as Dc, toSelectedCollectionOptionKind as Di, areEntitlementsDisabledForTicketCount as Dn, generateFooterCss as Do, resolveImageUrlWithContext as Dr, opaqueSurfaceDeclarations as Ds, eventSignInDraftStore as Dt, registrationRoute as E, PAGE_NAVIGATION as Ea, publicEventPricingCurrency as Ec, selectedBookingCollectionOptionKind as Ei, ENTITLEMENT_SINGLE_TICKET_TOOLTIP as En, generateDefaultCardSystem as Eo, resolveImageUrl as Er, opaqueSurfaceContextFromTheme as Es, EVENT_SIGN_IN_FORM_ID as Et, buildEventRegistrationPaymentOptionsViewModel as F, eventRegistrationPageSurfaceSubjectSchema as Fa, unsafeAsEventCategoryId as Fc, deriveAppointmentBookingQuestions as Fi, getImplicitSingleTicketType as Fn, navLinkOwnsHoverForeground as Fo, formatCalendarTitle as Fr, blockCustomCssRuleSchema as Fs, deriveRunRequirements as Ft, resolveRegistrationAvailabilityBlocker as G, lookListPresentationSchemaShape as Ga, toBookingQuestionsPaymentSnapshot as Gi, getSlidingScaleForEvent as Gn, boundaryRuntimeMetricsForDecorativeTransition as Go, formatTime$1 as Gr, surfaceCardRoleValues as Gs, decideSelectionPayment as Gt, planRegistrationDetailsContinuation as H, listItemPresentation as Ha, needsBookingQuestionsRefresh as Hi, getCurrentTicketSelection as Hn, sectionShapeHook as Ho, formatEventRunDates as Hr, cardVariantRoleValues as Hs, SELECTION_LIMIT_NOTE as Ht, decideEventRegistrationPayment as I, normalizeEventRegistrationPageSurfaceSubject as Ia, isAppointmentBookingQuestionsEvent as Ii, getPortalSubjectEmail as In, navLinkOwnsUnderline as Io, formatDate$1 as Ir, customCssRuleSchema as Is, nextRunToRead as It, visitorHoldsOwnPlace as J, lookPresentationOnPalette as Ja, applyBookingPaymentAdmission as Ji, parseCurrencyInputToCents as Jn, noneBoundaryOption as Jo, resolveRuntimeEventDestination as Jr, asHeaderStyleId as Js, planSelectionPrice as Jt, resolveRegistrationTicketContinuation as K, resolvedItemSurfaceProps as Ka, BOOKING_FORM_DATA_RESERVED_KEYS as Ki, getSlidingScaleSelectionMessage as Kn, boundaryTreatmentForBoundaryOptionId as Ko, groupEventsByDate as Kr, parseGradientPresetId as Ks, effectiveSelection as Kt, shouldPromptForLogin as L, resolveEventRegistrationScopedEvents as La, needsAppointmentQuestionsRefresh as Li, getTicketTypeAvailabilityLabel as Ln, parsePageDesignIntent as Lo, formatEventClockLabel as Lr, boxBackgroundOverlaySchema as Ls, runFieldErrors as Lt, getDeclinedPass as M, buildInteractiveIslandProps as Ma, parseSiteId as Mc, EMPTY_APPOINTMENT_BOOKING_QUESTIONS as Mi, formatPassCreditUsageLabel as Mn, generateEffectsCSS as Mo, eventDateLocale as Mr, sectionStylesOverrideSchema as Ms, buildSelectionRequirementsSubmission as Mt, isRegistrationLocked as N, createInteractiveIslandCodec as Na, unsafeAsSiteId as Nc, applyAppointmentBookingQuestionsEvent as Ni, formatRegistrationSchedule as Nn, generateInteractiveChildInheritanceCSS as No, eventDateOptions as Nr, themeSchema as Ns, checkRunRequirements as Nt, registrationStepLabelContext as O, leavePage as Oa, publicEventPricingStrategy as Oc, formatCentsAsCurrencyInput as Oi, findSelectedTicketType as On, footerForegroundCandidates as Oo, resolveMediaNodeResponsiveImage as Or, selectLogoVariant as Os, eventSignInEnds as Ot, registrationFlowReducer as P, defineInteractiveIslandMetaKeys as Pa, parseEventSeriesId as Pc, appointmentQuestionsRefusal as Pi, formatTime as Pn, navLinkHoverColorCandidate as Po, eventLocalDateKey as Pr, headerVariantValues as Ps, decideSelectionRequirementsLayout as Pt, resolveEventRegistrationSubmitPlan as Q, arrangementLookHooks as Qa, reconcileBookingPackagePurchase as Qi, canRequestTicketOption as Qn, anglePolygonCss as Qo, formatRemainingPlaces as Qr, asLayoutVariantKey as Qs, runNeedsPricingChoice as Qt, fullyBookedLabel as R, createZodCodec as Ra, bookingQuestionsAnswerDraftSchema as Ri, getVisibleTicketTypes as Rn, resolvePageDesignBlockLookChoice as Ro, formatEventCompactDateRail as Rr, boxBackgroundSchema as Rs, runRequirementsSnapshotSchema as Rt, getEventSelectionMode as S, resolveDateRuntimeContext as Sa, EVENT_PRESET_VOCABULARY as Sc, resolveBookingPaymentStep as Si, selectionItemName as Sn, surfaceResolutionContextFromTheme as So, mediaImageHostProps as Sr, testimonialsCompositionTreatmentValues as Ss, getRegistrationStartAt as St, registrationPresentation as T, getBlockApiReadStage as Ta, isPublicEventPricingOptionDisplayable as Tc, resolveDefaultBookingServiceId as Ti, serverPricedTotalCents as Tn, resolveCardRole as To, resolveImageSourceSetWithContext as Tr, cardListKnobBlocks as Ts, toWholeSeriesRegistrationEvents as Tt, resolveGuestNextStepCheck as U, listLookControl as Ua, restoreBookingQuestionsAnswers as Ui, getEligibilityFlowFlags as Un, boundaryOptionForTransitionIntent as Uo, formatEventTimeRange as Ur, itemRoleValues as Us, SEVERAL_BOOKINGS_ACCOUNT_NOTE as Ut, planRegistrationDetailsCheck as V, isDecodeSuccess as Va, deriveBookingQuestions as Vi, withOccurrenceTitle as Vn, sectionShapeFromContent as Vo, formatEventNextDateFact as Vr, cardRoleSchema as Vs, withoutKeptAnswers as Vt, resolveRegistrationAdmission as W, listLookSlot as Wa, toBookingQuestionsAnswerDraft as Wi, getRegistrationOccurrenceId as Wn, boundaryOptions as Wo, formatEventWeekdayTime as Wr, openCardRoleValue as Ws, canToggleSelectionItem as Wt, isEventRegistrationAvailable as X, selectItemSurfacePresentation as Xa, bookingPackageRequestKey as Xi, shouldLoadRegistrationOptions as Xn, spaciousBoundaryOption as Xo, canJoinEventWaitlistOnAnyMode as Xr, asAppearancePresetId as Xs, registrationSelectionMode as Xt, deriveEventRegistrationSteps as Y, resolveLookSurfacePresentation as Ya, bookingHasPackagePaymentChoices as Yi, resolveHeldTicketPlaces as Yn, softBoundaryOption as Yo, canJoinEventWaitlist as Yr, siteChromeBackgroundOverrideOwner as Ys, primarySelectionItem as Yt, normalizeEventRegistrationMaxTickets as Z, arrangementAppearancePresets as Za, bookingRequiresResourceSelection as Zi, withRegistrationAvailability as Zn, transitionIntentForTreatment as Zo, formatEventRemainingPlaces as Zr, asDesignBlockId as Zs, runChoiceUsable as Zt, parseStoredCommerceCartState as _, weekStartSchema as _a, parseBrevoListId as _c, normalizeBookingFormConfig as _i, combinationHintCopy as _n, getCuratedSiteStyle as _o, shownVenue as _r, featureCardCompositionTreatmentValues as _s, invitationSubmission as _t, buildProductDetailDisplay as a, toBookingPurchasablePackages as aa, INCOMPATIBLE_ATTENDANCE_MESSAGE as ac, selectMostOpenCapacitySource as ai, selectionIncludes as an, styleSectionBackgroundForColour as ao, setTicketLineQuantity as ar, sectionSurfaceBase as as, buildReviewedBookingPaymentViewModel as at, resolveSelectedProduct as b, isBlockButtonRole as ba, parseNewsletterListId as bc, prepareBookingSubmission as bi, combinationWorking as bn, compiledRuntimeStyleFieldNames as bo, MediaPlaceholder as br, plainFrame as bs, confirmationPaymentRows as bt, formatInterval as c, calendarTabViewsSchema as ca, firstLiveRunSessionStartMs as cc, buildBookingFormInteractiveIslandProps as ci, selectionPlacesLabel as cn, resolveEffectiveArrangement as co, decideSignInReturn as cr, appearancePresets as cs, buildRegistrationSelectionRequest as ct, membershipClassesLabel as d, eventCalendarDefaultViewSchema as da, resolveWholeSeriesBookingPhase as dc, formatBookingSubmissionPreparationError as di, selectionTicketInputs as dn, buildInitialPolicyPageDesignIntent as do, signInReturnPath as dr, assertNever as ds, resolveEventRequiresPayment as dt, resolveBookingPackageSources as ea, asSiteStyleId as ec, getEventAvailability as ei, runUnitPriceCents as en, automaticArrangementLook as eo, getTicketLineQuantity as er, applyLookPhotoTreatment as es, resolveHeadlessEventRegistrationView as et, passCardListContent as f, eventCalendarDisplayModeSchema as fa, resolveWholeSeriesRunLifecycle as fc, getBookingRedirectStateFromLocation as fi, severalConfirmationSentence as fn, deriveSiteStyleBlockPolicy as fo, sweepExpiredSignInReturnDrafts as fr, defineBlockDesignCapability as fs, resolveRegistrationTarget as ft, deriveCommerceCheckoutState as g, registrationButtonVariantSchema as ga, DEFAULT_MAILING_LIST_SUCCESS_MESSAGE as gc, isBookingServiceSlidingAmountInRange as gi, toggleSelectionItem as gn, designRuntimeRulesForSiteStyle as go, resolveRegistrationDisplay as gr, designIssueSeverityForPolicy as gs, createRegistrationDraftData as gt, buildProductCartItem as h, previewStageSchema as ha, DEFAULT_MAILING_LIST_PRIVACY_NOTE as hc, getShopSuccessCopy as hi, summariseSelectionPayment as hn, componentRuntimeRulesForSiteStyle as ho, registrationDisplaySchema as hr, defineNoBlockDesignCapability as hs, beginWaitlistInvitation as ht, buildProductCardDisplay as i, resolveBookingPurchasablePackages as ia, isRecord$4 as ic, selectEventCapacitySource as ii, selectionEntitlementNote as in, resolveLookForBlock as io, normalizeTicketSelectionLines as ir, sectionForegroundBackground as is, buildBookingPaymentSelectionViewModel as it, decideEventChoice as j, bookingPageKindSchema as ja, resolvePricingOptionsPriceDisplay as jc, resolveSelectedAppointmentConsent as ji, formatEventDateTime as jn, generateNavLinkCSS as jo, eventCalendarWeekStart as jr, TokenResolver as js, paymentReturnRestoration as jt, areEventRegistrationPaymentSelectionsEqual as k, pageNavigationSchema as ka, publicEventPricingType as kc, formatPrice as ki, formatBookingWhen as kn, getNavLinkPreset as ko, resolvePublicMediaUrl as kr, surfaceToneFromForegroundToken as ks, eventSignInRestoration as kt, formatValidity as l, columnOptionSchema as la, nextLiveRunSessionStartMs as lc, readOverrideServiceCategories as li, selectionPlacesNote as ln, resolveModeArrangement as lo, nextSignInReturnExpiry as lr, resolveEffectiveKnobs as ls, findPreSelectedEvent as lt, buildPassCartItem as m, filterAutoShowSchema as ma, resolveBookingSignupOffer as mc, getRegistrationSuccessCopy as mi, severalRunsChoiceMessage as mn, filterLookIdsForPolicy as mo, placesLeftLabel as mr, defineFrameCapability as ms, toRegistrationRequestSubject as mt, buildCheckoutDisplay as n, resolveBookingPaymentChoice as na, sanitizeHref as nc, getRemainingPlaces as ni, selectionConfirmationHint as nn, getCompatibleBlockAppearancePresets as no, getTicketTypeLineMax as nr, parseCanonicalRuntimeBackground as ns, toInternalPaymentSelection as nt, buildProductListDisplay as o, getBookingServiceSlidingScale as oa, decideSelectionAttendance as oc, groupPublicEventsByRun as oi, selectionItemPrice as on, arrangementManifestFromVariants as oo, clearSignInReturnDrafts as or, stripStaleTransitionStyleGroup as os, paymentChoiceDetails as ot, EMPTY_COMMERCE_CART_STATE as p, eventLayoutSchema as pa, parseMailingListRuntimeContext as pc, getBookingSuccessCopy as pi, severalItemsOf as pn, filterLayoutProfilesForPolicy as po, bookingPresentation as pr, defineExactCatalog as ps, resolveRouteRequiresPayment as pt, settledRemainingPlaces as q, itemRole as qa, BOOKING_FORM_DATA_RESERVED_KEY_VALUES as qi, getTicketSelectionRemainingPlaces as qn, isDecorativeTransitionIntent as qo, resolveEventTimeZone as qr, asHeaderLayoutId as qs, incompleteRunChoiceMessage as qt, buildPassesMembershipsDisplay as r, resolveBookingPaymentMode as ra, parseAspectRatioValue as rc, isEventFull as ri, selectionConsentLabel as rn, resolveArrangementLookForBlock as ro, hasValidPricingOptionSelection as rr, resolveSectionBackground as rs, calculateEventRegistrationPreviewTotal as rt, formatCommercePrice as s, bookingNowSchema as sa, CANCELLED_SESSION_STATUS as sc, bookingFormInteractiveIslandPropsCodec as si, selectionItemsLabel as sn, readStoredMode as so, createSignInReturnDraftStore as sr, themeV2CompilerOwnedFieldNames as ss, paymentChoicePrice as st, buildCartDisplay as t, resolveBookingPaymentAvailability as ta, makeBoundaryId as tc, getEventAvailabilityStatus as ti, selectionAtLimit as tn, compileArrangementLookRuntime as to, getTicketSelectionTotal as tr, deriveSectionGround as ts, toHeadlessPaymentSelection as tt, membershipCardListContent as u, eventButtonVariantSchema as ua, orderedLiveRunSessions as uc, deriveBookingFormViewState as ui, selectionRowAvailability as un, resolvePublishedLook as uo, readSignInReturn as ur, lookModes as us, resolveDiscountContext as ut, productItemKey as v, BLOCK_BUTTON_ROLE_OPTIONS as va, parseMailchimpAudienceId as vc, normalizeBookingServices as vi, combinationOfferLine as vn, requireCuratedSiteStyle as vo, RichText as vr, introCompositionTreatmentValues as vs, registrationQuestionsMessage as vt, registrationPaymentRoute as w, createHostedBlockApiConfig as wa, formatEventPricing as wc, resolveBookingSiteId as wi, selectionPreviewLines as wn, getGradientPreset as wo, renderVideo as wr, cardListFamilyBlocks as ws, toWholeSeriesRegistrationEvent as wt, REGISTRATION_STEP_LABELS as x, readRuntimeNow as xa, offeringLabelForPageSurfaceSubject as xc, resolveAppointmentCheckoutVerificationState as xi, selectionCombinationHint as xn, stripCompiledRuntimeStyleFields as xo, computeMediaTransformStyle as xr, sectionBackgroundPaintValues as xs, resolveFinishedPresentation as xt, reduceCommerceCart as y, blockButtonRoleSchema as ya, parseMailchimpInterestId as yc, parseBookingCurrencyInputToCents as yi, combinationOffersOf as yn, compilePageRuntimeFields as yo, ImagePresets as yr, offeringsPreviewCompositionTreatmentValues as ys, validateFormData as yt, getTicketSelectionPurpose as z, defineClientOwnedBlockRuntime as za, bookingQuestionsPaymentSnapshotSchema as zi, occurrenceTitleOverride as zn, resolvePageDesignBoundaryChoice as zo, formatEventDateParts as zr, runtimeBoxBackgroundSchema as zs, runsKeepingAnswers as zt };
|
|
37684
|
+
export { resolveHeadlessEventRegistrationStatus as $, isBookableEvent as $a, publicEventPricingCurrency as $c, bookingHasPackagePaymentChoices as $i, getSingleSelectedPricingOptionId as $n, gradientToCss as $o, formatEventCompactDateRail as $r, opaqueSurfaceContextFromTheme as $s, runPricingChoice as $t, createInitialRegistrationFlowState as A, PAGE_NAVIGATION as Aa, sanitizeHref as Ac, selectedBookingCollectionOptionKind as Ai, formatDate as An, automaticArrangementLook as Ao, resolveArrangementKnobs as Ar, applyLookPhotoTreatment as As, toEventSignInDraft as At, placeCountCeiling as B, normalizeEventRegistrationPageSurfaceSubject as Ba, parseMailingListRuntimeContext as Bc, isAppointmentBookingQuestionsEvent as Bi, transformRegistrationOptionsResponse as Bn, resolvePublishedLook as Bo, runTransforms as Br, assertNever as Bs, toRunRequirementsSnapshots as Bt, panelShouldOpen as C, blockButtonRoleSchema as Ca, siteChromeBackgroundOverrideOwner as Cc, parseBookingCurrencyInputToCents as Ci, selectionPreviewKey as Cn, resolveLookSurfacePresentation as Co, renderAudio as Cr, isDecorativeTransitionIntent as Cs, toRegistrationEvents as Ct, registrationStepLabel as D, browserReadAuthoritySchema as Da, asPageFlowPresetId as Dc, resolveBookingSelectedService as Di, areEntitlementsDisabledForTicketCount as Dn, arrangementAppearancePresets as Do, resolveImageUrlWithContext as Dr, transitionIntentForTreatment as Ds, eventSignInDraftStore as Dt, registrationRoute as E, resolveDateRuntimeContext as Ea, asLayoutVariantKey as Ec, resolveBookingPaymentStep as Ei, ENTITLEMENT_SINGLE_TICKET_TOOLTIP as En, resolveLookMediaFrame as Eo, resolveImageUrl as Er, spaciousBoundaryOption as Es, EVENT_SIGN_IN_FORM_ID as Et, buildEventRegistrationPaymentOptionsViewModel as F, bookingPageKindSchema as Fa, CANCELLED_SESSION_STATUS as Fc, resolveSelectedAppointmentConsent as Fi, getImplicitSingleTicketType as Fn, styleSectionBackgroundForColour as Fo, uiTransforms as Fr, sectionSurfaceBase as Fs, deriveRunRequirements as Ft, resolveRegistrationAvailabilityBlocker as G, isOrdinaryPublicEvent as Ga, parseMailchimpAudienceId as Gc, deriveBookingQuestions as Gi, getSlidingScaleForEvent as Gn, componentRuntimeRulesForSiteStyle as Go, buildCalendarViewport as Gr, designIssueSeverityForPolicy as Gs, decideSelectionPayment as Gt, planRegistrationDetailsContinuation as H, resolveEventRegistrationScopedEvents as Ha, DEFAULT_MAILING_LIST_PRIVACY_NOTE as Hc, bookingQuestionsAnswerDraftSchema as Hi, getCurrentTicketSelection as Hn, deriveSiteStyleBlockPolicy as Ho, isInlineTextEmpty as Hr, defineExactCatalog as Hs, SELECTION_LIMIT_NOTE as Ht, decideEventRegistrationPayment as I, buildInteractiveIslandProps as Ia, nextLiveRunSessionStartMs as Ic, EMPTY_APPOINTMENT_BOOKING_QUESTIONS as Ii, getPortalSubjectEmail as In, arrangementManifestFromVariants as Io, SECTION_STATE_KINDS as Ir, stripStaleTransitionStyleGroup as Is, nextRunToRead as It, visitorHoldsOwnPlace as J, planWholeSeriesParentBooking as Ja, offeringLabelForPageSurfaceSubject as Jc, toBookingQuestionsAnswerDraft as Ji, parseCurrencyInputToCents as Jn, requireCuratedSiteStyle as Jo, eventDateOptions as Jr, offeringsPreviewCompositionTreatmentValues as Js, planSelectionPrice as Jt, resolveRegistrationTicketContinuation as K, planDropInPanel as Ka, parseMailchimpInterestId as Kc, needsBookingQuestionsRefresh as Ki, getSlidingScaleSelectionMessage as Kn, designRuntimeRulesForSiteStyle as Ko, eventCalendarWeekStart as Kr, featureCardCompositionTreatmentValues as Ks, effectiveSelection as Kt, shouldPromptForLogin as L, createInteractiveIslandCodec as La, orderedLiveRunSessions as Lc, applyAppointmentBookingQuestionsEvent as Li, getTicketTypeAvailabilityLabel as Ln, readStoredMode as Lo, sectionStateToneFromKind as Lr, themeV2CompilerOwnedFieldNames as Ls, runFieldErrors as Lt, getDeclinedPass as M, leavePage as Ma, isRecord$4 as Mc, formatCentsAsCurrencyInput as Mi, formatPassCreditUsageLabel as Mn, getCompatibleBlockAppearancePresets as Mo, createImageShapeField as Mr, parseCanonicalRuntimeBackground as Ms, buildSelectionRequirementsSubmission as Mt, isRegistrationLocked as N, pageNavigationSchema as Na, INCOMPATIBLE_ATTENDANCE_MESSAGE as Nc, formatPrice as Ni, formatRegistrationSchedule as Nn, resolveArrangementLookForBlock as No, heroTitleSizeOptions as Nr, resolveSectionBackground as Ns, checkRunRequirements as Nt, registrationStepLabelContext as O, createHostedBlockApiConfig as Oa, asSiteStyleId as Oc, resolveBookingSiteId as Oi, findSelectedTicketType as On, arrangementLookHooks as Oo, resolveMediaNodeResponsiveImage as Or, anglePolygonCss as Os, eventSignInEnds as Ot, registrationFlowReducer as P, requestSignIn as Pa, decideSelectionAttendance as Pc, projectSelectedAppointmentConsentIntoForm as Pi, formatTime as Pn, resolveLookForBlock as Po, createAspectRatioField as Pr, sectionForegroundBackground as Ps, decideSelectionRequirementsLayout as Pt, resolveEventRegistrationSubmitPlan as Q, selectionRepresentativeEvent as Qa, isPublicEventPricingOptionDisplayable as Qc, applyBookingPaymentAdmission as Qi, canRequestTicketOption as Qn, surfaceResolutionContextFromTheme as Qo, formatEventClockLabel as Qr, toNonEmptyReadonlyArray as Qs, runNeedsPricingChoice as Qt, fullyBookedLabel as R, defineInteractiveIslandMetaKeys as Ra, resolveWholeSeriesBookingPhase as Rc, appointmentQuestionsRefusal as Ri, getVisibleTicketTypes as Rn, resolveEffectiveArrangement as Ro, asPartialObject as Rr, appearancePresets as Rs, runRequirementsSnapshotSchema as Rt, getEventSelectionMode as S, BLOCK_BUTTON_ROLE_OPTIONS as Sa, asHeaderStyleId as Sc, normalizeBookingServices as Si, selectionItemName as Sn, lookPresentationOnPalette as So, mediaImageHostProps as Sr, boundaryTreatmentForBoundaryOptionId as Ss, getRegistrationStartAt as St, registrationPresentation as T, readRuntimeNow as Ta, asDesignBlockId as Tc, resolveAppointmentCheckoutVerificationState as Ti, serverPricedTotalCents as Tn, generateLookMediaFrameCss as To, resolveImageSourceSetWithContext as Tr, softBoundaryOption as Ts, toWholeSeriesRegistrationEvents as Tt, resolveGuestNextStepCheck as U, eventOccurrenceContext as Ua, DEFAULT_MAILING_LIST_SUCCESS_MESSAGE as Uc, bookingQuestionsPaymentSnapshotSchema as Ui, getEligibilityFlowFlags as Un, filterLayoutProfilesForPolicy as Uo, parseInlineTextFromUnknown as Ur, defineFrameCapability as Us, SEVERAL_BOOKINGS_ACCOUNT_NOTE as Ut, planRegistrationDetailsCheck as V, resolveEventRegistrationChoices as Va, resolveBookingSignupOffer as Vc, needsAppointmentQuestionsRefresh as Vi, withOccurrenceTitle as Vn, buildInitialPolicyPageDesignIntent as Vo, inlineTextToPlainText as Vr, defineBlockDesignCapability as Vs, withoutKeptAnswers as Vt, resolveRegistrationAdmission as W, getPublicEventCanonicalPath as Wa, parseBrevoListId as Wc, decideBookingQuestionsRestoration as Wi, getRegistrationOccurrenceId as Wn, filterLookIdsForPolicy as Wo, plainTextToInlineText as Wr, defineNoBlockDesignCapability as Ws, canToggleSelectionItem as Wt, isEventRegistrationAvailable as X, planWholeSeriesRunSelection as Xa, formatBookingPriceDisplay as Xc, BOOKING_FORM_DATA_RESERVED_KEYS as Xi, shouldLoadRegistrationOptions as Xn, compiledRuntimeStyleFieldNames as Xo, formatCalendarTitle as Xr, sectionBackgroundPaintValues as Xs, registrationSelectionMode as Xt, deriveEventRegistrationSteps as Y, planWholeSeriesParentSelection as Ya, EVENT_PRESET_VOCABULARY as Yc, toBookingQuestionsPaymentSnapshot as Yi, resolveHeldTicketPlaces as Yn, compilePageRuntimeFields as Yo, eventLocalDateKey as Yr, plainFrame as Ys, primarySelectionItem as Yt, normalizeEventRegistrationMaxTickets as Z, resolveSelectionBookingClosedDetail as Za, formatEventPricing as Zc, BOOKING_FORM_DATA_RESERVED_KEY_VALUES as Zi, withRegistrationAvailability as Zn, stripCompiledRuntimeStyleFields as Zo, formatDate$1 as Zr, testimonialsCompositionTreatmentValues as Zs, runChoiceUsable as Zt, parseStoredCommerceCartState as _, eventLayoutSchema as _a, itemRoleValues as _c, getRegistrationSuccessCopy as _i, combinationHintCopy as _n, listLookControl as _o, shownVenue as _r, sectionShapeFromContent as _s, invitationSubmission as _t, buildProductDetailDisplay as a, resolveBookingPaymentAvailability as aa, parseBlockColorToken as ac, formatEventWeekdayTime as ai, parseSiteId as al, selectionIncludes as an, getEventAvailability as ao, setTicketLineQuantity as ar, getNavLinkPreset as as, buildReviewedBookingPaymentViewModel as at, resolveSelectedProduct as b, registrationButtonVariantSchema as ba, parseGradientPresetId as bc, isSameOpenCheckout as bi, combinationWorking as bn, resolvedItemSurfaceProps as bo, MediaPlaceholder as br, boundaryOptions as bs, confirmationPaymentRows as bt, formatInterval as c, resolveBookingPurchasablePackages as ca, headerVariantValues as cc, resolveEventTimeZone as ci, unsafeAsEventCategoryId as cl, selectionPlacesLabel as cn, isEventFull as co, decideSignInReturn as cr, generateEffectsCSS as cs, buildRegistrationSelectionRequest as ct, membershipClassesLabel as d, bookingNowSchema as da, boxBackgroundOverlaySchema as dc, buildBookingFormInteractiveIslandProps as di, selectionTicketInputs as dn, groupPublicEventsByRun as do, signInReturnPath as dr, navLinkOwnsHoverForeground as ds, resolveEventRequiresPayment as dt, bookingPackageRequestKey as ea, opaqueSurfaceDeclarations as ec, formatEventDateParts as ei, publicEventPricingDisplay as el, runUnitPriceCents as en, canJoinEventWaitlist as eo, getTicketLineQuantity as er, getGradientPreset as es, resolveHeadlessEventRegistrationView as et, passCardListContent as f, calendarTabViewsSchema as fa, boxBackgroundSchema as fc, readOverrideServiceCategories as fi, severalConfirmationSentence as fn, createZodCodec as fo, sweepExpiredSignInReturnDrafts as fr, navLinkOwnsUnderline as fs, resolveRegistrationTarget as ft, deriveCommerceCheckoutState as g, eventCalendarDisplayModeSchema as ga, cardVariantRoleValues as gc, getBookingSuccessCopy as gi, toggleSelectionItem as gn, listItemPresentation as go, resolveRegistrationDisplay as gr, sectionShapeForGround as gs, createRegistrationDraftData as gt, buildProductCartItem as h, eventCalendarDefaultViewSchema as ha, cardRoleSchema as hc, getBookingRedirectStateFromLocation as hi, summariseSelectionPayment as hn, isDecodeSuccess as ho, registrationDisplaySchema as hr, resolvePageDesignBoundaryChoice as hs, beginWaitlistInvitation as ht, buildProductCardDisplay as i, resolveBookingPackageSources as ia, TokenResolver as ic, formatEventTimeRange as ii, resolvePricingOptionsPriceDisplay as il, selectionEntitlementNote as in, formatTotalCapacity as io, normalizeTicketSelectionLines as ir, footerForegroundCandidates as is, buildBookingPaymentSelectionViewModel as it, decideEventChoice as j, canonicalUrl as ja, parseAspectRatioValue as jc, toSelectedCollectionOptionKind as ji, formatEventDateTime as jn, compileArrangementLookRuntime as jo, systemCustomizeFacetDefinitionsForBlock as jr, deriveSectionGround as js, paymentReturnRestoration as jt, areEventRegistrationPaymentSelectionsEqual as k, getBlockApiReadStage as ka, makeBoundaryId as kc, resolveDefaultBookingServiceId as ki, formatBookingWhen as kn, arrangementStyleAvailability as ko, resolvePublicMediaUrl as kr, transitionCatalogueEntries as ks, eventSignInRestoration as kt, formatValidity as l, toBookingPurchasablePackages as la, blockCustomCssRuleSchema as lc, resolveRuntimeEventDestination as li, selectionPlacesNote as ln, selectEventCapacitySource as lo, nextSignInReturnExpiry as lr, generateInteractiveChildInheritanceCSS as ls, findPreSelectedEvent as lt, buildPassCartItem as m, eventButtonVariantSchema as ma, boxlessCardVariantValue as mc, formatBookingSubmissionPreparationError as mi, severalRunsChoiceMessage as mn, defineProgressiveBlockRuntime as mo, placesLeftLabel as mr, resolvePageDesignBlockLookChoice as ms, toRegistrationRequestSubject as mt, buildCheckoutDisplay as n, reconcileBookingPackagePurchase as na, surfaceToneFromForegroundToken as nc, formatEventNextDateFact as ni, publicEventPricingType as nl, selectionConfirmationHint as nn, formatEventRemainingPlaces as no, getTicketTypeLineMax as nr, generateDefaultCardSystem as ns, toInternalPaymentSelection as nt, buildProductListDisplay as o, resolveBookingPaymentChoice as oa, sectionStylesOverrideSchema as oc, formatTime$1 as oi, unsafeAsSiteId as ol, selectionItemPrice as on, getEventAvailabilityStatus as oo, clearSignInReturnDrafts as or, buildTextContrastShadow as os, paymentChoiceDetails as ot, EMPTY_COMMERCE_CART_STATE as p, columnOptionSchema as pa, runtimeBoxBackgroundSchema as pc, deriveBookingFormViewState as pi, severalItemsOf as pn, defineClientOwnedBlockRuntime as po, bookingPresentation as pr, parsePageDesignIntent as ps, resolveRouteRequiresPayment as pt, settledRemainingPlaces as q, planOrdinarySeriesSelection as qa, parseNewsletterListId as qc, restoreBookingQuestionsAnswers as qi, getTicketSelectionRemainingPlaces as qn, getCuratedSiteStyle as qo, eventDateLocale as qr, introCompositionTreatmentValues as qs, incompleteRunChoiceMessage as qt, buildPassesMembershipsDisplay as r, resolveBookingPackagePaymentSelection as ra, arrangementSlotNames as rc, formatEventRunDates as ri, resolveExactOrFreePriceDisplay as rl, selectionConsentLabel as rn, formatRemainingPlaces as ro, hasValidPricingOptionSelection as rr, generateFooterCss as rs, calculateEventRegistrationPreviewTotal as rt, formatCommercePrice as s, resolveBookingPaymentMode as sa, themeSchema as sc, groupEventsByDate as si, parseEventSeriesId as sl, selectionItemsLabel as sn, getRemainingPlaces as so, createSignInReturnDraftStore as sr, generateNavLinkCSS as ss, paymentChoicePrice as st, buildCartDisplay as t, bookingRequiresResourceSelection as ta, selectLogoVariant as tc, formatEventHourLabel as ti, publicEventPricingStrategy as tl, selectionAtLimit as tn, canJoinEventWaitlistOnAnyMode as to, getTicketSelectionTotal as tr, resolveCardRole as ts, toHeadlessPaymentSelection as tt, membershipCardListContent as u, getBookingServiceSlidingScale as ua, customCssRuleSchema as uc, bookingFormInteractiveIslandPropsCodec as ui, selectionRowAvailability as un, selectMostOpenCapacitySource as uo, readSignInReturn as ur, navLinkHoverColorCandidate as us, resolveDiscountContext as ut, productItemKey as v, filterAutoShowSchema as va, openCardRoleValue as vc, getShopSuccessCopy as vi, combinationOfferLine as vn, listLookSlot as vo, RichText as vr, sectionShapeHook as vs, registrationQuestionsMessage as vt, registrationPaymentRoute as w, isBlockButtonRole as wa, asAppearancePresetId as wc, prepareBookingSubmission as wi, selectionPreviewLines as wn, selectItemSurfacePresentation as wo, renderVideo as wr, noneBoundaryOption as ws, toWholeSeriesRegistrationEvent as wt, REGISTRATION_STEP_LABELS as x, weekStartSchema as xa, asHeaderLayoutId as xc, normalizeBookingFormConfig as xi, selectionCombinationHint as xn, itemRole as xo, computeMediaTransformStyle as xr, boundaryRuntimeMetricsForDecorativeTransition as xs, resolveFinishedPresentation as xt, reduceCommerceCart as y, previewStageSchema as ya, surfaceCardRoleValues as yc, isBookingServiceSlidingAmountInRange as yi, combinationOffersOf as yn, lookListPresentationSchemaShape as yo, ImagePresets as yr, boundaryOptionForTransitionIntent as ys, validateFormData as yt, getTicketSelectionPurpose as z, eventRegistrationPageSurfaceSubjectSchema as za, resolveWholeSeriesRunLifecycle as zc, deriveAppointmentBookingQuestions as zi, occurrenceTitleOverride as zn, resolveModeArrangement as zo, createTransformRegistry as zr, lookModes as zs, runsKeepingAnswers as zt };
|