@riverbankcms/sdk 0.151.0 → 0.152.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/CHANGELOG.md +37 -0
- package/dist/{EventEmbeddedCheckoutStep-BBHbM22D.mjs → EventEmbeddedCheckoutStep-DVQXWFm6.mjs} +10 -9
- package/dist/{PreviewEditorSidebar-BHplI9HE.mjs → PreviewEditorSidebar-Dr4NJi3Q.mjs} +4 -3
- package/dist/{PreviewEditorUI-DuyN8nsD.mjs → PreviewEditorUI-DSZXQbyh.mjs} +5 -4
- package/dist/{SdkPreviewModeRuntime-CR5ypwxJ.mjs → SdkPreviewModeRuntime-Dl4GyMc3.mjs} +124 -53
- package/dist/{SiteChromeCustomizeContext-D5t6joF_.mjs → SiteChromeCustomizeContext-DgBe-FlM.mjs} +20418 -32298
- package/dist/ThemedButton-B8ViBnLK.mjs +16350 -0
- package/dist/_dts/api/src/bookingOperations.d.ts +5 -3
- package/dist/_dts/api/src/commercePortalEndpoints.d.ts +4 -0
- package/dist/_dts/api/src/endpoints.d.ts +7 -0
- package/dist/_dts/api/src/index.d.ts +1 -1
- package/dist/_dts/api/src/navigation/types.d.ts +7 -0
- package/dist/_dts/api/src/navigation.d.ts +1 -1
- package/dist/_dts/api/src/publicAppointmentBookingContracts.d.ts +10 -1
- package/dist/_dts/api/src/siteAssets.d.ts +1 -0
- package/dist/_dts/blocks/src/definitions.d.ts +1 -1
- package/dist/_dts/blocks/src/index.d.ts +1 -0
- package/dist/_dts/blocks/src/pageRenderPreparation.d.ts +1 -0
- package/dist/_dts/blocks/src/pageRendererContracts.d.ts +1 -1
- package/dist/_dts/blocks/src/primitives/content/utils/sanitizeHref.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/event-registration.d.ts +4 -4
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +16 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +5 -0
- package/dist/_dts/blocks/src/system/blocks/offerings-preview/model.d.ts +2 -0
- package/dist/_dts/blocks/src/system/helpers/normalizeMailingListBlockContent.d.ts +2 -0
- package/dist/_dts/blocks/src/system/registry.d.ts +14 -2
- package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +0 -5
- package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/api/schemas/events.d.ts +971 -0
- package/dist/_dts/blocks/src/system/runtime/api/schemas/waitlist-claims.d.ts +42 -0
- package/dist/_dts/blocks/src/system/runtime/api/types/appointments.d.ts +10 -2
- package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +10 -136
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +48 -6
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +24 -3
- package/dist/_dts/blocks/src/system/runtime/hooks/useBookingSubmission.state.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.d.ts +3 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.state.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +23 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +6 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/carousel.client.hooks.d.ts +6 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/carousel.client.state.d.ts +7 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/BookingEntryViews.d.ts +42 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventEmbeddedCheckoutStep.d.ts +4 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationBookingLayer.d.ts +19 -9
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationPayment.d.ts +4 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationSurface.d.ts +24 -9
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizardContent.d.ts +4 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/EventSelectionStep.d.ts +5 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/GuestDetailsSection.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/PaymentStatusStep.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/SingleTicketEntitlementNote.d.ts +11 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/SuccessStep.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/TicketSelectionStep.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/VerifyingTimeoutStep.d.ts +2 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/bookingCardDisplay.d.ts +31 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/bookingEntry.d.ts +154 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/bookingFocus.d.ts +12 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.planning.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventSourceRecovery.d.ts +9 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/finishedBooking.d.ts +77 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/index.d.ts +0 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/offeringNoun.d.ts +12 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/paymentResponse.d.ts +2 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationCompletion.d.ts +33 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationDerivations.d.ts +11 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationDisplay.d.ts +31 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationDraft.state.d.ts +60 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationErrorRecovery.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationEventAdapter.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationStateMachine.d.ts +58 -10
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/registrationSurface.d.ts +17 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +23 -7
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useBookingBarFacts.d.ts +12 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationRecoveryRequest.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationStripeReturn.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +4 -11
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +1563 -31
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventSourceRecovery.d.ts +2 -12
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/usePaymentStatusRecovery.d.ts +147 -4
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/utils.d.ts +50 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/waitlistClaimRestoration.d.ts +6 -5
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/wizardSteps.d.ts +85 -15
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +53 -8
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/MonthLookView.d.ts +10 -3
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +16 -0
- package/dist/_dts/blocks/src/system/runtime/shared/bookingPaymentOptionCopy.d.ts +5 -1
- package/dist/_dts/blocks/src/system/runtime/shared/bookingPaymentOptions.d.ts +37 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/ModalShell.d.ts +9 -2
- package/dist/_dts/blocks/src/system/runtime/shared/components/PaymentChoiceRows.d.ts +28 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/StepIndicator.d.ts +6 -8
- package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/shared/index.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.d.ts +9 -12
- package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.state.d.ts +15 -0
- package/dist/_dts/blocks/src/system/runtime/shared/utils/themePortalRoot.d.ts +10 -15
- package/dist/_dts/blocks/src/system/transforms/registry/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/transforms/registry/links.d.ts +3 -1
- package/dist/_dts/commerce/src/purchase/bookingInstalmentSchedule.d.ts +2 -0
- package/dist/_dts/commerce/src/purchase/bookingPaymentSelection.d.ts +6 -0
- package/dist/_dts/commerce/src/purchase/confirmationEmailPayment.d.ts +14 -14
- package/dist/_dts/commerce/src/purchase/confirmationPayment.d.ts +65 -0
- package/dist/_dts/commerce/src/purchase/confirmationPaymentSchema.d.ts +66 -0
- package/dist/_dts/commerce/src/purchase/index.d.ts +2 -0
- package/dist/_dts/commerce/src/purchase/orderPaymentState.d.ts +8 -0
- package/dist/_dts/content-model/src/templates/defaults.d.ts +2 -2
- package/dist/_dts/core/src/appointment-booking-terms.d.ts +20 -0
- package/dist/_dts/core/src/booking-payment-schemas.d.ts +70 -0
- package/dist/_dts/core/src/branded.d.ts +0 -2
- package/dist/_dts/core/src/demo-claim-access.d.ts +1 -1
- package/dist/_dts/core/src/demo-claim-readiness.d.ts +18 -0
- package/dist/_dts/core/src/demo-lifecycle-status.d.ts +1 -1
- package/dist/_dts/core/src/demo-warm-pool-target.d.ts +1 -1
- package/dist/_dts/core/src/index.d.ts +4 -0
- package/dist/_dts/core/src/mailing-list-targeting-availability.d.ts +68 -0
- package/dist/_dts/core/src/mailing-list-targeting.d.ts +2 -0
- package/dist/_dts/core/src/ticket-quantity.d.ts +13 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +51 -32
- package/dist/_dts/editor/src/chrome/chromeLayers.d.ts +7 -0
- package/dist/_dts/editor/src/index.d.ts +1 -0
- package/dist/_dts/editor-blocks/src/widgets/link/LinkAddressInput.d.ts +8 -0
- package/dist/_dts/editor-blocks/src/widgets/link/LinkContentList.d.ts +12 -0
- package/dist/_dts/editor-blocks/src/widgets/link/LinkPicker.d.ts +5 -1
- package/dist/_dts/editor-blocks/src/widgets/link/LinkPickerDialog.d.ts +3 -3
- package/dist/_dts/editor-blocks/src/widgets/link/LinkSummary.d.ts +8 -2
- package/dist/_dts/editor-blocks/src/widgets/link/LinkWidget.d.ts +4 -3
- package/dist/_dts/editor-blocks/src/widgets/link/LinkWidgetContext.d.ts +2 -1
- package/dist/_dts/editor-blocks/src/widgets/link/draft.d.ts +44 -0
- package/dist/_dts/editor-blocks/src/widgets/link/presentation.d.ts +13 -0
- package/dist/_dts/editor-blocks/src/widgets/link/types.d.ts +14 -0
- package/dist/_dts/editor-blocks/src/widgets/link/useRoutableContent.d.ts +2 -0
- package/dist/_dts/editor-blocks/src/widgets/link/utils.d.ts +5 -4
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/MailingListTargetingField.d.ts +1 -1
- package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/targetingState.d.ts +13 -8
- package/dist/_dts/media-core/src/fileStorage.d.ts +4 -3
- package/dist/_dts/media-core/src/index.d.ts +1 -0
- package/dist/_dts/media-core/src/storageObjectKey.d.ts +12 -0
- package/dist/_dts/media-react/src/hooks/useSupabaseMediaUploader.d.ts +1 -1
- package/dist/_dts/media-react/src/internal/supabaseResumableUpload.d.ts +13 -0
- package/dist/_dts/preview-next/src/client/preview/previewModeRootAttribute.d.ts +11 -0
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +0 -1
- package/dist/_dts/sdk/src/rendering/image.d.ts +10 -0
- package/dist/_dts/sdk/src/rendering/index.d.ts +3 -1
- package/dist/_dts/sdk/src/rendering/link.d.ts +9 -0
- package/dist/_dts/sdk/src/rendering/overrides.d.ts +1 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/blocks/opaquePanels.d.ts +3 -3
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/client/BookingMailingListNote-CBuMKN0w.mjs +386 -0
- package/dist/client/{CardListItem-ZDLYh6dL.mjs → CardListItem-Dc9XTXhB.mjs} +3 -4
- package/dist/client/CheckIcon-CpyXr-Kg.mjs +35 -0
- package/dist/client/{CheckboxChoice-M-3HycLw.mjs → CheckboxChoice-CIqx_o0E.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-BMtvPTWE.mjs → DemoBookingPortalAccess-D3VQ_kLj.mjs} +85 -85
- package/dist/client/{EventCombined.client-DUm_DOxW.mjs → EventCombined.client-BHGEKise.mjs} +8 -9
- package/dist/client/{EventEmbeddedCheckoutStep-DsNNzgRm.mjs → EventEmbeddedCheckoutStep-Bo1Cm23R.mjs} +11 -10
- package/dist/client/{EventListing.client-DjNYGUVm.mjs → EventListing.client-D5OQgVPr.mjs} +2 -2
- package/dist/client/{LeafletStaticMap-DuFiOHq_.mjs → LeafletStaticMap-CLL5cWrr.mjs} +1 -1
- package/dist/client/{ModalShell-CqkBvBIC.mjs → ModalShell-BXzucfR6.mjs} +83 -12
- package/dist/client/{RichText-LjPCUGGi.mjs → RichText-BoDmnopf.mjs} +6 -3
- package/dist/client/{ThemedButton-DZKjtaDD.mjs → ThemedButton-Ciltp0IK.mjs} +2 -2
- package/dist/client/{accordion-Qe--SILD.mjs → accordion-DOkRS64-.mjs} +1 -1
- package/dist/client/aspectTransforms-D-TnDdq4.mjs +93 -0
- package/dist/client/{bookingForm-3BCl4g_f.mjs → bookingForm-wlMVwo9h.mjs} +289 -149
- package/dist/client/bookings.mjs +12212 -10832
- package/dist/client/{carousel-h2YjKOS2.mjs → carousel-CGWk-Z0u.mjs} +2 -2
- package/dist/client/{carousel.client-BLrd4hmY.mjs → carousel.client-kX5mN1Eg.mjs} +46 -41
- package/dist/client/{cart-5NeiigVd.mjs → cart-OBBPlaH4.mjs} +3 -3
- package/dist/client/{checkout-G4UWjOEw.mjs → checkout-Bmw2WjQX.mjs} +3 -3
- package/dist/client/client.mjs +9541 -6039
- package/dist/client/{colorStyles-DTunOThj.mjs → colorStyles-ECDNPE_P.mjs} +23 -86
- package/dist/client/{context-GK4-AVAh.mjs → context-BI77UFAn.mjs} +275 -10
- package/dist/client/{eventCalendar-Prw3Yo_L.mjs → eventCalendar-qkej2Edn.mjs} +19 -17
- package/dist/client/{eventCombined-BUugi6__.mjs → eventCombined-DApKHvat.mjs} +4 -4
- package/dist/client/{eventDetails-CBHUda-R.mjs → eventDetails-BQyUDPH0.mjs} +3 -4
- package/dist/client/{eventListing-CQeG45Dg.mjs → eventListing-CeAnshlZ.mjs} +4 -4
- package/dist/client/{eventRegistration-Dif3p3oJ.mjs → eventRegistration-C3A3NyBO.mjs} +2209 -2144
- package/dist/client/{form-Cf0WMtfG.mjs → form-DW8rU7jO.mjs} +6 -6
- package/dist/client/{headerSection-Bqdr3JWp.mjs → headerSection-CkIhsoNm.mjs} +9 -9
- package/dist/client/hooks.mjs +1289 -380
- package/dist/client/{locationMap-BVvPou4O.mjs → locationMap-D4O8wbli.mjs} +4 -4
- package/dist/client/{media-47fcnhzD.mjs → media-C5K_0xPd.mjs} +2 -2
- package/dist/client/{newsletterForm-Cx-1dnic.mjs → newsletterForm-B7IxSPuz.mjs} +5 -5
- package/dist/client/{productDetail-DaUMaJYk.mjs → productDetail-Bqxpwy5N.mjs} +3 -3
- package/dist/client/{productList-BKQlWEKE.mjs → productList-u9Lz8V15.mjs} +3 -3
- package/dist/client/{propsDecoder-DO5iXphQ.mjs → propsDecoder-Bf1jucUp.mjs} +17333 -14489
- package/dist/client/rendering/client.mjs +58216 -55133
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +9099 -5636
- package/dist/client/{routeIslandApiConfig-BNm0Z3-g.mjs → routeIslandApiConfig-BgP-aPMl.mjs} +1 -1
- package/dist/client/{shop-D7ytcFBC.mjs → shop-B_eykR-_.mjs} +16 -14
- package/dist/client/{shop-commerce-D68-hHy2.mjs → shop-commerce-CT0APkFV.mjs} +9 -9
- package/dist/client/{shop-commerce-store-Cu7X2lyu.mjs → shop-commerce-store-DcvZxdEK.mjs} +1 -1
- package/dist/client/{shopShared-D12rxE69.mjs → shopShared-BVJOiUiJ.mjs} +5 -5
- package/dist/client/themePortalRoot-DS92SRVZ.mjs +47 -0
- package/dist/client/{TerminalPanel-DOTSUCO0.mjs → useDiscountCodeUi-DPmYDunz.mjs} +60 -77
- package/dist/client/{useEventPagination-jgKa67KV.mjs → useEventPagination-8-U55vH5.mjs} +7 -8
- package/dist/preview-next/before-render.mjs +7 -0
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/keepAlive.mjs +7 -0
- package/dist/preview-next/middleware.mjs +7 -0
- package/dist/{sdk-runtime-4cCWO_3i.mjs → sdk-runtime-C5jPdSrk.mjs} +1 -1
- package/dist/server/components.mjs +3138 -1373
- package/dist/server/config-validation.mjs +1395 -486
- package/dist/server/config.mjs +1395 -486
- package/dist/server/data.mjs +1289 -380
- package/dist/server/index.mjs +8 -1
- package/dist/server/next.mjs +3362 -1538
- package/dist/server/page-converter.mjs +1357 -453
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +2335 -1044
- package/dist/server/rendering.mjs +3152 -1370
- package/dist/server/routing.mjs +1437 -490
- package/dist/server/server.mjs +1297 -381
- package/dist/server/theme-bridge.mjs +1135 -795
- package/dist/{spinner-tSdG9YvG.mjs → spinner-B-ab2rJp.mjs} +1 -1
- package/dist/styles/index.css +1088 -721
- package/package.json +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/OrderSummary.d.ts +0 -15
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useWaitlistClaimRestoration.d.ts +0 -22
- package/dist/_dts/blocks/src/system/runtime/shared/components/SelectableOptionCard.d.ts +0 -30
- package/dist/client/BookingMailingListNote-DlDSs5Vm.mjs +0 -567
- package/dist/client/pricing-CMD0kADd.mjs +0 -314
- package/dist/client/result-DRW7JWXz.mjs +0 -30
- package/dist/client/scrollToBlock-C86BYkyV.mjs +0 -17
- package/dist/client/themePortalRoot-AGs4cE7t.mjs +0 -30
- package/dist/spinner-BL3kW9Uh.mjs +0 -803
|
@@ -1,94 +1,31 @@
|
|
|
1
|
-
import { n as ok, t as err } from "./result-DRW7JWXz.mjs";
|
|
2
1
|
import { z } from "zod";
|
|
3
|
-
//#region
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
if (typeof
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
//#region ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
3
|
+
function r(e) {
|
|
4
|
+
var t, f, n = "";
|
|
5
|
+
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
6
|
+
else if ("object" == typeof e) if (Array.isArray(e)) {
|
|
7
|
+
var o = e.length;
|
|
8
|
+
for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
9
|
+
} else for (f in e) e[f] && (n && (n += " "), n += f);
|
|
10
|
+
return n;
|
|
11
|
+
}
|
|
12
|
+
function clsx() {
|
|
13
|
+
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
14
|
+
return n;
|
|
11
15
|
}
|
|
12
|
-
const unsafeAsEventOfferingId = (id) => id;
|
|
13
|
-
const unsafeAsEventSeriesId = (id) => id;
|
|
14
|
-
const unsafeAsMediaAssetId = (id) => id;
|
|
15
|
-
const unsafeAsStorageBucketName = (value) => value;
|
|
16
|
-
const unsafeAsStoragePath = (value) => value;
|
|
17
|
-
const unsafeAsFormId = (id) => id;
|
|
18
|
-
const unsafeAsPassId = (id) => id;
|
|
19
|
-
const unsafeAsCustomerPassId = (id) => id;
|
|
20
|
-
const unsafeAsAppointmentServiceId = (id) => id;
|
|
21
|
-
const unsafeAsAppointmentResourceId = (id) => id;
|
|
22
|
-
const unsafeAsContentVersionId = (id) => id;
|
|
23
|
-
const parseEventOfferingId = (value) => parseUuidBrand(value, unsafeAsEventOfferingId);
|
|
24
|
-
const parseContentVersionId = (value) => parseUuidBrand(value, unsafeAsContentVersionId);
|
|
25
|
-
const parseEventSeriesId = (value) => parseUuidBrand(value, unsafeAsEventSeriesId);
|
|
26
16
|
//#endregion
|
|
27
|
-
//#region ../
|
|
28
|
-
function
|
|
29
|
-
if (!Array.isArray(rect) || rect.length !== 4) return false;
|
|
30
|
-
const [left, top, width, height] = rect;
|
|
31
|
-
return Number.isFinite(left) && Number.isFinite(top) && Number.isFinite(width) && Number.isFinite(height) && left >= 0 && top >= 0 && width > 0 && height > 0;
|
|
32
|
-
}
|
|
33
|
-
//#endregion
|
|
34
|
-
//#region ../media-core/src/aspectTransforms.ts
|
|
35
|
-
const DEFAULT_RECT_EPSILON = .5;
|
|
36
|
-
function parseAspectRatioValue(value) {
|
|
37
|
-
if (typeof value === "number") return Number.isFinite(value) && value > 0 ? value : void 0;
|
|
38
|
-
if (typeof value !== "string") return void 0;
|
|
39
|
-
const normalized = value.trim();
|
|
40
|
-
if (!normalized) return void 0;
|
|
41
|
-
if (normalized === "auto") return void 0;
|
|
42
|
-
if (normalized.includes(":") || normalized.includes("/")) {
|
|
43
|
-
const delimiter = normalized.includes(":") ? ":" : "/";
|
|
44
|
-
const [wRaw, hRaw] = normalized.split(delimiter);
|
|
45
|
-
const width = Number(wRaw?.trim());
|
|
46
|
-
const height = Number(hRaw?.trim());
|
|
47
|
-
if (!Number.isFinite(width) || !Number.isFinite(height) || width <= 0 || height <= 0) return;
|
|
48
|
-
return width / height;
|
|
49
|
-
}
|
|
50
|
-
const numeric = Number(normalized);
|
|
51
|
-
if (!Number.isFinite(numeric) || numeric <= 0) return void 0;
|
|
52
|
-
return numeric;
|
|
53
|
-
}
|
|
54
|
-
const MAX_ASPECT_DISTANCE = .25;
|
|
55
|
-
function resolveMediaTransformForAspect(transform, targetAspect) {
|
|
56
|
-
if (!transform) return {};
|
|
57
|
-
const base = {
|
|
58
|
-
rect: transform.rect,
|
|
59
|
-
hotspot: transform.hotspot,
|
|
60
|
-
rotation: transform.rotation
|
|
61
|
-
};
|
|
62
|
-
const target = parseAspectRatioValue(targetAspect);
|
|
63
|
-
const crops = transform.aspectCrops;
|
|
64
|
-
if (!target || !crops || Object.keys(crops).length === 0) return base;
|
|
65
|
-
let best = null;
|
|
66
|
-
let bestDistance = Number.POSITIVE_INFINITY;
|
|
67
|
-
for (const [key, candidate] of Object.entries(crops)) {
|
|
68
|
-
const candidateAspect = parseAspectRatioValue(candidate.aspect ?? key);
|
|
69
|
-
if (!candidateAspect) continue;
|
|
70
|
-
const distance = Math.abs(Math.log(candidateAspect / target));
|
|
71
|
-
if (distance < bestDistance) {
|
|
72
|
-
best = candidate;
|
|
73
|
-
bestDistance = distance;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
if (!best) return base;
|
|
77
|
-
if (bestDistance > MAX_ASPECT_DISTANCE) return base;
|
|
17
|
+
//#region ../core/src/result.ts
|
|
18
|
+
function ok(value) {
|
|
78
19
|
return {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
rotation: best.rotation ?? base.rotation
|
|
20
|
+
ok: true,
|
|
21
|
+
value
|
|
82
22
|
};
|
|
83
23
|
}
|
|
84
|
-
function
|
|
85
|
-
return
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
if (!(typeof sourceWidth === "number" && Number.isFinite(sourceWidth) && sourceWidth > 0 && typeof sourceHeight === "number" && Number.isFinite(sourceHeight) && sourceHeight > 0)) return true;
|
|
90
|
-
const [x, y, width, height] = rect;
|
|
91
|
-
return !(Math.abs(x) <= epsilon && Math.abs(y) <= epsilon && Math.abs(width - sourceWidth) <= epsilon && Math.abs(height - sourceHeight) <= epsilon);
|
|
24
|
+
function err(error) {
|
|
25
|
+
return {
|
|
26
|
+
ok: false,
|
|
27
|
+
error
|
|
28
|
+
};
|
|
92
29
|
}
|
|
93
30
|
//#endregion
|
|
94
31
|
//#region ../theme-core/src/surfaces/foregroundContract.ts
|
|
@@ -1313,4 +1250,4 @@ function mergeStyles(...styles) {
|
|
|
1313
1250
|
return Object.keys(merged).length ? merged : void 0;
|
|
1314
1251
|
}
|
|
1315
1252
|
//#endregion
|
|
1316
|
-
export { themeColorTokenSchema as A,
|
|
1253
|
+
export { themeColorTokenSchema as A, paletteColorsSchema as C, requirePaletteColorsFromEntries as D, paletteValueKeySchema as E, clsx as F, hexToRgb as M, err as N, parseThemeColorToken as O, ok as P, paletteColorsFromEntries as S, paletteValueKey as T, buttonSystemSchema as _, isCssColorLiteral as a, hexColorSchema as b, tokenOrCssColorValueSchema as c, mapButtonRoleAppearances as d, mapButtonVisualAppearances as f, buttonSizeNameSchema as g, VARIANT_ROLES as h, opaqueSurfaceDeclarations as i, relativeLuminance as j, themeColorShadeSteps as k, PUBLIC_BUTTON_ROLES as l, DEFAULT_VARIANT_ALIAS_ID as m, mergeStyles as n, resolveOnColorForThemeToken as o, resolveButtonStyleRecipe as p, textColorStyle as r, resolveTokenOrCssColorValue as s, backgroundColorStyle as t, defineButtonStyleRecipe as u, buttonVisualStatesSchema as v, paletteModeSchema as w, paletteColorEntries as x, unsafeAsOpaqueButtonColourToken as y };
|
|
@@ -1,7 +1,252 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { Zr as confirmationPaymentSchema, hn as calendarWindowPageSchema } from "./propsDecoder-Bf1jucUp.mjs";
|
|
3
3
|
import { createContext, useContext, useMemo } from "react";
|
|
4
|
+
import { z } from "zod";
|
|
4
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
//#region ../blocks/src/system/runtime/api/schemas/waitlist-claims.ts
|
|
7
|
+
const attendanceMode = z.enum(["in_person", "online"]);
|
|
8
|
+
const ticketSelection = z.object({
|
|
9
|
+
pricingOptionId: z.string().uuid().nullable(),
|
|
10
|
+
quantity: z.number().int().positive()
|
|
11
|
+
}).strict();
|
|
12
|
+
const subject = z.discriminatedUnion("kind", [z.object({
|
|
13
|
+
kind: z.literal("event_occurrence"),
|
|
14
|
+
occurrenceId: z.string().uuid(),
|
|
15
|
+
attendanceMode
|
|
16
|
+
}).strict(), z.object({
|
|
17
|
+
kind: z.literal("whole_series"),
|
|
18
|
+
eventSeriesId: z.string().uuid(),
|
|
19
|
+
attendanceMode,
|
|
20
|
+
ticketSelections: z.array(ticketSelection).nonempty().readonly(),
|
|
21
|
+
seatCount: z.number().int().positive(),
|
|
22
|
+
selectedSlidingAmount: z.number().int().nonnegative().nullable()
|
|
23
|
+
}).strict().refine((value) => value.seatCount === value.ticketSelections.reduce((total, line) => total + line.quantity, 0), { message: "Seat count must match the reserved selection" })]);
|
|
24
|
+
const identity = {
|
|
25
|
+
email: z.string().email(),
|
|
26
|
+
name: z.string(),
|
|
27
|
+
phone: z.string().nullable()
|
|
28
|
+
};
|
|
29
|
+
/** Decode once before invitation restoration or admission consumes the response. */
|
|
30
|
+
const waitlistClaimResponseSchema = z.object({
|
|
31
|
+
subject,
|
|
32
|
+
expiresAt: z.string().datetime({ offset: true }),
|
|
33
|
+
customer: z.object(identity).strict(),
|
|
34
|
+
prefill: z.object({
|
|
35
|
+
...identity,
|
|
36
|
+
notes: z.string().nullable(),
|
|
37
|
+
guests: z.array(z.object({
|
|
38
|
+
name: z.string(),
|
|
39
|
+
email: z.string().nullable().optional(),
|
|
40
|
+
phone: z.string().nullable()
|
|
41
|
+
}).strict()).readonly()
|
|
42
|
+
}).strict()
|
|
43
|
+
}).strict();
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region ../blocks/src/system/runtime/api/schemas/events.ts
|
|
46
|
+
const uuid = z.string().uuid();
|
|
47
|
+
const eventRegistrationStatusReferenceSchema = z.discriminatedUnion("scope", [z.object({
|
|
48
|
+
scope: z.literal("occurrence"),
|
|
49
|
+
attendeeId: uuid
|
|
50
|
+
}).strict(), z.object({
|
|
51
|
+
scope: z.literal("wholeSeries"),
|
|
52
|
+
registrationId: uuid
|
|
53
|
+
}).strict()]);
|
|
54
|
+
const eventRegistrationPaymentSubjectSchema = z.discriminatedUnion("scope", [z.object({
|
|
55
|
+
scope: z.literal("occurrence"),
|
|
56
|
+
submissionId: uuid,
|
|
57
|
+
attendeeId: uuid
|
|
58
|
+
}).strict(), z.object({
|
|
59
|
+
scope: z.literal("wholeSeries"),
|
|
60
|
+
submissionId: uuid
|
|
61
|
+
}).strict()]);
|
|
62
|
+
const identityFields = {
|
|
63
|
+
submissionId: uuid,
|
|
64
|
+
seriesId: uuid,
|
|
65
|
+
attendanceMode: z.enum(["in_person", "online"])
|
|
66
|
+
};
|
|
67
|
+
const confirmedBookingIdentitySchema = z.discriminatedUnion("scope", [z.object({
|
|
68
|
+
scope: z.literal("occurrence"),
|
|
69
|
+
attendeeId: uuid,
|
|
70
|
+
occurrenceId: uuid,
|
|
71
|
+
...identityFields
|
|
72
|
+
}).strict(), z.object({
|
|
73
|
+
scope: z.literal("wholeSeries"),
|
|
74
|
+
registrationId: uuid,
|
|
75
|
+
...identityFields
|
|
76
|
+
}).strict()]);
|
|
77
|
+
const bookedTicketLineSchema = z.object({
|
|
78
|
+
label: z.string().min(1),
|
|
79
|
+
quantity: z.number().int().positive()
|
|
80
|
+
}).strict();
|
|
81
|
+
const eventBookingOutcomeSchema = z.discriminatedUnion("kind", [z.object({
|
|
82
|
+
kind: z.literal("detailsAvailable"),
|
|
83
|
+
identity: confirmedBookingIdentitySchema,
|
|
84
|
+
ticketLines: z.tuple([bookedTicketLineSchema]).rest(bookedTicketLineSchema).readonly(),
|
|
85
|
+
payment: confirmationPaymentSchema
|
|
86
|
+
}).strict(), z.object({
|
|
87
|
+
kind: z.literal("detailsUnavailable"),
|
|
88
|
+
identity: confirmedBookingIdentitySchema
|
|
89
|
+
}).strict()]);
|
|
90
|
+
const eventEmbeddedCheckoutSchema = z.object({
|
|
91
|
+
kind: z.literal("embedded"),
|
|
92
|
+
sessionId: z.string().min(1),
|
|
93
|
+
clientSecret: z.string().min(1),
|
|
94
|
+
livemode: z.boolean(),
|
|
95
|
+
expiresAt: z.string().datetime({ offset: true }),
|
|
96
|
+
browser: z.discriminatedUnion("kind", [z.object({
|
|
97
|
+
kind: z.literal("connect"),
|
|
98
|
+
publishableKey: z.string().min(1),
|
|
99
|
+
accountId: z.string().min(1)
|
|
100
|
+
}).strict(), z.object({
|
|
101
|
+
kind: z.literal("direct"),
|
|
102
|
+
publishableKey: z.string().min(1)
|
|
103
|
+
}).strict()])
|
|
104
|
+
}).strict();
|
|
105
|
+
const decorations = {
|
|
106
|
+
mailingListSignupNote: z.enum(["confirmation_required", "not_confirmed"]).optional(),
|
|
107
|
+
demoBookingPass: z.string().optional()
|
|
108
|
+
};
|
|
109
|
+
const eventRegistrationSummarySchema = z.object({
|
|
110
|
+
message: z.string(),
|
|
111
|
+
passCreditsRemaining: z.number().int().nonnegative().optional()
|
|
112
|
+
}).strict();
|
|
113
|
+
const eventRegisterResponseSchema = z.discriminatedUnion("kind", [
|
|
114
|
+
z.object({
|
|
115
|
+
kind: z.literal("bookingComplete"),
|
|
116
|
+
outcome: eventBookingOutcomeSchema,
|
|
117
|
+
summary: eventRegistrationSummarySchema,
|
|
118
|
+
...decorations
|
|
119
|
+
}).strict(),
|
|
120
|
+
z.object({
|
|
121
|
+
kind: z.literal("checkoutRequired"),
|
|
122
|
+
reference: eventRegistrationStatusReferenceSchema,
|
|
123
|
+
checkout: eventEmbeddedCheckoutSchema,
|
|
124
|
+
submissionId: uuid,
|
|
125
|
+
...decorations
|
|
126
|
+
}).strict(),
|
|
127
|
+
z.object({
|
|
128
|
+
kind: z.literal("paymentStatusRequired"),
|
|
129
|
+
subject: eventRegistrationPaymentSubjectSchema,
|
|
130
|
+
...decorations
|
|
131
|
+
}).strict(),
|
|
132
|
+
z.object({
|
|
133
|
+
kind: z.literal("waitlisted"),
|
|
134
|
+
waitlist: z.object({
|
|
135
|
+
reference: z.union([z.object({
|
|
136
|
+
scope: z.literal("occurrence"),
|
|
137
|
+
attendeeId: uuid
|
|
138
|
+
}).strict(), z.object({
|
|
139
|
+
scope: z.enum(["occurrence", "wholeSeries"]),
|
|
140
|
+
waitlistEntryId: uuid
|
|
141
|
+
}).strict()]),
|
|
142
|
+
position: z.number().int().nonnegative().nullable(),
|
|
143
|
+
message: z.string(),
|
|
144
|
+
emailFollowupMessage: z.string().optional()
|
|
145
|
+
}).strict(),
|
|
146
|
+
...decorations
|
|
147
|
+
}).strict()
|
|
148
|
+
]);
|
|
149
|
+
const checkoutStatusArms = [
|
|
150
|
+
z.object({
|
|
151
|
+
kind: z.literal("resolved"),
|
|
152
|
+
outcome: eventBookingOutcomeSchema
|
|
153
|
+
}).strict(),
|
|
154
|
+
z.object({ kind: z.literal("abandoned") }).strict(),
|
|
155
|
+
z.object({ kind: z.literal("reconciliationRequired") }).strict(),
|
|
156
|
+
z.object({
|
|
157
|
+
kind: z.literal("paymentProcessing"),
|
|
158
|
+
recoverableUntil: z.string().optional()
|
|
159
|
+
}).strict(),
|
|
160
|
+
z.object({
|
|
161
|
+
kind: z.literal("paymentAvailable"),
|
|
162
|
+
checkout: eventEmbeddedCheckoutSchema,
|
|
163
|
+
recoverableUntil: z.string().optional()
|
|
164
|
+
}).strict(),
|
|
165
|
+
z.object({
|
|
166
|
+
kind: z.literal("paymentRetryAvailable"),
|
|
167
|
+
place: z.enum(["held", "released"])
|
|
168
|
+
}).strict(),
|
|
169
|
+
z.object({
|
|
170
|
+
kind: z.literal("paymentCheckUnavailable"),
|
|
171
|
+
recoverableUntil: z.string().optional()
|
|
172
|
+
}).strict(),
|
|
173
|
+
z.object({ kind: z.literal("paymentAssistanceRequired") }).strict()
|
|
174
|
+
];
|
|
175
|
+
z.discriminatedUnion("kind", [...checkoutStatusArms, z.object({ kind: z.literal("notFound") }).strict()]);
|
|
176
|
+
const eventCheckoutReturnResponseSchema = z.discriminatedUnion("kind", [
|
|
177
|
+
z.object({
|
|
178
|
+
kind: z.literal("checkout"),
|
|
179
|
+
subject: eventRegistrationPaymentSubjectSchema,
|
|
180
|
+
outcome: z.discriminatedUnion("kind", checkoutStatusArms)
|
|
181
|
+
}).strict(),
|
|
182
|
+
z.object({ kind: z.literal("notFound") }).strict(),
|
|
183
|
+
z.object({ kind: z.literal("reconciliationRequired") }).strict()
|
|
184
|
+
]).superRefine((response, ctx) => {
|
|
185
|
+
if (response.kind !== "checkout" || response.outcome.kind !== "resolved") return;
|
|
186
|
+
const identity = response.outcome.outcome.identity;
|
|
187
|
+
if (identity.scope !== response.subject.scope || identity.submissionId !== response.subject.submissionId || identity.scope === "occurrence" && response.subject.scope === "occurrence" && identity.attendeeId !== response.subject.attendeeId) ctx.addIssue({
|
|
188
|
+
code: "custom",
|
|
189
|
+
message: "Confirmed booking does not match checkout subject",
|
|
190
|
+
path: ["outcome"]
|
|
191
|
+
});
|
|
192
|
+
});
|
|
193
|
+
const checkoutDecorations = { mailingListSignupNote: decorations.mailingListSignupNote };
|
|
194
|
+
const eventCheckoutResponseSchema = z.union([
|
|
195
|
+
z.object({
|
|
196
|
+
kind: z.literal("completed"),
|
|
197
|
+
scope: z.literal("occurrence"),
|
|
198
|
+
outcome: eventBookingOutcomeSchema,
|
|
199
|
+
...checkoutDecorations
|
|
200
|
+
}).strict(),
|
|
201
|
+
z.object({
|
|
202
|
+
kind: z.literal("completed"),
|
|
203
|
+
scope: z.literal("wholeSeries"),
|
|
204
|
+
outcome: eventBookingOutcomeSchema,
|
|
205
|
+
...checkoutDecorations
|
|
206
|
+
}).strict(),
|
|
207
|
+
z.object({
|
|
208
|
+
kind: z.literal("checkoutRequired"),
|
|
209
|
+
scope: z.literal("occurrence"),
|
|
210
|
+
attendeeId: uuid,
|
|
211
|
+
checkout: eventEmbeddedCheckoutSchema,
|
|
212
|
+
...checkoutDecorations
|
|
213
|
+
}).strict(),
|
|
214
|
+
z.object({
|
|
215
|
+
kind: z.literal("checkoutRequired"),
|
|
216
|
+
scope: z.literal("wholeSeries"),
|
|
217
|
+
registrationId: uuid,
|
|
218
|
+
checkoutAttemptId: uuid,
|
|
219
|
+
checkout: eventEmbeddedCheckoutSchema,
|
|
220
|
+
recoverableUntil: z.string().optional(),
|
|
221
|
+
...checkoutDecorations
|
|
222
|
+
}).strict(),
|
|
223
|
+
z.object({
|
|
224
|
+
scope: z.literal("wholeSeries"),
|
|
225
|
+
status: z.literal("paymentStatusRequired"),
|
|
226
|
+
checkoutAttemptId: uuid,
|
|
227
|
+
recoverableUntil: z.string().optional(),
|
|
228
|
+
...checkoutDecorations
|
|
229
|
+
}).strict(),
|
|
230
|
+
z.object({
|
|
231
|
+
scope: z.literal("wholeSeries"),
|
|
232
|
+
status: z.literal("waitlist"),
|
|
233
|
+
waitlistEntryId: uuid,
|
|
234
|
+
waitlistPosition: z.number().int().nonnegative().nullable(),
|
|
235
|
+
alreadyRegistered: z.boolean().optional(),
|
|
236
|
+
...checkoutDecorations
|
|
237
|
+
}).strict()
|
|
238
|
+
]).superRefine((response, ctx) => {
|
|
239
|
+
if ("kind" in response && response.kind === "completed" && response.scope !== response.outcome.identity.scope) ctx.addIssue({
|
|
240
|
+
code: "custom",
|
|
241
|
+
message: "Confirmed booking scope mismatch",
|
|
242
|
+
path: [
|
|
243
|
+
"outcome",
|
|
244
|
+
"identity",
|
|
245
|
+
"scope"
|
|
246
|
+
]
|
|
247
|
+
});
|
|
248
|
+
});
|
|
249
|
+
//#endregion
|
|
5
250
|
//#region ../blocks/src/system/runtime/api/deduplication.ts
|
|
6
251
|
/**
|
|
7
252
|
* Create a request deduplication cache.
|
|
@@ -566,6 +811,24 @@ function getAuthHeaders(auth) {
|
|
|
566
811
|
case "none": return {};
|
|
567
812
|
}
|
|
568
813
|
}
|
|
814
|
+
/** Decode booking contracts once, before any hook can treat a response as committed. */
|
|
815
|
+
function decodeSuccessfulResponse(json, status, decoder) {
|
|
816
|
+
const value = isApiSuccessResponse(json) ? json.data : json;
|
|
817
|
+
if (!decoder) return value;
|
|
818
|
+
const decoded = decoder.safeParse(value);
|
|
819
|
+
if (!decoded.success) throw invalidBookingResponse(status);
|
|
820
|
+
return decoded.data;
|
|
821
|
+
}
|
|
822
|
+
function invalidBookingResponse(status) {
|
|
823
|
+
return new BlockApiError("We couldn’t read the booking response. Please check the same booking again.", status, "invalid_booking_response");
|
|
824
|
+
}
|
|
825
|
+
/** A successful transport with unreadable data leaves booking commitment unknown. */
|
|
826
|
+
async function readSuccessfulResponse(response, decoder) {
|
|
827
|
+
return decodeSuccessfulResponse(await parseJsonApiResponse(response).catch((cause) => {
|
|
828
|
+
if (decoder) throw invalidBookingResponse(response.status);
|
|
829
|
+
throw cause;
|
|
830
|
+
}), response.status, decoder);
|
|
831
|
+
}
|
|
569
832
|
/**
|
|
570
833
|
* Type guard for API success response envelope
|
|
571
834
|
*/
|
|
@@ -631,11 +894,11 @@ function createBlockApi(config) {
|
|
|
631
894
|
return queryParams;
|
|
632
895
|
}
|
|
633
896
|
async function request(endpoint, options) {
|
|
634
|
-
const { path, body, query, skipDedup = false } = options ?? {};
|
|
635
|
-
|
|
897
|
+
const { path, body, query, skipDedup = false, decoder } = options ?? {};
|
|
898
|
+
const requestUrl = `${baseUrl}${path ?? endpoint.path}`;
|
|
636
899
|
const selectedAuth = selectAuth(endpoint);
|
|
637
900
|
const queryParams = bindReadQuery(endpoint, query);
|
|
638
|
-
|
|
901
|
+
const url = Object.keys(queryParams).length > 0 ? appendQuery(requestUrl, queryParams) : requestUrl;
|
|
639
902
|
const headers = {
|
|
640
903
|
Accept: "application/json",
|
|
641
904
|
...getAuthHeaders(selectedAuth)
|
|
@@ -652,9 +915,7 @@ function createBlockApi(config) {
|
|
|
652
915
|
const details = await extractErrorDetails(response);
|
|
653
916
|
throw new BlockApiError(details.message, response.status, details.code, details.tag, details.fieldErrors);
|
|
654
917
|
}
|
|
655
|
-
|
|
656
|
-
if (isApiSuccessResponse(json)) return json.data;
|
|
657
|
-
return json;
|
|
918
|
+
return readSuccessfulResponse(response, decoder);
|
|
658
919
|
};
|
|
659
920
|
if (endpoint.method === "GET" && !skipDedup) {
|
|
660
921
|
const cacheKey = dedup.getCacheKey(endpoint.method, url, void 0);
|
|
@@ -789,6 +1050,7 @@ function createBlockApi(config) {
|
|
|
789
1050
|
const sid = requireSiteId();
|
|
790
1051
|
const path = buildPath(EVENTS.register.path, { siteId: sid });
|
|
791
1052
|
return request(EVENTS.register, {
|
|
1053
|
+
decoder: eventRegisterResponseSchema,
|
|
792
1054
|
path,
|
|
793
1055
|
body: data
|
|
794
1056
|
});
|
|
@@ -798,7 +1060,8 @@ function createBlockApi(config) {
|
|
|
798
1060
|
const path = buildPath(EVENTS.checkout.path, { siteId: sid });
|
|
799
1061
|
return request(EVENTS.checkout, {
|
|
800
1062
|
path,
|
|
801
|
-
body: data
|
|
1063
|
+
body: data,
|
|
1064
|
+
decoder: eventCheckoutResponseSchema
|
|
802
1065
|
});
|
|
803
1066
|
},
|
|
804
1067
|
async getRegistrationOptions(data) {
|
|
@@ -830,7 +1093,8 @@ function createBlockApi(config) {
|
|
|
830
1093
|
const path = buildPath(EVENTS.checkoutReturn.path, { siteId: sid });
|
|
831
1094
|
return request(EVENTS.checkoutReturn, {
|
|
832
1095
|
path,
|
|
833
|
-
body: data
|
|
1096
|
+
body: data,
|
|
1097
|
+
decoder: eventCheckoutReturnResponseSchema
|
|
834
1098
|
});
|
|
835
1099
|
},
|
|
836
1100
|
async resolveWaitlistClaim(data) {
|
|
@@ -838,7 +1102,8 @@ function createBlockApi(config) {
|
|
|
838
1102
|
const path = buildPath(WHOLE_SERIES.waitlistClaimResolve.path, { siteId: sid });
|
|
839
1103
|
return request(WHOLE_SERIES.waitlistClaimResolve, {
|
|
840
1104
|
path,
|
|
841
|
-
body: data
|
|
1105
|
+
body: data,
|
|
1106
|
+
decoder: waitlistClaimResponseSchema
|
|
842
1107
|
});
|
|
843
1108
|
},
|
|
844
1109
|
async getDiscountsAvailable(data) {
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { i as useEventCollectionFilters, o as EventItem, s as formatEventTeacherLine } from "./useEventPagination-
|
|
5
|
-
import { n as ThemedButtonLink, t as ThemedButton } from "./ThemedButton-
|
|
6
|
-
import {
|
|
7
|
-
import { a as
|
|
8
|
-
import {
|
|
9
|
-
import { t as BlockApiProvider } from "./context-GK4-AVAh.mjs";
|
|
2
|
+
import { F as clsx } from "./colorStyles-ECDNPE_P.mjs";
|
|
3
|
+
import { Bn as getLocalDateKey, Hn as MONTH_NAMES, Jn as getOrderedDayNames, Kn as formatDateKey, Ln as formatTime, Mn as formatDate, Rn as groupEventsByDate, Tn as buildEventListWeek, Un as addDays, Vn as getLocalMinuteOfDay, Xn as isSameCalendarDay, Yn as getWeekCalendarDays, Zn as isToday, _n as resolveCalendarReadProfile, ar as getEventAvailabilityStatus, bn as buildEventRuntimeFilters, dr as listItemPresentation, fr as listLookSlot, kn as eventDateLocale, nr as formatEventRemainingPlaces, qn as getDayOfWeek, sr as isEventFull, t as defineIslandPropsDecoder, tn as buildEventCalendarListingRender, zn as resolveEventTimeZone } from "./propsDecoder-Bf1jucUp.mjs";
|
|
4
|
+
import { i as useEventCollectionFilters, o as EventItem, s as formatEventTeacherLine } from "./useEventPagination-8-U55vH5.mjs";
|
|
5
|
+
import { n as ThemedButtonLink, t as ThemedButton } from "./ThemedButton-Ciltp0IK.mjs";
|
|
6
|
+
import { a as resolveEventLinkProps } from "./CardListItem-Dc9XTXhB.mjs";
|
|
7
|
+
import { a as WeekAgendaView, c as CalendarDayCell, d as EventModalProvider, f as useEventModal, h as resolveMonthSelectedDay, i as useHydrationReady, l as useCalendarEvents, m as buildMonthDay, o as CalendarNavigationChevron, p as useCalendarToday, r as EventModals, s as CalendarDayHeaders, t as EventCombinedClient, u as useCalendarViewport } from "./EventCombined.client-BHGEKise.mjs";
|
|
8
|
+
import { t as BlockApiProvider } from "./context-BI77UFAn.mjs";
|
|
10
9
|
import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
|
|
11
|
-
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-
|
|
12
|
-
import { n as EventListingController } from "./EventListing.client-
|
|
10
|
+
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-BgP-aPMl.mjs";
|
|
11
|
+
import { n as EventListingController } from "./EventListing.client-D5OQgVPr.mjs";
|
|
13
12
|
import React, { useEffect, useMemo, useState } from "react";
|
|
14
13
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
15
14
|
//#region ../calendar/src/lane-packing.ts
|
|
@@ -352,6 +351,7 @@ function dateLabel(key, timeZone) {
|
|
|
352
351
|
}
|
|
353
352
|
function MonthDay(props) {
|
|
354
353
|
const { day, selection } = props;
|
|
354
|
+
const { controls } = selection;
|
|
355
355
|
const selected = day.dateKey === selection.selectedDay;
|
|
356
356
|
return /* @__PURE__ */ jsxs("div", {
|
|
357
357
|
"data-slot": "date",
|
|
@@ -363,7 +363,7 @@ function MonthDay(props) {
|
|
|
363
363
|
"data-slot": "control",
|
|
364
364
|
"aria-label": `Show events on ${dateLabel(day.dateKey, selection.timeZone)}`,
|
|
365
365
|
"aria-pressed": selected,
|
|
366
|
-
onClick: () =>
|
|
366
|
+
onClick: controls ? () => controls.selectDay(day.dateKey) : void 0,
|
|
367
367
|
children: day.date.day
|
|
368
368
|
}) : /* @__PURE__ */ jsx("span", {
|
|
369
369
|
"data-slot": "date-label",
|
|
@@ -376,7 +376,7 @@ function MonthDay(props) {
|
|
|
376
376
|
type: "button",
|
|
377
377
|
className: "event-calendar-more",
|
|
378
378
|
"data-slot": "more",
|
|
379
|
-
onClick: () =>
|
|
379
|
+
onClick: controls ? () => controls.openDay(day.date, day.entries.map(({ event }) => event)) : void 0,
|
|
380
380
|
children: [
|
|
381
381
|
"+",
|
|
382
382
|
day.moreCount,
|
|
@@ -450,11 +450,13 @@ function MonthLookClient(props) {
|
|
|
450
450
|
return /* @__PURE__ */ jsx(MonthLookView, {
|
|
451
451
|
...props,
|
|
452
452
|
selectedDay,
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
453
|
+
controls: {
|
|
454
|
+
selectDay: (day) => setSelection({
|
|
455
|
+
anchor,
|
|
456
|
+
day
|
|
457
|
+
}),
|
|
458
|
+
openDay: (date, events) => openDayModal(date, [...events])
|
|
459
|
+
}
|
|
458
460
|
});
|
|
459
461
|
}
|
|
460
462
|
//#endregion
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
2
|
-
import { n as EventCombinedIslandClient } from "./EventCombined.client-
|
|
3
|
-
import { t as BlockApiProvider } from "./context-
|
|
1
|
+
import { t as defineIslandPropsDecoder } from "./propsDecoder-Bf1jucUp.mjs";
|
|
2
|
+
import { n as EventCombinedIslandClient } from "./EventCombined.client-BHGEKise.mjs";
|
|
3
|
+
import { t as BlockApiProvider } from "./context-BI77UFAn.mjs";
|
|
4
4
|
import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
|
|
5
|
-
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-
|
|
5
|
+
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-BgP-aPMl.mjs";
|
|
6
6
|
import "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
//#region src/rendering/islands/enhancers/eventCombined.tsx
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { An as
|
|
1
|
+
import { $r as orderedLiveRunSessions, An as eventDateOptions, Dn as formatEventPriceAmount, En as formatEventPrice, On as formatEventPriceDisplay, Pn as formatEventDateParts, Qr as CANCELLED_SESSION_STATUS, _i as publicEventPricingType, ar as getEventAvailabilityStatus, di as toScheduledBookingDateTime, ei as resolveWholeSeriesBookingPhase, fi as formatBookingPriceDisplay, fr as listLookSlot, hi as publicEventPricingDisplay, mi as publicEventPricingCurrency, nr as formatEventRemainingPlaces, oi as getBookingLocalDateKey, pi as isPublicEventPricingOptionDisplayable, rn as resolveEventRegistrationScopedEvents, rr as formatTotalCapacity, t as defineIslandPropsDecoder, ui as toBookingTimeZone, vi as formatCurrencyAmount } from "./propsDecoder-Bf1jucUp.mjs";
|
|
2
2
|
import { t as formatEventDuration } from "./duration-btE0-px8.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { a as resolveEventLinkProps, i as resolveEventCta, t as CardListContentPart } from "./CardListItem-ZDLYh6dL.mjs";
|
|
3
|
+
import { a as resolveEventLinkProps, i as resolveEventCta, t as CardListContentPart } from "./CardListItem-Dc9XTXhB.mjs";
|
|
5
4
|
import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
|
|
6
5
|
import { t as EVENT_REGISTRATION_ANCHOR_ID } from "./constants-CT8yg_UB.mjs";
|
|
7
|
-
import { t as LeafletStaticMap } from "./LeafletStaticMap-
|
|
6
|
+
import { t as LeafletStaticMap } from "./LeafletStaticMap-CLL5cWrr.mjs";
|
|
8
7
|
import "react";
|
|
9
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
9
|
//#region ../blocks/src/system/runtime/nodes/events/shared/eventProductEligibility.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as defineIslandPropsDecoder } from "./propsDecoder-
|
|
2
|
-
import { t as BlockApiProvider } from "./context-
|
|
1
|
+
import { t as defineIslandPropsDecoder } from "./propsDecoder-Bf1jucUp.mjs";
|
|
2
|
+
import { t as BlockApiProvider } from "./context-BI77UFAn.mjs";
|
|
3
3
|
import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
|
|
4
|
-
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-
|
|
5
|
-
import { t as EventListingClient } from "./EventListing.client-
|
|
4
|
+
import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-BgP-aPMl.mjs";
|
|
5
|
+
import { t as EventListingClient } from "./EventListing.client-D5OQgVPr.mjs";
|
|
6
6
|
import "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
//#region src/rendering/islands/enhancers/eventListing.tsx
|