@riverbankcms/sdk 0.139.0 → 0.141.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 +1 -1
- package/dist/{PreviewEditorSidebar-BDeenhi3.mjs → PreviewEditorSidebar-Q-fy9GYw.mjs} +4 -4
- package/dist/{PreviewEditorUI-DSRhgjF5.mjs → PreviewEditorUI-LYGzgk85.mjs} +3 -3
- package/dist/{PreviewQueryProvider-D2K8GLUG.mjs → PreviewQueryProvider-CN0ewic5.mjs} +1 -1
- package/dist/{SdkPreviewModeRuntime-CL7wSnYu.mjs → SdkPreviewModeRuntime-CoPYI5Jq.mjs} +90 -50
- package/dist/{SiteChromeCustomizeContext-BhDn-5ir.mjs → SiteChromeCustomizeContext-D8LePX8x.mjs} +2731 -1303
- package/dist/_dts/ai/src/contracts/proposals.d.ts +165 -165
- package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +212 -212
- package/dist/_dts/api/src/accessAdmin.d.ts +74 -104
- package/dist/_dts/api/src/aiEndpoints.d.ts +5 -1
- package/dist/_dts/api/src/authSubmission.d.ts +46 -0
- package/dist/_dts/api/src/billing.d.ts +8 -4
- package/dist/_dts/api/src/billingEndpointDefinitions.d.ts +23 -0
- package/dist/_dts/api/src/billingEndpointTypes.d.ts +26 -0
- package/dist/_dts/api/src/blocks.d.ts +2 -0
- package/dist/_dts/api/src/bookingRecords.d.ts +1 -2
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +8 -1
- package/dist/_dts/api/src/communications.d.ts +0 -1
- package/dist/_dts/api/src/contentRuntime.d.ts +17 -31
- package/dist/_dts/api/src/domainConnection.d.ts +4 -0
- package/dist/_dts/api/src/endpoints.d.ts +93 -64
- package/dist/_dts/api/src/event-destination-policy.d.ts +2 -1
- package/dist/_dts/api/src/footerCompositionContracts.d.ts +25 -0
- package/dist/_dts/api/src/footerSettings.d.ts +9 -6
- package/dist/_dts/api/src/index.d.ts +6 -7
- package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -1
- package/dist/_dts/api/src/indexExtendedTypes.d.ts +1 -1
- package/dist/_dts/api/src/launchReadiness.d.ts +1 -0
- package/dist/_dts/api/src/mailingListIntegration.d.ts +8 -2
- package/dist/_dts/api/src/navigation/dashboardSettingsNav.d.ts +1 -1
- package/dist/_dts/api/src/navigation/dashboardSiteNav.d.ts +2 -1
- package/dist/_dts/api/src/navigation/types.d.ts +1 -1
- package/dist/_dts/api/src/onboarding/confirmationResend.d.ts +25 -0
- package/dist/_dts/api/src/onboarding/surfaceData.d.ts +32 -32
- package/dist/_dts/api/src/publicBookingAvailabilityEndpointDefinitions.d.ts +8 -0
- package/dist/_dts/api/src/publicExperience/commerceEndpoints.d.ts +1 -0
- package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +11 -3
- package/dist/_dts/api/src/publicExperience/sharedTypes.d.ts +3 -29
- package/dist/_dts/api/src/publicOnboardingAttemptEndpointDefinitions.d.ts +65 -0
- package/dist/_dts/api/src/saveOutcome.d.ts +20 -0
- package/dist/_dts/api/src/sdkContracts.d.ts +3 -22
- package/dist/_dts/api/src/sdkPushContracts.d.ts +18 -0
- package/dist/_dts/api/src/sdkThemeWire.d.ts +44 -44
- package/dist/_dts/api/src/settings/permissions.d.ts +12 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +10 -29
- package/dist/_dts/api/src/siteOnboarding.d.ts +9 -9
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +2 -4
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +3 -1
- package/dist/_dts/api/src/siteSettings.d.ts +20 -7
- package/dist/_dts/api/src/types.d.ts +77 -77
- package/dist/_dts/api/src/wholeSeriesRuns.d.ts +2 -37
- package/dist/_dts/billing/src/membership/index.d.ts +3 -0
- package/dist/_dts/billing/src/plans/types.d.ts +3 -0
- package/dist/_dts/billing/src/site-arrangements.d.ts +23 -3
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +20 -4
- package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +2 -0
- package/dist/_dts/blocks/src/pageRendererContracts.d.ts +7 -0
- package/dist/_dts/blocks/src/portal/types.d.ts +2 -4
- package/dist/_dts/blocks/src/portal/waitlist-types.d.ts +35 -0
- package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +2 -0
- package/dist/_dts/blocks/src/system/blocks/events/eventSelectionFields.d.ts +122 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/calendarWindow.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/events/shared/eventSelection.d.ts +11 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +42 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +4 -0
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +2 -2
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +47 -47
- package/dist/_dts/blocks/src/system/data/index.d.ts +2 -2
- package/dist/_dts/blocks/src/system/data/prefetchBlockData.d.ts +7 -1
- package/dist/_dts/blocks/src/system/data/types.d.ts +9 -0
- package/dist/_dts/blocks/src/system/data/utils.d.ts +1 -1
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +27 -1
- package/dist/_dts/blocks/src/system/registry.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +0 -28
- package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +7 -3
- package/dist/_dts/blocks/src/system/runtime/api/types/portal.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/api/types/waitlist-claims.d.ts +7 -2
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +42 -186
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +21 -93
- package/dist/_dts/blocks/src/system/runtime/hooks/useEventFilters.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/appointment-services.d.ts +48 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationSurface.d.ts +1 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/TicketSelectionStep.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/checkoutRecovery.d.ts +14 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventSourceRecovery.d.ts +56 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.state.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +6 -8
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useCheckoutRecovery.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.state.d.ts +10 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventCheckoutHandoffRestore.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +8 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +14 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventSourceRecovery.d.ts +18 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useSettledCommerceView.d.ts +37 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.client.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +24 -6
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.server.d.ts +4 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +4 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.interactive.d.ts +11 -101
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +7 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/listOptions.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.interactive.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/resolver.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +2 -6
- package/dist/_dts/blocks/src/system/runtime/shared/index.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.d.ts +2 -0
- package/dist/_dts/blocks/src/system/transforms/registry/eventCalendar.d.ts +12 -0
- package/dist/_dts/commerce/src/purchase/bookingInstalmentSchedule.d.ts +4 -0
- package/dist/_dts/commerce/src/purchase/event-registration-errors.d.ts +4 -0
- package/dist/_dts/commerce/src/purchase/orderItemMetadata.d.ts +27 -4
- package/dist/_dts/content-editor/src/controller/EntryControllerProvider.d.ts +2 -1
- package/dist/_dts/content-editor/src/hooks/useBlockAutosave.d.ts +3 -1
- package/dist/_dts/content-editor/src/useFooterComposerState.d.ts +3 -0
- package/dist/_dts/core/src/branded.d.ts +0 -8
- package/dist/_dts/core/src/index.d.ts +1 -0
- package/dist/_dts/core/src/mailing-list-setup-parser.d.ts +1 -1
- package/dist/_dts/core/src/mailing-list-setup.d.ts +14 -1
- package/dist/_dts/core/src/mailing-list-submission.d.ts +7 -27
- package/dist/_dts/core/src/participants.d.ts +2 -29
- package/dist/_dts/core/src/public-experience.d.ts +4 -0
- package/dist/_dts/core/src/public-profile.d.ts +27 -1
- package/dist/_dts/core/src/site-route-target.d.ts +9 -2
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +296 -606
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/MailingListGlobalSettingsSummary.d.ts +10 -0
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/MailingListTargetingField.d.ts +3 -2
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/context.d.ts +3 -2
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/loaders.d.ts +3 -2
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/targetingState.d.ts +19 -0
- package/dist/_dts/editor-blocks/src/widgets/site-option-picker/loaders.d.ts +27 -1
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +14 -20
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +7 -1
- package/dist/_dts/sdk/src/rendering/helpers/templateContent.d.ts +1 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/ThemeFontLoader.d.ts +17 -1
- package/dist/_dts/theme-core/src/accordions/types.d.ts +3 -3
- package/dist/_dts/theme-core/src/buttons/affordanceSuppression.d.ts +17 -0
- package/dist/_dts/theme-core/src/buttons/buttonColourContract.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/classNames.d.ts +16 -0
- package/dist/_dts/theme-core/src/buttons/generateButtonCss.d.ts +0 -6
- package/dist/_dts/theme-core/src/buttons/resolvedButtonCss.d.ts +4 -4
- package/dist/_dts/theme-core/src/cards/types.d.ts +21 -21
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/header/interactionPalette.d.ts +8 -2
- package/dist/_dts/theme-core/src/header/legacyHeaderVariant.d.ts +2 -2
- package/dist/_dts/theme-core/src/hosted-booking-appearance.d.ts +54 -12
- package/dist/_dts/theme-core/src/index.d.ts +1 -1
- package/dist/_dts/theme-core/src/inputs/types.d.ts +2 -2
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +54 -54
- package/dist/_dts/theme-core/src/runtime/buildThemeRuntimeFromBridge.d.ts +1 -4
- package/dist/_dts/theme-core/src/schema.d.ts +84 -84
- package/dist/_dts/theme-core/src/shared/componentStyles.d.ts +1 -1
- package/dist/_dts/theme-core/src/site-styles/backgroundAppearance.d.ts +2 -2
- package/dist/_dts/theme-core/src/surfaces/foregroundInteraction.d.ts +77 -0
- package/dist/_dts/theme-core/src/surfaces/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/typography/generateTypographyCss.d.ts +2 -2
- package/dist/_dts/ui/src/lib/use-delayed-flag.d.ts +9 -0
- package/dist/_dts/ui/src/pending-button.d.ts +10 -0
- package/dist/client/{BookingConsentAgreement-CZvTDtsK.mjs → BookingConsentAgreement-xJeYNdnb.mjs} +4 -4
- package/dist/client/{DiscountCodeDisclosure-D-DsLCMU.mjs → DiscountCodeDisclosure-DdT6uzl9.mjs} +1 -1
- package/dist/client/{EventCombined.client-dWqgd5ZO.mjs → EventCombined.client-Cp28uYuM.mjs} +12 -16
- package/dist/client/{EventListing.client-BMRa9IYp.mjs → EventListing.client-CD6AJsMr.mjs} +4 -17
- package/dist/client/{LeafletStaticMap-D21W9kBZ.mjs → LeafletStaticMap-DBsAi9-e.mjs} +1 -1
- package/dist/client/{accordion-FxF_ta47.mjs → accordion-6dwbOKYR.mjs} +1 -1
- package/dist/client/{bookingForm-YnwW4TGw.mjs → bookingForm-CZE9_qPQ.mjs} +7 -7
- package/dist/client/bookings.mjs +500 -233
- package/dist/client/{carousel-vng7fFT5.mjs → carousel-7VHGQARz.mjs} +2 -2
- package/dist/client/{carousel.client-59G_WMr4.mjs → carousel.client-DQTjCVQT.mjs} +1 -1
- package/dist/client/{cart-DEPDsjNk.mjs → cart-Qg_mvQhh.mjs} +3 -3
- package/dist/client/{checkout-CZRWu9rW.mjs → checkout-D84rpgdr.mjs} +3 -3
- package/dist/client/{checkoutUrls-BuseL0dw.mjs → checkoutUrls-FL6lRkrt.mjs} +1 -1
- package/dist/client/client.mjs +2315 -1017
- package/dist/client/{colorStyles-CrxJrPjJ.mjs → colorStyles-3013aRAY.mjs} +3 -1
- package/dist/client/{context-DvU_WUmd.mjs → context-Ctp3T0Wr.mjs} +6 -19
- package/dist/client/{dates-wnPMiRl5.mjs → dates-DJKFcI_N.mjs} +2 -2
- package/dist/client/{eventCalendar-BA3Q5L15.mjs → eventCalendar-CK31z3vs.mjs} +12 -8
- package/dist/client/{eventCombined-51wgR-1R.mjs → eventCombined-DiXd-ewn.mjs} +3 -3
- package/dist/client/{eventDetails-modaetpm.mjs → eventDetails-CTRgt2DK.mjs} +4 -4
- package/dist/client/{eventListing-D8t2J3Kv.mjs → eventListing-Dy9vi_j_.mjs} +3 -3
- package/dist/client/{eventRegistration-CYqtkCE_.mjs → eventRegistration-CnalYMr2.mjs} +618 -177
- package/dist/client/{form-CBKXN5In.mjs → form-eUiMveTT.mjs} +3 -3
- package/dist/client/{headerSection-DylDqNrs.mjs → headerSection-Dy9kQpB1.mjs} +2 -2
- package/dist/client/hooks.mjs +692 -212
- package/dist/client/{locationMap-CvWrG0vZ.mjs → locationMap-DalCmWU0.mjs} +3 -3
- package/dist/client/{media-BOHuueS5.mjs → media-DHpfFwd3.mjs} +1 -1
- package/dist/client/{newsletterForm-Btwk70zw.mjs → newsletterForm-SDDPvhS0.mjs} +150 -94
- package/dist/client/{pricing-Uzw-GQ6Y.mjs → pricing-OcMz4SnX.mjs} +1 -1
- package/dist/client/{productDetail-JLcUYKnd.mjs → productDetail-BQrgHElM.mjs} +3 -3
- package/dist/client/{productList-FM0cbUzj.mjs → productList-OnPn_UJj.mjs} +3 -3
- package/dist/client/{propsDecoder-DYzafZb2.mjs → propsDecoder-zBdsnS-N.mjs} +168 -32
- package/dist/client/rendering/client.mjs +1355 -519
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +2294 -953
- package/dist/client/{scrollToBlock-CvXszexS.mjs → scrollToBlock-BNM4Ob2Y.mjs} +28 -11
- package/dist/client/{shop-BIcjvy5a.mjs → shop-Bv1fPTwQ.mjs} +6 -6
- package/dist/client/{shop-commerce-BZQsy7xw.mjs → shop-commerce-D4KNGaW8.mjs} +7 -7
- package/dist/client/{shop-commerce-store-D5V7XAb5.mjs → shop-commerce-store-2N5EV0Rc.mjs} +1 -1
- package/dist/client/{shopShared-DowkXevB.mjs → shopShared-DvJGdHTV.mjs} +4 -4
- package/dist/client/{useEventFilters-oMoTw_JE.mjs → useEventFilters-BBBvGDHQ.mjs} +19 -13
- package/dist/preview-next/before-render.mjs +119 -64
- package/dist/preview-next/client/runtime.mjs +4 -4
- package/dist/preview-next/editor-chrome.css +4 -8
- package/dist/preview-next/keepAlive.mjs +119 -64
- package/dist/preview-next/middleware.mjs +119 -64
- package/dist/{previewAuthStore-COUyAKaX.mjs → previewAuthStore-Gjb6r6vz.mjs} +119 -64
- package/dist/{sdk-runtime-D4k2LSGF.mjs → sdk-runtime-Defnbfzw.mjs} +2 -2
- package/dist/{separator-UGtpag4Z.mjs → separator-CZXO3Sb0.mjs} +1 -1
- package/dist/server/components.mjs +1170 -384
- package/dist/server/config-validation.mjs +560 -105
- package/dist/server/config.mjs +564 -109
- package/dist/server/data.mjs +688 -212
- package/dist/server/index.mjs +126 -66
- package/dist/server/next.mjs +1429 -662
- package/dist/server/page-converter.mjs +372 -99
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1624 -817
- package/dist/server/rendering.mjs +1200 -391
- package/dist/server/routing.mjs +767 -247
- package/dist/server/server.mjs +715 -276
- package/dist/server/theme-bridge.mjs +475 -110
- package/dist/server/theme.mjs +9 -3
- package/dist/styles/index.css +265 -45
- package/package.json +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/BookingOptionCompactRow.d.ts +0 -29
- package/dist/_dts/blocks/src/system/runtime/shared/components/BookingOptionList.d.ts +0 -13
|
@@ -647,7 +647,7 @@ function parseUuidBrand(value, unsafeConstructor) {
|
|
|
647
647
|
if (!UUID_PATTERN$1.test(normalized)) return err$2({ kind: "invalid_uuid" });
|
|
648
648
|
return ok$2(unsafeConstructor(normalized));
|
|
649
649
|
}
|
|
650
|
-
var UUID_PATTERN$1, unsafeAsEventOfferingId, unsafeAsEventSeriesId, unsafeAsMediaAssetId, unsafeAsStorageBucketName, unsafeAsStoragePath, unsafeAsPositiveByteCount, unsafeAsPositiveSeconds, unsafeAsFormId, unsafeAsPassId, unsafeAsCustomerPassId, unsafeAsAppointmentServiceId, unsafeAsAppointmentResourceId, parseEventOfferingId, parseEventSeriesId;
|
|
650
|
+
var UUID_PATTERN$1, unsafeAsEventOfferingId, unsafeAsEventSeriesId, unsafeAsMediaAssetId, unsafeAsStorageBucketName, unsafeAsStoragePath, unsafeAsPositiveByteCount, unsafeAsPositiveSeconds, unsafeAsFormId, unsafeAsPassId, unsafeAsCustomerPassId, unsafeAsAppointmentServiceId, unsafeAsAppointmentResourceId, unsafeAsContentVersionId, parseEventOfferingId, parseContentVersionId, parseEventSeriesId;
|
|
651
651
|
var init_branded = __esmMin((() => {
|
|
652
652
|
init_result$1();
|
|
653
653
|
UUID_PATTERN$1 = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
@@ -663,7 +663,9 @@ var init_branded = __esmMin((() => {
|
|
|
663
663
|
unsafeAsCustomerPassId = (id) => id;
|
|
664
664
|
unsafeAsAppointmentServiceId = (id) => id;
|
|
665
665
|
unsafeAsAppointmentResourceId = (id) => id;
|
|
666
|
+
unsafeAsContentVersionId = (id) => id;
|
|
666
667
|
parseEventOfferingId = (value) => parseUuidBrand(value, unsafeAsEventOfferingId);
|
|
668
|
+
parseContentVersionId = (value) => parseUuidBrand(value, unsafeAsContentVersionId);
|
|
667
669
|
parseEventSeriesId = (value) => parseUuidBrand(value, unsafeAsEventSeriesId);
|
|
668
670
|
}));
|
|
669
671
|
//#endregion
|
|
@@ -1016,7 +1018,7 @@ function parseEventPageSurfaceDestinationMode(value) {
|
|
|
1016
1018
|
return value === "cms-managed" || value === "system-managed" ? value : void 0;
|
|
1017
1019
|
}
|
|
1018
1020
|
function parseEventPageSurfaceSubject(value) {
|
|
1019
|
-
if (!isRecord$
|
|
1021
|
+
if (!isRecord$29(value)) return err$2({ kind: "notObject" });
|
|
1020
1022
|
switch (value.kind) {
|
|
1021
1023
|
case "eventSeries": {
|
|
1022
1024
|
const eventSeriesId = parseEventSeriesId(value.eventSeriesId);
|
|
@@ -1071,7 +1073,7 @@ function parseEventSeriesIdList(values) {
|
|
|
1071
1073
|
}
|
|
1072
1074
|
return ok$2(parsed);
|
|
1073
1075
|
}
|
|
1074
|
-
function isRecord$
|
|
1076
|
+
function isRecord$29(value) {
|
|
1075
1077
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1076
1078
|
}
|
|
1077
1079
|
var init_event_page_surface_subject = __esmMin((() => {
|
|
@@ -1563,7 +1565,6 @@ var init_assertNever$1 = __esmMin((() => {
|
|
|
1563
1565
|
init_assert_never();
|
|
1564
1566
|
}));
|
|
1565
1567
|
var init_participants = __esmMin((() => {
|
|
1566
|
-
init_branded();
|
|
1567
1568
|
init_result$1();
|
|
1568
1569
|
init_string();
|
|
1569
1570
|
}));
|
|
@@ -1575,9 +1576,10 @@ var init_public_profile = __esmMin((() => {
|
|
|
1575
1576
|
init_public_url_validation();
|
|
1576
1577
|
init_result$1();
|
|
1577
1578
|
}));
|
|
1579
|
+
var init_public_experience = __esmMin((() => {}));
|
|
1578
1580
|
//#endregion
|
|
1579
1581
|
//#region ../core/src/rich-text.ts
|
|
1580
|
-
function isRecord$
|
|
1582
|
+
function isRecord$27(value) {
|
|
1581
1583
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1582
1584
|
}
|
|
1583
1585
|
function hasOnlyKeys(value, allowed) {
|
|
@@ -1588,10 +1590,10 @@ function isDenseArrayOf(value, predicate) {
|
|
|
1588
1590
|
return true;
|
|
1589
1591
|
}
|
|
1590
1592
|
function isTipTapMark(value) {
|
|
1591
|
-
return isRecord$
|
|
1593
|
+
return isRecord$27(value) && hasOnlyKeys(value, markKeys) && typeof value.type === "string" && value.type.length > 0 && (value.attrs === void 0 || isRecord$27(value.attrs));
|
|
1592
1594
|
}
|
|
1593
1595
|
function isTipTapNode(value) {
|
|
1594
|
-
if (!isRecord$
|
|
1596
|
+
if (!isRecord$27(value) || !hasOnlyKeys(value, nodeKeys) || typeof value.type !== "string" || value.type.length === 0 || value.type === "doc" || value.attrs !== void 0 && !isRecord$27(value.attrs) || value.marks !== void 0 && (!Array.isArray(value.marks) || !isDenseArrayOf(value.marks, isTipTapMark)) || value.content !== void 0 && (!Array.isArray(value.content) || !isDenseArrayOf(value.content, isTipTapNode))) return false;
|
|
1595
1597
|
if (value.type === "text") return typeof value.text === "string" && value.text.length > 0 && value.content === void 0;
|
|
1596
1598
|
return value.text === void 0;
|
|
1597
1599
|
}
|
|
@@ -1636,10 +1638,10 @@ var init_mailing_list_identifiers = __esmMin((() => {
|
|
|
1636
1638
|
//#endregion
|
|
1637
1639
|
//#region ../core/src/mailing-list-targeting-parser.ts
|
|
1638
1640
|
function parseMailingListPlacementTargeting(value) {
|
|
1639
|
-
if (!isRecord$
|
|
1641
|
+
if (!isRecord$26(value)) return targetingError("shape");
|
|
1640
1642
|
if (value.mode === "default") return ok$2({ mode: "default" });
|
|
1641
1643
|
if (value.mode !== "custom") return targetingError("mode");
|
|
1642
|
-
if (!isRecord$
|
|
1644
|
+
if (!isRecord$26(value.selection)) return targetingError("selection");
|
|
1643
1645
|
switch (value.provider) {
|
|
1644
1646
|
case "native": return parseNativeTargeting(value.selection);
|
|
1645
1647
|
case "brevo": return parseBrevoTargeting(value.selection);
|
|
@@ -1648,30 +1650,30 @@ function parseMailingListPlacementTargeting(value) {
|
|
|
1648
1650
|
}
|
|
1649
1651
|
}
|
|
1650
1652
|
function parseMailingListVisitorSelection(value) {
|
|
1651
|
-
if (!isRecord$
|
|
1653
|
+
if (!isRecord$26(value)) return visitorSelectionError$1("shape");
|
|
1652
1654
|
switch (value.provider) {
|
|
1653
1655
|
case "native": {
|
|
1654
1656
|
const topicIds = parseVisitorIds(value.topicIds, parseNewsletterListId);
|
|
1655
|
-
return topicIds === null ? visitorSelectionError("targets") : ok$2({
|
|
1657
|
+
return topicIds === null ? visitorSelectionError$1("targets") : ok$2({
|
|
1656
1658
|
provider: "native",
|
|
1657
1659
|
topicIds
|
|
1658
1660
|
});
|
|
1659
1661
|
}
|
|
1660
1662
|
case "brevo": {
|
|
1661
1663
|
const listIds = parseVisitorIds(value.listIds, parseBrevoListId);
|
|
1662
|
-
return listIds === null ? visitorSelectionError("targets") : ok$2({
|
|
1664
|
+
return listIds === null ? visitorSelectionError$1("targets") : ok$2({
|
|
1663
1665
|
provider: "brevo",
|
|
1664
1666
|
listIds
|
|
1665
1667
|
});
|
|
1666
1668
|
}
|
|
1667
1669
|
case "mailchimp": {
|
|
1668
1670
|
const interestIds = parseVisitorIds(value.interestIds, parseMailchimpInterestId);
|
|
1669
|
-
return interestIds === null ? visitorSelectionError("targets") : ok$2({
|
|
1671
|
+
return interestIds === null ? visitorSelectionError$1("targets") : ok$2({
|
|
1670
1672
|
provider: "mailchimp",
|
|
1671
1673
|
interestIds
|
|
1672
1674
|
});
|
|
1673
1675
|
}
|
|
1674
|
-
default: return visitorSelectionError("provider");
|
|
1676
|
+
default: return visitorSelectionError$1("provider");
|
|
1675
1677
|
}
|
|
1676
1678
|
}
|
|
1677
1679
|
function parseNativeTargeting(selection) {
|
|
@@ -1781,7 +1783,7 @@ function parseVisitorIds(value, parseId) {
|
|
|
1781
1783
|
}
|
|
1782
1784
|
return parsed;
|
|
1783
1785
|
}
|
|
1784
|
-
function isRecord$
|
|
1786
|
+
function isRecord$26(value) {
|
|
1785
1787
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1786
1788
|
}
|
|
1787
1789
|
function targetingError(field) {
|
|
@@ -1790,7 +1792,7 @@ function targetingError(field) {
|
|
|
1790
1792
|
field
|
|
1791
1793
|
});
|
|
1792
1794
|
}
|
|
1793
|
-
function visitorSelectionError(field) {
|
|
1795
|
+
function visitorSelectionError$1(field) {
|
|
1794
1796
|
return err$2({
|
|
1795
1797
|
tag: "invalid_mailing_list_visitor_selection",
|
|
1796
1798
|
field
|
|
@@ -1829,8 +1831,12 @@ var init_footer_composition = __esmMin((() => {
|
|
|
1829
1831
|
var init_footer_navigation_layout = __esmMin((() => {}));
|
|
1830
1832
|
//#endregion
|
|
1831
1833
|
//#region ../core/src/footer-composition-types.ts
|
|
1832
|
-
var init_footer_composition_types = __esmMin((() => {}));
|
|
1833
|
-
var init_mailing_list_setup = __esmMin((() => {
|
|
1834
|
+
var init_footer_composition_types = __esmMin((() => {})), DEFAULT_MAILING_LIST_SUCCESS_MESSAGE;
|
|
1835
|
+
var init_mailing_list_setup = __esmMin((() => {
|
|
1836
|
+
init_mailing_list_identifiers();
|
|
1837
|
+
init_result$1();
|
|
1838
|
+
DEFAULT_MAILING_LIST_SUCCESS_MESSAGE = "Thanks — you're on the list.";
|
|
1839
|
+
}));
|
|
1834
1840
|
//#endregion
|
|
1835
1841
|
//#region ../core/src/mailing-list-setup-parser.ts
|
|
1836
1842
|
function parseMailingListGlobalForm(value) {
|
|
@@ -1840,12 +1846,15 @@ function parseMailingListGlobalForm(value) {
|
|
|
1840
1846
|
if (typeof value.includeOptionalPhone !== "boolean") return formError("includeOptionalPhone");
|
|
1841
1847
|
const buttonLabel = parseRequiredString(value.buttonLabel);
|
|
1842
1848
|
if (buttonLabel === null) return formError("buttonLabel");
|
|
1849
|
+
const successMessage = parseRequiredString(value.successMessage);
|
|
1850
|
+
if (successMessage === null) return formError("successMessage");
|
|
1843
1851
|
const privacyNote = parseOptionalString(value.privacyNote);
|
|
1844
1852
|
if (privacyNote === void 0) return formError("privacyNote");
|
|
1845
1853
|
return ok$2({
|
|
1846
1854
|
fields,
|
|
1847
1855
|
includeOptionalPhone: value.includeOptionalPhone,
|
|
1848
1856
|
buttonLabel,
|
|
1857
|
+
successMessage,
|
|
1849
1858
|
privacyNote
|
|
1850
1859
|
});
|
|
1851
1860
|
}
|
|
@@ -2067,11 +2076,17 @@ function parseMailingListSignedSourceToken(value) {
|
|
|
2067
2076
|
const parsed = typeof value === "string" ? value.trim() : "";
|
|
2068
2077
|
return /^[A-Za-z0-9._~-]{16,1000}$/u.test(parsed) ? parsed : null;
|
|
2069
2078
|
}
|
|
2070
|
-
function
|
|
2071
|
-
const parsed =
|
|
2072
|
-
return parsed
|
|
2079
|
+
function parseMailingListContentVersionId(value) {
|
|
2080
|
+
const parsed = parseContentVersionId(value);
|
|
2081
|
+
return parsed.ok ? parsed.value : null;
|
|
2082
|
+
}
|
|
2083
|
+
function buildMailingListSignupBlockSourceRef(blockId, contentVersionId) {
|
|
2084
|
+
const parsedBlockId = parseMailingListBlockId(blockId);
|
|
2085
|
+
const parsedContentVersionId = parseMailingListContentVersionId(contentVersionId);
|
|
2086
|
+
return parsedBlockId !== null && parsedContentVersionId !== null ? {
|
|
2073
2087
|
tag: "block_ref",
|
|
2074
|
-
blockId:
|
|
2088
|
+
blockId: parsedBlockId,
|
|
2089
|
+
contentVersionId: parsedContentVersionId
|
|
2075
2090
|
} : null;
|
|
2076
2091
|
}
|
|
2077
2092
|
var init_mailing_list_submission = __esmMin((() => {
|
|
@@ -2492,6 +2507,7 @@ var init_src$2 = __esmMin((() => {
|
|
|
2492
2507
|
init_participant_identity();
|
|
2493
2508
|
init_public_url_validation();
|
|
2494
2509
|
init_public_profile();
|
|
2510
|
+
init_public_experience();
|
|
2495
2511
|
init_rich_text();
|
|
2496
2512
|
init_footer_composition();
|
|
2497
2513
|
init_footer_navigation_layout();
|
|
@@ -4450,6 +4466,12 @@ var init_parseThemeForPersistence = __esmMin((() => {
|
|
|
4450
4466
|
init_types$14();
|
|
4451
4467
|
}));
|
|
4452
4468
|
//#endregion
|
|
4469
|
+
//#region ../theme-core/src/buttons/affordanceSuppression.ts
|
|
4470
|
+
var AFFORDANCE_SUPPRESS_CLASS;
|
|
4471
|
+
var init_affordanceSuppression = __esmMin((() => {
|
|
4472
|
+
AFFORDANCE_SUPPRESS_CLASS = "rb-affordance-off";
|
|
4473
|
+
}));
|
|
4474
|
+
//#endregion
|
|
4453
4475
|
//#region ../theme-core/src/buttons/classNames.ts
|
|
4454
4476
|
/**
|
|
4455
4477
|
* Parse content/runtime variant identifiers into the closed theme-button class
|
|
@@ -4477,114 +4499,47 @@ function themeButtonClassName(spec) {
|
|
|
4477
4499
|
spec.extraClassName
|
|
4478
4500
|
].filter(Boolean).join(" ");
|
|
4479
4501
|
}
|
|
4502
|
+
/**
|
|
4503
|
+
* Button classes for an authored button that renders its own trailing icon.
|
|
4504
|
+
*
|
|
4505
|
+
* A separate function rather than a flag on `themeButtonClassName`, because
|
|
4506
|
+
* there is exactly one caller and it should stay visible in a diff. The name
|
|
4507
|
+
* states what the caller knows to be true of its own markup — that it renders a
|
|
4508
|
+
* trailing icon — rather than what the theme does about it. The consequence is
|
|
4509
|
+
* the theme's to decide and to change; a caller naming the consequence would be
|
|
4510
|
+
* asserting a policy it does not own, and would quietly become a lie the moment
|
|
4511
|
+
* that policy moved.
|
|
4512
|
+
*
|
|
4513
|
+
* Do not reach for this to remove an arrow you simply do not want. A trailing
|
|
4514
|
+
* affordance is declared by the button style, and a block overriding that is the
|
|
4515
|
+
* defect this replaced.
|
|
4516
|
+
*/
|
|
4517
|
+
function themeButtonClassNameWithTrailingIcon(spec) {
|
|
4518
|
+
return themeButtonClassName({
|
|
4519
|
+
...spec,
|
|
4520
|
+
extraClassName: [spec.extraClassName, AFFORDANCE_SUPPRESS_CLASS].filter(Boolean).join(" ")
|
|
4521
|
+
});
|
|
4522
|
+
}
|
|
4480
4523
|
var init_classNames = __esmMin((() => {
|
|
4524
|
+
init_affordanceSuppression();
|
|
4481
4525
|
init_types$14();
|
|
4482
4526
|
}));
|
|
4483
|
-
var
|
|
4484
|
-
var init_generateBaseCSS = __esmMin((() => {}));
|
|
4485
|
-
var STATE_SELECTORS;
|
|
4486
|
-
var init_cssUtils = __esmMin((() => {
|
|
4487
|
-
STATE_SELECTORS = {
|
|
4488
|
-
hover: ":hover, [data-force-hover=\"true\"]",
|
|
4489
|
-
active: ":active",
|
|
4490
|
-
focus: ":focus-visible",
|
|
4491
|
-
base: ""
|
|
4492
|
-
};
|
|
4493
|
-
}));
|
|
4494
|
-
//#endregion
|
|
4495
|
-
//#region ../theme-core/src/buttons/effects/presets/background.ts
|
|
4496
|
-
function shadeBackgroundEffect(config) {
|
|
4497
|
-
return {
|
|
4498
|
-
id: config.id,
|
|
4499
|
-
name: config.name,
|
|
4500
|
-
description: config.description,
|
|
4501
|
-
category: "background",
|
|
4502
|
-
pseudoElement: "none",
|
|
4503
|
-
applicableTo: ["button"],
|
|
4504
|
-
customizableOption: {
|
|
4505
|
-
name: "amount",
|
|
4506
|
-
type: "select",
|
|
4507
|
-
label: config.label,
|
|
4508
|
-
default: 100,
|
|
4509
|
-
options: [
|
|
4510
|
-
0,
|
|
4511
|
-
100,
|
|
4512
|
-
200,
|
|
4513
|
-
300,
|
|
4514
|
-
400,
|
|
4515
|
-
500,
|
|
4516
|
-
600,
|
|
4517
|
-
700,
|
|
4518
|
-
800,
|
|
4519
|
-
900
|
|
4520
|
-
]
|
|
4521
|
-
},
|
|
4522
|
-
isApplicable: (buttonConfig) => buttonConfig.background.type === "solid",
|
|
4523
|
-
generateCSS: ({ themeId, variantId, options, tokens, buttonConfig }) => {
|
|
4524
|
-
if (buttonConfig.background.type !== "solid") return "";
|
|
4525
|
-
const amount = (options.amount || 100) * config.shadeDirection;
|
|
4526
|
-
const baseToken = buttonConfig.background.colorToken ?? "primary-500";
|
|
4527
|
-
return `
|
|
4528
|
-
:where([data-theme-scope="${themeId}"]) .${variantId}:hover {
|
|
4529
|
-
background-color: ${tokens.getColor(tokens.adjustShade(baseToken, amount))};
|
|
4530
|
-
}
|
|
4531
|
-
`;
|
|
4532
|
-
}
|
|
4533
|
-
};
|
|
4534
|
-
}
|
|
4535
|
-
var init_background$2 = __esmMin((() => {
|
|
4536
|
-
init_cssUtils();
|
|
4537
|
-
shadeBackgroundEffect({
|
|
4538
|
-
id: "darken-background",
|
|
4539
|
-
name: "Darken on Hover",
|
|
4540
|
-
description: "Darkens the background color on hover",
|
|
4541
|
-
label: "Darken Amount (shade step)",
|
|
4542
|
-
shadeDirection: 1
|
|
4543
|
-
});
|
|
4544
|
-
shadeBackgroundEffect({
|
|
4545
|
-
id: "lighten-background",
|
|
4546
|
-
name: "Lighten on Hover",
|
|
4547
|
-
description: "Lightens the background color on hover",
|
|
4548
|
-
label: "Lighten Amount (shade step)",
|
|
4549
|
-
shadeDirection: -1
|
|
4550
|
-
});
|
|
4551
|
-
}));
|
|
4552
|
-
var init_shadow = __esmMin((() => {
|
|
4553
|
-
init_cssUtils();
|
|
4554
|
-
}));
|
|
4555
|
-
var init_transform = __esmMin((() => {
|
|
4556
|
-
init_cssUtils();
|
|
4557
|
-
init_constants$2();
|
|
4558
|
-
}));
|
|
4559
|
-
var init_overlay = __esmMin((() => {}));
|
|
4560
|
-
var init_text = __esmMin((() => {}));
|
|
4561
|
-
var init_border = __esmMin((() => {}));
|
|
4562
|
-
var init_animation = __esmMin((() => {}));
|
|
4563
|
-
var init_nav_underline = __esmMin((() => {}));
|
|
4564
|
-
var init_nav_frosted = __esmMin((() => {}));
|
|
4527
|
+
var init_tokens$1 = __esmMin((() => {}));
|
|
4565
4528
|
//#endregion
|
|
4566
|
-
//#region ../theme-core/src/
|
|
4567
|
-
var
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
init_shadow();
|
|
4574
|
-
init_transform();
|
|
4575
|
-
init_overlay();
|
|
4576
|
-
init_text();
|
|
4577
|
-
init_border();
|
|
4578
|
-
init_animation();
|
|
4579
|
-
init_effects();
|
|
4580
|
-
init_effectClassification();
|
|
4581
|
-
})), init_generateEffectsCSS = __esmMin((() => {
|
|
4582
|
-
init_registry$2();
|
|
4529
|
+
//#region ../theme-core/src/tokens/index.ts
|
|
4530
|
+
var init_tokens = __esmMin((() => {
|
|
4531
|
+
init_tokens$1();
|
|
4532
|
+
init_blockColorTokens();
|
|
4533
|
+
init_themeColorTokens();
|
|
4534
|
+
init_colorTokenParts();
|
|
4535
|
+
init_resolver$1();
|
|
4583
4536
|
}));
|
|
4584
|
-
var
|
|
4585
|
-
|
|
4537
|
+
var init_foregroundInteraction = __esmMin((() => {
|
|
4538
|
+
init_contrast$1();
|
|
4539
|
+
init_colorConversion();
|
|
4540
|
+
init_colorTokenParts();
|
|
4541
|
+
init_tokens();
|
|
4586
4542
|
}));
|
|
4587
|
-
var init_affordanceIcons = __esmMin((() => {}));
|
|
4588
4543
|
//#endregion
|
|
4589
4544
|
//#region ../theme-core/src/palette/utils/opaqueSurfaceColor.ts
|
|
4590
4545
|
/** Resolve an opaque colour, compositing alpha against an explicit underlay. */
|
|
@@ -4737,6 +4692,7 @@ var init_resolveSurfaceForeground = __esmMin((() => {
|
|
|
4737
4692
|
//#region ../theme-core/src/surfaces/index.ts
|
|
4738
4693
|
var init_surfaces = __esmMin((() => {
|
|
4739
4694
|
init_foregroundContract();
|
|
4695
|
+
init_foregroundInteraction();
|
|
4740
4696
|
init_foregroundRoles();
|
|
4741
4697
|
init_resolveSurfaceForeground();
|
|
4742
4698
|
}));
|
|
@@ -4841,6 +4797,113 @@ var init_colorStyles = __esmMin((() => {
|
|
|
4841
4797
|
mutedText: "supporting"
|
|
4842
4798
|
};
|
|
4843
4799
|
}));
|
|
4800
|
+
var init_resolver$1 = __esmMin((() => {
|
|
4801
|
+
init_colorStyles();
|
|
4802
|
+
}));
|
|
4803
|
+
var init_generateBaseCSS = __esmMin((() => {}));
|
|
4804
|
+
var STATE_SELECTORS;
|
|
4805
|
+
var init_cssUtils = __esmMin((() => {
|
|
4806
|
+
STATE_SELECTORS = {
|
|
4807
|
+
hover: ":hover, [data-force-hover=\"true\"]",
|
|
4808
|
+
active: ":active",
|
|
4809
|
+
focus: ":focus-visible",
|
|
4810
|
+
base: ""
|
|
4811
|
+
};
|
|
4812
|
+
}));
|
|
4813
|
+
//#endregion
|
|
4814
|
+
//#region ../theme-core/src/buttons/effects/presets/background.ts
|
|
4815
|
+
function shadeBackgroundEffect(config) {
|
|
4816
|
+
return {
|
|
4817
|
+
id: config.id,
|
|
4818
|
+
name: config.name,
|
|
4819
|
+
description: config.description,
|
|
4820
|
+
category: "background",
|
|
4821
|
+
pseudoElement: "none",
|
|
4822
|
+
applicableTo: ["button"],
|
|
4823
|
+
customizableOption: {
|
|
4824
|
+
name: "amount",
|
|
4825
|
+
type: "select",
|
|
4826
|
+
label: config.label,
|
|
4827
|
+
default: 100,
|
|
4828
|
+
options: [
|
|
4829
|
+
0,
|
|
4830
|
+
100,
|
|
4831
|
+
200,
|
|
4832
|
+
300,
|
|
4833
|
+
400,
|
|
4834
|
+
500,
|
|
4835
|
+
600,
|
|
4836
|
+
700,
|
|
4837
|
+
800,
|
|
4838
|
+
900
|
|
4839
|
+
]
|
|
4840
|
+
},
|
|
4841
|
+
isApplicable: (buttonConfig) => buttonConfig.background.type === "solid",
|
|
4842
|
+
generateCSS: ({ themeId, variantId, options, tokens, buttonConfig }) => {
|
|
4843
|
+
if (buttonConfig.background.type !== "solid") return "";
|
|
4844
|
+
const amount = (options.amount || 100) * config.shadeDirection;
|
|
4845
|
+
const baseToken = buttonConfig.background.colorToken ?? "primary-500";
|
|
4846
|
+
return `
|
|
4847
|
+
:where([data-theme-scope="${themeId}"]) .${variantId}:hover {
|
|
4848
|
+
background-color: ${tokens.getColor(tokens.adjustShade(baseToken, amount))};
|
|
4849
|
+
}
|
|
4850
|
+
`;
|
|
4851
|
+
}
|
|
4852
|
+
};
|
|
4853
|
+
}
|
|
4854
|
+
var init_background$2 = __esmMin((() => {
|
|
4855
|
+
init_cssUtils();
|
|
4856
|
+
shadeBackgroundEffect({
|
|
4857
|
+
id: "darken-background",
|
|
4858
|
+
name: "Darken on Hover",
|
|
4859
|
+
description: "Darkens the background color on hover",
|
|
4860
|
+
label: "Darken Amount (shade step)",
|
|
4861
|
+
shadeDirection: 1
|
|
4862
|
+
});
|
|
4863
|
+
shadeBackgroundEffect({
|
|
4864
|
+
id: "lighten-background",
|
|
4865
|
+
name: "Lighten on Hover",
|
|
4866
|
+
description: "Lightens the background color on hover",
|
|
4867
|
+
label: "Lighten Amount (shade step)",
|
|
4868
|
+
shadeDirection: -1
|
|
4869
|
+
});
|
|
4870
|
+
}));
|
|
4871
|
+
var init_shadow = __esmMin((() => {
|
|
4872
|
+
init_cssUtils();
|
|
4873
|
+
}));
|
|
4874
|
+
var init_transform = __esmMin((() => {
|
|
4875
|
+
init_cssUtils();
|
|
4876
|
+
init_constants$2();
|
|
4877
|
+
}));
|
|
4878
|
+
var init_overlay = __esmMin((() => {}));
|
|
4879
|
+
var init_text = __esmMin((() => {}));
|
|
4880
|
+
var init_border = __esmMin((() => {}));
|
|
4881
|
+
var init_animation = __esmMin((() => {}));
|
|
4882
|
+
var init_nav_underline = __esmMin((() => {}));
|
|
4883
|
+
var init_nav_frosted = __esmMin((() => {}));
|
|
4884
|
+
//#endregion
|
|
4885
|
+
//#region ../theme-core/src/interactive/effects/index.ts
|
|
4886
|
+
var init_effects = __esmMin((() => {
|
|
4887
|
+
init_nav_underline();
|
|
4888
|
+
init_nav_frosted();
|
|
4889
|
+
}));
|
|
4890
|
+
var init_registry$2 = __esmMin((() => {
|
|
4891
|
+
init_background$2();
|
|
4892
|
+
init_shadow();
|
|
4893
|
+
init_transform();
|
|
4894
|
+
init_overlay();
|
|
4895
|
+
init_text();
|
|
4896
|
+
init_border();
|
|
4897
|
+
init_animation();
|
|
4898
|
+
init_effects();
|
|
4899
|
+
init_effectClassification();
|
|
4900
|
+
})), init_generateEffectsCSS = __esmMin((() => {
|
|
4901
|
+
init_registry$2();
|
|
4902
|
+
}));
|
|
4903
|
+
var init_generateDefaultButtonSystem = __esmMin((() => {
|
|
4904
|
+
init_types$14();
|
|
4905
|
+
}));
|
|
4906
|
+
var init_affordanceIcons = __esmMin((() => {}));
|
|
4844
4907
|
//#endregion
|
|
4845
4908
|
//#region ../theme-core/src/utils/tokenOrColor.ts
|
|
4846
4909
|
function isCssColorLiteral(value) {
|
|
@@ -4957,7 +5020,7 @@ var init_buttonSurfaceContext = __esmMin((() => {
|
|
|
4957
5020
|
init_types$14();
|
|
4958
5021
|
})), init_resolvedButtonCss = __esmMin((() => {
|
|
4959
5022
|
init_buttonSurfaceContext();
|
|
4960
|
-
}))
|
|
5023
|
+
}));
|
|
4961
5024
|
var init_generateButtonCss = __esmMin((() => {
|
|
4962
5025
|
init_types$14();
|
|
4963
5026
|
init_classNames();
|
|
@@ -4972,7 +5035,7 @@ var init_generateButtonCss = __esmMin((() => {
|
|
|
4972
5035
|
init_resolveButtonColourStates();
|
|
4973
5036
|
init_resolvedButtonCss();
|
|
4974
5037
|
init_buttonSurfaceContext();
|
|
4975
|
-
|
|
5038
|
+
init_affordanceSuppression();
|
|
4976
5039
|
buttonSizeNameSchema.options;
|
|
4977
5040
|
}));
|
|
4978
5041
|
//#endregion
|
|
@@ -8884,15 +8947,34 @@ var init_bookingConsent = __esmMin((() => {
|
|
|
8884
8947
|
checkboxLabel: z.string().min(1)
|
|
8885
8948
|
});
|
|
8886
8949
|
z.union([blockBookingConsentSchema, bookingRequirementConsentFieldSchema]);
|
|
8887
|
-
}));
|
|
8888
|
-
//#endregion
|
|
8889
|
-
//#region ../blocks/src/system/blocks/events/shared/schemas.ts
|
|
8890
|
-
var eventPresetSchema, eventScheduleScopeSchema$2, publicEventRecurrenceSchema, eventDestinationModeSchema, publicEventDestinationSchema, eventVenueSchema, eventCategorySchema, accessRestrictionSchema, publicCurrencySchema, publicCentsSchema, publicPositiveCentsSchema, publicIsoDateTimeSchema, publicEventAttendanceModeSchema, publicEventAttendanceModeAvailabilitySchema, publicEventPricingOptionAvailabilitySchema, publicEventPricingOptionSchema, publicEventPricingSchema, publicTeamMemberSummarySchema, publicEventBookingAvailabilitySchema, publicRunSessionSchema, publicWholeSeriesRunSchema, publicEventBaseSchema, publicEventSchema, publicEventsArraySchema;
|
|
8950
|
+
})), publicEventLoaderQuerySchemaShape, eventPresetSchema, eventScheduleScopeSchema$2, publicEventRecurrenceSchema, eventDestinationModeSchema, publicEventDestinationSchema, eventVenueSchema, eventCategorySchema, accessRestrictionSchema, publicCurrencySchema, publicCentsSchema, publicPositiveCentsSchema, publicIsoDateTimeSchema, publicEventAttendanceModeSchema, publicEventAttendanceModeAvailabilitySchema, publicEventPricingOptionAvailabilitySchema, publicEventPricingOptionSchema, publicEventPricingSchema, publicTeamMemberSummarySchema, publicEventBookingAvailabilitySchema, publicRunSessionSchema, publicWholeSeriesRunSchema, publicEventBaseSchema, publicEventSchema, publicEventsArraySchema;
|
|
8891
8951
|
var init_schemas = __esmMin((() => {
|
|
8892
8952
|
init_media$1();
|
|
8893
8953
|
init_richTextSchema();
|
|
8894
8954
|
init_bookingPaymentTerms();
|
|
8895
8955
|
init_bookingConsent();
|
|
8956
|
+
publicEventLoaderQuerySchemaShape = {
|
|
8957
|
+
limit: z.string().optional(),
|
|
8958
|
+
from: z.string().optional(),
|
|
8959
|
+
to: z.string().optional(),
|
|
8960
|
+
afterStartsAt: z.string().optional(),
|
|
8961
|
+
afterId: z.string().optional(),
|
|
8962
|
+
categoryIds: z.string().optional(),
|
|
8963
|
+
venueId: z.string().optional(),
|
|
8964
|
+
staffMemberId: z.string().optional(),
|
|
8965
|
+
eventSurface: z.string().optional(),
|
|
8966
|
+
eventPresets: z.string().optional(),
|
|
8967
|
+
scheduleScope: z.string().optional(),
|
|
8968
|
+
seriesId: z.string().optional(),
|
|
8969
|
+
seriesIds: z.string().optional(),
|
|
8970
|
+
runSeriesId: z.string().optional(),
|
|
8971
|
+
seriesSlug: z.string().optional(),
|
|
8972
|
+
includeOccurrenceId: z.string().optional(),
|
|
8973
|
+
readIntent: z.string().optional(),
|
|
8974
|
+
detailLevel: z.string().optional(),
|
|
8975
|
+
readProfile: z.string().optional()
|
|
8976
|
+
};
|
|
8977
|
+
z.object(publicEventLoaderQuerySchemaShape);
|
|
8896
8978
|
eventPresetSchema = z.enum([
|
|
8897
8979
|
"event",
|
|
8898
8980
|
"class",
|
|
@@ -9281,6 +9363,7 @@ function calendarQueryKey(siteId, stage, filters) {
|
|
|
9281
9363
|
filters.eventSurface ?? "all",
|
|
9282
9364
|
normalizedCsv(filters.eventPresets),
|
|
9283
9365
|
filters.scheduleScope ?? "any",
|
|
9366
|
+
...filters.seriesIds === void 0 ? [] : [normalizedCsv(filters.seriesIds)],
|
|
9284
9367
|
normalizedCsv(filters.categoryIds),
|
|
9285
9368
|
normalizeCalendarFilterId(filters.venueId) ?? "",
|
|
9286
9369
|
normalizeCalendarFilterId(filters.staffMemberId) ?? "",
|
|
@@ -9318,7 +9401,7 @@ function planCalendarMonthRanges(months) {
|
|
|
9318
9401
|
const sorted = [...new Set(months)].sort();
|
|
9319
9402
|
const ranges = [];
|
|
9320
9403
|
for (const month of sorted) {
|
|
9321
|
-
const previous = ranges.
|
|
9404
|
+
const previous = ranges[ranges.length - 1];
|
|
9322
9405
|
const end = calendarMonthKey$1(addMonths(calendarMonthDate(month), 1));
|
|
9323
9406
|
if (previous?.endMonthExclusive === month && monthNumber(end) - monthNumber(previous.startMonth) <= 3) previous.endMonthExclusive = end;
|
|
9324
9407
|
else ranges.push({
|
|
@@ -9358,6 +9441,7 @@ var init_calendarWindow = __esmMin((() => {
|
|
|
9358
9441
|
eventSurface: z.enum(eventSurfaceScopeValues).optional(),
|
|
9359
9442
|
eventPresets: z.string().optional(),
|
|
9360
9443
|
scheduleScope: z.enum(eventScheduleScopeValues).optional(),
|
|
9444
|
+
seriesIds: z.string().optional(),
|
|
9361
9445
|
categoryIds: z.string().optional(),
|
|
9362
9446
|
venueId: z.string().transform(normalizeCalendarFilterId).optional(),
|
|
9363
9447
|
staffMemberId: z.string().transform(normalizeCalendarFilterId).optional()
|
|
@@ -9898,6 +9982,9 @@ function isApiSuccessResponse(json) {
|
|
|
9898
9982
|
* });
|
|
9899
9983
|
* ```
|
|
9900
9984
|
*/
|
|
9985
|
+
function publicEventsQuery(params) {
|
|
9986
|
+
return { ...params ?? {} };
|
|
9987
|
+
}
|
|
9901
9988
|
function createBlockApi(config) {
|
|
9902
9989
|
const { baseUrl, auth, authOverrides, siteId, isPreview } = config;
|
|
9903
9990
|
const dedup = createDeduplicationCache({ ttl: 100 });
|
|
@@ -10050,23 +10137,7 @@ function createBlockApi(config) {
|
|
|
10050
10137
|
const path = buildPath(EVENTS.list.path, { siteId: sid });
|
|
10051
10138
|
return request(EVENTS.list, {
|
|
10052
10139
|
path,
|
|
10053
|
-
query:
|
|
10054
|
-
from: params?.from,
|
|
10055
|
-
to: params?.to,
|
|
10056
|
-
afterStartsAt: params?.afterStartsAt,
|
|
10057
|
-
afterId: params?.afterId,
|
|
10058
|
-
limit: params?.limit,
|
|
10059
|
-
stage: params?.stage,
|
|
10060
|
-
eventSurface: params?.eventSurface,
|
|
10061
|
-
eventPresets: params?.eventPresets,
|
|
10062
|
-
scheduleScope: params?.scheduleScope,
|
|
10063
|
-
categoryIds: params?.categoryIds,
|
|
10064
|
-
venueId: params?.venueId,
|
|
10065
|
-
staffMemberId: params?.staffMemberId,
|
|
10066
|
-
seriesId: params?.seriesId,
|
|
10067
|
-
includeOccurrenceId: params?.includeOccurrenceId,
|
|
10068
|
-
detailLevel: params?.detailLevel
|
|
10069
|
-
}
|
|
10140
|
+
query: publicEventsQuery(params)
|
|
10070
10141
|
});
|
|
10071
10142
|
},
|
|
10072
10143
|
async getEventFilters(params) {
|
|
@@ -10130,7 +10201,7 @@ function createBlockApi(config) {
|
|
|
10130
10201
|
const path = buildPath(WHOLE_SERIES.waitlistClaimResolve.path, { siteId: sid });
|
|
10131
10202
|
return request(WHOLE_SERIES.waitlistClaimResolve, {
|
|
10132
10203
|
path,
|
|
10133
|
-
body:
|
|
10204
|
+
body: data
|
|
10134
10205
|
});
|
|
10135
10206
|
},
|
|
10136
10207
|
async getDiscountsAvailable(data) {
|
|
@@ -13541,17 +13612,16 @@ const ButtonNode = ({ value, children, href, variantId = "primary", size = "md",
|
|
|
13541
13612
|
console.warn("[ButtonNode] Missing href for link-required button");
|
|
13542
13613
|
return null;
|
|
13543
13614
|
}
|
|
13544
|
-
const extraClassName = affordanceIcon ? [className, AFFORDANCE_SUPPRESS_CLASS].filter(Boolean).join(" ") : className;
|
|
13545
13615
|
const resolvedVariantId = parseThemeButtonVariantId(variantId);
|
|
13546
13616
|
if (variantId && !resolvedVariantId) {
|
|
13547
13617
|
console.error("[ButtonNode] Invalid button variant", { variantId });
|
|
13548
13618
|
return null;
|
|
13549
13619
|
}
|
|
13550
|
-
const combinedClassName = resolvedVariantId ? themeButtonClassName({
|
|
13620
|
+
const combinedClassName = resolvedVariantId ? (affordanceIcon ? themeButtonClassNameWithTrailingIcon : themeButtonClassName)({
|
|
13551
13621
|
variant: resolvedVariantId,
|
|
13552
13622
|
size,
|
|
13553
|
-
extraClassName
|
|
13554
|
-
}) :
|
|
13623
|
+
extraClassName: className
|
|
13624
|
+
}) : className;
|
|
13555
13625
|
if (resolvedHref) return /* @__PURE__ */ jsxs("a", {
|
|
13556
13626
|
href: resolvedHref,
|
|
13557
13627
|
target,
|
|
@@ -15147,10 +15217,11 @@ const publicPricingSchema = z.object({
|
|
|
15147
15217
|
singlePriceAmount: z.number().nullable(),
|
|
15148
15218
|
slidingMinAmount: z.number().nullable(),
|
|
15149
15219
|
slidingMaxAmount: z.number().nullable(),
|
|
15150
|
-
options: z.array(publicPricingOptionSchema)
|
|
15220
|
+
options: z.array(publicPricingOptionSchema).readonly()
|
|
15151
15221
|
});
|
|
15152
15222
|
const publicAppointmentServiceSchema = z.object({
|
|
15153
15223
|
id: z.string().min(1),
|
|
15224
|
+
slug: z.string().min(1).optional(),
|
|
15154
15225
|
title: z.string(),
|
|
15155
15226
|
description: z.string().nullable().optional(),
|
|
15156
15227
|
durationMinutes: z.number().int().positive(),
|
|
@@ -15227,7 +15298,7 @@ function formatAmountOrFree(amount, currency) {
|
|
|
15227
15298
|
currency
|
|
15228
15299
|
}, { decimals: "auto" });
|
|
15229
15300
|
}
|
|
15230
|
-
function buildRows(services, pathname) {
|
|
15301
|
+
function buildRows(services, pathname, servicePathPrefix) {
|
|
15231
15302
|
return services.map((service) => ({
|
|
15232
15303
|
id: service.id,
|
|
15233
15304
|
title: service.title,
|
|
@@ -15238,7 +15309,8 @@ function buildRows(services, pathname) {
|
|
|
15238
15309
|
href: resolveDedicatedBookingHref(pathname, {
|
|
15239
15310
|
kind: "appointment_service",
|
|
15240
15311
|
serviceId: service.id
|
|
15241
|
-
})
|
|
15312
|
+
}),
|
|
15313
|
+
detailsHref: servicePathPrefix && service.slug ? `${servicePathPrefix.replace(/\/$/, "")}/${encodeURIComponent(service.slug)}` : null
|
|
15242
15314
|
}));
|
|
15243
15315
|
}
|
|
15244
15316
|
function buildAppointmentServicesView(input) {
|
|
@@ -15257,13 +15329,14 @@ function buildAppointmentServicesView(input) {
|
|
|
15257
15329
|
};
|
|
15258
15330
|
return {
|
|
15259
15331
|
kind: "items",
|
|
15260
|
-
rows: buildRows(parsed.services, input.pathname)
|
|
15332
|
+
rows: buildRows(parsed.services, input.pathname, input.servicePathPrefix ?? null)
|
|
15261
15333
|
};
|
|
15262
15334
|
}
|
|
15263
|
-
function AppointmentServicesNode({ sectionHeading, services, pathname, className }) {
|
|
15335
|
+
function AppointmentServicesNode({ sectionHeading, services, pathname, servicePathPrefix, className }) {
|
|
15264
15336
|
const view = buildAppointmentServicesView({
|
|
15265
15337
|
services,
|
|
15266
|
-
pathname: typeof pathname === "string" ? pathname : void 0
|
|
15338
|
+
pathname: typeof pathname === "string" ? pathname : void 0,
|
|
15339
|
+
servicePathPrefix: typeof servicePathPrefix === "string" ? servicePathPrefix : null
|
|
15267
15340
|
});
|
|
15268
15341
|
const rootClassName = `appointment-services ${className ?? ""}`.trim();
|
|
15269
15342
|
const RowTitle = sectionHeading ? "h3" : "h2";
|
|
@@ -15294,7 +15367,10 @@ function AppointmentServicesNode({ sectionHeading, services, pathname, className
|
|
|
15294
15367
|
children: [
|
|
15295
15368
|
/* @__PURE__ */ jsx(RowTitle, {
|
|
15296
15369
|
className: "appointment-services-row-title rb-text-lg rb-font-medium rb-leading-tight",
|
|
15297
|
-
children: row.
|
|
15370
|
+
children: row.detailsHref ? /* @__PURE__ */ jsx("a", {
|
|
15371
|
+
href: row.detailsHref,
|
|
15372
|
+
children: row.title
|
|
15373
|
+
}) : row.title
|
|
15298
15374
|
}),
|
|
15299
15375
|
row.description ? /* @__PURE__ */ jsx("p", {
|
|
15300
15376
|
className: "appointment-services-row-description rb-text-sm rb-leading-6 status-muted",
|
|
@@ -18417,12 +18493,12 @@ var init_EventCompactRow = __esmMin((() => {
|
|
|
18417
18493
|
}), cta.hidden ? /* @__PURE__ */ jsx("span", {
|
|
18418
18494
|
className: "event-compact-row-status",
|
|
18419
18495
|
children: cta.label
|
|
18420
|
-
}) : /* @__PURE__ */
|
|
18496
|
+
}) : /* @__PURE__ */ jsx("a", {
|
|
18421
18497
|
href: cta.href,
|
|
18422
18498
|
target: cta.external ? "_blank" : void 0,
|
|
18423
18499
|
rel: cta.external ? "noopener noreferrer" : void 0,
|
|
18424
18500
|
className: `${buttonClass} event-compact-row-cta`,
|
|
18425
|
-
children:
|
|
18501
|
+
children: /* @__PURE__ */ jsx("span", { children: cta.label })
|
|
18426
18502
|
})]
|
|
18427
18503
|
})]
|
|
18428
18504
|
})]
|
|
@@ -18657,6 +18733,14 @@ var init_contract_schemas = __esmMin((() => {
|
|
|
18657
18733
|
"week"
|
|
18658
18734
|
]);
|
|
18659
18735
|
}));
|
|
18736
|
+
/** Undefined means discovery; an empty string is an explicitly empty selection. */
|
|
18737
|
+
function eventSeriesScopeCsv(value) {
|
|
18738
|
+
if (value == null) return void 0;
|
|
18739
|
+
return typeof value === "string" ? value : value.join(",");
|
|
18740
|
+
}
|
|
18741
|
+
var init_eventSelection = __esmMin((() => {
|
|
18742
|
+
init_src$2();
|
|
18743
|
+
}));
|
|
18660
18744
|
//#endregion
|
|
18661
18745
|
//#region ../blocks/src/system/blocks/events/shared/types.ts
|
|
18662
18746
|
var init_types$6 = __esmMin((() => {}));
|
|
@@ -19970,6 +20054,7 @@ function normalizeFilterId(value) {
|
|
|
19970
20054
|
return id === "all" ? void 0 : id;
|
|
19971
20055
|
}
|
|
19972
20056
|
function buildEventRuntimeFilters(input) {
|
|
20057
|
+
if (input.seriesIds != null) return { seriesIds: input.seriesIds };
|
|
19973
20058
|
const params = {};
|
|
19974
20059
|
if (input.eventSurface && input.eventSurface !== "all") params.eventSurface = input.eventSurface;
|
|
19975
20060
|
const eventPresets = normalizeCsvString(input.filterEventPresets);
|
|
@@ -19985,6 +20070,7 @@ function buildEventRuntimeFilters(input) {
|
|
|
19985
20070
|
}
|
|
19986
20071
|
function getEventRuntimeFiltersKey(filters) {
|
|
19987
20072
|
return JSON.stringify({
|
|
20073
|
+
seriesIds: filters?.seriesIds == null ? null : [...new Set(filters.seriesIds.split(",").filter(Boolean))].sort().join(","),
|
|
19988
20074
|
categoryIds: normalizeCsvString(filters?.categoryIds),
|
|
19989
20075
|
staffMemberId: normalizeOptionalId(filters?.staffMemberId),
|
|
19990
20076
|
venueId: normalizeOptionalId(filters?.venueId),
|
|
@@ -20045,11 +20131,15 @@ function buildEventCollectionDisplay(source) {
|
|
|
20045
20131
|
};
|
|
20046
20132
|
}
|
|
20047
20133
|
function buildEventCollectionFilterDisplay(source) {
|
|
20048
|
-
|
|
20049
|
-
|
|
20050
|
-
|
|
20051
|
-
|
|
20052
|
-
|
|
20134
|
+
const selected = source.seriesIds != null;
|
|
20135
|
+
const matchingFilters = selected ? {
|
|
20136
|
+
eventSurface: "all",
|
|
20137
|
+
filterEventPresets: null,
|
|
20138
|
+
scheduleScope: "any",
|
|
20139
|
+
filterCategoryIds: null,
|
|
20140
|
+
filterStaffMemberId: null,
|
|
20141
|
+
filterVenueId: null
|
|
20142
|
+
} : {
|
|
20053
20143
|
eventSurface: normalizeEventSurfaceScope(source.eventSurface),
|
|
20054
20144
|
filterEventPresets: normalizeEventSurfacePresetsCsv(source.filterEventPresets),
|
|
20055
20145
|
scheduleScope: normalizeEventScheduleScope(source.scheduleScope),
|
|
@@ -20057,6 +20147,14 @@ function buildEventCollectionFilterDisplay(source) {
|
|
|
20057
20147
|
filterStaffMemberId: normalizeEventStaffMemberId(source.filterStaffMemberId),
|
|
20058
20148
|
filterVenueId: normalizeEventVenueId(source.filterVenueId)
|
|
20059
20149
|
};
|
|
20150
|
+
return {
|
|
20151
|
+
seriesIds: eventSeriesScopeCsv(source.seriesIds),
|
|
20152
|
+
showFilters: selected ? false : source.showFilters ?? true,
|
|
20153
|
+
showCategoryFilter: source.showCategoryFilter ?? "auto",
|
|
20154
|
+
showVenueFilter: source.showVenueFilter ?? false,
|
|
20155
|
+
showStaffFilter: source.showStaffFilter ?? true,
|
|
20156
|
+
...matchingFilters
|
|
20157
|
+
};
|
|
20060
20158
|
}
|
|
20061
20159
|
function buildEventCollectionPresentationDisplay(source) {
|
|
20062
20160
|
return {
|
|
@@ -20071,14 +20169,15 @@ function buildEventCollectionPresentationDisplay(source) {
|
|
|
20071
20169
|
}
|
|
20072
20170
|
function buildEventCollectionHydration(source, now = /* @__PURE__ */ new Date()) {
|
|
20073
20171
|
const timeZone = source.calendarWindow?.scope.timeZone ?? toBookingTimeZone(source.bookingTimeZone);
|
|
20172
|
+
const selected = source.seriesIds != null;
|
|
20074
20173
|
return {
|
|
20075
20174
|
calendarWindow: source.calendarWindow ?? void 0,
|
|
20076
20175
|
siteId: source.siteId,
|
|
20077
20176
|
stage: source.stage,
|
|
20078
20177
|
prefetchedEvents: source.events != null,
|
|
20079
|
-
eventSurface: normalizeEventSurfaceScope(source.eventSurface),
|
|
20080
|
-
filterEventPresets: normalizeEventSurfacePresetsCsv(source.filterEventPresets),
|
|
20081
|
-
scheduleScope: normalizeEventScheduleScope(source.scheduleScope),
|
|
20178
|
+
eventSurface: selected ? "all" : normalizeEventSurfaceScope(source.eventSurface),
|
|
20179
|
+
filterEventPresets: selected ? null : normalizeEventSurfacePresetsCsv(source.filterEventPresets),
|
|
20180
|
+
scheduleScope: selected ? "any" : normalizeEventScheduleScope(source.scheduleScope),
|
|
20082
20181
|
calendarContext: {
|
|
20083
20182
|
timeZone,
|
|
20084
20183
|
initialToday: source.calendarWindow?.initialToday ?? getLocalScheduleDate(now, timeZone)
|
|
@@ -20107,6 +20206,7 @@ function buildEventCollectionListingDisplay(display, prefetchedEvents, className
|
|
|
20107
20206
|
}
|
|
20108
20207
|
var eventSurfaceScopeSchema$1, eventScheduleScopeSchema$1, eventCollectionFilterSourceSchemaShape, eventCollectionSourceSchemaShape, eventCollectionDisplaySchemaShape, eventCollectionHydrationSchema;
|
|
20109
20208
|
var init_eventCollectionContract = __esmMin((() => {
|
|
20209
|
+
init_eventSelection();
|
|
20110
20210
|
init_calendarWindow();
|
|
20111
20211
|
init_cards();
|
|
20112
20212
|
init_src$2();
|
|
@@ -20125,6 +20225,7 @@ var init_eventCollectionContract = __esmMin((() => {
|
|
|
20125
20225
|
eventSurface: eventSurfaceScopeSchema$1.nullable().optional(),
|
|
20126
20226
|
filterEventPresets: z.union([z.string(), z.array(z.string())]).nullable().optional(),
|
|
20127
20227
|
scheduleScope: eventScheduleScopeSchema$1.nullable().optional(),
|
|
20228
|
+
seriesIds: z.union([z.string(), z.array(z.string())]).nullable().optional(),
|
|
20128
20229
|
filterCategoryIds: z.union([z.string(), z.array(z.string())]).nullable().optional(),
|
|
20129
20230
|
filterStaffMemberId: z.string().nullable().optional(),
|
|
20130
20231
|
filterVenueId: z.string().nullable().optional()
|
|
@@ -20171,6 +20272,7 @@ var init_eventCollectionContract = __esmMin((() => {
|
|
|
20171
20272
|
eventSurface: eventSurfaceScopeSchema$1,
|
|
20172
20273
|
filterEventPresets: z.string().nullable(),
|
|
20173
20274
|
scheduleScope: eventScheduleScopeSchema$1,
|
|
20275
|
+
seriesIds: z.string().nullable().optional(),
|
|
20174
20276
|
filterCategoryIds: z.string().nullable(),
|
|
20175
20277
|
filterStaffMemberId: z.string().nullable(),
|
|
20176
20278
|
filterVenueId: z.string().nullable(),
|
|
@@ -20702,7 +20804,6 @@ function OfferingsCatalogue(props) {
|
|
|
20702
20804
|
//#endregion
|
|
20703
20805
|
//#region ../blocks/src/system/runtime/nodes/offerings-preview-content.tsx
|
|
20704
20806
|
init_buttons();
|
|
20705
|
-
init_svg();
|
|
20706
20807
|
init_shared$3();
|
|
20707
20808
|
function OfferingsPreviewContent(props) {
|
|
20708
20809
|
const groupLinkClass = themeButtonClassName({
|
|
@@ -20749,13 +20850,10 @@ function OfferingsPreviewContent(props) {
|
|
|
20749
20850
|
}),
|
|
20750
20851
|
groupCta ? /* @__PURE__ */ jsx("footer", {
|
|
20751
20852
|
className: "offerings-preview-card-footer rb-mt-auto rb-flex",
|
|
20752
|
-
children: /* @__PURE__ */
|
|
20853
|
+
children: /* @__PURE__ */ jsx("a", {
|
|
20753
20854
|
className: groupLinkClass,
|
|
20754
20855
|
href: groupCta.href,
|
|
20755
|
-
children:
|
|
20756
|
-
"aria-hidden": "true",
|
|
20757
|
-
className: "offerings-preview-link-icon rb-h-4 rb-w-4"
|
|
20758
|
-
})]
|
|
20856
|
+
children: /* @__PURE__ */ jsx("span", { children: groupCta.label })
|
|
20759
20857
|
})
|
|
20760
20858
|
}) : null
|
|
20761
20859
|
]
|
|
@@ -22697,16 +22795,6 @@ var init_appearancePresets = __esmMin((() => {
|
|
|
22697
22795
|
var init_blockFlow = __esmMin((() => {
|
|
22698
22796
|
init_types$8();
|
|
22699
22797
|
}));
|
|
22700
|
-
var init_tokens$1 = __esmMin((() => {}));
|
|
22701
|
-
//#endregion
|
|
22702
|
-
//#region ../theme-core/src/tokens/index.ts
|
|
22703
|
-
var init_tokens = __esmMin((() => {
|
|
22704
|
-
init_tokens$1();
|
|
22705
|
-
init_blockColorTokens();
|
|
22706
|
-
init_themeColorTokens();
|
|
22707
|
-
init_colorTokenParts();
|
|
22708
|
-
init_resolver$1();
|
|
22709
|
-
}));
|
|
22710
22798
|
//#endregion
|
|
22711
22799
|
//#region ../theme-core/src/site-styles/backgroundAppearance.ts
|
|
22712
22800
|
function parseBackgroundAppearanceColorToken(value) {
|
|
@@ -28091,6 +28179,7 @@ function diffJsonPaths(left, right, path = "") {
|
|
|
28091
28179
|
}
|
|
28092
28180
|
var init_headerBytesComparison = __esmMin((() => {}));
|
|
28093
28181
|
var init_headerOpeningForeground = __esmMin((() => {
|
|
28182
|
+
init_foregroundInteraction();
|
|
28094
28183
|
init_expandPalette();
|
|
28095
28184
|
init_colorConversion();
|
|
28096
28185
|
init_tokens();
|
|
@@ -28874,6 +28963,7 @@ var init_schema = __esmMin((() => {
|
|
|
28874
28963
|
];
|
|
28875
28964
|
siteOptionSources = [
|
|
28876
28965
|
"eventCategories",
|
|
28966
|
+
"eventSeries",
|
|
28877
28967
|
"venues",
|
|
28878
28968
|
"staffMembers"
|
|
28879
28969
|
];
|
|
@@ -33624,6 +33714,49 @@ var init_registrationEventAdapter = __esmMin((() => {
|
|
|
33624
33714
|
init_runGrouping();
|
|
33625
33715
|
}));
|
|
33626
33716
|
//#endregion
|
|
33717
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/eventSourceRecovery.ts
|
|
33718
|
+
function resolveEventRegistrationEventSource(input) {
|
|
33719
|
+
if (input.wholeSeriesRunEvents != null) return {
|
|
33720
|
+
kind: "loaded",
|
|
33721
|
+
events: input.wholeSeriesRunEvents
|
|
33722
|
+
};
|
|
33723
|
+
if (input.events != null) return {
|
|
33724
|
+
kind: "loaded",
|
|
33725
|
+
events: input.events
|
|
33726
|
+
};
|
|
33727
|
+
return {
|
|
33728
|
+
kind: "unresolved",
|
|
33729
|
+
request: parseEventLoaderRecoveryRequest(input.failures?.wholeSeriesRunEvents ?? input.failures?.events)
|
|
33730
|
+
};
|
|
33731
|
+
}
|
|
33732
|
+
function parseEventLoaderRecoveryRequest(value) {
|
|
33733
|
+
const parsed = eventLoaderFailureSchema.safeParse(value);
|
|
33734
|
+
if (!parsed.success) return null;
|
|
33735
|
+
const { siteId: _siteId, stage, ...params } = parsed.data.params;
|
|
33736
|
+
return {
|
|
33737
|
+
...params,
|
|
33738
|
+
stage: stage ?? "published"
|
|
33739
|
+
};
|
|
33740
|
+
}
|
|
33741
|
+
var _rawLimit, _rawEventSurface, _rawScheduleScope, _rawDetailLevel, stringEventQueryShape, eventRecoveryRequestSchema, eventLoaderFailureSchema;
|
|
33742
|
+
var init_eventSourceRecovery = __esmMin((() => {
|
|
33743
|
+
init_schemas();
|
|
33744
|
+
init_filtering();
|
|
33745
|
+
({limit: _rawLimit, eventSurface: _rawEventSurface, scheduleScope: _rawScheduleScope, detailLevel: _rawDetailLevel, ...stringEventQueryShape} = publicEventLoaderQuerySchemaShape);
|
|
33746
|
+
eventRecoveryRequestSchema = z.object({
|
|
33747
|
+
...stringEventQueryShape,
|
|
33748
|
+
limit: z.coerce.number().int().positive().optional(),
|
|
33749
|
+
eventSurface: z.enum(eventSurfaceScopeValues).optional(),
|
|
33750
|
+
scheduleScope: z.enum(eventScheduleScopeValues).optional(),
|
|
33751
|
+
detailLevel: z.enum(["full", "listing"]).optional(),
|
|
33752
|
+
stage: z.enum(["preview", "published"]).optional()
|
|
33753
|
+
});
|
|
33754
|
+
eventLoaderFailureSchema = z.object({
|
|
33755
|
+
endpoint: z.literal("listPublicEvents"),
|
|
33756
|
+
params: eventRecoveryRequestSchema.extend({ siteId: z.string().optional() })
|
|
33757
|
+
});
|
|
33758
|
+
}));
|
|
33759
|
+
//#endregion
|
|
33627
33760
|
//#region ../blocks/src/system/runtime/nodes/event-registration.interactive.ts
|
|
33628
33761
|
function buildEventRegistrationDisplayFromScopedEvents(source, scopedSourceEvents) {
|
|
33629
33762
|
const selectedRun = resolveSelectedWholeSeriesRun(scopedSourceEvents);
|
|
@@ -33672,16 +33805,12 @@ function buildEventRegistrationShellStepLabels(source, scopedSourceEvents) {
|
|
|
33672
33805
|
function toScopedEventRegistrationEvents(scopedSourceEvents) {
|
|
33673
33806
|
return [...toRegistrationEvents(scopedSourceEvents), ...toWholeSeriesRegistrationEvents(scopedSourceEvents)];
|
|
33674
33807
|
}
|
|
33675
|
-
function scopeEventRegistrationSourceEvents(source) {
|
|
33676
|
-
return resolveEventRegistrationScopedEvents(
|
|
33808
|
+
function scopeEventRegistrationSourceEvents(source, eventSource) {
|
|
33809
|
+
return resolveEventRegistrationScopedEvents(eventSource.kind === "loaded" ? eventSource.events : [], {
|
|
33677
33810
|
occurrenceContext: source.occurrenceContext,
|
|
33678
33811
|
subject: source.subject
|
|
33679
33812
|
});
|
|
33680
33813
|
}
|
|
33681
|
-
function resolveLoadedEventRegistrationSourceEvents(source, scopedSourceEvents) {
|
|
33682
|
-
if (source.events == null && source.wholeSeriesRunEvents == null) return null;
|
|
33683
|
-
return [...scopedSourceEvents];
|
|
33684
|
-
}
|
|
33685
33814
|
/**
|
|
33686
33815
|
* The one run this surface is registering for, when the scoped events describe
|
|
33687
33816
|
* exactly one. More than one run means the visitor still has to choose.
|
|
@@ -33738,7 +33867,7 @@ function buildEventRegistrationInteractiveIslandProps(props) {
|
|
|
33738
33867
|
source: props
|
|
33739
33868
|
});
|
|
33740
33869
|
}
|
|
33741
|
-
var EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS, EVENT_REGISTRATION_SHELL_STEP_LABELS, eventRegistrationPublicEventSchema, eventRegistrationHydrationSchemaShape, eventRegistrationSourceSchema, eventRegistrationDisplaySchema, eventRegistrationHydrationSchema, eventRegistrationRenderSchema, eventRegistrationIslandMetaCodec, eventRegistrationIslandMetaKeys, eventRegistrationBlockRuntime, eventRegistrationInteractiveIslandPropsCodec;
|
|
33870
|
+
var EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS, EVENT_REGISTRATION_SHELL_STEP_LABELS, eventRegistrationPublicEventSchema, eventRegistrationHydrationSchemaShape, eventRegistrationEventSourceSchema, eventRegistrationSourceSchema, eventRegistrationDisplaySchema, eventRegistrationHydrationSchema, eventRegistrationRenderSchema, eventRegistrationIslandMetaCodec, eventRegistrationIslandMetaKeys, eventRegistrationBlockRuntime, eventRegistrationInteractiveIslandPropsCodec;
|
|
33742
33871
|
var init_event_registration_interactive = __esmMin((() => {
|
|
33743
33872
|
init_schemas();
|
|
33744
33873
|
init_runGrouping();
|
|
@@ -33752,6 +33881,7 @@ var init_event_registration_interactive = __esmMin((() => {
|
|
|
33752
33881
|
init_wizardSteps$1();
|
|
33753
33882
|
init_registrationDerivations();
|
|
33754
33883
|
init_registrationEventAdapter();
|
|
33884
|
+
init_eventSourceRecovery();
|
|
33755
33885
|
EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS = [
|
|
33756
33886
|
"Date",
|
|
33757
33887
|
"Tickets",
|
|
@@ -33768,8 +33898,6 @@ var init_event_registration_interactive = __esmMin((() => {
|
|
|
33768
33898
|
eventRegistrationHydrationSchemaShape = {
|
|
33769
33899
|
occurrenceContext: occurrenceContextSchema.optional(),
|
|
33770
33900
|
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
33771
|
-
events: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
33772
|
-
wholeSeriesRunEvents: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
33773
33901
|
maxTickets: z.string().optional(),
|
|
33774
33902
|
showVenue: z.boolean().optional(),
|
|
33775
33903
|
showCapacity: z.boolean().optional(),
|
|
@@ -33781,12 +33909,22 @@ var init_event_registration_interactive = __esmMin((() => {
|
|
|
33781
33909
|
sitePasses: publicPassProductCollectionSchema.nullable().optional(),
|
|
33782
33910
|
siteMemberships: publicMembershipProductCollectionSchema.nullable().optional()
|
|
33783
33911
|
};
|
|
33912
|
+
eventRegistrationEventSourceSchema = z.discriminatedUnion("kind", [z.object({
|
|
33913
|
+
kind: z.literal("loaded"),
|
|
33914
|
+
events: z.array(eventRegistrationPublicEventSchema)
|
|
33915
|
+
}), z.object({
|
|
33916
|
+
kind: z.literal("unresolved"),
|
|
33917
|
+
request: eventRecoveryRequestSchema.nullable()
|
|
33918
|
+
})]);
|
|
33784
33919
|
eventRegistrationSourceSchema = z.object({
|
|
33785
33920
|
siteId: z.string().optional(),
|
|
33786
33921
|
apiBaseUrl: z.string().optional(),
|
|
33787
33922
|
portalToken: z.string().nullable().optional(),
|
|
33788
33923
|
previewToken: z.string().nullable().optional(),
|
|
33789
33924
|
...eventRegistrationHydrationSchemaShape,
|
|
33925
|
+
events: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
33926
|
+
wholeSeriesRunEvents: z.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
33927
|
+
eventLoaderFailures: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
33790
33928
|
className: z.string().nullable().optional(),
|
|
33791
33929
|
buttonText: z.string().nullable().optional(),
|
|
33792
33930
|
maxTickets: z.string().nullable().optional(),
|
|
@@ -33807,7 +33945,10 @@ var init_event_registration_interactive = __esmMin((() => {
|
|
|
33807
33945
|
titleText: z.string(),
|
|
33808
33946
|
bodyText: z.string()
|
|
33809
33947
|
})]);
|
|
33810
|
-
eventRegistrationHydrationSchema = z.object(
|
|
33948
|
+
eventRegistrationHydrationSchema = z.object({
|
|
33949
|
+
...eventRegistrationHydrationSchemaShape,
|
|
33950
|
+
eventSource: eventRegistrationEventSourceSchema
|
|
33951
|
+
});
|
|
33811
33952
|
eventRegistrationRenderSchema = z.object({
|
|
33812
33953
|
display: eventRegistrationDisplaySchema,
|
|
33813
33954
|
hydration: eventRegistrationHydrationSchema
|
|
@@ -33827,14 +33968,21 @@ var init_event_registration_interactive = __esmMin((() => {
|
|
|
33827
33968
|
render: createZodCodec(eventRegistrationRenderSchema)
|
|
33828
33969
|
},
|
|
33829
33970
|
buildRender: (source) => {
|
|
33830
|
-
const
|
|
33831
|
-
|
|
33971
|
+
const eventSource = resolveEventRegistrationEventSource({
|
|
33972
|
+
events: source.events,
|
|
33973
|
+
wholeSeriesRunEvents: source.wholeSeriesRunEvents,
|
|
33974
|
+
failures: source.eventLoaderFailures
|
|
33975
|
+
});
|
|
33976
|
+
const scopedSourceEvents = scopeEventRegistrationSourceEvents(source, eventSource);
|
|
33832
33977
|
return {
|
|
33833
33978
|
display: buildEventRegistrationDisplayFromScopedEvents(source, scopedSourceEvents),
|
|
33834
33979
|
hydration: {
|
|
33835
33980
|
occurrenceContext: source.occurrenceContext ?? null,
|
|
33836
33981
|
subject: source.subject ?? null,
|
|
33837
|
-
|
|
33982
|
+
eventSource: eventSource.kind === "loaded" ? {
|
|
33983
|
+
...eventSource,
|
|
33984
|
+
events: [...scopedSourceEvents]
|
|
33985
|
+
} : eventSource,
|
|
33838
33986
|
maxTickets: source.maxTickets ?? void 0,
|
|
33839
33987
|
showVenue: source.showVenue,
|
|
33840
33988
|
showCapacity: source.showCapacity,
|
|
@@ -34026,6 +34174,7 @@ const eventRegistrationBlockDefinition = {
|
|
|
34026
34174
|
} },
|
|
34027
34175
|
events: { $bind: { from: "data.events" } },
|
|
34028
34176
|
wholeSeriesRunEvents: { $bind: { from: "data.wholeSeriesRunEvents" } },
|
|
34177
|
+
loaderFailures: { $bind: { from: "$root.loaderFailures" } },
|
|
34029
34178
|
sitePasses: { $bind: { from: "data.sitePasses" } },
|
|
34030
34179
|
siteMemberships: { $bind: { from: "data.siteMemberships" } },
|
|
34031
34180
|
stage: { $bind: {
|
|
@@ -34374,6 +34523,66 @@ const formBlockDefinition = {
|
|
|
34374
34523
|
runtime: formBlockRuntime
|
|
34375
34524
|
};
|
|
34376
34525
|
//#endregion
|
|
34526
|
+
//#region ../blocks/src/system/blocks/events/eventSelectionFields.ts
|
|
34527
|
+
init_schema();
|
|
34528
|
+
const eventSelectionFields = [{
|
|
34529
|
+
id: "eventSelection",
|
|
34530
|
+
type: "select",
|
|
34531
|
+
label: "Events to show",
|
|
34532
|
+
required: false,
|
|
34533
|
+
multiple: false,
|
|
34534
|
+
defaultValue: "matching",
|
|
34535
|
+
options: [{
|
|
34536
|
+
value: "matching",
|
|
34537
|
+
label: "All matching events"
|
|
34538
|
+
}, {
|
|
34539
|
+
value: "selected",
|
|
34540
|
+
label: "Selected events"
|
|
34541
|
+
}],
|
|
34542
|
+
ui: { intent: "behavior" }
|
|
34543
|
+
}, createSiteOptionSelectField({
|
|
34544
|
+
id: "selectedEventSeriesIds",
|
|
34545
|
+
label: "Selected events",
|
|
34546
|
+
description: "Show upcoming dates for these events. Other event filters do not apply.",
|
|
34547
|
+
required: false,
|
|
34548
|
+
multiple: true,
|
|
34549
|
+
defaultValue: [],
|
|
34550
|
+
optionSource: "eventSeries",
|
|
34551
|
+
ui: {
|
|
34552
|
+
intent: "behavior",
|
|
34553
|
+
searchThreshold: 1,
|
|
34554
|
+
visibleWhen: {
|
|
34555
|
+
field: "eventSelection",
|
|
34556
|
+
equals: "selected"
|
|
34557
|
+
}
|
|
34558
|
+
}
|
|
34559
|
+
})];
|
|
34560
|
+
function withEventSelectionVisibility(field) {
|
|
34561
|
+
if (![
|
|
34562
|
+
"eventSurface",
|
|
34563
|
+
"filterEventPresets",
|
|
34564
|
+
"scheduleScope",
|
|
34565
|
+
"filterCategoryIds",
|
|
34566
|
+
"filterStaffMemberId",
|
|
34567
|
+
"filterVenueId",
|
|
34568
|
+
"showFilters",
|
|
34569
|
+
"showCategoryFilter",
|
|
34570
|
+
"showVenueFilter",
|
|
34571
|
+
"showStaffFilter"
|
|
34572
|
+
].includes(field.id)) return field;
|
|
34573
|
+
const visibleWhen = field.ui?.visibleWhen;
|
|
34574
|
+
return {
|
|
34575
|
+
...field,
|
|
34576
|
+
ui: {
|
|
34577
|
+
...field.ui,
|
|
34578
|
+
visibleWhen: { allOf: [{
|
|
34579
|
+
field: "eventSelection",
|
|
34580
|
+
notEquals: "selected"
|
|
34581
|
+
}, ...visibleWhen ? [visibleWhen] : []] }
|
|
34582
|
+
}
|
|
34583
|
+
};
|
|
34584
|
+
}
|
|
34585
|
+
//#endregion
|
|
34377
34586
|
//#region ../blocks/src/system/runtime/nodes/events/EventCalendar.interactive.ts
|
|
34378
34587
|
/**
|
|
34379
34588
|
* Collapse an optional/blank string to `undefined` so downstream week-board
|
|
@@ -34425,6 +34634,7 @@ function buildEventCalendarListingRender(render, className = render.display.clas
|
|
|
34425
34634
|
eventSurface: display.eventSurface,
|
|
34426
34635
|
filterEventPresets: display.filterEventPresets,
|
|
34427
34636
|
scheduleScope: display.scheduleScope,
|
|
34637
|
+
seriesIds: display.seriesIds,
|
|
34428
34638
|
filterCategoryIds: display.filterCategoryIds,
|
|
34429
34639
|
filterStaffMemberId: display.filterStaffMemberId,
|
|
34430
34640
|
filterVenueId: display.filterVenueId,
|
|
@@ -34517,19 +34727,59 @@ init_EventCalendar_interactive();
|
|
|
34517
34727
|
init_calendarWindow();
|
|
34518
34728
|
const scopeParams = {
|
|
34519
34729
|
siteId: { $bind: { from: "$root.siteId" } },
|
|
34730
|
+
seriesIds: { $bind: {
|
|
34731
|
+
from: "content",
|
|
34732
|
+
transforms: [{
|
|
34733
|
+
id: "events.calendarSelectionParam",
|
|
34734
|
+
options: { key: "seriesIds" }
|
|
34735
|
+
}]
|
|
34736
|
+
} },
|
|
34520
34737
|
stage: { $bind: {
|
|
34521
34738
|
from: "$root.previewStage",
|
|
34522
34739
|
fallback: "published"
|
|
34523
34740
|
} },
|
|
34524
|
-
eventSurface: { $bind: {
|
|
34741
|
+
eventSurface: { $bind: {
|
|
34742
|
+
from: "content",
|
|
34743
|
+
transforms: [{
|
|
34744
|
+
id: "events.calendarSelectionParam",
|
|
34745
|
+
options: { key: "eventSurface" }
|
|
34746
|
+
}, { id: "value.csv" }]
|
|
34747
|
+
} },
|
|
34525
34748
|
eventPresets: { $bind: {
|
|
34526
|
-
from: "content
|
|
34527
|
-
transforms: [{
|
|
34749
|
+
from: "content",
|
|
34750
|
+
transforms: [{
|
|
34751
|
+
id: "events.calendarSelectionParam",
|
|
34752
|
+
options: { key: "filterEventPresets" }
|
|
34753
|
+
}, { id: "value.csv" }]
|
|
34528
34754
|
} },
|
|
34529
|
-
scheduleScope: { $bind: {
|
|
34530
|
-
|
|
34531
|
-
|
|
34532
|
-
|
|
34755
|
+
scheduleScope: { $bind: {
|
|
34756
|
+
from: "content",
|
|
34757
|
+
transforms: [{
|
|
34758
|
+
id: "events.calendarSelectionParam",
|
|
34759
|
+
options: { key: "scheduleScope" }
|
|
34760
|
+
}, { id: "value.csv" }]
|
|
34761
|
+
} },
|
|
34762
|
+
categoryIds: { $bind: {
|
|
34763
|
+
from: "content",
|
|
34764
|
+
transforms: [{
|
|
34765
|
+
id: "events.calendarSelectionParam",
|
|
34766
|
+
options: { key: "filterCategoryIds" }
|
|
34767
|
+
}, { id: "value.csv" }]
|
|
34768
|
+
} },
|
|
34769
|
+
staffMemberId: { $bind: {
|
|
34770
|
+
from: "content",
|
|
34771
|
+
transforms: [{
|
|
34772
|
+
id: "events.calendarSelectionParam",
|
|
34773
|
+
options: { key: "filterStaffMemberId" }
|
|
34774
|
+
}, { id: "value.csv" }]
|
|
34775
|
+
} },
|
|
34776
|
+
venueId: { $bind: {
|
|
34777
|
+
from: "content",
|
|
34778
|
+
transforms: [{
|
|
34779
|
+
id: "events.calendarSelectionParam",
|
|
34780
|
+
options: { key: "filterVenueId" }
|
|
34781
|
+
}, { id: "value.csv" }]
|
|
34782
|
+
} }
|
|
34533
34783
|
};
|
|
34534
34784
|
/** Combined renders two jobs; calendar-only variants never pay for the list seed. */
|
|
34535
34785
|
const eventCalendarDataLoaders = {
|
|
@@ -34669,6 +34919,13 @@ const eventCalendarLayout = [styledSection({
|
|
|
34669
34919
|
from: "content.defaultCalendarView",
|
|
34670
34920
|
fallback: "month"
|
|
34671
34921
|
} },
|
|
34922
|
+
seriesIds: { $bind: {
|
|
34923
|
+
from: "content",
|
|
34924
|
+
transforms: [{
|
|
34925
|
+
id: "events.calendarSelectionParam",
|
|
34926
|
+
options: { key: "seriesIds" }
|
|
34927
|
+
}]
|
|
34928
|
+
} },
|
|
34672
34929
|
showFilters: { $bind: {
|
|
34673
34930
|
from: "content.showFilters",
|
|
34674
34931
|
fallback: true
|
|
@@ -34690,17 +34947,47 @@ const eventCalendarLayout = [styledSection({
|
|
|
34690
34947
|
fallback: true
|
|
34691
34948
|
} },
|
|
34692
34949
|
eventSurface: { $bind: {
|
|
34693
|
-
from: "content
|
|
34694
|
-
|
|
34950
|
+
from: "content",
|
|
34951
|
+
transforms: [{
|
|
34952
|
+
id: "events.calendarSelectionParam",
|
|
34953
|
+
options: { key: "eventSurface" }
|
|
34954
|
+
}]
|
|
34955
|
+
} },
|
|
34956
|
+
filterEventPresets: { $bind: {
|
|
34957
|
+
from: "content",
|
|
34958
|
+
transforms: [{
|
|
34959
|
+
id: "events.calendarSelectionParam",
|
|
34960
|
+
options: { key: "filterEventPresets" }
|
|
34961
|
+
}]
|
|
34695
34962
|
} },
|
|
34696
|
-
filterEventPresets: { $bind: { from: "content.filterEventPresets" } },
|
|
34697
34963
|
scheduleScope: { $bind: {
|
|
34698
|
-
from: "content
|
|
34699
|
-
|
|
34964
|
+
from: "content",
|
|
34965
|
+
transforms: [{
|
|
34966
|
+
id: "events.calendarSelectionParam",
|
|
34967
|
+
options: { key: "scheduleScope" }
|
|
34968
|
+
}]
|
|
34969
|
+
} },
|
|
34970
|
+
filterCategoryIds: { $bind: {
|
|
34971
|
+
from: "content",
|
|
34972
|
+
transforms: [{
|
|
34973
|
+
id: "events.calendarSelectionParam",
|
|
34974
|
+
options: { key: "filterCategoryIds" }
|
|
34975
|
+
}]
|
|
34976
|
+
} },
|
|
34977
|
+
filterStaffMemberId: { $bind: {
|
|
34978
|
+
from: "content",
|
|
34979
|
+
transforms: [{
|
|
34980
|
+
id: "events.calendarSelectionParam",
|
|
34981
|
+
options: { key: "filterStaffMemberId" }
|
|
34982
|
+
}]
|
|
34983
|
+
} },
|
|
34984
|
+
filterVenueId: { $bind: {
|
|
34985
|
+
from: "content",
|
|
34986
|
+
transforms: [{
|
|
34987
|
+
id: "events.calendarSelectionParam",
|
|
34988
|
+
options: { key: "filterVenueId" }
|
|
34989
|
+
}]
|
|
34700
34990
|
} },
|
|
34701
|
-
filterCategoryIds: { $bind: { from: "content.filterCategoryIds" } },
|
|
34702
|
-
filterStaffMemberId: { $bind: { from: "content.filterStaffMemberId" } },
|
|
34703
|
-
filterVenueId: { $bind: { from: "content.filterVenueId" } },
|
|
34704
34991
|
cardRole: { $bind: {
|
|
34705
34992
|
from: "content._cardStyles.role",
|
|
34706
34993
|
fallback: "default"
|
|
@@ -35204,6 +35491,7 @@ const eventCalendarAdditionalFields = [
|
|
|
35204
35491
|
}
|
|
35205
35492
|
}
|
|
35206
35493
|
},
|
|
35494
|
+
...eventSelectionFields,
|
|
35207
35495
|
{
|
|
35208
35496
|
id: "eventSurface",
|
|
35209
35497
|
type: "select",
|
|
@@ -35413,7 +35701,7 @@ const eventCalendarBlockDefinition = {
|
|
|
35413
35701
|
titleSource: "heading",
|
|
35414
35702
|
description: "Display events with calendar, list, or combined views with filtering",
|
|
35415
35703
|
skipSectionStyles: true,
|
|
35416
|
-
additionalFields: eventCalendarAdditionalFields,
|
|
35704
|
+
additionalFields: eventCalendarAdditionalFields.map(withEventSelectionVisibility),
|
|
35417
35705
|
styleTokens: {
|
|
35418
35706
|
background: "surface",
|
|
35419
35707
|
typography: "body",
|
|
@@ -35479,6 +35767,7 @@ function buildEventListingInteractiveIslandProps(props) {
|
|
|
35479
35767
|
}
|
|
35480
35768
|
var cardOrientationSchema, eventSurfaceScopeSchema, eventScheduleScopeSchema, eventListingSourceSchema, eventListingDisplaySchema, eventListingHydrationSchema, eventListingRenderSchema, eventListingIslandMetaCodec, eventListingBlockRuntime, eventListingIslandMetaKeys, eventListingInteractiveIslandPropsCodec;
|
|
35481
35769
|
var init_EventListing_interactive = __esmMin((() => {
|
|
35770
|
+
init_eventSelection();
|
|
35482
35771
|
init_cards();
|
|
35483
35772
|
init_schemas();
|
|
35484
35773
|
init_shared$2();
|
|
@@ -35545,6 +35834,7 @@ var init_EventListing_interactive = __esmMin((() => {
|
|
|
35545
35834
|
eventSurface: eventSurfaceScopeSchema,
|
|
35546
35835
|
filterEventPresets: z.string().nullable(),
|
|
35547
35836
|
scheduleScope: eventScheduleScopeSchema,
|
|
35837
|
+
seriesIds: z.string().nullable().optional(),
|
|
35548
35838
|
filterCategoryIds: z.string().nullable().optional(),
|
|
35549
35839
|
filterStaffMemberId: z.string().nullable().optional(),
|
|
35550
35840
|
filterVenueId: z.string().nullable().optional(),
|
|
@@ -35605,6 +35895,7 @@ var init_EventListing_interactive = __esmMin((() => {
|
|
|
35605
35895
|
eventSurface: normalizeEventSurfaceScope(source.eventSurface),
|
|
35606
35896
|
filterEventPresets: normalizeEventSurfacePresetsCsv(source.filterEventPresets),
|
|
35607
35897
|
scheduleScope: normalizeEventScheduleScope(source.scheduleScope),
|
|
35898
|
+
seriesIds: eventSeriesScopeCsv(source.seriesIds),
|
|
35608
35899
|
filterCategoryIds: normalizeEventCategoryIdsCsv(source.filterCategoryIds),
|
|
35609
35900
|
filterStaffMemberId: normalizeEventStaffMemberId(source.filterStaffMemberId),
|
|
35610
35901
|
filterVenueId: normalizeEventVenueId(source.filterVenueId),
|
|
@@ -36096,6 +36387,7 @@ function buildNewsletterDisplay(source) {
|
|
|
36096
36387
|
fields: { preset: "emailOnly" },
|
|
36097
36388
|
includeOptionalPhone: false,
|
|
36098
36389
|
buttonLabel: "Subscribe",
|
|
36390
|
+
successMessage: DEFAULT_MAILING_LIST_SUCCESS_MESSAGE,
|
|
36099
36391
|
privacyNote: null
|
|
36100
36392
|
};
|
|
36101
36393
|
const targeting = source.targeting ?? { mode: "default" };
|
|
@@ -36105,6 +36397,7 @@ function buildNewsletterDisplay(source) {
|
|
|
36105
36397
|
availability: runtimeTargetingIsAvailable(context, targeting, choices) ? "ready" : "unavailable",
|
|
36106
36398
|
className: source.className ?? null,
|
|
36107
36399
|
buttonLabel: form.buttonLabel,
|
|
36400
|
+
successMessage: form.successMessage,
|
|
36108
36401
|
buttonVariant: source.buttonVariant ?? "primary",
|
|
36109
36402
|
privacyNote: form.privacyNote,
|
|
36110
36403
|
fields: getGlobalFormFields(form),
|
|
@@ -36114,7 +36407,7 @@ function buildNewsletterDisplay(source) {
|
|
|
36114
36407
|
function projectNewsletterFormHydrationTarget(source) {
|
|
36115
36408
|
switch (source.source) {
|
|
36116
36409
|
case "block": {
|
|
36117
|
-
const sourceRef = buildMailingListSignupBlockSourceRef(source.blockId);
|
|
36410
|
+
const sourceRef = buildMailingListSignupBlockSourceRef(source.blockId, source.contentVersionId);
|
|
36118
36411
|
if (sourceRef?.tag === "block_ref") return {
|
|
36119
36412
|
tag: "block-source",
|
|
36120
36413
|
sourceRef
|
|
@@ -36214,7 +36507,7 @@ function parseRequiredMailingListSignedSourceToken(value) {
|
|
|
36214
36507
|
if (!parsed) throw new Error("Mailing-list signup signed source ref requires token");
|
|
36215
36508
|
return parsed;
|
|
36216
36509
|
}
|
|
36217
|
-
var newsletterButtonVariantSchema, mailingListContextSchema, mailingListTargetingSchema, newsletterFieldSchema, mailingListSignupBlockIdSchema, signedMailingListSourceTokenSchema, newsletterSourceCommonSchema, newsletterSourceSchema, newsletterDisplaySchema, newsletterHydrationSchema, newsletterRenderSchema, newsletterIslandMetaCodec, newsletterIslandMetaKeys, newsletterFormBlockRuntime, newsletterFormInteractiveIslandPropsCodec;
|
|
36510
|
+
var newsletterButtonVariantSchema, mailingListContextSchema, mailingListTargetingSchema, newsletterFieldSchema, mailingListSignupBlockIdSchema, mailingListContentVersionIdSchema, signedMailingListSourceTokenSchema, newsletterSourceCommonSchema, newsletterSourceSchema, newsletterDisplaySchema, newsletterHydrationSchema, newsletterRenderSchema, newsletterIslandMetaCodec, newsletterIslandMetaKeys, newsletterFormBlockRuntime, newsletterFormInteractiveIslandPropsCodec;
|
|
36218
36511
|
var init_newsletter_form_interactive = __esmMin((() => {
|
|
36219
36512
|
init_src$2();
|
|
36220
36513
|
init_islands();
|
|
@@ -36252,6 +36545,15 @@ var init_newsletter_form_interactive = __esmMin((() => {
|
|
|
36252
36545
|
placeholder: z.string().optional()
|
|
36253
36546
|
});
|
|
36254
36547
|
mailingListSignupBlockIdSchema = z.string().trim().min(1).transform(parseRequiredMailingListSignupBlockId);
|
|
36548
|
+
mailingListContentVersionIdSchema = z.string().transform((value, ctx) => {
|
|
36549
|
+
const parsed = parseMailingListContentVersionId(value);
|
|
36550
|
+
if (parsed) return parsed;
|
|
36551
|
+
ctx.addIssue({
|
|
36552
|
+
code: z.ZodIssueCode.custom,
|
|
36553
|
+
message: "Invalid mailing-list content version ID"
|
|
36554
|
+
});
|
|
36555
|
+
return z.NEVER;
|
|
36556
|
+
});
|
|
36255
36557
|
signedMailingListSourceTokenSchema = z.string().trim().min(1).transform(parseRequiredMailingListSignedSourceToken);
|
|
36256
36558
|
newsletterSourceCommonSchema = z.object({
|
|
36257
36559
|
siteId: z.string().optional(),
|
|
@@ -36265,7 +36567,8 @@ var init_newsletter_form_interactive = __esmMin((() => {
|
|
|
36265
36567
|
newsletterSourceSchema = z.discriminatedUnion("source", [
|
|
36266
36568
|
newsletterSourceCommonSchema.extend({
|
|
36267
36569
|
source: z.literal("block"),
|
|
36268
|
-
blockId: z.string().nullable().optional()
|
|
36570
|
+
blockId: z.string().nullable().optional(),
|
|
36571
|
+
contentVersionId: z.string().nullable().optional()
|
|
36269
36572
|
}),
|
|
36270
36573
|
newsletterSourceCommonSchema.extend({
|
|
36271
36574
|
source: z.literal("signed-footer"),
|
|
@@ -36281,6 +36584,7 @@ var init_newsletter_form_interactive = __esmMin((() => {
|
|
|
36281
36584
|
availability: z.enum(["ready", "unavailable"]),
|
|
36282
36585
|
className: z.string().nullable(),
|
|
36283
36586
|
buttonLabel: z.string(),
|
|
36587
|
+
successMessage: z.string(),
|
|
36284
36588
|
buttonVariant: newsletterButtonVariantSchema,
|
|
36285
36589
|
privacyNote: z.string().nullable(),
|
|
36286
36590
|
fields: z.array(newsletterFieldSchema),
|
|
@@ -36295,7 +36599,8 @@ var init_newsletter_form_interactive = __esmMin((() => {
|
|
|
36295
36599
|
tag: z.literal("block-source"),
|
|
36296
36600
|
sourceRef: z.object({
|
|
36297
36601
|
tag: z.literal("block_ref"),
|
|
36298
|
-
blockId: mailingListSignupBlockIdSchema
|
|
36602
|
+
blockId: mailingListSignupBlockIdSchema,
|
|
36603
|
+
contentVersionId: mailingListContentVersionIdSchema
|
|
36299
36604
|
}).nullable()
|
|
36300
36605
|
}),
|
|
36301
36606
|
z.object({
|
|
@@ -38728,9 +39033,10 @@ function cx(...classes) {
|
|
|
38728
39033
|
* Server-safe placeholder for event registration.
|
|
38729
39034
|
* Provides a static container for island hydration without importing client hooks.
|
|
38730
39035
|
*/
|
|
38731
|
-
function EventRegistrationSSR({ blockId, subject, children, ...sourceProps }) {
|
|
39036
|
+
function EventRegistrationSSR({ blockId, subject, loaderFailures, children, ...sourceProps }) {
|
|
38732
39037
|
const islandProps = buildEventRegistrationInteractiveIslandProps({
|
|
38733
39038
|
...sourceProps,
|
|
39039
|
+
eventLoaderFailures: blockId ? loaderFailures?.[blockId] : void 0,
|
|
38734
39040
|
subject: normalizeEventRegistrationPageSurfaceSubject(subject)
|
|
38735
39041
|
});
|
|
38736
39042
|
const display = islandProps.render.display;
|
|
@@ -39071,7 +39377,7 @@ function NewsletterFormSSR(props) {
|
|
|
39071
39377
|
className: clsx("newsletter-form-ssr", className),
|
|
39072
39378
|
children: /* @__PURE__ */ jsx("p", {
|
|
39073
39379
|
role: "status",
|
|
39074
|
-
children: "
|
|
39380
|
+
children: "We can’t accept signups right now. Please try again later."
|
|
39075
39381
|
})
|
|
39076
39382
|
});
|
|
39077
39383
|
const renderField = (field) => {
|
|
@@ -39117,14 +39423,18 @@ function NewsletterFormSSR(props) {
|
|
|
39117
39423
|
children: [
|
|
39118
39424
|
fields.map(renderField),
|
|
39119
39425
|
islandProps.render.hydration.choicePresentation === "visitor_choice" ? /* @__PURE__ */ jsxs("fieldset", {
|
|
39120
|
-
className: "newsletter-topics",
|
|
39121
|
-
children: [/* @__PURE__ */ jsx("legend", {
|
|
39122
|
-
className: "
|
|
39426
|
+
className: "fb-fieldset newsletter-topics",
|
|
39427
|
+
children: [/* @__PURE__ */ jsx("legend", {
|
|
39428
|
+
className: "form-label",
|
|
39429
|
+
children: "What would you like to hear about?"
|
|
39430
|
+
}), display.choices.map((choice) => /* @__PURE__ */ jsxs("label", {
|
|
39431
|
+
className: "fb-inline form-label newsletter-topic-choice",
|
|
39123
39432
|
children: [/* @__PURE__ */ jsx("input", {
|
|
39124
39433
|
type: "checkbox",
|
|
39125
39434
|
name: "mailingListChoice",
|
|
39126
|
-
value: choice.id
|
|
39127
|
-
|
|
39435
|
+
value: choice.id,
|
|
39436
|
+
className: "form-checkbox"
|
|
39437
|
+
}), /* @__PURE__ */ jsx("span", { children: choice.label })]
|
|
39128
39438
|
}, choice.id))]
|
|
39129
39439
|
}) : null,
|
|
39130
39440
|
/* @__PURE__ */ jsx("div", {
|
|
@@ -42500,10 +42810,14 @@ function buildDiscountAvailabilityRequestPlan(options) {
|
|
|
42500
42810
|
}
|
|
42501
42811
|
};
|
|
42502
42812
|
}
|
|
42503
|
-
function discountAvailabilityStateFromResponse(response) {
|
|
42504
|
-
if (!discountAvailabilityHasDiscounts(response)) return {
|
|
42813
|
+
function discountAvailabilityStateFromResponse(requestKey, response) {
|
|
42814
|
+
if (!discountAvailabilityHasDiscounts(response)) return {
|
|
42815
|
+
tag: "unavailable",
|
|
42816
|
+
requestKey
|
|
42817
|
+
};
|
|
42505
42818
|
return {
|
|
42506
42819
|
tag: "available",
|
|
42820
|
+
requestKey,
|
|
42507
42821
|
manualCodeEntryAllowed: discountAvailabilityAllowsManualEntry(response),
|
|
42508
42822
|
autoAppliedDiscount: getAutoAppliedDiscountPreview(response)
|
|
42509
42823
|
};
|
|
@@ -42513,10 +42827,13 @@ function discountCodeUiReducer(state, event) {
|
|
|
42513
42827
|
case "availability-disabled": return initialDiscountCodeUiState;
|
|
42514
42828
|
case "availability-loading": return {
|
|
42515
42829
|
...state,
|
|
42516
|
-
availability: {
|
|
42830
|
+
availability: {
|
|
42831
|
+
tag: "loading",
|
|
42832
|
+
previous: state.availability.tag === "available" || state.availability.tag === "unavailable" ? state.availability : state.availability.tag === "loading" ? state.availability.previous : null
|
|
42833
|
+
}
|
|
42517
42834
|
};
|
|
42518
42835
|
case "availability-loaded": {
|
|
42519
|
-
const availability = discountAvailabilityStateFromResponse(event.response);
|
|
42836
|
+
const availability = discountAvailabilityStateFromResponse(event.requestKey, event.response);
|
|
42520
42837
|
if (availability.tag !== "available" || !availability.manualCodeEntryAllowed) return {
|
|
42521
42838
|
...state,
|
|
42522
42839
|
discountUiOpen: false,
|
|
@@ -42532,7 +42849,10 @@ function discountCodeUiReducer(state, event) {
|
|
|
42532
42849
|
...state,
|
|
42533
42850
|
discountUiOpen: false,
|
|
42534
42851
|
discountCode: "",
|
|
42535
|
-
availability: {
|
|
42852
|
+
availability: {
|
|
42853
|
+
tag: "error",
|
|
42854
|
+
requestKey: event.requestKey
|
|
42855
|
+
}
|
|
42536
42856
|
};
|
|
42537
42857
|
case "discount-code-changed": return {
|
|
42538
42858
|
...state,
|
|
@@ -42577,11 +42897,15 @@ function useDiscountCodeUi(options) {
|
|
|
42577
42897
|
if (cancelled) return;
|
|
42578
42898
|
dispatch({
|
|
42579
42899
|
type: "availability-loaded",
|
|
42900
|
+
requestKey: requestPlan.key,
|
|
42580
42901
|
response: res
|
|
42581
42902
|
});
|
|
42582
42903
|
} catch {
|
|
42583
42904
|
if (cancelled) return;
|
|
42584
|
-
dispatch({
|
|
42905
|
+
dispatch({
|
|
42906
|
+
type: "availability-failed",
|
|
42907
|
+
requestKey: requestPlan.key
|
|
42908
|
+
});
|
|
42585
42909
|
}
|
|
42586
42910
|
}
|
|
42587
42911
|
checkDiscountAvailability();
|
|
@@ -42590,8 +42914,9 @@ function useDiscountCodeUi(options) {
|
|
|
42590
42914
|
};
|
|
42591
42915
|
}, [options.api, requestPlan]);
|
|
42592
42916
|
const availability = state.availability;
|
|
42593
|
-
const
|
|
42594
|
-
const
|
|
42917
|
+
const settledAvailability = availability.tag === "loading" ? availability.previous : availability.tag === "available" || availability.tag === "unavailable" ? availability : null;
|
|
42918
|
+
const isAvailable = settledAvailability?.tag === "available";
|
|
42919
|
+
const manualCodeEntryAllowed = isAvailable ? settledAvailability.manualCodeEntryAllowed : false;
|
|
42595
42920
|
return {
|
|
42596
42921
|
discountUiOpen: state.discountUiOpen,
|
|
42597
42922
|
setDiscountUiOpen: (isOpen) => dispatch({
|
|
@@ -42605,8 +42930,10 @@ function useDiscountCodeUi(options) {
|
|
|
42605
42930
|
}),
|
|
42606
42931
|
discountsAvailable: isAvailable,
|
|
42607
42932
|
manualCodeEntryAllowed,
|
|
42608
|
-
autoAppliedDiscount: isAvailable ?
|
|
42609
|
-
discountsAvailableLoading: availability.tag === "loading"
|
|
42933
|
+
autoAppliedDiscount: isAvailable ? settledAvailability.autoAppliedDiscount : null,
|
|
42934
|
+
discountsAvailableLoading: availability.tag === "loading",
|
|
42935
|
+
discountAvailabilityRequestKey: requestPlan.key,
|
|
42936
|
+
settledDiscountAvailabilityRequestKey: availability.tag === "error" ? availability.requestKey : settledAvailability?.requestKey ?? null
|
|
42610
42937
|
};
|
|
42611
42938
|
}
|
|
42612
42939
|
var init_useDiscountCodeUi = __esmMin((() => {
|
|
@@ -45929,12 +46256,6 @@ var init_ActionRow = __esmMin((() => {
|
|
|
45929
46256
|
between: "rb-justify-between"
|
|
45930
46257
|
};
|
|
45931
46258
|
}));
|
|
45932
|
-
var init_BookingOptionCompactRow = __esmMin((() => {
|
|
45933
|
-
init_buttons();
|
|
45934
|
-
}));
|
|
45935
|
-
var init_BookingOptionList = __esmMin((() => {
|
|
45936
|
-
init_BookingOptionCompactRow();
|
|
45937
|
-
}));
|
|
45938
46259
|
//#endregion
|
|
45939
46260
|
//#region ../blocks/src/system/runtime/shared/components/LoggedInAsUser.tsx
|
|
45940
46261
|
/**
|
|
@@ -46163,8 +46484,6 @@ var init_components = __esmMin((() => {
|
|
|
46163
46484
|
init_CrossIcon();
|
|
46164
46485
|
init_DiscountCodeDisclosure();
|
|
46165
46486
|
init_ActionRow();
|
|
46166
|
-
init_BookingOptionCompactRow();
|
|
46167
|
-
init_BookingOptionList();
|
|
46168
46487
|
init_FieldValidationMessage();
|
|
46169
46488
|
init_FeedbackMessage();
|
|
46170
46489
|
init_LoggedInAsUser();
|
|
@@ -46730,6 +47049,93 @@ var init_event_registration_headless_state = __esmMin((() => {
|
|
|
46730
47049
|
init_event_registration_headless_planning();
|
|
46731
47050
|
}));
|
|
46732
47051
|
//#endregion
|
|
47052
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/checkoutRecovery.ts
|
|
47053
|
+
/** Recovery may select held places; checkout still owns admission and payment validation. */
|
|
47054
|
+
function checkoutRecoveryOptionAvailability(availability) {
|
|
47055
|
+
if (availability.kind === "available" || availability.reason === "sold_out" || availability.reason === "overallCapacityUnavailable") return {
|
|
47056
|
+
kind: "available",
|
|
47057
|
+
remainingPlaces: null
|
|
47058
|
+
};
|
|
47059
|
+
return availability;
|
|
47060
|
+
}
|
|
47061
|
+
/**
|
|
47062
|
+
* A form-only projection for the explicit existing-checkout path. It permits
|
|
47063
|
+
* collecting the original selection without claiming a new place is available.
|
|
47064
|
+
* The public checkout service identifies the customer and remains the admission
|
|
47065
|
+
* authority; no reservation/customer data is exposed through this projection.
|
|
47066
|
+
*/
|
|
47067
|
+
function getCheckoutRecoveryFormEligibility(eligibility) {
|
|
47068
|
+
if (!eligibility || eligibility.registration.kind !== "none" && eligibility.registration.kind !== "pending_payment" || eligibility.availability.kind === "unavailable" && eligibility.availability.reason !== "full" && eligibility.availability.reason !== "selectionRequired") return eligibility;
|
|
47069
|
+
const amountCents = eligibility.price ?? 0;
|
|
47070
|
+
if (amountCents <= 0 || !eligibility.currency || eligibility.availability.kind === "unavailable" && eligibility.availability.reason === "selectionRequired") return eligibility.registration.kind === "pending_payment" ? {
|
|
47071
|
+
...eligibility,
|
|
47072
|
+
registration: { kind: "none" },
|
|
47073
|
+
ticketTypes: eligibility.ticketTypes.map((option) => ({
|
|
47074
|
+
...option,
|
|
47075
|
+
availability: checkoutRecoveryOptionAvailability(option.availability)
|
|
47076
|
+
}))
|
|
47077
|
+
} : eligibility;
|
|
47078
|
+
const currency = eligibility.currency;
|
|
47079
|
+
const paymentOptions = eligibility.paymentTerms.allowedOptions.map((option) => {
|
|
47080
|
+
switch (option.kind) {
|
|
47081
|
+
case "upfront": return {
|
|
47082
|
+
kind: "payInFull",
|
|
47083
|
+
amountCents,
|
|
47084
|
+
currency
|
|
47085
|
+
};
|
|
47086
|
+
case "deferred_manual": return {
|
|
47087
|
+
kind: "deferredManual",
|
|
47088
|
+
amountCents,
|
|
47089
|
+
currency
|
|
47090
|
+
};
|
|
47091
|
+
case "instalment_plan": return {
|
|
47092
|
+
kind: "instalmentPlan",
|
|
47093
|
+
amountCents,
|
|
47094
|
+
currency
|
|
47095
|
+
};
|
|
47096
|
+
case "flexible_balance": return {
|
|
47097
|
+
kind: "flexibleBalance",
|
|
47098
|
+
amountCents,
|
|
47099
|
+
currency
|
|
47100
|
+
};
|
|
47101
|
+
}
|
|
47102
|
+
});
|
|
47103
|
+
return {
|
|
47104
|
+
...eligibility,
|
|
47105
|
+
registration: { kind: "none" },
|
|
47106
|
+
availability: {
|
|
47107
|
+
kind: "available",
|
|
47108
|
+
remainingPlaces: null,
|
|
47109
|
+
waitlistEnabled: eligibility.waitlistEnabled
|
|
47110
|
+
},
|
|
47111
|
+
eligible: paymentOptions.length > 0,
|
|
47112
|
+
isFull: false,
|
|
47113
|
+
canJoinWaitlist: false,
|
|
47114
|
+
isFree: false,
|
|
47115
|
+
requiresPayment: true,
|
|
47116
|
+
canPayDirectly: paymentOptions.length > 0,
|
|
47117
|
+
paymentOptions,
|
|
47118
|
+
eligiblePasses: [],
|
|
47119
|
+
eligibleMemberships: [],
|
|
47120
|
+
ticketTypes: eligibility.ticketTypes.map((option) => ({
|
|
47121
|
+
...option,
|
|
47122
|
+
availability: checkoutRecoveryOptionAvailability(option.availability)
|
|
47123
|
+
}))
|
|
47124
|
+
};
|
|
47125
|
+
}
|
|
47126
|
+
function isSoldOutEventSelectable(event, waitlistAvailable) {
|
|
47127
|
+
return waitlistAvailable || canRecoverEventCheckout(event);
|
|
47128
|
+
}
|
|
47129
|
+
function canJoinWaitlistOutsideRecovery(event, attendanceMode, checkoutRecovery) {
|
|
47130
|
+
return !checkoutRecovery && event !== null && canJoinEventWaitlist(event, { attendanceMode });
|
|
47131
|
+
}
|
|
47132
|
+
function canRecoverEventCheckout(event) {
|
|
47133
|
+
return event !== null && (event.registrationSubject.kind === "wholeSeries" || event.pricing.kind !== "free" && event.pricing.kind !== "external");
|
|
47134
|
+
}
|
|
47135
|
+
var init_checkoutRecovery = __esmMin((() => {
|
|
47136
|
+
init_domain();
|
|
47137
|
+
}));
|
|
47138
|
+
//#endregion
|
|
46733
47139
|
//#region ../blocks/src/system/runtime/nodes/event-registration/utils.ts
|
|
46734
47140
|
function getPortalSubjectEmail(profile) {
|
|
46735
47141
|
return profile?.email ?? null;
|
|
@@ -46901,6 +47307,7 @@ function getEventSelectionMode(events) {
|
|
|
46901
47307
|
}
|
|
46902
47308
|
var EventSelectionStep;
|
|
46903
47309
|
var init_EventSelectionStep = __esmMin((() => {
|
|
47310
|
+
init_checkoutRecovery();
|
|
46904
47311
|
init_utils();
|
|
46905
47312
|
init_domain();
|
|
46906
47313
|
EventSelectionStep = ({ events, selectedEvent, onSelect, showVenue, showCapacity }) => {
|
|
@@ -46917,7 +47324,7 @@ var init_EventSelectionStep = __esmMin((() => {
|
|
|
46917
47324
|
const remaining = getRemainingPlaces(selectMostOpenCapacitySource(event));
|
|
46918
47325
|
const isSoldOut = isEventFull(event);
|
|
46919
47326
|
const canJoinWaitlist = canJoinEventWaitlistOnAnyMode(event);
|
|
46920
|
-
const isUnavailable = isSoldOut && !canJoinWaitlist;
|
|
47327
|
+
const isUnavailable = isSoldOut && !isSoldOutEventSelectable(event, canJoinWaitlist);
|
|
46921
47328
|
const isLowCapacity = remaining.kind === "low";
|
|
46922
47329
|
const capacityLabel = formatEventRemainingPlaces(event, { full: "Sold out" });
|
|
46923
47330
|
const timeZone = event.timeZone ?? null;
|
|
@@ -46963,6 +47370,36 @@ var init_EventSelectionStep = __esmMin((() => {
|
|
|
46963
47370
|
};
|
|
46964
47371
|
}));
|
|
46965
47372
|
//#endregion
|
|
47373
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/useCheckoutRecovery.ts
|
|
47374
|
+
/** Recovery belongs to the selected booking subject; changing events resets its scope. */
|
|
47375
|
+
function useCheckoutRecovery(event, setStep) {
|
|
47376
|
+
const [recoveryEventId, setRecoveryEventId] = useState(null);
|
|
47377
|
+
return {
|
|
47378
|
+
checkoutRecovery: event !== null && recoveryEventId === event.selectionId,
|
|
47379
|
+
startCheckoutRecovery: useCallback(() => {
|
|
47380
|
+
if (!event) return;
|
|
47381
|
+
setRecoveryEventId(event.selectionId);
|
|
47382
|
+
setStep("select-tickets");
|
|
47383
|
+
}, [event, setStep])
|
|
47384
|
+
};
|
|
47385
|
+
}
|
|
47386
|
+
/** Authenticated pending bookings enter the same form-only recovery path as guests. */
|
|
47387
|
+
function useCheckoutRecoveryEligibility(eligibility, step, checkoutRecovery, startCheckoutRecovery) {
|
|
47388
|
+
const registrationKind = eligibility?.registration.kind;
|
|
47389
|
+
useEffect(() => {
|
|
47390
|
+
if ((step === "select-event" || step === "select-tickets" || step === "enter-details" || step === "select-payment") && registrationKind === "pending_payment" && !checkoutRecovery) startCheckoutRecovery();
|
|
47391
|
+
}, [
|
|
47392
|
+
registrationKind,
|
|
47393
|
+
step,
|
|
47394
|
+
checkoutRecovery,
|
|
47395
|
+
startCheckoutRecovery
|
|
47396
|
+
]);
|
|
47397
|
+
return useMemo(() => checkoutRecovery ? getCheckoutRecoveryFormEligibility(eligibility) : eligibility, [checkoutRecovery, eligibility]);
|
|
47398
|
+
}
|
|
47399
|
+
var init_useCheckoutRecovery = __esmMin((() => {
|
|
47400
|
+
init_checkoutRecovery();
|
|
47401
|
+
}));
|
|
47402
|
+
//#endregion
|
|
46966
47403
|
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationErrorRecovery.ts
|
|
46967
47404
|
function resolveRegistrationRecoveryAction(step, action) {
|
|
46968
47405
|
if (step === "payment-failed") return "payment-options";
|
|
@@ -47094,16 +47531,19 @@ function eligibilityLookupReducer(state, action) {
|
|
|
47094
47531
|
case "loading-started": return {
|
|
47095
47532
|
tag: "loading",
|
|
47096
47533
|
eligibility: state.eligibility,
|
|
47534
|
+
settledRequestKey: state.settledRequestKey,
|
|
47097
47535
|
error: null
|
|
47098
47536
|
};
|
|
47099
47537
|
case "resolved": return {
|
|
47100
47538
|
tag: "resolved",
|
|
47101
47539
|
eligibility: action.eligibility,
|
|
47540
|
+
settledRequestKey: action.requestKey,
|
|
47102
47541
|
error: null
|
|
47103
47542
|
};
|
|
47104
47543
|
case "failed": return {
|
|
47105
47544
|
tag: "failed",
|
|
47106
47545
|
eligibility: null,
|
|
47546
|
+
settledRequestKey: null,
|
|
47107
47547
|
error: action.message
|
|
47108
47548
|
};
|
|
47109
47549
|
default: return assertNever$11(action);
|
|
@@ -47129,6 +47569,7 @@ var init_hooks_state = __esmMin((() => {
|
|
|
47129
47569
|
initialEligibilityLookupState = {
|
|
47130
47570
|
tag: "idle",
|
|
47131
47571
|
eligibility: null,
|
|
47572
|
+
settledRequestKey: null,
|
|
47132
47573
|
error: null
|
|
47133
47574
|
};
|
|
47134
47575
|
initialExistingRegistrationLookupState = {
|
|
@@ -47208,9 +47649,23 @@ function toRegistrationOptionsSubject(subject, attendanceMode) {
|
|
|
47208
47649
|
function useEligibility(params) {
|
|
47209
47650
|
return useEligibilityWithDeps(params, eventRegistrationHooksDeps);
|
|
47210
47651
|
}
|
|
47652
|
+
function eligibilityRequestKey(params) {
|
|
47653
|
+
return JSON.stringify({
|
|
47654
|
+
enabled: params.enabled,
|
|
47655
|
+
refreshKey: params.refreshKey ?? 0,
|
|
47656
|
+
subject: params.subject,
|
|
47657
|
+
attendanceMode: params.attendanceMode ?? null,
|
|
47658
|
+
ticketSelections: params.ticketSelectionsKey,
|
|
47659
|
+
selectedSlidingAmount: params.selectedSlidingAmount ?? null
|
|
47660
|
+
});
|
|
47661
|
+
}
|
|
47211
47662
|
function useEligibilityWithDeps(params, deps) {
|
|
47212
47663
|
const api = deps.useBlockApi();
|
|
47213
47664
|
const ticketSelectionsKey = JSON.stringify(normalizeTicketSelectionLines(params.ticketSelections));
|
|
47665
|
+
const requestKey = eligibilityRequestKey({
|
|
47666
|
+
...params,
|
|
47667
|
+
ticketSelectionsKey
|
|
47668
|
+
});
|
|
47214
47669
|
const [state, dispatch] = useReducer(eligibilityLookupReducer, initialEligibilityLookupState);
|
|
47215
47670
|
const requestIdRef = useRef(0);
|
|
47216
47671
|
useEffect(() => {
|
|
@@ -47243,7 +47698,8 @@ function useEligibilityWithDeps(params, deps) {
|
|
|
47243
47698
|
if (cancelled || requestIdRef.current !== requestId) return;
|
|
47244
47699
|
dispatch({
|
|
47245
47700
|
type: "resolved",
|
|
47246
|
-
eligibility: transformRegistrationOptionsResponse(result)
|
|
47701
|
+
eligibility: transformRegistrationOptionsResponse(result),
|
|
47702
|
+
requestKey
|
|
47247
47703
|
});
|
|
47248
47704
|
} catch {
|
|
47249
47705
|
if (cancelled || requestIdRef.current !== requestId) return;
|
|
@@ -47272,6 +47728,8 @@ function useEligibilityWithDeps(params, deps) {
|
|
|
47272
47728
|
return {
|
|
47273
47729
|
state,
|
|
47274
47730
|
eligibility: state.eligibility,
|
|
47731
|
+
settledRequestKey: state.settledRequestKey,
|
|
47732
|
+
requestKey,
|
|
47275
47733
|
isLoading: state.tag === "loading",
|
|
47276
47734
|
error: state.error,
|
|
47277
47735
|
creditState
|
|
@@ -47835,6 +48293,10 @@ var init_event_registration_errors = __esmMin((() => {
|
|
|
47835
48293
|
message: "We’re checking your booking and payment. Please don’t try to book again yet. If you’ve already paid, you don’t need to pay again.",
|
|
47836
48294
|
action: "payment-status"
|
|
47837
48295
|
},
|
|
48296
|
+
paymentProviderUnavailable: {
|
|
48297
|
+
message: "We couldn’t reach the payment provider. Please try again in a minute.",
|
|
48298
|
+
action: "retry"
|
|
48299
|
+
},
|
|
47838
48300
|
paymentPageUnavailable: {
|
|
47839
48301
|
message: "We couldn’t open the payment page. Please refresh this page and try again. If this keeps happening, contact the organiser for help.",
|
|
47840
48302
|
action: "retry"
|
|
@@ -48020,11 +48482,6 @@ function ensureWaitlistClaimLocationTracking() {
|
|
|
48020
48482
|
} catch {}
|
|
48021
48483
|
window.addEventListener("popstate", emitWaitlistClaimLocationChange);
|
|
48022
48484
|
}
|
|
48023
|
-
function getWaitlistClaimTokenFromUrl() {
|
|
48024
|
-
if (typeof window === "undefined") return null;
|
|
48025
|
-
const token = new URLSearchParams(window.location.search).get("waitlist_claim")?.trim() ?? "";
|
|
48026
|
-
return token.length > 0 ? token : null;
|
|
48027
|
-
}
|
|
48028
48485
|
function subscribeToWaitlistClaimToken(callback) {
|
|
48029
48486
|
if (typeof window === "undefined") return () => {};
|
|
48030
48487
|
ensureWaitlistClaimLocationTracking();
|
|
@@ -48033,28 +48490,42 @@ function subscribeToWaitlistClaimToken(callback) {
|
|
|
48033
48490
|
window.removeEventListener(WAITLIST_CLAIM_LOCATION_EVENT, callback);
|
|
48034
48491
|
};
|
|
48035
48492
|
}
|
|
48036
|
-
function
|
|
48037
|
-
return
|
|
48493
|
+
function getWaitlistClaimLocationSnapshot() {
|
|
48494
|
+
return typeof window === "undefined" ? "" : window.location.search;
|
|
48495
|
+
}
|
|
48496
|
+
function parseWaitlistClaimCredential(search) {
|
|
48497
|
+
const params = new URLSearchParams(search);
|
|
48498
|
+
const token = params.get("waitlist_claim")?.trim();
|
|
48499
|
+
if (token) return {
|
|
48500
|
+
kind: "emailedToken",
|
|
48501
|
+
token
|
|
48502
|
+
};
|
|
48503
|
+
const entryId = params.get("waitlistEntry")?.trim();
|
|
48504
|
+
return entryId ? {
|
|
48505
|
+
kind: "portalOwnedEntry",
|
|
48506
|
+
entryId
|
|
48507
|
+
} : null;
|
|
48038
48508
|
}
|
|
48039
48509
|
function useWaitlistClaim() {
|
|
48040
48510
|
return useWaitlistClaimWithDeps(useWaitlistClaimDeps);
|
|
48041
48511
|
}
|
|
48042
48512
|
function useWaitlistClaimWithDeps(deps) {
|
|
48043
|
-
|
|
48513
|
+
const locationSearch = useSyncExternalStore(subscribeToWaitlistClaimToken, getWaitlistClaimLocationSnapshot, () => "");
|
|
48514
|
+
return useResolvedWaitlistClaim(deps, useMemo(() => parseWaitlistClaimCredential(locationSearch), [locationSearch]));
|
|
48044
48515
|
}
|
|
48045
|
-
function useResolvedWaitlistClaim(deps,
|
|
48516
|
+
function useResolvedWaitlistClaim(deps, credential) {
|
|
48046
48517
|
const api = deps.useBlockApi();
|
|
48047
|
-
const [state, dispatch] = useReducer(waitlistClaimReducer, Boolean(
|
|
48518
|
+
const [state, dispatch] = useReducer(waitlistClaimReducer, Boolean(credential), createInitialWaitlistClaimState);
|
|
48048
48519
|
useEffect(() => {
|
|
48049
48520
|
let cancelled = false;
|
|
48050
48521
|
async function resolveClaim() {
|
|
48051
|
-
if (!
|
|
48522
|
+
if (!credential) {
|
|
48052
48523
|
dispatch({ type: "cleared" });
|
|
48053
48524
|
return;
|
|
48054
48525
|
}
|
|
48055
48526
|
dispatch({ type: "started" });
|
|
48056
48527
|
try {
|
|
48057
|
-
const result = await api.resolveWaitlistClaim({ claimToken: token });
|
|
48528
|
+
const result = credential.kind === "portalOwnedEntry" ? await api.resolveWaitlistClaim({ waitlistEntryId: credential.entryId }) : await api.resolveWaitlistClaim({ claimToken: credential.token });
|
|
48058
48529
|
if (cancelled) return;
|
|
48059
48530
|
dispatch({
|
|
48060
48531
|
type: "resolved",
|
|
@@ -48072,9 +48543,10 @@ function useResolvedWaitlistClaim(deps, token) {
|
|
|
48072
48543
|
return () => {
|
|
48073
48544
|
cancelled = true;
|
|
48074
48545
|
};
|
|
48075
|
-
}, [api,
|
|
48546
|
+
}, [api, credential]);
|
|
48076
48547
|
return {
|
|
48077
|
-
token,
|
|
48548
|
+
token: credential?.kind === "emailedToken" ? credential.token : null,
|
|
48549
|
+
entryId: credential?.kind === "portalOwnedEntry" ? credential.entryId : null,
|
|
48078
48550
|
claim: getWaitlistClaim(state),
|
|
48079
48551
|
error: getWaitlistClaimError(state),
|
|
48080
48552
|
loginMessage: getWaitlistClaimLoginMessage(state),
|
|
@@ -48577,15 +49049,12 @@ function useEventRegistrationSubmitWithDeps(options, deps) {
|
|
|
48577
49049
|
* landed — a success, or a hand-off to checkout — because until then nobody
|
|
48578
49050
|
* knows whether the first one committed.
|
|
48579
49051
|
*
|
|
48580
|
-
*
|
|
48581
|
-
* details
|
|
48582
|
-
* anything, so a submission that already booked is answered with the booking
|
|
48583
|
-
* that exists — not refused for spending a credit or a claim that this very
|
|
48584
|
-
* command already spent, and not treated as a second booking because a name
|
|
48585
|
-
* or a note changed in between.
|
|
49052
|
+
* Identical retries retain the command after a lost response. Changed form
|
|
49053
|
+
* details get a new command so the server applies the new booking intent.
|
|
48586
49054
|
*/
|
|
48587
|
-
const
|
|
48588
|
-
|
|
49055
|
+
const commandRef = useRef(null);
|
|
49056
|
+
const inFlightRef = useRef(null);
|
|
49057
|
+
const submit = async (method, passId, membershipId, selection, submitOptions) => {
|
|
48589
49058
|
const target = options.registrationTarget;
|
|
48590
49059
|
if (!target) return {
|
|
48591
49060
|
ok: false,
|
|
@@ -48593,44 +49062,34 @@ function useEventRegistrationSubmitWithDeps(options, deps) {
|
|
|
48593
49062
|
message: "Select an event to continue."
|
|
48594
49063
|
};
|
|
48595
49064
|
options.setStep("submitting");
|
|
48596
|
-
const registrationCommandId =
|
|
48597
|
-
commandIdRef.current = registrationCommandId;
|
|
49065
|
+
const registrationCommandId = commandRef.current?.id ?? deps.createClientCommandId();
|
|
48598
49066
|
try {
|
|
48599
|
-
|
|
49067
|
+
let prepared = prepareSubmitContext(options, registrationCommandId, target, method, passId, membershipId, selection);
|
|
48600
49068
|
if (prepared.subject.kind === "wholeSeries" && method === "stripe") {
|
|
48601
|
-
|
|
49069
|
+
commandRef.current = null;
|
|
48602
49070
|
return await submitWholeSeriesCheckout(options, deps, {
|
|
48603
49071
|
...prepared,
|
|
48604
49072
|
subject: prepared.subject
|
|
48605
49073
|
}, submitOptions);
|
|
48606
49074
|
}
|
|
49075
|
+
const request = buildOccurrenceRegistrationRequest(options, prepared, method, passId, membershipId);
|
|
49076
|
+
const intentKey = registrationRequestIntentKey(request);
|
|
49077
|
+
if (commandRef.current !== null && commandRef.current.intentKey !== intentKey) prepared = {
|
|
49078
|
+
...prepared,
|
|
49079
|
+
registrationCommandId: deps.createClientCommandId()
|
|
49080
|
+
};
|
|
49081
|
+
commandRef.current = {
|
|
49082
|
+
id: prepared.registrationCommandId,
|
|
49083
|
+
intentKey
|
|
49084
|
+
};
|
|
48607
49085
|
const result = await options.api.registerForEvent({
|
|
48608
|
-
|
|
48609
|
-
|
|
48610
|
-
ticketSelections: toTicketSelectionRequests(prepared.ticketSelections),
|
|
48611
|
-
selectedSlidingAmount: options.selectedSlidingAmount ?? void 0,
|
|
48612
|
-
email: options.formData.email.trim().toLowerCase(),
|
|
48613
|
-
name: options.formData.name.trim(),
|
|
48614
|
-
phone: options.formData.phone.trim() || void 0,
|
|
48615
|
-
notes: options.formData.notes.trim() || void 0,
|
|
48616
|
-
consentAccepted: options.formData.consentAccepted,
|
|
48617
|
-
altchaSolution: options.altchaSolution,
|
|
48618
|
-
paymentMethod: method,
|
|
48619
|
-
customerPassId: method === "pass" ? passId : void 0,
|
|
48620
|
-
customerMembershipId: method === "membership" ? membershipId : void 0,
|
|
48621
|
-
bundleProductId: prepared.bundleProductId,
|
|
48622
|
-
claimToken: options.claimToken ?? void 0,
|
|
48623
|
-
guests: prepared.guestsPayload
|
|
49086
|
+
...request,
|
|
49087
|
+
registrationCommandId: prepared.registrationCommandId
|
|
48624
49088
|
});
|
|
48625
|
-
|
|
48626
|
-
|
|
48627
|
-
options.setRegistrationResult(toRegistrationResult(result));
|
|
48628
|
-
options.setStep("success");
|
|
48629
|
-
return {
|
|
48630
|
-
ok: true,
|
|
48631
|
-
outcome: { kind: "completed" }
|
|
48632
|
-
};
|
|
49089
|
+
commandRef.current = null;
|
|
49090
|
+
return await completeRegistrationSubmission(options, deps, prepared, result, method, submitOptions);
|
|
48633
49091
|
} catch (error) {
|
|
49092
|
+
if (error instanceof BlockApiError && error.tag === "registrationPreparationChanged") commandRef.current = null;
|
|
48634
49093
|
const { message, action } = registrationErrorPresentation(error);
|
|
48635
49094
|
options.setErrorAction?.(action);
|
|
48636
49095
|
options.setErrorMessage(message);
|
|
@@ -48642,6 +49101,24 @@ function useEventRegistrationSubmitWithDeps(options, deps) {
|
|
|
48642
49101
|
};
|
|
48643
49102
|
}
|
|
48644
49103
|
};
|
|
49104
|
+
return (...args) => {
|
|
49105
|
+
if (inFlightRef.current) return inFlightRef.current;
|
|
49106
|
+
const pending = Promise.resolve().then(() => submit(...args));
|
|
49107
|
+
inFlightRef.current = pending;
|
|
49108
|
+
pending.finally(() => {
|
|
49109
|
+
if (inFlightRef.current === pending) inFlightRef.current = null;
|
|
49110
|
+
});
|
|
49111
|
+
return pending;
|
|
49112
|
+
};
|
|
49113
|
+
}
|
|
49114
|
+
async function completeRegistrationSubmission(options, deps, prepared, result, method, submitOptions) {
|
|
49115
|
+
if (needsOccurrenceCheckout(result, method)) return await submitOccurrenceCheckout(options, deps, prepared, result, method, submitOptions);
|
|
49116
|
+
options.setRegistrationResult(toRegistrationResult(result));
|
|
49117
|
+
options.setStep("success");
|
|
49118
|
+
return {
|
|
49119
|
+
ok: true,
|
|
49120
|
+
outcome: { kind: "completed" }
|
|
49121
|
+
};
|
|
48645
49122
|
}
|
|
48646
49123
|
function toTicketSelectionRequests(lines) {
|
|
48647
49124
|
return lines.map((line) => ({
|
|
@@ -48716,6 +49193,7 @@ async function submitWholeSeriesCheckout(options, deps, prepared, submitOptions)
|
|
|
48716
49193
|
altchaSolution: options.altchaSolution,
|
|
48717
49194
|
guests: prepared.guestsPayload,
|
|
48718
49195
|
claimToken: options.claimToken ?? void 0,
|
|
49196
|
+
waitlistEntryId: options.waitlistEntryId ?? void 0,
|
|
48719
49197
|
discountCode: options.discountCode.trim() || void 0,
|
|
48720
49198
|
collectionOptionKind: prepared.selectionSnapshot.collectionOptionKind,
|
|
48721
49199
|
checkoutAttemptId,
|
|
@@ -48737,14 +49215,14 @@ async function submitWholeSeriesCheckout(options, deps, prepared, submitOptions)
|
|
|
48737
49215
|
}
|
|
48738
49216
|
if (result.bypassed) return completeBypassedCheckout(options);
|
|
48739
49217
|
if (!result.checkoutUrl) throw new Error("Checkout URL missing");
|
|
48740
|
-
savePendingCheckout(options, deps, prepared, checkoutAttemptId, {
|
|
49218
|
+
savePendingCheckout(options, deps, prepared, result.checkoutAttemptId, {
|
|
48741
49219
|
scope: "wholeSeries",
|
|
48742
49220
|
registrationId: result.registrationId
|
|
48743
49221
|
});
|
|
48744
49222
|
return redirectToCheckout(result.checkoutUrl, submitOptions);
|
|
48745
49223
|
}
|
|
48746
49224
|
function needsOccurrenceCheckout(result, method) {
|
|
48747
|
-
return result.scope === "occurrence" &&
|
|
49225
|
+
return result.scope === "occurrence" && result.status === "confirmed" && result.pendingPayment && [
|
|
48748
49226
|
"stripe",
|
|
48749
49227
|
"pass_bundle",
|
|
48750
49228
|
"membership_bundle"
|
|
@@ -48764,6 +49242,7 @@ async function submitOccurrenceCheckout(options, deps, prepared, registration, m
|
|
|
48764
49242
|
kind: "occurrence",
|
|
48765
49243
|
attendeeId: registration.attendeeId
|
|
48766
49244
|
},
|
|
49245
|
+
registrationCommandId: prepared.registrationCommandId,
|
|
48767
49246
|
checkoutType: method === "pass_bundle" ? "pass_bundle" : method === "membership_bundle" ? "membership_bundle" : "event",
|
|
48768
49247
|
productId: prepared.bundleProductId,
|
|
48769
49248
|
discountCode: options.discountCode.trim() || void 0,
|
|
@@ -48806,10 +49285,36 @@ function redirectToCheckout(checkoutUrl, submitOptions) {
|
|
|
48806
49285
|
}
|
|
48807
49286
|
};
|
|
48808
49287
|
}
|
|
49288
|
+
function registrationRequestIntentKey(request) {
|
|
49289
|
+
const { registrationCommandId: _command, altchaSolution: _proof, ...intent } = request;
|
|
49290
|
+
return JSON.stringify(intent);
|
|
49291
|
+
}
|
|
49292
|
+
function buildOccurrenceRegistrationRequest(options, prepared, method, passId, membershipId) {
|
|
49293
|
+
return {
|
|
49294
|
+
registrationCommandId: prepared.registrationCommandId,
|
|
49295
|
+
subject: prepared.subject,
|
|
49296
|
+
ticketSelections: toTicketSelectionRequests(prepared.ticketSelections),
|
|
49297
|
+
selectedSlidingAmount: options.selectedSlidingAmount ?? void 0,
|
|
49298
|
+
email: options.formData.email.trim().toLowerCase(),
|
|
49299
|
+
name: options.formData.name.trim(),
|
|
49300
|
+
phone: options.formData.phone.trim() || void 0,
|
|
49301
|
+
notes: options.formData.notes.trim() || void 0,
|
|
49302
|
+
consentAccepted: options.formData.consentAccepted,
|
|
49303
|
+
altchaSolution: options.altchaSolution,
|
|
49304
|
+
paymentMethod: method,
|
|
49305
|
+
customerPassId: method === "pass" ? passId : void 0,
|
|
49306
|
+
customerMembershipId: method === "membership" ? membershipId : void 0,
|
|
49307
|
+
bundleProductId: prepared.bundleProductId,
|
|
49308
|
+
claimToken: options.claimToken ?? void 0,
|
|
49309
|
+
waitlistEntryId: options.waitlistEntryId ?? void 0,
|
|
49310
|
+
guests: prepared.guestsPayload
|
|
49311
|
+
};
|
|
49312
|
+
}
|
|
48809
49313
|
var eventRegistrationSubmitDeps;
|
|
48810
49314
|
var init_useEventRegistrationSubmit = __esmMin((() => {
|
|
48811
|
-
|
|
49315
|
+
init_client$1();
|
|
48812
49316
|
init_shared();
|
|
49317
|
+
init_registrationErrorPresentation();
|
|
48813
49318
|
init_constants();
|
|
48814
49319
|
init_sessionStorage();
|
|
48815
49320
|
init_ticketSelectionLines();
|
|
@@ -48819,6 +49324,71 @@ var init_useEventRegistrationSubmit = __esmMin((() => {
|
|
|
48819
49324
|
};
|
|
48820
49325
|
}));
|
|
48821
49326
|
//#endregion
|
|
49327
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/useSettledCommerceView.ts
|
|
49328
|
+
function buildCandidate(input) {
|
|
49329
|
+
if (!input.eligibilityIsSettled || !input.eligibility || !input.currentEvent) return null;
|
|
49330
|
+
return {
|
|
49331
|
+
eventSelectionId: input.currentEvent.selectionId,
|
|
49332
|
+
discountContext: resolveDiscountContext({
|
|
49333
|
+
paymentSelection: input.paymentSelection,
|
|
49334
|
+
event: input.currentEvent,
|
|
49335
|
+
eventRequiresPayment: input.eventRequiresPayment,
|
|
49336
|
+
ticketsCount: input.ticketsCount
|
|
49337
|
+
}),
|
|
49338
|
+
subtotalCents: input.eligibility.price,
|
|
49339
|
+
summaryLines: input.eligibility.ticketLines.map((line) => ({
|
|
49340
|
+
pricingOptionId: line.pricingOptionId,
|
|
49341
|
+
label: line.label,
|
|
49342
|
+
quantity: line.quantity,
|
|
49343
|
+
unitPriceCents: line.unitPriceCents,
|
|
49344
|
+
subtotalCents: line.subtotalCents
|
|
49345
|
+
}))
|
|
49346
|
+
};
|
|
49347
|
+
}
|
|
49348
|
+
function eligibilityIsSettled(result) {
|
|
49349
|
+
return result.settledRequestKey === result.requestKey;
|
|
49350
|
+
}
|
|
49351
|
+
function viewIsStale(view, currentEvent, eligibilityState) {
|
|
49352
|
+
return view.eventSelectionId !== currentEvent?.selectionId || eligibilityState?.tag === "failed" || eligibilityState?.tag === "idle";
|
|
49353
|
+
}
|
|
49354
|
+
function requestIsSettled(discountUi) {
|
|
49355
|
+
return discountUi.discountAvailabilityRequestKey === "disabled" || discountUi.settledDiscountAvailabilityRequestKey === discountUi.discountAvailabilityRequestKey;
|
|
49356
|
+
}
|
|
49357
|
+
function discountRequest(view) {
|
|
49358
|
+
const discountContext = view?.discountContext ?? null;
|
|
49359
|
+
return {
|
|
49360
|
+
discountContext,
|
|
49361
|
+
subtotalCents: discountContext?.type === "event" && view?.subtotalCents !== null ? view?.subtotalCents : void 0
|
|
49362
|
+
};
|
|
49363
|
+
}
|
|
49364
|
+
function useSettledCommerceView(input) {
|
|
49365
|
+
const candidate = buildCandidate({
|
|
49366
|
+
eligibilityIsSettled: eligibilityIsSettled(input.eligibilityResult),
|
|
49367
|
+
eligibility: input.eligibility,
|
|
49368
|
+
currentEvent: input.currentEvent,
|
|
49369
|
+
paymentSelection: input.paymentSelection,
|
|
49370
|
+
eventRequiresPayment: input.eventRequiresPayment,
|
|
49371
|
+
ticketsCount: input.ticketsCount
|
|
49372
|
+
});
|
|
49373
|
+
const settledRef = useRef(candidate);
|
|
49374
|
+
if (settledRef.current && viewIsStale(settledRef.current, input.currentEvent, input.eligibilityResult.state)) settledRef.current = null;
|
|
49375
|
+
const requestView = candidate ?? settledRef.current;
|
|
49376
|
+
const discountUi = input.useDiscountCodeUi({
|
|
49377
|
+
api: input.api,
|
|
49378
|
+
...discountRequest(requestView)
|
|
49379
|
+
});
|
|
49380
|
+
if (candidate && requestIsSettled(discountUi)) settledRef.current = candidate;
|
|
49381
|
+
return {
|
|
49382
|
+
discountUi,
|
|
49383
|
+
discountContext: settledRef.current?.discountContext ?? null,
|
|
49384
|
+
ticketSelectionSubtotalCents: settledRef.current?.subtotalCents ?? null,
|
|
49385
|
+
ticketSelectionSummaryLines: settledRef.current?.summaryLines ?? []
|
|
49386
|
+
};
|
|
49387
|
+
}
|
|
49388
|
+
var init_useSettledCommerceView = __esmMin((() => {
|
|
49389
|
+
init_registrationDerivations();
|
|
49390
|
+
}));
|
|
49391
|
+
//#endregion
|
|
48822
49392
|
//#region ../blocks/src/system/runtime/nodes/event-registration/registrationWizardContext.ts
|
|
48823
49393
|
function getEventSelectionDefaults(event) {
|
|
48824
49394
|
const suggestedAmount = getSlidingScaleForEvent(event)?.suggestedAmount;
|
|
@@ -48981,10 +49551,6 @@ function isSoldOutWithoutWaitlist(input) {
|
|
|
48981
49551
|
var init_registrationCompletion = __esmMin((() => {}));
|
|
48982
49552
|
//#endregion
|
|
48983
49553
|
//#region ../blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.ts
|
|
48984
|
-
function resolveDiscountSubtotalCents(context, subtotalCents) {
|
|
48985
|
-
if (context?.type !== "event" || subtotalCents === null) return void 0;
|
|
48986
|
-
return subtotalCents;
|
|
48987
|
-
}
|
|
48988
49554
|
function usesTieredPricing(event) {
|
|
48989
49555
|
return event !== null && event !== void 0 ? publicEventPricingStrategy(event.pricing) === "tiered" : false;
|
|
48990
49556
|
}
|
|
@@ -49056,14 +49622,28 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
49056
49622
|
}), [options.occurrenceContext, selectedEvent]);
|
|
49057
49623
|
const registrationOccurrenceId = getRegistrationOccurrenceId(registrationTarget);
|
|
49058
49624
|
const currentEvent = selectedEvent ?? preSelectedEvent;
|
|
49625
|
+
const setStep = useCallback((nextStep) => {
|
|
49626
|
+
dispatchFlow({
|
|
49627
|
+
type: "set-step",
|
|
49628
|
+
step: nextStep
|
|
49629
|
+
});
|
|
49630
|
+
}, []);
|
|
49631
|
+
const { checkoutRecovery, startCheckoutRecovery } = useCheckoutRecovery(currentEvent, setStep);
|
|
49059
49632
|
const currentEventUsesTicketTypes = usesTieredPricing(currentEvent);
|
|
49060
|
-
const currentCanJoinWaitlist =
|
|
49633
|
+
const currentCanJoinWaitlist = canJoinWaitlistOutsideRecovery(currentEvent, selectedAttendanceMode, checkoutRecovery);
|
|
49061
49634
|
const usesTicketTypeSelections = currentEventUsesTicketTypes && !currentCanJoinWaitlist;
|
|
49062
49635
|
const eventTicketTypesForSelection = useMemo(() => getVisibleTicketTypes({
|
|
49063
49636
|
event: currentEvent,
|
|
49064
49637
|
eligibility: null,
|
|
49065
49638
|
selectedAttendanceMode
|
|
49066
|
-
})
|
|
49639
|
+
}).map((option) => checkoutRecovery ? {
|
|
49640
|
+
...option,
|
|
49641
|
+
availability: checkoutRecoveryOptionAvailability(option.availability)
|
|
49642
|
+
} : option), [
|
|
49643
|
+
currentEvent,
|
|
49644
|
+
selectedAttendanceMode,
|
|
49645
|
+
checkoutRecovery
|
|
49646
|
+
]);
|
|
49067
49647
|
const normalizedSelectedTicketLines = useMemo(() => normalizeTicketSelectionLines(selectedTicketLines), [selectedTicketLines]);
|
|
49068
49648
|
const ticketTypeSelectionTotal = useMemo(() => getTicketSelectionTotal(normalizedSelectedTicketLines), [normalizedSelectedTicketLines]);
|
|
49069
49649
|
const ticketsCount = usesTicketTypeSelections ? ticketTypeSelectionTotal : flowState.ticketsCount;
|
|
@@ -49101,17 +49681,11 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
49101
49681
|
isAuthenticated: portalAuthState === "authenticated",
|
|
49102
49682
|
occurrenceId: registrationOccurrenceId
|
|
49103
49683
|
});
|
|
49104
|
-
const eligibility = eligibilityResult.eligibility;
|
|
49684
|
+
const eligibility = useCheckoutRecoveryEligibility(eligibilityResult.eligibility, step, checkoutRecovery, startCheckoutRecovery);
|
|
49105
49685
|
const eligibilityLoading = eligibilityResult.isLoading;
|
|
49106
49686
|
const eligibilityError = eligibilityResult.error;
|
|
49107
49687
|
const portalCreditState = eligibilityResult.creditState;
|
|
49108
49688
|
const registrationState = eligibility?.registration ?? { kind: "none" };
|
|
49109
|
-
const setStep = useCallback((nextStep) => {
|
|
49110
|
-
dispatchFlow({
|
|
49111
|
-
type: "set-step",
|
|
49112
|
-
step: nextStep
|
|
49113
|
-
});
|
|
49114
|
-
}, []);
|
|
49115
49689
|
const setTicketsCount = useCallback((nextTicketsCount) => {
|
|
49116
49690
|
dispatchFlow({
|
|
49117
49691
|
type: "set-tickets-count",
|
|
@@ -49219,10 +49793,14 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
49219
49793
|
event: currentEvent,
|
|
49220
49794
|
eligibility,
|
|
49221
49795
|
selectedAttendanceMode
|
|
49222
|
-
})
|
|
49796
|
+
}).map((option) => checkoutRecovery ? {
|
|
49797
|
+
...option,
|
|
49798
|
+
availability: checkoutRecoveryOptionAvailability(option.availability)
|
|
49799
|
+
} : option), [
|
|
49223
49800
|
currentEvent,
|
|
49224
49801
|
selectedAttendanceMode,
|
|
49225
|
-
eligibility
|
|
49802
|
+
eligibility,
|
|
49803
|
+
checkoutRecovery
|
|
49226
49804
|
]);
|
|
49227
49805
|
const singleSelectedPricingOptionId = getSingleSelectedPricingOptionId(normalizedSelectedTicketLines);
|
|
49228
49806
|
const selectedTicketType = useMemo(() => findSelectedTicketType({
|
|
@@ -49246,8 +49824,12 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
49246
49824
|
const event = currentEvent;
|
|
49247
49825
|
if (!usesTieredPricing(event)) return false;
|
|
49248
49826
|
if ((event.deliveryMode ?? "in_person") === "hybrid" && !selectedAttendanceMode) return false;
|
|
49249
|
-
return !canJoinEventWaitlist(event, { attendanceMode: selectedAttendanceMode });
|
|
49250
|
-
}, [
|
|
49827
|
+
return checkoutRecovery || !canJoinEventWaitlist(event, { attendanceMode: selectedAttendanceMode });
|
|
49828
|
+
}, [
|
|
49829
|
+
currentEvent,
|
|
49830
|
+
selectedAttendanceMode,
|
|
49831
|
+
checkoutRecovery
|
|
49832
|
+
]);
|
|
49251
49833
|
const hasValidTicketSelection = hasValidPricingOptionSelection({
|
|
49252
49834
|
selectionRequired: ticketTypeSelectionRequired,
|
|
49253
49835
|
lines: normalizedSelectedTicketLines,
|
|
@@ -49411,30 +49993,15 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
49411
49993
|
}
|
|
49412
49994
|
setStep("select-tickets");
|
|
49413
49995
|
};
|
|
49414
|
-
const discountContext
|
|
49415
|
-
|
|
49416
|
-
|
|
49417
|
-
|
|
49418
|
-
|
|
49419
|
-
}), [
|
|
49996
|
+
const { discountUi, discountContext, ticketSelectionSubtotalCents, ticketSelectionSummaryLines } = useSettledCommerceView({
|
|
49997
|
+
api,
|
|
49998
|
+
useDiscountCodeUi: deps.useDiscountCodeUi,
|
|
49999
|
+
eligibilityResult,
|
|
50000
|
+
eligibility,
|
|
49420
50001
|
currentEvent,
|
|
49421
50002
|
eventRequiresPayment,
|
|
49422
50003
|
paymentSelection,
|
|
49423
50004
|
ticketsCount
|
|
49424
|
-
]);
|
|
49425
|
-
const ticketSelectionSubtotalCents = eligibility?.price ?? null;
|
|
49426
|
-
const ticketSelectionSummaryLines = useMemo(() => eligibility?.ticketLines.map((line) => ({
|
|
49427
|
-
pricingOptionId: line.pricingOptionId,
|
|
49428
|
-
label: line.label,
|
|
49429
|
-
quantity: line.quantity,
|
|
49430
|
-
unitPriceCents: line.unitPriceCents,
|
|
49431
|
-
subtotalCents: line.subtotalCents
|
|
49432
|
-
})) ?? [], [eligibility]);
|
|
49433
|
-
const discountSubtotalCents = resolveDiscountSubtotalCents(discountContext, ticketSelectionSubtotalCents);
|
|
49434
|
-
const discountUi = deps.useDiscountCodeUi({
|
|
49435
|
-
api,
|
|
49436
|
-
discountContext,
|
|
49437
|
-
subtotalCents: discountSubtotalCents
|
|
49438
50005
|
});
|
|
49439
50006
|
const selectionMethod = paymentSelection.method;
|
|
49440
50007
|
const shouldShowDiscountToggle = discountContext !== null && discountUi.manualCodeEntryAllowed && (selectionMethod === "stripe" || selectionMethod === "pass_bundle" || selectionMethod === "membership_bundle");
|
|
@@ -49451,6 +50018,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
49451
50018
|
guests,
|
|
49452
50019
|
discountCode: discountUi.discountCode,
|
|
49453
50020
|
claimToken: waitlistClaim.token,
|
|
50021
|
+
waitlistEntryId: waitlistClaim.entryId,
|
|
49454
50022
|
setPendingRegistrationReference,
|
|
49455
50023
|
setStep,
|
|
49456
50024
|
setRegistrationResult: (result) => setRegistrationResult(result),
|
|
@@ -49513,6 +50081,8 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
49513
50081
|
scopedEvents,
|
|
49514
50082
|
preSelectedEvent,
|
|
49515
50083
|
hasPreSelectedContext,
|
|
50084
|
+
checkoutRecovery,
|
|
50085
|
+
startCheckoutRecovery,
|
|
49516
50086
|
step,
|
|
49517
50087
|
setStep,
|
|
49518
50088
|
selectedEvent,
|
|
@@ -49597,6 +50167,8 @@ function useEventRegistrationWizardWithDeps(options, deps) {
|
|
|
49597
50167
|
}
|
|
49598
50168
|
var eventRegistrationWizardDeps;
|
|
49599
50169
|
var init_useEventRegistrationWizard = __esmMin((() => {
|
|
50170
|
+
init_checkoutRecovery();
|
|
50171
|
+
init_useCheckoutRecovery();
|
|
49600
50172
|
init_src$2();
|
|
49601
50173
|
init_registrationErrorRecovery();
|
|
49602
50174
|
init_api();
|
|
@@ -49608,6 +50180,7 @@ var init_useEventRegistrationWizard = __esmMin((() => {
|
|
|
49608
50180
|
init_useEventRegistrationStripeReturn();
|
|
49609
50181
|
init_useEventRegistrationSubmit();
|
|
49610
50182
|
init_useDiscountCodeUi();
|
|
50183
|
+
init_useSettledCommerceView();
|
|
49611
50184
|
init_utils();
|
|
49612
50185
|
init_ticketSelectionLines();
|
|
49613
50186
|
init_registrationStateMachine();
|
|
@@ -49630,6 +50203,38 @@ var init_useEventRegistrationWizard = __esmMin((() => {
|
|
|
49630
50203
|
};
|
|
49631
50204
|
}));
|
|
49632
50205
|
//#endregion
|
|
50206
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/useEventCheckoutHandoffRestore.ts
|
|
50207
|
+
function eventRegistrationReloadTarget(location) {
|
|
50208
|
+
return `${location.pathname}${location.search}#${EVENT_REGISTRATION_ANCHOR_ID}`;
|
|
50209
|
+
}
|
|
50210
|
+
function reloadAtEventRegistration() {
|
|
50211
|
+
const target = eventRegistrationReloadTarget(window.location);
|
|
50212
|
+
window.history.replaceState(window.history.state, "", target);
|
|
50213
|
+
window.location.reload();
|
|
50214
|
+
}
|
|
50215
|
+
function useEventCheckoutHandoffRestore(active) {
|
|
50216
|
+
useEventCheckoutHandoffRestoreWithDeps(active, browserCheckoutHandoffRestoreDeps);
|
|
50217
|
+
}
|
|
50218
|
+
function useEventCheckoutHandoffRestoreWithDeps(active, deps) {
|
|
50219
|
+
useEffect(() => {
|
|
50220
|
+
if (!active) return;
|
|
50221
|
+
const handlePageShow = (event) => {
|
|
50222
|
+
if (event.persisted) deps.reloadAtRegistration();
|
|
50223
|
+
};
|
|
50224
|
+
deps.addPageShowListener(handlePageShow);
|
|
50225
|
+
return () => deps.removePageShowListener(handlePageShow);
|
|
50226
|
+
}, [active, deps]);
|
|
50227
|
+
}
|
|
50228
|
+
var browserCheckoutHandoffRestoreDeps;
|
|
50229
|
+
var init_useEventCheckoutHandoffRestore = __esmMin((() => {
|
|
50230
|
+
init_constants();
|
|
50231
|
+
browserCheckoutHandoffRestoreDeps = {
|
|
50232
|
+
addPageShowListener: (listener) => window.addEventListener("pageshow", listener),
|
|
50233
|
+
removePageShowListener: (listener) => window.removeEventListener("pageshow", listener),
|
|
50234
|
+
reloadAtRegistration: reloadAtEventRegistration
|
|
50235
|
+
};
|
|
50236
|
+
}));
|
|
50237
|
+
//#endregion
|
|
49633
50238
|
//#region ../blocks/src/system/runtime/nodes/shared/MagicLinkForm.state.ts
|
|
49634
50239
|
function magicLinkSubmissionReducer(state, action) {
|
|
49635
50240
|
switch (action.type) {
|
|
@@ -49759,6 +50364,50 @@ var init_MagicLinkForm = __esmMin((() => {
|
|
|
49759
50364
|
init_MagicLinkForm_state();
|
|
49760
50365
|
}));
|
|
49761
50366
|
//#endregion
|
|
50367
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/ErrorStep.tsx
|
|
50368
|
+
var labels, ErrorStep;
|
|
50369
|
+
var init_ErrorStep = __esmMin((() => {
|
|
50370
|
+
init_shared();
|
|
50371
|
+
labels = {
|
|
50372
|
+
none: "",
|
|
50373
|
+
retry: "Try again",
|
|
50374
|
+
places: "Choose places",
|
|
50375
|
+
start: "Start again",
|
|
50376
|
+
details: "Check my details",
|
|
50377
|
+
"payment-options": "View payment options",
|
|
50378
|
+
"payment-status": "Check payment status",
|
|
50379
|
+
portal: "View my bookings",
|
|
50380
|
+
event: "View event"
|
|
50381
|
+
};
|
|
50382
|
+
ErrorStep = ({ message, onRetry, action = "retry", canJoinWaitlist = false }) => {
|
|
50383
|
+
const offerWaitlist = action === "places" && canJoinWaitlist;
|
|
50384
|
+
return /* @__PURE__ */ jsx(TerminalPanel, {
|
|
50385
|
+
tone: "error",
|
|
50386
|
+
className: "er-center",
|
|
50387
|
+
titleClassName: "er-title--lg er-message",
|
|
50388
|
+
icon: /* @__PURE__ */ jsx(StateIcon, {
|
|
50389
|
+
variant: "error",
|
|
50390
|
+
children: /* @__PURE__ */ jsx(CrossIcon, {})
|
|
50391
|
+
}),
|
|
50392
|
+
title: "We couldn’t complete your booking",
|
|
50393
|
+
body: /* @__PURE__ */ jsx("p", {
|
|
50394
|
+
className: "er-text--muted er-message",
|
|
50395
|
+
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
|
|
50396
|
+
}),
|
|
50397
|
+
actions: action === "none" ? void 0 : action === "portal" || action === "payment-status" ? /* @__PURE__ */ jsx("a", {
|
|
50398
|
+
href: "/portal",
|
|
50399
|
+
className: "er-retry-btn",
|
|
50400
|
+
children: labels[action]
|
|
50401
|
+
}) : /* @__PURE__ */ jsx("button", {
|
|
50402
|
+
type: "button",
|
|
50403
|
+
onClick: onRetry,
|
|
50404
|
+
className: "er-retry-btn",
|
|
50405
|
+
children: offerWaitlist ? "Join the waiting list" : labels[action]
|
|
50406
|
+
})
|
|
50407
|
+
});
|
|
50408
|
+
};
|
|
50409
|
+
}));
|
|
50410
|
+
//#endregion
|
|
49762
50411
|
//#region ../blocks/src/system/runtime/nodes/event-registration/EventRegistrationSummaryBar.tsx
|
|
49763
50412
|
function getScheduleSummary(wizard, summaryEvent) {
|
|
49764
50413
|
if (summaryEvent.registrationSubject.kind !== "wholeSeries") {
|
|
@@ -50048,7 +50697,7 @@ function SelectTicketsActions(props) {
|
|
|
50048
50697
|
const currentEvent = wizard.selectedEvent ?? wizard.preSelectedEvent;
|
|
50049
50698
|
const registrationOptionsPending = wizard.registrationOptionsState.tag === "idle" || wizard.registrationOptionsState.tag === "loading";
|
|
50050
50699
|
const registrationOptionsFailed = wizard.registrationOptionsState.tag === "failed";
|
|
50051
|
-
const isSoldOutWithoutWaitlist = !hasWaitlistClaim && isFullWithNoWaitlist(currentEvent, wizard.selectedAttendanceMode);
|
|
50700
|
+
const isSoldOutWithoutWaitlist = !wizard.checkoutRecovery && !hasWaitlistClaim && isFullWithNoWaitlist(currentEvent, wizard.selectedAttendanceMode);
|
|
50052
50701
|
const isCheckingExistingRegistration = wizard.portalAuthState === "authenticated" && wizard.existingRegistrationLoading;
|
|
50053
50702
|
const hasExistingRegistration = isExistingRegistrationBlocking$1(wizard);
|
|
50054
50703
|
const ticketTypeSelectionBlocked = wizard.ticketTypeSelectionRequired && !wizard.hasValidTicketSelection;
|
|
@@ -50653,21 +51302,42 @@ function resolveTicketSelectionPricing(event) {
|
|
|
50653
51302
|
currency: event ? publicEventPricingCurrency(event.pricing) : null
|
|
50654
51303
|
};
|
|
50655
51304
|
}
|
|
51305
|
+
function CheckoutRecoveryEntry(props) {
|
|
51306
|
+
return props.onContinue ? /* @__PURE__ */ jsx("button", {
|
|
51307
|
+
type: "button",
|
|
51308
|
+
className: "er-back-btn",
|
|
51309
|
+
onClick: props.onContinue,
|
|
51310
|
+
children: "Continue an existing booking"
|
|
51311
|
+
}) : null;
|
|
51312
|
+
}
|
|
51313
|
+
function getTicketSelectionCapacity(event, attendanceMode, checkoutRecovery) {
|
|
51314
|
+
if (checkoutRecovery) return {
|
|
51315
|
+
availableSpots: null,
|
|
51316
|
+
isSoldOut: false,
|
|
51317
|
+
canJoinWaitlist: false,
|
|
51318
|
+
eventAvailabilityLabel: null
|
|
51319
|
+
};
|
|
51320
|
+
const source = event ? selectEventCapacitySource(event, attendanceMode) : null;
|
|
51321
|
+
const availability = source ? getEventAvailability(source) : null;
|
|
51322
|
+
const canJoinWaitlist = source ? canJoinEventWaitlist(source) : false;
|
|
51323
|
+
return {
|
|
51324
|
+
availableSpots: availability?.available,
|
|
51325
|
+
isSoldOut: availability?.isFull ?? false,
|
|
51326
|
+
canJoinWaitlist,
|
|
51327
|
+
eventAvailabilityLabel: !canJoinWaitlist && source ? formatRemainingPlaces(source) : null
|
|
51328
|
+
};
|
|
51329
|
+
}
|
|
50656
51330
|
var TicketSelectionStep;
|
|
50657
51331
|
var init_TicketSelectionStep = __esmMin((() => {
|
|
50658
51332
|
init_src$2();
|
|
50659
51333
|
init_domain();
|
|
50660
51334
|
init_utils();
|
|
50661
51335
|
init_ticketSelectionLines();
|
|
50662
|
-
TicketSelectionStep = ({ event, occurrenceContext: _occurrenceContext, selectedAttendanceMode = null, onAttendanceModeChange, ticketsCount, maxTickets, visibleTicketTypes: visibleTicketTypesOverride, ticketSelections = [], onTicketSelectionsChange, slidingScale = null, selectedSlidingAmountInput = "", slidingScaleSelectionMessage = null, onSlidingAmountChange, onTicketsChange, bookingUnit = { kind: "ticket" } }) => {
|
|
51336
|
+
TicketSelectionStep = ({ event, occurrenceContext: _occurrenceContext, selectedAttendanceMode = null, onAttendanceModeChange, ticketsCount, maxTickets, visibleTicketTypes: visibleTicketTypesOverride, ticketSelections = [], onTicketSelectionsChange, slidingScale = null, selectedSlidingAmountInput = "", slidingScaleSelectionMessage = null, onSlidingAmountChange, onTicketsChange, bookingUnit = { kind: "ticket" }, checkoutRecovery = false, onCheckoutRecovery }) => {
|
|
50663
51337
|
const unit = bookingUnit.kind;
|
|
50664
51338
|
const deliveryMode = event?.deliveryMode ?? "in_person";
|
|
50665
51339
|
const attendanceModes = event?.attendanceModes ?? [];
|
|
50666
|
-
const
|
|
50667
|
-
const availability = capacitySource ? getEventAvailability(capacitySource) : null;
|
|
50668
|
-
const availableSpots = availability?.available;
|
|
50669
|
-
const isSoldOut = availability?.isFull ?? false;
|
|
50670
|
-
const canJoinWaitlist = capacitySource ? canJoinEventWaitlist(capacitySource) : false;
|
|
51340
|
+
const { availableSpots, isSoldOut, canJoinWaitlist, eventAvailabilityLabel } = getTicketSelectionCapacity(event, selectedAttendanceMode, checkoutRecovery);
|
|
50671
51341
|
const { mode: eventPricingMode, currency: eventPricingCurrency } = resolveTicketSelectionPricing(event);
|
|
50672
51342
|
const usesTicketTypes = eventPricingMode === "tiered" && !canJoinWaitlist;
|
|
50673
51343
|
const visibleTicketTypes = usesTicketTypes ? visibleTicketTypesOverride ?? getVisibleTicketTypes({
|
|
@@ -50686,7 +51356,6 @@ var init_TicketSelectionStep = __esmMin((() => {
|
|
|
50686
51356
|
selectedTicketTypeRemainingCapacity: implicitTicketType?.availability.remainingPlaces ?? null,
|
|
50687
51357
|
hasSelectedTicketType: implicitTicketType !== null
|
|
50688
51358
|
});
|
|
50689
|
-
const eventAvailabilityLabel = !canJoinWaitlist && capacitySource ? formatRemainingPlaces(capacitySource) : null;
|
|
50690
51359
|
if (deliveryMode === "hybrid" && !selectedAttendanceMode) return /* @__PURE__ */ jsxs("div", {
|
|
50691
51360
|
className: "rb-reg-stack er-stack",
|
|
50692
51361
|
children: [
|
|
@@ -50707,13 +51376,17 @@ var init_TicketSelectionStep = __esmMin((() => {
|
|
|
50707
51376
|
});
|
|
50708
51377
|
if (isSoldOut && !canJoinWaitlist) return /* @__PURE__ */ jsxs("div", {
|
|
50709
51378
|
className: "rb-reg-stack er-stack",
|
|
50710
|
-
children: [
|
|
50711
|
-
|
|
50712
|
-
|
|
50713
|
-
|
|
50714
|
-
|
|
50715
|
-
|
|
50716
|
-
|
|
51379
|
+
children: [
|
|
51380
|
+
/* @__PURE__ */ jsx("h3", {
|
|
51381
|
+
className: "er-title",
|
|
51382
|
+
children: "Sold out"
|
|
51383
|
+
}),
|
|
51384
|
+
/* @__PURE__ */ jsx("p", {
|
|
51385
|
+
className: "er-text er-text--muted",
|
|
51386
|
+
children: "Sorry you missed out! This event is fully booked."
|
|
51387
|
+
}),
|
|
51388
|
+
/* @__PURE__ */ jsx(CheckoutRecoveryEntry, { onContinue: onCheckoutRecovery })
|
|
51389
|
+
]
|
|
50717
51390
|
});
|
|
50718
51391
|
if (!eventPricingCurrency) return /* @__PURE__ */ jsx("div", {
|
|
50719
51392
|
className: "rb-reg-stack er-stack",
|
|
@@ -50781,9 +51454,13 @@ var init_TicketSelectionStep = __esmMin((() => {
|
|
|
50781
51454
|
})]
|
|
50782
51455
|
})
|
|
50783
51456
|
] }),
|
|
50784
|
-
canJoinWaitlist && /* @__PURE__ */ jsx("p", {
|
|
51457
|
+
canJoinWaitlist && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("p", {
|
|
50785
51458
|
className: "er-text er-text--muted",
|
|
50786
51459
|
children: "This event is currently full. Continue to join the waitlist if a place opens up."
|
|
51460
|
+
}), /* @__PURE__ */ jsx(CheckoutRecoveryEntry, { onContinue: onCheckoutRecovery })] }),
|
|
51461
|
+
checkoutRecovery && /* @__PURE__ */ jsx("p", {
|
|
51462
|
+
className: "er-text er-text--muted",
|
|
51463
|
+
children: "Enter the details from your earlier booking. We’ll check your checkout before continuing to payment."
|
|
50787
51464
|
})
|
|
50788
51465
|
]
|
|
50789
51466
|
});
|
|
@@ -105942,50 +106619,6 @@ var init_SuccessStep = __esmMin((() => {
|
|
|
105942
106619
|
};
|
|
105943
106620
|
}));
|
|
105944
106621
|
//#endregion
|
|
105945
|
-
//#region ../blocks/src/system/runtime/nodes/event-registration/ErrorStep.tsx
|
|
105946
|
-
var labels, ErrorStep;
|
|
105947
|
-
var init_ErrorStep = __esmMin((() => {
|
|
105948
|
-
init_shared();
|
|
105949
|
-
labels = {
|
|
105950
|
-
none: "",
|
|
105951
|
-
retry: "Try again",
|
|
105952
|
-
places: "Choose places",
|
|
105953
|
-
start: "Start again",
|
|
105954
|
-
details: "Check my details",
|
|
105955
|
-
"payment-options": "View payment options",
|
|
105956
|
-
"payment-status": "Check payment status",
|
|
105957
|
-
portal: "View my bookings",
|
|
105958
|
-
event: "View event"
|
|
105959
|
-
};
|
|
105960
|
-
ErrorStep = ({ message, onRetry, action = "retry", canJoinWaitlist = false }) => {
|
|
105961
|
-
const offerWaitlist = action === "places" && canJoinWaitlist;
|
|
105962
|
-
return /* @__PURE__ */ jsx(TerminalPanel, {
|
|
105963
|
-
tone: "error",
|
|
105964
|
-
className: "er-center",
|
|
105965
|
-
titleClassName: "er-title--lg er-message",
|
|
105966
|
-
icon: /* @__PURE__ */ jsx(StateIcon, {
|
|
105967
|
-
variant: "error",
|
|
105968
|
-
children: /* @__PURE__ */ jsx(CrossIcon, {})
|
|
105969
|
-
}),
|
|
105970
|
-
title: "We couldn’t complete your booking",
|
|
105971
|
-
body: /* @__PURE__ */ jsx("p", {
|
|
105972
|
-
className: "er-text--muted er-message",
|
|
105973
|
-
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
|
|
105974
|
-
}),
|
|
105975
|
-
actions: action === "none" ? void 0 : action === "portal" || action === "payment-status" ? /* @__PURE__ */ jsx("a", {
|
|
105976
|
-
href: "/portal",
|
|
105977
|
-
className: "er-retry-btn",
|
|
105978
|
-
children: labels[action]
|
|
105979
|
-
}) : /* @__PURE__ */ jsx("button", {
|
|
105980
|
-
type: "button",
|
|
105981
|
-
onClick: onRetry,
|
|
105982
|
-
className: "er-retry-btn",
|
|
105983
|
-
children: offerWaitlist ? "Join the waiting list" : labels[action]
|
|
105984
|
-
})
|
|
105985
|
-
});
|
|
105986
|
-
};
|
|
105987
|
-
}));
|
|
105988
|
-
//#endregion
|
|
105989
106622
|
//#region ../blocks/src/system/runtime/nodes/event-registration/VerifyingPaymentStep.tsx
|
|
105990
106623
|
var VerifyingPaymentStep;
|
|
105991
106624
|
var init_VerifyingPaymentStep = __esmMin((() => {
|
|
@@ -106272,12 +106905,14 @@ function EventRegistrationWizardContent(props) {
|
|
|
106272
106905
|
onBookForSomeoneElse: wizard.handleBookForSomeoneElse
|
|
106273
106906
|
}), /* @__PURE__ */ jsx(TicketSelectionStep, {
|
|
106274
106907
|
event: wizard.selectedEvent,
|
|
106908
|
+
checkoutRecovery: wizard.checkoutRecovery,
|
|
106909
|
+
onCheckoutRecovery: canRecoverEventCheckout(wizard.selectedEvent) ? wizard.startCheckoutRecovery : void 0,
|
|
106275
106910
|
occurrenceContext: wizard.occurrenceContext,
|
|
106276
106911
|
selectedAttendanceMode: wizard.selectedAttendanceMode,
|
|
106277
106912
|
onAttendanceModeChange: wizard.setSelectedAttendanceMode,
|
|
106278
106913
|
ticketsCount: wizard.ticketsCount,
|
|
106279
106914
|
maxTickets: wizard.maxTicketsNum,
|
|
106280
|
-
visibleTicketTypes: wizard.
|
|
106915
|
+
visibleTicketTypes: wizard.visibleTicketTypes,
|
|
106281
106916
|
ticketSelections: wizard.selectedTicketLines,
|
|
106282
106917
|
onTicketSelectionsChange: wizard.setSelectedTicketLines,
|
|
106283
106918
|
slidingScale: wizard.selectedEventSlidingScale,
|
|
@@ -106299,6 +106934,7 @@ var init_EventRegistrationWizardContent = __esmMin((() => {
|
|
|
106299
106934
|
init_client();
|
|
106300
106935
|
init_src();
|
|
106301
106936
|
init_shared();
|
|
106937
|
+
init_checkoutRecovery();
|
|
106302
106938
|
init_registrationStateMachine();
|
|
106303
106939
|
init_siteCreditPreview();
|
|
106304
106940
|
init_PaymentBlockingPanel();
|
|
@@ -106446,19 +107082,20 @@ function EventRegistrationSurface(props) {
|
|
|
106446
107082
|
}), /* @__PURE__ */ jsx(EventRegistrationTerminalState, {
|
|
106447
107083
|
wizard,
|
|
106448
107084
|
supportEmail: props.supportEmail,
|
|
106449
|
-
successMessage: props.successMessage
|
|
107085
|
+
successMessage: props.successMessage,
|
|
107086
|
+
buttonClass: props.buttonClass
|
|
106450
107087
|
})]
|
|
106451
107088
|
});
|
|
106452
107089
|
}
|
|
106453
107090
|
var init_EventRegistrationSurface = __esmMin((() => {
|
|
106454
|
-
init_spinner$1();
|
|
106455
107091
|
init_MagicLinkForm();
|
|
107092
|
+
init_spinner$1();
|
|
107093
|
+
init_ErrorStep();
|
|
106456
107094
|
init_EventRegistrationSummaryBar();
|
|
106457
107095
|
init_EventRegistrationWizardActions();
|
|
106458
107096
|
init_EventRegistrationWizardContent();
|
|
106459
|
-
init_StepIndicator();
|
|
106460
|
-
init_ErrorStep();
|
|
106461
107097
|
init_PaymentFailedStep();
|
|
107098
|
+
init_StepIndicator();
|
|
106462
107099
|
init_SuccessStep();
|
|
106463
107100
|
init_VerifyingPaymentStep();
|
|
106464
107101
|
init_VerifyingTimeoutStep();
|
|
@@ -106615,6 +107252,7 @@ function EventRegistrationWizard(props) {
|
|
|
106615
107252
|
events: events ?? [],
|
|
106616
107253
|
maxTicketsNum
|
|
106617
107254
|
});
|
|
107255
|
+
useEventCheckoutHandoffRestore(wizard.step === "redirecting");
|
|
106618
107256
|
const [bookingOverlayOpen, setBookingOverlayOpen] = useState(false);
|
|
106619
107257
|
const [floatingPortalRoot, setFloatingPortalRoot] = useState(null);
|
|
106620
107258
|
useEffect(() => {
|
|
@@ -106747,6 +107385,7 @@ var init_EventRegistrationWizard = __esmMin((() => {
|
|
|
106747
107385
|
init_themePortalRoot();
|
|
106748
107386
|
init_buttons();
|
|
106749
107387
|
init_constants();
|
|
107388
|
+
init_useEventCheckoutHandoffRestore();
|
|
106750
107389
|
init_EventRegistrationSurface();
|
|
106751
107390
|
init_EventRegistrationBookingLayer();
|
|
106752
107391
|
EVENT_PORTAL_AUTH_COPY = {
|
|
@@ -106857,6 +107496,88 @@ var init_PastOccurrenceNotice = __esmMin((() => {
|
|
|
106857
107496
|
init_utils();
|
|
106858
107497
|
}));
|
|
106859
107498
|
//#endregion
|
|
107499
|
+
//#region ../blocks/src/system/runtime/nodes/event-registration/useEventSourceRecovery.ts
|
|
107500
|
+
function useEventSourceRecovery(source, deps = defaultRecoveryDeps) {
|
|
107501
|
+
const api = deps.useApi();
|
|
107502
|
+
const wait = deps.wait;
|
|
107503
|
+
const [cycle, setCycle] = useState(0);
|
|
107504
|
+
const [state, setState] = useState(() => source.kind === "loaded" ? {
|
|
107505
|
+
kind: "ready",
|
|
107506
|
+
events: source.events
|
|
107507
|
+
} : { kind: "loading" });
|
|
107508
|
+
const retry = useCallback(() => {
|
|
107509
|
+
setState({ kind: "loading" });
|
|
107510
|
+
setCycle((value) => value + 1);
|
|
107511
|
+
}, []);
|
|
107512
|
+
useEffect(() => {
|
|
107513
|
+
if (source.kind === "loaded") {
|
|
107514
|
+
setState({
|
|
107515
|
+
kind: "ready",
|
|
107516
|
+
events: source.events
|
|
107517
|
+
});
|
|
107518
|
+
return;
|
|
107519
|
+
}
|
|
107520
|
+
if (!source.request) {
|
|
107521
|
+
setState({
|
|
107522
|
+
kind: "exhausted",
|
|
107523
|
+
retry
|
|
107524
|
+
});
|
|
107525
|
+
return;
|
|
107526
|
+
}
|
|
107527
|
+
const controller = new AbortController();
|
|
107528
|
+
const isCurrent = () => !controller.signal.aborted;
|
|
107529
|
+
(async () => {
|
|
107530
|
+
for (const delayMs of RECOVERY_DELAYS_MS) try {
|
|
107531
|
+
await wait(delayMs, controller.signal);
|
|
107532
|
+
const events = await api.getPublicEvents(source.request ?? void 0);
|
|
107533
|
+
if (isCurrent()) setState({
|
|
107534
|
+
kind: "ready",
|
|
107535
|
+
events
|
|
107536
|
+
});
|
|
107537
|
+
return;
|
|
107538
|
+
} catch {
|
|
107539
|
+
if (!isCurrent()) return;
|
|
107540
|
+
}
|
|
107541
|
+
if (isCurrent()) setState({
|
|
107542
|
+
kind: "exhausted",
|
|
107543
|
+
retry
|
|
107544
|
+
});
|
|
107545
|
+
})();
|
|
107546
|
+
return () => controller.abort();
|
|
107547
|
+
}, [
|
|
107548
|
+
api,
|
|
107549
|
+
cycle,
|
|
107550
|
+
retry,
|
|
107551
|
+
source,
|
|
107552
|
+
wait
|
|
107553
|
+
]);
|
|
107554
|
+
return state;
|
|
107555
|
+
}
|
|
107556
|
+
function waitForRetry(milliseconds, signal) {
|
|
107557
|
+
if (signal.aborted) return Promise.reject(/* @__PURE__ */ new Error("Recovery aborted"));
|
|
107558
|
+
if (milliseconds === 0) return Promise.resolve();
|
|
107559
|
+
return new Promise((resolve, reject) => {
|
|
107560
|
+
const timeout = setTimeout(resolve, milliseconds);
|
|
107561
|
+
signal.addEventListener("abort", () => {
|
|
107562
|
+
clearTimeout(timeout);
|
|
107563
|
+
reject(/* @__PURE__ */ new Error("Recovery aborted"));
|
|
107564
|
+
}, { once: true });
|
|
107565
|
+
});
|
|
107566
|
+
}
|
|
107567
|
+
var RECOVERY_DELAYS_MS, defaultRecoveryDeps;
|
|
107568
|
+
var init_useEventSourceRecovery = __esmMin((() => {
|
|
107569
|
+
init_api();
|
|
107570
|
+
RECOVERY_DELAYS_MS = [
|
|
107571
|
+
0,
|
|
107572
|
+
250,
|
|
107573
|
+
750
|
|
107574
|
+
];
|
|
107575
|
+
defaultRecoveryDeps = {
|
|
107576
|
+
useApi: useBlockApi,
|
|
107577
|
+
wait: waitForRetry
|
|
107578
|
+
};
|
|
107579
|
+
}));
|
|
107580
|
+
//#endregion
|
|
106860
107581
|
//#region ../blocks/src/system/runtime/nodes/event-registration.client.tsx
|
|
106861
107582
|
function toEventRegistrationClientProps(props, display) {
|
|
106862
107583
|
return {
|
|
@@ -106865,13 +107586,77 @@ function toEventRegistrationClientProps(props, display) {
|
|
|
106865
107586
|
className: display.className ?? void 0
|
|
106866
107587
|
};
|
|
106867
107588
|
}
|
|
107589
|
+
function RecoverableEventRegistrationClient({ props, display }) {
|
|
107590
|
+
const recovery = useEventSourceRecovery(props.render.hydration.eventSource);
|
|
107591
|
+
if (recovery.kind === "loading") return /* @__PURE__ */ jsxs("div", {
|
|
107592
|
+
id: EVENT_REGISTRATION_ANCHOR_ID,
|
|
107593
|
+
className: "rb-reg-surface er-container er-registration-shell",
|
|
107594
|
+
"aria-busy": "true",
|
|
107595
|
+
role: "status",
|
|
107596
|
+
children: [
|
|
107597
|
+
/* @__PURE__ */ jsx("p", {
|
|
107598
|
+
className: "er-registration-shell__eyebrow",
|
|
107599
|
+
children: "Registration"
|
|
107600
|
+
}),
|
|
107601
|
+
/* @__PURE__ */ jsx("h3", {
|
|
107602
|
+
className: "er-title er-registration-shell__title",
|
|
107603
|
+
children: display.titleText
|
|
107604
|
+
}),
|
|
107605
|
+
/* @__PURE__ */ jsx("p", {
|
|
107606
|
+
className: "er-text er-text--muted",
|
|
107607
|
+
children: "Loading event dates…"
|
|
107608
|
+
}),
|
|
107609
|
+
/* @__PURE__ */ jsxs("div", {
|
|
107610
|
+
className: "er-event-grid er-registration-shell__cards",
|
|
107611
|
+
"aria-hidden": "true",
|
|
107612
|
+
children: [/* @__PURE__ */ jsx("div", { className: "er-event-card er-registration-shell__card" }), /* @__PURE__ */ jsx("div", { className: "er-event-card er-registration-shell__card" })]
|
|
107613
|
+
})
|
|
107614
|
+
]
|
|
107615
|
+
});
|
|
107616
|
+
if (recovery.kind === "exhausted") return /* @__PURE__ */ jsxs("div", {
|
|
107617
|
+
id: EVENT_REGISTRATION_ANCHOR_ID,
|
|
107618
|
+
className: "rb-reg-surface er-container er-registration-shell",
|
|
107619
|
+
role: "alert",
|
|
107620
|
+
children: [/* @__PURE__ */ jsx("p", { children: "We couldn’t load the event dates. Please try again." }), /* @__PURE__ */ jsx("button", {
|
|
107621
|
+
type: "button",
|
|
107622
|
+
className: themeButtonClassName({
|
|
107623
|
+
variant: props.render.hydration.buttonVariant ?? "primary",
|
|
107624
|
+
size: "md"
|
|
107625
|
+
}),
|
|
107626
|
+
onClick: recovery.retry,
|
|
107627
|
+
children: "Try again"
|
|
107628
|
+
})]
|
|
107629
|
+
});
|
|
107630
|
+
const events = resolveEventRegistrationScopedEvents(recovery.events, {
|
|
107631
|
+
occurrenceContext: props.render.hydration.occurrenceContext,
|
|
107632
|
+
subject: props.render.hydration.subject
|
|
107633
|
+
});
|
|
107634
|
+
const recoveredDisplay = buildEventRegistrationDisplayFromScopedEvents({
|
|
107635
|
+
...props.render.hydration,
|
|
107636
|
+
events,
|
|
107637
|
+
className: display.className,
|
|
107638
|
+
buttonText: display.summaryButtonText
|
|
107639
|
+
}, events);
|
|
107640
|
+
if (recoveredDisplay.state === "registration-closed") return /* @__PURE__ */ jsx(RegistrationClosedState, {
|
|
107641
|
+
title: recoveredDisplay.titleText,
|
|
107642
|
+
body: recoveredDisplay.bodyText
|
|
107643
|
+
});
|
|
107644
|
+
return /* @__PURE__ */ jsx(EventRegistrationClient, {
|
|
107645
|
+
...toEventRegistrationClientProps(props, display),
|
|
107646
|
+
events
|
|
107647
|
+
});
|
|
107648
|
+
}
|
|
106868
107649
|
var EventRegistrationClient, EventRegistrationIslandClient;
|
|
106869
107650
|
var init_event_registration_client = __esmMin((() => {
|
|
106870
107651
|
init_EventRegistrationWizard();
|
|
106871
107652
|
init_registrationSurface();
|
|
106872
107653
|
init_constants();
|
|
106873
107654
|
init_PastOccurrenceNotice();
|
|
107655
|
+
init_event_registration_interactive();
|
|
106874
107656
|
init_RegistrationClosedState();
|
|
107657
|
+
init_useEventSourceRecovery();
|
|
107658
|
+
init_eventScope();
|
|
107659
|
+
init_buttons();
|
|
106875
107660
|
EventRegistrationClient = (clientProps) => {
|
|
106876
107661
|
const surface = planEventRegistrationSurface({
|
|
106877
107662
|
events: clientProps.events ?? [],
|
|
@@ -106897,7 +107682,10 @@ var init_event_registration_client = __esmMin((() => {
|
|
|
106897
107682
|
title: props.render.display.titleText,
|
|
106898
107683
|
body: props.render.display.bodyText
|
|
106899
107684
|
});
|
|
106900
|
-
return /* @__PURE__ */ jsx(
|
|
107685
|
+
return /* @__PURE__ */ jsx(RecoverableEventRegistrationClient, {
|
|
107686
|
+
props,
|
|
107687
|
+
display: props.render.display
|
|
107688
|
+
});
|
|
106901
107689
|
};
|
|
106902
107690
|
}));
|
|
106903
107691
|
//#endregion
|
|
@@ -113067,6 +113855,7 @@ function useEventPagination({ siteId: _siteId, initialEvents = [], fetchInitialO
|
|
|
113067
113855
|
const eventSurface = filters?.eventSurface;
|
|
113068
113856
|
const eventPresets = normalizeCsvString(filters?.eventPresets);
|
|
113069
113857
|
const scheduleScope = filters?.scheduleScope;
|
|
113858
|
+
const seriesIds = filters?.seriesIds;
|
|
113070
113859
|
const eventsRef = useRef(events);
|
|
113071
113860
|
const loadingRef = useRef(loading);
|
|
113072
113861
|
const hasMoreRef = useRef(hasMore);
|
|
@@ -113094,6 +113883,7 @@ function useEventPagination({ siteId: _siteId, initialEvents = [], fetchInitialO
|
|
|
113094
113883
|
const currentEvents = eventsRef.current;
|
|
113095
113884
|
const lastEvent = options.reset ? void 0 : currentEvents[currentEvents.length - 1];
|
|
113096
113885
|
const newEvents = await getPublicEvents({
|
|
113886
|
+
seriesIds,
|
|
113097
113887
|
afterStartsAt: lastEvent ? lastEvent.startsAt : void 0,
|
|
113098
113888
|
afterId: lastEvent ? lastEvent.occurrenceId : void 0,
|
|
113099
113889
|
limit: pageSize,
|
|
@@ -113132,6 +113922,7 @@ function useEventPagination({ siteId: _siteId, initialEvents = [], fetchInitialO
|
|
|
113132
113922
|
eventSurface,
|
|
113133
113923
|
eventPresets,
|
|
113134
113924
|
scheduleScope,
|
|
113925
|
+
seriesIds,
|
|
113135
113926
|
normalizedCategoryIds,
|
|
113136
113927
|
normalizedStaffMemberId,
|
|
113137
113928
|
normalizedVenueId
|
|
@@ -113141,7 +113932,7 @@ function useEventPagination({ siteId: _siteId, initialEvents = [], fetchInitialO
|
|
|
113141
113932
|
}, [fetchPage]);
|
|
113142
113933
|
const initialFetchAttemptKeyRef = useRef(null);
|
|
113143
113934
|
useEffect(() => {
|
|
113144
|
-
if (!fetchInitialOnMount) return;
|
|
113935
|
+
if (!fetchInitialOnMount || seriesIds === "") return;
|
|
113145
113936
|
if (!filtersMatchInitial) return;
|
|
113146
113937
|
if (initialEventsRef.current.length > 0) return;
|
|
113147
113938
|
if (eventsRef.current.length > 0) return;
|
|
@@ -113155,7 +113946,8 @@ function useEventPagination({ siteId: _siteId, initialEvents = [], fetchInitialO
|
|
|
113155
113946
|
fetchPage,
|
|
113156
113947
|
filtersKey,
|
|
113157
113948
|
filtersMatchInitial,
|
|
113158
|
-
stage
|
|
113949
|
+
stage,
|
|
113950
|
+
seriesIds
|
|
113159
113951
|
]);
|
|
113160
113952
|
const prevFiltersMatchInitialRef = useRef(filtersMatchInitial);
|
|
113161
113953
|
const prevInitialEventsKeyRef = useRef(initialEventsKey);
|
|
@@ -113290,7 +114082,7 @@ var init_useEventFilters_state = __esmMin((() => {
|
|
|
113290
114082
|
* const events = await api.getPublicEvents(params);
|
|
113291
114083
|
* ```
|
|
113292
114084
|
*/
|
|
113293
|
-
function useEventFilters({ showCategoryFilter = "auto", showVenueFilter = false, showStaffFilter = false, preFilterCategoryIds, preFilterStaffMemberId, preFilterVenueId, preFilterEventSurface, preFilterEventPresets, preFilterScheduleScope } = {}) {
|
|
114085
|
+
function useEventFilters({ showCategoryFilter = "auto", showVenueFilter = false, showStaffFilter = false, preFilterSeriesIds, preFilterCategoryIds, preFilterStaffMemberId, preFilterVenueId, preFilterEventSurface, preFilterEventPresets, preFilterScheduleScope } = {}) {
|
|
113294
114086
|
const api = useBlockApi();
|
|
113295
114087
|
const [loadState, dispatchLoadState] = useReducer(eventFiltersLoadReducer, void 0, createInitialEventFiltersLoadState);
|
|
113296
114088
|
const filters = getEventFiltersData(loadState);
|
|
@@ -113439,6 +114231,7 @@ function useEventFilters({ showCategoryFilter = "auto", showVenueFilter = false,
|
|
|
113439
114231
|
setSelectedVenueId("all");
|
|
113440
114232
|
}, []),
|
|
113441
114233
|
getFilterParams: useCallback(() => {
|
|
114234
|
+
if (preFilterSeriesIds != null) return { seriesIds: preFilterSeriesIds };
|
|
113442
114235
|
const params = {};
|
|
113443
114236
|
if (fixedEventSurface) params.eventSurface = fixedEventSurface;
|
|
113444
114237
|
if (fixedEventPresets) params.eventPresets = fixedEventPresets;
|
|
@@ -113452,6 +114245,7 @@ function useEventFilters({ showCategoryFilter = "auto", showVenueFilter = false,
|
|
|
113452
114245
|
params.staffMemberId = fixedStaffMemberId ?? (selectedStaffMemberId !== "all" ? selectedStaffMemberId : void 0);
|
|
113453
114246
|
return params;
|
|
113454
114247
|
}, [
|
|
114248
|
+
preFilterSeriesIds,
|
|
113455
114249
|
allowedCategoryIds,
|
|
113456
114250
|
allowedCategorySet,
|
|
113457
114251
|
fixedEventPresets,
|
|
@@ -113487,25 +114281,12 @@ var init_EventListing_client = __esmMin((() => {
|
|
|
113487
114281
|
const hydration = render.hydration;
|
|
113488
114282
|
const filtersIdBase = useId();
|
|
113489
114283
|
const initialListEvents = useMemo(() => [...display.events], [display.events]);
|
|
113490
|
-
const initialListFilters =
|
|
113491
|
-
eventSurface: hydration.eventSurface,
|
|
113492
|
-
filterEventPresets: hydration.filterEventPresets,
|
|
113493
|
-
scheduleScope: hydration.scheduleScope,
|
|
113494
|
-
filterCategoryIds: hydration.filterCategoryIds,
|
|
113495
|
-
filterStaffMemberId: hydration.filterStaffMemberId,
|
|
113496
|
-
filterVenueId: hydration.filterVenueId
|
|
113497
|
-
}), [
|
|
113498
|
-
hydration.eventSurface,
|
|
113499
|
-
hydration.filterEventPresets,
|
|
113500
|
-
hydration.scheduleScope,
|
|
113501
|
-
hydration.filterCategoryIds,
|
|
113502
|
-
hydration.filterStaffMemberId,
|
|
113503
|
-
hydration.filterVenueId
|
|
113504
|
-
]);
|
|
114284
|
+
const initialListFilters = buildEventRuntimeFilters(hydration);
|
|
113505
114285
|
const { categories, venues, staffMembers, selectedCategoryId, selectedStaffMemberId, selectedVenueId, loading: filtersLoading, shouldShowCategoryFilter, shouldShowVenueFilter, shouldShowStaffFilter, hasActiveFilters, setSelectedCategoryId, setSelectedStaffMemberId, setSelectedVenueId, resetFilters, getFilterParams } = useEventFilters({
|
|
113506
114286
|
showCategoryFilter: hydration.showFilters ? hydration.showCategoryFilter : "never",
|
|
113507
114287
|
showVenueFilter: hydration.showFilters ? hydration.showVenueFilter : false,
|
|
113508
114288
|
showStaffFilter: hydration.showFilters ? hydration.showStaffFilter : false,
|
|
114289
|
+
preFilterSeriesIds: hydration.seriesIds,
|
|
113509
114290
|
preFilterCategoryIds: hydration.filterCategoryIds ?? void 0,
|
|
113510
114291
|
preFilterStaffMemberId: hydration.filterStaffMemberId ?? void 0,
|
|
113511
114292
|
preFilterVenueId: hydration.filterVenueId ?? void 0,
|
|
@@ -114322,6 +115103,7 @@ function toEventCombinedControllerProps(props) {
|
|
|
114322
115103
|
eventSurface: props.render.display.eventSurface,
|
|
114323
115104
|
filterEventPresets: props.render.display.filterEventPresets,
|
|
114324
115105
|
scheduleScope: props.render.display.scheduleScope,
|
|
115106
|
+
seriesIds: props.render.display.seriesIds,
|
|
114325
115107
|
filterCategoryIds: props.render.display.filterCategoryIds,
|
|
114326
115108
|
filterStaffMemberId: props.render.display.filterStaffMemberId,
|
|
114327
115109
|
filterVenueId: props.render.display.filterVenueId,
|
|
@@ -114457,7 +115239,7 @@ var init_EventCombined_client = __esmMin((() => {
|
|
|
114457
115239
|
EventCombinedClient = ({ events: initialEvents, siteId, stage, listLayout = "stack", listColumns = "3", eventsPerPage = 12, paginationAction = {
|
|
114458
115240
|
kind: "loadMore",
|
|
114459
115241
|
label: "Load more events"
|
|
114460
|
-
}, startOfWeek = "monday", calendarTabViews = "both", defaultCalendarView, showFilters, showCategoryFilter = "auto", showVenueFilter, showStaffFilter, eventSurface, filterEventPresets, scheduleScope, filterCategoryIds, filterStaffMemberId, filterVenueId, showVenue, showMap, showCapacity, cardRole, buttonVariant = "primary", buttonText = "Book", emptyMessage = "No upcoming events scheduled.", className, calendarContext, calendarWindow }) => {
|
|
115242
|
+
}, startOfWeek = "monday", calendarTabViews = "both", defaultCalendarView, showFilters, showCategoryFilter = "auto", showVenueFilter, showStaffFilter, eventSurface, filterEventPresets, scheduleScope, seriesIds, filterCategoryIds, filterStaffMemberId, filterVenueId, showVenue, showMap, showCapacity, cardRole, buttonVariant = "primary", buttonText = "Book", emptyMessage = "No upcoming events scheduled.", className, calendarContext, calendarWindow }) => {
|
|
114461
115243
|
const hydrationReady = useHydrationReady();
|
|
114462
115244
|
const fetchInitialEventsOnMount = initialEvents == null;
|
|
114463
115245
|
const resolvedShowFilters = showFilters ?? true;
|
|
@@ -114483,6 +115265,7 @@ var init_EventCombined_client = __esmMin((() => {
|
|
|
114483
115265
|
showCategoryFilter: resolvedShowFilters ? showCategoryFilter : "never",
|
|
114484
115266
|
showVenueFilter: resolvedShowFilters ? resolvedShowVenueFilter : false,
|
|
114485
115267
|
showStaffFilter: resolvedShowFilters ? resolvedShowStaffFilter : false,
|
|
115268
|
+
preFilterSeriesIds: seriesIds,
|
|
114486
115269
|
preFilterCategoryIds: filterCategoryIds,
|
|
114487
115270
|
preFilterStaffMemberId: filterStaffMemberId,
|
|
114488
115271
|
preFilterVenueId: filterVenueId,
|
|
@@ -114490,21 +115273,15 @@ var init_EventCombined_client = __esmMin((() => {
|
|
|
114490
115273
|
preFilterEventPresets: filterEventPresets,
|
|
114491
115274
|
preFilterScheduleScope: resolvedScheduleScope
|
|
114492
115275
|
});
|
|
114493
|
-
const initialListFilters =
|
|
115276
|
+
const initialListFilters = buildEventRuntimeFilters({
|
|
114494
115277
|
eventSurface: resolvedEventSurface,
|
|
114495
115278
|
filterEventPresets,
|
|
114496
115279
|
scheduleScope: resolvedScheduleScope,
|
|
115280
|
+
seriesIds,
|
|
114497
115281
|
filterCategoryIds,
|
|
114498
115282
|
filterStaffMemberId,
|
|
114499
115283
|
filterVenueId
|
|
114500
|
-
})
|
|
114501
|
-
resolvedEventSurface,
|
|
114502
|
-
filterCategoryIds,
|
|
114503
|
-
filterEventPresets,
|
|
114504
|
-
filterStaffMemberId,
|
|
114505
|
-
filterVenueId,
|
|
114506
|
-
resolvedScheduleScope
|
|
114507
|
-
]);
|
|
115284
|
+
});
|
|
114508
115285
|
const listFilters = useMemo(() => getFilterParams(), [getFilterParams]);
|
|
114509
115286
|
const pageSize = eventsPerPage;
|
|
114510
115287
|
const { events: paginatedEvents, loading: eventsLoading, error: eventsError, hasMore, loadMore } = useEventPagination({
|
|
@@ -114773,6 +115550,7 @@ function useEventCalendarFilterState(display) {
|
|
|
114773
115550
|
showCategoryFilter: display.showFilters ? display.showCategoryFilter : "never",
|
|
114774
115551
|
showVenueFilter: display.showFilters ? display.showVenueFilter : false,
|
|
114775
115552
|
showStaffFilter: display.showFilters ? display.showStaffFilter : false,
|
|
115553
|
+
preFilterSeriesIds: display.seriesIds,
|
|
114776
115554
|
preFilterCategoryIds: display.filterCategoryIds,
|
|
114777
115555
|
preFilterStaffMemberId: display.filterStaffMemberId,
|
|
114778
115556
|
preFilterVenueId: display.filterVenueId,
|
|
@@ -114806,6 +115584,7 @@ function buildDisplayFilterParams(display) {
|
|
|
114806
115584
|
eventSurface: display.eventSurface,
|
|
114807
115585
|
filterEventPresets: display.filterEventPresets,
|
|
114808
115586
|
scheduleScope: display.scheduleScope,
|
|
115587
|
+
seriesIds: display.seriesIds,
|
|
114809
115588
|
filterCategoryIds: display.filterCategoryIds,
|
|
114810
115589
|
filterStaffMemberId: display.filterStaffMemberId,
|
|
114811
115590
|
filterVenueId: display.filterVenueId
|
|
@@ -114852,6 +115631,7 @@ var init_EventCalendar_client = __esmMin((() => {
|
|
|
114852
115631
|
eventSurface: display.eventSurface,
|
|
114853
115632
|
filterEventPresets: display.filterEventPresets,
|
|
114854
115633
|
scheduleScope: display.scheduleScope,
|
|
115634
|
+
seriesIds: display.seriesIds,
|
|
114855
115635
|
filterCategoryIds: display.filterCategoryIds,
|
|
114856
115636
|
filterStaffMemberId: display.filterStaffMemberId,
|
|
114857
115637
|
filterVenueId: display.filterVenueId,
|
|
@@ -114875,6 +115655,7 @@ var init_EventCalendar_client = __esmMin((() => {
|
|
|
114875
115655
|
const { display, hydration } = render;
|
|
114876
115656
|
const filters = useMemo(() => buildDisplayFilterParams(display), [
|
|
114877
115657
|
display.eventSurface,
|
|
115658
|
+
display.seriesIds,
|
|
114878
115659
|
display.filterCategoryIds,
|
|
114879
115660
|
display.filterEventPresets,
|
|
114880
115661
|
display.filterStaffMemberId,
|
|
@@ -115623,6 +116404,11 @@ function NewsletterFormClient({ render }) {
|
|
|
115623
116404
|
const api = useBlockApi();
|
|
115624
116405
|
const [submissionState, dispatchSubmission] = useReducer(newsletterFormSubmissionReducer, initialNewsletterFormSubmissionState);
|
|
115625
116406
|
const [altchaSolution, setAltchaSolution] = useState(null);
|
|
116407
|
+
const successRef = useRef(null);
|
|
116408
|
+
const succeeded = isNewsletterFormSuccess(submissionState);
|
|
116409
|
+
useEffect(() => {
|
|
116410
|
+
if (succeeded) successRef.current?.focus();
|
|
116411
|
+
}, [succeeded]);
|
|
115626
116412
|
const showSpamProtection = render.hydration.spamProtectionEnabled ?? isSpamProtectionEnabled();
|
|
115627
116413
|
const fields = render.display.fields;
|
|
115628
116414
|
const handleSubmit = async (e) => {
|
|
@@ -115655,25 +116441,27 @@ function NewsletterFormClient({ render }) {
|
|
|
115655
116441
|
if (submitTarget.tag === "unavailable") {
|
|
115656
116442
|
dispatchSubmission({
|
|
115657
116443
|
type: "failed",
|
|
115658
|
-
error: newsletterFormError(
|
|
116444
|
+
error: newsletterFormError(SIGNUPS_PAUSED_MESSAGE)
|
|
115659
116445
|
});
|
|
115660
116446
|
return;
|
|
115661
116447
|
}
|
|
115662
116448
|
if (render.hydration.setupRevision === null || render.display.availability === "unavailable") {
|
|
115663
116449
|
dispatchSubmission({
|
|
115664
116450
|
type: "failed",
|
|
115665
|
-
error: newsletterFormError(
|
|
116451
|
+
error: newsletterFormError(SIGNUPS_PAUSED_MESSAGE)
|
|
115666
116452
|
});
|
|
115667
116453
|
return;
|
|
115668
116454
|
}
|
|
115669
|
-
const
|
|
115670
|
-
|
|
116455
|
+
const selection = readVisitorSelection(formData, render.hydration);
|
|
116456
|
+
const selectionError = visitorSelectionError(selection);
|
|
116457
|
+
if (selectionError) {
|
|
115671
116458
|
dispatchSubmission({
|
|
115672
116459
|
type: "failed",
|
|
115673
|
-
error:
|
|
116460
|
+
error: selectionError
|
|
115674
116461
|
});
|
|
115675
116462
|
return;
|
|
115676
116463
|
}
|
|
116464
|
+
const visitorSelection = selection.tag === "chosen" ? selection.value : void 0;
|
|
115677
116465
|
dispatchSubmission({ type: "submitted" });
|
|
115678
116466
|
try {
|
|
115679
116467
|
const result = await api.subscribeNewsletter({
|
|
@@ -115702,71 +116490,27 @@ function NewsletterFormClient({ render }) {
|
|
|
115702
116490
|
} catch (err) {
|
|
115703
116491
|
dispatchSubmission({
|
|
115704
116492
|
type: "failed",
|
|
115705
|
-
error: newsletterFormError(err
|
|
116493
|
+
error: newsletterFormError(transportFailureMessage(err))
|
|
115706
116494
|
});
|
|
115707
116495
|
}
|
|
115708
116496
|
};
|
|
115709
|
-
const
|
|
115710
|
-
const inputId = `newsletter_${field.id}`;
|
|
115711
|
-
const fieldError = getNewsletterSubmissionFieldError(submissionState, field.id);
|
|
115712
|
-
const fieldErrorId = `${inputId}-error`;
|
|
115713
|
-
const validationProps = getFieldValidationControlProps({
|
|
115714
|
-
message: fieldError,
|
|
115715
|
-
messageId: fieldErrorId
|
|
115716
|
-
});
|
|
115717
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
115718
|
-
className: "fb-field newsletter-field",
|
|
115719
|
-
children: [
|
|
115720
|
-
/* @__PURE__ */ jsxs("label", {
|
|
115721
|
-
htmlFor: inputId,
|
|
115722
|
-
className: "form-label",
|
|
115723
|
-
children: [field.label, field.required && /* @__PURE__ */ jsx("span", {
|
|
115724
|
-
className: "newsletter-required",
|
|
115725
|
-
"aria-hidden": "true",
|
|
115726
|
-
children: "*"
|
|
115727
|
-
})]
|
|
115728
|
-
}),
|
|
115729
|
-
/* @__PURE__ */ jsx("input", {
|
|
115730
|
-
id: inputId,
|
|
115731
|
-
name: field.id,
|
|
115732
|
-
type: field.type,
|
|
115733
|
-
required: field.required,
|
|
115734
|
-
placeholder: field.placeholder,
|
|
115735
|
-
className: "form-input",
|
|
115736
|
-
autoComplete: field.type === "email" ? "email" : void 0,
|
|
115737
|
-
disabled: isNewsletterFormSubmitting(submissionState),
|
|
115738
|
-
...validationProps
|
|
115739
|
-
}),
|
|
115740
|
-
fieldError && /* @__PURE__ */ jsx(FieldValidationMessage, {
|
|
115741
|
-
id: fieldErrorId,
|
|
115742
|
-
className: "fb-error",
|
|
115743
|
-
children: fieldError
|
|
115744
|
-
})
|
|
115745
|
-
]
|
|
115746
|
-
}, field.id);
|
|
115747
|
-
};
|
|
116497
|
+
const submitting = isNewsletterFormSubmitting(submissionState);
|
|
115748
116498
|
const formError = getNewsletterSubmissionFormError(submissionState);
|
|
115749
|
-
if (
|
|
115750
|
-
|
|
115751
|
-
|
|
115752
|
-
|
|
115753
|
-
|
|
115754
|
-
|
|
115755
|
-
|
|
115756
|
-
|
|
115757
|
-
|
|
115758
|
-
|
|
115759
|
-
|
|
115760
|
-
}
|
|
116499
|
+
if (succeeded) return /* @__PURE__ */ jsx("div", {
|
|
116500
|
+
ref: successRef,
|
|
116501
|
+
tabIndex: -1,
|
|
116502
|
+
className: clsx("newsletter-form", "newsletter-success", render.display.className ?? void 0),
|
|
116503
|
+
children: /* @__PURE__ */ jsx(FeedbackMessage, {
|
|
116504
|
+
tone: "success",
|
|
116505
|
+
className: "fb-success",
|
|
116506
|
+
role: "status",
|
|
116507
|
+
children: getNewsletterSuccessOutcome(submissionState) === "confirmation_required" ? "Please check your inbox to confirm your signup." : render.display.successMessage
|
|
116508
|
+
})
|
|
116509
|
+
});
|
|
115761
116510
|
if (render.display.availability === "unavailable") return /* @__PURE__ */ jsx(UnavailableNewsletterForm, { className: render.display.className });
|
|
115762
|
-
return /* @__PURE__ */
|
|
116511
|
+
return /* @__PURE__ */ jsx("div", {
|
|
115763
116512
|
className: clsx("newsletter-form", render.display.className ?? void 0),
|
|
115764
|
-
children:
|
|
115765
|
-
tone: "error",
|
|
115766
|
-
className: "fb-error",
|
|
115767
|
-
role: "alert",
|
|
115768
|
-
children: formError
|
|
115769
|
-
}), /* @__PURE__ */ jsxs("form", {
|
|
116513
|
+
children: /* @__PURE__ */ jsxs("form", {
|
|
115770
116514
|
onSubmit: handleSubmit,
|
|
115771
116515
|
className: "fb-form",
|
|
115772
116516
|
children: [
|
|
@@ -115781,18 +116525,15 @@ function NewsletterFormClient({ render }) {
|
|
|
115781
116525
|
/* @__PURE__ */ jsxs("div", {
|
|
115782
116526
|
className: "newsletter-form-fields",
|
|
115783
116527
|
children: [
|
|
115784
|
-
fields.map(
|
|
115785
|
-
|
|
115786
|
-
|
|
115787
|
-
|
|
115788
|
-
|
|
115789
|
-
|
|
115790
|
-
|
|
115791
|
-
|
|
115792
|
-
|
|
115793
|
-
disabled: isNewsletterFormSubmitting(submissionState)
|
|
115794
|
-
}), choice.label]
|
|
115795
|
-
}, choice.id))]
|
|
116528
|
+
fields.map((field) => /* @__PURE__ */ jsx(NewsletterField, {
|
|
116529
|
+
field,
|
|
116530
|
+
submitting,
|
|
116531
|
+
error: getNewsletterSubmissionFieldError(submissionState, field.id)
|
|
116532
|
+
}, field.id)),
|
|
116533
|
+
render.hydration.choicePresentation === "visitor_choice" ? /* @__PURE__ */ jsx(NewsletterTopicChoices, {
|
|
116534
|
+
choices: render.display.choices,
|
|
116535
|
+
submitting,
|
|
116536
|
+
error: getNewsletterSubmissionFieldError(submissionState, TOPIC_CHOICE_FIELD_ID)
|
|
115796
116537
|
}) : null,
|
|
115797
116538
|
showSpamProtection && /* @__PURE__ */ jsx("div", {
|
|
115798
116539
|
className: "newsletter-altcha",
|
|
@@ -115801,6 +116542,12 @@ function NewsletterFormClient({ render }) {
|
|
|
115801
116542
|
onSolutionChange: setAltchaSolution
|
|
115802
116543
|
})
|
|
115803
116544
|
}),
|
|
116545
|
+
formError && /* @__PURE__ */ jsx(FeedbackMessage, {
|
|
116546
|
+
tone: "error",
|
|
116547
|
+
className: "fb-error",
|
|
116548
|
+
role: "alert",
|
|
116549
|
+
children: formError
|
|
116550
|
+
}),
|
|
115804
116551
|
/* @__PURE__ */ jsx("div", {
|
|
115805
116552
|
className: "newsletter-submit",
|
|
115806
116553
|
children: /* @__PURE__ */ jsx("button", {
|
|
@@ -115809,8 +116556,8 @@ function NewsletterFormClient({ render }) {
|
|
|
115809
116556
|
variant: render.display.buttonVariant,
|
|
115810
116557
|
size: "md"
|
|
115811
116558
|
}),
|
|
115812
|
-
disabled:
|
|
115813
|
-
children:
|
|
116559
|
+
disabled: submitting,
|
|
116560
|
+
children: submitting ? "Subscribing..." : render.display.buttonLabel
|
|
115814
116561
|
})
|
|
115815
116562
|
})
|
|
115816
116563
|
]
|
|
@@ -115820,9 +116567,70 @@ function NewsletterFormClient({ render }) {
|
|
|
115820
116567
|
children: render.display.privacyNote
|
|
115821
116568
|
})
|
|
115822
116569
|
]
|
|
115823
|
-
})
|
|
116570
|
+
})
|
|
116571
|
+
});
|
|
116572
|
+
}
|
|
116573
|
+
function NewsletterField({ field, submitting, error }) {
|
|
116574
|
+
const inputId = `newsletter_${field.id}`;
|
|
116575
|
+
const errorId = `${inputId}-error`;
|
|
116576
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
116577
|
+
className: "fb-field newsletter-field",
|
|
116578
|
+
children: [
|
|
116579
|
+
/* @__PURE__ */ jsxs("label", {
|
|
116580
|
+
htmlFor: inputId,
|
|
116581
|
+
className: "form-label",
|
|
116582
|
+
children: [field.label, field.required && /* @__PURE__ */ jsx("span", {
|
|
116583
|
+
className: "newsletter-required",
|
|
116584
|
+
"aria-hidden": "true",
|
|
116585
|
+
children: "*"
|
|
116586
|
+
})]
|
|
116587
|
+
}),
|
|
116588
|
+
/* @__PURE__ */ jsx("input", {
|
|
116589
|
+
id: inputId,
|
|
116590
|
+
name: field.id,
|
|
116591
|
+
type: field.type,
|
|
116592
|
+
required: field.required,
|
|
116593
|
+
placeholder: field.placeholder,
|
|
116594
|
+
className: "form-input",
|
|
116595
|
+
autoComplete: field.type === "email" ? "email" : void 0,
|
|
116596
|
+
disabled: submitting,
|
|
116597
|
+
...getFieldValidationControlProps({
|
|
116598
|
+
message: error,
|
|
116599
|
+
messageId: errorId
|
|
116600
|
+
})
|
|
116601
|
+
}),
|
|
116602
|
+
error && /* @__PURE__ */ jsx(FieldValidationMessage, {
|
|
116603
|
+
id: errorId,
|
|
116604
|
+
className: "fb-error",
|
|
116605
|
+
children: error
|
|
116606
|
+
})
|
|
116607
|
+
]
|
|
115824
116608
|
});
|
|
115825
116609
|
}
|
|
116610
|
+
function NewsletterTopicChoices({ choices, submitting, error }) {
|
|
116611
|
+
const errorId = `newsletter_${TOPIC_CHOICE_FIELD_ID}-error`;
|
|
116612
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("fieldset", {
|
|
116613
|
+
className: "fb-fieldset newsletter-topics",
|
|
116614
|
+
"aria-describedby": error ? errorId : void 0,
|
|
116615
|
+
children: [/* @__PURE__ */ jsx("legend", {
|
|
116616
|
+
className: "form-label",
|
|
116617
|
+
children: "What would you like to hear about?"
|
|
116618
|
+
}), choices.map((choice) => /* @__PURE__ */ jsxs("label", {
|
|
116619
|
+
className: "fb-inline form-label newsletter-topic-choice",
|
|
116620
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
116621
|
+
type: "checkbox",
|
|
116622
|
+
name: TOPIC_CHOICE_FIELD_ID,
|
|
116623
|
+
value: choice.id,
|
|
116624
|
+
className: "form-checkbox",
|
|
116625
|
+
disabled: submitting
|
|
116626
|
+
}), /* @__PURE__ */ jsx("span", { children: choice.label })]
|
|
116627
|
+
}, choice.id))]
|
|
116628
|
+
}), error && /* @__PURE__ */ jsx(FieldValidationMessage, {
|
|
116629
|
+
id: errorId,
|
|
116630
|
+
className: "fb-error",
|
|
116631
|
+
children: error
|
|
116632
|
+
})] });
|
|
116633
|
+
}
|
|
115826
116634
|
function UnavailableNewsletterForm({ className }) {
|
|
115827
116635
|
return /* @__PURE__ */ jsx("div", {
|
|
115828
116636
|
className: clsx("newsletter-form", className ?? void 0),
|
|
@@ -115830,14 +116638,35 @@ function UnavailableNewsletterForm({ className }) {
|
|
|
115830
116638
|
tone: "error",
|
|
115831
116639
|
className: "fb-error",
|
|
115832
116640
|
role: "status",
|
|
115833
|
-
children:
|
|
116641
|
+
children: SIGNUPS_PAUSED_MESSAGE
|
|
115834
116642
|
})
|
|
115835
116643
|
});
|
|
115836
116644
|
}
|
|
116645
|
+
/**
|
|
116646
|
+
* Vetted copy for a request that never produced a signup response. The raw
|
|
116647
|
+
* error text ("Failed to fetch", "received invalid JSON") is for logs, not
|
|
116648
|
+
* visitors.
|
|
116649
|
+
*/
|
|
116650
|
+
function transportFailureMessage(err) {
|
|
116651
|
+
if (err instanceof BlockApiError) {
|
|
116652
|
+
if (err.status === 429) return TOO_MANY_ATTEMPTS_MESSAGE;
|
|
116653
|
+
if (err.status === 403) return "We couldn’t verify this submission. Please try again.";
|
|
116654
|
+
if (err.status === 400 || err.status === 422) return "Please check your details and try again.";
|
|
116655
|
+
}
|
|
116656
|
+
return RETRY_SHORTLY_MESSAGE;
|
|
116657
|
+
}
|
|
116658
|
+
function visitorSelectionError(selection) {
|
|
116659
|
+
switch (selection.tag) {
|
|
116660
|
+
case "nothing_chosen": return newsletterFieldError(TOPIC_CHOICE_FIELD_ID, "Choose at least one email topic.");
|
|
116661
|
+
case "unusable": return newsletterFormError(SIGNUPS_PAUSED_MESSAGE);
|
|
116662
|
+
case "not_offered":
|
|
116663
|
+
case "chosen": return null;
|
|
116664
|
+
}
|
|
116665
|
+
}
|
|
115837
116666
|
function readVisitorSelection(formData, hydration) {
|
|
115838
|
-
if (hydration.choicePresentation !== "visitor_choice") return
|
|
115839
|
-
const ids = formData.getAll(
|
|
115840
|
-
if (ids.length === 0) return
|
|
116667
|
+
if (hydration.choicePresentation !== "visitor_choice") return { tag: "not_offered" };
|
|
116668
|
+
const ids = formData.getAll(TOPIC_CHOICE_FIELD_ID).flatMap((value) => typeof value === "string" ? [value] : []);
|
|
116669
|
+
if (ids.length === 0) return { tag: "nothing_chosen" };
|
|
115841
116670
|
const raw = hydration.choiceProvider === "native" ? {
|
|
115842
116671
|
provider: "native",
|
|
115843
116672
|
topicIds: ids
|
|
@@ -115848,9 +116677,12 @@ function readVisitorSelection(formData, hydration) {
|
|
|
115848
116677
|
provider: "mailchimp",
|
|
115849
116678
|
interestIds: ids
|
|
115850
116679
|
} : null;
|
|
115851
|
-
if (raw === null) return
|
|
116680
|
+
if (raw === null) return { tag: "unusable" };
|
|
115852
116681
|
const parsed = parseMailingListVisitorSelection(raw);
|
|
115853
|
-
return parsed.ok ?
|
|
116682
|
+
return parsed.ok ? {
|
|
116683
|
+
tag: "chosen",
|
|
116684
|
+
value: parsed.value
|
|
116685
|
+
} : { tag: "unusable" };
|
|
115854
116686
|
}
|
|
115855
116687
|
function publicSignupError(outcome) {
|
|
115856
116688
|
switch (outcome.tag) {
|
|
@@ -115858,15 +116690,15 @@ function publicSignupError(outcome) {
|
|
|
115858
116690
|
case "unavailable": switch (outcome.reason) {
|
|
115859
116691
|
case "configuration_unavailable":
|
|
115860
116692
|
case "authentication_failed":
|
|
115861
|
-
case "target_unavailable": return
|
|
116693
|
+
case "target_unavailable": return SIGNUPS_PAUSED_MESSAGE;
|
|
115862
116694
|
case "stale_configuration": return "This signup form has changed. Refresh the page, then try again.";
|
|
115863
|
-
case "
|
|
115864
|
-
case "
|
|
115865
|
-
case "temporarily_unavailable": return "We could not sign you up just now. Please try again shortly.";
|
|
116695
|
+
case "rate_limited": return TOO_MANY_ATTEMPTS_MESSAGE;
|
|
116696
|
+
case "temporarily_unavailable": return RETRY_SHORTLY_MESSAGE;
|
|
115866
116697
|
}
|
|
115867
116698
|
case "uncertain": return "We could not confirm whether your signup completed. Please wait a moment, then try again.";
|
|
115868
116699
|
}
|
|
115869
116700
|
}
|
|
116701
|
+
var TOPIC_CHOICE_FIELD_ID, SIGNUPS_PAUSED_MESSAGE, RETRY_SHORTLY_MESSAGE, TOO_MANY_ATTEMPTS_MESSAGE;
|
|
115870
116702
|
var init_newsletter_form_client = __esmMin((() => {
|
|
115871
116703
|
init_clsx();
|
|
115872
116704
|
init_client();
|
|
@@ -115878,6 +116710,10 @@ var init_newsletter_form_client = __esmMin((() => {
|
|
|
115878
116710
|
init_FieldValidationMessage();
|
|
115879
116711
|
init_newsletter_form_client_state();
|
|
115880
116712
|
init_newsletter_form_submission();
|
|
116713
|
+
TOPIC_CHOICE_FIELD_ID = "mailingListChoice";
|
|
116714
|
+
SIGNUPS_PAUSED_MESSAGE = "We can’t accept signups right now. Please try again later.";
|
|
116715
|
+
RETRY_SHORTLY_MESSAGE = "We couldn’t confirm your signup. Please try again in a little while.";
|
|
116716
|
+
TOO_MANY_ATTEMPTS_MESSAGE = "There have been too many signup attempts. Please wait a moment and try again.";
|
|
115881
116717
|
}));
|
|
115882
116718
|
//#endregion
|
|
115883
116719
|
//#region ../blocks/src/system/runtime/nodes/weekly-slot-availability.client.state.ts
|