@riverbankcms/sdk 0.140.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.
Files changed (112) hide show
  1. package/dist/{PreviewEditorSidebar-CUyTzd5z.mjs → PreviewEditorSidebar-Q-fy9GYw.mjs} +3 -3
  2. package/dist/{PreviewEditorUI-Agkw4v5i.mjs → PreviewEditorUI-LYGzgk85.mjs} +2 -2
  3. package/dist/{SdkPreviewModeRuntime-DdbeAdS8.mjs → SdkPreviewModeRuntime-CoPYI5Jq.mjs} +72 -46
  4. package/dist/{SiteChromeCustomizeContext-CqGOz-Kv.mjs → SiteChromeCustomizeContext-D8LePX8x.mjs} +681 -196
  5. package/dist/_dts/api/src/contentRuntime.d.ts +12 -31
  6. package/dist/_dts/api/src/domainConnection.d.ts +4 -0
  7. package/dist/_dts/api/src/footerCompositionContracts.d.ts +25 -0
  8. package/dist/_dts/api/src/index.d.ts +1 -1
  9. package/dist/_dts/api/src/launchReadiness.d.ts +1 -0
  10. package/dist/_dts/api/src/navigation/dashboardSiteNav.d.ts +2 -1
  11. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +3 -26
  12. package/dist/_dts/api/src/siteOnboarding.d.ts +7 -0
  13. package/dist/_dts/billing/src/site-arrangements.d.ts +12 -3
  14. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +4 -0
  15. package/dist/_dts/blocks/src/pageRendererContracts.d.ts +2 -0
  16. package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +2 -0
  17. package/dist/_dts/blocks/src/system/blocks/events/eventSelectionFields.d.ts +122 -0
  18. package/dist/_dts/blocks/src/system/blocks/events/shared/calendarWindow.d.ts +2 -1
  19. package/dist/_dts/blocks/src/system/blocks/events/shared/eventSelection.d.ts +11 -0
  20. package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +2 -2
  21. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +47 -47
  22. package/dist/_dts/blocks/src/system/data/prefetchBlockData.d.ts +5 -0
  23. package/dist/_dts/blocks/src/system/data/utils.d.ts +1 -1
  24. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +27 -1
  25. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +12 -180
  26. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +6 -90
  27. package/dist/_dts/blocks/src/system/runtime/hooks/useEventFilters.d.ts +2 -1
  28. package/dist/_dts/blocks/src/system/runtime/nodes/appointment-services.d.ts +5 -1
  29. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +4 -0
  30. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.state.d.ts +5 -0
  31. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.d.ts +3 -0
  32. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.state.d.ts +10 -3
  33. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventCheckoutHandoffRestore.d.ts +9 -0
  34. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +4 -5
  35. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useSettledCommerceView.d.ts +37 -0
  36. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +4 -3
  37. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +3 -0
  38. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventListing.interactive.d.ts +11 -101
  39. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +7 -2
  40. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/listOptions.d.ts +2 -0
  41. package/dist/_dts/blocks/src/system/transforms/registry/eventCalendar.d.ts +12 -0
  42. package/dist/_dts/commerce/src/purchase/bookingInstalmentSchedule.d.ts +4 -0
  43. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +3 -0
  44. package/dist/_dts/editor-blocks/src/widgets/site-option-picker/loaders.d.ts +27 -1
  45. package/dist/_dts/sdk/src/public-api/contracts.d.ts +1 -1
  46. package/dist/_dts/sdk/src/version.d.ts +1 -1
  47. package/dist/_dts/theme-core/src/ThemeFontLoader.d.ts +17 -1
  48. package/dist/_dts/theme-core/src/buttons/affordanceSuppression.d.ts +17 -0
  49. package/dist/_dts/theme-core/src/buttons/buttonColourContract.d.ts +1 -1
  50. package/dist/_dts/theme-core/src/buttons/classNames.d.ts +16 -0
  51. package/dist/_dts/theme-core/src/buttons/generateButtonCss.d.ts +0 -6
  52. package/dist/_dts/theme-core/src/buttons/resolvedButtonCss.d.ts +4 -4
  53. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  54. package/dist/_dts/theme-core/src/hosted-booking-appearance.d.ts +54 -12
  55. package/dist/_dts/theme-core/src/index.d.ts +1 -1
  56. package/dist/client/{BookingConsentAgreement-CuKa82V4.mjs → BookingConsentAgreement-xJeYNdnb.mjs} +2 -2
  57. package/dist/client/{DiscountCodeDisclosure-BbYieKWB.mjs → DiscountCodeDisclosure-DdT6uzl9.mjs} +1 -1
  58. package/dist/client/{EventCombined.client-LTfR1Aby.mjs → EventCombined.client-Cp28uYuM.mjs} +11 -15
  59. package/dist/client/{EventListing.client-DUHpYSuo.mjs → EventListing.client-CD6AJsMr.mjs} +4 -17
  60. package/dist/client/{LeafletStaticMap-CHRupL6m.mjs → LeafletStaticMap-DBsAi9-e.mjs} +1 -1
  61. package/dist/client/{accordion-6HiIFxNL.mjs → accordion-6dwbOKYR.mjs} +1 -1
  62. package/dist/client/{bookingForm-Dlmid43H.mjs → bookingForm-CZE9_qPQ.mjs} +5 -5
  63. package/dist/client/bookings.mjs +175 -93
  64. package/dist/client/{carousel-DmkZRRq_.mjs → carousel-7VHGQARz.mjs} +1 -1
  65. package/dist/client/{cart-CIC24330.mjs → cart-Qg_mvQhh.mjs} +3 -3
  66. package/dist/client/{checkout-D1Zw9imo.mjs → checkout-D84rpgdr.mjs} +3 -3
  67. package/dist/client/client.mjs +602 -139
  68. package/dist/client/{context-Cy1OayHx.mjs → context-Ctp3T0Wr.mjs} +1 -1
  69. package/dist/client/{dates-aDcfoLHr.mjs → dates-DJKFcI_N.mjs} +2 -2
  70. package/dist/client/{eventCalendar-FQxMPAjf.mjs → eventCalendar-CK31z3vs.mjs} +11 -7
  71. package/dist/client/{eventCombined-Dr3ac6Hb.mjs → eventCombined-DiXd-ewn.mjs} +3 -3
  72. package/dist/client/{eventDetails-D-AzUHFQ.mjs → eventDetails-CTRgt2DK.mjs} +4 -4
  73. package/dist/client/{eventListing-B3XxBf3i.mjs → eventListing-Dy9vi_j_.mjs} +3 -3
  74. package/dist/client/{eventRegistration-I6EaokFD.mjs → eventRegistration-CnalYMr2.mjs} +124 -31
  75. package/dist/client/{form-BbWckVWY.mjs → form-eUiMveTT.mjs} +2 -2
  76. package/dist/client/{headerSection-C9qU4Y7x.mjs → headerSection-Dy9kQpB1.mjs} +2 -2
  77. package/dist/client/hooks.mjs +247 -32
  78. package/dist/client/{locationMap-CLCShvlG.mjs → locationMap-DalCmWU0.mjs} +2 -2
  79. package/dist/client/{newsletterForm-Briukxzi.mjs → newsletterForm-SDDPvhS0.mjs} +23 -10
  80. package/dist/client/{pricing-Copadu-2.mjs → pricing-OcMz4SnX.mjs} +1 -1
  81. package/dist/client/{productDetail-oujlRd-r.mjs → productDetail-BQrgHElM.mjs} +3 -3
  82. package/dist/client/{productList-BRiIRUcd.mjs → productList-OnPn_UJj.mjs} +3 -3
  83. package/dist/client/{propsDecoder-CB2KS_ko.mjs → propsDecoder-zBdsnS-N.mjs} +38 -8
  84. package/dist/client/rendering/client.mjs +446 -121
  85. package/dist/client/rendering/islands.mjs +17 -17
  86. package/dist/client/rendering.mjs +601 -138
  87. package/dist/client/{scrollToBlock-B1IS1_ua.mjs → scrollToBlock-BNM4Ob2Y.mjs} +28 -11
  88. package/dist/client/{shop-Vn6yNFED.mjs → shop-Bv1fPTwQ.mjs} +6 -6
  89. package/dist/client/{shop-commerce-BVTqipYp.mjs → shop-commerce-D4KNGaW8.mjs} +5 -5
  90. package/dist/client/{shop-commerce-store-BVnJVy7v.mjs → shop-commerce-store-2N5EV0Rc.mjs} +1 -1
  91. package/dist/client/{shopShared-COIeK77T.mjs → shopShared-DvJGdHTV.mjs} +3 -3
  92. package/dist/client/{useEventFilters-DzIUcS9n.mjs → useEventFilters-BBBvGDHQ.mjs} +17 -11
  93. package/dist/preview-next/client/runtime.mjs +3 -3
  94. package/dist/preview-next/editor-chrome.css +4 -8
  95. package/dist/{sdk-runtime-CnCLvZRv.mjs → sdk-runtime-Defnbfzw.mjs} +1 -1
  96. package/dist/{separator-DKDRJ1oH.mjs → separator-CZXO3Sb0.mjs} +1 -1
  97. package/dist/server/components.mjs +384 -62
  98. package/dist/server/config-validation.mjs +232 -26
  99. package/dist/server/config.mjs +232 -26
  100. package/dist/server/data.mjs +247 -32
  101. package/dist/server/index.mjs +1 -1
  102. package/dist/server/next.mjs +400 -69
  103. package/dist/server/page-converter.mjs +189 -25
  104. package/dist/server/prebuild.mjs +1 -1
  105. package/dist/server/rendering/server.mjs +399 -68
  106. package/dist/server/rendering.mjs +399 -68
  107. package/dist/server/routing.mjs +261 -33
  108. package/dist/server/server.mjs +248 -33
  109. package/dist/server/theme-bridge.mjs +47 -15
  110. package/dist/server/theme.mjs +1 -1
  111. package/dist/styles/index.css +28 -2
  112. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { R as calendarWindowPageSchema } from "./propsDecoder-CB2KS_ko.mjs";
2
+ import { R as calendarWindowPageSchema } from "./propsDecoder-zBdsnS-N.mjs";
3
3
  import { createContext, useContext, useMemo } from "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  //#region ../blocks/src/system/runtime/api/deduplication.ts
@@ -1,5 +1,5 @@
1
- import { Gt as formatBookingDate, Kt as formatBookingDateParts, Yt as formatBookingTime, at as resolveRuntimeEventDestination, mn as assertNever, nn as toScheduledBookingDateRange, rn as toScheduledBookingDateTime, tn as toBookingTimeZone } from "./propsDecoder-CB2KS_ko.mjs";
2
- import { a as canJoinEventWaitlistOnAnyMode, p as isEventFull } from "./pricing-Copadu-2.mjs";
1
+ import { Gt as formatBookingDate, Kt as formatBookingDateParts, Yt as formatBookingTime, at as resolveRuntimeEventDestination, mn as assertNever, nn as toScheduledBookingDateRange, rn as toScheduledBookingDateTime, tn as toBookingTimeZone } from "./propsDecoder-zBdsnS-N.mjs";
2
+ import { a as canJoinEventWaitlistOnAnyMode, p as isEventFull } from "./pricing-OcMz4SnX.mjs";
3
3
  //#region ../blocks/src/system/runtime/nodes/events/domain/cta.ts
4
4
  /**
5
5
  * Booking call-to-action resolution for events: where an event links to and
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
  import { O as clsx } from "./colorStyles-3013aRAY.mjs";
3
- import { $ as getDayOfWeek, B as resolveCalendarReadProfile, D as buildEventCalendarListingRender, J as MONTH_NAMES, Q as formatDateKey, V as buildEventRuntimeFilters, Y as addDays, dt as themeButtonClassName, et as getOrderedDayNames, nt as isSameCalendarDay, rt as isToday, t as defineIslandPropsDecoder, tt as getWeekCalendarDays } from "./propsDecoder-CB2KS_ko.mjs";
4
- import { o as EventFilters, s as formatEventTeacherLine, t as useEventFilters } from "./useEventFilters-DzIUcS9n.mjs";
5
- import { d as getEventAvailabilityStatus, o as formatEventRemainingPlaces, p as isEventFull } from "./pricing-Copadu-2.mjs";
6
- import { a as formatTime, c as getLocalDateKey, d as resolveEventLinkProps, l as getLocalMinuteOfDay, o as groupEventsByDate, s as resolveEventTimeZone } from "./dates-aDcfoLHr.mjs";
7
- import { a as WeekAgendaView, c as CalendarDayCell, d as useCalendarEvents, i as useHydrationReady, l as EventModalProvider, o as CalendarNavigationChevron, r as EventModals, s as CalendarDayHeaders, t as EventCombinedClient, u as useEventModal } from "./EventCombined.client-LTfR1Aby.mjs";
8
- import { t as BlockApiProvider } from "./context-Cy1OayHx.mjs";
3
+ import { $ as getDayOfWeek, B as resolveCalendarReadProfile, D as buildEventCalendarListingRender, J as MONTH_NAMES, Q as formatDateKey, V as buildEventRuntimeFilters, Y as addDays, dt as themeButtonClassName, et as getOrderedDayNames, nt as isSameCalendarDay, rt as isToday, t as defineIslandPropsDecoder, tt as getWeekCalendarDays } from "./propsDecoder-zBdsnS-N.mjs";
4
+ import { o as EventFilters, s as formatEventTeacherLine, t as useEventFilters } from "./useEventFilters-BBBvGDHQ.mjs";
5
+ import { d as getEventAvailabilityStatus, o as formatEventRemainingPlaces, p as isEventFull } from "./pricing-OcMz4SnX.mjs";
6
+ import { a as formatTime, c as getLocalDateKey, d as resolveEventLinkProps, l as getLocalMinuteOfDay, o as groupEventsByDate, s as resolveEventTimeZone } from "./dates-DJKFcI_N.mjs";
7
+ import { a as WeekAgendaView, c as CalendarDayCell, d as useCalendarEvents, i as useHydrationReady, l as EventModalProvider, o as CalendarNavigationChevron, r as EventModals, s as CalendarDayHeaders, t as EventCombinedClient, u as useEventModal } from "./EventCombined.client-Cp28uYuM.mjs";
8
+ import { t as BlockApiProvider } from "./context-Ctp3T0Wr.mjs";
9
9
  import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
10
10
  import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-UNsfPcYq.mjs";
11
- import { n as EventListingController } from "./EventListing.client-DUHpYSuo.mjs";
11
+ import { n as EventListingController } from "./EventListing.client-CD6AJsMr.mjs";
12
12
  import { useEffect, useId, useMemo, useState } from "react";
13
13
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
14
14
  //#region ../calendar/src/lane-packing.ts
@@ -832,6 +832,7 @@ const EventCalendarClient = ({ render }) => {
832
832
  eventSurface: display.eventSurface,
833
833
  filterEventPresets: display.filterEventPresets,
834
834
  scheduleScope: display.scheduleScope,
835
+ seriesIds: display.seriesIds,
835
836
  filterCategoryIds: display.filterCategoryIds,
836
837
  filterStaffMemberId: display.filterStaffMemberId,
837
838
  filterVenueId: display.filterVenueId,
@@ -855,6 +856,7 @@ const EventCalendarWeekBoardClient = ({ render }) => {
855
856
  const { display, hydration } = render;
856
857
  const filters = useMemo(() => buildDisplayFilterParams(display), [
857
858
  display.eventSurface,
859
+ display.seriesIds,
858
860
  display.filterCategoryIds,
859
861
  display.filterEventPresets,
860
862
  display.filterStaffMemberId,
@@ -1016,6 +1018,7 @@ function useEventCalendarFilterState(display) {
1016
1018
  showCategoryFilter: display.showFilters ? display.showCategoryFilter : "never",
1017
1019
  showVenueFilter: display.showFilters ? display.showVenueFilter : false,
1018
1020
  showStaffFilter: display.showFilters ? display.showStaffFilter : false,
1021
+ preFilterSeriesIds: display.seriesIds,
1019
1022
  preFilterCategoryIds: display.filterCategoryIds,
1020
1023
  preFilterStaffMemberId: display.filterStaffMemberId,
1021
1024
  preFilterVenueId: display.filterVenueId,
@@ -1049,6 +1052,7 @@ function buildDisplayFilterParams(display) {
1049
1052
  eventSurface: display.eventSurface,
1050
1053
  filterEventPresets: display.filterEventPresets,
1051
1054
  scheduleScope: display.scheduleScope,
1055
+ seriesIds: display.seriesIds,
1052
1056
  filterCategoryIds: display.filterCategoryIds,
1053
1057
  filterStaffMemberId: display.filterStaffMemberId,
1054
1058
  filterVenueId: display.filterVenueId
@@ -1,6 +1,6 @@
1
- import { t as defineIslandPropsDecoder } from "./propsDecoder-CB2KS_ko.mjs";
2
- import { n as EventCombinedIslandClient } from "./EventCombined.client-LTfR1Aby.mjs";
3
- import { t as BlockApiProvider } from "./context-Cy1OayHx.mjs";
1
+ import { t as defineIslandPropsDecoder } from "./propsDecoder-zBdsnS-N.mjs";
2
+ import { n as EventCombinedIslandClient } from "./EventCombined.client-Cp28uYuM.mjs";
3
+ import { t as BlockApiProvider } from "./context-Ctp3T0Wr.mjs";
4
4
  import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
5
5
  import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-UNsfPcYq.mjs";
6
6
  import "react";
@@ -1,8 +1,8 @@
1
- import { Ht as resolveWholeSeriesBookingPhase, Vt as CANCELLED_SESSION_STATUS, Zt as getBookingLocalDateKey, cn as publicEventPricingDisplay, dn as publicEventPricingType, fn as formatCurrencyAmount, in as formatBookingPriceDisplay, k as resolveEventRegistrationScopedEvents, on as isPublicEventPricingOptionDisplayable, rn as toScheduledBookingDateTime, sn as publicEventPricingCurrency, t as defineIslandPropsDecoder, tn as toBookingTimeZone } from "./propsDecoder-CB2KS_ko.mjs";
2
- import { l as formatTotalCapacity, n as formatEventPriceAmount, t as formatEventPrice } from "./pricing-Copadu-2.mjs";
3
- import { d as resolveEventLinkProps, r as formatEventDateParts } from "./dates-aDcfoLHr.mjs";
1
+ import { Ht as resolveWholeSeriesBookingPhase, Vt as CANCELLED_SESSION_STATUS, Zt as getBookingLocalDateKey, cn as publicEventPricingDisplay, dn as publicEventPricingType, fn as formatCurrencyAmount, in as formatBookingPriceDisplay, k as resolveEventRegistrationScopedEvents, on as isPublicEventPricingOptionDisplayable, rn as toScheduledBookingDateTime, sn as publicEventPricingCurrency, t as defineIslandPropsDecoder, tn as toBookingTimeZone } from "./propsDecoder-zBdsnS-N.mjs";
2
+ import { l as formatTotalCapacity, n as formatEventPriceAmount, t as formatEventPrice } from "./pricing-OcMz4SnX.mjs";
3
+ import { d as resolveEventLinkProps, r as formatEventDateParts } from "./dates-DJKFcI_N.mjs";
4
4
  import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
5
- import { t as LeafletStaticMap } from "./LeafletStaticMap-CHRupL6m.mjs";
5
+ import { t as LeafletStaticMap } from "./LeafletStaticMap-DBsAi9-e.mjs";
6
6
  import "react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  //#region ../blocks/src/system/runtime/nodes/events/shared/eventProductEligibility.ts
@@ -1,8 +1,8 @@
1
- import { t as defineIslandPropsDecoder } from "./propsDecoder-CB2KS_ko.mjs";
2
- import { t as BlockApiProvider } from "./context-Cy1OayHx.mjs";
1
+ import { t as defineIslandPropsDecoder } from "./propsDecoder-zBdsnS-N.mjs";
2
+ import { t as BlockApiProvider } from "./context-Ctp3T0Wr.mjs";
3
3
  import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
4
4
  import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-UNsfPcYq.mjs";
5
- import { t as EventListingClient } from "./EventListing.client-DUHpYSuo.mjs";
5
+ import { t as EventListingClient } from "./EventListing.client-CD6AJsMr.mjs";
6
6
  import "react";
7
7
  import { jsx } from "react/jsx-runtime";
8
8
  //#region src/rendering/islands/enhancers/eventListing.tsx
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import { a as buildBookingPaymentSelectionViewModel, i as usePolling, n as StepIndicator$1, o as resolveBookingPaymentDueNowCents, r as SpinnerNode, s as formatPrice, t as BookingConsentAgreement } from "./BookingConsentAgreement-CuKa82V4.mjs";
3
- import { C as resolveRegistrationTarget, E as getWizardStepsForContext, Gt as formatBookingDate, Pt as assertNever, S as resolveEventRequiresPayment, T as getStepNumber, Yt as formatBookingTime, _ as toRegistrationEvents, b as findPreSelectedEvent, dn as publicEventPricingType, dt as themeButtonClassName, fn as formatCurrencyAmount, g as getRegistrationStartAt, h as buildEventRegistrationDisplayFromScopedEvents, k as resolveEventRegistrationScopedEvents, ln as publicEventPricingOptions, ot as groupPublicEventsByRun, pn as parseCurrencyCode, qt as formatBookingDateTime, rn as toScheduledBookingDateTime, sn as publicEventPricingCurrency, t as defineIslandPropsDecoder, tn as toBookingTimeZone, un as publicEventPricingStrategy, v as toWholeSeriesRegistrationEvents, w as WIZARD_STEPS, x as resolveDiscountContext, y as findEventByOccurrenceId } from "./propsDecoder-CB2KS_ko.mjs";
4
- import { a as canJoinEventWaitlistOnAnyMode, c as formatTicketTypeRemaining, f as getRemainingPlaces, h as selectMostOpenCapacitySource, i as canJoinEventWaitlist, m as selectEventCapacitySource, o as formatEventRemainingPlaces, p as isEventFull, r as formatEventPriceDisplay, s as formatRemainingPlaces, u as getEventAvailability } from "./pricing-Copadu-2.mjs";
5
- import { n as useBlockApi, r as BlockApiError, t as BlockApiProvider } from "./context-Cy1OayHx.mjs";
2
+ import { a as buildBookingPaymentSelectionViewModel, i as usePolling, n as StepIndicator$1, o as resolveBookingPaymentDueNowCents, r as SpinnerNode, s as formatPrice, t as BookingConsentAgreement } from "./BookingConsentAgreement-xJeYNdnb.mjs";
3
+ import { C as resolveRegistrationTarget, E as getWizardStepsForContext, Gt as formatBookingDate, Pt as assertNever, S as resolveEventRequiresPayment, T as getStepNumber, Yt as formatBookingTime, _ as toRegistrationEvents, b as findPreSelectedEvent, dn as publicEventPricingType, dt as themeButtonClassName, fn as formatCurrencyAmount, g as getRegistrationStartAt, h as buildEventRegistrationDisplayFromScopedEvents, k as resolveEventRegistrationScopedEvents, ln as publicEventPricingOptions, ot as groupPublicEventsByRun, pn as parseCurrencyCode, qt as formatBookingDateTime, rn as toScheduledBookingDateTime, sn as publicEventPricingCurrency, t as defineIslandPropsDecoder, tn as toBookingTimeZone, un as publicEventPricingStrategy, v as toWholeSeriesRegistrationEvents, w as WIZARD_STEPS, x as resolveDiscountContext, y as findEventByOccurrenceId } from "./propsDecoder-zBdsnS-N.mjs";
4
+ import { a as canJoinEventWaitlistOnAnyMode, c as formatTicketTypeRemaining, f as getRemainingPlaces, h as selectMostOpenCapacitySource, i as canJoinEventWaitlist, m as selectEventCapacitySource, o as formatEventRemainingPlaces, p as isEventFull, r as formatEventPriceDisplay, s as formatRemainingPlaces, u as getEventAvailability } from "./pricing-OcMz4SnX.mjs";
5
+ import { n as useBlockApi, r as BlockApiError, t as BlockApiProvider } from "./context-Ctp3T0Wr.mjs";
6
6
  import { n as isSpamProtectionEnabled, r as AltchaWidget, t as getChallengeUrl } from "./src-B833rYRr.mjs";
7
- import { a as CheckIcon, i as StateIcon, n as useDiscountCodeUi, r as TerminalPanel, t as scrollToBlock } from "./scrollToBlock-B1IS1_ua.mjs";
8
- import { t as DiscountCodeDisclosure } from "./DiscountCodeDisclosure-BbYieKWB.mjs";
7
+ import { a as CheckIcon, i as StateIcon, n as useDiscountCodeUi, r as TerminalPanel, t as scrollToBlock } from "./scrollToBlock-BNM4Ob2Y.mjs";
8
+ import { t as DiscountCodeDisclosure } from "./DiscountCodeDisclosure-DdT6uzl9.mjs";
9
9
  import { t as FeedbackMessage } from "./FeedbackMessage-CtLvvS_d.mjs";
10
10
  import { n as getFieldValidationControlProps, t as FieldValidationMessage } from "./FieldValidationMessage-AYanWFb-.mjs";
11
11
  import { t as buildCheckoutReturnUrls } from "./checkoutUrls-FL6lRkrt.mjs";
@@ -969,6 +969,7 @@ function getTicketTypeLineMax(input) {
969
969
  const initialEligibilityLookupState = {
970
970
  tag: "idle",
971
971
  eligibility: null,
972
+ settledRequestKey: null,
972
973
  error: null
973
974
  };
974
975
  function eligibilityLookupReducer(state, action) {
@@ -977,16 +978,19 @@ function eligibilityLookupReducer(state, action) {
977
978
  case "loading-started": return {
978
979
  tag: "loading",
979
980
  eligibility: state.eligibility,
981
+ settledRequestKey: state.settledRequestKey,
980
982
  error: null
981
983
  };
982
984
  case "resolved": return {
983
985
  tag: "resolved",
984
986
  eligibility: action.eligibility,
987
+ settledRequestKey: action.requestKey,
985
988
  error: null
986
989
  };
987
990
  case "failed": return {
988
991
  tag: "failed",
989
992
  eligibility: null,
993
+ settledRequestKey: null,
990
994
  error: action.message
991
995
  };
992
996
  default: return assertNever(action);
@@ -1092,9 +1096,23 @@ function toRegistrationOptionsSubject(subject, attendanceMode) {
1092
1096
  function useEligibility(params) {
1093
1097
  return useEligibilityWithDeps(params, eventRegistrationHooksDeps);
1094
1098
  }
1099
+ function eligibilityRequestKey(params) {
1100
+ return JSON.stringify({
1101
+ enabled: params.enabled,
1102
+ refreshKey: params.refreshKey ?? 0,
1103
+ subject: params.subject,
1104
+ attendanceMode: params.attendanceMode ?? null,
1105
+ ticketSelections: params.ticketSelectionsKey,
1106
+ selectedSlidingAmount: params.selectedSlidingAmount ?? null
1107
+ });
1108
+ }
1095
1109
  function useEligibilityWithDeps(params, deps) {
1096
1110
  const api = deps.useBlockApi();
1097
1111
  const ticketSelectionsKey = JSON.stringify(normalizeTicketSelectionLines(params.ticketSelections));
1112
+ const requestKey = eligibilityRequestKey({
1113
+ ...params,
1114
+ ticketSelectionsKey
1115
+ });
1098
1116
  const [state, dispatch] = useReducer(eligibilityLookupReducer, initialEligibilityLookupState);
1099
1117
  const requestIdRef = useRef(0);
1100
1118
  useEffect(() => {
@@ -1127,7 +1145,8 @@ function useEligibilityWithDeps(params, deps) {
1127
1145
  if (cancelled || requestIdRef.current !== requestId) return;
1128
1146
  dispatch({
1129
1147
  type: "resolved",
1130
- eligibility: transformRegistrationOptionsResponse(result)
1148
+ eligibility: transformRegistrationOptionsResponse(result),
1149
+ requestKey
1131
1150
  });
1132
1151
  } catch {
1133
1152
  if (cancelled || requestIdRef.current !== requestId) return;
@@ -1156,6 +1175,8 @@ function useEligibilityWithDeps(params, deps) {
1156
1175
  return {
1157
1176
  state,
1158
1177
  eligibility: state.eligibility,
1178
+ settledRequestKey: state.settledRequestKey,
1179
+ requestKey,
1159
1180
  isLoading: state.tag === "loading",
1160
1181
  error: state.error,
1161
1182
  creditState
@@ -2419,6 +2440,68 @@ function buildOccurrenceRegistrationRequest(options, prepared, method, passId, m
2419
2440
  };
2420
2441
  }
2421
2442
  //#endregion
2443
+ //#region ../blocks/src/system/runtime/nodes/event-registration/useSettledCommerceView.ts
2444
+ function buildCandidate(input) {
2445
+ if (!input.eligibilityIsSettled || !input.eligibility || !input.currentEvent) return null;
2446
+ return {
2447
+ eventSelectionId: input.currentEvent.selectionId,
2448
+ discountContext: resolveDiscountContext({
2449
+ paymentSelection: input.paymentSelection,
2450
+ event: input.currentEvent,
2451
+ eventRequiresPayment: input.eventRequiresPayment,
2452
+ ticketsCount: input.ticketsCount
2453
+ }),
2454
+ subtotalCents: input.eligibility.price,
2455
+ summaryLines: input.eligibility.ticketLines.map((line) => ({
2456
+ pricingOptionId: line.pricingOptionId,
2457
+ label: line.label,
2458
+ quantity: line.quantity,
2459
+ unitPriceCents: line.unitPriceCents,
2460
+ subtotalCents: line.subtotalCents
2461
+ }))
2462
+ };
2463
+ }
2464
+ function eligibilityIsSettled(result) {
2465
+ return result.settledRequestKey === result.requestKey;
2466
+ }
2467
+ function viewIsStale(view, currentEvent, eligibilityState) {
2468
+ return view.eventSelectionId !== currentEvent?.selectionId || eligibilityState?.tag === "failed" || eligibilityState?.tag === "idle";
2469
+ }
2470
+ function requestIsSettled(discountUi) {
2471
+ return discountUi.discountAvailabilityRequestKey === "disabled" || discountUi.settledDiscountAvailabilityRequestKey === discountUi.discountAvailabilityRequestKey;
2472
+ }
2473
+ function discountRequest(view) {
2474
+ const discountContext = view?.discountContext ?? null;
2475
+ return {
2476
+ discountContext,
2477
+ subtotalCents: discountContext?.type === "event" && view?.subtotalCents !== null ? view?.subtotalCents : void 0
2478
+ };
2479
+ }
2480
+ function useSettledCommerceView(input) {
2481
+ const candidate = buildCandidate({
2482
+ eligibilityIsSettled: eligibilityIsSettled(input.eligibilityResult),
2483
+ eligibility: input.eligibility,
2484
+ currentEvent: input.currentEvent,
2485
+ paymentSelection: input.paymentSelection,
2486
+ eventRequiresPayment: input.eventRequiresPayment,
2487
+ ticketsCount: input.ticketsCount
2488
+ });
2489
+ const settledRef = useRef(candidate);
2490
+ if (settledRef.current && viewIsStale(settledRef.current, input.currentEvent, input.eligibilityResult.state)) settledRef.current = null;
2491
+ const requestView = candidate ?? settledRef.current;
2492
+ const discountUi = input.useDiscountCodeUi({
2493
+ api: input.api,
2494
+ ...discountRequest(requestView)
2495
+ });
2496
+ if (candidate && requestIsSettled(discountUi)) settledRef.current = candidate;
2497
+ return {
2498
+ discountUi,
2499
+ discountContext: settledRef.current?.discountContext ?? null,
2500
+ ticketSelectionSubtotalCents: settledRef.current?.subtotalCents ?? null,
2501
+ ticketSelectionSummaryLines: settledRef.current?.summaryLines ?? []
2502
+ };
2503
+ }
2504
+ //#endregion
2422
2505
  //#region ../blocks/src/system/runtime/nodes/event-registration/registrationWizardContext.ts
2423
2506
  function getEventSelectionDefaults(event) {
2424
2507
  const suggestedAmount = getSlidingScaleForEvent(event)?.suggestedAmount;
@@ -2572,10 +2655,6 @@ function isSoldOutWithoutWaitlist(input) {
2572
2655
  }
2573
2656
  //#endregion
2574
2657
  //#region ../blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.ts
2575
- function resolveDiscountSubtotalCents(context, subtotalCents) {
2576
- if (context?.type !== "event" || subtotalCents === null) return void 0;
2577
- return subtotalCents;
2578
- }
2579
2658
  function usesTieredPricing(event) {
2580
2659
  return event !== null && event !== void 0 ? publicEventPricingStrategy(event.pricing) === "tiered" : false;
2581
2660
  }
@@ -3027,30 +3106,15 @@ function useEventRegistrationWizardWithDeps(options, deps) {
3027
3106
  }
3028
3107
  setStep("select-tickets");
3029
3108
  };
3030
- const discountContext = useMemo(() => resolveDiscountContext({
3031
- paymentSelection,
3032
- event: currentEvent,
3033
- eventRequiresPayment,
3034
- ticketsCount
3035
- }), [
3109
+ const { discountUi, discountContext, ticketSelectionSubtotalCents, ticketSelectionSummaryLines } = useSettledCommerceView({
3110
+ api,
3111
+ useDiscountCodeUi: deps.useDiscountCodeUi,
3112
+ eligibilityResult,
3113
+ eligibility,
3036
3114
  currentEvent,
3037
3115
  eventRequiresPayment,
3038
3116
  paymentSelection,
3039
3117
  ticketsCount
3040
- ]);
3041
- const ticketSelectionSubtotalCents = eligibility?.price ?? null;
3042
- const ticketSelectionSummaryLines = useMemo(() => eligibility?.ticketLines.map((line) => ({
3043
- pricingOptionId: line.pricingOptionId,
3044
- label: line.label,
3045
- quantity: line.quantity,
3046
- unitPriceCents: line.unitPriceCents,
3047
- subtotalCents: line.subtotalCents
3048
- })) ?? [], [eligibility]);
3049
- const discountSubtotalCents = resolveDiscountSubtotalCents(discountContext, ticketSelectionSubtotalCents);
3050
- const discountUi = deps.useDiscountCodeUi({
3051
- api,
3052
- discountContext,
3053
- subtotalCents: discountSubtotalCents
3054
3118
  });
3055
3119
  const selectionMethod = paymentSelection.method;
3056
3120
  const shouldShowDiscountToggle = discountContext !== null && discountUi.manualCodeEntryAllowed && (selectionMethod === "stripe" || selectionMethod === "pass_bundle" || selectionMethod === "membership_bundle");
@@ -3215,6 +3279,34 @@ function useEventRegistrationWizardWithDeps(options, deps) {
3215
3279
  };
3216
3280
  }
3217
3281
  //#endregion
3282
+ //#region ../blocks/src/system/runtime/nodes/event-registration/useEventCheckoutHandoffRestore.ts
3283
+ function eventRegistrationReloadTarget(location) {
3284
+ return `${location.pathname}${location.search}#${EVENT_REGISTRATION_ANCHOR_ID}`;
3285
+ }
3286
+ function reloadAtEventRegistration() {
3287
+ const target = eventRegistrationReloadTarget(window.location);
3288
+ window.history.replaceState(window.history.state, "", target);
3289
+ window.location.reload();
3290
+ }
3291
+ const browserCheckoutHandoffRestoreDeps = {
3292
+ addPageShowListener: (listener) => window.addEventListener("pageshow", listener),
3293
+ removePageShowListener: (listener) => window.removeEventListener("pageshow", listener),
3294
+ reloadAtRegistration: reloadAtEventRegistration
3295
+ };
3296
+ function useEventCheckoutHandoffRestore(active) {
3297
+ useEventCheckoutHandoffRestoreWithDeps(active, browserCheckoutHandoffRestoreDeps);
3298
+ }
3299
+ function useEventCheckoutHandoffRestoreWithDeps(active, deps) {
3300
+ useEffect(() => {
3301
+ if (!active) return;
3302
+ const handlePageShow = (event) => {
3303
+ if (event.persisted) deps.reloadAtRegistration();
3304
+ };
3305
+ deps.addPageShowListener(handlePageShow);
3306
+ return () => deps.removePageShowListener(handlePageShow);
3307
+ }, [active, deps]);
3308
+ }
3309
+ //#endregion
3218
3310
  //#region ../blocks/src/system/runtime/nodes/shared/MagicLinkForm.state.ts
3219
3311
  const initialMagicLinkSubmissionState = Object.freeze({ tag: "idle" });
3220
3312
  function magicLinkSubmissionReducer(state, action) {
@@ -5829,6 +5921,7 @@ function EventRegistrationWizard(props) {
5829
5921
  events: events ?? [],
5830
5922
  maxTicketsNum
5831
5923
  });
5924
+ useEventCheckoutHandoffRestore(wizard.step === "redirecting");
5832
5925
  const [bookingOverlayOpen, setBookingOverlayOpen] = useState(false);
5833
5926
  const [floatingPortalRoot, setFloatingPortalRoot] = useState(null);
5834
5927
  useEffect(() => {
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { O as clsx } from "./colorStyles-3013aRAY.mjs";
3
- import { It as err, Lt as ok, Pt as assertNever, dt as themeButtonClassName, t as defineIslandPropsDecoder } from "./propsDecoder-CB2KS_ko.mjs";
4
- import { n as useBlockApi, t as BlockApiProvider } from "./context-Cy1OayHx.mjs";
3
+ import { It as err, Lt as ok, Pt as assertNever, dt as themeButtonClassName, t as defineIslandPropsDecoder } from "./propsDecoder-zBdsnS-N.mjs";
4
+ import { n as useBlockApi, t as BlockApiProvider } from "./context-Ctp3T0Wr.mjs";
5
5
  import { n as isSpamProtectionEnabled, r as AltchaWidget, t as getChallengeUrl } from "./src-B833rYRr.mjs";
6
6
  import { t as FeedbackMessage } from "./FeedbackMessage-CtLvvS_d.mjs";
7
7
  import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- import { O as staticHeaderChromeRuntime, dt as themeButtonClassName, r as buildCartDisplay, t as defineIslandPropsDecoder } from "./propsDecoder-CB2KS_ko.mjs";
2
+ import { O as staticHeaderChromeRuntime, dt as themeButtonClassName, r as buildCartDisplay, t as defineIslandPropsDecoder } from "./propsDecoder-zBdsnS-N.mjs";
3
3
  import { t as resolveDedicatedCheckoutPath } from "./checkoutRoute-ClwHwYVA.mjs";
4
- import { n as useCommerceCart } from "./shop-commerce-store-BVnJVy7v.mjs";
4
+ import { n as useCommerceCart } from "./shop-commerce-store-2N5EV0Rc.mjs";
5
5
  import { t as ModalShell } from "./ModalShell-CqkBvBIC.mjs";
6
6
  import * as React$1 from "react";
7
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";