@riverbankcms/sdk 0.179.0 → 0.181.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/_dts/{BlocksIslandsHydrator-DKwgs95u.d.ts → BlocksIslandsHydrator-CVCasDPz.d.ts} +1 -1
- package/dist/_dts/{Page-lWenra5i.d.ts → Page-Dtj2Ui3S.d.ts} +7 -7
- package/dist/_dts/{SdkPreviewMode-BRxhRw4I.d.ts → SdkPreviewMode-D1f_60WW.d.ts} +3 -2
- package/dist/_dts/{client-qWn7xAwJ.d.ts → client-Chr9pNVW.d.ts} +288 -121
- package/dist/_dts/{content-types-DL6GIvTm.d.ts → content-types-kjccgopX.d.ts} +2 -2
- package/dist/_dts/{contracts-CzWyAiJj.d.ts → contracts-BodaiS00.d.ts} +3 -3
- package/dist/_dts/{generatePageMetadata-CBKd0cJ4.d.ts → generatePageMetadata-BS6kaJFp.d.ts} +2 -2
- package/dist/_dts/{index-DCiSHd-C.d.ts → index-Brl6_I2j.d.ts} +5 -4
- package/dist/_dts/{index-CaCum9mM.d.ts → index-CJkefwYh.d.ts} +2 -2
- package/dist/_dts/{index-7CDBZGb-.d.ts → index-D1WpKwQe.d.ts} +1 -1
- package/dist/_dts/{index-BU9uAkHB.d.ts → index-DG0OvBs0.d.ts} +8 -8
- package/dist/_dts/{index-BYnG_vF5.d.ts → index-Diqt0PvG.d.ts} +1 -1
- package/dist/_dts/{index-CZgJrhzT.d.ts → index-Dy50xUMK.d.ts} +2 -2
- package/dist/_dts/{loadContent-CPKbFQyq.d.ts → loadContent-BgxshKrA.d.ts} +7 -7
- package/dist/_dts/{request-BjKBCS7t.d.ts → request-CA0izds5.d.ts} +4561 -1390
- package/dist/_dts/{resolveBlockData-DupbMCup.d.ts → resolveBlockData-ChQmwEd3.d.ts} +5 -5
- package/dist/_dts/{resolvePageContent-BqNyCHi8.d.ts → resolvePageContent-BvGyvblj.d.ts} +1 -1
- package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
- package/dist/_dts/sdk/src/client/types.d.ts +2 -2
- package/dist/_dts/sdk/src/client.d.ts +7 -7
- package/dist/_dts/sdk/src/config/index.d.ts +6 -6
- package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
- package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
- package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
- package/dist/_dts/sdk/src/data/types.d.ts +2 -2
- package/dist/_dts/sdk/src/gifting/client.d.ts +1 -2
- package/dist/_dts/sdk/src/index.d.ts +104 -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 +84 -53
- 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 +43 -56
- package/dist/_dts/sdk/src/portal/index.d.ts +3 -18
- package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
- package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/index.d.ts +6 -6
- package/dist/_dts/sdk/src/server.d.ts +5 -5
- package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
- package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
- package/dist/_dts/{serviceBookingOutline-YcsIjvn1.d.ts → serviceBookingOutline-BgFbJQhU.d.ts} +8 -7
- package/dist/_dts/{types-B7e6Lmo5.d.ts → types-CQrsP1x_.d.ts} +3 -3
- package/dist/_dts/{types-CT-KOxl_.d.ts → types-CgS3xLk8.d.ts} +7 -2
- package/dist/_dts/{types-BOxSq-Bq.d.ts → types-R65DKjPn.d.ts} +9 -8
- package/dist/_dts/{validation-Dz6qccue.d.ts → validation-6LTIbuBA.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-1XifJg6V.mjs → BlocksIslandsHydrator-DqZPz6oW.mjs} +19 -19
- package/dist/client/{BookingMailingListNote-BsbEgagJ.mjs → BookingMailingListNote-uWfR2kaG.mjs} +177 -70
- package/dist/client/{BookingQuestionFields-C8IbeLHj.mjs → BookingQuestionFields-CyNIKw6k.mjs} +23 -82
- package/dist/client/CalendarAction-D_Glwvz2.mjs +105 -0
- package/dist/client/{CalendarNavigationChevron-Bbqij1XQ.mjs → CalendarNavigationChevron-BGCX3zwG.mjs} +6 -6
- package/dist/client/{CheckboxChoice-BZPLCgTU.mjs → CheckboxChoice-C8i4NraK.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-uA9H8LIL.mjs → DemoBookingPortalAccess-DFLPyuqe.mjs} +18 -10
- package/dist/client/{EventCalendar.client-yoSI77ov.mjs → EventCalendar.client-zDL4-t-B.mjs} +10 -10
- package/dist/client/{EventCombined.client-HeCNlliq.mjs → EventCombined.client-uciDKLID.mjs} +60 -10
- package/dist/client/{EventEmbeddedCheckoutStep-BDnicDM6.mjs → EventEmbeddedCheckoutStep-BGkbUhuw.mjs} +1 -1
- package/dist/client/{EventItem-Duhk1vnF.mjs → EventItem-CwzrjcRw.mjs} +8 -7
- package/dist/client/{EventListWeekNavigation-BiutEqPK.mjs → EventListWeekNavigation-ChvcnPma.mjs} +1 -1
- package/dist/client/{EventListing.client-B5ln77jG.mjs → EventListing.client-DA57Qoyx.mjs} +3 -3
- package/dist/client/{EventListing.view-hUDhNtMv.mjs → EventListing.view-DZ0qMFF4.mjs} +8 -211
- package/dist/client/{EventRegistrationPayment-DqtX1vB2.mjs → EventRegistrationPayment-DSqCJL8E.mjs} +1657 -403
- package/dist/client/{Page-ChJ2TGVk.mjs → Page-C7mygH_f.mjs} +536 -287
- package/dist/client/{ProtectedSubmitButton-De6AzhE6.mjs → ProtectedSubmitButton-BNnKuir8.mjs} +1 -1
- package/dist/client/{SiteTermsAgreementField-CDBU31xW.mjs → SiteTermsAgreementField-B4z-e4Wq.mjs} +27 -24
- package/dist/client/{StepIndicator-JQA-VuEH.mjs → StepIndicator-Dn_DY4oY.mjs} +1 -1
- package/dist/client/{StepIndicator-2Dl9zon2.mjs → StepIndicator-atfDU82W.mjs} +21 -13
- package/dist/client/{ThemedButton-CnSa7o-I.mjs → ThemedButton-PFOhXktM.mjs} +1 -33
- package/dist/client/{accessibleSurfaces-Wl8-_OVJ.mjs → accessibleSurfaces-n6kS6Hct.mjs} +77 -1
- package/dist/client/{accordion-B6SqU49k.mjs → accordion-CsW8U3ff.mjs} +1 -1
- package/dist/client/{booking-form.client-DrEOjQ3N.mjs → booking-form.client-cBWM392H.mjs} +442 -86
- package/dist/client/bookingCalendar--aWnqFDn.mjs +180 -0
- package/dist/client/{bookingForm-drZBwEZW.mjs → bookingForm-DgySpp6C.mjs} +4 -4
- package/dist/client/bookings.mjs +51 -15
- package/dist/client/{boxStyleClassNames-DEh45w16.mjs → boxStyleClassNames-BpGVdLFD.mjs} +2 -2
- package/dist/client/{carousel-C-YJliD-.mjs → carousel-DJoleFV3.mjs} +2 -2
- package/dist/client/{carousel.client-DMtGYTTM.mjs → carousel.client-BtLwHefX.mjs} +1 -1
- package/dist/client/{cart-acGFWK9R.mjs → cart-EO5o6uPH.mjs} +3 -3
- package/dist/client/{cart.client-BzlOGP2j.mjs → cart.client-D_gPw45z.mjs} +1 -1
- package/dist/client/{checkout-SEontwhy.mjs → checkout-NVfZW0kR.mjs} +3 -3
- package/dist/client/{checkout.client-C0Qvh-d4.mjs → checkout.client-DD3JuqOy.mjs} +1 -1
- package/dist/client/{checkoutUrls-yUKeq1N9.mjs → checkoutUrls-z2gXvlGw.mjs} +1 -1
- package/dist/client/client.mjs +306 -196
- package/dist/client/constants-CoOkvw__.mjs +100 -0
- package/dist/client/{context-DTrwaQtg.mjs → context-CRhn9qzS.mjs} +922 -388
- package/dist/client/{dateFormatting-Cg8E1r9l.mjs → dateFormatting-BnWB4L1s.mjs} +15 -25
- package/dist/client/{demoPortalMagicLink-D0kOJYOX.mjs → demoPortalMagicLink-CWDGSTBu.mjs} +2 -3
- package/dist/client/{enhanceHeaderSection-DyrpZ7ks.mjs → enhanceHeaderSection-tdP_-Z9o.mjs} +4 -5
- package/dist/client/{event-registration.client-RLZQWi2V.mjs → event-registration.client-D7YYKySQ.mjs} +2084 -1640
- package/dist/client/{eventCalendar-CphYnImh.mjs → eventCalendar-CsAfu5d0.mjs} +4 -4
- package/dist/client/{eventCombined-BvqjASB_.mjs → eventCombined-VXJB5CoS.mjs} +4 -4
- package/dist/client/{eventListing-BaNAoC_M.mjs → eventListing-B3KIZNfY.mjs} +4 -4
- package/dist/client/{eventRegistration-COMHoRl6.mjs → eventRegistration-BP-dEk1c.mjs} +4 -4
- package/dist/client/{form-DyH2juYT.mjs → form-DM8Zbxbv.mjs} +3 -3
- package/dist/client/{form.client-DBwzkB0M.mjs → form.client-e2z_Tlgk.mjs} +5 -5
- package/dist/client/{form.parts-CY4kX3mh.mjs → form.parts-Ctljy1a3.mjs} +3 -3
- package/dist/client/gifting/client.mjs +32 -29
- package/dist/client/{gifting-CIx4V378.mjs → gifting-DWIsqQru.mjs} +4 -4
- package/dist/client/{gifting.client-BEVPpzJM.mjs → gifting.client-QsSWF0uA.mjs} +5 -5
- package/dist/client/{gifting.parts-VnORjnZK.mjs → gifting.parts-CedLgwa_.mjs} +2 -2
- package/dist/client/{headerSection-DGcJfRS8.mjs → headerSection-DAkRkwb-.mjs} +2 -2
- package/dist/client/{mediaAssets-B99AP7ai.mjs → mediaAssets-COfQolI3.mjs} +1 -1
- package/dist/client/{mediaContext-Fusweriw.mjs → mediaContext-DzvnjYXm.mjs} +1 -1
- package/dist/client/{newsletter-form.client-BvEDkjiD.mjs → newsletter-form.client-WYja9-WN.mjs} +7 -7
- package/dist/client/{newsletter-form.interactive-DCO1lErD.mjs → newsletter-form.interactive-RuM86VAv.mjs} +37 -44
- package/dist/client/{newsletter-form.parts-BIy4IUT3.mjs → newsletter-form.parts-2petDnWv.mjs} +2 -2
- package/dist/client/{newsletterForm-CoTXDNFS.mjs → newsletterForm-BUbXdA_e.mjs} +3 -3
- package/dist/client/{lookSurfaces-IqT_SVnX.mjs → noop-Dl4mZ-rr.mjs} +257 -49
- package/dist/client/portal/client.mjs +11779 -6745
- package/dist/client/portalOrders-COGn4BKG.mjs +596 -0
- package/dist/client/portalRoutes-D72yvtDh.mjs +862 -0
- package/dist/client/{product-detail.client-YHQ2aKX1.mjs → product-detail.client-pOAryevt.mjs} +1 -1
- package/dist/client/{product-list.client-DxoZw1vF.mjs → product-list.client-CcUpUiud.mjs} +1 -1
- package/dist/client/{productDetail-DjuFvkey.mjs → productDetail-BZJCfqat.mjs} +3 -3
- package/dist/client/{productList-DE9GEFoZ.mjs → productList-CiRs3mNb.mjs} +3 -3
- package/dist/client/{propsDecoder-Cyag_HOs.mjs → propsDecoder--uHW4tFM.mjs} +2 -2
- package/dist/client/{registry.server-BPwV-0Pp.mjs → registry.server-CDNNd8wC.mjs} +318 -235
- package/dist/client/{renderableMediaAssetAdmission-BlfqYLJW.mjs → renderableMediaAssetAdmission-BsOWd9lf.mjs} +1 -1
- package/dist/client/rendering/client.mjs +26 -26
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +16 -8
- package/dist/client/{richText-coerce-NrRqDeOg.mjs → richText-coerce-CQGE_wHV.mjs} +2 -1
- package/dist/client/{routeIslandApiConfig-BWq5gKFK.mjs → routeIslandApiConfig-BtCg87-N.mjs} +1 -1
- package/dist/client/{runtimeResponse-D2j2-mOk.mjs → runtimeResponse-DL_ARBpa.mjs} +1 -1
- package/dist/client/{runtimeResponse-DtWSfWSZ.mjs → runtimeResponse-Ds9cmBUf.mjs} +1 -1
- package/dist/client/{shop-C3wM0Hr4.mjs → shop-Rx_gEMK8.mjs} +3 -3
- package/dist/client/{shop-commerce-34YvcpbX.mjs → shop-commerce-D8evQnMT.mjs} +53 -16
- package/dist/client/{shop-commerce-store-B7xHksOs.mjs → shop-commerce-store-C9PcsSTj.mjs} +22 -5
- package/dist/client/{shop-discount-apply.state-BiBnozfO.mjs → shop-discount-apply.state-D5CtGfJI.mjs} +2 -2
- package/dist/client/{shop.client-C0v88nLd.mjs → shop.client-D4lzQ9oY.mjs} +17 -39
- package/dist/client/{shopShared-Ct-BRNez.mjs → shopShared-BVbq7Nm-.mjs} +2 -2
- package/dist/client/spam-protection.mjs +1 -1
- package/dist/client/src-Al4ooTl_.mjs +164 -0
- package/dist/client/{src-CCtanNlD.mjs → src-ZSqRK3dD.mjs} +345 -92
- package/dist/client/{timetableModel-lhE29TNT.mjs → timetableModel-BQJrSK0K.mjs} +205 -80
- package/dist/client/{shop-add-feedback-DvC2kP1K.mjs → urlParams-C2QHo1Pa.mjs} +1 -42
- package/dist/client/{useAvailableSlots-BelJviOT.mjs → useAvailableSlots-Dm3lKJKR.mjs} +3 -24
- package/dist/client/{useDiscountCodeUi-rQRE1-Ho.mjs → useDiscountCodeUi-klgfGn7f.mjs} +1 -1
- package/dist/client/{useEventPagination-C4rS2Xxl.mjs → useEventPagination-Jnjt7_ly.mjs} +8 -8
- package/dist/client/{view-LJVHVqsy.mjs → view-CC_yQLSA.mjs} +4 -4
- package/dist/client/{wizardSteps-CNDsxeJH.mjs → wizardSteps-BliJOzEX.mjs} +2512 -675
- package/dist/preview-next/before-render.mjs +1 -0
- package/dist/preview-next/client/{LocationPickerEnvironment-BHAT81Wx.mjs → LocationPickerEnvironment-BW3dRFIv.mjs} +1 -1
- package/dist/preview-next/client/{MapLibreEditMap-B52hkdIZ.mjs → MapLibreEditMap-Db9BHyXh.mjs} +2 -2
- package/dist/preview-next/client/{PageSectionToolbar-C4TtBPN-.mjs → PageSectionToolbar-BhL0uADo.mjs} +4 -4
- package/dist/preview-next/client/{PreviewEditorSidebar-D6fkE59-.mjs → PreviewEditorSidebar-Ct8eIm0i.mjs} +8 -7
- package/dist/preview-next/client/{PreviewEditorUI-amcDlj0O.mjs → PreviewEditorUI-BS32G4V9.mjs} +5 -5
- package/dist/preview-next/client/{PreviewShell-DeQjx4zk.mjs → PreviewShell-RL0WfZXD.mjs} +7 -7
- package/dist/preview-next/client/{SdkPreviewModeRuntime-Cx0SXnoX.mjs → SdkPreviewModeRuntime-MK_gHeGy.mjs} +39 -7
- package/dist/preview-next/client/{lucide-react-McYZeSMb.mjs → lucide-react-00FF_oar.mjs} +13 -1
- package/dist/preview-next/client/{previewAssistantSlot-aqpU34WI.mjs → previewAssistantSlot-CQyS8pcq.mjs} +10318 -3719
- package/dist/preview-next/client/{previewChromeRoot-D3Gy_Rs0.mjs → previewChromeRoot-BSxp3Mfu.mjs} +1 -1
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-Dzx_RrN7.mjs → sdk-runtime-DKnTzy74.mjs} +2 -2
- package/dist/preview-next/client/{siteStyleAccess-LHedw83e.mjs → siteStyleAccess-BlmbvbLN.mjs} +37 -25
- package/dist/preview-next/client/{useAutosaveStatus-DpSd9aVk.mjs → useAutosaveStatus-D-7GwZOQ.mjs} +1 -1
- package/dist/preview-next/client/{useOpenBlockForSetup-BGZn5AT1.mjs → useOpenBlockForSetup-BNZtGM5g.mjs} +2 -2
- package/dist/preview-next/container-responsive.css +292 -170
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-DnL-FgSV.mjs → route-contract-R3PcMmax.mjs} +114 -37
- package/dist/server/{Block.shared-BEbq6EwO.mjs → Block.shared-CniF9tSu.mjs} +5 -5
- package/dist/server/{ThemeScopeCore-DFEM1a85.mjs → ThemeScopeCore-BQWsnGT6.mjs} +133 -120
- package/dist/server/{accessibleSurfaces-CM3QANtw.mjs → accessibleSurfaces-WPzUAHp4.mjs} +33 -2
- package/dist/server/accordions-By_0Ykks.mjs +111 -0
- package/dist/server/{bindings-Bly0dRs7.mjs → bindings-DxojjtK3.mjs} +7 -7
- package/dist/server/{client-CGJ2ztYp.mjs → client-CDndhbYO.mjs} +1412 -1307
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/constants-VyF5nEhL.mjs +1474 -0
- package/dist/server/{customCss-BZ8YSrQg.mjs → customCss-C9kgPHvr.mjs} +41 -5
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/index.mjs +3 -3
- package/dist/server/{loadContent-BkK1w3QQ.mjs → loadContent-BKstMBmX.mjs} +7 -4
- package/dist/server/{loadPage-DTLe0FEs.mjs → loadPage-IgNnZaqr.mjs} +3 -3
- package/dist/server/{lookMediaFrame-CaH018pK.mjs → lookMediaFrame-TFjgNG61.mjs} +74 -18
- package/dist/server/manifest.mjs +36 -25
- package/dist/server/{mapLocation-BM5WX7FY.mjs → mapLocation-MDDSubTp.mjs} +1 -1
- package/dist/server/media-BRmYrnzb.mjs +31 -0
- package/dist/server/{media-luf7RF22.mjs → media-gvfIw3z8.mjs} +2 -31
- package/dist/server/{navigation-BcNfYYuu.mjs → navigation-quBYlSKD.mjs} +2 -2
- package/dist/server/navigation.mjs +1 -1
- package/dist/server/next.mjs +170 -104
- package/dist/server/{overrideResolution-Uy9Zp2Ks.mjs → overrideResolution-CCaAPpIa.mjs} +1 -1
- package/dist/server/page-converter.mjs +3 -3
- package/dist/server/{pageRenderPlan-JzxBnqfV.mjs → pageRenderPlan-B7iULvKe.mjs} +15 -12
- package/dist/server/{pageRuntimeSupport-DyNSd2Yj.mjs → pageRuntimeSupport-BytMroxn.mjs} +9 -5
- package/dist/server/{pageShared-DU4ETFPS.mjs → pageShared-Dcs_XTIO.mjs} +836 -624
- package/dist/server/{parseThemeForPersistence-DOsfofCy.mjs → parseThemeForPersistence-Bihl4W5K.mjs} +3 -2
- package/dist/server/{portal-B4JVkdjc.mjs → portal-CMW_b9mG.mjs} +62 -46
- package/dist/server/portal.mjs +3 -3
- package/dist/server/portalQuestions-oUyohgL9.mjs +225 -0
- package/dist/server/{prebuild-8jNtDXmS.mjs → prebuild-agaH-vZV.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-xeMG42aw.mjs → prefetchBlockData-DwpRjqw4.mjs} +5 -3
- package/dist/server/{registry-DH1VrsCl.mjs → registry-DM9dHfDC.mjs} +582 -526
- package/dist/server/rendering/components/pageShared.mjs +1 -1
- package/dist/server/rendering/helpers/loadPage.mjs +1 -1
- package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
- package/dist/server/rendering/server.mjs +4 -4
- package/dist/server/rendering.mjs +10 -9
- package/dist/server/{resolveBlockData-BN8tweTx.mjs → resolveBlockData-CinHGf8l.mjs} +39 -31
- package/dist/server/{resolveButtonColourStates--6yJp9Tq.mjs → resolveButtonColourStates-B0O1IM16.mjs} +2 -1028
- package/dist/server/{resolvePageContent-DnM16_f9.mjs → resolvePageContent-BWKUZUIn.mjs} +1 -1
- package/dist/server/{responseMedia-F-ElH2Rd.mjs → responseMedia-IfH65QAH.mjs} +57 -2
- package/dist/server/routing.mjs +1 -1
- package/dist/server/{schema-BpsqaSSU.mjs → schema-CwfxQjc4.mjs} +10 -113
- package/dist/server/server.mjs +3 -3
- package/dist/server/{servicePageContent-B-FezJmH.mjs → servicePageContent-BBBhOtdE.mjs} +31 -26
- package/dist/server/theme-bridge.mjs +3 -2
- package/dist/server/theme.mjs +2 -2
- package/dist/server/{three-pass-converter-39SXCCnh.mjs → three-pass-converter-DPaUPTfl.mjs} +34 -16
- package/dist/server/titleSourceSchema-NhK6azFS.mjs +2018 -0
- package/dist/server/typeGuards-CTW_9AXq.mjs +413 -0
- package/dist/server/types-BKaBZFjD.mjs +1085 -0
- package/dist/server/{validation-3jOzYdPL.mjs → validation-DG5jX3jH.mjs} +70 -17
- package/dist/server/{version-8t0o6_jd.mjs → version-CipbxPHL.mjs} +1 -1
- package/dist/server/video-Cdr3wh-q.mjs +272 -0
- package/dist/styles/index.css +3446 -3796
- package/package.json +2 -1
- package/dist/_dts/index-DVSipdrT.d.ts +0 -101
- package/dist/client/TabBarFragment-DlKQRhP4.mjs +0 -56
- package/dist/client/checkoutRoute-DKlZRNZD.mjs +0 -22
- package/dist/client/constants-4o4_hl34.mjs +0 -6
- package/dist/client/creditProducts-BQ1t1erI.mjs +0 -266
- package/dist/client/formatDate-CTEN7gxW.mjs +0 -26
- package/dist/server/constants-Cj7hfbrA.mjs +0 -41
- package/dist/server/richTextSchema-QLaQrbII.mjs +0 -212
- package/dist/server/titleSourceSchema-Cu-3PRvv.mjs +0 -122
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { A as bookingPanelHeading, D as bookingCardEntry, E as bookingBarPlacement, M as cancelledDateCopy, N as hasCancelledRegistrationDate, O as bookingEntry,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { a as planEventRegistrationSurface, i as
|
|
8
|
-
import { n as useBlockApi } from "./context-
|
|
9
|
-
import {
|
|
10
|
-
import { t as EVENT_REGISTRATION_ANCHOR_ID } from "./constants-
|
|
11
|
-
import {
|
|
2
|
+
import { A as bookingPanelHeading, Cn as formatEventPriceDisplay, D as bookingCardEntry, E as bookingBarPlacement, M as cancelledDateCopy, N as hasCancelledRegistrationDate, O as bookingEntry, T as DEFAULT_BOOKING_BUTTON_TEXT, b as displayButtonText, j as courseTitleOf, k as bookingEntryProgress, v as buildEventRegistrationDisplayFromScopedEvents, w as offeringNounForEvent, y as buildEventRegistrationInteractiveIslandProps } from "./newsletter-form.interactive-RuM86VAv.mjs";
|
|
3
|
+
import { An as formatCurrencyAmount, t as assertNever } from "./src-ZSqRK3dD.mjs";
|
|
4
|
+
import { An as selectionConfirmationHint, B as closedAdmissionLabel, Bn as severalConfirmationSentence, Br as placesLeftLabel, Co as selectMostOpenCapacitySource, Dn as runPricingChoice, Dr as getTicketSelectionTotal, En as runNeedsPricingChoice, Er as getTicketLineQuantity, Es as INCOMPATIBLE_ATTENDANCE_MESSAGE, Fn as selectionItemsLabel, In as selectionPlacesLabel, It as ADD_A_PLACE, Jt as confirmationPaymentRows, K as registrationStopsHere, Kn as combinationOfferLine, Li as getRegistrationSuccessCopy, Ln as selectionPlacesNote, Mn as selectionEntitlementNote, Nn as selectionIncludes, On as runUnitPriceCents, Or as getTicketTypeLineMax, Os as setRoomChoicePeople, Rn as selectionRowAvailability, So as selectEventCapacitySource, Tn as runChoiceUsable, U as placeCountCeiling, Ur as shownVenue, V as fullyBookedLabel, Y as resolveRegistrationAvailabilityBlocker, Yt as resolveFinishedPresentation, Z as settledRemainingPlaces, Zn as selectionItemName, _i as resolveEventRegistrationScopedEvents, _n as SEVERAL_BOOKINGS_ACCOUNT_NOTE, ao as bookingPresentation, ar as formatRunScheduleLines, bo as getRemainingPlaces, c as registrationStepLabelContext, dc as publicEventPricingStrategy, dr as occurrenceTitleOverride, dt as paymentChoiceDetails, et as isEventRegistrationAvailable, fc as publicEventPricingType, ft as paymentChoicePrice, ga as formatPrice, gn as SELECTION_LIMIT_NOTE, ha as formatCentsAsCurrencyInput, ir as formatRegistrationSchedule, jn as selectionConsentLabel, jr as setTicketLineQuantity, kn as selectionAtLimit, l as areEventRegistrationPaymentSelectionsEqual, lc as publicEventPricingCurrency, lr as getTicketTypeAvailabilityLabel, mo as canJoinEventWaitlistOnAnyMode, n as getEventSelectionMode, nr as formatDate, or as formatTime, po as canJoinEventWaitlist, pr as withOccurrenceTitle, qn as combinationOffersOf, r as panelShouldOpen, rr as formatEventDateTime, s as registrationStepLabel, tr as formatBookingWhen, tt as normalizeEventRegistrationMaxTickets, ur as getVisibleTicketTypes, vo as getEventAvailability, wr as canRequestTicketOption, xo as isEventFull, yn as canToggleSelectionItem, yt as entryChoosesEvent, z as shouldPromptForLogin } from "./wizardSteps-BliJOzEX.mjs";
|
|
5
|
+
import { i as portalPath } from "./portalRoutes-D72yvtDh.mjs";
|
|
6
|
+
import { n as SiteTermsChangedNotice, t as SiteTermsAgreementField } from "./SiteTermsAgreementField-B4z-e4Wq.mjs";
|
|
7
|
+
import { a as ONE_DATE_FUNDING_LOAD_FAILED, c as planEventRegistrationSurface, i as summaryExplainsMoreThanTheOption, l as registrationAdmissionSurface, o as SELECTION_FUNDING_LOAD_FAILED, r as useEventRegistrationWizard, s as useEventRegistrationRecoveryRequest, t as EventPaymentMount, u as resolveEventRegistrationClientSurface } from "./EventRegistrationPayment-DSqCJL8E.mjs";
|
|
8
|
+
import { n as useBlockApi } from "./context-CRhn9qzS.mjs";
|
|
9
|
+
import { b as SpinnerNode, n as ThemedButton } from "./ThemedButton-PFOhXktM.mjs";
|
|
10
|
+
import { t as EVENT_REGISTRATION_ANCHOR_ID } from "./constants-CoOkvw__.mjs";
|
|
11
|
+
import { m as DiscountCodeDisclosure, p as NavigationHandOffPanel, t as BookingConfirmation } from "./DemoBookingPortalAccess-DFLPyuqe.mjs";
|
|
12
12
|
import { t as createBodyThemePortalRoot } from "./themePortalRoot-DeP49PT8.mjs";
|
|
13
|
-
import { t as CheckboxChoice } from "./CheckboxChoice-
|
|
13
|
+
import { t as CheckboxChoice } from "./CheckboxChoice-C8i4NraK.mjs";
|
|
14
14
|
import { t as CrossIcon } from "./CrossIcon-CpG9VRyW.mjs";
|
|
15
15
|
import { n as getFieldValidationControlProps, t as FieldValidationMessage } from "./FieldValidationMessage-CsqxShw4.mjs";
|
|
16
16
|
import { t as FeedbackMessage } from "./FeedbackMessage-CSJrAuXH.mjs";
|
|
17
|
-
import { n as
|
|
17
|
+
import { a as MagicLinkForm, n as OrganiserContactLine, o as BookingConsentAgreement, p as PaymentChoiceRows, r as BookingQuestionSections, t as BookingMailingListNote } from "./BookingMailingListNote-uWfR2kaG.mjs";
|
|
18
|
+
import { n as TerminalPanel, r as StateIcon } from "./useDiscountCodeUi-klgfGn7f.mjs";
|
|
18
19
|
import { t as ModalShell } from "./ModalShell-B_fHWK71.mjs";
|
|
19
|
-
import {
|
|
20
|
-
import { a as planEventBookingPanel, c as EventBookingPanelView, i as RegistrationClosedState, n as BookingEntryBar, o as registrationSourceForPanel, r as BookingEntryCard, s as resolveBookingPanelSelection, t as StepIndicator } from "./StepIndicator-2Dl9zon2.mjs";
|
|
20
|
+
import { a as planEventBookingPanel, c as EventBookingPanelView, i as RegistrationClosedState, n as BookingEntryBar, o as registrationSourceForPanel, r as BookingEntryCard, s as resolveBookingPanelSelection, t as StepIndicator } from "./StepIndicator-atfDU82W.mjs";
|
|
21
21
|
import { t as createLucideIcon } from "./createLucideIcon-BrXgHVKN.mjs";
|
|
22
|
+
import { t as CalendarAction } from "./CalendarAction-D_Glwvz2.mjs";
|
|
22
23
|
import React, { useCallback, useEffect, useId, useLayoutEffect, useRef, useState } from "react";
|
|
23
24
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
24
25
|
import { createPortal } from "react-dom";
|
|
@@ -393,1387 +394,1612 @@ function EventRegistrationBookingLayer(props) {
|
|
|
393
394
|
] });
|
|
394
395
|
}
|
|
395
396
|
//#endregion
|
|
396
|
-
//#region ../blocks/src/system/runtime/nodes/event-registration/
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
*
|
|
400
|
-
* Displays an error message with a retry button when registration fails.
|
|
401
|
-
*/
|
|
402
|
-
const labels = {
|
|
403
|
-
none: "",
|
|
404
|
-
retry: "Try again",
|
|
405
|
-
places: "Choose places",
|
|
406
|
-
start: "Start again",
|
|
407
|
-
details: "Check my details",
|
|
408
|
-
"payment-options": "View payment options",
|
|
409
|
-
portal: "View my bookings",
|
|
410
|
-
event: "View event"
|
|
411
|
-
};
|
|
412
|
-
const ErrorStep = ({ message, onRetry, action = "retry", canJoinWaitlist = false }) => {
|
|
413
|
-
const offerWaitlist = action === "places" && canJoinWaitlist;
|
|
414
|
-
return /* @__PURE__ */ jsx(TerminalPanel, {
|
|
415
|
-
tone: "error",
|
|
416
|
-
className: "er-center",
|
|
417
|
-
titleClassName: "er-title--lg er-message",
|
|
418
|
-
icon: /* @__PURE__ */ jsx(StateIcon, {
|
|
419
|
-
variant: "error",
|
|
420
|
-
children: /* @__PURE__ */ jsx(CrossIcon, {})
|
|
421
|
-
}),
|
|
422
|
-
title: "We couldn’t complete your booking",
|
|
423
|
-
body: /* @__PURE__ */ jsx("p", {
|
|
424
|
-
className: "er-text--muted er-message",
|
|
425
|
-
children: offerWaitlist ? "Sorry, this event is now full. You can join the waiting list, and we’ll email you if a place becomes available." : message
|
|
426
|
-
}),
|
|
427
|
-
actions: action === "none" ? void 0 : action === "portal" ? /* @__PURE__ */ jsx("a", {
|
|
428
|
-
href: "/portal",
|
|
429
|
-
className: "er-retry-btn",
|
|
430
|
-
children: labels[action]
|
|
431
|
-
}) : /* @__PURE__ */ jsx("button", {
|
|
432
|
-
type: "button",
|
|
433
|
-
onClick: onRetry,
|
|
434
|
-
className: "er-retry-btn",
|
|
435
|
-
children: offerWaitlist ? "Join the waiting list" : labels[action]
|
|
436
|
-
})
|
|
437
|
-
});
|
|
438
|
-
};
|
|
439
|
-
//#endregion
|
|
440
|
-
//#region ../blocks/src/system/runtime/nodes/event-registration/CopyParts.tsx
|
|
441
|
-
/** Copy with its bold parts in <strong>: offer lines and hints (issue 1725). */
|
|
442
|
-
function CopyParts(props) {
|
|
443
|
-
return /* @__PURE__ */ jsx(Fragment, { children: props.parts.map((part, index) => part.strong ? /* @__PURE__ */ jsx("strong", { children: part.text }, index) : /* @__PURE__ */ jsx(React.Fragment, { children: part.text }, index)) });
|
|
397
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/TicketSelectionStep.tsx
|
|
398
|
+
function pluralizeBookingUnit(kind, quantity) {
|
|
399
|
+
return `${kind}${quantity === 1 ? "" : "s"}`;
|
|
444
400
|
}
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
className: "er-summary-bar-pricing",
|
|
451
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
452
|
-
className: "er-summary-bar-price er-summary-bar-price--struck",
|
|
453
|
-
children: formatPrice(props.listCents, props.currency)
|
|
454
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
455
|
-
className: "er-summary-bar-price",
|
|
456
|
-
children: formatPrice(props.totalCents, props.currency)
|
|
457
|
-
})]
|
|
458
|
-
});
|
|
401
|
+
function getEventAttendanceModeLabel(mode) {
|
|
402
|
+
switch (mode) {
|
|
403
|
+
case "in_person": return "In person";
|
|
404
|
+
case "online": return "Online";
|
|
405
|
+
}
|
|
459
406
|
}
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
return /* @__PURE__ */ jsxs("
|
|
464
|
-
className: "er-
|
|
407
|
+
function TicketCounter(props) {
|
|
408
|
+
const { ticketsCount, maxAllowed, label, onTicketsChange } = props;
|
|
409
|
+
const minAllowed = props.minAllowed ?? 1;
|
|
410
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
411
|
+
className: "rb-reg-row er-row er-counter",
|
|
465
412
|
children: [
|
|
466
|
-
|
|
467
|
-
|
|
413
|
+
/* @__PURE__ */ jsx("button", {
|
|
414
|
+
type: "button",
|
|
415
|
+
"aria-label": `Decrease ${label}`,
|
|
416
|
+
onClick: () => onTicketsChange(stepNumber(ticketsCount, -1, { min: minAllowed })),
|
|
417
|
+
disabled: ticketsCount <= minAllowed,
|
|
418
|
+
className: "er-counter-btn",
|
|
419
|
+
children: "−"
|
|
420
|
+
}),
|
|
468
421
|
/* @__PURE__ */ jsx("span", {
|
|
469
|
-
className: "er-
|
|
470
|
-
children:
|
|
422
|
+
className: "er-counter-value",
|
|
423
|
+
children: ticketsCount
|
|
424
|
+
}),
|
|
425
|
+
/* @__PURE__ */ jsx("button", {
|
|
426
|
+
type: "button",
|
|
427
|
+
"aria-label": `Increase ${label}`,
|
|
428
|
+
onClick: () => onTicketsChange(stepNumber(ticketsCount, 1, { max: maxAllowed })),
|
|
429
|
+
disabled: ticketsCount >= maxAllowed,
|
|
430
|
+
className: "er-counter-btn",
|
|
431
|
+
children: "+"
|
|
471
432
|
})
|
|
472
433
|
]
|
|
473
434
|
});
|
|
474
435
|
}
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
436
|
+
function TicketCounterLimit(props) {
|
|
437
|
+
const showBookingLimit = !props.availabilityLabel || props.maxAllowed < (props.availableSpots ?? Infinity);
|
|
438
|
+
return /* @__PURE__ */ jsxs("p", {
|
|
439
|
+
className: "er-ticket-counter-limit",
|
|
440
|
+
children: [props.availabilityLabel ? /* @__PURE__ */ jsx("span", { children: props.availabilityLabel }) : null, showBookingLimit ? /* @__PURE__ */ jsxs(Fragment, { children: [props.availabilityLabel ? /* @__PURE__ */ jsx("br", {}) : null, /* @__PURE__ */ jsxs("span", { children: [
|
|
441
|
+
"Up to ",
|
|
442
|
+
props.maxAllowed,
|
|
443
|
+
" ",
|
|
444
|
+
props.quantityLabel,
|
|
445
|
+
" per booking."
|
|
446
|
+
] })] }) : null]
|
|
482
447
|
});
|
|
483
448
|
}
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
return isProductMethod(wizard.paymentSelection.method);
|
|
495
|
-
}
|
|
496
|
-
function isProductMethod(method) {
|
|
497
|
-
return method !== null && [
|
|
498
|
-
"pass",
|
|
499
|
-
"membership",
|
|
500
|
-
"pass_bundle",
|
|
501
|
-
"membership_bundle"
|
|
502
|
-
].includes(method);
|
|
503
|
-
}
|
|
504
|
-
function getPaymentSelectionProductName(selection) {
|
|
505
|
-
return "productName" in selection ? selection.productName : void 0;
|
|
506
|
-
}
|
|
507
|
-
/** Credits held on the pass the customer is about to redeem, before this booking. */
|
|
508
|
-
function getSelectedPassCreditsRemaining(wizard) {
|
|
509
|
-
const selection = wizard.paymentSelection;
|
|
510
|
-
if (selection.method !== "pass") return null;
|
|
511
|
-
const passId = selection.passId;
|
|
512
|
-
return (wizard.eligibility?.eligiblePasses ?? []).find((candidate) => candidate.id === passId)?.creditsRemaining ?? null;
|
|
513
|
-
}
|
|
514
|
-
/**
|
|
515
|
-
* Copy describing how a pass or membership covers the booking.
|
|
516
|
-
*
|
|
517
|
-
* Pass redemptions spend something, so they say so and name the balance;
|
|
518
|
-
* memberships already include the class, so "Included" stays accurate.
|
|
519
|
-
*/
|
|
520
|
-
function resolveEntitlementSummaryCopy(method, passCreditsRemaining) {
|
|
521
|
-
switch (method) {
|
|
522
|
-
case "pass": return {
|
|
523
|
-
productPrice: formatCreditProductUnits("event_pass", 1),
|
|
524
|
-
pricingNote: formatPassCreditUsageLabel(passCreditsRemaining)
|
|
525
|
-
};
|
|
526
|
-
case "pass_bundle": return {
|
|
527
|
-
productPrice: null,
|
|
528
|
-
pricingNote: formatPassCreditUsageLabel(null)
|
|
529
|
-
};
|
|
530
|
-
case "membership": return {
|
|
531
|
-
productPrice: "Included",
|
|
532
|
-
pricingNote: "Included in membership"
|
|
533
|
-
};
|
|
534
|
-
case "membership_bundle":
|
|
535
|
-
case "free":
|
|
536
|
-
case "stripe":
|
|
537
|
-
case null: return {
|
|
538
|
-
productPrice: null,
|
|
539
|
-
pricingNote: "Included in membership"
|
|
540
|
-
};
|
|
541
|
-
}
|
|
449
|
+
function BookingUnitSessionHint(props) {
|
|
450
|
+
const count = props.bookingUnit.includedSessionCount;
|
|
451
|
+
return props.bookingUnit.kind === "place" && count && count > 1 ? /* @__PURE__ */ jsxs("p", {
|
|
452
|
+
className: "er-text er-text--muted",
|
|
453
|
+
children: [
|
|
454
|
+
"Every place includes all ",
|
|
455
|
+
count,
|
|
456
|
+
" sessions."
|
|
457
|
+
]
|
|
458
|
+
}) : null;
|
|
542
459
|
}
|
|
543
|
-
function
|
|
544
|
-
return
|
|
545
|
-
|
|
546
|
-
dueToday: option.amounts.formattedDueToday,
|
|
547
|
-
...option.flexibleBalance
|
|
548
|
-
} : null;
|
|
460
|
+
function bookingQuantityLabel(unit, waitlist) {
|
|
461
|
+
if (!waitlist) return pluralizeBookingUnit(unit, 2);
|
|
462
|
+
return "waitlist places";
|
|
549
463
|
}
|
|
550
|
-
function
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
464
|
+
function BookingQuantityPrompt(props) {
|
|
465
|
+
return /* @__PURE__ */ jsxs("h3", {
|
|
466
|
+
tabIndex: -1,
|
|
467
|
+
className: "er-title",
|
|
468
|
+
children: [
|
|
469
|
+
"How many ",
|
|
470
|
+
bookingQuantityLabel(props.unit, props.waitlist),
|
|
471
|
+
"?"
|
|
472
|
+
]
|
|
473
|
+
});
|
|
554
474
|
}
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
const
|
|
558
|
-
|
|
559
|
-
const
|
|
560
|
-
const productInterval = "productInterval" in paymentSelection ? paymentSelection.productInterval : void 0;
|
|
561
|
-
const productPrice = "productPrice" in paymentSelection ? paymentSelection.productPrice : void 0;
|
|
562
|
-
const productCurrency = "productCurrency" in paymentSelection ? paymentSelection.productCurrency : void 0;
|
|
475
|
+
function SlidingScaleAmountField(props) {
|
|
476
|
+
const id = props.id ?? "er-sliding-amount";
|
|
477
|
+
const minLabel = formatPrice(props.slidingScale.minAmount, props.currency);
|
|
478
|
+
const maxLabel = formatPrice(props.slidingScale.maxAmount, props.currency);
|
|
479
|
+
const suggestedLabel = props.slidingScale.suggestedAmount !== null ? formatPrice(props.slidingScale.suggestedAmount, props.currency) : null;
|
|
563
480
|
return /* @__PURE__ */ jsxs("div", {
|
|
564
|
-
className: "er-
|
|
565
|
-
children: [
|
|
566
|
-
/* @__PURE__ */ jsx("
|
|
567
|
-
|
|
568
|
-
|
|
481
|
+
className: "er-field",
|
|
482
|
+
children: [
|
|
483
|
+
/* @__PURE__ */ jsx("label", {
|
|
484
|
+
htmlFor: id,
|
|
485
|
+
className: "form-label",
|
|
486
|
+
children: "Amount"
|
|
569
487
|
}),
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
488
|
+
/* @__PURE__ */ jsx("input", {
|
|
489
|
+
id,
|
|
490
|
+
type: "number",
|
|
491
|
+
min: formatCentsAsCurrencyInput(props.slidingScale.minAmount),
|
|
492
|
+
max: formatCentsAsCurrencyInput(props.slidingScale.maxAmount),
|
|
493
|
+
step: "0.01",
|
|
494
|
+
inputMode: "decimal",
|
|
495
|
+
className: "form-input",
|
|
496
|
+
value: props.value,
|
|
497
|
+
onChange: (event) => props.onChange?.(event.target.value)
|
|
575
498
|
}),
|
|
576
|
-
|
|
577
|
-
className: "er-
|
|
578
|
-
children:
|
|
499
|
+
/* @__PURE__ */ jsxs("p", {
|
|
500
|
+
className: "er-text er-text--muted",
|
|
501
|
+
children: [
|
|
502
|
+
"Choose between ",
|
|
503
|
+
minLabel,
|
|
504
|
+
" and ",
|
|
505
|
+
maxLabel,
|
|
506
|
+
suggestedLabel ? `; suggested ${suggestedLabel}` : "",
|
|
507
|
+
"."
|
|
508
|
+
]
|
|
579
509
|
}),
|
|
580
|
-
/* @__PURE__ */ jsx(
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
currency: productCurrency,
|
|
584
|
-
interval: productInterval
|
|
585
|
-
})
|
|
586
|
-
] }), /* @__PURE__ */ jsx("div", {
|
|
587
|
-
className: "er-summary-bar-product-price",
|
|
588
|
-
children: props.copy.productPrice ? /* @__PURE__ */ jsx("span", {
|
|
589
|
-
className: "er-summary-bar-included",
|
|
590
|
-
children: props.copy.productPrice
|
|
591
|
-
}) : productPrice && productCurrency ? /* @__PURE__ */ jsx(ProductPrice, {
|
|
592
|
-
cents: productPrice,
|
|
593
|
-
afterCodeCents: props.wizard.passPriceAfterCodeCents,
|
|
594
|
-
currency: productCurrency
|
|
510
|
+
props.message ? /* @__PURE__ */ jsx("p", {
|
|
511
|
+
className: "er-text er-text--muted",
|
|
512
|
+
children: props.message
|
|
595
513
|
}) : null
|
|
596
|
-
|
|
514
|
+
]
|
|
597
515
|
});
|
|
598
516
|
}
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
517
|
+
function ticketTypePriceText(ticketType, currency) {
|
|
518
|
+
return ticketType.priceAmount > 0 ? formatPrice(ticketType.priceAmount, currency) : "Free";
|
|
519
|
+
}
|
|
520
|
+
function TicketTypeLineText(props) {
|
|
521
|
+
const { ticketType } = props;
|
|
522
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
523
|
+
className: "er-ticket-line-main",
|
|
524
|
+
children: [
|
|
525
|
+
/* @__PURE__ */ jsxs("div", {
|
|
526
|
+
className: "er-ticket-line-heading",
|
|
527
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
528
|
+
className: "er-ticket-line-name",
|
|
529
|
+
children: ticketType.name
|
|
530
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
531
|
+
className: "er-ticket-line-price",
|
|
532
|
+
children: ticketTypePriceText(ticketType, props.currency)
|
|
533
|
+
})]
|
|
534
|
+
}),
|
|
535
|
+
ticketType.description ? /* @__PURE__ */ jsx("p", {
|
|
536
|
+
className: "er-ticket-line-detail",
|
|
537
|
+
children: ticketType.description
|
|
538
|
+
}) : null,
|
|
539
|
+
props.detail ? /* @__PURE__ */ jsx("p", {
|
|
540
|
+
className: "er-ticket-line-detail",
|
|
541
|
+
children: props.detail
|
|
542
|
+
}) : null
|
|
543
|
+
]
|
|
613
544
|
});
|
|
614
545
|
}
|
|
615
|
-
/**
|
|
616
|
-
function
|
|
617
|
-
const {
|
|
618
|
-
|
|
619
|
-
return
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
546
|
+
/** What one ticket type's row says and allows, whichever row draws it. Places without a room draw it in the rooms' own row. */
|
|
547
|
+
function ticketTypeQuantity(props) {
|
|
548
|
+
const { ticketType } = props;
|
|
549
|
+
const quantity = getTicketLineQuantity(props.ticketSelections, ticketType.pricingOptionId);
|
|
550
|
+
return {
|
|
551
|
+
quantity,
|
|
552
|
+
maxAllowed: getTicketTypeLineMax({
|
|
553
|
+
currentQuantity: quantity,
|
|
554
|
+
totalSelectedQuantity: getTicketSelectionTotal(props.ticketSelections),
|
|
555
|
+
maxTickets: props.maxTickets,
|
|
556
|
+
purpose: props.purpose,
|
|
557
|
+
pricingOptionId: ticketType.pricingOptionId,
|
|
558
|
+
availability: ticketType.availability,
|
|
559
|
+
heldPlacesBySelection: props.heldPlacesBySelection,
|
|
560
|
+
overallRemainingPlaces: props.availableSpots ?? null
|
|
623
561
|
}),
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
type: "button",
|
|
637
|
-
className: "er-summary-bar-pass-escape",
|
|
638
|
-
onClick: props.onUsePass,
|
|
639
|
-
children: [
|
|
640
|
-
"Use ",
|
|
641
|
-
formatCreditProductUnits("event_pass", 1),
|
|
642
|
-
" from your pass instead"
|
|
643
|
-
]
|
|
644
|
-
})] })
|
|
645
|
-
});
|
|
562
|
+
disabled: !canRequestTicketOption(ticketType.availability, props.purpose),
|
|
563
|
+
detail: getTicketTypeAvailabilityLabel(ticketType) ?? placesLeftLabel({
|
|
564
|
+
kind: "ticketType",
|
|
565
|
+
remaining: ticketType.availability.remainingPlaces,
|
|
566
|
+
dateRemaining: props.availableSpots ?? null
|
|
567
|
+
}, props.display),
|
|
568
|
+
setQuantity: (next) => props.onTicketSelectionsChange?.(setTicketLineQuantity({
|
|
569
|
+
lines: props.ticketSelections,
|
|
570
|
+
pricingOptionId: ticketType.pricingOptionId,
|
|
571
|
+
quantity: next
|
|
572
|
+
}))
|
|
573
|
+
};
|
|
646
574
|
}
|
|
647
|
-
/**
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
*/
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
575
|
+
/** One ticket type with its price, what's left and a counter. */
|
|
576
|
+
function TicketTypeQuantityRow(props) {
|
|
577
|
+
const { ticketType } = props;
|
|
578
|
+
const { quantity, maxAllowed, disabled, detail, setQuantity } = ticketTypeQuantity(props);
|
|
579
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
580
|
+
className: `er-ticket-line${disabled ? " er-ticket-line--disabled" : ""}`,
|
|
581
|
+
role: "listitem",
|
|
582
|
+
children: [/* @__PURE__ */ jsx(TicketTypeLineText, {
|
|
583
|
+
ticketType,
|
|
584
|
+
currency: props.currency,
|
|
585
|
+
detail
|
|
586
|
+
}), /* @__PURE__ */ jsx(TicketCounter, {
|
|
587
|
+
ticketsCount: quantity,
|
|
588
|
+
minAllowed: 0,
|
|
589
|
+
maxAllowed,
|
|
590
|
+
label: ticketType.name,
|
|
591
|
+
onTicketsChange: setQuantity
|
|
592
|
+
})]
|
|
665
593
|
});
|
|
666
594
|
}
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
595
|
+
function TicketTypeQuantityRows(props) {
|
|
596
|
+
const totalSelectedQuantity = getTicketSelectionTotal(props.ticketSelections);
|
|
597
|
+
const effectiveMaxTickets = props.maxTickets;
|
|
598
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
599
|
+
className: "er-ticket-lines",
|
|
600
|
+
children: [
|
|
601
|
+
/* @__PURE__ */ jsx("div", {
|
|
602
|
+
className: "er-ticket-line-list",
|
|
603
|
+
role: "list",
|
|
604
|
+
"aria-label": props.bookingUnit === "place" ? "Places" : "Tickets",
|
|
605
|
+
children: props.ticketTypes.map((ticketType) => /* @__PURE__ */ jsx(TicketTypeQuantityRow, {
|
|
606
|
+
display: props.display,
|
|
607
|
+
purpose: props.purpose,
|
|
608
|
+
ticketType,
|
|
609
|
+
ticketSelections: props.ticketSelections,
|
|
610
|
+
maxTickets: props.maxTickets,
|
|
611
|
+
heldPlacesBySelection: props.heldPlacesBySelection,
|
|
612
|
+
availableSpots: props.availableSpots,
|
|
613
|
+
currency: props.currency,
|
|
614
|
+
onTicketSelectionsChange: props.onTicketSelectionsChange
|
|
615
|
+
}, ticketType.pricingOptionId))
|
|
616
|
+
}),
|
|
617
|
+
/* @__PURE__ */ jsx(TicketCounterLimit, {
|
|
618
|
+
maxAllowed: effectiveMaxTickets,
|
|
619
|
+
quantityLabel: pluralizeBookingUnit(props.bookingUnit, effectiveMaxTickets),
|
|
620
|
+
availableSpots: props.availableSpots,
|
|
621
|
+
availabilityLabel: props.availabilityLabel
|
|
622
|
+
}),
|
|
623
|
+
totalSelectedQuantity === 0 && props.hasAvailableTicketTypes ? /* @__PURE__ */ jsxs("p", {
|
|
624
|
+
className: "er-text er-text--muted",
|
|
625
|
+
children: [
|
|
626
|
+
"Choose at least one ",
|
|
627
|
+
props.bookingUnit,
|
|
628
|
+
" to continue."
|
|
629
|
+
]
|
|
630
|
+
}) : totalSelectedQuantity === 0 ? /* @__PURE__ */ jsxs("p", {
|
|
631
|
+
className: "er-text er-text--muted",
|
|
632
|
+
children: [
|
|
633
|
+
"No ",
|
|
634
|
+
props.bookingUnit === "place" ? "places" : "ticket types",
|
|
635
|
+
" are currently available."
|
|
636
|
+
]
|
|
637
|
+
}) : null
|
|
638
|
+
]
|
|
639
|
+
});
|
|
678
640
|
}
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
return name ? `${line.quantity} ${name}` : null;
|
|
641
|
+
function getAttendanceModeDetail(attendanceMode, display) {
|
|
642
|
+
return placesLeftLabel(attendanceMode, display, {
|
|
643
|
+
unlimited: "Unlimited places",
|
|
644
|
+
open: "Places available",
|
|
645
|
+
full: "Currently full",
|
|
646
|
+
waitlist: "Currently full, waitlist available"
|
|
686
647
|
});
|
|
687
|
-
return parts.every((part) => part !== null) ? parts.join(", ") : null;
|
|
688
648
|
}
|
|
689
|
-
/**
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
649
|
+
/** One event's ways of attending, each with its places left. */
|
|
650
|
+
function eventAttendanceModeTiles(attendanceModes, display) {
|
|
651
|
+
return attendanceModes.map((attendanceMode) => ({
|
|
652
|
+
mode: attendanceMode.mode,
|
|
653
|
+
detail: getAttendanceModeDetail(attendanceMode, display)
|
|
654
|
+
}));
|
|
655
|
+
}
|
|
656
|
+
/** The "How will you attend?" choice; several runs share it, so one choice covers them all. */
|
|
657
|
+
function AttendanceModeTiles(props) {
|
|
658
|
+
return /* @__PURE__ */ jsx("div", {
|
|
659
|
+
className: "er-payment-tiles",
|
|
660
|
+
role: "list",
|
|
661
|
+
"aria-label": "Attendance mode",
|
|
662
|
+
children: props.tiles.map((tile) => {
|
|
663
|
+
const isSelected = props.selectedAttendanceMode === tile.mode;
|
|
664
|
+
return /* @__PURE__ */ jsx("div", {
|
|
665
|
+
role: "listitem",
|
|
666
|
+
children: /* @__PURE__ */ jsxs("button", {
|
|
667
|
+
type: "button",
|
|
668
|
+
"aria-pressed": isSelected,
|
|
669
|
+
className: `er-payment-tile${isSelected ? " er-payment-tile--selected" : ""}`,
|
|
670
|
+
onClick: () => props.onAttendanceModeChange?.(tile.mode),
|
|
671
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
672
|
+
className: "er-payment-tile-label",
|
|
673
|
+
children: getEventAttendanceModeLabel(tile.mode)
|
|
674
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
675
|
+
className: "er-payment-tile-detail",
|
|
676
|
+
children: tile.detail
|
|
677
|
+
})]
|
|
678
|
+
})
|
|
679
|
+
}, tile.mode);
|
|
680
|
+
})
|
|
681
|
+
});
|
|
682
|
+
}
|
|
683
|
+
function resolveTicketSelectionPricing(event) {
|
|
696
684
|
return {
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
label: input.discount.publicLabel,
|
|
700
|
-
description: input.discount.description ?? null
|
|
701
|
-
} : null,
|
|
702
|
-
schedule: summaryEvent && several === null ? formatRegistrationSchedule(summaryEvent, wizard.occurrenceContext) : null
|
|
685
|
+
mode: event ? publicEventPricingStrategy(event.pricing) : void 0,
|
|
686
|
+
currency: event ? publicEventPricingCurrency(event.pricing) : null
|
|
703
687
|
};
|
|
704
688
|
}
|
|
705
|
-
/**
|
|
706
|
-
function
|
|
707
|
-
return
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
facts.schedule ? /* @__PURE__ */ jsx("span", {
|
|
720
|
-
className: "er-summary-bar-schedule",
|
|
721
|
-
children: facts.schedule
|
|
722
|
-
}) : null
|
|
723
|
-
]
|
|
724
|
-
});
|
|
689
|
+
/** Someone with an invitation is claiming a place, not joining the list. */
|
|
690
|
+
function waitlistIsOpenTo(source, invitation) {
|
|
691
|
+
return source && !invitation ? canJoinEventWaitlist(source) : false;
|
|
692
|
+
}
|
|
693
|
+
function getTicketSelectionCapacity(event, attendanceMode, display, invitation = null) {
|
|
694
|
+
const source = event ? selectEventCapacitySource(event, attendanceMode) : null;
|
|
695
|
+
const availability = source ? getEventAvailability(source) : null;
|
|
696
|
+
const canJoinWaitlist = waitlistIsOpenTo(source, invitation);
|
|
697
|
+
return {
|
|
698
|
+
availableSpots: availability?.available,
|
|
699
|
+
isSoldOut: availability?.isFull ?? false,
|
|
700
|
+
canJoinWaitlist,
|
|
701
|
+
eventAvailabilityLabel: !canJoinWaitlist && source ? placesLeftLabel(source, display) : null
|
|
702
|
+
};
|
|
725
703
|
}
|
|
726
704
|
/**
|
|
727
|
-
*
|
|
728
|
-
*
|
|
705
|
+
* One price: the visitor is choosing places, not ticket types (issue 1581).
|
|
706
|
+
* The ceiling comes from settled availability (`placeCountCeiling`); the
|
|
707
|
+
* page's cached count is only shown, never enforced.
|
|
729
708
|
*/
|
|
730
|
-
function
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
709
|
+
function PlaceCounter(props) {
|
|
710
|
+
const spots = props.waitlist ? null : props.availableSpots;
|
|
711
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(BookingQuantityPrompt, {
|
|
712
|
+
unit: "place",
|
|
713
|
+
waitlist: props.waitlist
|
|
714
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
715
|
+
className: "er-ticket-counter-group",
|
|
716
|
+
children: [/* @__PURE__ */ jsx(TicketCounter, {
|
|
717
|
+
ticketsCount: props.ticketsCount,
|
|
718
|
+
maxAllowed: props.ceiling,
|
|
719
|
+
label: bookingQuantityLabel("place", props.waitlist),
|
|
720
|
+
onTicketsChange: props.onTicketsChange
|
|
721
|
+
}), /* @__PURE__ */ jsx(TicketCounterLimit, {
|
|
722
|
+
maxAllowed: props.ceiling,
|
|
723
|
+
quantityLabel: props.waitlist ? bookingQuantityLabel("place", true) : pluralizeBookingUnit("place", props.ceiling),
|
|
724
|
+
availableSpots: spots,
|
|
725
|
+
availabilityLabel: props.availabilityLabel
|
|
726
|
+
})]
|
|
727
|
+
})] });
|
|
728
|
+
}
|
|
729
|
+
function SelectionNote({ text }) {
|
|
730
|
+
return text ? /* @__PURE__ */ jsx("p", {
|
|
731
|
+
className: "er-text er-text--muted",
|
|
732
|
+
children: text
|
|
733
|
+
}) : null;
|
|
753
734
|
}
|
|
754
735
|
/**
|
|
755
|
-
*
|
|
756
|
-
*
|
|
757
|
-
*
|
|
736
|
+
* Ticket Selection Step
|
|
737
|
+
*
|
|
738
|
+
* Allows users to select how many tickets they want for the selected event.
|
|
739
|
+
* Respects both max tickets per registration and available spots.
|
|
740
|
+
*
|
|
741
|
+
* Can use either a full PublicEvent or just occurrence context (when on event page).
|
|
758
742
|
*/
|
|
759
|
-
|
|
760
|
-
const
|
|
761
|
-
const
|
|
762
|
-
const
|
|
763
|
-
|
|
764
|
-
const currency =
|
|
765
|
-
const
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
743
|
+
const TicketSelectionStep = ({ purpose, event, display, occurrenceContext: _occurrenceContext, selectedAttendanceMode = null, onAttendanceModeChange, ticketsCount, maxTickets, placesCeiling, visibleTicketTypes: visibleTicketTypesOverride, overallRemainingPlaces, heldPlacesBySelection, ticketSelections = [], onTicketSelectionsChange, slidingScale = null, selectedSlidingAmountInput = "", slidingScaleSelectionMessage = null, onSlidingAmountChange, onTicketsChange, bookingUnit = { kind: "ticket" }, selectionNote, invitation = null }) => {
|
|
744
|
+
const unit = bookingUnit.kind;
|
|
745
|
+
const deliveryMode = event?.deliveryMode ?? "in_person";
|
|
746
|
+
const attendanceModes = event?.attendanceModes ?? [];
|
|
747
|
+
const { availableSpots, isSoldOut, canJoinWaitlist, eventAvailabilityLabel } = getTicketSelectionCapacity(event, selectedAttendanceMode, display, invitation);
|
|
748
|
+
const { mode: eventPricingMode, currency: eventPricingCurrency } = resolveTicketSelectionPricing(event);
|
|
749
|
+
const usesTicketTypes = eventPricingMode === "tiered";
|
|
750
|
+
const visibleTicketTypes = usesTicketTypes ? visibleTicketTypesOverride ?? getVisibleTicketTypes({
|
|
751
|
+
event,
|
|
752
|
+
eligibility: null,
|
|
753
|
+
selectedAttendanceMode,
|
|
754
|
+
ticketSelections
|
|
755
|
+
}) : [];
|
|
756
|
+
const noVisibleTicketTypes = usesTicketTypes && visibleTicketTypes.length === 0;
|
|
757
|
+
const hasAvailableTicketTypes = usesTicketTypes && visibleTicketTypes.some((ticketType) => canRequestTicketOption(ticketType.availability, purpose));
|
|
758
|
+
const maxAllowed = maxTickets;
|
|
759
|
+
if (deliveryMode === "hybrid" && !selectedAttendanceMode) return /* @__PURE__ */ jsxs("div", {
|
|
760
|
+
className: "rb-reg-stack er-stack",
|
|
769
761
|
children: [
|
|
770
|
-
/* @__PURE__ */ jsx("
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
children: /* @__PURE__ */ jsx("span", {
|
|
775
|
-
className: "er-summary-bar-count",
|
|
776
|
-
children: selectionItemsLabel(several, wizard.selection)
|
|
777
|
-
})
|
|
778
|
-
})
|
|
762
|
+
/* @__PURE__ */ jsx("h3", {
|
|
763
|
+
tabIndex: -1,
|
|
764
|
+
className: "er-title",
|
|
765
|
+
children: "How will you attend?"
|
|
779
766
|
}),
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
})
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
767
|
+
/* @__PURE__ */ jsx(AttendanceModeTiles, {
|
|
768
|
+
tiles: eventAttendanceModeTiles(attendanceModes, display),
|
|
769
|
+
selectedAttendanceMode: null,
|
|
770
|
+
onAttendanceModeChange
|
|
771
|
+
}),
|
|
772
|
+
/* @__PURE__ */ jsx("p", {
|
|
773
|
+
className: "er-text er-text--muted",
|
|
774
|
+
children: "Choose whether you want to attend in person or online."
|
|
775
|
+
})
|
|
776
|
+
]
|
|
777
|
+
});
|
|
778
|
+
if (!eventPricingCurrency) return /* @__PURE__ */ jsx("div", {
|
|
779
|
+
className: "rb-reg-stack er-stack",
|
|
780
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
781
|
+
className: "er-text er-text--muted",
|
|
782
|
+
children: "Pricing is unavailable for this event right now."
|
|
783
|
+
})
|
|
784
|
+
});
|
|
785
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
786
|
+
className: "rb-reg-stack er-stack",
|
|
787
|
+
children: [
|
|
788
|
+
deliveryMode === "hybrid" ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("h3", {
|
|
789
|
+
tabIndex: -1,
|
|
790
|
+
className: "er-title",
|
|
791
|
+
children: "How will you attend?"
|
|
792
|
+
}), /* @__PURE__ */ jsx(AttendanceModeTiles, {
|
|
793
|
+
tiles: eventAttendanceModeTiles(attendanceModes, display),
|
|
794
|
+
selectedAttendanceMode,
|
|
795
|
+
onAttendanceModeChange
|
|
796
|
+
})] }) : null,
|
|
797
|
+
usesTicketTypes ? /* @__PURE__ */ jsx(Fragment, { children: noVisibleTicketTypes ? /* @__PURE__ */ jsx("p", {
|
|
798
|
+
className: "er-text er-text--muted",
|
|
799
|
+
children: "No ticket types are currently available."
|
|
800
|
+
}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
801
|
+
/* @__PURE__ */ jsxs("h3", {
|
|
802
|
+
tabIndex: -1,
|
|
803
|
+
className: "er-title",
|
|
804
|
+
children: ["Choose ", unit === "place" ? "your places" : "tickets"]
|
|
805
|
+
}),
|
|
806
|
+
/* @__PURE__ */ jsx(BookingUnitSessionHint, { bookingUnit }),
|
|
807
|
+
/* @__PURE__ */ jsx(TicketTypeQuantityRows, {
|
|
808
|
+
purpose,
|
|
809
|
+
display,
|
|
810
|
+
ticketTypes: visibleTicketTypes,
|
|
811
|
+
ticketSelections,
|
|
812
|
+
maxTickets,
|
|
813
|
+
heldPlacesBySelection,
|
|
814
|
+
availableSpots: resolveRemainingPlacesOverride(overallRemainingPlaces, availableSpots),
|
|
815
|
+
availabilityLabel: eventAvailabilityLabel,
|
|
816
|
+
currency: eventPricingCurrency,
|
|
817
|
+
hasAvailableTicketTypes,
|
|
818
|
+
onTicketSelectionsChange,
|
|
819
|
+
bookingUnit: unit
|
|
789
820
|
})
|
|
790
|
-
}) :
|
|
791
|
-
|
|
821
|
+
] }) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
822
|
+
slidingScale ? /* @__PURE__ */ jsx(SlidingScaleAmountField, {
|
|
823
|
+
slidingScale,
|
|
824
|
+
currency: eventPricingCurrency,
|
|
825
|
+
value: selectedSlidingAmountInput,
|
|
826
|
+
message: slidingScaleSelectionMessage,
|
|
827
|
+
onChange: onSlidingAmountChange
|
|
828
|
+
}) : null,
|
|
829
|
+
/* @__PURE__ */ jsx(BookingUnitSessionHint, { bookingUnit }),
|
|
830
|
+
/* @__PURE__ */ jsx(PlaceCounter, {
|
|
831
|
+
ticketsCount,
|
|
832
|
+
ceiling: placesCeiling ?? maxAllowed,
|
|
833
|
+
availableSpots,
|
|
834
|
+
availabilityLabel: eventAvailabilityLabel,
|
|
835
|
+
waitlist: canJoinWaitlist,
|
|
836
|
+
onTicketsChange
|
|
837
|
+
})
|
|
838
|
+
] }),
|
|
839
|
+
/* @__PURE__ */ jsx(SelectionNote, { text: selectionNote }),
|
|
840
|
+
/* @__PURE__ */ jsx(PlacesNote, {
|
|
841
|
+
invitation,
|
|
842
|
+
isSoldOut,
|
|
843
|
+
canJoinWaitlist,
|
|
844
|
+
event,
|
|
845
|
+
someTicketsFull: someTicketsAtOwnLimit(visibleTicketTypes, purpose)
|
|
846
|
+
})
|
|
792
847
|
]
|
|
793
|
-
})
|
|
848
|
+
});
|
|
849
|
+
};
|
|
850
|
+
/** Some ticket types are full by their own limit while another can still be chosen. */
|
|
851
|
+
function someTicketsAtOwnLimit(ticketTypes, purpose) {
|
|
852
|
+
return ticketTypes.some((ticketType) => canRequestTicketOption(ticketType.availability, purpose)) && ticketTypes.some((ticketType) => ticketType.availability.kind === "unavailable" && ticketType.availability.reason === "sold_out");
|
|
794
853
|
}
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
*/
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
if (
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
854
|
+
function PlacesNote({ invitation, isSoldOut, canJoinWaitlist, event, someTicketsFull }) {
|
|
855
|
+
if (invitation?.kind === "held") return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("p", {
|
|
856
|
+
className: "er-text",
|
|
857
|
+
children: heldPlaceText(invitation.places, invitation.expiresAt, event)
|
|
858
|
+
}), invitation.ticketChoice && someTicketsFull ? /* @__PURE__ */ jsx("p", {
|
|
859
|
+
className: "er-text er-text--muted",
|
|
860
|
+
children: "If the ticket you were waiting for is sold out, you can choose another one for your place."
|
|
861
|
+
}) : null] });
|
|
862
|
+
if (invitation) return null;
|
|
863
|
+
if (canJoinWaitlist) return /* @__PURE__ */ jsx("p", {
|
|
864
|
+
className: "er-text er-text--muted",
|
|
865
|
+
children: "This event is currently full. Continue to join the waitlist if a place opens up."
|
|
866
|
+
});
|
|
867
|
+
return isSoldOut ? /* @__PURE__ */ jsx("p", {
|
|
868
|
+
className: "er-text er-text--muted",
|
|
869
|
+
children: "This event is fully booked."
|
|
870
|
+
}) : null;
|
|
809
871
|
}
|
|
810
|
-
/**
|
|
811
|
-
function
|
|
812
|
-
const
|
|
813
|
-
return
|
|
814
|
-
summary.total ? /* @__PURE__ */ jsxs("div", {
|
|
815
|
-
className: "er-summary-bar-product-detail",
|
|
816
|
-
children: ["Total: ", summary.total]
|
|
817
|
-
}) : null,
|
|
818
|
-
/* @__PURE__ */ jsx("div", {
|
|
819
|
-
className: "er-summary-bar-price",
|
|
820
|
-
children: summary.dueToday ?? props.fallbackDueToday
|
|
821
|
-
}),
|
|
822
|
-
/* @__PURE__ */ jsx("div", {
|
|
823
|
-
className: "er-summary-bar-included",
|
|
824
|
-
children: "Payable now"
|
|
825
|
-
}),
|
|
826
|
-
summary.remainingBalance ? /* @__PURE__ */ jsxs("div", {
|
|
827
|
-
className: "er-summary-bar-product-detail",
|
|
828
|
-
children: [
|
|
829
|
-
"Remaining balance: ",
|
|
830
|
-
summary.remainingBalance,
|
|
831
|
-
summary.balanceDueBy ? ` due by ${summary.balanceDueBy}` : ""
|
|
832
|
-
]
|
|
833
|
-
}) : null,
|
|
834
|
-
summary.depositPolicy ? /* @__PURE__ */ jsxs("div", {
|
|
835
|
-
className: "er-summary-bar-product-detail",
|
|
836
|
-
children: ["Deposit: ", summary.depositPolicy]
|
|
837
|
-
}) : null
|
|
838
|
-
] });
|
|
872
|
+
/** How long the invitation holds their place, in the event's own time zone. */
|
|
873
|
+
function heldPlaceText(places, expiresAt, event) {
|
|
874
|
+
const held = places === 1 ? "We’re holding a place for you" : `We’re holding ${places} places for you`;
|
|
875
|
+
return event ? `${held} until ${formatTime(expiresAt, event)} on ${formatDate(expiresAt, event)}. Continue to book before then.` : `${held}. Continue to book.`;
|
|
839
876
|
}
|
|
840
|
-
function
|
|
841
|
-
return
|
|
877
|
+
function resolveRemainingPlacesOverride(override, cached) {
|
|
878
|
+
return override === void 0 ? cached : override;
|
|
842
879
|
}
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
const
|
|
852
|
-
const
|
|
853
|
-
const
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
totalCents: subtotalCents,
|
|
892
|
-
currency: summaryCurrency
|
|
893
|
-
}) : subtotalCents > 0 && /* @__PURE__ */ jsx("div", {
|
|
894
|
-
className: "er-summary-bar-pricing",
|
|
895
|
-
children: productMethod ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
896
|
-
className: "er-summary-bar-price er-summary-bar-price--struck",
|
|
897
|
-
children: formatPrice(subtotalCents, summaryCurrency)
|
|
898
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
899
|
-
className: "er-summary-bar-included",
|
|
900
|
-
children: entitlementCopy.pricingNote
|
|
901
|
-
})] }) : flexibleBalanceSummary ? /* @__PURE__ */ jsx(FlexibleBalancePricing, {
|
|
902
|
-
summary: flexibleBalanceSummary,
|
|
903
|
-
fallbackDueToday: formatPrice(discountedTotalCents, summaryCurrency)
|
|
904
|
-
}) : autoAppliedDiscount && autoAppliedDiscountCents > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
905
|
-
/* @__PURE__ */ jsx("span", {
|
|
906
|
-
className: "er-summary-bar-price er-summary-bar-price--struck",
|
|
907
|
-
children: formatPrice(subtotalCents, summaryCurrency)
|
|
908
|
-
}),
|
|
909
|
-
/* @__PURE__ */ jsx("span", {
|
|
910
|
-
className: "er-summary-bar-price",
|
|
911
|
-
children: formatPrice(discountedTotalCents, summaryCurrency)
|
|
912
|
-
}),
|
|
913
|
-
autoAppliedDiscount.description ? /* @__PURE__ */ jsx("div", {
|
|
914
|
-
className: "er-summary-bar-product-detail er-summary-bar-discount-detail",
|
|
915
|
-
children: autoAppliedDiscount.description
|
|
916
|
-
}) : null
|
|
917
|
-
] }) : /* @__PURE__ */ jsx("span", {
|
|
918
|
-
className: "er-summary-bar-price",
|
|
919
|
-
children: formatPrice(subtotalCents, summaryCurrency)
|
|
880
|
+
//#endregion
|
|
881
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/RoomChooser.tsx
|
|
882
|
+
function currencyOf(wizard) {
|
|
883
|
+
return wizard.eligibility?.currency ?? (wizard.selectedEvent && publicEventPricingCurrency(wizard.selectedEvent.pricing)) ?? "GBP";
|
|
884
|
+
}
|
|
885
|
+
function RoomPhotos(props) {
|
|
886
|
+
const { kind } = props;
|
|
887
|
+
const titleId = useId();
|
|
888
|
+
const [index, setIndex] = useState(0);
|
|
889
|
+
const photo = kind.photos[index];
|
|
890
|
+
const several = kind.photos.length > 1;
|
|
891
|
+
return /* @__PURE__ */ jsxs(ModalShell, {
|
|
892
|
+
title: kind.name,
|
|
893
|
+
titleId,
|
|
894
|
+
onClose: props.onClose,
|
|
895
|
+
overlayClassName: "er-room-photos-overlay",
|
|
896
|
+
modalClassName: "er-room-photos",
|
|
897
|
+
headerClassName: "er-room-photos-head",
|
|
898
|
+
titleClassName: "er-title",
|
|
899
|
+
closeButtonClassName: "er-room-photos-close",
|
|
900
|
+
children: [photo ? /* @__PURE__ */ jsx("img", {
|
|
901
|
+
src: photo.src,
|
|
902
|
+
alt: photo.alt,
|
|
903
|
+
className: "er-room-photos-image"
|
|
904
|
+
}) : null, several ? /* @__PURE__ */ jsxs("div", {
|
|
905
|
+
className: "er-room-photos-nav",
|
|
906
|
+
children: [
|
|
907
|
+
/* @__PURE__ */ jsx("button", {
|
|
908
|
+
type: "button",
|
|
909
|
+
className: "er-back-btn",
|
|
910
|
+
disabled: index === 0,
|
|
911
|
+
onClick: () => setIndex(index - 1),
|
|
912
|
+
children: "Previous photo"
|
|
913
|
+
}),
|
|
914
|
+
/* @__PURE__ */ jsxs("span", {
|
|
915
|
+
className: "er-text er-text--muted",
|
|
916
|
+
children: [
|
|
917
|
+
index + 1,
|
|
918
|
+
" of ",
|
|
919
|
+
kind.photos.length
|
|
920
|
+
]
|
|
921
|
+
}),
|
|
922
|
+
/* @__PURE__ */ jsx("button", {
|
|
923
|
+
type: "button",
|
|
924
|
+
className: "er-back-btn",
|
|
925
|
+
disabled: index === kind.photos.length - 1,
|
|
926
|
+
onClick: () => setIndex(index + 1),
|
|
927
|
+
children: "Next photo"
|
|
920
928
|
})
|
|
929
|
+
]
|
|
930
|
+
}) : null]
|
|
931
|
+
});
|
|
932
|
+
}
|
|
933
|
+
function photoLabel(kind) {
|
|
934
|
+
return `${kind.name}, ${kind.photos.length} ${kind.photos.length === 1 ? "photo" : "photos"}. Tap to see them.`;
|
|
935
|
+
}
|
|
936
|
+
/** The one row every place on this step uses: what it is, its price, then how many. */
|
|
937
|
+
function RoomRow(props) {
|
|
938
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
939
|
+
className: [
|
|
940
|
+
"er-room-option",
|
|
941
|
+
props.disabled ? "er-ticket-line--disabled" : null,
|
|
942
|
+
props.gone ? "er-room-option--gone" : null
|
|
943
|
+
].filter(Boolean).join(" "),
|
|
944
|
+
"data-chosen": props.chosen ? "" : void 0,
|
|
945
|
+
role: "listitem",
|
|
946
|
+
children: [
|
|
947
|
+
/* @__PURE__ */ jsxs("div", {
|
|
948
|
+
className: "er-room-option-text",
|
|
949
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
950
|
+
className: "er-ticket-line-name",
|
|
951
|
+
children: props.title
|
|
952
|
+
}), props.details.map((detail) => detail ? /* @__PURE__ */ jsx("p", {
|
|
953
|
+
className: "er-ticket-line-detail",
|
|
954
|
+
children: detail
|
|
955
|
+
}, detail) : null)]
|
|
921
956
|
}),
|
|
922
|
-
/* @__PURE__ */ jsx(
|
|
957
|
+
/* @__PURE__ */ jsx("span", {
|
|
958
|
+
className: "er-ticket-line-price er-room-option-price",
|
|
959
|
+
children: props.price
|
|
960
|
+
}),
|
|
961
|
+
props.control
|
|
923
962
|
]
|
|
924
|
-
})
|
|
925
|
-
}
|
|
926
|
-
//#endregion
|
|
927
|
-
//#region ../blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizardActions.tsx
|
|
928
|
-
/**
|
|
929
|
-
* Label for the button that submits the details step.
|
|
930
|
-
*
|
|
931
|
-
* When a pass covers the booking there is no payment step to follow, so this
|
|
932
|
-
* button is the last thing read before a credit is spent — it names the pass
|
|
933
|
-
* rather than leaving that to the summary above it.
|
|
934
|
-
*/
|
|
935
|
-
function resolveDetailsButtonText(input) {
|
|
936
|
-
const { wizard } = input;
|
|
937
|
-
const admission = wizard.admission;
|
|
938
|
-
switch (admission.kind) {
|
|
939
|
-
case "checking": return "Checking availability…";
|
|
940
|
-
case "closed": return closedLabel(admission.reason);
|
|
941
|
-
case "fullyBooked": return fullyBookedLabel(admission);
|
|
942
|
-
case "waitlist": return "Join waitlist";
|
|
943
|
-
case "open":
|
|
944
|
-
case "resume": break;
|
|
945
|
-
}
|
|
946
|
-
if (wizard.paymentSelection.method === "pass") return "Book using class pass";
|
|
947
|
-
if (wizard.paymentSelection.method === "membership") return input.fallbackText;
|
|
948
|
-
return wizard.eventRequiresPayment ? "Continue to payment" : input.fallbackText;
|
|
963
|
+
});
|
|
949
964
|
}
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
*/
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
className: "rb-wizard-actions er-actions",
|
|
961
|
-
children: /* @__PURE__ */ jsx(ThemedButton, {
|
|
965
|
+
function RoomOptionRow(props) {
|
|
966
|
+
const { option } = props;
|
|
967
|
+
const price = `${formatPrice(option.priceCents, props.currency)}${option.each ? " each" : ""}`;
|
|
968
|
+
if (option.gone) return /* @__PURE__ */ jsx(RoomRow, {
|
|
969
|
+
gone: true,
|
|
970
|
+
chosen: false,
|
|
971
|
+
title: option.title,
|
|
972
|
+
details: ["Someone else has just booked this."],
|
|
973
|
+
price,
|
|
974
|
+
control: /* @__PURE__ */ jsx("button", {
|
|
962
975
|
type: "button",
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
976
|
+
className: "er-back-btn er-room-take-off",
|
|
977
|
+
"aria-label": `Take off ${props.kindName}, ${option.title}`,
|
|
978
|
+
onClick: () => props.onChange(0),
|
|
979
|
+
children: "Take off"
|
|
980
|
+
})
|
|
981
|
+
});
|
|
982
|
+
return /* @__PURE__ */ jsx(RoomRow, {
|
|
983
|
+
chosen: option.people > 0,
|
|
984
|
+
title: option.title,
|
|
985
|
+
details: [option.detail, props.display.placesLeft === "shown" ? option.placesLeft : null],
|
|
986
|
+
price,
|
|
987
|
+
control: /* @__PURE__ */ jsx(TicketCounter, {
|
|
988
|
+
ticketsCount: option.people,
|
|
989
|
+
minAllowed: 0,
|
|
990
|
+
maxAllowed: option.maxPeople,
|
|
991
|
+
label: `${props.kindName}, ${option.title}`,
|
|
992
|
+
onTicketsChange: props.onChange
|
|
970
993
|
})
|
|
971
994
|
});
|
|
972
995
|
}
|
|
973
|
-
function
|
|
974
|
-
const {
|
|
975
|
-
const
|
|
976
|
-
const
|
|
977
|
-
return /* @__PURE__ */ jsxs("
|
|
978
|
-
className: "
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
996
|
+
function RoomKindGroup(props) {
|
|
997
|
+
const { kind, chooser } = props;
|
|
998
|
+
const [viewing, setViewing] = useState(false);
|
|
999
|
+
const firstPhoto = kind.photos[0];
|
|
1000
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
1001
|
+
className: "er-room-kind",
|
|
1002
|
+
"aria-label": kind.name,
|
|
1003
|
+
"data-fully-booked": kind.fullyBooked ? "" : void 0,
|
|
1004
|
+
children: [
|
|
1005
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1006
|
+
className: "er-room-kind-head",
|
|
1007
|
+
children: [firstPhoto ? /* @__PURE__ */ jsx("button", {
|
|
1008
|
+
type: "button",
|
|
1009
|
+
className: "er-room-photo",
|
|
1010
|
+
onClick: () => setViewing(true),
|
|
1011
|
+
children: /* @__PURE__ */ jsx("img", {
|
|
1012
|
+
src: firstPhoto.src,
|
|
1013
|
+
alt: photoLabel(kind)
|
|
1014
|
+
})
|
|
1015
|
+
}) : null, /* @__PURE__ */ jsxs("div", {
|
|
1016
|
+
className: "er-room-kind-text",
|
|
1017
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
1018
|
+
className: "er-room-kind-title",
|
|
1019
|
+
children: [/* @__PURE__ */ jsx("h4", {
|
|
1020
|
+
className: "er-room-kind-name",
|
|
1021
|
+
children: kind.name
|
|
1022
|
+
}), kind.fullyBooked ? /* @__PURE__ */ jsx("span", {
|
|
1023
|
+
className: "er-room-kind-full",
|
|
1024
|
+
children: "Fully booked"
|
|
1025
|
+
}) : null]
|
|
1026
|
+
}), kind.description ? /* @__PURE__ */ jsx("p", {
|
|
1027
|
+
className: "er-text er-text--muted",
|
|
1028
|
+
children: kind.description
|
|
1029
|
+
}) : null]
|
|
1030
|
+
})]
|
|
1031
|
+
}),
|
|
1032
|
+
kind.options.length > 0 ? /* @__PURE__ */ jsx("div", {
|
|
1033
|
+
role: "list",
|
|
1034
|
+
children: kind.options.map((option) => /* @__PURE__ */ jsx(RoomOptionRow, {
|
|
1035
|
+
kindName: kind.name,
|
|
1036
|
+
option,
|
|
1037
|
+
currency: props.currency,
|
|
1038
|
+
display: props.display,
|
|
1039
|
+
onChange: (people) => chooser.setRoomChoices(setRoomChoicePeople(chooser.choices, option.choice, people))
|
|
1040
|
+
}, option.key))
|
|
1041
|
+
}) : null,
|
|
1042
|
+
viewing ? /* @__PURE__ */ jsx(RoomPhotos, {
|
|
1043
|
+
kind,
|
|
1044
|
+
onClose: () => setViewing(false)
|
|
1045
|
+
}) : null
|
|
1046
|
+
]
|
|
998
1047
|
});
|
|
999
1048
|
}
|
|
1000
|
-
function
|
|
1001
|
-
const { wizard } = props;
|
|
1002
|
-
const
|
|
1003
|
-
|
|
1004
|
-
wizard,
|
|
1005
|
-
|
|
1049
|
+
function DayPlaceRow(props) {
|
|
1050
|
+
const { ticketType, wizard } = props;
|
|
1051
|
+
const { quantity, maxAllowed, disabled, detail, setQuantity } = ticketTypeQuantity({
|
|
1052
|
+
display: props.display,
|
|
1053
|
+
purpose: wizard.ticketSelectionPurpose,
|
|
1054
|
+
ticketType,
|
|
1055
|
+
ticketSelections: wizard.selectedTicketLines,
|
|
1056
|
+
maxTickets: wizard.maxTicketsNum,
|
|
1057
|
+
availableSpots: null,
|
|
1058
|
+
currency: props.currency,
|
|
1059
|
+
onTicketSelectionsChange: props.chooser.setDayLines
|
|
1060
|
+
});
|
|
1061
|
+
return /* @__PURE__ */ jsx(RoomRow, {
|
|
1062
|
+
chosen: quantity > 0,
|
|
1063
|
+
disabled,
|
|
1064
|
+
title: ticketType.name,
|
|
1065
|
+
details: [ticketType.description ?? null, detail],
|
|
1066
|
+
price: ticketTypePriceText(ticketType, props.currency),
|
|
1067
|
+
control: /* @__PURE__ */ jsx(TicketCounter, {
|
|
1068
|
+
ticketsCount: quantity,
|
|
1069
|
+
minAllowed: 0,
|
|
1070
|
+
maxAllowed,
|
|
1071
|
+
label: ticketType.name,
|
|
1072
|
+
onTicketsChange: setQuantity
|
|
1073
|
+
})
|
|
1006
1074
|
});
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1075
|
+
}
|
|
1076
|
+
function PlacesWithoutARoom(props) {
|
|
1077
|
+
const { chooser } = props;
|
|
1078
|
+
if (chooser.dayOptions.length === 0) return null;
|
|
1079
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
1080
|
+
className: "er-room-kind",
|
|
1081
|
+
"aria-label": "Places without a room",
|
|
1082
|
+
children: [/* @__PURE__ */ jsx("h4", {
|
|
1083
|
+
className: "er-room-kind-name",
|
|
1084
|
+
children: "Places without a room"
|
|
1085
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
1086
|
+
role: "list",
|
|
1087
|
+
children: chooser.dayOptions.map((ticketType) => /* @__PURE__ */ jsx(DayPlaceRow, {
|
|
1088
|
+
ticketType,
|
|
1089
|
+
wizard: props.wizard,
|
|
1090
|
+
chooser,
|
|
1091
|
+
display: props.display,
|
|
1092
|
+
currency: props.currency
|
|
1093
|
+
}, ticketType.pricingOptionId))
|
|
1021
1094
|
})]
|
|
1022
1095
|
});
|
|
1023
1096
|
}
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
const {
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1097
|
+
/** Everywhere to sleep, the places that don't need a room, and how that adds up. */
|
|
1098
|
+
function RoomChooser(props) {
|
|
1099
|
+
const { wizard, chooser, display } = props;
|
|
1100
|
+
const { view } = chooser;
|
|
1101
|
+
const currency = currencyOf(wizard);
|
|
1102
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1103
|
+
className: "er-room-chooser",
|
|
1104
|
+
children: [
|
|
1105
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1106
|
+
className: "er-room-chooser-intro",
|
|
1107
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
1108
|
+
tabIndex: -1,
|
|
1109
|
+
className: "er-title",
|
|
1110
|
+
children: "Where would you like to sleep?"
|
|
1111
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
1112
|
+
className: "er-text er-text--muted",
|
|
1113
|
+
children: view.intro
|
|
1114
|
+
})]
|
|
1115
|
+
}),
|
|
1116
|
+
view.kinds.map((kind) => /* @__PURE__ */ jsx(RoomKindGroup, {
|
|
1117
|
+
kind,
|
|
1118
|
+
currency,
|
|
1119
|
+
display,
|
|
1120
|
+
chooser
|
|
1121
|
+
}, kind.kindId)),
|
|
1122
|
+
/* @__PURE__ */ jsx(PlacesWithoutARoom, {
|
|
1123
|
+
wizard,
|
|
1124
|
+
chooser,
|
|
1125
|
+
display,
|
|
1126
|
+
currency
|
|
1127
|
+
}),
|
|
1128
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1129
|
+
className: "er-room-chooser-stay",
|
|
1130
|
+
"aria-live": "polite",
|
|
1131
|
+
children: [
|
|
1132
|
+
view.stayLines.length > 0 ? /* @__PURE__ */ jsxs("div", {
|
|
1133
|
+
className: "er-ticket-line-summary",
|
|
1134
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
1135
|
+
className: "er-ticket-line-summary-title",
|
|
1136
|
+
children: "How you'll stay"
|
|
1137
|
+
}), /* @__PURE__ */ jsx("ul", {
|
|
1138
|
+
className: "er-ticket-line-summary-list",
|
|
1139
|
+
children: view.stayLines.map((line) => /* @__PURE__ */ jsxs("li", { children: [line, "."] }, line))
|
|
1140
|
+
})]
|
|
1141
|
+
}) : null,
|
|
1142
|
+
view.priceNote ? /* @__PURE__ */ jsx("p", {
|
|
1143
|
+
className: "er-text er-text--muted er-room-price-note-beside-stay",
|
|
1144
|
+
children: view.priceNote
|
|
1145
|
+
}) : null,
|
|
1146
|
+
view.note ? /* @__PURE__ */ jsx("div", {
|
|
1147
|
+
className: "er-notice er-notice--info",
|
|
1148
|
+
role: "status",
|
|
1149
|
+
children: /* @__PURE__ */ jsx("p", { children: view.note })
|
|
1150
|
+
}) : null
|
|
1151
|
+
]
|
|
1152
|
+
})
|
|
1153
|
+
]
|
|
1154
|
+
});
|
|
1155
|
+
}
|
|
1156
|
+
/**
|
|
1157
|
+
* The footer's summary: anything stopping the booking sits directly above the
|
|
1158
|
+
* total, where it stays in view in the sticky bar on a phone.
|
|
1159
|
+
*/
|
|
1160
|
+
function RoomChooserSummary(props) {
|
|
1161
|
+
const { view } = props;
|
|
1162
|
+
const { takeOff } = view;
|
|
1163
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [view.notice ? /* @__PURE__ */ jsxs("div", {
|
|
1164
|
+
className: "er-notice er-notice--info er-room-notice",
|
|
1165
|
+
role: "alert",
|
|
1166
|
+
children: [
|
|
1167
|
+
/* @__PURE__ */ jsx("p", { children: view.notice }),
|
|
1168
|
+
view.noticeStay.length > 0 ? /* @__PURE__ */ jsx("ul", {
|
|
1169
|
+
className: "er-room-notice-stay",
|
|
1170
|
+
children: view.noticeStay.map((line) => /* @__PURE__ */ jsxs("li", { children: [line, "."] }, line))
|
|
1171
|
+
}) : null,
|
|
1172
|
+
takeOff ? /* @__PURE__ */ jsx("button", {
|
|
1173
|
+
type: "button",
|
|
1174
|
+
className: "er-back-btn er-room-take-off",
|
|
1175
|
+
onClick: () => props.wizard.roomChooser?.setRoomChoices(takeOff.choices),
|
|
1176
|
+
children: takeOff.label
|
|
1177
|
+
}) : null
|
|
1178
|
+
]
|
|
1030
1179
|
}) : null, /* @__PURE__ */ jsxs("div", {
|
|
1031
|
-
className: "
|
|
1032
|
-
children: [/* @__PURE__ */ jsx("
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1180
|
+
className: "er-summary-bar er-room-summary",
|
|
1181
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
1182
|
+
className: "er-summary-bar-info",
|
|
1183
|
+
children: view.people === 0 ? /* @__PURE__ */ jsx("span", {
|
|
1184
|
+
className: "er-summary-bar-meta",
|
|
1185
|
+
children: ADD_A_PLACE
|
|
1186
|
+
}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1187
|
+
/* @__PURE__ */ jsxs("span", {
|
|
1188
|
+
className: "er-summary-bar-meta",
|
|
1189
|
+
children: [
|
|
1190
|
+
view.people,
|
|
1191
|
+
" ",
|
|
1192
|
+
view.people === 1 ? "person" : "people"
|
|
1193
|
+
]
|
|
1194
|
+
}),
|
|
1195
|
+
view.splitWarning ? /* @__PURE__ */ jsx("span", {
|
|
1196
|
+
className: "er-room-split-warning",
|
|
1197
|
+
children: view.splitWarning
|
|
1198
|
+
}) : null,
|
|
1199
|
+
view.totalNote ? /* @__PURE__ */ jsx("span", {
|
|
1200
|
+
className: "er-text er-text--muted",
|
|
1201
|
+
children: view.totalNote
|
|
1202
|
+
}) : null,
|
|
1203
|
+
view.priceNote ? /* @__PURE__ */ jsx("span", {
|
|
1204
|
+
className: "er-text er-text--muted er-room-price-note-in-bar",
|
|
1205
|
+
children: view.priceNote
|
|
1206
|
+
}) : null
|
|
1207
|
+
] })
|
|
1208
|
+
}), view.totalCents === null ? null : /* @__PURE__ */ jsx("span", {
|
|
1209
|
+
className: "er-summary-bar-price",
|
|
1210
|
+
children: formatPrice(view.totalCents, currencyOf(props.wizard))
|
|
1044
1211
|
})]
|
|
1045
1212
|
})] });
|
|
1046
1213
|
}
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1214
|
+
//#endregion
|
|
1215
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/ErrorStep.tsx
|
|
1216
|
+
/**
|
|
1217
|
+
* Error Step
|
|
1218
|
+
*
|
|
1219
|
+
* Displays an error message with a retry button when registration fails.
|
|
1220
|
+
*/
|
|
1221
|
+
const labels = {
|
|
1222
|
+
none: "",
|
|
1223
|
+
retry: "Try again",
|
|
1224
|
+
places: "Choose places",
|
|
1225
|
+
start: "Start again",
|
|
1226
|
+
details: "Check my details",
|
|
1227
|
+
"payment-options": "View payment options",
|
|
1228
|
+
portal: "View my bookings",
|
|
1229
|
+
event: "View event"
|
|
1230
|
+
};
|
|
1231
|
+
const ErrorStep = ({ message, onRetry, action = "retry", canJoinWaitlist = false }) => {
|
|
1232
|
+
const offerWaitlist = action === "places" && canJoinWaitlist;
|
|
1233
|
+
return /* @__PURE__ */ jsx(TerminalPanel, {
|
|
1234
|
+
tone: "error",
|
|
1235
|
+
className: "er-center",
|
|
1236
|
+
titleClassName: "er-title--lg er-message",
|
|
1237
|
+
icon: /* @__PURE__ */ jsx(StateIcon, {
|
|
1238
|
+
variant: "error",
|
|
1239
|
+
children: /* @__PURE__ */ jsx(CrossIcon, {})
|
|
1240
|
+
}),
|
|
1241
|
+
title: "We couldn’t complete your booking",
|
|
1242
|
+
body: /* @__PURE__ */ jsx("p", {
|
|
1243
|
+
className: "er-text--muted er-message",
|
|
1244
|
+
children: offerWaitlist ? "Sorry, this event is now full. You can join the waiting list, and we’ll email you if a place becomes available." : message
|
|
1245
|
+
}),
|
|
1246
|
+
actions: action === "none" ? void 0 : action === "portal" ? /* @__PURE__ */ jsx("a", {
|
|
1247
|
+
href: portalPath({ page: "bookings" }),
|
|
1248
|
+
className: "er-retry-btn",
|
|
1249
|
+
children: labels[action]
|
|
1250
|
+
}) : /* @__PURE__ */ jsx("button", {
|
|
1052
1251
|
type: "button",
|
|
1053
|
-
onClick:
|
|
1054
|
-
className: "er-
|
|
1055
|
-
children: "
|
|
1252
|
+
onClick: onRetry,
|
|
1253
|
+
className: "er-retry-btn",
|
|
1254
|
+
children: offerWaitlist ? "Join the waiting list" : labels[action]
|
|
1056
1255
|
})
|
|
1057
1256
|
});
|
|
1257
|
+
};
|
|
1258
|
+
//#endregion
|
|
1259
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/CopyParts.tsx
|
|
1260
|
+
/** Copy with its bold parts in <strong>: offer lines and hints (issue 1725). */
|
|
1261
|
+
function CopyParts(props) {
|
|
1262
|
+
return /* @__PURE__ */ jsx(Fragment, { children: props.parts.map((part, index) => part.strong ? /* @__PURE__ */ jsx("strong", { children: part.text }, index) : /* @__PURE__ */ jsx(React.Fragment, { children: part.text }, index)) });
|
|
1058
1263
|
}
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
case "verifying-timeout":
|
|
1074
|
-
case "payment-status":
|
|
1075
|
-
case "payment-failed": return null;
|
|
1076
|
-
case "select-event": return /* @__PURE__ */ jsx(SelectDateActions, { ...props });
|
|
1077
|
-
case "select-tickets": return /* @__PURE__ */ jsx(SelectTicketsActions, { ...props });
|
|
1078
|
-
case "enter-details": return /* @__PURE__ */ jsx(EnterDetailsActions, { ...props });
|
|
1079
|
-
case "select-payment": return /* @__PURE__ */ jsx(SelectPaymentActions, { ...props });
|
|
1080
|
-
case "payment": return /* @__PURE__ */ jsx(PaymentActions, { ...props });
|
|
1081
|
-
default: return null;
|
|
1082
|
-
}
|
|
1264
|
+
//#endregion
|
|
1265
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/CombinationSummary.tsx
|
|
1266
|
+
/** The usual total struck through, then what combination prices bring it to (issue 1725). */
|
|
1267
|
+
function CombinationPricing(props) {
|
|
1268
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1269
|
+
className: "er-summary-bar-pricing",
|
|
1270
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
1271
|
+
className: "er-summary-bar-price er-summary-bar-price--struck",
|
|
1272
|
+
children: formatPrice(props.listCents, props.currency)
|
|
1273
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
1274
|
+
className: "er-summary-bar-price",
|
|
1275
|
+
children: formatPrice(props.totalCents, props.currency)
|
|
1276
|
+
})]
|
|
1277
|
+
});
|
|
1083
1278
|
}
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
* Passes and memberships cover one person, so with more than one place they
|
|
1088
|
-
* are greyed out; this says why, in the open rather than in a hover tooltip.
|
|
1089
|
-
*/
|
|
1090
|
-
function SingleTicketEntitlementNote(props) {
|
|
1091
|
-
const { eligibility } = props;
|
|
1092
|
-
if (!eligibility || !areEntitlementsDisabledForTicketCount(props.ticketsCount)) return null;
|
|
1093
|
-
const hasPasses = eligibility.eligiblePasses.length + eligibility.availablePasses.length > 0;
|
|
1094
|
-
const hasMemberships = eligibility.eligibleMemberships.length + eligibility.availableMemberships.length > 0;
|
|
1095
|
-
if (!hasPasses && !hasMemberships) return null;
|
|
1279
|
+
/** "4 dates for £40, plus 1 at £12 · You save £8" under the summary row. */
|
|
1280
|
+
function CombinationDetail(props) {
|
|
1281
|
+
if (!props.working) return null;
|
|
1096
1282
|
return /* @__PURE__ */ jsxs("p", {
|
|
1097
|
-
className: "er-
|
|
1283
|
+
className: "er-combination-detail",
|
|
1098
1284
|
children: [
|
|
1099
|
-
|
|
1100
|
-
"
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
onClick: props.onBookOnePlace,
|
|
1106
|
-
children: "Book 1 place"
|
|
1107
|
-
}),
|
|
1108
|
-
" ",
|
|
1109
|
-
"to use ",
|
|
1110
|
-
hasPasses ? "a pass" : "a membership",
|
|
1111
|
-
"."
|
|
1285
|
+
props.working.working,
|
|
1286
|
+
" · ",
|
|
1287
|
+
/* @__PURE__ */ jsx("span", {
|
|
1288
|
+
className: "er-combination-saving",
|
|
1289
|
+
children: props.working.saving
|
|
1290
|
+
})
|
|
1112
1291
|
]
|
|
1113
1292
|
});
|
|
1114
1293
|
}
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
return /* @__PURE__ */ jsx("
|
|
1119
|
-
className: "
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
children: /* @__PURE__ */ jsx("p", {
|
|
1123
|
-
className: "er-text er-error",
|
|
1124
|
-
children: "We couldn’t load the booking options for this event. Please refresh this page and try again. If this keeps happening, contact the organiser for help."
|
|
1125
|
-
})
|
|
1126
|
-
})
|
|
1294
|
+
/** "Add 1 more date to get 4 dates for £40." under the summary bar. */
|
|
1295
|
+
function CombinationHint(props) {
|
|
1296
|
+
if (!props.parts) return null;
|
|
1297
|
+
return /* @__PURE__ */ jsx("p", {
|
|
1298
|
+
className: "er-combination-hint",
|
|
1299
|
+
role: "status",
|
|
1300
|
+
children: /* @__PURE__ */ jsx(CopyParts, { parts: props.parts })
|
|
1127
1301
|
});
|
|
1128
1302
|
}
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
props.eligibility.eventAcceptsPasses && !props.eligibility.eventAcceptsMemberships && /* @__PURE__ */ jsx("p", {
|
|
1136
|
-
className: "er-text er-text--muted",
|
|
1137
|
-
children: "You need a pass with credits for this event category."
|
|
1138
|
-
}),
|
|
1139
|
-
props.eligibility.eventAcceptsMemberships && !props.eligibility.eventAcceptsPasses && /* @__PURE__ */ jsx("p", {
|
|
1140
|
-
className: "er-text er-text--muted",
|
|
1141
|
-
children: "You need an active membership for this event category."
|
|
1142
|
-
})
|
|
1143
|
-
] });
|
|
1303
|
+
//#endregion
|
|
1304
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationSummary.state.ts
|
|
1305
|
+
/** Several course runs are one purchase; individual run names belong in the breakdown. */
|
|
1306
|
+
function registrationSummaryTitle(input) {
|
|
1307
|
+
if (input.severalItems === "runs") return (input.subject?.kind === "eventOffering" ? input.subject.title?.trim() : null) || "Your booking";
|
|
1308
|
+
return occurrenceTitleOverride(input.occurrenceContext) ?? input.eventTitle ?? "";
|
|
1144
1309
|
}
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
children: props.heading
|
|
1152
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
1153
|
-
className: "er-center",
|
|
1154
|
-
children: /* @__PURE__ */ jsx("p", {
|
|
1155
|
-
className: "er-text er-text--muted",
|
|
1156
|
-
children: props.message
|
|
1157
|
-
})
|
|
1158
|
-
})]
|
|
1159
|
-
});
|
|
1310
|
+
//#endregion
|
|
1311
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/EventRegistrationSummaryBar.tsx
|
|
1312
|
+
/** A run booked with the visitor's membership, which the bar names in place of a price. */
|
|
1313
|
+
function membershipFor(wizard) {
|
|
1314
|
+
const selection = wizard.paymentSelection;
|
|
1315
|
+
return selection.method === "membership" ? selection.productName?.trim() || "Membership" : null;
|
|
1160
1316
|
}
|
|
1161
|
-
|
|
1317
|
+
/** The membership covering a run, above the bar; nothing without one. */
|
|
1318
|
+
function MembershipRow(props) {
|
|
1319
|
+
if (props.name === null) return null;
|
|
1162
1320
|
return /* @__PURE__ */ jsxs("div", {
|
|
1163
|
-
className: "
|
|
1164
|
-
children: [/* @__PURE__ */ jsx("
|
|
1165
|
-
className: "er-
|
|
1166
|
-
children:
|
|
1167
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
1168
|
-
className: "er-
|
|
1169
|
-
children: /* @__PURE__ */ jsx("
|
|
1170
|
-
className: "er-
|
|
1171
|
-
children: "
|
|
1321
|
+
className: "er-summary-bar-product",
|
|
1322
|
+
children: [/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx("div", {
|
|
1323
|
+
className: "er-summary-bar-product-name",
|
|
1324
|
+
children: props.name
|
|
1325
|
+
}) }), /* @__PURE__ */ jsx("div", {
|
|
1326
|
+
className: "er-summary-bar-product-price",
|
|
1327
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
1328
|
+
className: "er-summary-bar-included",
|
|
1329
|
+
children: "Included"
|
|
1172
1330
|
})
|
|
1173
1331
|
})]
|
|
1174
1332
|
});
|
|
1175
1333
|
}
|
|
1176
|
-
function
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
children: promptLogin ? "Log in required" : "Payment required"
|
|
1183
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
1184
|
-
className: "er-center",
|
|
1185
|
-
children: promptLogin ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1186
|
-
/* @__PURE__ */ jsx("p", {
|
|
1187
|
-
className: "er-text er-text--muted",
|
|
1188
|
-
children: "Have a pass or membership? Log in to use it."
|
|
1189
|
-
}),
|
|
1190
|
-
/* @__PURE__ */ jsx(ThemedButton, {
|
|
1191
|
-
type: "button",
|
|
1192
|
-
variant: "primary",
|
|
1193
|
-
size: "md",
|
|
1194
|
-
label: "Email me a login link",
|
|
1195
|
-
disabled: !props.email.trim(),
|
|
1196
|
-
onClick: props.onRequestLogin
|
|
1197
|
-
}),
|
|
1198
|
-
!props.email.trim() && /* @__PURE__ */ jsx("p", {
|
|
1199
|
-
className: "er-text er-text--muted",
|
|
1200
|
-
children: "Enter your email to request a login link."
|
|
1201
|
-
})
|
|
1202
|
-
] }) : /* @__PURE__ */ jsx(UnavailableEntitlementMessage, { eligibility: props.eligibility })
|
|
1203
|
-
})]
|
|
1204
|
-
});
|
|
1334
|
+
function getFlexibleBalanceSummary(option) {
|
|
1335
|
+
return option?.flexibleBalance ? {
|
|
1336
|
+
total: option.amounts.formattedTotal,
|
|
1337
|
+
dueToday: option.amounts.formattedDueToday,
|
|
1338
|
+
...option.flexibleBalance
|
|
1339
|
+
} : null;
|
|
1205
1340
|
}
|
|
1206
|
-
function
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1341
|
+
function getSelectedDirectPaymentOption(wizard) {
|
|
1342
|
+
if (wizard.paymentSelection.method !== "stripe") return null;
|
|
1343
|
+
const kind = wizard.paymentSelection.collectionOptionKind;
|
|
1344
|
+
return wizard.directPaymentOptions.find((option) => option.kind === kind) ?? null;
|
|
1345
|
+
}
|
|
1346
|
+
/** "2 tickets" or "1 place"; booking several, "5 dates × 2 places" or the runs by name. */
|
|
1347
|
+
function summaryCountLabel(wizard, summaryEvent) {
|
|
1348
|
+
if (wizard.severalItems !== null) return selectionPlacesLabel(wizard.severalItems, wizard.selection, wizard.ticketsCount);
|
|
1349
|
+
if (wizard.ticketsCount <= 0) return null;
|
|
1350
|
+
const tiered = summaryEvent !== null && summaryEvent !== void 0 && publicEventPricingStrategy(summaryEvent.pricing) === "tiered";
|
|
1351
|
+
if (tiered) {
|
|
1352
|
+
const byType = ticketTypeCountLabel(wizard.selectedTicketLines, wizard.visibleTicketTypes);
|
|
1353
|
+
if (byType) return byType;
|
|
1217
1354
|
}
|
|
1355
|
+
const unit = tiered ? "ticket" : "place";
|
|
1356
|
+
return `${wizard.ticketsCount} ${unit}${wizard.ticketsCount === 1 ? "" : "s"}`;
|
|
1218
1357
|
}
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
srLabel: "Checking payment options"
|
|
1227
|
-
}), /* @__PURE__ */ jsx("p", {
|
|
1228
|
-
className: "er-text--muted",
|
|
1229
|
-
children: "Checking payment options…"
|
|
1230
|
-
})]
|
|
1231
|
-
})
|
|
1232
|
-
});
|
|
1233
|
-
if (props.eligibilityError) return /* @__PURE__ */ jsx("div", {
|
|
1234
|
-
className: "rb-reg-stack er-stack",
|
|
1235
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
1236
|
-
className: "er-center",
|
|
1237
|
-
children: /* @__PURE__ */ jsx("p", {
|
|
1238
|
-
className: "er-text er-error",
|
|
1239
|
-
children: props.eligibilityError
|
|
1240
|
-
})
|
|
1241
|
-
})
|
|
1242
|
-
});
|
|
1243
|
-
if (!props.eligibility) return /* @__PURE__ */ jsx(MissingEligibilityPanel, {});
|
|
1244
|
-
const availabilityPanel = renderRegistrationAvailabilityBlocker(props.admission);
|
|
1245
|
-
if (availabilityPanel) return availabilityPanel;
|
|
1246
|
-
if (props.paysNothing) return /* @__PURE__ */ jsx(FreePaymentSummary, { ticketsCount: props.ticketsCount });
|
|
1247
|
-
return props.eligibility.paymentOptions.length > 0 ? null : /* @__PURE__ */ jsx(IneligiblePaymentPanel, {
|
|
1248
|
-
eligibility: props.eligibility,
|
|
1249
|
-
email: props.email,
|
|
1250
|
-
isAuthenticated: props.isAuthenticated,
|
|
1251
|
-
onRequestLogin: props.onRequestLogin
|
|
1358
|
+
/** "1 Standard, 1 Concession" when tickets of more than one type are chosen; otherwise null. */
|
|
1359
|
+
function ticketTypeCountLabel(lines, ticketTypes) {
|
|
1360
|
+
const chosen = lines.filter((line) => line.quantity > 0);
|
|
1361
|
+
if (chosen.length < 2) return null;
|
|
1362
|
+
const parts = chosen.map((line) => {
|
|
1363
|
+
const name = ticketTypes.find((type) => type.pricingOptionId === line.pricingOptionId)?.name;
|
|
1364
|
+
return name ? `${line.quantity} ${name}` : null;
|
|
1252
1365
|
});
|
|
1366
|
+
return parts.every((part) => part !== null) ? parts.join(", ") : null;
|
|
1253
1367
|
}
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
})]
|
|
1270
|
-
})]
|
|
1271
|
-
});
|
|
1368
|
+
/**
|
|
1369
|
+
* The footer's one line (issue 1581): how many, the discount's name, then
|
|
1370
|
+
* when. Ticket types are tickets; a single price, or a course, is places.
|
|
1371
|
+
*/
|
|
1372
|
+
function summaryMetaFacts(input) {
|
|
1373
|
+
const { wizard, summaryEvent } = input;
|
|
1374
|
+
const several = wizard.severalItems;
|
|
1375
|
+
return {
|
|
1376
|
+
countLabel: summaryCountLabel(wizard, summaryEvent),
|
|
1377
|
+
discount: input.discount && membershipFor(wizard) === null ? {
|
|
1378
|
+
label: input.discount.publicLabel,
|
|
1379
|
+
description: input.discount.description ?? null
|
|
1380
|
+
} : null,
|
|
1381
|
+
schedule: summaryEvent && several === null ? formatRegistrationSchedule(summaryEvent, wizard.occurrenceContext) : null
|
|
1382
|
+
};
|
|
1272
1383
|
}
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
})]
|
|
1384
|
+
/** The panel's header already says when, so the panel hides the schedule. */
|
|
1385
|
+
function SummaryMeta({ facts }) {
|
|
1386
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
1387
|
+
className: "er-summary-bar-meta",
|
|
1388
|
+
children: [
|
|
1389
|
+
facts.countLabel ? /* @__PURE__ */ jsx("span", {
|
|
1390
|
+
className: "er-summary-bar-count",
|
|
1391
|
+
children: facts.countLabel
|
|
1392
|
+
}) : null,
|
|
1393
|
+
facts.discount ? /* @__PURE__ */ jsx("span", {
|
|
1394
|
+
className: "er-summary-bar-discount",
|
|
1395
|
+
title: facts.discount.description ?? void 0,
|
|
1396
|
+
children: facts.discount.label
|
|
1397
|
+
}) : null,
|
|
1398
|
+
facts.schedule ? /* @__PURE__ */ jsx("span", {
|
|
1399
|
+
className: "er-summary-bar-schedule",
|
|
1400
|
+
children: facts.schedule
|
|
1401
|
+
}) : null
|
|
1402
|
+
]
|
|
1293
1403
|
});
|
|
1294
1404
|
}
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1405
|
+
/**
|
|
1406
|
+
* The date step's footer line (issue 1581): the chosen date and its price,
|
|
1407
|
+
* before any places are counted. Nothing until a date is chosen.
|
|
1408
|
+
*/
|
|
1409
|
+
function DateStepSummary({ event }) {
|
|
1410
|
+
if (!event) return null;
|
|
1411
|
+
const price = formatEventPriceDisplay(event.pricing).trim();
|
|
1412
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1413
|
+
className: "er-summary-bar",
|
|
1414
|
+
"data-step": "select-event",
|
|
1415
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
1416
|
+
className: "er-summary-bar-info",
|
|
1417
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
1418
|
+
className: "er-summary-bar-meta",
|
|
1419
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
1420
|
+
className: "er-summary-bar-schedule",
|
|
1421
|
+
children: formatRegistrationSchedule(event)
|
|
1422
|
+
})
|
|
1303
1423
|
})
|
|
1304
|
-
})
|
|
1424
|
+
}), price ? /* @__PURE__ */ jsx("div", {
|
|
1425
|
+
className: "er-summary-bar-pricing",
|
|
1426
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
1427
|
+
className: "er-summary-bar-price",
|
|
1428
|
+
children: price
|
|
1429
|
+
})
|
|
1430
|
+
}) : null]
|
|
1305
1431
|
});
|
|
1306
1432
|
}
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1433
|
+
/**
|
|
1434
|
+
* Booking several (issue 1725): how many are ticked and their total. With
|
|
1435
|
+
* combination prices the usual total is struck through above the planned
|
|
1436
|
+
* one, with the working underneath and the next saving under the bar.
|
|
1437
|
+
*/
|
|
1438
|
+
function SeveralStepSummary({ wizard }) {
|
|
1439
|
+
const several = wizard.severalItems;
|
|
1440
|
+
const first = wizard.selectedEvent;
|
|
1441
|
+
const { working, hint } = wizard.selectionCombination;
|
|
1442
|
+
if (several === null || !first) return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(DateStepSummary, { event: first }), /* @__PURE__ */ jsx(CombinationHint, { parts: hint })] });
|
|
1443
|
+
const currency = publicEventPricingCurrency(first.pricing);
|
|
1444
|
+
const { totalCents: total, listTotalCents: list } = wizard.selectionPrice;
|
|
1445
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
|
|
1446
|
+
className: summaryBarClassName(working),
|
|
1447
|
+
"data-step": "select-event",
|
|
1448
|
+
children: [
|
|
1449
|
+
/* @__PURE__ */ jsx("div", {
|
|
1450
|
+
className: "er-summary-bar-info",
|
|
1451
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
1452
|
+
className: "er-summary-bar-meta",
|
|
1453
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
1454
|
+
className: "er-summary-bar-count",
|
|
1455
|
+
children: selectionItemsLabel(several, wizard.selection)
|
|
1456
|
+
})
|
|
1457
|
+
})
|
|
1458
|
+
}),
|
|
1459
|
+
currency && total !== null && total > 0 ? working && list !== null ? /* @__PURE__ */ jsx(CombinationPricing, {
|
|
1460
|
+
listCents: list,
|
|
1461
|
+
totalCents: total,
|
|
1462
|
+
currency
|
|
1463
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
1464
|
+
className: "er-summary-bar-pricing",
|
|
1465
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
1466
|
+
className: "er-summary-bar-price",
|
|
1467
|
+
children: formatPrice(total, currency)
|
|
1468
|
+
})
|
|
1469
|
+
}) : null,
|
|
1470
|
+
/* @__PURE__ */ jsx(CombinationDetail, { working })
|
|
1471
|
+
]
|
|
1472
|
+
}), /* @__PURE__ */ jsx(CombinationHint, { parts: hint })] });
|
|
1311
1473
|
}
|
|
1312
|
-
/**
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1474
|
+
/**
|
|
1475
|
+
* Dates with a pass or membership: the bar shows what the card is charged,
|
|
1476
|
+
* not the dates' price.
|
|
1477
|
+
*/
|
|
1478
|
+
function barPrice(wizard) {
|
|
1479
|
+
const fundedCardCents = wizard.selectionFunding?.view?.cardCents ?? null;
|
|
1480
|
+
return fundedCardCents === null ? {
|
|
1481
|
+
subtotalCents: wizard.ticketSelectionSubtotalCents,
|
|
1482
|
+
funded: false
|
|
1483
|
+
} : {
|
|
1484
|
+
subtotalCents: fundedCardCents,
|
|
1485
|
+
funded: true
|
|
1320
1486
|
};
|
|
1321
|
-
|
|
1487
|
+
}
|
|
1488
|
+
/**
|
|
1489
|
+
* The later steps' price for several items with combination prices: the
|
|
1490
|
+
* usual total struck through, then what's due. The working shows while the
|
|
1491
|
+
* planner's total stands; once the server prices a code, its total alone.
|
|
1492
|
+
*/
|
|
1493
|
+
function combinationSummary(wizard, price) {
|
|
1494
|
+
if (wizard.severalItems === null || price.funded) return null;
|
|
1495
|
+
const subtotalCents = price.subtotalCents;
|
|
1496
|
+
const list = wizard.selectionPrice.listTotalCents;
|
|
1497
|
+
const working = wizard.selectionCombination.working;
|
|
1498
|
+
if (list === null || list <= subtotalCents || working === null && wizard.combinationCodeField === null) return null;
|
|
1322
1499
|
return {
|
|
1323
|
-
|
|
1324
|
-
|
|
1500
|
+
list,
|
|
1501
|
+
working: subtotalCents === wizard.selectionPrice.totalCents ? working : null
|
|
1325
1502
|
};
|
|
1326
1503
|
}
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
return
|
|
1504
|
+
/** A deposit or instalment plan: the total, what's payable now, and what's left. */
|
|
1505
|
+
function FlexibleBalancePricing(props) {
|
|
1506
|
+
const { summary } = props;
|
|
1507
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1508
|
+
summary.total ? /* @__PURE__ */ jsxs("div", {
|
|
1509
|
+
className: "er-summary-bar-product-detail",
|
|
1510
|
+
children: ["Total: ", summary.total]
|
|
1511
|
+
}) : null,
|
|
1512
|
+
/* @__PURE__ */ jsx("div", {
|
|
1513
|
+
className: "er-summary-bar-price",
|
|
1514
|
+
children: summary.dueToday ?? props.fallbackDueToday
|
|
1515
|
+
}),
|
|
1516
|
+
/* @__PURE__ */ jsx("div", {
|
|
1517
|
+
className: "er-summary-bar-included",
|
|
1518
|
+
children: "Payable now"
|
|
1519
|
+
}),
|
|
1520
|
+
summary.remainingBalance ? /* @__PURE__ */ jsxs("div", {
|
|
1521
|
+
className: "er-summary-bar-product-detail",
|
|
1522
|
+
children: [
|
|
1523
|
+
"Remaining balance: ",
|
|
1524
|
+
summary.remainingBalance,
|
|
1525
|
+
summary.balanceDueBy ? ` due by ${summary.balanceDueBy}` : ""
|
|
1526
|
+
]
|
|
1527
|
+
}) : null,
|
|
1528
|
+
summary.depositPolicy ? /* @__PURE__ */ jsxs("div", {
|
|
1529
|
+
className: "er-summary-bar-product-detail",
|
|
1530
|
+
children: ["Deposit: ", summary.depositPolicy]
|
|
1531
|
+
}) : null
|
|
1532
|
+
] });
|
|
1331
1533
|
}
|
|
1332
|
-
function
|
|
1333
|
-
|
|
1334
|
-
case "in_person": return "In person";
|
|
1335
|
-
case "online": return "Online";
|
|
1336
|
-
}
|
|
1534
|
+
function summaryBarClassName(working) {
|
|
1535
|
+
return working ? "er-summary-bar er-summary-bar--combination" : "er-summary-bar";
|
|
1337
1536
|
}
|
|
1338
|
-
function
|
|
1339
|
-
const {
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
type: "button",
|
|
1346
|
-
"aria-label": `Decrease ${label}`,
|
|
1347
|
-
onClick: () => onTicketsChange(stepNumber(ticketsCount, -1, { min: minAllowed })),
|
|
1348
|
-
disabled: ticketsCount <= minAllowed,
|
|
1349
|
-
className: "er-counter-btn",
|
|
1350
|
-
children: "−"
|
|
1351
|
-
}),
|
|
1352
|
-
/* @__PURE__ */ jsx("span", {
|
|
1353
|
-
className: "er-counter-value",
|
|
1354
|
-
children: ticketsCount
|
|
1355
|
-
}),
|
|
1356
|
-
/* @__PURE__ */ jsx("button", {
|
|
1357
|
-
type: "button",
|
|
1358
|
-
"aria-label": `Increase ${label}`,
|
|
1359
|
-
onClick: () => onTicketsChange(stepNumber(ticketsCount, 1, { max: maxAllowed })),
|
|
1360
|
-
disabled: ticketsCount >= maxAllowed,
|
|
1361
|
-
className: "er-counter-btn",
|
|
1362
|
-
children: "+"
|
|
1363
|
-
})
|
|
1364
|
-
]
|
|
1537
|
+
function EventRegistrationSummaryBar(props) {
|
|
1538
|
+
const { wizard } = props;
|
|
1539
|
+
if (wizard.step === "select-event") return /* @__PURE__ */ jsx(SeveralStepSummary, { wizard });
|
|
1540
|
+
const summaryEvent = wizard.selectedEvent ?? wizard.preSelectedEvent;
|
|
1541
|
+
const summaryTitle = registrationSummaryTitle({
|
|
1542
|
+
...wizard,
|
|
1543
|
+
eventTitle: summaryEvent?.title
|
|
1365
1544
|
});
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
const
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1545
|
+
const summaryCurrency = summaryEvent ? publicEventPricingCurrency(summaryEvent.pricing) : null;
|
|
1546
|
+
const teamMemberNames = (summaryEvent?.teamMembers ?? []).map((teamMember) => teamMember.name).filter(Boolean);
|
|
1547
|
+
const price = barPrice(wizard);
|
|
1548
|
+
const subtotalCents = price.subtotalCents;
|
|
1549
|
+
if (!summaryTitle || !summaryCurrency || subtotalCents === null) return null;
|
|
1550
|
+
const autoAppliedDiscount = wizard.autoAppliedDiscount;
|
|
1551
|
+
const autoAppliedDiscountCents = Math.max(0, autoAppliedDiscount?.computedAmountCents ?? 0);
|
|
1552
|
+
const discountedTotalCents = Math.max(0, subtotalCents - autoAppliedDiscountCents);
|
|
1553
|
+
const flexibleBalanceSummary = getFlexibleBalanceSummary(getSelectedDirectPaymentOption(wizard));
|
|
1554
|
+
const meta = summaryMetaFacts({
|
|
1555
|
+
wizard,
|
|
1556
|
+
summaryEvent,
|
|
1557
|
+
discount: autoAppliedDiscountCents > 0 ? autoAppliedDiscount : null
|
|
1378
1558
|
});
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1559
|
+
const membership = membershipFor(wizard);
|
|
1560
|
+
const combination = combinationSummary(wizard, {
|
|
1561
|
+
subtotalCents,
|
|
1562
|
+
funded: price.funded
|
|
1563
|
+
});
|
|
1564
|
+
const working = combination?.working ?? null;
|
|
1565
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(MembershipRow, { name: membership }), /* @__PURE__ */ jsxs("div", {
|
|
1566
|
+
className: summaryBarClassName(working),
|
|
1567
|
+
"data-step": wizard.step,
|
|
1384
1568
|
children: [
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1569
|
+
/* @__PURE__ */ jsxs("div", {
|
|
1570
|
+
className: "er-summary-bar-info",
|
|
1571
|
+
children: [
|
|
1572
|
+
/* @__PURE__ */ jsx("h4", {
|
|
1573
|
+
className: "er-summary-bar-event",
|
|
1574
|
+
children: summaryTitle
|
|
1575
|
+
}),
|
|
1576
|
+
/* @__PURE__ */ jsx(SummaryMeta, { facts: meta }),
|
|
1577
|
+
teamMemberNames.length > 0 && /* @__PURE__ */ jsxs("div", {
|
|
1578
|
+
className: "er-summary-bar-meta",
|
|
1579
|
+
children: ["With ", teamMemberNames.join(", ")]
|
|
1580
|
+
})
|
|
1581
|
+
]
|
|
1582
|
+
}),
|
|
1583
|
+
combination && subtotalCents > 0 ? /* @__PURE__ */ jsx(CombinationPricing, {
|
|
1584
|
+
listCents: combination.list,
|
|
1585
|
+
totalCents: subtotalCents,
|
|
1586
|
+
currency: summaryCurrency
|
|
1587
|
+
}) : subtotalCents > 0 && /* @__PURE__ */ jsx("div", {
|
|
1588
|
+
className: "er-summary-bar-pricing",
|
|
1589
|
+
children: membership ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
1590
|
+
className: "er-summary-bar-price er-summary-bar-price--struck",
|
|
1591
|
+
children: formatPrice(subtotalCents, summaryCurrency)
|
|
1592
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
1593
|
+
className: "er-summary-bar-included",
|
|
1594
|
+
children: "Included in membership"
|
|
1595
|
+
})] }) : flexibleBalanceSummary ? /* @__PURE__ */ jsx(FlexibleBalancePricing, {
|
|
1596
|
+
summary: flexibleBalanceSummary,
|
|
1597
|
+
fallbackDueToday: formatPrice(discountedTotalCents, summaryCurrency)
|
|
1598
|
+
}) : autoAppliedDiscount && autoAppliedDiscountCents > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1599
|
+
/* @__PURE__ */ jsx("span", {
|
|
1600
|
+
className: "er-summary-bar-price er-summary-bar-price--struck",
|
|
1601
|
+
children: formatPrice(subtotalCents, summaryCurrency)
|
|
1602
|
+
}),
|
|
1603
|
+
/* @__PURE__ */ jsx("span", {
|
|
1604
|
+
className: "er-summary-bar-price",
|
|
1605
|
+
children: formatPrice(discountedTotalCents, summaryCurrency)
|
|
1606
|
+
}),
|
|
1607
|
+
autoAppliedDiscount.description ? /* @__PURE__ */ jsx("div", {
|
|
1608
|
+
className: "er-summary-bar-product-detail er-summary-bar-discount-detail",
|
|
1609
|
+
children: autoAppliedDiscount.description
|
|
1610
|
+
}) : null
|
|
1611
|
+
] }) : /* @__PURE__ */ jsx("span", {
|
|
1612
|
+
className: "er-summary-bar-price",
|
|
1613
|
+
children: formatPrice(subtotalCents, summaryCurrency)
|
|
1614
|
+
})
|
|
1615
|
+
}),
|
|
1616
|
+
/* @__PURE__ */ jsx(CombinationDetail, { working })
|
|
1388
1617
|
]
|
|
1389
|
-
})
|
|
1618
|
+
})] });
|
|
1390
1619
|
}
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1620
|
+
//#endregion
|
|
1621
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizardActions.tsx
|
|
1622
|
+
/**
|
|
1623
|
+
* Label for the button that submits the details step.
|
|
1624
|
+
*
|
|
1625
|
+
* When a pass covers the booking there is no payment step to follow, so this
|
|
1626
|
+
* button is the last thing read before a credit is spent — it names the pass
|
|
1627
|
+
* rather than leaving that to the summary above it.
|
|
1628
|
+
*/
|
|
1629
|
+
function resolveDetailsButtonText(input) {
|
|
1630
|
+
const { wizard } = input;
|
|
1631
|
+
const admission = wizard.admission;
|
|
1632
|
+
switch (admission.kind) {
|
|
1633
|
+
case "checking": return "Checking availability…";
|
|
1634
|
+
case "closed": return closedAdmissionLabel(admission.reason);
|
|
1635
|
+
case "fullyBooked": return fullyBookedLabel(admission);
|
|
1636
|
+
case "waitlist": return "Join waitlist";
|
|
1637
|
+
case "open":
|
|
1638
|
+
case "resume": break;
|
|
1639
|
+
}
|
|
1640
|
+
if (wizard.paymentSelection.method === "membership") return input.fallbackText;
|
|
1641
|
+
return wizard.eventRequiresPayment ? "Continue to payment" : input.fallbackText;
|
|
1394
1642
|
}
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1643
|
+
/** When the booking options failed to load, the visitor can ask for them again. */
|
|
1644
|
+
function ReloadOptionsButton(props) {
|
|
1645
|
+
const { admission } = props.wizard;
|
|
1646
|
+
if (admission.kind !== "closed" || admission.reason !== "optionsUnavailable") return null;
|
|
1647
|
+
return /* @__PURE__ */ jsx("button", {
|
|
1648
|
+
type: "button",
|
|
1649
|
+
onClick: props.wizard.reloadOptions,
|
|
1650
|
+
className: "er-back-btn",
|
|
1651
|
+
children: "Try again"
|
|
1404
1652
|
});
|
|
1405
1653
|
}
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1654
|
+
/**
|
|
1655
|
+
* The date step's footer (issue 1581): Continue moves on once a date is
|
|
1656
|
+
* chosen. Unrelated events still move on when picked, so there's nothing here.
|
|
1657
|
+
*/
|
|
1658
|
+
function SelectDateActions(props) {
|
|
1659
|
+
const { wizard } = props;
|
|
1660
|
+
const several = wizard.selectionMode.kind === "several";
|
|
1661
|
+
if (!several && getEventSelectionMode(wizard.scopedEvents) !== "date") return null;
|
|
1662
|
+
const chosen = wizard.selectedEvent;
|
|
1663
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1664
|
+
className: "rb-wizard-actions er-actions",
|
|
1665
|
+
children: /* @__PURE__ */ jsx(ThemedButton, {
|
|
1666
|
+
type: "button",
|
|
1667
|
+
onClick: several ? wizard.handleSelectionContinue : () => {
|
|
1668
|
+
if (chosen) wizard.handleEventSelect(chosen);
|
|
1669
|
+
},
|
|
1670
|
+
disabled: several ? wizard.selection.length === 0 : !chosen,
|
|
1671
|
+
variant: props.buttonVariant,
|
|
1672
|
+
size: "md",
|
|
1673
|
+
label: "Continue"
|
|
1674
|
+
})
|
|
1675
|
+
});
|
|
1676
|
+
}
|
|
1677
|
+
function SelectTicketsActions(props) {
|
|
1678
|
+
const { wizard } = props;
|
|
1679
|
+
const { label: continueLabel, pending: registrationOptionsPending } = wizard.ticketContinuation;
|
|
1680
|
+
const isContinueDisabled = wizard.ticketContinuation.kind === "blocked";
|
|
1411
1681
|
return /* @__PURE__ */ jsxs("div", {
|
|
1412
|
-
className: "er-
|
|
1682
|
+
className: "rb-wizard-actions er-actions",
|
|
1413
1683
|
children: [
|
|
1414
|
-
/* @__PURE__ */ jsx("
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
/* @__PURE__ */ jsx("input", {
|
|
1420
|
-
id,
|
|
1421
|
-
type: "number",
|
|
1422
|
-
min: formatCentsAsCurrencyInput(props.slidingScale.minAmount),
|
|
1423
|
-
max: formatCentsAsCurrencyInput(props.slidingScale.maxAmount),
|
|
1424
|
-
step: "0.01",
|
|
1425
|
-
inputMode: "decimal",
|
|
1426
|
-
className: "form-input",
|
|
1427
|
-
value: props.value,
|
|
1428
|
-
onChange: (event) => props.onChange?.(event.target.value)
|
|
1684
|
+
entryChoosesEvent(wizard.entry) && /* @__PURE__ */ jsx("button", {
|
|
1685
|
+
type: "button",
|
|
1686
|
+
onClick: () => wizard.setStep("select-event"),
|
|
1687
|
+
className: "er-back-btn",
|
|
1688
|
+
children: "← Back"
|
|
1429
1689
|
}),
|
|
1430
|
-
/* @__PURE__ */
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1690
|
+
registrationStopsHere(wizard.admission) ? null : /* @__PURE__ */ jsx(ThemedButton, {
|
|
1691
|
+
type: "button",
|
|
1692
|
+
onClick: wizard.handleTicketsComplete,
|
|
1693
|
+
disabled: isContinueDisabled,
|
|
1694
|
+
variant: props.buttonVariant,
|
|
1695
|
+
size: "md",
|
|
1696
|
+
label: continueLabel,
|
|
1697
|
+
pending: registrationOptionsPending ? {
|
|
1698
|
+
label: continueLabel,
|
|
1699
|
+
spinnerSize: "xs",
|
|
1700
|
+
spinnerClassName: "er-button-spinner",
|
|
1701
|
+
contentClassName: "er-button-with-spinner"
|
|
1702
|
+
} : void 0
|
|
1440
1703
|
}),
|
|
1441
|
-
|
|
1442
|
-
className: "er-text er-text--muted",
|
|
1443
|
-
children: props.message
|
|
1444
|
-
}) : null
|
|
1704
|
+
/* @__PURE__ */ jsx(ReloadOptionsButton, { wizard })
|
|
1445
1705
|
]
|
|
1446
1706
|
});
|
|
1447
1707
|
}
|
|
1448
|
-
function
|
|
1449
|
-
const
|
|
1450
|
-
const
|
|
1708
|
+
function EnterDetailsActions(props) {
|
|
1709
|
+
const { wizard } = props;
|
|
1710
|
+
const isContinueDisabled = resolveRegistrationAvailabilityBlocker(wizard.admission) !== null;
|
|
1711
|
+
const continueLabel = resolveDetailsButtonText({
|
|
1712
|
+
wizard,
|
|
1713
|
+
fallbackText: props.buttonText
|
|
1714
|
+
});
|
|
1451
1715
|
return /* @__PURE__ */ jsxs("div", {
|
|
1452
|
-
className: "er-
|
|
1716
|
+
className: "rb-wizard-actions er-actions",
|
|
1453
1717
|
children: [
|
|
1454
|
-
/* @__PURE__ */ jsx("
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
children:
|
|
1459
|
-
const quantity = getTicketLineQuantity(props.ticketSelections, ticketType.pricingOptionId);
|
|
1460
|
-
const disabled = !canRequestTicketOption(ticketType.availability, props.purpose);
|
|
1461
|
-
const availabilityLabel = getTicketTypeAvailabilityLabel(ticketType);
|
|
1462
|
-
const ticketTypeRemainingLabel = placesLeftLabel({
|
|
1463
|
-
kind: "ticketType",
|
|
1464
|
-
remaining: ticketType.availability.remainingPlaces,
|
|
1465
|
-
dateRemaining: props.availableSpots ?? null
|
|
1466
|
-
}, props.display);
|
|
1467
|
-
const priceLabel = ticketType.priceAmount > 0 ? formatPrice(ticketType.priceAmount, props.currency) : "Free";
|
|
1468
|
-
const maxAllowed = getTicketTypeLineMax({
|
|
1469
|
-
currentQuantity: quantity,
|
|
1470
|
-
totalSelectedQuantity,
|
|
1471
|
-
maxTickets: props.maxTickets,
|
|
1472
|
-
purpose: props.purpose,
|
|
1473
|
-
pricingOptionId: ticketType.pricingOptionId,
|
|
1474
|
-
availability: ticketType.availability,
|
|
1475
|
-
heldPlacesBySelection: props.heldPlacesBySelection,
|
|
1476
|
-
overallRemainingPlaces: props.availableSpots ?? null
|
|
1477
|
-
});
|
|
1478
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
1479
|
-
className: `er-ticket-line${disabled ? " er-ticket-line--disabled" : ""}`,
|
|
1480
|
-
role: "listitem",
|
|
1481
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
1482
|
-
className: "er-ticket-line-main",
|
|
1483
|
-
children: [
|
|
1484
|
-
/* @__PURE__ */ jsxs("div", {
|
|
1485
|
-
className: "er-ticket-line-heading",
|
|
1486
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
1487
|
-
className: "er-ticket-line-name",
|
|
1488
|
-
children: ticketType.name
|
|
1489
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
1490
|
-
className: "er-ticket-line-price",
|
|
1491
|
-
children: priceLabel
|
|
1492
|
-
})]
|
|
1493
|
-
}),
|
|
1494
|
-
ticketType.description ? /* @__PURE__ */ jsx("p", {
|
|
1495
|
-
className: "er-ticket-line-detail",
|
|
1496
|
-
children: ticketType.description
|
|
1497
|
-
}) : null,
|
|
1498
|
-
availabilityLabel ? /* @__PURE__ */ jsx("p", {
|
|
1499
|
-
className: "er-ticket-line-detail",
|
|
1500
|
-
children: availabilityLabel
|
|
1501
|
-
}) : ticketTypeRemainingLabel ? /* @__PURE__ */ jsx("p", {
|
|
1502
|
-
className: "er-ticket-line-detail",
|
|
1503
|
-
children: ticketTypeRemainingLabel
|
|
1504
|
-
}) : null
|
|
1505
|
-
]
|
|
1506
|
-
}), /* @__PURE__ */ jsx(TicketCounter, {
|
|
1507
|
-
ticketsCount: quantity,
|
|
1508
|
-
minAllowed: 0,
|
|
1509
|
-
maxAllowed,
|
|
1510
|
-
label: ticketType.name,
|
|
1511
|
-
onTicketsChange: (nextQuantity) => {
|
|
1512
|
-
props.onTicketSelectionsChange?.(setTicketLineQuantity({
|
|
1513
|
-
lines: props.ticketSelections,
|
|
1514
|
-
pricingOptionId: ticketType.pricingOptionId,
|
|
1515
|
-
quantity: nextQuantity
|
|
1516
|
-
}));
|
|
1517
|
-
}
|
|
1518
|
-
})]
|
|
1519
|
-
}, ticketType.pricingOptionId);
|
|
1520
|
-
})
|
|
1718
|
+
/* @__PURE__ */ jsx("button", {
|
|
1719
|
+
type: "button",
|
|
1720
|
+
onClick: () => wizard.setStep("select-tickets"),
|
|
1721
|
+
className: "er-back-btn",
|
|
1722
|
+
children: "← Back"
|
|
1521
1723
|
}),
|
|
1522
|
-
/* @__PURE__ */ jsx(
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1724
|
+
registrationStopsHere(wizard.admission) ? null : /* @__PURE__ */ jsx(ThemedButton, {
|
|
1725
|
+
type: "button",
|
|
1726
|
+
onClick: wizard.handleDetailsComplete,
|
|
1727
|
+
disabled: isContinueDisabled,
|
|
1728
|
+
variant: props.buttonVariant,
|
|
1729
|
+
size: "md",
|
|
1730
|
+
label: continueLabel
|
|
1527
1731
|
}),
|
|
1528
|
-
|
|
1529
|
-
className: "er-text er-text--muted",
|
|
1530
|
-
children: [
|
|
1531
|
-
"Choose at least one ",
|
|
1532
|
-
props.bookingUnit,
|
|
1533
|
-
" to continue."
|
|
1534
|
-
]
|
|
1535
|
-
}) : totalSelectedQuantity === 0 ? /* @__PURE__ */ jsxs("p", {
|
|
1536
|
-
className: "er-text er-text--muted",
|
|
1537
|
-
children: [
|
|
1538
|
-
"No ",
|
|
1539
|
-
props.bookingUnit === "place" ? "places" : "ticket types",
|
|
1540
|
-
" are currently available."
|
|
1541
|
-
]
|
|
1542
|
-
}) : null
|
|
1732
|
+
/* @__PURE__ */ jsx(ReloadOptionsButton, { wizard })
|
|
1543
1733
|
]
|
|
1544
1734
|
});
|
|
1545
1735
|
}
|
|
1546
|
-
function
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
})
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
"aria-label": "Attendance mode",
|
|
1567
|
-
children: props.tiles.map((tile) => {
|
|
1568
|
-
const isSelected = props.selectedAttendanceMode === tile.mode;
|
|
1569
|
-
return /* @__PURE__ */ jsx("div", {
|
|
1570
|
-
role: "listitem",
|
|
1571
|
-
children: /* @__PURE__ */ jsxs("button", {
|
|
1572
|
-
type: "button",
|
|
1573
|
-
"aria-pressed": isSelected,
|
|
1574
|
-
className: `er-payment-tile${isSelected ? " er-payment-tile--selected" : ""}`,
|
|
1575
|
-
onClick: () => props.onAttendanceModeChange?.(tile.mode),
|
|
1576
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
1577
|
-
className: "er-payment-tile-label",
|
|
1578
|
-
children: getEventAttendanceModeLabel(tile.mode)
|
|
1579
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
1580
|
-
className: "er-payment-tile-detail",
|
|
1581
|
-
children: tile.detail
|
|
1582
|
-
})]
|
|
1583
|
-
})
|
|
1584
|
-
}, tile.mode);
|
|
1585
|
-
})
|
|
1586
|
-
});
|
|
1587
|
-
}
|
|
1588
|
-
function resolveTicketSelectionPricing(event) {
|
|
1589
|
-
return {
|
|
1590
|
-
mode: event ? publicEventPricingStrategy(event.pricing) : void 0,
|
|
1591
|
-
currency: event ? publicEventPricingCurrency(event.pricing) : null
|
|
1592
|
-
};
|
|
1593
|
-
}
|
|
1594
|
-
/** Someone with an invitation is claiming a place, not joining the list. */
|
|
1595
|
-
function waitlistIsOpenTo(source, invitation) {
|
|
1596
|
-
return source && !invitation ? canJoinEventWaitlist(source) : false;
|
|
1597
|
-
}
|
|
1598
|
-
function getTicketSelectionCapacity(event, attendanceMode, display, invitation = null) {
|
|
1599
|
-
const source = event ? selectEventCapacitySource(event, attendanceMode) : null;
|
|
1600
|
-
const availability = source ? getEventAvailability(source) : null;
|
|
1601
|
-
const canJoinWaitlist = waitlistIsOpenTo(source, invitation);
|
|
1602
|
-
return {
|
|
1603
|
-
availableSpots: availability?.available,
|
|
1604
|
-
isSoldOut: availability?.isFull ?? false,
|
|
1605
|
-
canJoinWaitlist,
|
|
1606
|
-
eventAvailabilityLabel: !canJoinWaitlist && source ? placesLeftLabel(source, display) : null
|
|
1607
|
-
};
|
|
1608
|
-
}
|
|
1609
|
-
/**
|
|
1610
|
-
* One price: the visitor is choosing places, not ticket types (issue 1581).
|
|
1611
|
-
* The ceiling comes from settled availability (`placeCountCeiling`); the
|
|
1612
|
-
* page's cached count is only shown, never enforced.
|
|
1613
|
-
*/
|
|
1614
|
-
function PlaceCounter(props) {
|
|
1615
|
-
const spots = props.waitlist ? null : props.availableSpots;
|
|
1616
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(BookingQuantityPrompt, {
|
|
1617
|
-
unit: "place",
|
|
1618
|
-
waitlist: props.waitlist
|
|
1619
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
1620
|
-
className: "er-ticket-counter-group",
|
|
1621
|
-
children: [/* @__PURE__ */ jsx(TicketCounter, {
|
|
1622
|
-
ticketsCount: props.ticketsCount,
|
|
1623
|
-
maxAllowed: props.ceiling,
|
|
1624
|
-
label: bookingQuantityLabel("place", props.waitlist),
|
|
1625
|
-
onTicketsChange: props.onTicketsChange
|
|
1626
|
-
}), /* @__PURE__ */ jsx(TicketCounterLimit, {
|
|
1627
|
-
maxAllowed: props.ceiling,
|
|
1628
|
-
quantityLabel: props.waitlist ? bookingQuantityLabel("place", true) : pluralizeBookingUnit("place", props.ceiling),
|
|
1629
|
-
availableSpots: spots,
|
|
1630
|
-
availabilityLabel: props.availabilityLabel
|
|
1736
|
+
function SelectPaymentActions(props) {
|
|
1737
|
+
const { wizard } = props;
|
|
1738
|
+
const { status, canContinue, buttonText } = wizard.paymentStepState;
|
|
1739
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [status === "ready" && wizard.paymentHeldForCode ? /* @__PURE__ */ jsx("p", {
|
|
1740
|
+
className: "er-discount__hint",
|
|
1741
|
+
children: "Press Apply to use your discount code, or remove it to carry on without it."
|
|
1742
|
+
}) : null, /* @__PURE__ */ jsxs("div", {
|
|
1743
|
+
className: "rb-wizard-actions er-actions",
|
|
1744
|
+
children: [/* @__PURE__ */ jsx("button", {
|
|
1745
|
+
type: "button",
|
|
1746
|
+
onClick: () => wizard.setStep("enter-details"),
|
|
1747
|
+
className: "er-back-btn",
|
|
1748
|
+
children: "← Back"
|
|
1749
|
+
}), status === "ready" && /* @__PURE__ */ jsx(ThemedButton, {
|
|
1750
|
+
type: "button",
|
|
1751
|
+
onClick: () => void wizard.handlePaymentSelect(),
|
|
1752
|
+
disabled: !canContinue,
|
|
1753
|
+
variant: props.buttonVariant,
|
|
1754
|
+
size: "md",
|
|
1755
|
+
label: buttonText
|
|
1631
1756
|
})]
|
|
1632
1757
|
})] });
|
|
1633
1758
|
}
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1759
|
+
/** Stripe owns the Pay button, so the payment footer offers only the way back. */
|
|
1760
|
+
function PaymentActions(props) {
|
|
1761
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1762
|
+
className: "rb-wizard-actions rb-wizard-actions--back-only er-actions",
|
|
1763
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
1764
|
+
type: "button",
|
|
1765
|
+
onClick: props.wizard.paymentController.check,
|
|
1766
|
+
className: "er-back-btn",
|
|
1767
|
+
children: "← Back"
|
|
1768
|
+
})
|
|
1769
|
+
});
|
|
1639
1770
|
}
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
const hasAvailableTicketTypes = usesTicketTypes && visibleTicketTypes.some((ticketType) => canRequestTicketOption(ticketType.availability, purpose));
|
|
1663
|
-
const maxAllowed = maxTickets;
|
|
1664
|
-
if (deliveryMode === "hybrid" && !selectedAttendanceMode) return /* @__PURE__ */ jsxs("div", {
|
|
1771
|
+
function EventRegistrationWizardActions(props) {
|
|
1772
|
+
const { wizard } = props;
|
|
1773
|
+
switch (wizard.step) {
|
|
1774
|
+
case "error":
|
|
1775
|
+
case "success":
|
|
1776
|
+
case "submitting":
|
|
1777
|
+
case "verifying-payment":
|
|
1778
|
+
case "verifying-timeout":
|
|
1779
|
+
case "payment-status":
|
|
1780
|
+
case "payment-failed": return null;
|
|
1781
|
+
case "select-event": return /* @__PURE__ */ jsx(SelectDateActions, { ...props });
|
|
1782
|
+
case "select-tickets": return /* @__PURE__ */ jsx(SelectTicketsActions, { ...props });
|
|
1783
|
+
case "enter-details": return /* @__PURE__ */ jsx(EnterDetailsActions, { ...props });
|
|
1784
|
+
case "select-payment": return /* @__PURE__ */ jsx(SelectPaymentActions, { ...props });
|
|
1785
|
+
case "payment": return /* @__PURE__ */ jsx(PaymentActions, { ...props });
|
|
1786
|
+
default: return null;
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1789
|
+
//#endregion
|
|
1790
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/PaymentBlockingPanel.tsx
|
|
1791
|
+
function MissingEligibilityPanel() {
|
|
1792
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1665
1793
|
className: "rb-reg-stack er-stack",
|
|
1666
|
-
children:
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
className: "er-
|
|
1670
|
-
children: "
|
|
1671
|
-
}),
|
|
1672
|
-
/* @__PURE__ */ jsx(AttendanceModeTiles, {
|
|
1673
|
-
tiles: eventAttendanceModeTiles(attendanceModes, display),
|
|
1674
|
-
selectedAttendanceMode: null,
|
|
1675
|
-
onAttendanceModeChange
|
|
1676
|
-
}),
|
|
1677
|
-
/* @__PURE__ */ jsx("p", {
|
|
1678
|
-
className: "er-text er-text--muted",
|
|
1679
|
-
children: "Choose whether you want to attend in person or online."
|
|
1794
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
1795
|
+
className: "er-center",
|
|
1796
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
1797
|
+
className: "er-text er-error",
|
|
1798
|
+
children: "We couldn’t load the booking options for this event. Please refresh this page and try again. If this keeps happening, contact the organiser for help."
|
|
1680
1799
|
})
|
|
1681
|
-
|
|
1800
|
+
})
|
|
1682
1801
|
});
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1802
|
+
}
|
|
1803
|
+
function UnavailableEntitlementMessage(props) {
|
|
1804
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1805
|
+
/* @__PURE__ */ jsx("p", {
|
|
1806
|
+
className: "er-text er-error",
|
|
1807
|
+
children: "This event requires a valid pass or membership to register."
|
|
1808
|
+
}),
|
|
1809
|
+
props.eligibility.eventAcceptsPasses && !props.eligibility.eventAcceptsMemberships && /* @__PURE__ */ jsx("p", {
|
|
1686
1810
|
className: "er-text er-text--muted",
|
|
1687
|
-
children: "
|
|
1811
|
+
children: "You need a pass with credits for this event category."
|
|
1812
|
+
}),
|
|
1813
|
+
props.eligibility.eventAcceptsMemberships && !props.eligibility.eventAcceptsPasses && /* @__PURE__ */ jsx("p", {
|
|
1814
|
+
className: "er-text er-text--muted",
|
|
1815
|
+
children: "You need an active membership for this event category."
|
|
1688
1816
|
})
|
|
1817
|
+
] });
|
|
1818
|
+
}
|
|
1819
|
+
/** Places remain, just fewer than this booking asks for (issue 1581). */
|
|
1820
|
+
function FewerPlacesPaymentPanel(props) {
|
|
1821
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1822
|
+
className: "rb-reg-stack er-stack",
|
|
1823
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
1824
|
+
className: "er-title",
|
|
1825
|
+
children: props.heading
|
|
1826
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
1827
|
+
className: "er-center",
|
|
1828
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
1829
|
+
className: "er-text er-text--muted",
|
|
1830
|
+
children: props.message
|
|
1831
|
+
})
|
|
1832
|
+
})]
|
|
1689
1833
|
});
|
|
1834
|
+
}
|
|
1835
|
+
function SoldOutPaymentPanel() {
|
|
1690
1836
|
return /* @__PURE__ */ jsxs("div", {
|
|
1691
1837
|
className: "rb-reg-stack er-stack",
|
|
1692
|
-
children: [
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
tiles: eventAttendanceModeTiles(attendanceModes, display),
|
|
1699
|
-
selectedAttendanceMode,
|
|
1700
|
-
onAttendanceModeChange
|
|
1701
|
-
})] }) : null,
|
|
1702
|
-
usesTicketTypes ? /* @__PURE__ */ jsx(Fragment, { children: noVisibleTicketTypes ? /* @__PURE__ */ jsx("p", {
|
|
1838
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
1839
|
+
className: "er-title",
|
|
1840
|
+
children: "Sold out"
|
|
1841
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
1842
|
+
className: "er-center",
|
|
1843
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
1703
1844
|
className: "er-text er-text--muted",
|
|
1704
|
-
children: "
|
|
1705
|
-
})
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1845
|
+
children: "This event is fully booked and there is no waitlist available for this booking."
|
|
1846
|
+
})
|
|
1847
|
+
})]
|
|
1848
|
+
});
|
|
1849
|
+
}
|
|
1850
|
+
function IneligiblePaymentPanel(props) {
|
|
1851
|
+
const promptLogin = shouldPromptForLogin("not-eligible", props.isAuthenticated, props.eligibility);
|
|
1852
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1853
|
+
className: "rb-reg-stack er-stack",
|
|
1854
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
1855
|
+
className: "er-title",
|
|
1856
|
+
children: promptLogin ? "Log in required" : "Payment required"
|
|
1857
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
1858
|
+
className: "er-center",
|
|
1859
|
+
children: promptLogin ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1860
|
+
/* @__PURE__ */ jsx("p", {
|
|
1861
|
+
className: "er-text er-text--muted",
|
|
1862
|
+
children: "Have a pass or membership? Log in to use it."
|
|
1710
1863
|
}),
|
|
1711
|
-
/* @__PURE__ */ jsx(
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
hasAvailableTicketTypes,
|
|
1723
|
-
onTicketSelectionsChange,
|
|
1724
|
-
bookingUnit: unit
|
|
1725
|
-
})
|
|
1726
|
-
] }) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1727
|
-
slidingScale ? /* @__PURE__ */ jsx(SlidingScaleAmountField, {
|
|
1728
|
-
slidingScale,
|
|
1729
|
-
currency: eventPricingCurrency,
|
|
1730
|
-
value: selectedSlidingAmountInput,
|
|
1731
|
-
message: slidingScaleSelectionMessage,
|
|
1732
|
-
onChange: onSlidingAmountChange
|
|
1733
|
-
}) : null,
|
|
1734
|
-
/* @__PURE__ */ jsx(BookingUnitSessionHint, { bookingUnit }),
|
|
1735
|
-
/* @__PURE__ */ jsx(PlaceCounter, {
|
|
1736
|
-
ticketsCount,
|
|
1737
|
-
ceiling: placesCeiling ?? maxAllowed,
|
|
1738
|
-
availableSpots,
|
|
1739
|
-
availabilityLabel: eventAvailabilityLabel,
|
|
1740
|
-
waitlist: canJoinWaitlist,
|
|
1741
|
-
onTicketsChange
|
|
1864
|
+
/* @__PURE__ */ jsx(ThemedButton, {
|
|
1865
|
+
type: "button",
|
|
1866
|
+
variant: "primary",
|
|
1867
|
+
size: "md",
|
|
1868
|
+
label: "Email me a login link",
|
|
1869
|
+
disabled: !props.email.trim(),
|
|
1870
|
+
onClick: props.onRequestLogin
|
|
1871
|
+
}),
|
|
1872
|
+
!props.email.trim() && /* @__PURE__ */ jsx("p", {
|
|
1873
|
+
className: "er-text er-text--muted",
|
|
1874
|
+
children: "Enter your email to request a login link."
|
|
1742
1875
|
})
|
|
1743
|
-
] }),
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1876
|
+
] }) : /* @__PURE__ */ jsx(UnavailableEntitlementMessage, { eligibility: props.eligibility })
|
|
1877
|
+
})]
|
|
1878
|
+
});
|
|
1879
|
+
}
|
|
1880
|
+
function renderRegistrationAvailabilityBlocker(admission) {
|
|
1881
|
+
const blocker = resolveRegistrationAvailabilityBlocker(admission);
|
|
1882
|
+
if (blocker?.kind !== "unavailable") return null;
|
|
1883
|
+
switch (blocker.reason) {
|
|
1884
|
+
case "alreadyWaitlisted": return /* @__PURE__ */ jsx(AlreadyWaitlistedPaymentPanel, {});
|
|
1885
|
+
case "soldOut": return /* @__PURE__ */ jsx(SoldOutPaymentPanel, {});
|
|
1886
|
+
case "fewerPlacesLeft": return /* @__PURE__ */ jsx(FewerPlacesPaymentPanel, {
|
|
1887
|
+
heading: blocker.heading,
|
|
1888
|
+
message: blocker.message
|
|
1889
|
+
});
|
|
1890
|
+
case "closed": return /* @__PURE__ */ jsx(ClosedPaymentPanel, {
|
|
1891
|
+
message: blocker.message,
|
|
1892
|
+
contact: admission.kind === "closed" ? admission.contact : void 0
|
|
1893
|
+
});
|
|
1894
|
+
}
|
|
1895
|
+
}
|
|
1896
|
+
function PaymentBlockingPanel(props) {
|
|
1897
|
+
if (props.eligibilityLoading) return /* @__PURE__ */ jsx("div", {
|
|
1898
|
+
className: "rb-reg-stack er-stack",
|
|
1899
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
1900
|
+
className: "er-center",
|
|
1901
|
+
children: [/* @__PURE__ */ jsx(SpinnerNode, {
|
|
1902
|
+
size: "lg",
|
|
1903
|
+
srLabel: "Checking payment options"
|
|
1904
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
1905
|
+
className: "er-text--muted",
|
|
1906
|
+
children: "Checking payment options…"
|
|
1907
|
+
})]
|
|
1908
|
+
})
|
|
1909
|
+
});
|
|
1910
|
+
if (props.eligibilityError) return /* @__PURE__ */ jsx("div", {
|
|
1911
|
+
className: "rb-reg-stack er-stack",
|
|
1912
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
1913
|
+
className: "er-center",
|
|
1914
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
1915
|
+
className: "er-text er-error",
|
|
1916
|
+
children: props.eligibilityError
|
|
1751
1917
|
})
|
|
1752
|
-
|
|
1918
|
+
})
|
|
1753
1919
|
});
|
|
1754
|
-
};
|
|
1755
|
-
|
|
1756
|
-
if (
|
|
1757
|
-
|
|
1758
|
-
|
|
1920
|
+
if (!props.eligibility) return /* @__PURE__ */ jsx(MissingEligibilityPanel, {});
|
|
1921
|
+
const availabilityPanel = renderRegistrationAvailabilityBlocker(props.admission);
|
|
1922
|
+
if (availabilityPanel) return availabilityPanel;
|
|
1923
|
+
if (props.paysNothing) return /* @__PURE__ */ jsx(FreePaymentSummary, { ticketsCount: props.ticketsCount });
|
|
1924
|
+
return props.eligibility.paymentOptions.length > 0 ? null : /* @__PURE__ */ jsx(IneligiblePaymentPanel, {
|
|
1925
|
+
eligibility: props.eligibility,
|
|
1926
|
+
email: props.email,
|
|
1927
|
+
isAuthenticated: props.isAuthenticated,
|
|
1928
|
+
onRequestLogin: props.onRequestLogin
|
|
1759
1929
|
});
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1930
|
+
}
|
|
1931
|
+
function AlreadyWaitlistedPaymentPanel() {
|
|
1932
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1933
|
+
className: "rb-reg-stack er-stack",
|
|
1934
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
1935
|
+
className: "er-title",
|
|
1936
|
+
children: "Already on the waitlist"
|
|
1937
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
1938
|
+
className: "er-center",
|
|
1939
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
1940
|
+
className: "er-text er-text--muted",
|
|
1941
|
+
children: "You're already on the waitlist for this event."
|
|
1942
|
+
}), /* @__PURE__ */ jsx("a", {
|
|
1943
|
+
href: portalPath({ page: "bookings" }),
|
|
1944
|
+
className: "er-retry-btn",
|
|
1945
|
+
children: "View my bookings"
|
|
1946
|
+
})]
|
|
1947
|
+
})]
|
|
1764
1948
|
});
|
|
1765
|
-
return isSoldOut ? /* @__PURE__ */ jsx("p", {
|
|
1766
|
-
className: "er-text er-text--muted",
|
|
1767
|
-
children: "This event is fully booked."
|
|
1768
|
-
}) : null;
|
|
1769
1949
|
}
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1950
|
+
function FreePaymentSummary({ ticketsCount }) {
|
|
1951
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1952
|
+
className: "rb-reg-stack er-stack",
|
|
1953
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
1954
|
+
className: "er-title",
|
|
1955
|
+
children: "Payment"
|
|
1956
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
1957
|
+
className: "er-payment-summary",
|
|
1958
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
1959
|
+
className: "er-text",
|
|
1960
|
+
children: "This event is free!"
|
|
1961
|
+
}), /* @__PURE__ */ jsxs("p", {
|
|
1962
|
+
className: "er-text er-text--muted",
|
|
1963
|
+
children: [
|
|
1964
|
+
ticketsCount,
|
|
1965
|
+
" ticket",
|
|
1966
|
+
ticketsCount > 1 ? "s" : ""
|
|
1967
|
+
]
|
|
1968
|
+
})]
|
|
1969
|
+
})]
|
|
1970
|
+
});
|
|
1774
1971
|
}
|
|
1775
|
-
|
|
1776
|
-
|
|
1972
|
+
/** Why this can't be paid for here, and who to contact when the business can take the booking directly. */
|
|
1973
|
+
function ClosedPaymentPanel({ message, contact }) {
|
|
1974
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1975
|
+
className: "rb-reg-stack er-stack",
|
|
1976
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
1977
|
+
className: "er-center",
|
|
1978
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
1979
|
+
className: "er-text er-error",
|
|
1980
|
+
children: message
|
|
1981
|
+
}), contact ? /* @__PURE__ */ jsx(OrganiserContactLine, { contact }) : null]
|
|
1982
|
+
})
|
|
1983
|
+
});
|
|
1984
|
+
}
|
|
1985
|
+
//#endregion
|
|
1986
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/existingBookingsSummary.ts
|
|
1987
|
+
function places(count) {
|
|
1988
|
+
return count === 1 ? "1 place" : `${count} places`;
|
|
1989
|
+
}
|
|
1990
|
+
/** Only confirmed bookings come back for a date; waitlist places have their own notice. */
|
|
1991
|
+
function summariseExistingBookings(registrations) {
|
|
1992
|
+
const [only] = registrations;
|
|
1993
|
+
if (!only) return { kind: "none" };
|
|
1994
|
+
if (registrations.length === 1) return {
|
|
1995
|
+
kind: "booked",
|
|
1996
|
+
detail: only.ticketBreakdown ?? places(only.ticketsCount)
|
|
1997
|
+
};
|
|
1998
|
+
const placeCount = registrations.reduce((total, registration) => total + registration.ticketsCount, 0);
|
|
1999
|
+
return {
|
|
2000
|
+
kind: "booked",
|
|
2001
|
+
detail: `${registrations.length} bookings · ${places(placeCount)}`
|
|
2002
|
+
};
|
|
1777
2003
|
}
|
|
1778
2004
|
//#endregion
|
|
1779
2005
|
//#region ../blocks/src/system/runtime/nodes/event-registration/SeveralRunsTicketStep.tsx
|
|
@@ -1969,13 +2195,6 @@ function Totals(props) {
|
|
|
1969
2195
|
})]
|
|
1970
2196
|
});
|
|
1971
2197
|
}
|
|
1972
|
-
/**
|
|
1973
|
-
* What several items cost, above the payment choice (issue 1725): the items
|
|
1974
|
-
* and places as a caption, each item at what all its places cost, then the
|
|
1975
|
-
* total (after a subtotal and any code when something comes off). With
|
|
1976
|
-
* combination prices the items are grouped by combination, with the note
|
|
1977
|
-
* and saving under the list.
|
|
1978
|
-
*/
|
|
1979
2198
|
function SelectionPaymentSummary(props) {
|
|
1980
2199
|
const { summary, currency } = props;
|
|
1981
2200
|
const money = (cents) => formatCurrencyAmount(cents, currency);
|
|
@@ -1987,11 +2206,7 @@ function SelectionPaymentSummary(props) {
|
|
|
1987
2206
|
return /* @__PURE__ */ jsxs("div", {
|
|
1988
2207
|
className: "rb-reg-stack er-stack er-selection-payment-summary",
|
|
1989
2208
|
children: [
|
|
1990
|
-
/* @__PURE__ */ jsx(
|
|
1991
|
-
tabIndex: -1,
|
|
1992
|
-
className: "er-title",
|
|
1993
|
-
children: "Your booking"
|
|
1994
|
-
}),
|
|
2209
|
+
/* @__PURE__ */ jsx(SummaryHeading, { changeDates: props.changeDates }),
|
|
1995
2210
|
/* @__PURE__ */ jsxs("div", {
|
|
1996
2211
|
className: "er-confirmation-summary er-selection-payment",
|
|
1997
2212
|
children: [
|
|
@@ -2026,6 +2241,293 @@ function SelectionPaymentSummary(props) {
|
|
|
2026
2241
|
]
|
|
2027
2242
|
});
|
|
2028
2243
|
}
|
|
2244
|
+
/** "Your booking", with "Change dates" beside it when the dates can be changed from here. */
|
|
2245
|
+
function SummaryHeading(props) {
|
|
2246
|
+
return /* @__PURE__ */ jsx(StepHeading, {
|
|
2247
|
+
title: "Your booking",
|
|
2248
|
+
changeDates: props.changeDates
|
|
2249
|
+
});
|
|
2250
|
+
}
|
|
2251
|
+
/** A payment step heading, with "Change date(s)" beside it when the dates can be changed from here. */
|
|
2252
|
+
function StepHeading(props) {
|
|
2253
|
+
const heading = /* @__PURE__ */ jsx("h3", {
|
|
2254
|
+
tabIndex: -1,
|
|
2255
|
+
className: "er-title",
|
|
2256
|
+
children: props.title
|
|
2257
|
+
});
|
|
2258
|
+
if (!props.changeDates) return heading;
|
|
2259
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
2260
|
+
className: "er-confirmation-summary__row",
|
|
2261
|
+
children: [heading, /* @__PURE__ */ jsx("button", {
|
|
2262
|
+
type: "button",
|
|
2263
|
+
className: "er-portal-auth-link",
|
|
2264
|
+
onClick: props.changeDates.onChange,
|
|
2265
|
+
children: props.changeDates.label
|
|
2266
|
+
})]
|
|
2267
|
+
});
|
|
2268
|
+
}
|
|
2269
|
+
/**
|
|
2270
|
+
* Dates paid with a pass or membership (issue 1767, sets 6 and 7): each date with
|
|
2271
|
+
* "1 credit", "Included" or its price, a bought pass on its own line, then
|
|
2272
|
+
* what comes from the pass and what's left to pay.
|
|
2273
|
+
*/
|
|
2274
|
+
function FundedPaymentSummary(props) {
|
|
2275
|
+
const { summary } = props;
|
|
2276
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
2277
|
+
className: "rb-reg-stack er-stack er-selection-payment-summary",
|
|
2278
|
+
children: [/* @__PURE__ */ jsx(SummaryHeading, { changeDates: props.changeDates }), /* @__PURE__ */ jsxs("div", {
|
|
2279
|
+
className: "er-confirmation-summary er-selection-payment",
|
|
2280
|
+
children: [
|
|
2281
|
+
/* @__PURE__ */ jsx("p", {
|
|
2282
|
+
className: "er-selection-payment__caption",
|
|
2283
|
+
children: summary.caption
|
|
2284
|
+
}),
|
|
2285
|
+
/* @__PURE__ */ jsx("dl", {
|
|
2286
|
+
className: "er-selection-payment__lines",
|
|
2287
|
+
children: summary.lines.map((line) => /* @__PURE__ */ jsxs("div", {
|
|
2288
|
+
className: "er-confirmation-summary__row",
|
|
2289
|
+
children: [/* @__PURE__ */ jsxs("dt", { children: [line.label, line.note ? /* @__PURE__ */ jsx("span", {
|
|
2290
|
+
className: "er-selection-payment__multiplier",
|
|
2291
|
+
children: line.note
|
|
2292
|
+
}) : null] }), /* @__PURE__ */ jsx("dd", { children: line.value })]
|
|
2293
|
+
}, line.key))
|
|
2294
|
+
}),
|
|
2295
|
+
summary.totals.length > 0 ? /* @__PURE__ */ jsx("dl", {
|
|
2296
|
+
className: "er-selection-payment__lines er-selection-payment__totals",
|
|
2297
|
+
children: summary.totals.map((row) => /* @__PURE__ */ jsxs("div", {
|
|
2298
|
+
className: row.total ? "er-confirmation-summary__row er-selection-payment__total" : "er-confirmation-summary__row",
|
|
2299
|
+
children: [/* @__PURE__ */ jsx("dt", { children: row.label }), /* @__PURE__ */ jsx("dd", { children: row.value })]
|
|
2300
|
+
}, row.key))
|
|
2301
|
+
}) : null
|
|
2302
|
+
]
|
|
2303
|
+
})]
|
|
2304
|
+
});
|
|
2305
|
+
}
|
|
2306
|
+
//#endregion
|
|
2307
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/SiteCreditPreviewPanel.tsx
|
|
2308
|
+
function SiteCreditPreviewPanel(props) {
|
|
2309
|
+
const { preview } = props;
|
|
2310
|
+
if (preview.kind === "not_authenticated" || preview.kind === "not_applicable" || preview.kind === "no_credit") return null;
|
|
2311
|
+
if (preview.kind === "loading") return /* @__PURE__ */ jsx("div", {
|
|
2312
|
+
className: "er-payment-summary",
|
|
2313
|
+
"aria-live": "polite",
|
|
2314
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
2315
|
+
className: "er-text er-text--muted",
|
|
2316
|
+
children: "Checking your site credit…"
|
|
2317
|
+
})
|
|
2318
|
+
});
|
|
2319
|
+
if (preview.kind === "unavailable") return /* @__PURE__ */ jsx("div", {
|
|
2320
|
+
className: "er-payment-summary",
|
|
2321
|
+
role: "status",
|
|
2322
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
2323
|
+
className: "er-text er-text--muted",
|
|
2324
|
+
children: "We couldn't check your site credit just now. We'll check again before payment."
|
|
2325
|
+
})
|
|
2326
|
+
});
|
|
2327
|
+
if (preview.kind === "currency_mismatch") return /* @__PURE__ */ jsxs("div", {
|
|
2328
|
+
className: "er-payment-summary",
|
|
2329
|
+
role: "status",
|
|
2330
|
+
children: [/* @__PURE__ */ jsx("h4", {
|
|
2331
|
+
className: "er-title",
|
|
2332
|
+
children: "Your site credit"
|
|
2333
|
+
}), /* @__PURE__ */ jsxs("p", {
|
|
2334
|
+
className: "er-text er-text--muted",
|
|
2335
|
+
children: [
|
|
2336
|
+
"You have",
|
|
2337
|
+
" ",
|
|
2338
|
+
formatPrice(preview.availableCreditCents, preview.creditCurrency),
|
|
2339
|
+
" ",
|
|
2340
|
+
"in site credit, but it can't be used for this",
|
|
2341
|
+
" ",
|
|
2342
|
+
props.currency.toUpperCase(),
|
|
2343
|
+
" booking."
|
|
2344
|
+
]
|
|
2345
|
+
})]
|
|
2346
|
+
});
|
|
2347
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
2348
|
+
className: "er-payment-summary",
|
|
2349
|
+
"aria-live": "polite",
|
|
2350
|
+
children: [
|
|
2351
|
+
/* @__PURE__ */ jsx("h4", {
|
|
2352
|
+
className: "er-title",
|
|
2353
|
+
children: "Your site credit"
|
|
2354
|
+
}),
|
|
2355
|
+
/* @__PURE__ */ jsxs("p", {
|
|
2356
|
+
className: "er-text",
|
|
2357
|
+
children: ["Available: ", formatPrice(preview.availableCreditCents, props.currency)]
|
|
2358
|
+
}),
|
|
2359
|
+
/* @__PURE__ */ jsx("p", {
|
|
2360
|
+
className: "er-text",
|
|
2361
|
+
children: preview.outcome === "credit_only" ? `Your credit covers this registration. ${formatPrice(preview.appliedCreditCents, props.currency)} will be used and no card payment is needed.` : preview.cardDueNowCents === 0 ? `${formatPrice(preview.appliedCreditCents, props.currency)} will be applied automatically. No card payment is needed today.` : `${formatPrice(preview.appliedCreditCents, props.currency)} will be applied automatically. ${formatPrice(preview.cardDueNowCents, props.currency)} is due by card today.`
|
|
2362
|
+
}),
|
|
2363
|
+
preview.laterBalanceCents > 0 && /* @__PURE__ */ jsxs("p", {
|
|
2364
|
+
className: "er-text er-text--muted",
|
|
2365
|
+
children: [
|
|
2366
|
+
"Remaining balance after today:",
|
|
2367
|
+
" ",
|
|
2368
|
+
formatPrice(preview.laterBalanceCents, props.currency)
|
|
2369
|
+
]
|
|
2370
|
+
}),
|
|
2371
|
+
preview.remainingCreditCents > 0 && /* @__PURE__ */ jsxs("p", {
|
|
2372
|
+
className: "er-text er-text--muted",
|
|
2373
|
+
children: [
|
|
2374
|
+
"Credit left afterwards:",
|
|
2375
|
+
" ",
|
|
2376
|
+
formatPrice(preview.remainingCreditCents, props.currency)
|
|
2377
|
+
]
|
|
2378
|
+
}),
|
|
2379
|
+
preview.manualDiscountPending && /* @__PURE__ */ jsx("p", {
|
|
2380
|
+
className: "er-text er-text--muted",
|
|
2381
|
+
children: "We'll recalculate these amounts after your discount code is checked."
|
|
2382
|
+
})
|
|
2383
|
+
]
|
|
2384
|
+
});
|
|
2385
|
+
}
|
|
2386
|
+
//#endregion
|
|
2387
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/SelectionFundingStep.tsx
|
|
2388
|
+
const PAY_HEADING = "How would you like to pay?";
|
|
2389
|
+
/**
|
|
2390
|
+
* The payment step for dates, one or several (issue 1767, sets 6 and 7): the
|
|
2391
|
+
* server's ways to pay in its order, then "Your booking", which breaks the choice
|
|
2392
|
+
* down. The breakdown follows the choice because it's the choice's result. One
|
|
2393
|
+
* date drops it when the chosen option and the button already say it all.
|
|
2394
|
+
*/
|
|
2395
|
+
function SelectionFundingStep(props) {
|
|
2396
|
+
const { model } = props;
|
|
2397
|
+
const oneDate = model.dateCount === 1;
|
|
2398
|
+
if (model.status === "failed") return /* @__PURE__ */ jsx(FundingLoadFailed, {
|
|
2399
|
+
oneDate,
|
|
2400
|
+
retry: model.retry
|
|
2401
|
+
});
|
|
2402
|
+
const view = model.view;
|
|
2403
|
+
if (model.status === "loading" || !view) return /* @__PURE__ */ jsx(FundingLoading, {});
|
|
2404
|
+
const changeDates = props.onChangeDates ? {
|
|
2405
|
+
label: oneDate ? "Change date" : "Change dates",
|
|
2406
|
+
onChange: props.onChangeDates
|
|
2407
|
+
} : void 0;
|
|
2408
|
+
return /* @__PURE__ */ jsx(LoadedFundingStep, {
|
|
2409
|
+
...props,
|
|
2410
|
+
view,
|
|
2411
|
+
oneDate,
|
|
2412
|
+
changeDates
|
|
2413
|
+
});
|
|
2414
|
+
}
|
|
2415
|
+
function LoadedFundingStep(props) {
|
|
2416
|
+
const { model, view, changeDates } = props;
|
|
2417
|
+
const layout = fundingStepLayout(view, props.oneDate, props.cardSummary !== null);
|
|
2418
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2419
|
+
model.notice ? /* @__PURE__ */ jsx("p", {
|
|
2420
|
+
role: "alert",
|
|
2421
|
+
className: "er-error er-funding-notice",
|
|
2422
|
+
children: model.notice
|
|
2423
|
+
}) : null,
|
|
2424
|
+
props.signInPrompt,
|
|
2425
|
+
layout.options ? /* @__PURE__ */ jsxs("div", {
|
|
2426
|
+
className: "rb-reg-stack er-stack er-funding-options",
|
|
2427
|
+
children: [/* @__PURE__ */ jsx(StepHeading, { title: PAY_HEADING }), /* @__PURE__ */ jsx(PaymentChoiceRows, {
|
|
2428
|
+
label: PAY_HEADING,
|
|
2429
|
+
rows: view.rows.map((row) => ({
|
|
2430
|
+
id: row.key,
|
|
2431
|
+
label: row.label,
|
|
2432
|
+
details: row.details,
|
|
2433
|
+
price: row.price,
|
|
2434
|
+
selected: row.selected,
|
|
2435
|
+
onSelect: () => model.choose(row)
|
|
2436
|
+
}))
|
|
2437
|
+
})]
|
|
2438
|
+
}) : null,
|
|
2439
|
+
view.option.kind === "money" ? /* @__PURE__ */ jsx(SiteCreditPreviewPanel, {
|
|
2440
|
+
preview: props.creditPreview,
|
|
2441
|
+
currency: props.currency
|
|
2442
|
+
}) : null,
|
|
2443
|
+
view.note ? /* @__PURE__ */ jsx("p", {
|
|
2444
|
+
className: "er-entitlement-note",
|
|
2445
|
+
children: view.note
|
|
2446
|
+
}) : null,
|
|
2447
|
+
props.afterOptions,
|
|
2448
|
+
layout.breakdown ? /* @__PURE__ */ jsx("div", {
|
|
2449
|
+
className: "er-funding-breakdown",
|
|
2450
|
+
children: /* @__PURE__ */ jsx(FundingSummary, {
|
|
2451
|
+
summary: view.summary,
|
|
2452
|
+
cardSummary: props.cardSummary,
|
|
2453
|
+
currency: props.currency,
|
|
2454
|
+
changeDates: layout.changeDatesOn === "breakdown" ? changeDates : void 0
|
|
2455
|
+
})
|
|
2456
|
+
}) : null,
|
|
2457
|
+
layout.changeDatesOn === "alone" && changeDates ? /* @__PURE__ */ jsx("p", {
|
|
2458
|
+
className: "er-text er-funding-change-dates",
|
|
2459
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
2460
|
+
type: "button",
|
|
2461
|
+
className: "er-portal-auth-link",
|
|
2462
|
+
onClick: changeDates.onChange,
|
|
2463
|
+
children: changeDates.label
|
|
2464
|
+
})
|
|
2465
|
+
}) : null
|
|
2466
|
+
] });
|
|
2467
|
+
}
|
|
2468
|
+
/**
|
|
2469
|
+
* Which parts the step shows. The breakdown always shows for several dates, and
|
|
2470
|
+
* when nothing else describes the payment. One date with ways to pay shows it
|
|
2471
|
+
* only when it explains a reduction the option's row doesn't.
|
|
2472
|
+
*/
|
|
2473
|
+
function fundingStepLayout(view, oneDate, hasCardSummary) {
|
|
2474
|
+
const options = showsPaymentOptions(view);
|
|
2475
|
+
const explains = view.summary !== null && summaryExplainsMoreThanTheOption(view.summary);
|
|
2476
|
+
const breakdown = (!oneDate || !options || explains) && (view.summary !== null || hasCardSummary);
|
|
2477
|
+
return {
|
|
2478
|
+
options,
|
|
2479
|
+
breakdown,
|
|
2480
|
+
changeDatesOn: breakdown ? "breakdown" : "alone"
|
|
2481
|
+
};
|
|
2482
|
+
}
|
|
2483
|
+
function showsPaymentOptions(view) {
|
|
2484
|
+
return view.rows.length > 1 || view.option.kind === "money" && view.takesPayment;
|
|
2485
|
+
}
|
|
2486
|
+
function FundingLoadFailed(props) {
|
|
2487
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
2488
|
+
className: "rb-reg-stack er-stack",
|
|
2489
|
+
role: "alert",
|
|
2490
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
2491
|
+
className: "er-text er-error",
|
|
2492
|
+
children: props.oneDate ? ONE_DATE_FUNDING_LOAD_FAILED : SELECTION_FUNDING_LOAD_FAILED
|
|
2493
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
2494
|
+
className: "er-text",
|
|
2495
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
2496
|
+
type: "button",
|
|
2497
|
+
className: "er-portal-auth-link",
|
|
2498
|
+
onClick: props.retry,
|
|
2499
|
+
children: "Try again"
|
|
2500
|
+
})
|
|
2501
|
+
})]
|
|
2502
|
+
});
|
|
2503
|
+
}
|
|
2504
|
+
function FundingLoading() {
|
|
2505
|
+
return /* @__PURE__ */ jsx("div", {
|
|
2506
|
+
className: "rb-reg-stack er-stack",
|
|
2507
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
2508
|
+
className: "er-center",
|
|
2509
|
+
children: [/* @__PURE__ */ jsx(SpinnerNode, {
|
|
2510
|
+
size: "lg",
|
|
2511
|
+
srLabel: "Checking payment options"
|
|
2512
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
2513
|
+
className: "er-text--muted",
|
|
2514
|
+
children: "Checking payment options…"
|
|
2515
|
+
})]
|
|
2516
|
+
})
|
|
2517
|
+
});
|
|
2518
|
+
}
|
|
2519
|
+
/** A pass or membership's own summary, or the card step's for the money option. */
|
|
2520
|
+
function FundingSummary(props) {
|
|
2521
|
+
if (props.summary) return /* @__PURE__ */ jsx(FundedPaymentSummary, {
|
|
2522
|
+
summary: props.summary,
|
|
2523
|
+
changeDates: props.changeDates
|
|
2524
|
+
});
|
|
2525
|
+
return props.cardSummary ? /* @__PURE__ */ jsx(SelectionPaymentSummary, {
|
|
2526
|
+
summary: props.cardSummary,
|
|
2527
|
+
currency: props.currency,
|
|
2528
|
+
changeDates: props.changeDates
|
|
2529
|
+
}) : null;
|
|
2530
|
+
}
|
|
2029
2531
|
//#endregion
|
|
2030
2532
|
//#region ../blocks/src/system/runtime/nodes/event-registration/EventSelectionStep.tsx
|
|
2031
2533
|
/** Dates in order, grouped by the month and year they fall in, both in the date's own zone. */
|
|
@@ -2117,14 +2619,23 @@ function DateSelectionList(props) {
|
|
|
2117
2619
|
*/
|
|
2118
2620
|
const EventSelectionStep = (props) => {
|
|
2119
2621
|
const { events, selectedEvent, onSelect, onChoose, display } = props;
|
|
2120
|
-
if ("selection" in props)
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2622
|
+
if ("selection" in props) {
|
|
2623
|
+
const rows = {
|
|
2624
|
+
selection: props.selection,
|
|
2625
|
+
display,
|
|
2626
|
+
onToggle: props.onToggle,
|
|
2627
|
+
onJoinWaitlist: props.onJoinWaitlist
|
|
2628
|
+
};
|
|
2629
|
+
return props.pageDate ? /* @__PURE__ */ jsx(PageDateFirstSelection, {
|
|
2630
|
+
pageDate: props.pageDate,
|
|
2631
|
+
events,
|
|
2632
|
+
rows
|
|
2633
|
+
}) : /* @__PURE__ */ jsx(SeveralSelection, {
|
|
2634
|
+
items: props.mode.items,
|
|
2635
|
+
events,
|
|
2636
|
+
rows
|
|
2637
|
+
});
|
|
2638
|
+
}
|
|
2128
2639
|
if (getEventSelectionMode(events) === "date") return /* @__PURE__ */ jsxs("div", {
|
|
2129
2640
|
className: "rb-reg-stack er-stack",
|
|
2130
2641
|
children: [
|
|
@@ -2236,19 +2747,51 @@ const SEVERAL_HEADINGS = {
|
|
|
2236
2747
|
label: "What to book"
|
|
2237
2748
|
}
|
|
2238
2749
|
};
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
*/
|
|
2243
|
-
function
|
|
2244
|
-
const
|
|
2245
|
-
const sorted = [...props.events].sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt));
|
|
2750
|
+
function byStart(left, right) {
|
|
2751
|
+
return Date.parse(left.startsAt) - Date.parse(right.startsAt);
|
|
2752
|
+
}
|
|
2753
|
+
/** One checkbox row per item, under month labels when dates span more than one month. */
|
|
2754
|
+
function SeveralOptionList(props) {
|
|
2755
|
+
const sorted = [...props.events].sort(byStart);
|
|
2246
2756
|
const groups = props.items === "dates" ? groupByMonth(sorted) : [{
|
|
2247
2757
|
key: "runs",
|
|
2248
2758
|
label: "",
|
|
2249
2759
|
events: sorted
|
|
2250
2760
|
}];
|
|
2251
2761
|
const showMonths = groups.length > 1;
|
|
2762
|
+
const { rows } = props;
|
|
2763
|
+
return /* @__PURE__ */ jsx("div", {
|
|
2764
|
+
className: "er-date-list",
|
|
2765
|
+
role: "group",
|
|
2766
|
+
"aria-label": props.label,
|
|
2767
|
+
children: groups.map((group) => /* @__PURE__ */ jsxs(React.Fragment, { children: [showMonths ? /* @__PURE__ */ jsx("p", {
|
|
2768
|
+
className: "er-date-list__month",
|
|
2769
|
+
"aria-hidden": "true",
|
|
2770
|
+
children: group.label
|
|
2771
|
+
}) : null, group.events.map((event) => /* @__PURE__ */ jsx(SeveralOption, {
|
|
2772
|
+
items: props.items,
|
|
2773
|
+
event,
|
|
2774
|
+
checked: selectionIncludes(rows.selection, event),
|
|
2775
|
+
canToggle: canToggleSelectionItem(rows.selection, event),
|
|
2776
|
+
display: rows.display,
|
|
2777
|
+
onToggle: rows.onToggle,
|
|
2778
|
+
onJoinWaitlist: rows.onJoinWaitlist
|
|
2779
|
+
}, event.selectionId))] }, group.key))
|
|
2780
|
+
});
|
|
2781
|
+
}
|
|
2782
|
+
function SelectionLimitNote({ selection }) {
|
|
2783
|
+
return selectionAtLimit(selection) ? /* @__PURE__ */ jsx("p", {
|
|
2784
|
+
className: "er-text er-text--muted",
|
|
2785
|
+
role: "status",
|
|
2786
|
+
children: SELECTION_LIMIT_NOTE
|
|
2787
|
+
}) : null;
|
|
2788
|
+
}
|
|
2789
|
+
/**
|
|
2790
|
+
* Booking several (issue 1725): one checkbox row per date or run. A full row
|
|
2791
|
+
* can't be ticked; when it has a waitlist, its link books that one item.
|
|
2792
|
+
*/
|
|
2793
|
+
function SeveralSelection(props) {
|
|
2794
|
+
const heading = SEVERAL_HEADINGS[props.items];
|
|
2252
2795
|
return /* @__PURE__ */ jsxs("div", {
|
|
2253
2796
|
className: "rb-reg-stack er-stack",
|
|
2254
2797
|
children: [
|
|
@@ -2263,29 +2806,53 @@ function SeveralSelection(props) {
|
|
|
2263
2806
|
}),
|
|
2264
2807
|
/* @__PURE__ */ jsx(BookingCloseLine, { events: props.events }),
|
|
2265
2808
|
/* @__PURE__ */ jsx(CombinationOfferLine, { parts: combinationOfferLine(combinationOffersOf(props.events)) }),
|
|
2266
|
-
/* @__PURE__ */ jsx(
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
className: "er-date-list__month",
|
|
2272
|
-
"aria-hidden": "true",
|
|
2273
|
-
children: group.label
|
|
2274
|
-
}) : null, group.events.map((event) => /* @__PURE__ */ jsx(SeveralOption, {
|
|
2275
|
-
items: props.items,
|
|
2276
|
-
event,
|
|
2277
|
-
checked: selectionIncludes(props.selection, event),
|
|
2278
|
-
canToggle: canToggleSelectionItem(props.selection, event),
|
|
2279
|
-
display: props.display,
|
|
2280
|
-
onToggle: props.onToggle,
|
|
2281
|
-
onJoinWaitlist: props.onJoinWaitlist
|
|
2282
|
-
}, event.selectionId))] }, group.key))
|
|
2809
|
+
/* @__PURE__ */ jsx(SeveralOptionList, {
|
|
2810
|
+
items: props.items,
|
|
2811
|
+
events: props.events,
|
|
2812
|
+
label: heading.label,
|
|
2813
|
+
rows: props.rows
|
|
2283
2814
|
}),
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2815
|
+
/* @__PURE__ */ jsx(SelectionLimitNote, { selection: props.rows.selection })
|
|
2816
|
+
]
|
|
2817
|
+
});
|
|
2818
|
+
}
|
|
2819
|
+
/**
|
|
2820
|
+
* A date's own page: its date comes first, ticked to start with, and the
|
|
2821
|
+
* class's other dates follow as the class's own page lists them.
|
|
2822
|
+
*/
|
|
2823
|
+
function PageDateFirstSelection(props) {
|
|
2824
|
+
const others = props.events.filter((event) => event.selectionId !== props.pageDate.selectionId);
|
|
2825
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
2826
|
+
className: "rb-reg-stack er-stack",
|
|
2827
|
+
children: [
|
|
2828
|
+
/* @__PURE__ */ jsx("h3", {
|
|
2829
|
+
tabIndex: -1,
|
|
2830
|
+
className: "er-title",
|
|
2831
|
+
children: "Your date"
|
|
2832
|
+
}),
|
|
2833
|
+
/* @__PURE__ */ jsx(SeveralOptionList, {
|
|
2834
|
+
items: "dates",
|
|
2835
|
+
events: [props.pageDate],
|
|
2836
|
+
label: "Your date",
|
|
2837
|
+
rows: props.rows
|
|
2838
|
+
}),
|
|
2839
|
+
/* @__PURE__ */ jsx("h3", {
|
|
2840
|
+
className: "er-title er-title--sub",
|
|
2841
|
+
children: "Add more dates"
|
|
2842
|
+
}),
|
|
2843
|
+
/* @__PURE__ */ jsx("p", {
|
|
2844
|
+
className: "er-text er-text--muted er-selection-lede",
|
|
2845
|
+
children: "Tick any others you’d like to book at the same time."
|
|
2846
|
+
}),
|
|
2847
|
+
/* @__PURE__ */ jsx(BookingCloseLine, { events: props.events }),
|
|
2848
|
+
/* @__PURE__ */ jsx(CombinationOfferLine, { parts: combinationOfferLine(combinationOffersOf(props.events)) }),
|
|
2849
|
+
/* @__PURE__ */ jsx(SeveralOptionList, {
|
|
2850
|
+
items: "dates",
|
|
2851
|
+
events: others,
|
|
2852
|
+
label: "More dates",
|
|
2853
|
+
rows: props.rows
|
|
2854
|
+
}),
|
|
2855
|
+
/* @__PURE__ */ jsx(SelectionLimitNote, { selection: props.rows.selection })
|
|
2289
2856
|
]
|
|
2290
2857
|
});
|
|
2291
2858
|
}
|
|
@@ -2300,17 +2867,17 @@ function CombinationOfferLine(props) {
|
|
|
2300
2867
|
function runPriceLabel(event) {
|
|
2301
2868
|
return publicEventPricingCurrency(event.pricing) === null ? null : formatEventPriceDisplay(event.pricing).trim() || null;
|
|
2302
2869
|
}
|
|
2303
|
-
/** The words on a row: a date and time for dates
|
|
2870
|
+
/** The words on a row: a date and its time for dates; a title, schedule lines, venue and price for runs. */
|
|
2304
2871
|
function severalOptionText(items, event, display) {
|
|
2305
2872
|
if (items === "dates") return {
|
|
2306
2873
|
title: formatBookingWhen(event, "dayLong"),
|
|
2307
|
-
|
|
2874
|
+
lines: [formatBookingWhen(event, "timeRange")],
|
|
2308
2875
|
price: null
|
|
2309
2876
|
};
|
|
2310
|
-
const
|
|
2877
|
+
const venue = shownVenue(event, display);
|
|
2311
2878
|
return {
|
|
2312
2879
|
title: event.title,
|
|
2313
|
-
|
|
2880
|
+
lines: [...formatRunScheduleLines(event), ...venue ? [venue] : []],
|
|
2314
2881
|
price: runPriceLabel(event)
|
|
2315
2882
|
};
|
|
2316
2883
|
}
|
|
@@ -2343,6 +2910,10 @@ function SeveralOptionStatus(props) {
|
|
|
2343
2910
|
}
|
|
2344
2911
|
}
|
|
2345
2912
|
}
|
|
2913
|
+
/**
|
|
2914
|
+
* One row in the list: the checkbox level with the title, the details under
|
|
2915
|
+
* it, and places or price to the side (under the details on a phone).
|
|
2916
|
+
*/
|
|
2346
2917
|
function SeveralOption(props) {
|
|
2347
2918
|
const { event } = props;
|
|
2348
2919
|
const availability = selectionRowAvailability(event);
|
|
@@ -2350,10 +2921,13 @@ function SeveralOption(props) {
|
|
|
2350
2921
|
const className = [
|
|
2351
2922
|
"er-event-card",
|
|
2352
2923
|
"er-date-option",
|
|
2924
|
+
"er-date-option--grid",
|
|
2925
|
+
props.items === "dates" && "er-date-option--dates",
|
|
2926
|
+
props.items === "runs" && "er-date-option--run",
|
|
2353
2927
|
props.checked && "er-event-card--selected",
|
|
2354
2928
|
!open && "er-date-option--full"
|
|
2355
2929
|
].filter(Boolean).join(" ");
|
|
2356
|
-
const { title,
|
|
2930
|
+
const { title, lines, price } = severalOptionText(props.items, event, props.display);
|
|
2357
2931
|
const Row = availability === "waitlist" ? "div" : "label";
|
|
2358
2932
|
return /* @__PURE__ */ jsxs(Row, {
|
|
2359
2933
|
className,
|
|
@@ -2364,27 +2938,30 @@ function SeveralOption(props) {
|
|
|
2364
2938
|
value: event.selectionId,
|
|
2365
2939
|
checked: props.checked,
|
|
2366
2940
|
disabled: !props.canToggle,
|
|
2367
|
-
"aria-label": Row === "div" ? [title,
|
|
2941
|
+
"aria-label": Row === "div" ? [title, ...lines].join(", ") : void 0,
|
|
2368
2942
|
onChange: () => props.onToggle(event)
|
|
2369
2943
|
}),
|
|
2944
|
+
/* @__PURE__ */ jsx("span", {
|
|
2945
|
+
className: "er-date-option__date",
|
|
2946
|
+
children: title
|
|
2947
|
+
}),
|
|
2370
2948
|
/* @__PURE__ */ jsxs("span", {
|
|
2371
|
-
className: "er-date-
|
|
2372
|
-
children: [/* @__PURE__ */ jsx(
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2949
|
+
className: "er-date-option__aside",
|
|
2950
|
+
children: [/* @__PURE__ */ jsx(SeveralOptionStatus, {
|
|
2951
|
+
event,
|
|
2952
|
+
display: props.display,
|
|
2953
|
+
onJoinWaitlist: props.onJoinWaitlist
|
|
2954
|
+
}), price && open ? /* @__PURE__ */ jsx("span", {
|
|
2955
|
+
className: "er-date-option__price",
|
|
2956
|
+
children: price
|
|
2378
2957
|
}) : null]
|
|
2379
2958
|
}),
|
|
2380
|
-
/* @__PURE__ */ jsx(
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
className: "er-date-option__price",
|
|
2387
|
-
children: price
|
|
2959
|
+
lines.length > 0 ? /* @__PURE__ */ jsx("span", {
|
|
2960
|
+
className: "er-date-option__body",
|
|
2961
|
+
children: lines.map((line) => /* @__PURE__ */ jsx("span", {
|
|
2962
|
+
className: "er-date-option__time",
|
|
2963
|
+
children: line
|
|
2964
|
+
}, line))
|
|
2388
2965
|
}) : null
|
|
2389
2966
|
]
|
|
2390
2967
|
});
|
|
@@ -2901,86 +3478,6 @@ const MembershipHero = ({ membershipName }) => {
|
|
|
2901
3478
|
});
|
|
2902
3479
|
};
|
|
2903
3480
|
//#endregion
|
|
2904
|
-
//#region ../blocks/src/system/runtime/nodes/event-registration/SiteCreditPreviewPanel.tsx
|
|
2905
|
-
function SiteCreditPreviewPanel(props) {
|
|
2906
|
-
const { preview } = props;
|
|
2907
|
-
if (preview.kind === "not_authenticated" || preview.kind === "not_applicable" || preview.kind === "no_credit") return null;
|
|
2908
|
-
if (preview.kind === "loading") return /* @__PURE__ */ jsx("div", {
|
|
2909
|
-
className: "er-payment-summary",
|
|
2910
|
-
"aria-live": "polite",
|
|
2911
|
-
children: /* @__PURE__ */ jsx("p", {
|
|
2912
|
-
className: "er-text er-text--muted",
|
|
2913
|
-
children: "Checking your site credit…"
|
|
2914
|
-
})
|
|
2915
|
-
});
|
|
2916
|
-
if (preview.kind === "unavailable") return /* @__PURE__ */ jsx("div", {
|
|
2917
|
-
className: "er-payment-summary",
|
|
2918
|
-
role: "status",
|
|
2919
|
-
children: /* @__PURE__ */ jsx("p", {
|
|
2920
|
-
className: "er-text er-text--muted",
|
|
2921
|
-
children: "We couldn't check your site credit just now. We'll check again before payment."
|
|
2922
|
-
})
|
|
2923
|
-
});
|
|
2924
|
-
if (preview.kind === "currency_mismatch") return /* @__PURE__ */ jsxs("div", {
|
|
2925
|
-
className: "er-payment-summary",
|
|
2926
|
-
role: "status",
|
|
2927
|
-
children: [/* @__PURE__ */ jsx("h4", {
|
|
2928
|
-
className: "er-title",
|
|
2929
|
-
children: "Your site credit"
|
|
2930
|
-
}), /* @__PURE__ */ jsxs("p", {
|
|
2931
|
-
className: "er-text er-text--muted",
|
|
2932
|
-
children: [
|
|
2933
|
-
"You have",
|
|
2934
|
-
" ",
|
|
2935
|
-
formatPrice(preview.availableCreditCents, preview.creditCurrency),
|
|
2936
|
-
" ",
|
|
2937
|
-
"in site credit, but it can't be used for this",
|
|
2938
|
-
" ",
|
|
2939
|
-
props.currency.toUpperCase(),
|
|
2940
|
-
" booking."
|
|
2941
|
-
]
|
|
2942
|
-
})]
|
|
2943
|
-
});
|
|
2944
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
2945
|
-
className: "er-payment-summary",
|
|
2946
|
-
"aria-live": "polite",
|
|
2947
|
-
children: [
|
|
2948
|
-
/* @__PURE__ */ jsx("h4", {
|
|
2949
|
-
className: "er-title",
|
|
2950
|
-
children: "Your site credit"
|
|
2951
|
-
}),
|
|
2952
|
-
/* @__PURE__ */ jsxs("p", {
|
|
2953
|
-
className: "er-text",
|
|
2954
|
-
children: ["Available: ", formatPrice(preview.availableCreditCents, props.currency)]
|
|
2955
|
-
}),
|
|
2956
|
-
/* @__PURE__ */ jsx("p", {
|
|
2957
|
-
className: "er-text",
|
|
2958
|
-
children: preview.outcome === "credit_only" ? `Your credit covers this registration. ${formatPrice(preview.appliedCreditCents, props.currency)} will be used and no card payment is needed.` : preview.cardDueNowCents === 0 ? `${formatPrice(preview.appliedCreditCents, props.currency)} will be applied automatically. No card payment is needed today.` : `${formatPrice(preview.appliedCreditCents, props.currency)} will be applied automatically. ${formatPrice(preview.cardDueNowCents, props.currency)} is due by card today.`
|
|
2959
|
-
}),
|
|
2960
|
-
preview.laterBalanceCents > 0 && /* @__PURE__ */ jsxs("p", {
|
|
2961
|
-
className: "er-text er-text--muted",
|
|
2962
|
-
children: [
|
|
2963
|
-
"Remaining balance after today:",
|
|
2964
|
-
" ",
|
|
2965
|
-
formatPrice(preview.laterBalanceCents, props.currency)
|
|
2966
|
-
]
|
|
2967
|
-
}),
|
|
2968
|
-
preview.remainingCreditCents > 0 && /* @__PURE__ */ jsxs("p", {
|
|
2969
|
-
className: "er-text er-text--muted",
|
|
2970
|
-
children: [
|
|
2971
|
-
"Credit left afterwards:",
|
|
2972
|
-
" ",
|
|
2973
|
-
formatPrice(preview.remainingCreditCents, props.currency)
|
|
2974
|
-
]
|
|
2975
|
-
}),
|
|
2976
|
-
preview.manualDiscountPending && /* @__PURE__ */ jsx("p", {
|
|
2977
|
-
className: "er-text er-text--muted",
|
|
2978
|
-
children: "We'll recalculate these amounts after your discount code is checked."
|
|
2979
|
-
})
|
|
2980
|
-
]
|
|
2981
|
-
});
|
|
2982
|
-
}
|
|
2983
|
-
//#endregion
|
|
2984
3481
|
//#region ../blocks/src/system/runtime/nodes/event-registration/PaymentSelectionStep.tsx
|
|
2985
3482
|
function isDirectPaymentOptionSelected(option, selectionState) {
|
|
2986
3483
|
return selectionState.kind === "valid" && selectionState.selection.collectionOptionKind === option.kind;
|
|
@@ -3027,8 +3524,9 @@ const PaymentSelectionStep = (props) => {
|
|
|
3027
3524
|
selectionState: view.directPaymentSelectionState,
|
|
3028
3525
|
preview: view.preview,
|
|
3029
3526
|
onSelectionChange: props.onSelectionChange
|
|
3030
|
-
}) : [], ...
|
|
3527
|
+
}) : [], ...runMembershipRows({
|
|
3031
3528
|
offered: view.offersEntitlements,
|
|
3529
|
+
event: props.event,
|
|
3032
3530
|
eligibility,
|
|
3033
3531
|
isAuthenticated: props.isAuthenticated ?? false,
|
|
3034
3532
|
ticketsCount: props.ticketsCount,
|
|
@@ -3036,6 +3534,7 @@ const PaymentSelectionStep = (props) => {
|
|
|
3036
3534
|
onSelectionChange: props.onSelectionChange
|
|
3037
3535
|
})]
|
|
3038
3536
|
}),
|
|
3537
|
+
/* @__PURE__ */ jsx(UnavailableEntitlementNotes, { eligibility }),
|
|
3039
3538
|
/* @__PURE__ */ jsx(SiteCreditPreviewPanel, {
|
|
3040
3539
|
preview: view.preview,
|
|
3041
3540
|
currency: eligibility.currency
|
|
@@ -3043,182 +3542,31 @@ const PaymentSelectionStep = (props) => {
|
|
|
3043
3542
|
]
|
|
3044
3543
|
});
|
|
3045
3544
|
};
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
passId: pass.id,
|
|
3052
|
-
productName: pass.passName
|
|
3053
|
-
},
|
|
3054
|
-
label: pass.passName,
|
|
3055
|
-
details: [`${formatCreditProductUnits("event_pass", pass.creditsRemaining)} left`],
|
|
3056
|
-
price: formatCreditProductUnits("event_pass", 1)
|
|
3057
|
-
}));
|
|
3058
|
-
}
|
|
3059
|
-
function ownedMembershipChoices(eligibility) {
|
|
3060
|
-
return eligibility.eligibleMemberships.map((membership) => ({
|
|
3061
|
-
id: `owned-membership-${membership.id}`,
|
|
3062
|
-
selection: {
|
|
3545
|
+
/** A run's own membership; dates offer theirs through the server's funding options (issue 1767). */
|
|
3546
|
+
function runMembershipRows(props) {
|
|
3547
|
+
if (!props.offered || !props.isAuthenticated || props.ticketsCount !== 1 || props.event?.registrationSubject.kind !== "wholeSeries") return [];
|
|
3548
|
+
return props.eligibility.eligibleMemberships.map((membership) => {
|
|
3549
|
+
const selection = {
|
|
3063
3550
|
method: "membership",
|
|
3064
3551
|
membershipId: membership.id,
|
|
3065
3552
|
productName: membership.membershipName
|
|
3066
|
-
}
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
selection: {
|
|
3076
|
-
method: "pass_bundle",
|
|
3077
|
-
bundlePassId: pass.id,
|
|
3078
|
-
productName: pass.name,
|
|
3079
|
-
productPrice: pass.price,
|
|
3080
|
-
productCurrency: pass.currency
|
|
3081
|
-
},
|
|
3082
|
-
label: pass.name,
|
|
3083
|
-
details: [formatCreditProductUnits("event_pass", pass.creditsTotal), ...pass.description ? [pass.description] : []],
|
|
3084
|
-
price: formatPrice(pass.price, pass.currency)
|
|
3085
|
-
}));
|
|
3086
|
-
}
|
|
3087
|
-
function purchasableMembershipChoices(eligibility) {
|
|
3088
|
-
return eligibility.availableMemberships.map((membership) => ({
|
|
3089
|
-
id: `buy-membership-${membership.id}`,
|
|
3090
|
-
selection: {
|
|
3091
|
-
method: "membership_bundle",
|
|
3092
|
-
bundleMembershipId: membership.id,
|
|
3093
|
-
productName: membership.name,
|
|
3094
|
-
productPrice: membership.price,
|
|
3095
|
-
productCurrency: membership.currency,
|
|
3096
|
-
productInterval: membership.interval
|
|
3097
|
-
},
|
|
3098
|
-
label: membership.name,
|
|
3099
|
-
details: membership.description ? [membership.description] : [],
|
|
3100
|
-
price: `${formatPrice(membership.price, membership.currency)}/${membership.interval}`
|
|
3101
|
-
}));
|
|
3102
|
-
}
|
|
3103
|
-
/** Passes and memberships, when the selection can use them (one item, issue 1725). */
|
|
3104
|
-
function entitlementRows(props) {
|
|
3105
|
-
if (!props.offered) return [];
|
|
3106
|
-
const disabled = areEntitlementsDisabledForTicketCount(props.ticketsCount);
|
|
3107
|
-
return [
|
|
3108
|
-
...props.isAuthenticated ? [...ownedPassChoices(props.eligibility), ...ownedMembershipChoices(props.eligibility)] : [],
|
|
3109
|
-
...purchasablePassChoices(props.eligibility),
|
|
3110
|
-
...purchasableMembershipChoices(props.eligibility)
|
|
3111
|
-
].map((choice) => ({
|
|
3112
|
-
id: choice.id,
|
|
3113
|
-
label: choice.label,
|
|
3114
|
-
details: choice.details,
|
|
3115
|
-
price: choice.price,
|
|
3116
|
-
disabled,
|
|
3117
|
-
disabledReason: disabled ? ENTITLEMENT_SINGLE_TICKET_TOOLTIP : void 0,
|
|
3118
|
-
selected: areEventRegistrationPaymentSelectionsEqual(props.selection, choice.selection),
|
|
3119
|
-
onSelect: () => props.onSelectionChange(choice.selection)
|
|
3120
|
-
}));
|
|
3121
|
-
}
|
|
3122
|
-
//#endregion
|
|
3123
|
-
//#region ../blocks/src/system/runtime/nodes/event-registration/CalendarAction.tsx
|
|
3124
|
-
/** Download effects happen only after a click, including in editor preview. */
|
|
3125
|
-
async function downloadCalendar(calendar) {
|
|
3126
|
-
const { renderCalendarFeedIcs } = await import("./src-DqMbCjI1.mjs");
|
|
3127
|
-
const url = URL.createObjectURL(new Blob([renderCalendarFeedIcs(calendar.feed)], { type: "text/calendar;charset=utf-8" }));
|
|
3128
|
-
const link = document.createElement("a");
|
|
3129
|
-
link.href = url;
|
|
3130
|
-
link.download = calendar.fileName;
|
|
3131
|
-
document.body.append(link);
|
|
3132
|
-
link.click();
|
|
3133
|
-
link.remove();
|
|
3134
|
-
setTimeout(() => URL.revokeObjectURL(url), 0);
|
|
3135
|
-
}
|
|
3136
|
-
function CalendarAction({ calendar }) {
|
|
3137
|
-
const [open, setOpen] = useState(false);
|
|
3138
|
-
const [downloadFailed, setDownloadFailed] = useState(false);
|
|
3139
|
-
const id = useId();
|
|
3140
|
-
const choicesRef = useRef(null);
|
|
3141
|
-
useEffect(() => {
|
|
3142
|
-
if (open) choicesRef.current?.scrollIntoView({ block: "nearest" });
|
|
3143
|
-
}, [open]);
|
|
3144
|
-
const close = () => setOpen(false);
|
|
3145
|
-
const download = async (value) => {
|
|
3146
|
-
setDownloadFailed(false);
|
|
3147
|
-
try {
|
|
3148
|
-
await downloadCalendar(value);
|
|
3149
|
-
close();
|
|
3150
|
-
} catch {
|
|
3151
|
-
setDownloadFailed(true);
|
|
3152
|
-
}
|
|
3153
|
-
};
|
|
3154
|
-
if (!calendar) return null;
|
|
3155
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
3156
|
-
className: "er-calendar-action",
|
|
3157
|
-
onBlur: (event) => {
|
|
3158
|
-
if (!event.currentTarget.contains(event.relatedTarget)) close();
|
|
3159
|
-
},
|
|
3160
|
-
onKeyDown: (event) => {
|
|
3161
|
-
if (event.key === "Escape" && open) {
|
|
3162
|
-
event.stopPropagation();
|
|
3163
|
-
close();
|
|
3164
|
-
event.currentTarget.querySelector("button")?.focus();
|
|
3165
|
-
}
|
|
3166
|
-
},
|
|
3167
|
-
children: [calendar.kind === "sessions" ? /* @__PURE__ */ jsx(ThemedButton, {
|
|
3168
|
-
type: "button",
|
|
3169
|
-
variant: "outline",
|
|
3170
|
-
size: "md",
|
|
3171
|
-
extraClassName: "er-calendar-action__trigger",
|
|
3172
|
-
label: calendar.sessionCount === 2 ? "Add both sessions to your calendar" : `Add all ${calendar.sessionCount} sessions to your calendar`,
|
|
3173
|
-
onClick: () => {
|
|
3174
|
-
download(calendar);
|
|
3175
|
-
}
|
|
3176
|
-
}) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ThemedButton, {
|
|
3177
|
-
type: "button",
|
|
3178
|
-
variant: "outline",
|
|
3179
|
-
size: "md",
|
|
3180
|
-
extraClassName: "er-calendar-action__trigger er-calendar-action__trigger--disclosure",
|
|
3181
|
-
label: "Add to calendar",
|
|
3182
|
-
"aria-expanded": open,
|
|
3183
|
-
"aria-controls": id,
|
|
3184
|
-
onClick: () => setOpen(!open)
|
|
3185
|
-
}), open ? /* @__PURE__ */ jsxs("div", {
|
|
3186
|
-
id,
|
|
3187
|
-
ref: choicesRef,
|
|
3188
|
-
className: "er-calendar-action__choices",
|
|
3189
|
-
children: [
|
|
3190
|
-
/* @__PURE__ */ jsx("a", {
|
|
3191
|
-
className: "er-calendar-action__choice",
|
|
3192
|
-
href: calendar.googleUrl,
|
|
3193
|
-
target: "_blank",
|
|
3194
|
-
rel: "noopener noreferrer",
|
|
3195
|
-
onClick: close,
|
|
3196
|
-
children: "Google Calendar"
|
|
3197
|
-
}),
|
|
3198
|
-
/* @__PURE__ */ jsx("a", {
|
|
3199
|
-
className: "er-calendar-action__choice",
|
|
3200
|
-
href: calendar.outlookUrl,
|
|
3201
|
-
target: "_blank",
|
|
3202
|
-
rel: "noopener noreferrer",
|
|
3203
|
-
onClick: close,
|
|
3204
|
-
children: "Outlook.com"
|
|
3205
|
-
}),
|
|
3206
|
-
/* @__PURE__ */ jsx("button", {
|
|
3207
|
-
type: "button",
|
|
3208
|
-
className: "er-calendar-action__choice",
|
|
3209
|
-
onClick: () => {
|
|
3210
|
-
download(calendar);
|
|
3211
|
-
},
|
|
3212
|
-
children: "Apple Calendar or other (.ics file)"
|
|
3213
|
-
})
|
|
3214
|
-
]
|
|
3215
|
-
}) : null] }), downloadFailed ? /* @__PURE__ */ jsx("p", {
|
|
3216
|
-
role: "alert",
|
|
3217
|
-
className: "er-calendar-action__error",
|
|
3218
|
-
children: "We couldn't create the calendar file. Please try again."
|
|
3219
|
-
}) : null]
|
|
3553
|
+
};
|
|
3554
|
+
return {
|
|
3555
|
+
id: `owned-membership-${membership.id}`,
|
|
3556
|
+
label: membership.membershipName,
|
|
3557
|
+
details: ["Active"],
|
|
3558
|
+
price: "Included",
|
|
3559
|
+
selected: areEventRegistrationPaymentSelectionsEqual(props.selection, selection),
|
|
3560
|
+
onSelect: () => props.onSelectionChange(selection)
|
|
3561
|
+
};
|
|
3220
3562
|
});
|
|
3221
3563
|
}
|
|
3564
|
+
function UnavailableEntitlementNotes({ eligibility }) {
|
|
3565
|
+
return /* @__PURE__ */ jsx(Fragment, { children: eligibility.unavailableEntitlements?.map((note) => /* @__PURE__ */ jsx("p", {
|
|
3566
|
+
className: "er-entitlement-note",
|
|
3567
|
+
children: note
|
|
3568
|
+
}, note)) });
|
|
3569
|
+
}
|
|
3222
3570
|
//#endregion
|
|
3223
3571
|
//#region ../blocks/src/system/runtime/nodes/event-registration/SuccessStep.tsx
|
|
3224
3572
|
function ConfirmationSummary({ rows }) {
|
|
@@ -3457,7 +3805,7 @@ function ExistingRegistrationNotice(props) {
|
|
|
3457
3805
|
body: isBooked ? props.detail : "Sign out to book for someone else.",
|
|
3458
3806
|
secondaryBody: isBooked ? "Need more tickets? You can book them below. They'll come as a new booking with its own confirmation email, and your first booking won't change." : void 0,
|
|
3459
3807
|
actions: isBooked ? /* @__PURE__ */ jsx("a", {
|
|
3460
|
-
href: "
|
|
3808
|
+
href: portalPath({ page: "bookings" }),
|
|
3461
3809
|
className: "er-existing-registration-link",
|
|
3462
3810
|
children: "View my bookings"
|
|
3463
3811
|
}) : /* @__PURE__ */ jsx("button", {
|
|
@@ -3468,9 +3816,12 @@ function ExistingRegistrationNotice(props) {
|
|
|
3468
3816
|
})
|
|
3469
3817
|
});
|
|
3470
3818
|
}
|
|
3471
|
-
/**
|
|
3819
|
+
/**
|
|
3820
|
+
* A membership covers one place on one run, so the hero shows only then. Dates
|
|
3821
|
+
* show a membership with their other ways to pay (issue 1767).
|
|
3822
|
+
*/
|
|
3472
3823
|
function heroMembership(wizard) {
|
|
3473
|
-
return wizard.portalAuthState === "authenticated" && wizard.ticketsCount === 1 && wizard.severalItems === null ? wizard.eligibility?.eligibleMemberships[0] : void 0;
|
|
3824
|
+
return wizard.portalAuthState === "authenticated" && wizard.ticketsCount === 1 && wizard.severalItems === null && wizard.selectedEvent?.registrationSubject.kind === "wholeSeries" ? wizard.eligibility?.eligibleMemberships[0] : void 0;
|
|
3474
3825
|
}
|
|
3475
3826
|
/** The event's consent, with its checkbox worded for every item being booked. */
|
|
3476
3827
|
function selectionConsent(wizard) {
|
|
@@ -3539,6 +3890,7 @@ function AttendeeDetailsContent(props) {
|
|
|
3539
3890
|
}
|
|
3540
3891
|
function EventDiscountCodeDisclosure(props) {
|
|
3541
3892
|
const { wizard } = props;
|
|
3893
|
+
if (wizard.discountAccess === "notOffered") return null;
|
|
3542
3894
|
const preview = wizard.combinationCodeField;
|
|
3543
3895
|
if (preview?.failed) return /* @__PURE__ */ jsxs("div", {
|
|
3544
3896
|
role: "alert",
|
|
@@ -3549,6 +3901,12 @@ function EventDiscountCodeDisclosure(props) {
|
|
|
3549
3901
|
})]
|
|
3550
3902
|
});
|
|
3551
3903
|
if (wizard.discountsAvailableLoading || !wizard.shouldShowDiscountToggle) return null;
|
|
3904
|
+
return /* @__PURE__ */ jsx(EventDiscountField, {
|
|
3905
|
+
wizard,
|
|
3906
|
+
preview
|
|
3907
|
+
});
|
|
3908
|
+
}
|
|
3909
|
+
function EventDiscountField({ wizard, preview }) {
|
|
3552
3910
|
return /* @__PURE__ */ jsx(DiscountCodeDisclosure, {
|
|
3553
3911
|
surface: "event-registration",
|
|
3554
3912
|
isOpen: wizard.discountUiOpen,
|
|
@@ -3569,20 +3927,22 @@ function EventDiscountCodeDisclosure(props) {
|
|
|
3569
3927
|
} : {}
|
|
3570
3928
|
});
|
|
3571
3929
|
}
|
|
3572
|
-
function bookOnePlace(wizard) {
|
|
3573
|
-
if (!wizard.ticketTypeSelectionRequired) wizard.setTicketsCount(1);
|
|
3574
|
-
wizard.setStep("select-tickets");
|
|
3575
|
-
}
|
|
3576
3930
|
function PaymentSelectionContent(props) {
|
|
3577
3931
|
const { wizard } = props;
|
|
3578
3932
|
const subtotalCents = wizard.ticketSelectionSubtotalCents;
|
|
3579
3933
|
if (!wizard.api.config.siteId) return null;
|
|
3934
|
+
const funding = selectionFundingShown(wizard);
|
|
3935
|
+
if (funding) return /* @__PURE__ */ jsx(SelectionFundingPayment, {
|
|
3936
|
+
wizard,
|
|
3937
|
+
model: funding,
|
|
3938
|
+
signInPrompt: props.signInPrompt
|
|
3939
|
+
});
|
|
3580
3940
|
if (subtotalCents === null && wizard.combinationAwaitingVisitor) return /* @__PURE__ */ jsx(EventDiscountCodeDisclosure, { wizard });
|
|
3581
3941
|
if (subtotalCents === null) return /* @__PURE__ */ jsx(PaymentBlockingPanel, {
|
|
3582
3942
|
eligibility: wizard.eligibility,
|
|
3583
3943
|
admission: wizard.admission,
|
|
3584
|
-
eligibilityLoading: wizard.
|
|
3585
|
-
eligibilityError: wizard.
|
|
3944
|
+
eligibilityLoading: wizard.paymentOptionsLoading,
|
|
3945
|
+
eligibilityError: wizard.paymentOptionsError,
|
|
3586
3946
|
paysNothing: wizard.paymentDecision.paysNothing,
|
|
3587
3947
|
email: wizard.formData.email,
|
|
3588
3948
|
ticketsCount: wizard.ticketsCount,
|
|
@@ -3590,7 +3950,7 @@ function PaymentSelectionContent(props) {
|
|
|
3590
3950
|
onRequestLogin: () => wizard.setShowMagicLinkModal(true)
|
|
3591
3951
|
});
|
|
3592
3952
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3593
|
-
|
|
3953
|
+
wizard.paymentTermsSurface === "commerce" ? /* @__PURE__ */ jsx(SiteTermsChangedNotice, { message: wizard.siteTerms.notice }) : null,
|
|
3594
3954
|
/* @__PURE__ */ jsx(SeveralItemsPaymentSummary, { wizard }),
|
|
3595
3955
|
/* @__PURE__ */ jsx(PaymentSelectionStep, {
|
|
3596
3956
|
event: wizard.selectedEvent,
|
|
@@ -3600,28 +3960,27 @@ function PaymentSelectionContent(props) {
|
|
|
3600
3960
|
onSelectionChange: wizard.handlePaymentSelectionChange,
|
|
3601
3961
|
eligibility: wizard.eligibility,
|
|
3602
3962
|
admission: wizard.admission,
|
|
3603
|
-
eligibilityLoading: wizard.
|
|
3604
|
-
eligibilityError: wizard.
|
|
3963
|
+
eligibilityLoading: wizard.paymentOptionsLoading,
|
|
3964
|
+
eligibilityError: wizard.paymentOptionsError,
|
|
3605
3965
|
onRequestLogin: () => wizard.setShowMagicLinkModal(true),
|
|
3606
3966
|
decision: wizard.paymentDecision
|
|
3607
3967
|
}),
|
|
3608
|
-
/* @__PURE__ */ jsx(
|
|
3968
|
+
/* @__PURE__ */ jsx(PaymentStepNote, { wizard }),
|
|
3609
3969
|
/* @__PURE__ */ jsx(EventDiscountCodeDisclosure, { wizard }),
|
|
3610
3970
|
/* @__PURE__ */ jsx(BundleSiteTerms, { wizard })
|
|
3611
3971
|
] });
|
|
3612
3972
|
}
|
|
3613
|
-
/**
|
|
3614
|
-
|
|
3615
|
-
|
|
3973
|
+
/**
|
|
3974
|
+
* The note under the ways to pay, in both payment layouts. Several runs: that
|
|
3975
|
+
* passes and memberships are for one run at a time (a date's pass and membership
|
|
3976
|
+
* notes come with its ways to pay). One booking: why it's paid in full.
|
|
3977
|
+
*/
|
|
3978
|
+
function PaymentStepNote({ wizard }) {
|
|
3979
|
+
const note = wizard.severalItems === null ? wizard.paymentInFullNote : selectionEntitlementNote(wizard.severalItems);
|
|
3980
|
+
return note ? /* @__PURE__ */ jsx("p", {
|
|
3616
3981
|
className: "er-entitlement-note",
|
|
3617
|
-
children:
|
|
3618
|
-
});
|
|
3619
|
-
if (wizard.paymentStepState.status !== "ready") return null;
|
|
3620
|
-
return /* @__PURE__ */ jsx(SingleTicketEntitlementNote, {
|
|
3621
|
-
ticketsCount: wizard.ticketsCount,
|
|
3622
|
-
eligibility: wizard.eligibility,
|
|
3623
|
-
onBookOnePlace: () => bookOnePlace(wizard)
|
|
3624
|
-
});
|
|
3982
|
+
children: note
|
|
3983
|
+
}) : null;
|
|
3625
3984
|
}
|
|
3626
3985
|
function SeveralItemsPaymentSummary({ wizard }) {
|
|
3627
3986
|
return wizard.selectionPaymentSummary && wizard.eligibility ? /* @__PURE__ */ jsx(SelectionPaymentSummary, {
|
|
@@ -3631,17 +3990,24 @@ function SeveralItemsPaymentSummary({ wizard }) {
|
|
|
3631
3990
|
}
|
|
3632
3991
|
function ClosedAdmissionNotice({ wizard }) {
|
|
3633
3992
|
const admission = wizard.admission;
|
|
3634
|
-
|
|
3993
|
+
if (admission.kind !== "closed" || admission.reason === "alreadyWaitlisted" || wizard.eligibilityLoading) return null;
|
|
3994
|
+
return registrationStopsHere(admission) ? /* @__PURE__ */ jsxs("div", {
|
|
3995
|
+
role: "status",
|
|
3996
|
+
className: "er-notice er-notice--info",
|
|
3997
|
+
children: [/* @__PURE__ */ jsx("p", { children: admission.message }), admission.contact ? /* @__PURE__ */ jsx(OrganiserContactLine, { contact: admission.contact }) : null]
|
|
3998
|
+
}) : /* @__PURE__ */ jsxs("div", {
|
|
3635
3999
|
role: "alert",
|
|
3636
4000
|
className: "er-error",
|
|
3637
|
-
children: admission.message
|
|
3638
|
-
})
|
|
4001
|
+
children: [/* @__PURE__ */ jsx("p", { children: admission.message }), admission.contact ? /* @__PURE__ */ jsx(OrganiserContactLine, { contact: admission.contact }) : null]
|
|
4002
|
+
});
|
|
3639
4003
|
}
|
|
3640
4004
|
function ticketStepInvitation(claim) {
|
|
3641
4005
|
if (claim.kind === "none") return null;
|
|
3642
4006
|
return claim.kind === "ready" ? {
|
|
3643
4007
|
kind: "held",
|
|
3644
|
-
expiresAt: claim.claim.expiresAt
|
|
4008
|
+
expiresAt: claim.claim.expiresAt,
|
|
4009
|
+
places: claim.restoration.claimed.places,
|
|
4010
|
+
ticketChoice: claim.restoration.claimed.kind === "anyTicket"
|
|
3645
4011
|
} : { kind: "pending" };
|
|
3646
4012
|
}
|
|
3647
4013
|
/** With a date to pick, the choosing step has already said it. */
|
|
@@ -3662,41 +4028,72 @@ function TicketSelectionContent({ wizard, display }) {
|
|
|
3662
4028
|
kind: "waitlisted",
|
|
3663
4029
|
onBookForSomeoneElse: wizard.handleBookForSomeoneElse
|
|
3664
4030
|
}),
|
|
4031
|
+
wizard.portalAuthState === "authenticated" && wizard.existingRegistrationState.tag === "failed" && !isWaitlisted && /* @__PURE__ */ jsx("p", {
|
|
4032
|
+
role: "status",
|
|
4033
|
+
className: "er-text",
|
|
4034
|
+
children: "We couldn’t check whether you’ve already booked this date. If you have, this will be a separate booking."
|
|
4035
|
+
}),
|
|
3665
4036
|
/* @__PURE__ */ jsx(ClosedAdmissionNotice, { wizard }),
|
|
3666
4037
|
/* @__PURE__ */ jsx(TicketStepBookingCloseLine, { wizard }),
|
|
3667
|
-
|
|
4038
|
+
/* @__PURE__ */ jsx(TicketChooser, {
|
|
3668
4039
|
wizard,
|
|
3669
4040
|
display
|
|
3670
|
-
}) : /* @__PURE__ */ jsx(TicketSelectionStep, {
|
|
3671
|
-
purpose: wizard.ticketSelectionPurpose,
|
|
3672
|
-
display,
|
|
3673
|
-
invitation: ticketStepInvitation(wizard.waitlistClaim),
|
|
3674
|
-
event: wizard.selectedEvent,
|
|
3675
|
-
occurrenceContext: wizard.occurrenceContext,
|
|
3676
|
-
selectedAttendanceMode: wizard.selectedAttendanceMode,
|
|
3677
|
-
onAttendanceModeChange: wizard.setSelectedAttendanceMode,
|
|
3678
|
-
ticketsCount: wizard.ticketsCount,
|
|
3679
|
-
maxTickets: wizard.maxTicketsNum,
|
|
3680
|
-
placesCeiling: placeCountCeiling({
|
|
3681
|
-
maxAllowed: wizard.maxTicketsNum,
|
|
3682
|
-
admission: wizard.admission,
|
|
3683
|
-
settledRemaining: settledRemainingPlaces(wizard.eligibility)
|
|
3684
|
-
}),
|
|
3685
|
-
visibleTicketTypes: wizard.visibleTicketTypes,
|
|
3686
|
-
overallRemainingPlaces: wizard.overallRemainingPlaces,
|
|
3687
|
-
heldPlacesBySelection: wizard.heldPlacesBySelection,
|
|
3688
|
-
ticketSelections: wizard.selectedTicketLines,
|
|
3689
|
-
onTicketSelectionsChange: wizard.setSelectedTicketLines,
|
|
3690
|
-
slidingScale: wizard.selectedEventSlidingScale,
|
|
3691
|
-
selectedSlidingAmountInput: wizard.selectedSlidingAmountInput,
|
|
3692
|
-
slidingScaleSelectionMessage: wizard.slidingScaleSelectionMessage,
|
|
3693
|
-
onSlidingAmountChange: wizard.setSelectedSlidingAmountInput,
|
|
3694
|
-
onTicketsChange: wizard.setTicketsCount,
|
|
3695
|
-
bookingUnit: resolveBookingUnit(wizard.selectedEvent),
|
|
3696
|
-
selectionNote: wizard.severalItems === "dates" ? selectionPlacesNote("dates", wizard.selection.length) : null
|
|
3697
4041
|
})
|
|
3698
4042
|
] });
|
|
3699
4043
|
}
|
|
4044
|
+
/**
|
|
4045
|
+
* Whether choosing differently could reopen a refusal: the site can't take
|
|
4046
|
+
* this selection's payment, but a free ticket, the free end of a sliding scale,
|
|
4047
|
+
* or another room or run might not need one.
|
|
4048
|
+
*/
|
|
4049
|
+
function selectionCouldChangePrice(wizard) {
|
|
4050
|
+
if (wizard.admission.kind === "closed" && wizard.admission.reason === "bookingsClosed") return false;
|
|
4051
|
+
return wizard.selectedEventSlidingScale != null || wizard.visibleTicketTypes.length > 1 || wizard.roomChooser != null || wizard.severalItems === "runs";
|
|
4052
|
+
}
|
|
4053
|
+
/**
|
|
4054
|
+
* How the client chooses their places. Where registration stops at the notice
|
|
4055
|
+
* above and no other choice could change that, there's nothing to choose.
|
|
4056
|
+
*/
|
|
4057
|
+
function TicketChooser({ wizard, display }) {
|
|
4058
|
+
if (registrationStopsHere(wizard.admission) && !selectionCouldChangePrice(wizard)) return null;
|
|
4059
|
+
if (wizard.roomChooser) return /* @__PURE__ */ jsx(RoomChooser, {
|
|
4060
|
+
wizard,
|
|
4061
|
+
chooser: wizard.roomChooser,
|
|
4062
|
+
display
|
|
4063
|
+
});
|
|
4064
|
+
if (wizard.severalItems === "runs") return /* @__PURE__ */ jsx(SeveralRunsTicketStep, {
|
|
4065
|
+
wizard,
|
|
4066
|
+
display
|
|
4067
|
+
});
|
|
4068
|
+
return /* @__PURE__ */ jsx(TicketSelectionStep, {
|
|
4069
|
+
purpose: wizard.ticketSelectionPurpose,
|
|
4070
|
+
display,
|
|
4071
|
+
invitation: ticketStepInvitation(wizard.waitlistClaim),
|
|
4072
|
+
event: wizard.selectedEvent,
|
|
4073
|
+
occurrenceContext: wizard.occurrenceContext,
|
|
4074
|
+
selectedAttendanceMode: wizard.selectedAttendanceMode,
|
|
4075
|
+
onAttendanceModeChange: wizard.setSelectedAttendanceMode,
|
|
4076
|
+
ticketsCount: wizard.ticketsCount,
|
|
4077
|
+
maxTickets: wizard.maxTicketsNum,
|
|
4078
|
+
placesCeiling: placeCountCeiling({
|
|
4079
|
+
maxAllowed: wizard.maxTicketsNum,
|
|
4080
|
+
admission: wizard.admission,
|
|
4081
|
+
settledRemaining: settledRemainingPlaces(wizard.eligibility)
|
|
4082
|
+
}),
|
|
4083
|
+
visibleTicketTypes: wizard.visibleTicketTypes,
|
|
4084
|
+
overallRemainingPlaces: wizard.overallRemainingPlaces,
|
|
4085
|
+
heldPlacesBySelection: wizard.heldPlacesBySelection,
|
|
4086
|
+
ticketSelections: wizard.selectedTicketLines,
|
|
4087
|
+
onTicketSelectionsChange: wizard.setSelectedTicketLines,
|
|
4088
|
+
slidingScale: wizard.selectedEventSlidingScale,
|
|
4089
|
+
selectedSlidingAmountInput: wizard.selectedSlidingAmountInput,
|
|
4090
|
+
slidingScaleSelectionMessage: wizard.slidingScaleSelectionMessage,
|
|
4091
|
+
onSlidingAmountChange: wizard.setSelectedSlidingAmountInput,
|
|
4092
|
+
onTicketsChange: wizard.setTicketsCount,
|
|
4093
|
+
bookingUnit: resolveBookingUnit(wizard.selectedEvent),
|
|
4094
|
+
selectionNote: wizard.severalItems === "dates" ? selectionPlacesNote("dates", wizard.selection.length) : null
|
|
4095
|
+
});
|
|
4096
|
+
}
|
|
3700
4097
|
function EventRegistrationWizardContent(props) {
|
|
3701
4098
|
const { wizard } = props;
|
|
3702
4099
|
switch (wizard.step) {
|
|
@@ -3721,6 +4118,7 @@ function EventRegistrationWizardContent(props) {
|
|
|
3721
4118
|
...wizard.selectionMode.kind === "several" ? {
|
|
3722
4119
|
mode: wizard.selectionMode,
|
|
3723
4120
|
selection: wizard.selection,
|
|
4121
|
+
pageDate: wizard.entry.kind === "pageDateAndMore" ? wizard.entry.event : null,
|
|
3724
4122
|
onToggle: wizard.handleSelectionToggle,
|
|
3725
4123
|
onJoinWaitlist: wizard.handleWaitlistChoose
|
|
3726
4124
|
} : { mode: wizard.selectionMode },
|
|
@@ -3731,12 +4129,15 @@ function EventRegistrationWizardContent(props) {
|
|
|
3731
4129
|
display: props.display
|
|
3732
4130
|
});
|
|
3733
4131
|
case "enter-details": return /* @__PURE__ */ jsx(AttendeeDetailsContent, { wizard });
|
|
3734
|
-
case "select-payment": return /* @__PURE__ */ jsx(PaymentSelectionContent, {
|
|
4132
|
+
case "select-payment": return /* @__PURE__ */ jsx(PaymentSelectionContent, {
|
|
4133
|
+
wizard,
|
|
4134
|
+
signInPrompt: props.paymentSignInPrompt
|
|
4135
|
+
});
|
|
3735
4136
|
default: return null;
|
|
3736
4137
|
}
|
|
3737
4138
|
}
|
|
3738
4139
|
function BundleSiteTerms({ wizard }) {
|
|
3739
|
-
if (
|
|
4140
|
+
if (wizard.paymentTermsSurface !== "commerce") return null;
|
|
3740
4141
|
return /* @__PURE__ */ jsx(SiteTermsAgreementField, {
|
|
3741
4142
|
agreement: wizard.siteTerms.commerceView,
|
|
3742
4143
|
onChange: wizard.siteTerms.onChange,
|
|
@@ -3745,6 +4146,34 @@ function BundleSiteTerms({ wizard }) {
|
|
|
3745
4146
|
requiredMark: "none"
|
|
3746
4147
|
});
|
|
3747
4148
|
}
|
|
4149
|
+
/**
|
|
4150
|
+
* Dates keep their ways to pay on screen while a pass's money dates are
|
|
4151
|
+
* priced (Pay waits for the price). A closed or failed booking shows its
|
|
4152
|
+
* own panel instead.
|
|
4153
|
+
*/
|
|
4154
|
+
function selectionFundingShown(wizard) {
|
|
4155
|
+
const model = wizard.selectionFunding;
|
|
4156
|
+
if (!model) return null;
|
|
4157
|
+
const status = wizard.paymentDecision.stepState.status;
|
|
4158
|
+
return status === "error" || status === "not-eligible" ? null : model;
|
|
4159
|
+
}
|
|
4160
|
+
function SelectionFundingPayment(props) {
|
|
4161
|
+
const { wizard } = props;
|
|
4162
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4163
|
+
wizard.paymentTermsSurface === "commerce" ? /* @__PURE__ */ jsx(SiteTermsChangedNotice, { message: wizard.siteTerms.notice }) : null,
|
|
4164
|
+
/* @__PURE__ */ jsx(SelectionFundingStep, {
|
|
4165
|
+
model: props.model,
|
|
4166
|
+
currency: wizard.eligibility?.currency ?? "",
|
|
4167
|
+
cardSummary: wizard.selectionPaymentSummary,
|
|
4168
|
+
creditPreview: wizard.paymentDecision.preview,
|
|
4169
|
+
signInPrompt: props.signInPrompt,
|
|
4170
|
+
afterOptions: /* @__PURE__ */ jsx(EventDiscountCodeDisclosure, { wizard }),
|
|
4171
|
+
onChangeDates: entryChoosesEvent(wizard.entry) ? wizard.handleChangeDates : void 0
|
|
4172
|
+
}),
|
|
4173
|
+
/* @__PURE__ */ jsx(PaymentStepNote, { wizard }),
|
|
4174
|
+
/* @__PURE__ */ jsx(BundleSiteTerms, { wizard })
|
|
4175
|
+
] });
|
|
4176
|
+
}
|
|
3748
4177
|
//#endregion
|
|
3749
4178
|
//#region ../blocks/src/system/runtime/nodes/event-registration/PaymentStatusStep.tsx
|
|
3750
4179
|
function presentation(state) {
|
|
@@ -3783,8 +4212,8 @@ function presentation(state) {
|
|
|
3783
4212
|
action: { label: "Check payment status" }
|
|
3784
4213
|
};
|
|
3785
4214
|
case "assistanceRequired": return {
|
|
3786
|
-
title: "We
|
|
3787
|
-
message: "Please don’t
|
|
4215
|
+
title: "We couldn’t confirm your booking",
|
|
4216
|
+
message: "Please don’t pay again. Contact the organiser to check your booking.",
|
|
3788
4217
|
action: {
|
|
3789
4218
|
label: "Return to booking",
|
|
3790
4219
|
disabled: true
|
|
@@ -3907,7 +4336,10 @@ function EventRegistrationMagicLinkModal(props) {
|
|
|
3907
4336
|
function EventRegistrationWholeScreen(props) {
|
|
3908
4337
|
const { wizard } = props;
|
|
3909
4338
|
switch (props.presentation.screen) {
|
|
3910
|
-
case "processing": return /* @__PURE__ */ jsx(RegistrationProcessing, {
|
|
4339
|
+
case "processing": return /* @__PURE__ */ jsx(RegistrationProcessing, {
|
|
4340
|
+
selection: wizard.paymentSelection,
|
|
4341
|
+
takesPayment: wizard.selectionFunding?.view?.takesPayment ?? null
|
|
4342
|
+
});
|
|
3911
4343
|
case "verifying": return /* @__PURE__ */ jsx(VerifyingPaymentStep, {});
|
|
3912
4344
|
case "verifyingTimeout": return /* @__PURE__ */ jsx(RegistrationVerificationTimeout, {
|
|
3913
4345
|
wizard,
|
|
@@ -3936,7 +4368,7 @@ function EventRegistrationSuccess(props) {
|
|
|
3936
4368
|
const { wizard } = props;
|
|
3937
4369
|
const { result, finished } = props.presentation;
|
|
3938
4370
|
const copy = finished.several ? {
|
|
3939
|
-
message: "",
|
|
4371
|
+
message: finished.creditsLeftSentence ?? "",
|
|
3940
4372
|
defaultEmailSentence: severalConfirmationSentence(finished.several, wizard.formData.email)
|
|
3941
4373
|
} : getRegistrationSuccessCopy(result, props.fallbackMessage);
|
|
3942
4374
|
return /* @__PURE__ */ jsx(SuccessStep, {
|
|
@@ -3964,13 +4396,22 @@ function EventRegistrationProgress(props) {
|
|
|
3964
4396
|
function EventRegistrationStepFooter(props) {
|
|
3965
4397
|
return /* @__PURE__ */ jsxs("div", {
|
|
3966
4398
|
className: "er-payment-layout-footer",
|
|
3967
|
-
|
|
4399
|
+
"data-room-chooser": props.wizard.roomChooser ? "" : void 0,
|
|
4400
|
+
children: [props.wizard.roomChooser ? /* @__PURE__ */ jsx(RoomChooserSummary, {
|
|
4401
|
+
wizard: props.wizard,
|
|
4402
|
+
view: props.wizard.roomChooser.view
|
|
4403
|
+
}) : /* @__PURE__ */ jsx(EventRegistrationSummaryBar, { wizard: props.wizard }), /* @__PURE__ */ jsx(EventRegistrationWizardActions, {
|
|
3968
4404
|
wizard: props.wizard,
|
|
3969
4405
|
buttonText: props.buttonText,
|
|
3970
4406
|
buttonVariant: props.buttonVariant
|
|
3971
4407
|
})]
|
|
3972
4408
|
});
|
|
3973
4409
|
}
|
|
4410
|
+
/** Offer the same sign-in help before asking an anonymous visitor to buy cover. */
|
|
4411
|
+
function paymentOffersSignIn(wizard) {
|
|
4412
|
+
if (wizard.step !== "select-payment" || wizard.portalAuthState === "authenticated" || wizard.portalAuthState === "checking") return false;
|
|
4413
|
+
return wizard.selectionFunding?.view?.rows.some((row) => row.pick.kind === "entitlement" && (row.pick.source.kind === "buyPass" || row.pick.source.kind === "buyMembership")) ?? false;
|
|
4414
|
+
}
|
|
3974
4415
|
function EventRegistrationStepLayout(props) {
|
|
3975
4416
|
const { wizard, progress } = props;
|
|
3976
4417
|
const prompt = /* @__PURE__ */ jsx(EventPortalAuthPrompt, {
|
|
@@ -3990,7 +4431,8 @@ function EventRegistrationStepLayout(props) {
|
|
|
3990
4431
|
/* @__PURE__ */ jsx(EventRegistrationWizardContent, {
|
|
3991
4432
|
wizard,
|
|
3992
4433
|
display: props.display,
|
|
3993
|
-
buttonVariant: props.buttonVariant
|
|
4434
|
+
buttonVariant: props.buttonVariant,
|
|
4435
|
+
paymentSignInPrompt: paymentOffersSignIn(wizard) ? prompt : null
|
|
3994
4436
|
}),
|
|
3995
4437
|
props.showPortalAuthPrompt && props.portalAuthCopy.placement === "after" ? prompt : null
|
|
3996
4438
|
]
|
|
@@ -4085,8 +4527,9 @@ function EventRegistrationSurface(props) {
|
|
|
4085
4527
|
})]
|
|
4086
4528
|
});
|
|
4087
4529
|
}
|
|
4088
|
-
|
|
4089
|
-
|
|
4530
|
+
/** `takesPayment`: dates say from their way to pay; null leaves it to the card choice. */
|
|
4531
|
+
function RegistrationProcessing({ selection, takesPayment }) {
|
|
4532
|
+
const label = takesPayment ?? (selection.method === "stripe" && selection.collectionOptionKind !== "deferred_manual") ? "Preparing your payment" : "Confirming your booking";
|
|
4090
4533
|
return /* @__PURE__ */ jsxs("div", {
|
|
4091
4534
|
className: "er-center",
|
|
4092
4535
|
role: "status",
|
|
@@ -4267,7 +4710,8 @@ function useConfiguredEventRegistrationWizard(props) {
|
|
|
4267
4710
|
siteTerms: props.siteTerms,
|
|
4268
4711
|
pageNavigation: props.pageNavigation,
|
|
4269
4712
|
offeringNoun: props.offeringNoun,
|
|
4270
|
-
siteName: props.siteName
|
|
4713
|
+
siteName: props.siteName,
|
|
4714
|
+
datePageOffer: "addMoreDates"
|
|
4271
4715
|
});
|
|
4272
4716
|
}
|
|
4273
4717
|
function EventRegistrationWizard(props) {
|