@riverbankcms/sdk 0.138.0 → 0.139.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 (208) hide show
  1. package/README.md +11 -15
  2. package/dist/{PreviewEditorSidebar-BVPur_CU.mjs → PreviewEditorSidebar-BDeenhi3.mjs} +4 -4
  3. package/dist/{PreviewEditorUI-DLhWX8oh.mjs → PreviewEditorUI-DSRhgjF5.mjs} +3 -3
  4. package/dist/{PreviewQueryProvider-BguJY1SW.mjs → PreviewQueryProvider-D2K8GLUG.mjs} +1 -1
  5. package/dist/{SdkPreviewModeRuntime-Tda6qw4z.mjs → SdkPreviewModeRuntime-CL7wSnYu.mjs} +47 -27
  6. package/dist/{SiteChromeCustomizeContext-BHFgMjde.mjs → SiteChromeCustomizeContext-BhDn-5ir.mjs} +7771 -5863
  7. package/dist/_dts/ai/src/contracts/proposals.d.ts +99 -330
  8. package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +9 -30
  9. package/dist/_dts/api/src/billing.d.ts +10 -3
  10. package/dist/_dts/api/src/contentRuntime.d.ts +8 -1
  11. package/dist/_dts/api/src/endpoints.d.ts +182 -103
  12. package/dist/_dts/api/src/footerSettings.d.ts +2 -5
  13. package/dist/_dts/api/src/index.d.ts +11 -9
  14. package/dist/_dts/api/src/mailchimpIntegration.d.ts +2 -59
  15. package/dist/_dts/api/src/mailingListIntegration.d.ts +117 -0
  16. package/dist/_dts/api/src/navigation/locations.d.ts +1 -0
  17. package/dist/_dts/api/src/navigation.d.ts +1 -26
  18. package/dist/_dts/api/src/newsletterEndpointDefinitions.d.ts +109 -2
  19. package/dist/_dts/api/src/onboarding/surfaceData.d.ts +185 -0
  20. package/dist/_dts/api/src/privacyPolicy.d.ts +74 -2
  21. package/dist/_dts/api/src/publicBookingAvailabilityEndpointDefinitions.d.ts +6 -6
  22. package/dist/_dts/api/src/publicEventEndpointDefinitions.d.ts +1 -1
  23. package/dist/_dts/api/src/publicExperience/newsletterEndpoints.d.ts +2 -4
  24. package/dist/_dts/api/src/publicExperience/sharedTypes.d.ts +10 -24
  25. package/dist/_dts/api/src/publicReadEndpointDefinitions.d.ts +73 -0
  26. package/dist/_dts/api/src/schemas/site-api-keys.d.ts +1 -1
  27. package/dist/_dts/api/src/sdkContracts.d.ts +2 -10
  28. package/dist/_dts/api/src/sdkThemeWire.d.ts +2 -2
  29. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +0 -29
  30. package/dist/_dts/api/src/siteOnboarding.d.ts +91 -228
  31. package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +1 -9
  32. package/dist/_dts/api/src/siteSettings.d.ts +20 -1
  33. package/dist/_dts/api/src/types.d.ts +5 -4
  34. package/dist/_dts/billing/src/membership/index.d.ts +14 -7
  35. package/dist/_dts/billing/src/plans/display.d.ts +15 -0
  36. package/dist/_dts/billing/src/plans/registry.d.ts +2 -0
  37. package/dist/_dts/billing/src/plans/standing.d.ts +19 -0
  38. package/dist/_dts/billing/src/plans/types.d.ts +1 -7
  39. package/dist/_dts/billing/src/subscriptions/evidence.d.ts +12 -0
  40. package/dist/_dts/billing/src/subscriptions/standingEvidence.d.ts +31 -0
  41. package/dist/_dts/billing/src/subscriptions/store.d.ts +23 -5
  42. package/dist/_dts/blocks/src/PageRenderer.d.ts +6 -15
  43. package/dist/_dts/blocks/src/client.d.ts +1 -1
  44. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +32 -16
  45. package/dist/_dts/blocks/src/pageRendererContracts.d.ts +4 -0
  46. package/dist/_dts/blocks/src/pageRenderingMode.d.ts +12 -6
  47. package/dist/_dts/blocks/src/system/blocks/appointment-services.d.ts +11 -0
  48. package/dist/_dts/blocks/src/system/blocks/contact-newsletter.d.ts +39 -66
  49. package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +39 -114
  50. package/dist/_dts/blocks/src/system/blocks/offerings-preview/catalogue.d.ts +18 -0
  51. package/dist/_dts/blocks/src/system/blocks/offerings-preview/fields.d.ts +2 -0
  52. package/dist/_dts/blocks/src/system/blocks/offerings-preview/index.d.ts +4 -0
  53. package/dist/_dts/blocks/src/system/blocks/site-footer-runtime.d.ts +7 -13
  54. package/dist/_dts/blocks/src/system/constants/blockKinds.d.ts +1 -1
  55. package/dist/_dts/blocks/src/system/data/index.d.ts +2 -2
  56. package/dist/_dts/blocks/src/system/data/loaderEndpoints.d.ts +1 -1
  57. package/dist/_dts/blocks/src/system/data/publicLoaderCachePolicy.d.ts +2 -74
  58. package/dist/_dts/blocks/src/system/fragments/library/newsletterForm.d.ts +33 -100
  59. package/dist/_dts/blocks/src/system/runtime/api/types/newsletter.d.ts +5 -15
  60. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +48 -24
  61. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +24 -12
  62. package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.d.ts +3 -0
  63. package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +1 -1
  64. package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarToday.d.ts +22 -0
  65. package/dist/_dts/blocks/src/system/runtime/nodes/appointment-services.d.ts +51 -0
  66. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +2 -0
  67. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +0 -1
  68. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +28 -0
  69. package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/bookability.d.ts +9 -0
  70. package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/dates.d.ts +14 -0
  71. package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/duration.d.ts +2 -0
  72. package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/index.d.ts +4 -0
  73. package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/location.d.ts +2 -0
  74. package/dist/_dts/blocks/src/system/runtime/nodes/events/domain/quickDates.d.ts +16 -0
  75. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/AgendaEventCard.d.ts +9 -1
  76. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/CalendarDayCell.d.ts +2 -0
  77. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/CalendarDayHeaders.d.ts +4 -0
  78. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/DayEventsModal.d.ts +2 -1
  79. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventCard.d.ts +5 -0
  80. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventModals.d.ts +2 -1
  81. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventQuickDates.d.ts +15 -0
  82. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekAgendaView.d.ts +7 -3
  83. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/WeekTimetableView.d.ts +1 -0
  84. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/index.d.ts +2 -0
  85. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/timetableModel.d.ts +1 -0
  86. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/useHydrationReady.d.ts +6 -0
  87. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.client.state.d.ts +3 -0
  88. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.interactive.d.ts +56 -33
  89. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.submission.d.ts +3 -3
  90. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +13 -31
  91. package/dist/_dts/blocks/src/system/runtime/nodes/offerings-preview-catalogue.d.ts +14 -0
  92. package/dist/_dts/blocks/src/system/runtime/nodes/offerings-preview-content.d.ts +23 -0
  93. package/dist/_dts/blocks/src/system/runtime/nodes/offerings-preview.d.ts +4 -2
  94. package/dist/_dts/blocks/src/system/transforms/registry/formatting.d.ts +5 -0
  95. package/dist/_dts/commerce/src/purchase/index.d.ts +1 -0
  96. package/dist/_dts/commerce/src/purchase/orderItemMetadata.d.ts +5 -12
  97. package/dist/_dts/commerce/src/purchase/stripeCommissionMetadata.d.ts +34 -0
  98. package/dist/_dts/content-editor/src/footerEngagementDraft.d.ts +6 -24
  99. package/dist/_dts/content-editor/src/useFooterComposerState.d.ts +1 -2
  100. package/dist/_dts/core/src/footer-engagement.d.ts +2 -6
  101. package/dist/_dts/core/src/index.d.ts +9 -1
  102. package/dist/_dts/core/src/mailing-list-identifiers.d.ts +21 -0
  103. package/dist/_dts/core/src/mailing-list-runtime.d.ts +42 -0
  104. package/dist/_dts/core/src/mailing-list-setup-parser.d.ts +14 -0
  105. package/dist/_dts/core/src/mailing-list-setup.d.ts +129 -0
  106. package/dist/_dts/core/src/mailing-list-submission.d.ts +244 -0
  107. package/dist/_dts/core/src/mailing-list-targeting-parser.d.ts +12 -0
  108. package/dist/_dts/core/src/mailing-list-targeting.d.ts +93 -0
  109. package/dist/_dts/core/src/navigation-locations.d.ts +28 -0
  110. package/dist/_dts/core/src/public-profile.d.ts +9 -1
  111. package/dist/_dts/core/src/public-read-cache-contract.d.ts +45 -0
  112. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +529 -373
  113. package/dist/_dts/editor-blocks/src/widgets/index.d.ts +1 -0
  114. package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/MailingListTargetingField.d.ts +11 -0
  115. package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/context.d.ts +13 -0
  116. package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/index.d.ts +3 -0
  117. package/dist/_dts/editor-blocks/src/widgets/mailing-list-targeting/loaders.d.ts +6 -0
  118. package/dist/_dts/preview-next/src/client/widgets/widgetOverrides.d.ts +1 -0
  119. package/dist/_dts/sdk/src/client/publicAppointmentReadOperations.d.ts +12 -0
  120. package/dist/_dts/sdk/src/client/publicEventReadOperations.d.ts +2 -1
  121. package/dist/_dts/sdk/src/client/publicLoaderCacheAccess.d.ts +11 -4
  122. package/dist/_dts/sdk/src/config/content-types.d.ts +3 -13
  123. package/dist/_dts/sdk/src/config/content-validation.d.ts +5 -8
  124. package/dist/_dts/sdk/src/constants.d.ts +3 -3
  125. package/dist/_dts/sdk/src/contracts/index.d.ts +1 -1
  126. package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +12 -31
  127. package/dist/_dts/sdk/src/navigation/index.d.ts +11 -29
  128. package/dist/_dts/sdk/src/next/index.d.ts +4 -4
  129. package/dist/_dts/sdk/src/prebuild/types.d.ts +1 -5
  130. package/dist/_dts/sdk/src/public-api/contracts.d.ts +33 -16
  131. package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +3 -0
  132. package/dist/_dts/sdk/src/rendering/client.d.ts +3 -20
  133. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +3 -0
  134. package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +4 -0
  135. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +1 -0
  136. package/dist/_dts/sdk/src/rendering/index.d.ts +1 -1
  137. package/dist/_dts/sdk/src/types/block-kinds.d.ts +1 -1
  138. package/dist/_dts/sdk/src/version.d.ts +1 -1
  139. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  140. package/dist/_dts/theme-core/src/hosted-booking-appearance.d.ts +41 -0
  141. package/dist/_dts/theme-core/src/index.d.ts +1 -0
  142. package/dist/_dts/theme-core/src/runtime/buildThemeRuntime.d.ts +0 -1
  143. package/dist/_dts/theme-core/src/tokens/tokens.d.ts +7 -0
  144. package/dist/_dts/ui/src/badge.d.ts +1 -1
  145. package/dist/_dts/ui/src/callout.d.ts +1 -1
  146. package/dist/client/{BookingConsentAgreement-DQUik1Mx.mjs → BookingConsentAgreement-CZvTDtsK.mjs} +2 -2
  147. package/dist/client/{DiscountCodeDisclosure-CU67Q4vH.mjs → DiscountCodeDisclosure-D-DsLCMU.mjs} +1 -1
  148. package/dist/client/{EventCombined.client-a02TXUgg.mjs → EventCombined.client-dWqgd5ZO.mjs} +443 -199
  149. package/dist/client/{EventListing.client-99qx7jFl.mjs → EventListing.client-BMRa9IYp.mjs} +2 -2
  150. package/dist/client/{LeafletStaticMap-CWzcq73L.mjs → LeafletStaticMap-D21W9kBZ.mjs} +1 -1
  151. package/dist/client/{accordion-D1nb3-Oj.mjs → accordion-FxF_ta47.mjs} +1 -1
  152. package/dist/client/{bookingForm-BGrmLhaO.mjs → bookingForm-YnwW4TGw.mjs} +5 -5
  153. package/dist/client/bookings.mjs +43 -2
  154. package/dist/client/{carousel-DSmOx3ad.mjs → carousel-vng7fFT5.mjs} +1 -1
  155. package/dist/client/{cart-COWeOIUk.mjs → cart-DEPDsjNk.mjs} +3 -3
  156. package/dist/client/{checkout-CeysaIJK.mjs → checkout-CZRWu9rW.mjs} +3 -3
  157. package/dist/client/client.mjs +3331 -1407
  158. package/dist/client/{context-DBzX85Xc.mjs → context-DvU_WUmd.mjs} +4 -3
  159. package/dist/client/{dates-DCYhZBlW.mjs → dates-wnPMiRl5.mjs} +21 -3
  160. package/dist/client/{eventCalendar-BgsN73Ul.mjs → eventCalendar-BA3Q5L15.mjs} +80 -78
  161. package/dist/client/{eventCombined-DcZQAMQP.mjs → eventCombined-51wgR-1R.mjs} +3 -3
  162. package/dist/client/{eventDetails-BWwGJ54l.mjs → eventDetails-modaetpm.mjs} +4 -4
  163. package/dist/client/{eventListing-DqYqV8vp.mjs → eventListing-D8t2J3Kv.mjs} +3 -3
  164. package/dist/client/{eventRegistration-DQGDgu_e.mjs → eventRegistration-CYqtkCE_.mjs} +49 -9
  165. package/dist/client/{form-ClfpasVT.mjs → form-CBKXN5In.mjs} +2 -2
  166. package/dist/client/{headerSection-BuOMe98N.mjs → headerSection-DylDqNrs.mjs} +2 -2
  167. package/dist/client/hooks.mjs +1259 -555
  168. package/dist/client/{locationMap-CEqu_sfa.mjs → locationMap-CvWrG0vZ.mjs} +2 -2
  169. package/dist/client/{newsletterForm-IbrHjMxy.mjs → newsletterForm-Btwk70zw.mjs} +117 -38
  170. package/dist/client/{pricing-xj7MPZlK.mjs → pricing-Uzw-GQ6Y.mjs} +1 -1
  171. package/dist/client/{productDetail-vxqTt5Xj.mjs → productDetail-JLcUYKnd.mjs} +3 -3
  172. package/dist/client/{productList-OTdZu8sb.mjs → productList-FM0cbUzj.mjs} +3 -3
  173. package/dist/client/{propsDecoder-CY9gGEF7.mjs → propsDecoder-DYzafZb2.mjs} +592 -152
  174. package/dist/client/rendering/client.mjs +2259 -835
  175. package/dist/client/rendering/islands.mjs +17 -17
  176. package/dist/client/rendering.mjs +3308 -1236
  177. package/dist/client/{scrollToBlock--BFV6kl-.mjs → scrollToBlock-CvXszexS.mjs} +1 -1
  178. package/dist/client/{shop-CP4YbDL9.mjs → shop-BIcjvy5a.mjs} +6 -6
  179. package/dist/client/{shop-commerce-APs4XBXE.mjs → shop-commerce-BZQsy7xw.mjs} +5 -5
  180. package/dist/client/{shop-commerce-store-CAVLxLFr.mjs → shop-commerce-store-D5V7XAb5.mjs} +1 -1
  181. package/dist/client/{shopShared-BnSRrwXI.mjs → shopShared-DowkXevB.mjs} +3 -3
  182. package/dist/client/{useEventFilters-1a1by4c8.mjs → useEventFilters-oMoTw_JE.mjs} +56 -9
  183. package/dist/preview-next/before-render.mjs +238 -111
  184. package/dist/preview-next/client/runtime.mjs +4 -4
  185. package/dist/preview-next/keepAlive.mjs +238 -111
  186. package/dist/preview-next/middleware.mjs +238 -111
  187. package/dist/{previewAuthStore-BkEgnYPP.mjs → previewAuthStore-COUyAKaX.mjs} +238 -111
  188. package/dist/{sdk-runtime-DwGfsT0S.mjs → sdk-runtime-D4k2LSGF.mjs} +2 -2
  189. package/dist/{separator-BeqDLneQ.mjs → separator-UGtpag4Z.mjs} +1 -1
  190. package/dist/server/components.mjs +2697 -1023
  191. package/dist/server/config-validation.mjs +2424 -1720
  192. package/dist/server/config.mjs +2429 -1724
  193. package/dist/server/data.mjs +1164 -454
  194. package/dist/server/index.mjs +364 -280
  195. package/dist/server/navigation.mjs +16 -47
  196. package/dist/server/next.mjs +2915 -1380
  197. package/dist/server/page-converter.mjs +969 -522
  198. package/dist/server/prebuild.mjs +2 -3
  199. package/dist/server/rendering/server.mjs +2704 -1030
  200. package/dist/server/rendering.mjs +2742 -1063
  201. package/dist/server/routing.mjs +1386 -595
  202. package/dist/server/server.mjs +2878 -2324
  203. package/dist/server/theme-bridge.mjs +292 -24
  204. package/dist/styles/index.css +289 -25
  205. package/package.json +1 -1
  206. package/dist/_dts/api/src/navigation/identity.d.ts +0 -59
  207. package/dist/_dts/blocks/src/system/blocks/newsletter-signup-destination.d.ts +0 -291
  208. package/dist/_dts/core/src/newsletter-signup-destination.d.ts +0 -38
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { L as calendarWindowPageSchema } from "./propsDecoder-CY9gGEF7.mjs";
2
+ import { L as calendarWindowPageSchema } from "./propsDecoder-DYzafZb2.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
@@ -913,8 +913,9 @@ function createBlockApi(config) {
913
913
  name: data.name,
914
914
  company: data.company,
915
915
  phone: data.phone,
916
- target: data.target,
917
- tags: data.tags,
916
+ sourceRef: data.sourceRef,
917
+ setupRevision: data.setupRevision,
918
+ visitorSelection: data.visitorSelection,
918
919
  meta: data.meta
919
920
  }
920
921
  });
@@ -1,5 +1,5 @@
1
- import { $t as toBookingTimeZone, Ut as formatBookingDate, Wt as formatBookingDateParts, dn as assertNever, en as toScheduledBookingDateRange, it as resolveRuntimeEventDestination, qt as formatBookingTime, tn as toScheduledBookingDateTime } from "./propsDecoder-CY9gGEF7.mjs";
2
- import { a as canJoinEventWaitlistOnAnyMode, p as isEventFull } from "./pricing-xj7MPZlK.mjs";
1
+ import { Gt as formatBookingDateParts, Jt as formatBookingTime, Wt as formatBookingDate, en as toBookingTimeZone, it as resolveRuntimeEventDestination, nn as toScheduledBookingDateTime, pn as assertNever, tn as toScheduledBookingDateRange } from "./propsDecoder-DYzafZb2.mjs";
2
+ import { a as canJoinEventWaitlistOnAnyMode, p as isEventFull } from "./pricing-Uzw-GQ6Y.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
@@ -173,6 +173,10 @@ function groupItemsByDate(items, accessors) {
173
173
  * timestamps become strings or date buckets. Calendar-grid primitives are
174
174
  * re-exported from @riverbankcms/calendar so block code has one import.
175
175
  */
176
+ /** Use the event timezone when present, otherwise the calendar/site timezone. */
177
+ function resolveEventTimeZone(event, calendarTimeZone) {
178
+ return event.timeZone || calendarTimeZone;
179
+ }
176
180
  /**
177
181
  * Format date for display.
178
182
  * Returns: "Monday, January 15, 2025"
@@ -247,6 +251,20 @@ function formatEventCompactDateRail(isoTimestamp, options) {
247
251
  };
248
252
  }
249
253
  /**
254
+ * Format the next occurrence for the image-free catalogue card treatment.
255
+ *
256
+ * The compact rail already owns this short, booking-local date vocabulary;
257
+ * keep the fact panel on the same date and timezone rules as event rows.
258
+ */
259
+ function formatEventNextDateFact(event) {
260
+ const rail = formatEventCompactDateRail(event.startsAt, { timeZone: event.timeZone });
261
+ return {
262
+ dateTime: event.startsAt,
263
+ value: `${rail.weekday} ${rail.day} ${rail.month}`,
264
+ label: rail.label
265
+ };
266
+ }
267
+ /**
250
268
  * Group events by their local date (YYYY-MM-DD key in each event's own
251
269
  * timezone). Thin domain wrapper over `groupItemsByDate` from the calendar
252
270
  * package; preserves the historical `Map<string, PublicEvent[]>` shape.
@@ -261,4 +279,4 @@ function groupEventsByDate(events, calendarTimeZone) {
261
279
  return map;
262
280
  }
263
281
  //#endregion
264
- export { groupEventsByDate as a, resolveEventCta as c, formatTime as i, resolveEventLinkProps as l, formatEventCompactDateRail as n, getLocalDateKey as o, formatEventDateParts as r, getLocalMinuteOfDay as s, formatDate as t };
282
+ export { formatTime as a, getLocalDateKey as c, resolveEventLinkProps as d, formatEventNextDateFact as i, getLocalMinuteOfDay as l, formatEventCompactDateRail as n, groupEventsByDate as o, formatEventDateParts as r, resolveEventTimeZone as s, formatDate as t, resolveEventCta as u };
@@ -1,16 +1,16 @@
1
1
  "use client";
2
2
  import { D as clsx } from "./colorStyles-CrxJrPjJ.mjs";
3
- import { $ as getOrderedDayNames, B as buildEventRuntimeFilters, E as buildEventCalendarListingRender, J as addDays, Q as getDayOfWeek, Z as formatDateKey, et as getWeekCalendarDays, nt as isToday, q as MONTH_NAMES, t as defineIslandPropsDecoder, tt as isSameCalendarDay, ut as themeButtonClassName, z as resolveCalendarReadProfile } from "./propsDecoder-CY9gGEF7.mjs";
4
- import { o as EventFilters, s as formatEventTeacherLine, t as useEventFilters } from "./useEventFilters-1a1by4c8.mjs";
5
- import { d as getEventAvailabilityStatus, o as formatEventRemainingPlaces, p as isEventFull } from "./pricing-xj7MPZlK.mjs";
6
- import { a as groupEventsByDate, i as formatTime, l as resolveEventLinkProps, o as getLocalDateKey, s as getLocalMinuteOfDay } from "./dates-DCYhZBlW.mjs";
7
- import { t as BlockApiProvider } from "./context-DBzX85Xc.mjs";
3
+ import { $ as getOrderedDayNames, B as buildEventRuntimeFilters, E as buildEventCalendarListingRender, J as addDays, Q as getDayOfWeek, Z as formatDateKey, et as getWeekCalendarDays, nt as isToday, q as MONTH_NAMES, t as defineIslandPropsDecoder, tt as isSameCalendarDay, ut as themeButtonClassName, z as resolveCalendarReadProfile } from "./propsDecoder-DYzafZb2.mjs";
4
+ import { o as EventFilters, s as formatEventTeacherLine, t as useEventFilters } from "./useEventFilters-oMoTw_JE.mjs";
5
+ import { d as getEventAvailabilityStatus, o as formatEventRemainingPlaces, p as isEventFull } from "./pricing-Uzw-GQ6Y.mjs";
6
+ import { a as formatTime, c as getLocalDateKey, d as resolveEventLinkProps, l as getLocalMinuteOfDay, o as groupEventsByDate, s as resolveEventTimeZone } from "./dates-wnPMiRl5.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-dWqgd5ZO.mjs";
8
+ import { t as BlockApiProvider } from "./context-DvU_WUmd.mjs";
8
9
  import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
9
10
  import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-UNsfPcYq.mjs";
10
- import { n as EventListingController } from "./EventListing.client-99qx7jFl.mjs";
11
- import { a as CalendarDayCell, c as useCalendarEvents, i as WeekAgendaView, o as EventModalProvider, r as EventModals, s as useEventModal, t as EventCombinedClient } from "./EventCombined.client-a02TXUgg.mjs";
11
+ import { n as EventListingController } from "./EventListing.client-BMRa9IYp.mjs";
12
12
  import { useEffect, useId, useMemo, useState } from "react";
13
- import { jsx, jsxs } from "react/jsx-runtime";
13
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
14
14
  //#region ../calendar/src/lane-packing.ts
15
15
  /**
16
16
  * Assign lanes to a list of intervals.
@@ -322,24 +322,6 @@ function parseDateKey(dateKey) {
322
322
  };
323
323
  }
324
324
  //#endregion
325
- //#region ../blocks/src/system/runtime/nodes/events/shared/CalendarNavigationChevron.tsx
326
- function CalendarNavigationChevron({ direction }) {
327
- return /* @__PURE__ */ jsx("svg", {
328
- width: "20",
329
- height: "20",
330
- fill: "none",
331
- stroke: "currentColor",
332
- strokeWidth: 2,
333
- viewBox: "0 0 24 24",
334
- "aria-hidden": "true",
335
- children: /* @__PURE__ */ jsx("path", {
336
- strokeLinecap: "round",
337
- strokeLinejoin: "round",
338
- d: direction === "previous" ? "M15 19l-7-7 7-7" : "M9 5l7 7-7 7"
339
- })
340
- });
341
- }
342
- //#endregion
343
325
  //#region ../blocks/src/system/runtime/nodes/events/shared/WeekBoardView.tsx
344
326
  function buildWeekBoardNavigationState(viewport, today) {
345
327
  return {
@@ -392,8 +374,8 @@ const LEGEND_ITEMS = [
392
374
  * Format an event's start–end as a compact range, merging the shared meridiem.
393
375
  * "6:00 PM" + "7:00 PM" -> "6:00 – 7:00 PM"; "9:30 AM" + "10:15 AM" -> "9:30 – 10:15 AM".
394
376
  */
395
- function formatCompactTimeRange(event) {
396
- const timeZone = event.timeZone ?? null;
377
+ function formatCompactTimeRange(event, calendarTimeZone) {
378
+ const timeZone = resolveEventTimeZone(event, calendarTimeZone);
397
379
  const start = formatTime(event.startsAt, { timeZone });
398
380
  const end = formatTime(event.endsAt, { timeZone });
399
381
  const startMeridiem = start.slice(-2);
@@ -401,7 +383,7 @@ function formatCompactTimeRange(event) {
401
383
  if ((startMeridiem === "AM" || startMeridiem === "PM") && startMeridiem === endMeridiem) return `${start.slice(0, -3).trim()} – ${end}`;
402
384
  return `${start} – ${end}`;
403
385
  }
404
- const WeekBoardCard = ({ event, showCapacity }) => {
386
+ const WeekBoardCard = ({ event, showCapacity, calendarTimeZone }) => {
405
387
  const linkProps = resolveEventLinkProps(event);
406
388
  const { status, label } = getEventAvailabilityStatus(event);
407
389
  const pill = showCapacity ? label : null;
@@ -416,7 +398,7 @@ const WeekBoardCard = ({ event, showCapacity }) => {
416
398
  }),
417
399
  /* @__PURE__ */ jsx("span", {
418
400
  className: "event-week-board-card-time",
419
- children: formatCompactTimeRange(event)
401
+ children: formatCompactTimeRange(event, calendarTimeZone)
420
402
  }),
421
403
  pill ? /* @__PURE__ */ jsx("span", {
422
404
  className: "event-week-board-card-pill",
@@ -493,7 +475,7 @@ const WeekBoardLoadError = ({ navigation, buttonClassName }) => {
493
475
  })]
494
476
  });
495
477
  };
496
- const WeekBoardGrid = ({ days, eventsByDate, showCapacity, today: currentDate }) => /* @__PURE__ */ jsx("div", {
478
+ const WeekBoardGrid = ({ days, eventsByDate, showCapacity, calendarTimeZone, today: currentDate }) => /* @__PURE__ */ jsx("div", {
497
479
  className: "event-week-board-grid",
498
480
  children: days.map((date) => {
499
481
  const dateKey = formatDateKey(date);
@@ -514,7 +496,8 @@ const WeekBoardGrid = ({ days, eventsByDate, showCapacity, today: currentDate })
514
496
  className: "event-week-board-day-body",
515
497
  children: dayEvents.map((event) => /* @__PURE__ */ jsx(WeekBoardCard, {
516
498
  event,
517
- showCapacity
499
+ showCapacity,
500
+ calendarTimeZone
518
501
  }, event.occurrenceId || event.id))
519
502
  })]
520
503
  }, dateKey);
@@ -588,6 +571,7 @@ const WeekBoardView = ({ days, events, navigation, showCapacity, emptyMessage =
588
571
  days,
589
572
  eventsByDate,
590
573
  showCapacity,
574
+ calendarTimeZone,
591
575
  today
592
576
  }),
593
577
  /* @__PURE__ */ jsx(WeekBoardFooter, {
@@ -622,6 +606,7 @@ const FULL_DAY_NAMES = [
622
606
  "Saturday"
623
607
  ];
624
608
  function buildTimetableModel(input) {
609
+ const calendarTimeZone = input.calendarTimeZone;
625
610
  const generic = buildTimetableModel$1({
626
611
  items: input.events,
627
612
  viewDate: input.viewDate,
@@ -630,7 +615,7 @@ function buildTimetableModel(input) {
630
615
  getId: (event) => event.id,
631
616
  getStartsAt: (event) => event.startsAt,
632
617
  getEndsAt: (event) => event.endsAt,
633
- getTimeZone: (event) => event.timeZone ?? "UTC",
618
+ getTimeZone: (event) => resolveEventTimeZone(event, calendarTimeZone),
634
619
  getColor: (event) => event.eventCategory?.color ?? null,
635
620
  getOrderKey: (event) => `${event.title}\u0000${event.id}`
636
621
  });
@@ -646,11 +631,11 @@ function buildTimetableModel(input) {
646
631
  label: formatDayLabel(day.date),
647
632
  shortLabel: formatShortDayLabel(day.date),
648
633
  isToday: day.isToday,
649
- events: day.cells.map(toEventCell)
634
+ events: day.cells.map((cell) => toEventCell(cell, calendarTimeZone))
650
635
  }))
651
636
  };
652
637
  }
653
- function toEventCell(cell) {
638
+ function toEventCell(cell, calendarTimeZone) {
654
639
  const event = cell.item;
655
640
  const capacity = formatTimetableCapacity(event);
656
641
  return {
@@ -662,7 +647,7 @@ function toEventCell(cell) {
662
647
  laneIndex: cell.laneIndex,
663
648
  laneCount: cell.laneCount,
664
649
  categoryColor: cell.color ?? DEFAULT_EVENT_CELL_COLOR,
665
- timeLabel: formatEventTimeRange(event),
650
+ timeLabel: formatEventTimeRange(event, calendarTimeZone),
666
651
  teacherLine: formatEventTeacherLine(event),
667
652
  capacityLabel: capacity.label,
668
653
  isFull: capacity.isFull
@@ -674,8 +659,8 @@ function formatTimetableCapacity(event) {
674
659
  isFull: isEventFull(event)
675
660
  };
676
661
  }
677
- function formatEventTimeRange(event) {
678
- const timeZone = event.timeZone ?? null;
662
+ function formatEventTimeRange(event, calendarTimeZone) {
663
+ const timeZone = resolveEventTimeZone(event, calendarTimeZone);
679
664
  return `${formatTime(event.startsAt, { timeZone })} - ${formatTime(event.endsAt, { timeZone })}`;
680
665
  }
681
666
  function formatDayLabel(date) {
@@ -686,14 +671,16 @@ function formatShortDayLabel(date) {
686
671
  }
687
672
  //#endregion
688
673
  //#region ../blocks/src/system/runtime/nodes/events/shared/WeekTimetableView.tsx
689
- const WeekTimetableView = ({ viewDate, events, startOfWeek, today, showCapacity, emptyMessage = "No classes scheduled" }) => {
674
+ const WeekTimetableView = ({ viewDate, events, startOfWeek, today, showCapacity, calendarTimeZone, emptyMessage = "No classes scheduled" }) => {
690
675
  const { openEventModal } = useEventModal();
691
676
  const model = useMemo(() => buildTimetableModel({
692
677
  events,
693
678
  viewDate,
694
679
  startOfWeek,
695
- today
680
+ today,
681
+ calendarTimeZone
696
682
  }), [
683
+ calendarTimeZone,
697
684
  events,
698
685
  startOfWeek,
699
686
  today,
@@ -874,7 +861,7 @@ const EventCalendarWeekBoardClient = ({ render }) => {
874
861
  display.filterVenueId,
875
862
  display.scheduleScope
876
863
  ]);
877
- const { events, viewport, loadState, goToPrevious, goToNext, goToToday, retryCurrentView } = useCalendarEvents({
864
+ const { events, today, viewport, loadState, goToPrevious, goToNext, goToToday, retryCurrentView } = useCalendarEvents({
878
865
  readProfile: resolveCalendarReadProfile({ variant: display.displayMode }),
879
866
  siteId: hydration.siteId,
880
867
  view: "week",
@@ -891,7 +878,7 @@ const EventCalendarWeekBoardClient = ({ render }) => {
891
878
  } : loadState;
892
879
  const navigation = {
893
880
  kind: "interactive",
894
- ...buildWeekBoardNavigationState(viewport, hydration.calendarContext.initialToday),
881
+ ...buildWeekBoardNavigationState(viewport, today),
895
882
  loadState: weekBoardLoadState,
896
883
  onPrevious: goToPrevious,
897
884
  onNext: goToNext,
@@ -900,13 +887,13 @@ const EventCalendarWeekBoardClient = ({ render }) => {
900
887
  return /* @__PURE__ */ jsx(WeekBoardView, { ...buildWeekBoardViewProps({
901
888
  ...display,
902
889
  calendarTimeZone: hydration.calendarContext.timeZone,
903
- today: hydration.calendarContext.initialToday
890
+ today
904
891
  }, viewport.days, navigation, events) });
905
892
  };
906
893
  const EventCalendarTimetableClient = ({ render }) => {
907
894
  const { display, hydration } = render;
908
895
  const { filtersNode, listFilters } = useEventCalendarFilterState(display);
909
- const { events, viewDate, viewport, loadState, retryCurrentView, goToPrevious, goToNext, goToToday } = useCalendarEvents({
896
+ const { events, today, viewDate, viewport, loadState, retryCurrentView, goToPrevious, goToNext, goToToday } = useCalendarEvents({
910
897
  readProfile: resolveCalendarReadProfile({ variant: display.displayMode }),
911
898
  siteId: hydration.siteId,
912
899
  view: "week",
@@ -934,20 +921,23 @@ const EventCalendarTimetableClient = ({ render }) => {
934
921
  startOfWeek: display.startOfWeek,
935
922
  emptyMessage: display.emptyMessage,
936
923
  showCapacity: display.showCapacity,
937
- today: hydration.calendarContext.initialToday
924
+ calendarTimeZone: hydration.calendarContext.timeZone,
925
+ today
938
926
  })
939
927
  }), /* @__PURE__ */ jsx(EventModals, {
940
928
  cardRole: display.cardRole,
941
929
  buttonVariant: display.buttonVariant,
942
930
  buttonText: display.buttonText,
943
- showCapacity: display.showCapacity
931
+ showCapacity: display.showCapacity,
932
+ calendarTimeZone: hydration.calendarContext.timeZone
944
933
  })] });
945
934
  };
946
935
  const EventCalendarGridClient = ({ render }) => {
947
936
  const { display, hydration } = render;
937
+ const hydrationReady = useHydrationReady();
948
938
  const calendarView = display.defaultCalendarView;
949
939
  const { filtersNode, listFilters } = useEventCalendarFilterState(display);
950
- const { events, viewDate, viewport, loadState, retryCurrentView, goToPrevious, goToNext, goToToday } = useCalendarEvents({
940
+ const { events, today, viewDate, viewport, loadState, retryCurrentView, goToPrevious, goToNext, goToToday } = useCalendarEvents({
951
941
  readProfile: resolveCalendarReadProfile({ variant: display.displayMode }),
952
942
  siteId: hydration.siteId,
953
943
  view: calendarView,
@@ -960,7 +950,7 @@ const EventCalendarGridClient = ({ render }) => {
960
950
  });
961
951
  const eventsByDate = useMemo(() => groupEventsByDate(events, hydration.calendarContext.timeZone), [events, hydration.calendarContext.timeZone]);
962
952
  const dayNames = useMemo(() => getOrderedDayNames(display.startOfWeek), [display.startOfWeek]);
963
- return /* @__PURE__ */ jsxs(EventModalProvider, { children: [/* @__PURE__ */ jsxs(EventCalendarChrome, {
953
+ return /* @__PURE__ */ jsxs(EventModalProvider, { children: [/* @__PURE__ */ jsx(EventCalendarChrome, {
964
954
  display,
965
955
  calendarView,
966
956
  loadState,
@@ -970,44 +960,56 @@ const EventCalendarGridClient = ({ render }) => {
970
960
  onNext: goToNext,
971
961
  onPrevious: goToPrevious,
972
962
  onToday: goToToday,
973
- children: [viewport.kind === "week" ? /* @__PURE__ */ jsx(WeekAgendaView, {
974
- days: viewport.days,
963
+ children: /* @__PURE__ */ jsx(EventCalendarGridContent, {
964
+ display,
975
965
  events,
976
- emptyMessage: display.emptyMessage,
977
- showCapacity: display.showCapacity,
966
+ eventsByDate,
967
+ loadState,
968
+ dayNames,
969
+ viewDate,
970
+ viewport,
978
971
  calendarTimeZone: hydration.calendarContext.timeZone,
979
- today: hydration.calendarContext.initialToday
980
- }) : /* @__PURE__ */ jsxs("div", {
981
- className: "event-calendar-container",
982
- children: [/* @__PURE__ */ jsx("div", {
983
- className: "event-calendar-day-headers",
984
- children: dayNames.map((day) => /* @__PURE__ */ jsx("div", {
985
- className: "event-calendar-day-header",
986
- children: day
987
- }, day))
988
- }), /* @__PURE__ */ jsx("div", {
989
- className: "event-calendar-grid",
990
- children: viewport.days.map((date) => {
991
- const dateKey = formatDateKey(date);
992
- return /* @__PURE__ */ jsx(CalendarDayCell, {
993
- date,
994
- events: eventsByDate.get(dateKey) || [],
995
- isCurrentMonth: date.month === viewDate.month,
996
- today: hydration.calendarContext.initialToday
997
- }, dateKey);
998
- })
999
- })]
1000
- }), viewport.kind === "month" && events.length === 0 && loadState.kind === "idle" ? /* @__PURE__ */ jsx("p", {
1001
- className: "event-calendar-empty",
1002
- children: display.emptyMessage
1003
- }) : null]
972
+ hydrationReady,
973
+ today
974
+ })
1004
975
  }), /* @__PURE__ */ jsx(EventModals, {
1005
976
  cardRole: display.cardRole,
1006
977
  buttonVariant: display.buttonVariant,
1007
978
  buttonText: display.buttonText,
1008
- showCapacity: display.showCapacity
979
+ showCapacity: display.showCapacity,
980
+ calendarTimeZone: hydration.calendarContext.timeZone
1009
981
  })] });
1010
982
  };
983
+ const EventCalendarGridContent = ({ display, events, eventsByDate, loadState, dayNames, viewDate, viewport, calendarTimeZone, hydrationReady, today }) => /* @__PURE__ */ jsxs(Fragment, { children: [viewport.kind === "week" ? /* @__PURE__ */ jsx(WeekAgendaView, {
984
+ days: viewport.days,
985
+ events,
986
+ emptyMessage: display.emptyMessage,
987
+ showCapacity: display.showCapacity,
988
+ showVenue: display.showVenue,
989
+ showEmptyState: hydrationReady && loadState.kind === "idle",
990
+ buttonVariant: display.buttonVariant,
991
+ buttonText: display.buttonText,
992
+ calendarTimeZone,
993
+ today
994
+ }) : /* @__PURE__ */ jsxs("div", {
995
+ className: "event-calendar-container",
996
+ children: [/* @__PURE__ */ jsx(CalendarDayHeaders, { dayNames }), /* @__PURE__ */ jsx("div", {
997
+ className: "event-calendar-grid",
998
+ children: viewport.days.map((date) => {
999
+ const dateKey = formatDateKey(date);
1000
+ return /* @__PURE__ */ jsx(CalendarDayCell, {
1001
+ date,
1002
+ events: eventsByDate.get(dateKey) ?? [],
1003
+ isCurrentMonth: date.month === viewDate.month,
1004
+ calendarTimeZone,
1005
+ today
1006
+ }, dateKey);
1007
+ })
1008
+ })]
1009
+ }), viewport.kind === "month" && events.length === 0 && hydrationReady && loadState.kind === "idle" ? /* @__PURE__ */ jsx("p", {
1010
+ className: "event-calendar-empty",
1011
+ children: display.emptyMessage
1012
+ }) : null] });
1011
1013
  function useEventCalendarFilterState(display) {
1012
1014
  const filtersIdBase = useId();
1013
1015
  const filterState = useEventFilters({
@@ -1,8 +1,8 @@
1
- import { t as defineIslandPropsDecoder } from "./propsDecoder-CY9gGEF7.mjs";
2
- import { t as BlockApiProvider } from "./context-DBzX85Xc.mjs";
1
+ import { t as defineIslandPropsDecoder } from "./propsDecoder-DYzafZb2.mjs";
2
+ import { n as EventCombinedIslandClient } from "./EventCombined.client-dWqgd5ZO.mjs";
3
+ import { t as BlockApiProvider } from "./context-DvU_WUmd.mjs";
3
4
  import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
4
5
  import { t as buildRouteIslandApiConfig } from "./routeIslandApiConfig-UNsfPcYq.mjs";
5
- import { n as EventCombinedIslandClient } from "./EventCombined.client-a02TXUgg.mjs";
6
6
  import "react";
7
7
  import { jsx } from "react/jsx-runtime";
8
8
  //#region src/rendering/islands/enhancers/eventCombined.tsx
@@ -1,8 +1,8 @@
1
- import { $t as toBookingTimeZone, Bt as CANCELLED_SESSION_STATUS, O as resolveEventRegistrationScopedEvents, Vt as resolveWholeSeriesBookingPhase, Yt as getBookingLocalDateKey, an as publicEventPricingCurrency, in as isPublicEventPricingOptionDisplayable, ln as publicEventPricingType, nn as formatBookingPriceDisplay, on as publicEventPricingDisplay, t as defineIslandPropsDecoder, tn as toScheduledBookingDateTime, un as formatCurrencyAmount } from "./propsDecoder-CY9gGEF7.mjs";
2
- import { l as formatTotalCapacity, n as formatEventPriceAmount, t as formatEventPrice } from "./pricing-xj7MPZlK.mjs";
3
- import { l as resolveEventLinkProps, r as formatEventDateParts } from "./dates-DCYhZBlW.mjs";
1
+ import { Bt as CANCELLED_SESSION_STATUS, O as resolveEventRegistrationScopedEvents, Vt as resolveWholeSeriesBookingPhase, Xt as getBookingLocalDateKey, an as isPublicEventPricingOptionDisplayable, dn as formatCurrencyAmount, en as toBookingTimeZone, nn as toScheduledBookingDateTime, on as publicEventPricingCurrency, rn as formatBookingPriceDisplay, sn as publicEventPricingDisplay, t as defineIslandPropsDecoder, un as publicEventPricingType } from "./propsDecoder-DYzafZb2.mjs";
2
+ import { l as formatTotalCapacity, n as formatEventPriceAmount, t as formatEventPrice } from "./pricing-Uzw-GQ6Y.mjs";
3
+ import { d as resolveEventLinkProps, r as formatEventDateParts } from "./dates-wnPMiRl5.mjs";
4
4
  import { t as mountReactIsland } from "./reactMount-SY8AVRof.mjs";
5
- import { t as LeafletStaticMap } from "./LeafletStaticMap-CWzcq73L.mjs";
5
+ import { t as LeafletStaticMap } from "./LeafletStaticMap-D21W9kBZ.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-CY9gGEF7.mjs";
2
- import { t as BlockApiProvider } from "./context-DBzX85Xc.mjs";
1
+ import { t as defineIslandPropsDecoder } from "./propsDecoder-DYzafZb2.mjs";
2
+ import { t as BlockApiProvider } from "./context-DvU_WUmd.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-99qx7jFl.mjs";
5
+ import { t as EventListingClient } from "./EventListing.client-BMRa9IYp.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-DQUik1Mx.mjs";
3
- import { $t as toBookingTimeZone, C as WIZARD_STEPS, Gt as formatBookingDateTime, Nt as assertNever, O as resolveEventRegistrationScopedEvents, S as resolveRegistrationTarget, T as getWizardStepsForContext, Ut as formatBookingDate, _ as toWholeSeriesRegistrationEvents, an as publicEventPricingCurrency, at as groupPublicEventsByRun, b as resolveDiscountContext, cn as publicEventPricingStrategy, g as toRegistrationEvents, h as getRegistrationStartAt, ln as publicEventPricingType, qt as formatBookingTime, sn as publicEventPricingOptions, t as defineIslandPropsDecoder, tn as toScheduledBookingDateTime, un as formatCurrencyAmount, ut as themeButtonClassName, v as findEventByOccurrenceId, w as getStepNumber, x as resolveEventRequiresPayment, y as findPreSelectedEvent } from "./propsDecoder-CY9gGEF7.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-xj7MPZlK.mjs";
5
- import { n as useBlockApi, r as BlockApiError, t as BlockApiProvider } from "./context-DBzX85Xc.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-CZvTDtsK.mjs";
3
+ import { C as WIZARD_STEPS, Jt as formatBookingTime, Kt as formatBookingDateTime, Nt as assertNever, O as resolveEventRegistrationScopedEvents, S as resolveRegistrationTarget, T as getWizardStepsForContext, Wt as formatBookingDate, _ as toWholeSeriesRegistrationEvents, at as groupPublicEventsByRun, b as resolveDiscountContext, cn as publicEventPricingOptions, dn as formatCurrencyAmount, en as toBookingTimeZone, fn as parseCurrencyCode, g as toRegistrationEvents, h as getRegistrationStartAt, ln as publicEventPricingStrategy, nn as toScheduledBookingDateTime, on as publicEventPricingCurrency, t as defineIslandPropsDecoder, un as publicEventPricingType, ut as themeButtonClassName, v as findEventByOccurrenceId, w as getStepNumber, x as resolveEventRequiresPayment, y as findPreSelectedEvent } from "./propsDecoder-DYzafZb2.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-Uzw-GQ6Y.mjs";
5
+ import { n as useBlockApi, r as BlockApiError, t as BlockApiProvider } from "./context-DvU_WUmd.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--BFV6kl-.mjs";
8
- import { t as DiscountCodeDisclosure } from "./DiscountCodeDisclosure-CU67Q4vH.mjs";
7
+ import { a as CheckIcon, i as StateIcon, n as useDiscountCodeUi, r as TerminalPanel, t as scrollToBlock } from "./scrollToBlock-CvXszexS.mjs";
8
+ import { t as DiscountCodeDisclosure } from "./DiscountCodeDisclosure-D-DsLCMU.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-BuseL0dw.mjs";
@@ -1283,6 +1283,40 @@ const SharedDatedOfferingOrderCheckoutSessionMetadataSchema = z.object({
1283
1283
  ...datedOfferingSharedEngineMetadataShape
1284
1284
  });
1285
1285
  z.union([SharedDatedOfferingOrderCheckoutSessionMetadataSchema, LegacyOrderCheckoutSessionMetadataSchema]);
1286
+ //#endregion
1287
+ //#region ../commerce/src/purchase/stripeCommissionMetadata.ts
1288
+ /** Reasons are payment evidence, not an independent pricing policy. */
1289
+ const STRIPE_COMMISSION_FREE_REASONS = [
1290
+ "managed_billing",
1291
+ "no_commission_plan",
1292
+ "billing_evidence_invalid",
1293
+ "fee_rounds_to_zero",
1294
+ "non_commissionable_scope",
1295
+ "payment_not_stripe"
1296
+ ];
1297
+ const historicalContext = {
1298
+ currency: z.string().refine((value) => parseCurrencyCode(value) !== null).optional(),
1299
+ sourcePlanId: z.string().trim().min(1).optional()
1300
+ };
1301
+ const percentSchema = z.number().finite().min(0).max(100);
1302
+ z.discriminatedUnion("kind", [
1303
+ z.object({
1304
+ kind: z.literal("commission_free"),
1305
+ reason: z.enum(STRIPE_COMMISSION_FREE_REASONS),
1306
+ ...historicalContext
1307
+ }),
1308
+ z.object({
1309
+ kind: z.literal("application_fee_amount"),
1310
+ amountCents: z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER),
1311
+ percent: percentSchema,
1312
+ ...historicalContext
1313
+ }),
1314
+ z.object({
1315
+ kind: z.literal("application_fee_percent"),
1316
+ percent: percentSchema,
1317
+ ...historicalContext
1318
+ })
1319
+ ]);
1286
1320
  toNonNegativeCents(0);
1287
1321
  //#endregion
1288
1322
  //#region ../commerce/src/purchase/stripeMinimumCharge.ts
@@ -2974,6 +3008,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
2974
3008
  isMembershipFastTrack,
2975
3009
  waitlistClaim,
2976
3010
  eligibility,
3011
+ registrationOptionsState: eligibilityResult.state,
2977
3012
  eligibilityLoading,
2978
3013
  eligibilityError,
2979
3014
  existingRegistration: existingRegistrationResult.registration,
@@ -3394,6 +3429,8 @@ function isFullWithNoWaitlist(event, attendanceMode) {
3394
3429
  }
3395
3430
  function resolveTicketSelectionContinueLabel(input) {
3396
3431
  if (input.isCheckingExistingRegistration) return "Checking registration...";
3432
+ if (input.registrationOptionsPending) return "Checking availability...";
3433
+ if (input.registrationOptionsFailed) return "Availability unavailable";
3397
3434
  if (input.hasExistingRegistration) return resolveExistingRegistrationLabel(input.wizard);
3398
3435
  if (input.isSoldOutWithoutWaitlist) return "Sold out";
3399
3436
  if (input.ticketTypeSelectionBlocked) return "Choose a ticket";
@@ -3403,14 +3440,17 @@ function SelectTicketsActions(props) {
3403
3440
  const { wizard } = props;
3404
3441
  const hasWaitlistClaim = wizard.waitlistClaim.claim !== null;
3405
3442
  const currentEvent = wizard.selectedEvent ?? wizard.preSelectedEvent;
3443
+ const registrationOptionsPending = wizard.registrationOptionsState.tag === "idle" || wizard.registrationOptionsState.tag === "loading";
3444
+ const registrationOptionsFailed = wizard.registrationOptionsState.tag === "failed";
3406
3445
  const isSoldOutWithoutWaitlist = !hasWaitlistClaim && isFullWithNoWaitlist(currentEvent, wizard.selectedAttendanceMode);
3407
- const isWaitingForEligibility = wizard.portalAuthState === "authenticated" && wizard.eligibilityLoading;
3408
3446
  const isCheckingExistingRegistration = wizard.portalAuthState === "authenticated" && wizard.existingRegistrationLoading;
3409
3447
  const hasExistingRegistration = isExistingRegistrationBlocking$1(wizard);
3410
3448
  const ticketTypeSelectionBlocked = wizard.ticketTypeSelectionRequired && !wizard.hasValidTicketSelection;
3411
- const isContinueDisabled = isWaitingForEligibility || isCheckingExistingRegistration || hasExistingRegistration || isSoldOutWithoutWaitlist || ticketTypeSelectionBlocked;
3449
+ const isContinueDisabled = registrationOptionsPending || registrationOptionsFailed || isCheckingExistingRegistration || hasExistingRegistration || isSoldOutWithoutWaitlist || ticketTypeSelectionBlocked;
3412
3450
  const continueLabel = resolveTicketSelectionContinueLabel({
3413
3451
  wizard,
3452
+ registrationOptionsPending,
3453
+ registrationOptionsFailed,
3414
3454
  isCheckingExistingRegistration,
3415
3455
  hasExistingRegistration,
3416
3456
  isSoldOutWithoutWaitlist,
@@ -3428,7 +3468,7 @@ function SelectTicketsActions(props) {
3428
3468
  onClick: () => wizard.setStep("enter-details"),
3429
3469
  disabled: isContinueDisabled,
3430
3470
  className: props.buttonClass,
3431
- children: isWaitingForEligibility ? /* @__PURE__ */ jsxs("span", {
3471
+ children: registrationOptionsPending ? /* @__PURE__ */ jsxs("span", {
3432
3472
  className: "er-button-with-spinner",
3433
3473
  children: [/* @__PURE__ */ jsx(SpinnerNode, {
3434
3474
  size: "xs",
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { D as clsx } from "./colorStyles-CrxJrPjJ.mjs";
3
- import { Ft as err, It as ok, Nt as assertNever, t as defineIslandPropsDecoder, ut as themeButtonClassName } from "./propsDecoder-CY9gGEF7.mjs";
4
- import { n as useBlockApi, t as BlockApiProvider } from "./context-DBzX85Xc.mjs";
3
+ import { Ft as err, It as ok, Nt as assertNever, t as defineIslandPropsDecoder, ut as themeButtonClassName } from "./propsDecoder-DYzafZb2.mjs";
4
+ import { n as useBlockApi, t as BlockApiProvider } from "./context-DvU_WUmd.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 { D as staticHeaderChromeRuntime, r as buildCartDisplay, t as defineIslandPropsDecoder, ut as themeButtonClassName } from "./propsDecoder-CY9gGEF7.mjs";
2
+ import { D as staticHeaderChromeRuntime, r as buildCartDisplay, t as defineIslandPropsDecoder, ut as themeButtonClassName } from "./propsDecoder-DYzafZb2.mjs";
3
3
  import { t as resolveDedicatedCheckoutPath } from "./checkoutRoute-ClwHwYVA.mjs";
4
- import { n as useCommerceCart } from "./shop-commerce-store-CAVLxLFr.mjs";
4
+ import { n as useCommerceCart } from "./shop-commerce-store-D5V7XAb5.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";