@riverbankcms/sdk 0.145.0 → 0.147.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 (254) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/{PreviewEditorSidebar-O-V6Pl5a.mjs → PreviewEditorSidebar-DtpB3_sS.mjs} +51 -33
  3. package/dist/{PreviewEditorUI-1UlX_9cw.mjs → PreviewEditorUI-DxTLgaHo.mjs} +3 -3
  4. package/dist/{PreviewQueryProvider-BxGwdOCV.mjs → PreviewQueryProvider-Dd4dxOiU.mjs} +1 -1
  5. package/dist/{SdkPreviewModeRuntime-DYbA_4iv.mjs → SdkPreviewModeRuntime-DMMNCngt.mjs} +311 -186
  6. package/dist/{SiteChromeCustomizeContext-CNTKQ9nx.mjs → SiteChromeCustomizeContext-DQXZXiqS.mjs} +3808 -2395
  7. package/dist/_dts/ai/src/contracts/proposals.d.ts +1122 -0
  8. package/dist/_dts/ai/src/contracts/siteStyleProposalSchemas.d.ts +102 -0
  9. package/dist/_dts/api/src/accountApi.d.ts +5 -5
  10. package/dist/_dts/api/src/bookingConfig.d.ts +24 -1
  11. package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +11 -26
  12. package/dist/_dts/api/src/bookingManagementEventEndpointTypes.d.ts +45 -1
  13. package/dist/_dts/api/src/bookingOperations.d.ts +2 -44
  14. package/dist/_dts/api/src/bookingPeople.d.ts +92 -0
  15. package/dist/_dts/api/src/bookingPeopleEndpointDefinitions.d.ts +38 -0
  16. package/dist/_dts/api/src/bookingRecords.d.ts +11 -49
  17. package/dist/_dts/api/src/bookingSettingsSections.d.ts +1 -1
  18. package/dist/_dts/api/src/bookings.d.ts +1 -0
  19. package/dist/_dts/api/src/clientErrorReporting.d.ts +50 -0
  20. package/dist/_dts/api/src/communications.d.ts +20 -4
  21. package/dist/_dts/api/src/contentRuntime.d.ts +3 -7
  22. package/dist/_dts/api/src/endpoints.d.ts +816 -655
  23. package/dist/_dts/api/src/event-visibility.d.ts +20 -0
  24. package/dist/_dts/api/src/eventManagementContracts.d.ts +72 -4
  25. package/dist/_dts/api/src/eventManagementEndpointDefinitions.d.ts +24 -0
  26. package/dist/_dts/api/src/eventPageWords.d.ts +19 -0
  27. package/dist/_dts/api/src/eventSeriesRegistrationEndpointDefinitions.d.ts +14 -0
  28. package/dist/_dts/api/src/index.d.ts +9 -2
  29. package/dist/_dts/api/src/indexCoreTypes.d.ts +1 -1
  30. package/dist/_dts/api/src/indexExtendedTypes.d.ts +1 -1
  31. package/dist/_dts/api/src/launchReadiness.d.ts +19 -6
  32. package/dist/_dts/api/src/launchRequirementPriority.d.ts +3 -0
  33. package/dist/_dts/api/src/mailingListIntegration.d.ts +6 -0
  34. package/dist/_dts/api/src/navigation/dashboardBookingsNav.d.ts +1 -1
  35. package/dist/_dts/api/src/newsletterCampaignCommandEndpoints.d.ts +13 -0
  36. package/dist/_dts/api/src/newsletterEndpointDefinitions.d.ts +57 -0
  37. package/dist/_dts/api/src/occurrenceScheduling.d.ts +29 -0
  38. package/dist/_dts/api/src/pageSurfaceEndpoints.d.ts +44 -0
  39. package/dist/_dts/api/src/participantMessaging.d.ts +11 -1
  40. package/dist/_dts/api/src/publicAppointmentBookingContracts.d.ts +48 -0
  41. package/dist/_dts/api/src/publicExperience/eventEndpoints.d.ts +7 -0
  42. package/dist/_dts/api/src/sdk-event-upsert.d.ts +55 -1
  43. package/dist/_dts/api/src/sdkContracts.d.ts +3 -42
  44. package/dist/_dts/api/src/sdkCourseBooking.d.ts +30 -0
  45. package/dist/_dts/api/src/sdkEventEndpointDefinitions.d.ts +76 -0
  46. package/dist/_dts/api/src/sdkEventLifecycle.d.ts +37 -0
  47. package/dist/_dts/api/src/sdkManagedEventContracts.d.ts +18 -0
  48. package/dist/_dts/api/src/sdkPageDesign.d.ts +388 -0
  49. package/dist/_dts/api/src/sdkPageDesignEndpointDefinitions.d.ts +22 -0
  50. package/dist/_dts/api/src/sdkPullEventContracts.d.ts +46 -0
  51. package/dist/_dts/api/src/siteAddressEndpoints.d.ts +29 -0
  52. package/dist/_dts/api/src/siteLifecycleEndpoints.d.ts +61 -0
  53. package/dist/_dts/api/src/siteManagementEndpointDefinitions.d.ts +49 -0
  54. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +6 -49
  55. package/dist/_dts/api/src/siteOnboarding.d.ts +72 -18
  56. package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +1 -1
  57. package/dist/_dts/api/src/types.d.ts +7 -1
  58. package/dist/_dts/api/src/wholeSeriesRuns.d.ts +14 -0
  59. package/dist/_dts/blocks/src/PageRenderer.d.ts +3 -4
  60. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +8 -0
  61. package/dist/_dts/blocks/src/index.d.ts +2 -0
  62. package/dist/_dts/blocks/src/pageRenderAdmission.d.ts +29 -1
  63. package/dist/_dts/blocks/src/pageRendererContracts.d.ts +5 -1
  64. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +27 -5
  65. package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +14 -1
  66. package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +4 -1
  67. package/dist/_dts/blocks/src/system/icons/social.d.ts +1 -1
  68. package/dist/_dts/blocks/src/system/registry.d.ts +1 -1
  69. package/dist/_dts/blocks/src/system/runtime/api/types/appointments.d.ts +4 -0
  70. package/dist/_dts/blocks/src/system/runtime/api/types/events.d.ts +12 -0
  71. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +12 -0
  72. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +6 -0
  73. package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.d.ts +8 -0
  74. package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessEventRegistrationFlow.d.ts +2 -0
  75. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.completion.d.ts +9 -0
  76. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +9 -0
  77. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.interactive.d.ts +19 -0
  78. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.mailing-list-choice.d.ts +5 -0
  79. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.mailing-list-note.d.ts +3 -0
  80. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.mailing-list-state.d.ts +9 -0
  81. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.reserved-fields.d.ts +1 -1
  82. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.server.d.ts +1 -1
  83. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +2 -0
  84. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.submit-handler.d.ts +8 -0
  85. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.submit-success.d.ts +9 -0
  86. package/dist/_dts/blocks/src/system/runtime/nodes/booking-runtime-sources.d.ts +3 -0
  87. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/AttendeeDetailsStep.d.ts +3 -0
  88. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/SuccessStep.d.ts +3 -0
  89. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +3 -0
  90. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventSourceRecovery.d.ts +1 -0
  91. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/sessionStorage.d.ts +2 -0
  92. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +6 -0
  93. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +3 -0
  94. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +8 -0
  95. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +9 -0
  96. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventCollectionContract.d.ts +20 -4
  97. package/dist/_dts/blocks/src/system/runtime/nodes/form.fields.d.ts +5 -0
  98. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.block-submission.d.ts +34 -0
  99. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.client.d.ts +1 -1
  100. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.interactive.d.ts +6 -1
  101. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.parts.d.ts +46 -0
  102. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +2 -1
  103. package/dist/_dts/blocks/src/system/runtime/resolver.d.ts +4 -1
  104. package/dist/_dts/blocks/src/system/runtime/shared/components/BookingMailingListNote.d.ts +6 -0
  105. package/dist/_dts/blocks/src/system/runtime/shared/components/CheckboxChoice.d.ts +18 -0
  106. package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +1 -0
  107. package/dist/_dts/blocks/src/system/runtime/shared/mailingListSignupCopy.d.ts +6 -0
  108. package/dist/_dts/blocks/src/system/runtime/shared/types.d.ts +1 -0
  109. package/dist/_dts/blocks/src/system/transforms/registry/_utils/surfaceForegroundStyles.d.ts +3 -2
  110. package/dist/_dts/blocks/src/system/transforms/registry/core.d.ts +2 -0
  111. package/dist/_dts/blocks/src/system/transforms/registry/layout.d.ts +1 -3
  112. package/dist/_dts/content-editor/src/index.d.ts +1 -0
  113. package/dist/_dts/content-editor/src/primitives/previewEditableOutline.d.ts +2 -0
  114. package/dist/_dts/content-editor/src/ui/editorBlockEquality.d.ts +3 -0
  115. package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +3 -5
  116. package/dist/_dts/core/src/block-content-identity.d.ts +5 -0
  117. package/dist/_dts/core/src/editor-state.d.ts +2 -7
  118. package/dist/_dts/core/src/index.d.ts +2 -1
  119. package/dist/_dts/core/src/mailing-list-runtime.d.ts +15 -0
  120. package/dist/_dts/core/src/mailing-list-setup.d.ts +2 -0
  121. package/dist/_dts/core/src/mailing-list-submission.d.ts +9 -1
  122. package/dist/_dts/core/src/navigation-portal-labels.d.ts +9 -0
  123. package/dist/_dts/core/src/participants.d.ts +0 -38
  124. package/dist/_dts/core/src/public-event-booking-availability.d.ts +20 -1
  125. package/dist/_dts/core/src/public-profile.d.ts +3 -1
  126. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +151 -24
  127. package/dist/_dts/editor-blocks/src/BlockEditor.d.ts +3 -0
  128. package/dist/_dts/editor-blocks/src/block-editor/EmptyState.d.ts +13 -1
  129. package/dist/_dts/editor-blocks/src/block-editor/actionPresentation.d.ts +1 -0
  130. package/dist/_dts/editor-blocks/src/block-editor/types.d.ts +2 -8
  131. package/dist/_dts/editor-blocks/src/index.d.ts +1 -0
  132. package/dist/_dts/preview-next/src/client/blocks/EditablePageRenderer.d.ts +7 -1
  133. package/dist/_dts/preview-next/src/client/blocks/composer/types.d.ts +5 -5
  134. package/dist/_dts/preview-next/src/client/preview/PreviewEntryControllerProvider.d.ts +1 -2
  135. package/dist/_dts/sdk/src/next/renderSdkContent.d.ts +0 -1
  136. package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +3 -2
  137. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +3 -2
  138. package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +6 -1
  139. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +5 -2
  140. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +6 -1
  141. package/dist/_dts/sdk/src/rendering/helpers/templateContent.d.ts +2 -0
  142. package/dist/_dts/sdk/src/rendering/hooks/useContent.d.ts +5 -1
  143. package/dist/_dts/sdk/src/rendering/hooks/usePage.d.ts +5 -1
  144. package/dist/_dts/sdk/src/version.d.ts +1 -1
  145. package/dist/_dts/surfaces/src/index.d.ts +9 -0
  146. package/dist/_dts/theme-core/src/buttons/effects/types.d.ts +1 -1
  147. package/dist/_dts/theme-core/src/footer/effectiveNavLinkStyle.d.ts +13 -0
  148. package/dist/_dts/theme-core/src/footer/index.d.ts +1 -0
  149. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  150. package/dist/_dts/theme-core/src/header/effectiveNavLinkStyle.d.ts +17 -0
  151. package/dist/_dts/theme-core/src/header/generateHeaderLogoStyles.d.ts +15 -0
  152. package/dist/_dts/theme-core/src/header/generateHeaderNavLinkStyles.d.ts +4 -0
  153. package/dist/_dts/theme-core/src/header/index.d.ts +3 -0
  154. package/dist/_dts/theme-core/src/header/legacyNavLinkStyle.d.ts +1 -1
  155. package/dist/_dts/theme-core/src/header/openingForegroundProjection.d.ts +7 -0
  156. package/dist/_dts/theme-core/src/header/rootPaint.d.ts +4 -0
  157. package/dist/_dts/theme-core/src/inputs/checkable.d.ts +42 -0
  158. package/dist/_dts/theme-core/src/inputs/inputGroup.d.ts +19 -0
  159. package/dist/_dts/theme-core/src/navigation/effectPolicy.d.ts +38 -0
  160. package/dist/_dts/theme-core/src/navigation/generateNavLinkCSS.d.ts +4 -0
  161. package/dist/_dts/theme-core/src/navigation/types.d.ts +4 -0
  162. package/dist/_dts/theme-core/src/site-styles/accessibleSurfaces.d.ts +1 -1
  163. package/dist/_dts/theme-core/src/surfaces/foregroundContract.d.ts +7 -0
  164. package/dist/_dts/theme-core/src/surfaces/foregroundInteraction.d.ts +29 -22
  165. package/dist/_dts/theme-core/src/surfaces/foregroundRoles.d.ts +10 -2
  166. package/dist/_dts/theme-core/src/surfaces/resolveSurfaceForeground.d.ts +9 -0
  167. package/dist/_dts/theme-core/src/utils/cssDeclarations.d.ts +2 -0
  168. package/dist/_dts/ui/src/badge.d.ts +2 -1
  169. package/dist/_dts/ui/src/button.d.ts +1 -1
  170. package/dist/_dts/ui/src/combobox-keys.d.ts +23 -0
  171. package/dist/_dts/ui/src/combobox-rows.d.ts +34 -0
  172. package/dist/_dts/ui/src/combobox.d.ts +26 -1
  173. package/dist/_dts/ui/src/date-picker.d.ts +5 -8
  174. package/dist/_dts/ui/src/editor-item-card.d.ts +1 -0
  175. package/dist/_dts/ui/src/field-trigger.d.ts +39 -0
  176. package/dist/_dts/ui/src/fieldControl.d.ts +27 -0
  177. package/dist/_dts/ui/src/index.d.ts +4 -1
  178. package/dist/_dts/ui/src/native-select.d.ts +8 -0
  179. package/dist/_dts/ui/src/navigation-tabs.d.ts +2 -1
  180. package/dist/_dts/ui/src/popover.d.ts +7 -1
  181. package/dist/_dts/ui/src/segmented-control.d.ts +4 -0
  182. package/dist/_dts/ui/src/surface.d.ts +1 -1
  183. package/dist/client/{BookingConsentAgreement-DlVOmpW4.mjs → BookingMailingListNote-1n4Ch_u_.mjs} +15 -4
  184. package/dist/client/CheckboxChoice-B33MqoUo.mjs +24 -0
  185. package/dist/client/{DiscountCodeDisclosure-T9q623PQ.mjs → DiscountCodeDisclosure-CKJtz0mY.mjs} +1 -1
  186. package/dist/client/{EventCombined.client-DnsUeONl.mjs → EventCombined.client-C0pgma9y.mjs} +7 -7
  187. package/dist/client/{EventListing.client-CNBFqJS4.mjs → EventListing.client-4fhLOvHP.mjs} +2 -2
  188. package/dist/client/{LeafletStaticMap-C7higg52.mjs → LeafletStaticMap-DScC4F3w.mjs} +1 -1
  189. package/dist/client/{scrollToBlock-CWs8EIdo.mjs → TerminalPanel-B5ZUsYhe.mjs} +77 -77
  190. package/dist/client/{ThemedButton-LAJTNrS8.mjs → ThemedButton-DoVIV1Ao.mjs} +2 -2
  191. package/dist/client/{accordion-BcNF9TjX.mjs → accordion-CoT5g7zo.mjs} +1 -1
  192. package/dist/client/{bookingForm-BUaQ3S03.mjs → bookingForm-BWxB46xD.mjs} +251 -150
  193. package/dist/client/bookings.mjs +415 -234
  194. package/dist/client/{carousel-CTdF6e0V.mjs → carousel-DtNYWFd3.mjs} +2 -2
  195. package/dist/client/{carousel.client-jahpU9Vz.mjs → carousel.client-A2lG-9od.mjs} +1 -1
  196. package/dist/client/{cart-pGtyf_XU.mjs → cart-z4qZih1Y.mjs} +3 -3
  197. package/dist/client/{checkout-Da9WSn7Y.mjs → checkout-DpL7euFH.mjs} +3 -3
  198. package/dist/client/{checkoutUrls-CW3-78uu.mjs → checkoutUrls-BEfR7kVu.mjs} +1 -1
  199. package/dist/client/client.mjs +3721 -2220
  200. package/dist/client/{colorStyles-CuJBiS-1.mjs → colorStyles-j5U9v5JA.mjs} +5 -1
  201. package/dist/client/{context-BFeY_Wbm.mjs → context-C8TinPJc.mjs} +1 -1
  202. package/dist/client/{dates-BhwVSxDg.mjs → dates-vwwxTeB0.mjs} +2 -3
  203. package/dist/client/{eventCalendar-BAtdnR4s.mjs → eventCalendar-DIbHfJXO.mjs} +10 -10
  204. package/dist/client/{eventCombined-RksA3tRC.mjs → eventCombined-DoGMJ6cg.mjs} +4 -4
  205. package/dist/client/{eventDetails-BB9hB4wR.mjs → eventDetails-BjN9v6a1.mjs} +4 -4
  206. package/dist/client/{eventListing-BpJBkviM.mjs → eventListing-DajjWgOv.mjs} +4 -4
  207. package/dist/client/{eventRegistration-B18jFq_o.mjs → eventRegistration-DMq9gMA-.mjs} +121 -54
  208. package/dist/client/{form-Dodt8Y8t.mjs → form-Qf6qTbos.mjs} +136 -105
  209. package/dist/client/{headerSection-B0qj9ttg.mjs → headerSection-D7qJrqFX.mjs} +3 -3
  210. package/dist/client/hooks.mjs +1148 -179
  211. package/dist/client/{locationMap-gn-iMk7a.mjs → locationMap-CCF9-t_0.mjs} +4 -4
  212. package/dist/client/{FieldValidationMessage-AYanWFb-.mjs → mailingListSignupCopy-DZSHZrm6.mjs} +14 -1
  213. package/dist/client/{media-BtJ37tzS.mjs → media-CwBGetqC.mjs} +1 -1
  214. package/dist/client/{newsletterForm-oByLdFkr.mjs → newsletterForm-DzCLSP4S.mjs} +206 -104
  215. package/dist/client/{pricing-BOU0_Hai.mjs → pricing-Cgxv2KLC.mjs} +1 -1
  216. package/dist/client/{productDetail-D9v1zH2j.mjs → productDetail-ru9w5GHx.mjs} +3 -3
  217. package/dist/client/{productList-D-mItx1n.mjs → productList-zaapKSl-.mjs} +3 -3
  218. package/dist/client/{propsDecoder-C3TP_z4x.mjs → propsDecoder-CwvvNOHx.mjs} +91 -28
  219. package/dist/client/rendering/client.mjs +1441 -826
  220. package/dist/client/rendering/islands.mjs +19 -19
  221. package/dist/client/rendering.mjs +3652 -2005
  222. package/dist/client/{routeIslandApiConfig-DzN1W0sq.mjs → routeIslandApiConfig-BwVFo0Y4.mjs} +1 -1
  223. package/dist/client/{shop-commerce-gklw_hLF.mjs → shop-commerce-De7gEnkA.mjs} +8 -8
  224. package/dist/client/{shop-commerce-store-Sf1eyTaZ.mjs → shop-commerce-store-B3MCxIBW.mjs} +1 -1
  225. package/dist/client/{shop-Dufw7N7o.mjs → shop-mktkXvbV.mjs} +7 -7
  226. package/dist/client/{shopShared-B5nyA41S.mjs → shopShared-TqExh235.mjs} +5 -5
  227. package/dist/client/{useEventFilters-CLL829vy.mjs → useEventFilters-n_OjkIjX.mjs} +8 -8
  228. package/dist/preview-next/before-render.mjs +490 -153
  229. package/dist/preview-next/client/runtime.mjs +4 -4
  230. package/dist/preview-next/editor-base.css +64 -2
  231. package/dist/preview-next/editor-chrome.css +7 -4
  232. package/dist/preview-next/keepAlive.mjs +450 -153
  233. package/dist/preview-next/middleware.mjs +451 -153
  234. package/dist/{previewAuthStore-BxAFlu-j.mjs → previewAuthStore-C_EHQ5XA.mjs} +475 -153
  235. package/dist/{sdk-runtime-D0uZFev7.mjs → sdk-runtime-BIkJg5y1.mjs} +2 -2
  236. package/dist/{separator-EvdCAn4V.mjs → separator-C9qDP95Z.mjs} +1 -1
  237. package/dist/server/components.mjs +4957 -3509
  238. package/dist/server/config-validation.mjs +1115 -189
  239. package/dist/server/config.mjs +1115 -189
  240. package/dist/server/data.mjs +1113 -188
  241. package/dist/server/index.mjs +492 -154
  242. package/dist/server/navigation.mjs +13 -2
  243. package/dist/server/next.mjs +4798 -3462
  244. package/dist/server/page-converter.mjs +143 -89
  245. package/dist/server/prebuild.mjs +1 -1
  246. package/dist/server/rendering/server.mjs +3862 -2414
  247. package/dist/server/rendering.mjs +5648 -4154
  248. package/dist/server/routing.mjs +1223 -329
  249. package/dist/server/server.mjs +1172 -314
  250. package/dist/server/theme-bridge.mjs +533 -128
  251. package/dist/server/theme.mjs +5 -1
  252. package/dist/styles/index.css +218 -69
  253. package/package.json +1 -1
  254. package/dist/_dts/core/src/participant-identity.d.ts +0 -135
@@ -1626,7 +1626,8 @@ var init_business_address = __esmMin((() => {
1626
1626
  var init_try_async = __esmMin((() => {
1627
1627
  init_result$1();
1628
1628
  }));
1629
- var init_narrow_result = __esmMin((() => {})), init_editor_state = __esmMin((() => {}));
1629
+ var init_narrow_result = __esmMin((() => {}));
1630
+ var init_editor_state = __esmMin((() => {})), init_block_content_identity = __esmMin((() => {}));
1630
1631
  var init_sensitive_collection = __esmMin((() => {}));
1631
1632
  //#endregion
1632
1633
  //#region ../core/src/assertNever.ts
@@ -1637,9 +1638,6 @@ var init_participants = __esmMin((() => {
1637
1638
  init_result$1();
1638
1639
  init_string();
1639
1640
  }));
1640
- var init_participant_identity = __esmMin((() => {
1641
- init_assertNever$1();
1642
- }));
1643
1641
  var init_public_url_validation = __esmMin((() => {}));
1644
1642
  var init_public_profile = __esmMin((() => {
1645
1643
  init_public_url_validation();
@@ -2026,17 +2024,39 @@ function parseMailingListRuntimeContext(value) {
2026
2024
  if (!isRecord$22(value)) return invalidRuntimeContext();
2027
2025
  if (value.tag === "not_configured") return ok$2({ tag: "not_configured" });
2028
2026
  if (value.tag !== "configured") return invalidRuntimeContext();
2027
+ return parseConfiguredRuntimeContext(value);
2028
+ }
2029
+ function parseConfiguredRuntimeContext(value) {
2029
2030
  const revision = parseMailingListSetupRevision(value.revision);
2030
2031
  const form = parseMailingListGlobalForm(value.form);
2031
2032
  const provider = parseRuntimeProvider(value.provider);
2032
- if (revision === null || !form.ok || provider === null) return invalidRuntimeContext();
2033
+ const bookingSignup = parseBookingSignupOffer(value.bookingSignup);
2034
+ if (revision === null || !form.ok || provider === null || bookingSignup === null) return invalidRuntimeContext();
2033
2035
  return ok$2({
2034
2036
  tag: "configured",
2035
2037
  revision,
2038
+ bookingSignup,
2036
2039
  form: form.value,
2037
2040
  provider
2038
2041
  });
2039
2042
  }
2043
+ function resolveBookingSignupOffer(context, siteName) {
2044
+ const name = siteName?.trim() ?? "";
2045
+ return context?.tag === "configured" && context.bookingSignup.tag === "offered" ? { siteName: name.length > 0 ? name : "this site" } : null;
2046
+ }
2047
+ function parseBookingSignupOffer(value) {
2048
+ if (value === void 0) return {
2049
+ tag: "unavailable",
2050
+ reason: "disabled"
2051
+ };
2052
+ if (!isRecord$22(value)) return null;
2053
+ if (value.tag === "offered") return { tag: "offered" };
2054
+ if (value.tag === "unavailable" && (value.reason === "disabled" || value.reason === "fields" || value.reason === "destination")) return {
2055
+ tag: "unavailable",
2056
+ reason: value.reason
2057
+ };
2058
+ return null;
2059
+ }
2040
2060
  function parseRuntimeProvider(value) {
2041
2061
  if (!isRecord$22(value)) return null;
2042
2062
  switch (value.provider) {
@@ -2134,6 +2154,7 @@ var init_mailing_list_runtime = __esmMin((() => {
2134
2154
  init_mailing_list_identifiers();
2135
2155
  init_mailing_list_setup_parser();
2136
2156
  init_result$1();
2157
+ init_mailing_list_setup();
2137
2158
  }));
2138
2159
  //#endregion
2139
2160
  //#region ../core/src/mailing-list-submission.ts
@@ -2149,15 +2170,6 @@ function parseMailingListContentVersionId(value) {
2149
2170
  const parsed = parseContentVersionId(value);
2150
2171
  return parsed.ok ? parsed.value : null;
2151
2172
  }
2152
- function buildMailingListSignupBlockSourceRef(blockId, contentVersionId) {
2153
- const parsedBlockId = parseMailingListBlockId(blockId);
2154
- const parsedContentVersionId = parseMailingListContentVersionId(contentVersionId);
2155
- return parsedBlockId !== null && parsedContentVersionId !== null ? {
2156
- tag: "block_ref",
2157
- blockId: parsedBlockId,
2158
- contentVersionId: parsedContentVersionId
2159
- } : null;
2160
- }
2161
2173
  var init_mailing_list_submission = __esmMin((() => {
2162
2174
  init_branded();
2163
2175
  }));
@@ -2536,6 +2548,7 @@ var init_booking_verticals = __esmMin((() => {
2536
2548
  var init_navigation_locations = __esmMin((() => {
2537
2549
  init_result$1();
2538
2550
  }));
2551
+ var init_navigation_portal_labels = __esmMin((() => {}));
2539
2552
  var init_event_preset_vocabulary = __esmMin((() => {}));
2540
2553
  var init_event_catalogue = __esmMin((() => {
2541
2554
  init_booking_verticals();
@@ -2577,10 +2590,10 @@ var init_src$2 = __esmMin((() => {
2577
2590
  init_narrow_result();
2578
2591
  init_non_empty_array();
2579
2592
  init_editor_state();
2593
+ init_block_content_identity();
2580
2594
  init_sensitive_collection();
2581
2595
  init_assertNever$1();
2582
2596
  init_participants();
2583
- init_participant_identity();
2584
2597
  init_public_url_validation();
2585
2598
  init_public_profile();
2586
2599
  init_public_experience();
@@ -2621,6 +2634,7 @@ var init_src$2 = __esmMin((() => {
2621
2634
  init_booking_verticals();
2622
2635
  init_event_series_behaviour();
2623
2636
  init_navigation_locations();
2637
+ init_navigation_portal_labels();
2624
2638
  init_event_preset_vocabulary();
2625
2639
  init_event_catalogue();
2626
2640
  }));
@@ -4485,7 +4499,6 @@ var init_expandPalette = __esmMin((() => {
4485
4499
  init_textColor();
4486
4500
  init_onColor();
4487
4501
  }));
4488
- var init_foregroundRoles = __esmMin((() => {}));
4489
4502
  //#endregion
4490
4503
  //#region ../theme-core/src/surfaces/foregroundContract.ts
4491
4504
  function requireSurfaceColorValue(role, value) {
@@ -4497,6 +4510,7 @@ function surfaceForegroundValue(role, outsideProviderFallback = DEFAULT_ROLE_FAL
4497
4510
  const roleVariable = SURFACE_FOREGROUND_CSS_VARS[role];
4498
4511
  const fallback = requireSurfaceColorValue("fallback", outsideProviderFallback);
4499
4512
  if (role === "text") return `var(${roleVariable}, ${fallback})`;
4513
+ if (role === "linkHover") return `var(${roleVariable}, ${surfaceForegroundValue("link", fallback)})`;
4500
4514
  return `var(${roleVariable}, var(${SURFACE_FOREGROUND_CSS_VARS.text}, ${fallback}))`;
4501
4515
  }
4502
4516
  function surfaceForegroundValueWithOpacity(role, opacityPercent) {
@@ -4504,11 +4518,11 @@ function surfaceForegroundValueWithOpacity(role, opacityPercent) {
4504
4518
  return `color-mix(in srgb, ${surfaceForegroundValue(role)} ${opacityPercent}%, transparent)`;
4505
4519
  }
4506
4520
  var SURFACE_FOREGROUND_CSS_VARS, DEFAULT_SURFACE_TEXT_COLOR, DEFAULT_SURFACE_LINK_COLOR, DEFAULT_SURFACE_SUPPORTING_COLOR, DEFAULT_ROLE_FALLBACKS, init_foregroundContract = __esmMin((() => {
4507
- init_foregroundRoles();
4508
4521
  SURFACE_FOREGROUND_CSS_VARS = {
4509
4522
  text: "--rb-surface-text-color",
4510
4523
  heading: "--rb-surface-heading-color",
4511
4524
  link: "--rb-surface-link-color",
4525
+ linkHover: "--rb-surface-link-hover-color",
4512
4526
  supporting: "--rb-surface-supporting-color"
4513
4527
  };
4514
4528
  DEFAULT_SURFACE_TEXT_COLOR = "rgb(var(--tb-text, 17 24 39))";
@@ -4518,6 +4532,7 @@ var SURFACE_FOREGROUND_CSS_VARS, DEFAULT_SURFACE_TEXT_COLOR, DEFAULT_SURFACE_LIN
4518
4532
  text: DEFAULT_SURFACE_TEXT_COLOR,
4519
4533
  heading: DEFAULT_SURFACE_TEXT_COLOR,
4520
4534
  link: DEFAULT_SURFACE_LINK_COLOR,
4535
+ linkHover: DEFAULT_SURFACE_LINK_COLOR,
4521
4536
  supporting: DEFAULT_SURFACE_SUPPORTING_COLOR
4522
4537
  };
4523
4538
  }));
@@ -4612,12 +4627,6 @@ var init_tokens = __esmMin((() => {
4612
4627
  init_colorTokenParts();
4613
4628
  init_resolver$1();
4614
4629
  }));
4615
- var init_foregroundInteraction = __esmMin((() => {
4616
- init_contrast$1();
4617
- init_colorConversion();
4618
- init_colorTokenParts();
4619
- init_tokens();
4620
- }));
4621
4630
  //#endregion
4622
4631
  //#region ../theme-core/src/palette/utils/opaqueSurfaceColor.ts
4623
4632
  /** Resolve an opaque colour, compositing alpha against an explicit underlay. */
@@ -4630,10 +4639,10 @@ function resolveOpaqueSurfaceHex(reference, palette, underlayReference) {
4630
4639
  const parts = parseColorTokenParts(reference);
4631
4640
  if (parts.kind === "token" && parts.opacityPercent !== null) {
4632
4641
  const foregroundHex = normalizePaletteHex(palette[parts.token] ?? "");
4633
- return foregroundHex ? compositeHex(foregroundHex, underlayHex, parts.opacityPercent / 100) : null;
4642
+ return foregroundHex ? compositeHex$1(foregroundHex, underlayHex, parts.opacityPercent / 100) : null;
4634
4643
  }
4635
4644
  const rgba = parseRgba(parts.kind === "raw" ? parts.value : reference);
4636
- return rgba ? compositeHex(rgbToHex(rgba.r, rgba.g, rgba.b), underlayHex, rgba.alpha) : null;
4645
+ return rgba ? compositeHex$1(rgbToHex(rgba.r, rgba.g, rgba.b), underlayHex, rgba.alpha) : null;
4637
4646
  }
4638
4647
  /** Resolve a colour reference only when it is already fully opaque. */
4639
4648
  function resolveConcreteColorHex(reference, palette) {
@@ -4649,7 +4658,7 @@ function resolveConcreteColorHex(reference, palette) {
4649
4658
  if (literal.toLowerCase() === "white") return "#ffffff";
4650
4659
  return normalizePaletteHex(literal);
4651
4660
  }
4652
- function compositeHex(foregroundHex, underlayHex, alpha) {
4661
+ function compositeHex$1(foregroundHex, underlayHex, alpha) {
4653
4662
  const foreground = hexToRgb(foregroundHex);
4654
4663
  const underlay = hexToRgb(underlayHex);
4655
4664
  const channel = (foregroundValue, underlayValue) => Math.round(foregroundValue * alpha + underlayValue * (1 - alpha));
@@ -4685,19 +4694,112 @@ var init_opaqueSurfaceColor = __esmMin((() => {
4685
4694
  init_colorTokenParts();
4686
4695
  init_colorConversion();
4687
4696
  }));
4697
+ //#endregion
4698
+ //#region ../theme-core/src/surfaces/foregroundInteraction.ts
4699
+ /**
4700
+ * Derive the hover foreground that belongs with a resolved resting foreground.
4701
+ *
4702
+ * A resting foreground is chosen to be legible against a known surface. A hover
4703
+ * state derived from it stays within a bounded distance of that colour, so it
4704
+ * inherits most of the resting colour's contrast margin instead of asserting
4705
+ * an unrelated brand colour that no one checked against the surface.
4706
+ *
4707
+ * That bounded-distance property is what lets this be used on a transparent
4708
+ * overlay header, where the backdrop is only partly knowable: the scrolled
4709
+ * state composites a 60% glass tint over arbitrary page content, so no
4710
+ * compile-time contrast proof is available there. Staying near a colour that
4711
+ * is already trusted in both states is a weaker claim than a contrast proof,
4712
+ * and it is one this function can actually keep.
4713
+ *
4714
+ * Returns `null` when the resting token is not a plain palette token — an
4715
+ * already-faded or raw value has no well-defined softening, and the caller
4716
+ * should leave hover alone rather than guess.
4717
+ */
4718
+ function deriveForegroundHoverToken(restingToken) {
4719
+ const parts = parseColorTokenParts(restingToken);
4720
+ if (parts.kind !== "token") return null;
4721
+ if (parts.opacityPercent !== null) return null;
4722
+ return parseThemeColorToken(`${parts.token}/85`);
4723
+ }
4724
+ /**
4725
+ * Prefer an authored hover that survives every measured backdrop, then a
4726
+ * checked softening of the resting colour. A null backdrop set represents a
4727
+ * trusted treatment: only an explicit authored hover may change the colour.
4728
+ * When neither option works, retain the resting colour and underline it.
4729
+ */
4730
+ function planForegroundHover(input) {
4731
+ const { restingToken, candidate, palette, backdrops } = input;
4732
+ if (candidate && candidate !== restingToken) {
4733
+ if (backdrops === null || survivesEveryBackdrop(candidate, palette, backdrops)) return {
4734
+ kind: "candidate",
4735
+ token: candidate,
4736
+ decoration: "initial"
4737
+ };
4738
+ }
4739
+ const softened = deriveForegroundHoverToken(restingToken);
4740
+ if (softened && backdrops && survivesEveryBackdrop(softened, palette, backdrops)) return {
4741
+ kind: "softened",
4742
+ token: softened,
4743
+ decoration: "initial"
4744
+ };
4745
+ return {
4746
+ kind: "resting",
4747
+ token: restingToken,
4748
+ decoration: "underline"
4749
+ };
4750
+ }
4751
+ function survivesEveryBackdrop(token, palette, backdrops) {
4752
+ return backdrops.length > 0 && backdrops.every((backdrop) => {
4753
+ const foreground = resolveOpaqueSurfaceHex(token, palette, backdrop);
4754
+ return foreground !== null && contrastRatio(foreground, backdrop) >= 4.5;
4755
+ });
4756
+ }
4757
+ var init_foregroundInteraction = __esmMin((() => {
4758
+ init_contrast$1();
4759
+ init_colorConversion();
4760
+ init_colorTokenParts();
4761
+ init_tokens();
4762
+ init_opaqueSurfaceColor();
4763
+ }));
4764
+ var init_foregroundRoles = __esmMin((() => {}));
4765
+ function candidateOrBackground(candidate, backgroundValue) {
4766
+ return candidate ?? backgroundValue ?? null;
4767
+ }
4688
4768
  function resolveTrustedTreatmentForeground(candidates, palette) {
4689
4769
  const text = canonicalToken(candidates.text, palette);
4690
4770
  if (!text) return { kind: "unknown" };
4771
+ return knownForeground({
4772
+ text,
4773
+ heading: canonicalToken(candidates.heading, palette) ?? text,
4774
+ link: canonicalToken(candidates.link, palette) ?? text,
4775
+ supporting: canonicalToken(candidates.supporting, palette) ?? text
4776
+ }, { kind: "trusted-treatment" }, candidates.linkHover, palette);
4777
+ }
4778
+ function knownForeground(roles, provenance, hoverCandidate, palette) {
4779
+ const hover = planForegroundHover({
4780
+ restingToken: roles.link,
4781
+ candidate: canonicalHoverToken(hoverCandidate, palette),
4782
+ palette,
4783
+ backdrops: provenance.kind === "measured" ? [provenance.backdropHex] : null
4784
+ });
4691
4785
  return {
4692
4786
  kind: "known",
4787
+ provenance,
4693
4788
  roles: {
4694
- text,
4695
- heading: canonicalToken(candidates.heading, palette) ?? text,
4696
- link: canonicalToken(candidates.link, palette) ?? text,
4697
- supporting: canonicalToken(candidates.supporting, palette) ?? text
4698
- }
4789
+ ...roles,
4790
+ linkHover: hover.token
4791
+ },
4792
+ hoverDecoration: hover.decoration
4699
4793
  };
4700
4794
  }
4795
+ function canonicalHoverToken(reference, palette) {
4796
+ const token = parseThemeColorToken(reference);
4797
+ if (token) {
4798
+ const parts = parseColorTokenParts(token);
4799
+ if (parts.kind === "token" && resolveConcreteColorHex(parts.token, palette)) return token;
4800
+ }
4801
+ return canonicalToken(reference, palette);
4802
+ }
4701
4803
  function safeTokenOr(candidate, fallback, backgroundHex, palette) {
4702
4804
  return firstSafeToken([candidate], backgroundHex, palette) ?? fallback;
4703
4805
  }
@@ -4745,6 +4847,7 @@ var init_resolveSurfaceForeground = __esmMin((() => {
4745
4847
  init_opaqueSurfaceColor();
4746
4848
  init_colorTokenParts();
4747
4849
  init_themeColorTokens();
4850
+ init_foregroundInteraction();
4748
4851
  FALLBACK_TEXT_TOKENS = [
4749
4852
  "text",
4750
4853
  "primaryForeground",
@@ -6863,7 +6966,7 @@ function presetCategory(recipe) {
6863
6966
  case void 0: return "modern";
6864
6967
  }
6865
6968
  }
6866
- var init_presets$2 = __esmMin((() => {
6969
+ var init_presets$3 = __esmMin((() => {
6867
6970
  init_styles();
6868
6971
  buttonStyleRecipes.map((recipe) => {
6869
6972
  const resolved = resolveButtonStyleSelection(defaultButtonStyleSelectionFor(recipe.id));
@@ -6894,7 +6997,7 @@ var init_buttons = __esmMin((() => {
6894
6997
  init_affordanceIcons();
6895
6998
  init_generateDefaultButtonSystem();
6896
6999
  init_constants$2();
6897
- init_presets$2();
7000
+ init_presets$3();
6898
7001
  init_styles();
6899
7002
  init_styles();
6900
7003
  }));
@@ -7159,7 +7262,7 @@ var init_generateDefaultCardSystem = __esmMin((() => {
7159
7262
  })), init_roles = __esmMin((() => {
7160
7263
  init_types$13();
7161
7264
  init_generateDefaultCardSystem();
7162
- })), init_generateCardCss = __esmMin((() => {
7265
+ })), init_cssDeclarations = __esmMin((() => {})), init_generateCardCss = __esmMin((() => {
7163
7266
  init_resolver$1();
7164
7267
  init_constants$1();
7165
7268
  init_generateDefaultCardSystem();
@@ -7167,10 +7270,13 @@ var init_generateDefaultCardSystem = __esmMin((() => {
7167
7270
  init_roles();
7168
7271
  init_types$13();
7169
7272
  init_surfaces();
7273
+ init_expandPalette();
7274
+ init_cssDeclarations();
7170
7275
  }));
7171
7276
  var init_core$2 = __esmMin((() => {
7172
7277
  init_surfaces();
7173
7278
  init_decorations();
7279
+ init_cssDeclarations();
7174
7280
  }));
7175
7281
  //#endregion
7176
7282
  //#region ../theme-core/src/cards/index.ts
@@ -7441,8 +7547,7 @@ var init_types$10 = __esmMin((() => {
7441
7547
  *
7442
7548
  * These Zod schemas are shared by buttons and nav links for DRY architecture.
7443
7549
  */
7444
- var interactiveTypographySchema, effectApplicationSchema, effectCompositionSchema;
7445
- var init_baseSchema = __esmMin((() => {
7550
+ var interactiveTypographySchema, effectApplicationSchema, effectCompositionSchema, init_baseSchema = __esmMin((() => {
7446
7551
  interactiveTypographySchema = z.object({
7447
7552
  /** Font family source */
7448
7553
  typography: z.enum(["body", "heading"]).default("body"),
@@ -7478,10 +7583,12 @@ var init_baseSchema = __esmMin((() => {
7478
7583
  /** Effects applied on focus */
7479
7584
  focus: z.array(effectApplicationSchema).optional()
7480
7585
  });
7481
- })), navLinkPaddingSchema, navLinkPaddingXSchema, navLinkBorderRadiusSchema, navLinkTextSizeSchema, navLinkLetterSpacingSchema, navLinkContrastTreatmentSchema, navLinkStyleSchema;
7586
+ }));
7587
+ var init_effectPolicy = __esmMin((() => {})), navLinkPaddingSchema, navLinkPaddingXSchema, navLinkBorderRadiusSchema, navLinkTextSizeSchema, navLinkLetterSpacingSchema, navLinkContrastTreatmentSchema, navLinkStyleSchema;
7482
7588
  var init_types$9 = __esmMin((() => {
7483
7589
  init_baseSchema();
7484
7590
  init_themeColorTokens();
7591
+ init_effectPolicy();
7485
7592
  navLinkPaddingSchema = z.enum([
7486
7593
  "none",
7487
7594
  "compact",
@@ -9048,7 +9155,7 @@ var init_bookingConsent = __esmMin((() => {
9048
9155
  checkboxLabel: z.string().min(1)
9049
9156
  });
9050
9157
  z.union([blockBookingConsentSchema, bookingRequirementConsentFieldSchema]);
9051
- })), publicEventLoaderQuerySchemaShape, eventPresetSchema, eventScheduleScopeSchema$2, publicEventRecurrenceSchema, eventDestinationModeSchema, publicEventDestinationSchema, eventVenueSchema, eventCategorySchema, accessRestrictionSchema, publicCurrencySchema, publicCentsSchema, publicPositiveCentsSchema, publicIsoDateTimeSchema, publicEventAttendanceModeSchema, publicEventAttendanceModeAvailabilitySchema, publicEventPricingOptionAvailabilitySchema, publicEventPricingOptionSchema, publicEventPricingSchema, publicTeamMemberSummarySchema, publicEventBookingAvailabilitySchema, publicRunSessionSchema, publicWholeSeriesRunSchema, publicEventBaseSchema, publicEventSchema, publicEventsArraySchema;
9158
+ })), publicEventLoaderQuerySchemaShape, eventPresetSchema, eventScheduleScopeSchema$2, publicEventRecurrenceSchema, eventDestinationModeSchema, publicEventDestinationSchema, eventVenueSchema, eventCategorySchema, accessRestrictionSchema, publicCurrencySchema, publicCentsSchema, publicPositiveCentsSchema, publicIsoDateTimeSchema, publicEventAttendanceModeSchema, publicEventAttendanceModeAvailabilitySchema, publicEventPricingOptionAvailabilitySchema, publicEventPricingOptionSchema, publicEventPricingSchema, publicTeamMemberSummarySchema, publicEventBookingAvailabilitySchema, publicEventBookingClosedDetailSchema, publicRunSessionSchema, publicWholeSeriesRunSchema, publicEventBaseSchema, publicEventSchema, publicEventsArraySchema;
9052
9159
  var init_schemas = __esmMin((() => {
9053
9160
  init_media$1();
9054
9161
  init_richTextSchema();
@@ -9072,6 +9179,7 @@ var init_schemas = __esmMin((() => {
9072
9179
  seriesSlug: z.string().optional(),
9073
9180
  includeOccurrenceId: z.string().optional(),
9074
9181
  readIntent: z.string().optional(),
9182
+ detailAdmission: z.string().optional(),
9075
9183
  detailLevel: z.string().optional(),
9076
9184
  readProfile: z.string().optional()
9077
9185
  };
@@ -9229,11 +9337,11 @@ var init_schemas = __esmMin((() => {
9229
9337
  "series_archived",
9230
9338
  "parent_archived",
9231
9339
  "parent_inconsistent",
9232
- "not_public",
9233
9340
  "already_started",
9234
9341
  "enrollment_closed"
9235
9342
  ])
9236
9343
  })]);
9344
+ publicEventBookingClosedDetailSchema = z.discriminatedUnion("kind", [z.object({ kind: z.literal("opensSoon") }), z.object({ kind: z.literal("paused") })]);
9237
9345
  publicRunSessionSchema = z.object({
9238
9346
  occurrenceId: z.string(),
9239
9347
  startsAt: z.string(),
@@ -9275,6 +9383,7 @@ var init_schemas = __esmMin((() => {
9275
9383
  destination: publicEventDestinationSchema,
9276
9384
  requiresRegistration: z.boolean(),
9277
9385
  bookingAvailability: publicEventBookingAvailabilitySchema,
9386
+ bookingClosedDetail: publicEventBookingClosedDetailSchema.optional(),
9278
9387
  deliveryMode: z.enum([
9279
9388
  "in_person",
9280
9389
  "online",
@@ -13714,7 +13823,7 @@ var init_semantic = __esmMin((() => {
13714
13823
  }));
13715
13824
  }));
13716
13825
  var ICON_PICKER_PRESETS;
13717
- var init_presets$1 = __esmMin((() => {
13826
+ var init_presets$2 = __esmMin((() => {
13718
13827
  ICON_PICKER_PRESETS = ["cta", "feature"];
13719
13828
  }));
13720
13829
  //#endregion
@@ -13733,6 +13842,7 @@ var init_social = __esmMin((() => {
13733
13842
  "SocialInstagram",
13734
13843
  "SocialLinkedIn",
13735
13844
  "SocialTikTok",
13845
+ "SocialWhatsApp",
13736
13846
  "SocialX",
13737
13847
  "SocialYouTube"
13738
13848
  ];
@@ -13769,6 +13879,7 @@ var init_social = __esmMin((() => {
13769
13879
  /* @__PURE__ */ jsx("path", { d: "M10.5 9v10" })
13770
13880
  ] })),
13771
13881
  SocialTikTok: createIcon("SocialTikTokIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M14 4v11.5a4.5 4.5 0 1 1-4-4.47" }), /* @__PURE__ */ jsx("path", { d: "M14 4c.7 3 2.4 4.5 5 4.5" })] })),
13882
+ SocialWhatsApp: createIcon("SocialWhatsAppIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M3.5 20.5 4.8 16.4A8.5 8.5 0 1 1 8 19.3Z" }), /* @__PURE__ */ jsx("path", { d: "M9.2 8.2c.2-.5.9-.6 1.2-.1l.8 1.4c.2.3.1.7-.2 1l-.5.5c.5 1.1 1.4 2 2.5 2.5l.5-.5c.3-.3.7-.4 1-.2l1.4.8c.5.3.4 1-.1 1.2-2.9 1.1-7.7-3.7-6.6-6.6Z" })] })),
13772
13883
  SocialX: createIcon("SocialXIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "m5 4 14 16" }), /* @__PURE__ */ jsx("path", { d: "M19 4 5 20" })] })),
13773
13884
  SocialYouTube: createIcon("SocialYouTubeIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M21 12c0 3.5-.5 5.5-1.3 6.3S16.5 19.5 12 19.5s-6.9-.4-7.7-1.2S3 15.5 3 12s.5-5.5 1.3-6.3S7.5 4.5 12 4.5s6.9.4 7.7 1.2S21 8.5 21 12Z" }), /* @__PURE__ */ jsx("path", { d: "m10 9 5 3-5 3Z" })] }))
13774
13885
  };
@@ -13801,7 +13912,7 @@ function getIconComponent(name) {
13801
13912
  var init_registry$1 = __esmMin((() => {
13802
13913
  init_cta$1();
13803
13914
  init_semantic();
13804
- init_presets$1();
13915
+ init_presets$2();
13805
13916
  init_social();
13806
13917
  CTA_ICON_OPTIONS.map((option) => ({
13807
13918
  id: option.id,
@@ -14262,7 +14373,7 @@ function shouldReserveFeatureCardIconZone(cards) {
14262
14373
  //#endregion
14263
14374
  //#region ../blocks/src/system/icons/index.ts
14264
14375
  init_cta$1();
14265
- init_presets$1();
14376
+ init_presets$2();
14266
14377
  init_semantic();
14267
14378
  init_registry$1();
14268
14379
  init_svg();
@@ -16027,7 +16138,8 @@ var init_booking_form_reserved_fields = __esmMin((() => {
16027
16138
  "discountCode",
16028
16139
  "selectedSlidingAmountInput",
16029
16140
  "selectedCollectionOptionKind",
16030
- "selectedAppointmentPackageId"
16141
+ "selectedAppointmentPackageId",
16142
+ "mailingListOptIn"
16031
16143
  ];
16032
16144
  BOOKING_FORM_DATA_RESERVED_KEYS = new Set(BOOKING_FORM_DATA_RESERVED_KEY_VALUES);
16033
16145
  }));
@@ -16451,6 +16563,7 @@ function prepareBookingSubmission(input) {
16451
16563
  startAt: selectedSlot,
16452
16564
  endAt: endDate.toISOString(),
16453
16565
  customFields: collectBookingCustomFields(input.data),
16566
+ ...selectedMailingListOptIn(input.data),
16454
16567
  timezone: toBookingTimeZone(input.viewerTimeZone ?? null)
16455
16568
  };
16456
16569
  if (customerPassId) return {
@@ -16501,6 +16614,9 @@ function prepareBookingSubmission(input) {
16501
16614
  }
16502
16615
  };
16503
16616
  }
16617
+ function selectedMailingListOptIn(data) {
16618
+ return data.mailingListOptIn === true ? { mailingListOptIn: true } : {};
16619
+ }
16504
16620
  function formatBookingSubmissionPreparationError(error) {
16505
16621
  switch (error.tag) {
16506
16622
  case "missing-required-booking-information": return "Missing required booking information";
@@ -16633,8 +16749,9 @@ function buildBookingFormInteractiveIslandProps(props) {
16633
16749
  source: props
16634
16750
  });
16635
16751
  }
16636
- var blockBookingPaymentTermsAvailabilitySchema, bookingServiceSchema, bookingServiceCategorySchema, bookingServicesSourceSchema, bookingConfigSchema, bookingSourceSchema, bookingDisplaySchema, bookingHydrationSchema, bookingRenderSchema, bookingFormIslandMetaCodec, bookingFormIslandMetaKeys, bookingFormBlockRuntime, bookingFormInteractiveIslandPropsCodec;
16752
+ var blockBookingPaymentTermsAvailabilitySchema, bookingServiceSchema, bookingServiceCategorySchema, bookingServicesSourceSchema, bookingConfigSchema, bookingMailingListContextSchema, bookingSourceSchema, bookingDisplaySchema, bookingHydrationSchema, bookingRenderSchema, bookingFormIslandMetaCodec, bookingFormIslandMetaKeys, bookingFormBlockRuntime, bookingFormInteractiveIslandPropsCodec;
16637
16753
  var init_booking_form_interactive = __esmMin((() => {
16754
+ init_src$2();
16638
16755
  init_islands();
16639
16756
  init_runtime();
16640
16757
  init_booking_form_state();
@@ -16687,7 +16804,14 @@ var init_booking_form_interactive = __esmMin((() => {
16687
16804
  fields: z.array(bookingFieldSchema)
16688
16805
  }).optional()
16689
16806
  });
16807
+ bookingMailingListContextSchema = z.unknown().transform((value) => {
16808
+ if (value === void 0) return void 0;
16809
+ const parsed = parseMailingListRuntimeContext(value);
16810
+ return parsed.ok ? parsed.value : void 0;
16811
+ });
16690
16812
  bookingSourceSchema = z.object({
16813
+ mailingList: bookingMailingListContextSchema.optional(),
16814
+ siteName: z.string().optional(),
16691
16815
  siteId: z.string().optional(),
16692
16816
  apiBaseUrl: z.string().optional(),
16693
16817
  portalToken: z.string().nullable().optional(),
@@ -16716,6 +16840,8 @@ var init_booking_form_interactive = __esmMin((() => {
16716
16840
  message: z.string().nullable()
16717
16841
  });
16718
16842
  bookingHydrationSchema = z.object({
16843
+ mailingList: bookingMailingListContextSchema.optional(),
16844
+ siteName: z.string().optional(),
16719
16845
  formId: z.string().nullable(),
16720
16846
  serviceId: z.string().nullable(),
16721
16847
  resourceId: z.string().nullable(),
@@ -16752,6 +16878,8 @@ var init_booking_form_interactive = __esmMin((() => {
16752
16878
  return {
16753
16879
  display: buildBookingFormDisplay(source, form),
16754
16880
  hydration: {
16881
+ mailingList: source.mailingList,
16882
+ siteName: source.siteName,
16755
16883
  formId: form?.id ?? source.formId ?? null,
16756
16884
  serviceId: source.serviceId ?? form?.settings?.serviceId ?? null,
16757
16885
  resourceId: source.resourceId ?? form?.settings?.resourceId ?? null,
@@ -16797,34 +16925,15 @@ init_booking_form_interactive();
16797
16925
  * own `.rb-reg-surface`, and leaves no stale loading state on the mounted form.
16798
16926
  * `event-registration.server.tsx` follows the same shape.
16799
16927
  */
16800
- function BookingFormSSR({ blockId, siteId, apiBaseUrl, portalToken, formId, serviceId, resourceId, initialData, noticeMessage, requiresServiceSelection, requiresResourceSelection, shouldAutoSelectSingleResource, rebookContext, submitLabel, successMessage, form, services, spamProtectionEnabled, className, children }) {
16801
- const islandProps = buildBookingFormInteractiveIslandProps({
16802
- siteId,
16803
- apiBaseUrl,
16804
- portalToken,
16805
- formId,
16806
- serviceId,
16807
- resourceId,
16808
- initialData,
16809
- noticeMessage,
16810
- requiresServiceSelection,
16811
- requiresResourceSelection,
16812
- shouldAutoSelectSingleResource,
16813
- rebookContext,
16814
- submitLabel,
16815
- successMessage,
16816
- form,
16817
- services,
16818
- spamProtectionEnabled,
16819
- className
16820
- });
16928
+ function BookingFormSSR({ blockId, children, ...sourceProps }) {
16929
+ const islandProps = buildBookingFormInteractiveIslandProps(sourceProps);
16821
16930
  const display = islandProps.render.display;
16822
16931
  return /* @__PURE__ */ jsxs("div", {
16823
16932
  ...getIslandRootProps("booking-form", blockId),
16824
16933
  children: [
16825
16934
  /* @__PURE__ */ jsx(IslandPropsScript, { value: islandProps }),
16826
16935
  display.state === "missing" ? /* @__PURE__ */ jsx("div", {
16827
- className: `rb-reg-surface booking-form-ssr ${className ?? ""}`.trim(),
16936
+ className: `rb-reg-surface booking-form-ssr ${sourceProps.className ?? ""}`.trim(),
16828
16937
  children: /* @__PURE__ */ jsx("div", {
16829
16938
  className: "alert alert-error",
16830
16939
  role: "alert",
@@ -16834,7 +16943,7 @@ function BookingFormSSR({ blockId, siteId, apiBaseUrl, portalToken, formId, serv
16834
16943
  })
16835
16944
  })
16836
16945
  }) : /* @__PURE__ */ jsxs("div", {
16837
- className: `rb-reg-surface booking-form-ssr ab-shell ${className ?? ""}`.trim(),
16946
+ className: `rb-reg-surface booking-form-ssr ab-shell ${sourceProps.className ?? ""}`.trim(),
16838
16947
  "aria-busy": true,
16839
16948
  "aria-label": "Loading booking form",
16840
16949
  role: "status",
@@ -17565,7 +17674,6 @@ function closedEventBookingLabel(reason) {
17565
17674
  case "series_archived":
17566
17675
  case "parent_archived":
17567
17676
  case "parent_inconsistent":
17568
- case "not_public":
17569
17677
  case "already_started":
17570
17678
  case "enrollment_closed": return "Registration closed";
17571
17679
  default: return assertNever$22(reason);
@@ -25562,7 +25670,7 @@ function parseGradientPresetId(value) {
25562
25670
  return normalized;
25563
25671
  }
25564
25672
  var rawGradientPresets, GRADIENT_PRESETS, GRADIENT_PRESET_IDS, gradientPresetIdSet;
25565
- var init_presets = __esmMin((() => {
25673
+ var init_presets$1 = __esmMin((() => {
25566
25674
  rawGradientPresets = [
25567
25675
  {
25568
25676
  id: "primary-secondary",
@@ -25768,7 +25876,7 @@ var init_utils$2 = __esmMin((() => {}));
25768
25876
  //#region ../theme-core/src/gradients/index.ts
25769
25877
  var init_gradients = __esmMin((() => {
25770
25878
  init_types$10();
25771
- init_presets();
25879
+ init_presets$1();
25772
25880
  init_utils$2();
25773
25881
  }));
25774
25882
  //#endregion
@@ -28628,6 +28736,7 @@ var init_resolver = __esmMin((() => {
28628
28736
  };
28629
28737
  blockDesignFallback.sectionSurface, blockDesignFallback.contentFrame, blockDesignFallback.sectionHeight, blockDesignFallback.heroLegibility, blockDesignFallback.imageSurfaceTreatment, blockDesignFallback.imageSurfaceMotion, blockDesignFallback.tileTreatment, blockDesignFallback.eventListTreatment, blockDesignFallback.eyebrowTreatment, blockDesignFallback.accordionIconTreatment, blockDesignFallback.composition;
28630
28738
  }));
28739
+ var init_rootPaint = __esmMin((() => {}));
28631
28740
  function parseSiteChromeBackgroundColorToken(value) {
28632
28741
  const token = parseBackgroundAppearanceColorToken(value);
28633
28742
  return token ? token : null;
@@ -28644,6 +28753,7 @@ var init_siteChromeBackgrounds = __esmMin((() => {
28644
28753
  init_surfaces();
28645
28754
  init_backgroundAppearance();
28646
28755
  init_rawStyleFields();
28756
+ init_rootPaint();
28647
28757
  siteChromeBackgroundColorTokens = toSiteChromeBackgroundColorTokens(backgroundAppearanceColorTokenNames);
28648
28758
  quickSiteChromeBackgroundColorTokens = toSiteChromeBackgroundColorTokens(backgroundAppearanceQuickColorTokenNames);
28649
28759
  siteChromeBackgroundColorTokens.filter((token) => !quickSiteChromeBackgroundColorTokens.includes(token));
@@ -28939,13 +29049,180 @@ function diffJsonPaths(left, right, path = "") {
28939
29049
  }];
28940
29050
  }
28941
29051
  var init_headerBytesComparison = __esmMin((() => {}));
29052
+ var NAV_LINK_PRESETS;
29053
+ var init_presets = __esmMin((() => {
29054
+ NAV_LINK_PRESETS = {
29055
+ /**
29056
+ * Minimal - subtle color change on hover
29057
+ */
29058
+ minimal: {
29059
+ name: "Minimal",
29060
+ typography: "body",
29061
+ fontWeight: "medium",
29062
+ textTransform: "none",
29063
+ italic: false,
29064
+ colorToken: "text",
29065
+ hoverColorToken: "primary",
29066
+ padding: "none",
29067
+ borderRadius: "none",
29068
+ effects: { hover: [{
29069
+ effectId: "text-color-change",
29070
+ options: { hoverColorToken: "primary" }
29071
+ }] }
29072
+ },
29073
+ /**
29074
+ * Underline - static underline appears on hover
29075
+ */
29076
+ underline: {
29077
+ name: "Underline",
29078
+ typography: "body",
29079
+ fontWeight: "medium",
29080
+ textTransform: "none",
29081
+ italic: false,
29082
+ colorToken: "text",
29083
+ padding: "none",
29084
+ borderRadius: "none",
29085
+ effects: { hover: [{
29086
+ effectId: "nav-underline",
29087
+ options: { style: "static" }
29088
+ }] }
29089
+ },
29090
+ /**
29091
+ * Underline Grow - animated underline grows from center on hover
29092
+ */
29093
+ "underline-grow": {
29094
+ name: "Underline Grow",
29095
+ typography: "body",
29096
+ fontWeight: "medium",
29097
+ textTransform: "none",
29098
+ italic: false,
29099
+ colorToken: "text",
29100
+ padding: "none",
29101
+ borderRadius: "none",
29102
+ effects: { hover: [{
29103
+ effectId: "nav-underline",
29104
+ options: { style: "grow" }
29105
+ }] }
29106
+ },
29107
+ /**
29108
+ * Capsule - pill-shaped background on hover
29109
+ */
29110
+ capsule: {
29111
+ name: "Capsule",
29112
+ typography: "body",
29113
+ fontWeight: "medium",
29114
+ textTransform: "none",
29115
+ italic: false,
29116
+ colorToken: "text",
29117
+ padding: "compact",
29118
+ borderRadius: "full",
29119
+ effects: {
29120
+ hover: [{
29121
+ effectId: "background-on-hover-alpha",
29122
+ options: {
29123
+ colorToken: "primary",
29124
+ opacity: 10
29125
+ }
29126
+ }],
29127
+ active: [{
29128
+ effectId: "background-on-hover-alpha",
29129
+ options: {
29130
+ colorToken: "primary",
29131
+ opacity: 15
29132
+ }
29133
+ }]
29134
+ }
29135
+ },
29136
+ /**
29137
+ * Solid - solid background color on hover
29138
+ */
29139
+ solid: {
29140
+ name: "Solid",
29141
+ typography: "body",
29142
+ fontWeight: "medium",
29143
+ textTransform: "none",
29144
+ italic: false,
29145
+ colorToken: "text",
29146
+ padding: "compact",
29147
+ borderRadius: "none",
29148
+ effects: {
29149
+ hover: [{
29150
+ effectId: "background-on-hover",
29151
+ options: {
29152
+ colorToken: "primary",
29153
+ textColorToken: "primaryForeground"
29154
+ }
29155
+ }],
29156
+ active: [{
29157
+ effectId: "background-on-hover",
29158
+ options: {
29159
+ colorToken: "primary",
29160
+ textColorToken: "primaryForeground"
29161
+ }
29162
+ }]
29163
+ }
29164
+ },
29165
+ /**
29166
+ * Scale - gentle scale-up on hover
29167
+ */
29168
+ scale: {
29169
+ name: "Scale",
29170
+ typography: "body",
29171
+ fontWeight: "medium",
29172
+ textTransform: "none",
29173
+ italic: false,
29174
+ colorToken: "text",
29175
+ padding: "none",
29176
+ borderRadius: "none",
29177
+ effects: { hover: [{
29178
+ effectId: "scale-up",
29179
+ options: { scale: 1.05 }
29180
+ }] }
29181
+ },
29182
+ /**
29183
+ * Frosted - semi-transparent glass-like background
29184
+ */
29185
+ frosted: {
29186
+ name: "Frosted",
29187
+ typography: "body",
29188
+ fontWeight: "medium",
29189
+ textTransform: "none",
29190
+ italic: false,
29191
+ colorToken: "text",
29192
+ padding: "compact",
29193
+ borderRadius: "md",
29194
+ effects: {
29195
+ base: [{ effectId: "nav-frosted-base" }],
29196
+ hover: [{ effectId: "nav-frosted-hover" }],
29197
+ active: [{ effectId: "nav-frosted-active" }]
29198
+ }
29199
+ }
29200
+ };
29201
+ Object.keys(NAV_LINK_PRESETS);
29202
+ }));
29203
+ var init_legacyNavLinkStyle = __esmMin((() => {
29204
+ init_presets();
29205
+ }));
29206
+ var init_openingForegroundProjection = __esmMin((() => {}));
29207
+ var init_effectiveNavLinkStyle$1 = __esmMin((() => {
29208
+ init_types$9();
29209
+ init_legacyNavLinkStyle();
29210
+ init_openingForegroundProjection();
29211
+ init_surfaces();
29212
+ init_foregroundInteraction();
29213
+ init_tokens();
29214
+ init_colorStyles();
29215
+ }));
28942
29216
  var init_headerOpeningForeground = __esmMin((() => {
28943
29217
  init_foregroundInteraction();
28944
29218
  init_expandPalette();
28945
29219
  init_colorConversion();
28946
29220
  init_tokens();
28947
- init_logoVariant();
28948
29221
  init_colorTokenParts();
29222
+ init_types$9();
29223
+ init_effectPolicy();
29224
+ init_effectiveNavLinkStyle$1();
29225
+ init_openingForegroundProjection();
28949
29226
  init_types$8();
28950
29227
  }));
28951
29228
  var init_effectivePageDesign = __esmMin((() => {
@@ -29257,8 +29534,79 @@ var init_site_styles = __esmMin((() => {
29257
29534
  init_siteStyleTypography();
29258
29535
  init_themeParity();
29259
29536
  init_types$8();
29537
+ }));
29538
+ var init_generateNavLinkCSS = __esmMin((() => {
29539
+ init_types$9();
29540
+ init_expandPalette();
29541
+ init_colorConversion();
29542
+ init_generateBaseCSS();
29543
+ init_generateEffectsCSS();
29544
+ init_foregroundContract();
29545
+ init_effectPolicy();
29546
+ })), NAV_DROPDOWN_SHIFT_PROPERTY, NAV_DROPDOWN_MAX_WIDTH_CSS;
29547
+ var init_navDropdownSizing = __esmMin((() => {
29548
+ NAV_DROPDOWN_SHIFT_PROPERTY = "--nav-dropdown-shift-x";
29549
+ NAV_DROPDOWN_MAX_WIDTH_CSS = `min(22rem, calc(100vw - 2rem))`;
29550
+ `${NAV_DROPDOWN_MAX_WIDTH_CSS}`, `${NAV_DROPDOWN_SHIFT_PROPERTY}`;
29551
+ }));
29552
+ var init_surfaceRules = __esmMin((() => {
29553
+ init_shared$4();
29554
+ init_colorStyles();
29555
+ }));
29556
+ var init_generateHeaderNavLinkStyles = __esmMin((() => {
29557
+ init_generateNavLinkCSS();
29558
+ init_siteChromeNavPreferences();
29559
+ init_effectiveNavLinkStyle$1();
29560
+ init_rawStyleFields();
29561
+ }));
29562
+ var init_generateHeaderLogoStyles = __esmMin((() => {
29563
+ init_generateNavLinkCSS();
29564
+ init_surfaces();
29565
+ }));
29566
+ var init_generateHeaderCss = __esmMin((() => {
29567
+ init_resolver$1();
29568
+ init_generateNavLinkCSS();
29569
+ init_shared$4();
29570
+ init_breakpoints();
29571
+ init_navDropdownSizing();
29572
+ init_scrollTreatment();
29573
+ init_paintTargets();
29574
+ init_surfaceRules();
29575
+ init_generateHeaderNavLinkStyles();
29576
+ init_rootPaint();
29577
+ init_rawStyleFields();
29578
+ init_generateHeaderLogoStyles();
29579
+ init_surfaces();
29580
+ init_expandPalette();
29581
+ init_cssDeclarations();
29582
+ }));
29583
+ //#endregion
29584
+ //#region ../theme-core/src/header/index.ts
29585
+ var init_header$1 = __esmMin((() => {
29586
+ init_generateHeaderCss();
29587
+ init_rootPaint();
29588
+ init_effectiveNavLinkStyle$1();
29589
+ init_openingForegroundProjection();
29590
+ }));
29591
+ var init_effectiveNavLinkStyle = __esmMin((() => {
29592
+ init_presets();
29593
+ init_types$9();
29594
+ }));
29595
+ var init_generateFooterCss = __esmMin((() => {
29596
+ init_resolver$1();
29597
+ init_generateNavLinkCSS();
29598
+ init_effectiveNavLinkStyle();
29599
+ init_rawStyleFields();
29600
+ }));
29601
+ //#endregion
29602
+ //#region ../theme-core/src/footer/index.ts
29603
+ var init_footer = __esmMin((() => {
29604
+ init_generateFooterCss();
29605
+ init_effectiveNavLinkStyle();
29260
29606
  })), init_surfaceForegroundStyles = __esmMin((() => {
29261
29607
  init_surfaces();
29608
+ init_header$1();
29609
+ init_footer();
29262
29610
  init_buttons();
29263
29611
  init_backgroundContent();
29264
29612
  init_themeColorResolution();
@@ -29705,7 +30053,7 @@ var init_schema = __esmMin((() => {
29705
30053
  init_src$1();
29706
30054
  init_node();
29707
30055
  init_repeaterGrid();
29708
- init_presets$1();
30056
+ init_presets$2();
29709
30057
  visibilityLevels = [
29710
30058
  "admin",
29711
30059
  "designer",
@@ -34665,6 +35013,7 @@ function buildEventRegistrationInteractiveIslandProps(props) {
34665
35013
  }
34666
35014
  var EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS, EVENT_REGISTRATION_SHELL_STEP_LABELS, eventRegistrationPublicEventSchema, eventRegistrationHydrationSchemaShape, eventRegistrationEventSourceSchema, eventRegistrationSourceSchema, eventRegistrationDisplaySchema, eventRegistrationHydrationSchema, eventRegistrationRenderSchema, eventRegistrationIslandMetaCodec, eventRegistrationIslandMetaKeys, eventRegistrationBlockRuntime, eventRegistrationInteractiveIslandPropsCodec;
34667
35015
  var init_event_registration_interactive = __esmMin((() => {
35016
+ init_src$2();
34668
35017
  init_readAuthority();
34669
35018
  init_schemas();
34670
35019
  init_runGrouping();
@@ -34704,7 +35053,13 @@ var init_event_registration_interactive = __esmMin((() => {
34704
35053
  spamProtectionEnabled: z.boolean().optional(),
34705
35054
  supportEmail: z.string().optional(),
34706
35055
  sitePasses: publicPassProductCollectionSchema.nullable().optional(),
34707
- siteMemberships: publicMembershipProductCollectionSchema.nullable().optional()
35056
+ siteMemberships: publicMembershipProductCollectionSchema.nullable().optional(),
35057
+ mailingList: z.unknown().transform((value) => {
35058
+ if (value === void 0) return void 0;
35059
+ const parsed = parseMailingListRuntimeContext(value);
35060
+ return parsed.ok ? parsed.value : void 0;
35061
+ }),
35062
+ siteName: z.string().optional()
34708
35063
  };
34709
35064
  eventRegistrationEventSourceSchema = z.discriminatedUnion("kind", [z.object({
34710
35065
  kind: z.literal("loaded"),
@@ -34791,7 +35146,9 @@ var init_event_registration_interactive = __esmMin((() => {
34791
35146
  spamProtectionEnabled: source.spamProtectionEnabled,
34792
35147
  supportEmail: source.supportEmail,
34793
35148
  sitePasses: source.sitePasses ?? null,
34794
- siteMemberships: source.siteMemberships ?? null
35149
+ siteMemberships: source.siteMemberships ?? null,
35150
+ mailingList: source.mailingList,
35151
+ siteName: source.siteName
34795
35152
  }
34796
35153
  };
34797
35154
  }
@@ -34976,6 +35333,8 @@ const eventRegistrationBlockDefinition = {
34976
35333
  events: { $bind: { from: "data.events" } },
34977
35334
  wholeSeriesRunEvents: { $bind: { from: "data.wholeSeriesRunEvents" } },
34978
35335
  loaderFailures: { $bind: { from: "$root.loaderFailures" } },
35336
+ mailingList: { $bind: { from: "$root.mailingList" } },
35337
+ siteName: { $bind: { from: "$root.siteName" } },
34979
35338
  sitePasses: { $bind: { from: "data.sitePasses" } },
34980
35339
  siteMemberships: { $bind: { from: "data.siteMemberships" } },
34981
35340
  stage: { $bind: {
@@ -37193,6 +37552,11 @@ function withOptionalPhone(fields, includePhone) {
37193
37552
  var init_newsletter_form_types = __esmMin((() => {}));
37194
37553
  //#endregion
37195
37554
  //#region ../blocks/src/system/runtime/nodes/newsletter-form.interactive.ts
37555
+ function newsletterBlockSubmissionMessage(target) {
37556
+ if (target.tag === "block-source") return target.sourceRef ? null : NEWSLETTER_SIGNUPS_PAUSED_MESSAGE;
37557
+ if (target.tag !== "unpublished-preview") return null;
37558
+ return target.reason === "unpublished-form" ? "Publish this form to test a signup here." : "This form's signup settings are unpublished. Publish it to test a signup here.";
37559
+ }
37196
37560
  function buildNewsletterDisplay(source) {
37197
37561
  const context = source.mailingList;
37198
37562
  const form = context?.tag === "configured" ? context.form : {
@@ -37218,16 +37582,21 @@ function buildNewsletterDisplay(source) {
37218
37582
  }
37219
37583
  function projectNewsletterFormHydrationTarget(source) {
37220
37584
  switch (source.source) {
37221
- case "block": {
37222
- const sourceRef = buildMailingListSignupBlockSourceRef(source.blockId, source.contentVersionId);
37223
- if (sourceRef?.tag === "block_ref") return {
37585
+ case "block": switch (source.newsletterBlockSubmission.tag) {
37586
+ case "unpublished-form":
37587
+ case "unpublished-settings": return {
37588
+ tag: "unpublished-preview",
37589
+ reason: source.newsletterBlockSubmission.tag
37590
+ };
37591
+ case "ready": return {
37224
37592
  tag: "block-source",
37225
- sourceRef
37593
+ sourceRef: source.newsletterBlockSubmission.sourceRef
37226
37594
  };
37227
- return {
37595
+ case "unavailable": return {
37228
37596
  tag: "block-source",
37229
37597
  sourceRef: null
37230
37598
  };
37599
+ default: return assertNever$22(source.newsletterBlockSubmission);
37231
37600
  }
37232
37601
  case "signed-footer": return {
37233
37602
  tag: "signed-footer-source",
@@ -37296,6 +37665,7 @@ function buildNewsletterFormInteractiveIslandProps(props) {
37296
37665
  const decoded = newsletterFormBlockRuntime.contracts.source.decode(props);
37297
37666
  const source = isDecodeSuccess(decoded) ? decoded.value : {
37298
37667
  ...props,
37668
+ ...props.source === "block" ? { newsletterBlockSubmission: { tag: "unavailable" } } : {},
37299
37669
  mailingList: void 0,
37300
37670
  targeting: { mode: "default" }
37301
37671
  };
@@ -37319,13 +37689,14 @@ function parseRequiredMailingListSignedSourceToken(value) {
37319
37689
  if (!parsed) throw new Error("Mailing-list signup signed source ref requires token");
37320
37690
  return parsed;
37321
37691
  }
37322
- var newsletterButtonVariantSchema, mailingListContextSchema, mailingListTargetingSchema, newsletterFieldSchema, mailingListSignupBlockIdSchema, mailingListContentVersionIdSchema, signedMailingListSourceTokenSchema, newsletterSourceCommonSchema, newsletterSourceSchema, newsletterDisplaySchema, newsletterHydrationSchema, newsletterRenderSchema, newsletterIslandMetaCodec, newsletterIslandMetaKeys, newsletterFormBlockRuntime, newsletterFormInteractiveIslandPropsCodec;
37692
+ var NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, newsletterButtonVariantSchema, mailingListContextSchema, mailingListTargetingSchema, newsletterFieldSchema, mailingListSignupBlockIdSchema, mailingListContentVersionIdSchema, mailingListSignupBlockSourceRefSchema, signedMailingListSourceTokenSchema, newsletterSourceCommonSchema, newsletterSourceSchema, newsletterDisplaySchema, newsletterHydrationSchema, newsletterRenderSchema, newsletterIslandMetaCodec, newsletterIslandMetaKeys, newsletterFormBlockRuntime, newsletterFormInteractiveIslandPropsCodec;
37323
37693
  var init_newsletter_form_interactive = __esmMin((() => {
37324
37694
  init_src$2();
37325
37695
  init_islands();
37326
37696
  init_runtime();
37327
37697
  init_newsletter_form_types();
37328
37698
  init_buttonRoles();
37699
+ NEWSLETTER_SIGNUPS_PAUSED_MESSAGE = "We can’t accept signups right now. Please try again later.";
37329
37700
  newsletterButtonVariantSchema = blockButtonRoleSchema;
37330
37701
  mailingListContextSchema = z.unknown().transform((value, ctx) => {
37331
37702
  const parsed = parseMailingListRuntimeContext(value);
@@ -37366,6 +37737,11 @@ var init_newsletter_form_interactive = __esmMin((() => {
37366
37737
  });
37367
37738
  return z.NEVER;
37368
37739
  });
37740
+ mailingListSignupBlockSourceRefSchema = z.object({
37741
+ tag: z.literal("block_ref"),
37742
+ blockId: mailingListSignupBlockIdSchema,
37743
+ contentVersionId: mailingListContentVersionIdSchema
37744
+ });
37369
37745
  signedMailingListSourceTokenSchema = z.string().trim().min(1).transform(parseRequiredMailingListSignedSourceToken);
37370
37746
  newsletterSourceCommonSchema = z.object({
37371
37747
  siteId: z.string().optional(),
@@ -37380,7 +37756,15 @@ var init_newsletter_form_interactive = __esmMin((() => {
37380
37756
  newsletterSourceCommonSchema.extend({
37381
37757
  source: z.literal("block"),
37382
37758
  blockId: z.string().nullable().optional(),
37383
- contentVersionId: z.string().nullable().optional()
37759
+ newsletterBlockSubmission: z.discriminatedUnion("tag", [
37760
+ z.object({
37761
+ tag: z.literal("ready"),
37762
+ sourceRef: mailingListSignupBlockSourceRefSchema
37763
+ }),
37764
+ z.object({ tag: z.literal("unpublished-form") }),
37765
+ z.object({ tag: z.literal("unpublished-settings") }),
37766
+ z.object({ tag: z.literal("unavailable") })
37767
+ ])
37384
37768
  }),
37385
37769
  newsletterSourceCommonSchema.extend({
37386
37770
  source: z.literal("signed-footer"),
@@ -37409,11 +37793,7 @@ var init_newsletter_form_interactive = __esmMin((() => {
37409
37793
  target: z.discriminatedUnion("tag", [
37410
37794
  z.object({
37411
37795
  tag: z.literal("block-source"),
37412
- sourceRef: z.object({
37413
- tag: z.literal("block_ref"),
37414
- blockId: mailingListSignupBlockIdSchema,
37415
- contentVersionId: mailingListContentVersionIdSchema
37416
- }).nullable()
37796
+ sourceRef: mailingListSignupBlockSourceRefSchema.nullable()
37417
37797
  }),
37418
37798
  z.object({
37419
37799
  tag: z.literal("signed-footer-source"),
@@ -37422,7 +37802,11 @@ var init_newsletter_form_interactive = __esmMin((() => {
37422
37802
  token: signedMailingListSourceTokenSchema
37423
37803
  })
37424
37804
  }),
37425
- z.object({ tag: z.literal("preview") })
37805
+ z.object({ tag: z.literal("preview") }),
37806
+ z.object({
37807
+ tag: z.literal("unpublished-preview"),
37808
+ reason: z.enum(["unpublished-form", "unpublished-settings"])
37809
+ })
37426
37810
  ]),
37427
37811
  setupRevision: z.number().int().positive().nullable(),
37428
37812
  choiceProvider: z.enum([
@@ -37514,65 +37898,67 @@ const editorialSplitLayout = styledSection({
37514
37898
  spacing: "comfortable",
37515
37899
  background: "surface"
37516
37900
  });
37517
- const newsletterSignupBlockDefinition = {
37518
- manifest: createBlockManifest({
37519
- id: "block.newsletter-signup",
37520
- title: "Newsletter Signup",
37521
- titleSource: "title",
37522
- description: "Newsletter subscription form with configurable field presets.",
37523
- category: "interactive",
37524
- contentSource: { kind: "inline" },
37525
- fragments: [{
37526
- fragment: newsletterCopyFragment,
37527
- fieldPriority: 0
37528
- }, {
37529
- fragment: newsletterFormFragment,
37530
- fieldPriority: 1
37531
- }],
37532
- layout: stackedLayout,
37533
- variants: {
37534
- stacked: stackedLayout,
37535
- inline: inlineLayout,
37536
- "editorial-split": editorialSplitLayout
37537
- },
37538
- defaultVariant: "stacked",
37539
- variantOptions: {
37540
- stacked: {
37541
- label: "Stacked",
37542
- description: "Vertical layout with fields stacked"
37543
- },
37544
- inline: {
37545
- label: "Inline",
37546
- description: "Horizontal layout (email + button side by side)"
37547
- },
37548
- "editorial-split": {
37549
- label: "Editorial split",
37550
- description: "Copy and form in balanced side-by-side columns, stacked on mobile."
37551
- }
37901
+ const newsletterSignupManifest = createBlockManifest({
37902
+ id: "block.newsletter-signup",
37903
+ title: "Newsletter Signup",
37904
+ titleSource: "title",
37905
+ description: "Newsletter subscription form with configurable field presets.",
37906
+ category: "interactive",
37907
+ contentSource: { kind: "inline" },
37908
+ fragments: [{
37909
+ fragment: newsletterCopyFragment,
37910
+ fieldPriority: 0
37911
+ }, {
37912
+ fragment: newsletterFormFragment,
37913
+ fieldPriority: 1
37914
+ }],
37915
+ layout: stackedLayout,
37916
+ variants: {
37917
+ stacked: stackedLayout,
37918
+ inline: inlineLayout,
37919
+ "editorial-split": editorialSplitLayout
37920
+ },
37921
+ defaultVariant: "stacked",
37922
+ variantOptions: {
37923
+ stacked: {
37924
+ label: "Stacked",
37925
+ description: "Vertical layout with fields stacked"
37552
37926
  },
37553
- styleTokens: {
37554
- background: "surface",
37555
- typography: "body",
37556
- spacing: "md"
37927
+ inline: {
37928
+ label: "Inline",
37929
+ description: "Horizontal layout (email + button side by side)"
37557
37930
  },
37558
- behaviours: {
37559
- supportsThemeSwitching: true,
37560
- inlineEditing: false,
37561
- animation: false,
37562
- paletteHidden: false
37563
- },
37564
- tags: [
37565
- "newsletter",
37566
- "signup",
37567
- "email",
37568
- "subscribe",
37569
- "subscription",
37570
- "mailchimp",
37571
- "marketing",
37572
- "lead-capture"
37573
- ],
37574
- icon: "Mail"
37575
- }),
37931
+ "editorial-split": {
37932
+ label: "Editorial split",
37933
+ description: "Copy and form in balanced side-by-side columns, stacked on mobile."
37934
+ }
37935
+ },
37936
+ styleTokens: {
37937
+ background: "surface",
37938
+ typography: "body",
37939
+ spacing: "md"
37940
+ },
37941
+ behaviours: {
37942
+ supportsThemeSwitching: true,
37943
+ inlineEditing: false,
37944
+ animation: false,
37945
+ paletteHidden: false
37946
+ },
37947
+ tags: [
37948
+ "newsletter",
37949
+ "signup",
37950
+ "email",
37951
+ "subscribe",
37952
+ "subscription",
37953
+ "mailchimp",
37954
+ "marketing",
37955
+ "lead-capture"
37956
+ ],
37957
+ icon: "Mail"
37958
+ });
37959
+ [...(newsletterSignupManifest.fields ?? []).map((field) => field.id)];
37960
+ const newsletterSignupBlockDefinition = {
37961
+ manifest: newsletterSignupManifest,
37576
37962
  runtime: newsletterFormBlockRuntime
37577
37963
  };
37578
37964
  //#endregion
@@ -39923,10 +40309,167 @@ function FeedbackMessage({ tone, treatment = "panel", children, className, id, t
39923
40309
  }
39924
40310
  var init_FeedbackMessage = __esmMin((() => {}));
39925
40311
  //#endregion
40312
+ //#region ../blocks/src/system/runtime/shared/components/CheckboxChoice.tsx
40313
+ /**
40314
+ * The customer-facing checkbox every block renders. Styling comes from the
40315
+ * theme's input CSS (`.form-check`, `.form-checkbox`), so it follows each
40316
+ * site's input colours, borders and corners.
40317
+ */
40318
+ function CheckboxChoice({ label, presentation = "row", className, ...inputProps }) {
40319
+ return /* @__PURE__ */ jsxs("label", {
40320
+ className: clsx("form-check", presentation === "tile" && "form-check--tile", className),
40321
+ children: [/* @__PURE__ */ jsx("input", {
40322
+ ...inputProps,
40323
+ type: "checkbox",
40324
+ className: "form-checkbox"
40325
+ }), /* @__PURE__ */ jsx("span", {
40326
+ className: "form-check-label",
40327
+ children: label
40328
+ })]
40329
+ });
40330
+ }
40331
+ var init_CheckboxChoice = __esmMin((() => {
40332
+ init_clsx();
40333
+ }));
40334
+ //#endregion
40335
+ //#region ../blocks/src/system/runtime/nodes/form.fields.tsx
40336
+ function fieldBasics(field) {
40337
+ return {
40338
+ inputId: `f_${field.id}`,
40339
+ label: String(field.label ?? field.id),
40340
+ required: Boolean(field.required)
40341
+ };
40342
+ }
40343
+ function textInputType(type) {
40344
+ return type === "email" || type === "url" || type === "tel" || type === "number" ? type : "text";
40345
+ }
40346
+ function textInputConstraints(field, inputType) {
40347
+ if (inputType === "number") return {
40348
+ ...typeof field.min === "number" ? { min: field.min } : {},
40349
+ ...typeof field.max === "number" ? { max: field.max } : {}
40350
+ };
40351
+ return {
40352
+ ...typeof field.minLength === "number" ? { minLength: field.minLength } : {},
40353
+ ...typeof field.maxLength === "number" ? { maxLength: field.maxLength } : {},
40354
+ ...typeof field.pattern === "string" && field.pattern ? { pattern: field.pattern } : {}
40355
+ };
40356
+ }
40357
+ function LabelledField({ basics, children }) {
40358
+ return /* @__PURE__ */ jsxs("div", {
40359
+ className: "fb-field",
40360
+ children: [/* @__PURE__ */ jsx("label", {
40361
+ htmlFor: basics.inputId,
40362
+ className: "form-label",
40363
+ children: basics.label
40364
+ }), children]
40365
+ });
40366
+ }
40367
+ function TextareaField({ field }) {
40368
+ const basics = fieldBasics(field);
40369
+ return /* @__PURE__ */ jsx(LabelledField, {
40370
+ basics,
40371
+ children: /* @__PURE__ */ jsx("textarea", {
40372
+ id: basics.inputId,
40373
+ name: field.id,
40374
+ required: basics.required,
40375
+ placeholder: field.placeholder,
40376
+ rows: field.rows,
40377
+ className: "form-textarea"
40378
+ })
40379
+ });
40380
+ }
40381
+ function SelectField({ field }) {
40382
+ const basics = fieldBasics(field);
40383
+ const options = field.options ?? [];
40384
+ const multiple = Boolean(field.multiple);
40385
+ return /* @__PURE__ */ jsx(LabelledField, {
40386
+ basics,
40387
+ children: /* @__PURE__ */ jsxs("select", {
40388
+ id: basics.inputId,
40389
+ name: field.id,
40390
+ multiple,
40391
+ required: basics.required,
40392
+ className: "form-select",
40393
+ children: [!multiple && /* @__PURE__ */ jsx("option", {
40394
+ value: "",
40395
+ children: "Select…"
40396
+ }), options.map((opt) => /* @__PURE__ */ jsx("option", {
40397
+ value: opt.value,
40398
+ children: opt.label
40399
+ }, opt.value))]
40400
+ })
40401
+ });
40402
+ }
40403
+ function RadioField({ field }) {
40404
+ const basics = fieldBasics(field);
40405
+ const options = field.options ?? [];
40406
+ return /* @__PURE__ */ jsxs("fieldset", {
40407
+ className: "fb-fieldset",
40408
+ children: [/* @__PURE__ */ jsx("legend", {
40409
+ className: "form-label",
40410
+ children: basics.label
40411
+ }), options.map((opt) => /* @__PURE__ */ jsxs("label", {
40412
+ className: "form-check",
40413
+ children: [/* @__PURE__ */ jsx("input", {
40414
+ type: "radio",
40415
+ name: field.id,
40416
+ value: opt.value,
40417
+ required: basics.required,
40418
+ className: "form-radio"
40419
+ }), /* @__PURE__ */ jsx("span", {
40420
+ className: "form-check-label",
40421
+ children: opt.label
40422
+ })]
40423
+ }, opt.value))]
40424
+ });
40425
+ }
40426
+ function TextInputField({ field, type }) {
40427
+ const basics = fieldBasics(field);
40428
+ const inputType = textInputType(type);
40429
+ return /* @__PURE__ */ jsx(LabelledField, {
40430
+ basics,
40431
+ children: /* @__PURE__ */ jsx("input", {
40432
+ id: basics.inputId,
40433
+ name: field.id,
40434
+ type: inputType,
40435
+ required: basics.required,
40436
+ placeholder: field.placeholder,
40437
+ ...textInputConstraints(field, inputType),
40438
+ className: "form-input"
40439
+ })
40440
+ });
40441
+ }
40442
+ function FormFieldControl({ field }) {
40443
+ const type = String(field.type ?? "text");
40444
+ switch (type) {
40445
+ case "textarea": return /* @__PURE__ */ jsx(TextareaField, { field });
40446
+ case "select": return /* @__PURE__ */ jsx(SelectField, { field });
40447
+ case "radio": return /* @__PURE__ */ jsx(RadioField, { field });
40448
+ case "checkbox":
40449
+ case "consent": {
40450
+ const basics = fieldBasics(field);
40451
+ return /* @__PURE__ */ jsx(CheckboxChoice, {
40452
+ name: field.id,
40453
+ required: basics.required,
40454
+ label: basics.label,
40455
+ presentation: type === "consent" ? "tile" : "row"
40456
+ });
40457
+ }
40458
+ default: return /* @__PURE__ */ jsx(TextInputField, {
40459
+ field,
40460
+ type
40461
+ });
40462
+ }
40463
+ }
40464
+ var init_form_fields = __esmMin((() => {
40465
+ init_CheckboxChoice();
40466
+ }));
40467
+ //#endregion
39926
40468
  //#region ../blocks/src/system/runtime/nodes/form.server.tsx
39927
40469
  init_clsx();
39928
40470
  init_ThemedButton();
39929
40471
  init_FeedbackMessage();
40472
+ init_form_fields();
39930
40473
  init_form_interactive();
39931
40474
  const FormNodeSSR = ({ blockId, value, submitLabel, successMessage, className, onSubmit, action = "/api/forms/submit", siteId, apiBaseUrl, spamProtectionEnabled }) => {
39932
40475
  const islandProps = buildFormInteractiveIslandProps({
@@ -39950,107 +40493,7 @@ const FormNodeSSR = ({ blockId, value, submitLabel, successMessage, className, o
39950
40493
  })]
39951
40494
  });
39952
40495
  const groups = display.groups;
39953
- const renderField = (field) => {
39954
- const inputId = `f_${field.id}`;
39955
- const label = String(field.label ?? field.id);
39956
- const required = Boolean(field.required);
39957
- const type = String(field.type ?? "text");
39958
- if (type === "textarea") return /* @__PURE__ */ jsxs("div", {
39959
- className: "fb-field",
39960
- children: [/* @__PURE__ */ jsx("label", {
39961
- htmlFor: inputId,
39962
- className: "form-label",
39963
- children: label
39964
- }), /* @__PURE__ */ jsx("textarea", {
39965
- id: inputId,
39966
- name: field.id,
39967
- required,
39968
- placeholder: field.placeholder,
39969
- rows: field.rows,
39970
- className: "form-textarea"
39971
- })]
39972
- }, field.id);
39973
- if (type === "select") {
39974
- const options = field.options ?? [];
39975
- const multiple = Boolean(field.multiple);
39976
- return /* @__PURE__ */ jsxs("div", {
39977
- className: "fb-field",
39978
- children: [/* @__PURE__ */ jsx("label", {
39979
- htmlFor: inputId,
39980
- className: "form-label",
39981
- children: label
39982
- }), /* @__PURE__ */ jsxs("select", {
39983
- id: inputId,
39984
- name: field.id,
39985
- multiple,
39986
- required,
39987
- className: "form-select",
39988
- children: [!multiple && /* @__PURE__ */ jsx("option", {
39989
- value: "",
39990
- children: "Select…"
39991
- }), options.map((opt) => /* @__PURE__ */ jsx("option", {
39992
- value: opt.value,
39993
- children: opt.label
39994
- }, opt.value))]
39995
- })]
39996
- }, field.id);
39997
- }
39998
- if (type === "radio") {
39999
- const options = field.options ?? [];
40000
- return /* @__PURE__ */ jsxs("fieldset", {
40001
- className: "fb-fieldset",
40002
- children: [/* @__PURE__ */ jsx("legend", {
40003
- className: "form-label",
40004
- children: label
40005
- }), options.map((opt) => /* @__PURE__ */ jsxs("label", {
40006
- className: "fb-inline form-label",
40007
- children: [/* @__PURE__ */ jsx("input", {
40008
- type: "radio",
40009
- name: field.id,
40010
- value: opt.value,
40011
- required,
40012
- className: "form-radio"
40013
- }), /* @__PURE__ */ jsx("span", { children: opt.label })]
40014
- }, opt.value))]
40015
- }, field.id);
40016
- }
40017
- if (type === "checkbox" || type === "consent") return /* @__PURE__ */ jsxs("label", {
40018
- className: "fb-inline form-label",
40019
- children: [/* @__PURE__ */ jsx("input", {
40020
- type: "checkbox",
40021
- name: field.id,
40022
- required,
40023
- className: "form-checkbox"
40024
- }), /* @__PURE__ */ jsx("span", { children: label })]
40025
- }, field.id);
40026
- const inputType = type === "email" || type === "url" || type === "tel" || type === "number" ? type : "text";
40027
- const extra = {};
40028
- if (inputType === "text" || inputType === "email" || inputType === "url" || inputType === "tel") {
40029
- if (typeof field.minLength === "number") extra.minLength = field.minLength;
40030
- if (typeof field.maxLength === "number") extra.maxLength = field.maxLength;
40031
- if (typeof field.pattern === "string" && field.pattern) extra.pattern = field.pattern;
40032
- }
40033
- if (inputType === "number") {
40034
- if (typeof field.min === "number") extra.min = field.min;
40035
- if (typeof field.max === "number") extra.max = field.max;
40036
- }
40037
- return /* @__PURE__ */ jsxs("div", {
40038
- className: "fb-field",
40039
- children: [/* @__PURE__ */ jsx("label", {
40040
- htmlFor: inputId,
40041
- className: "form-label",
40042
- children: label
40043
- }), /* @__PURE__ */ jsx("input", {
40044
- id: inputId,
40045
- name: field.id,
40046
- type: inputType,
40047
- required,
40048
- placeholder: field.placeholder,
40049
- ...extra,
40050
- className: "form-input"
40051
- })]
40052
- }, field.id);
40053
- };
40496
+ const renderField = (field) => /* @__PURE__ */ jsx(FormFieldControl, { field }, field.id);
40054
40497
  return /* @__PURE__ */ jsxs("div", {
40055
40498
  ...getIslandRootProps("form", blockId),
40056
40499
  children: [/* @__PURE__ */ jsx(IslandPropsScript, { value: islandProps }), /* @__PURE__ */ jsxs("form", {
@@ -40096,9 +40539,173 @@ const FormNodeSSR = ({ blockId, value, submitLabel, successMessage, className, o
40096
40539
  });
40097
40540
  };
40098
40541
  //#endregion
40542
+ //#region ../blocks/src/system/runtime/shared/components/FieldValidationMessage.tsx
40543
+ function getFieldValidationControlProps({ message, messageId, describedBy }) {
40544
+ const hasMessage = Boolean(message);
40545
+ const ariaDescribedBy = [describedBy, hasMessage ? messageId : void 0].filter((part) => typeof part === "string" && part.length > 0).join(" ");
40546
+ return {
40547
+ "aria-invalid": hasMessage ? "true" : void 0,
40548
+ "aria-describedby": ariaDescribedBy || void 0
40549
+ };
40550
+ }
40551
+ function FieldValidationMessage({ id, children, className, live = "assertive" }) {
40552
+ return /* @__PURE__ */ jsx("p", {
40553
+ id,
40554
+ className,
40555
+ "data-field-validation-message": true,
40556
+ "data-field-validation-tone": "error",
40557
+ role: "alert",
40558
+ "aria-live": live === "off" ? void 0 : live,
40559
+ children
40560
+ });
40561
+ }
40562
+ var init_FieldValidationMessage = __esmMin((() => {}));
40563
+ //#endregion
40564
+ //#region ../blocks/src/system/runtime/nodes/newsletter-form.parts.tsx
40565
+ /** Splits the preset's fields into the email (joined with the button) and the rest. */
40566
+ function partitionNewsletterFields(fields) {
40567
+ const email = fields.find((field) => field.type === "email") ?? null;
40568
+ return {
40569
+ email,
40570
+ extra: fields.filter((field) => field !== email)
40571
+ };
40572
+ }
40573
+ function NewsletterExtraField({ field, disabled, error }) {
40574
+ const inputId = inputIdFor(field);
40575
+ const errorId = `${inputId}-error`;
40576
+ return /* @__PURE__ */ jsxs("div", {
40577
+ className: "fb-field newsletter-field",
40578
+ children: [
40579
+ /* @__PURE__ */ jsx("label", {
40580
+ htmlFor: inputId,
40581
+ className: "rb-sr-only",
40582
+ children: field.label
40583
+ }),
40584
+ /* @__PURE__ */ jsx("input", {
40585
+ id: inputId,
40586
+ name: field.id,
40587
+ type: field.type,
40588
+ required: field.required,
40589
+ placeholder: field.placeholder ?? field.label,
40590
+ className: "form-input",
40591
+ disabled,
40592
+ ...getFieldValidationControlProps({
40593
+ message: error,
40594
+ messageId: errorId
40595
+ })
40596
+ }),
40597
+ error ? /* @__PURE__ */ jsx(FieldValidationMessage, {
40598
+ id: errorId,
40599
+ className: "fb-error",
40600
+ children: error
40601
+ }) : null
40602
+ ]
40603
+ });
40604
+ }
40605
+ /** The email field and submit button sharing one input-styled shell. */
40606
+ function NewsletterEmailEntry({ field, buttonVariant, buttonLabel, disabled, error }) {
40607
+ const inputId = inputIdFor(field);
40608
+ const errorId = `${inputId}-error`;
40609
+ return /* @__PURE__ */ jsxs("div", {
40610
+ className: "newsletter-entry",
40611
+ children: [/* @__PURE__ */ jsxs("div", {
40612
+ className: "form-input-group newsletter-entry-group",
40613
+ children: [
40614
+ /* @__PURE__ */ jsx("label", {
40615
+ htmlFor: inputId,
40616
+ className: "rb-sr-only",
40617
+ children: field.label
40618
+ }),
40619
+ /* @__PURE__ */ jsx("input", {
40620
+ id: inputId,
40621
+ name: field.id,
40622
+ type: "email",
40623
+ required: field.required,
40624
+ placeholder: field.placeholder ?? field.label,
40625
+ className: "form-input-group-field",
40626
+ autoComplete: "email",
40627
+ disabled,
40628
+ ...getFieldValidationControlProps({
40629
+ message: error,
40630
+ messageId: errorId
40631
+ })
40632
+ }),
40633
+ /* @__PURE__ */ jsx(ThemedButton, {
40634
+ type: "submit",
40635
+ variant: buttonVariant,
40636
+ size: "md",
40637
+ disabled,
40638
+ label: buttonLabel
40639
+ })
40640
+ ]
40641
+ }), error ? /* @__PURE__ */ jsx(FieldValidationMessage, {
40642
+ id: errorId,
40643
+ className: "fb-error",
40644
+ children: error
40645
+ }) : null]
40646
+ });
40647
+ }
40648
+ /**
40649
+ * The submit action: joined to the email field when the preset has one
40650
+ * (every current preset does), otherwise a plain themed button.
40651
+ */
40652
+ function NewsletterSubmitRow({ emailField, buttonVariant, buttonLabel, disabled, error }) {
40653
+ if (emailField) return /* @__PURE__ */ jsx(NewsletterEmailEntry, {
40654
+ field: emailField,
40655
+ buttonVariant,
40656
+ buttonLabel,
40657
+ disabled,
40658
+ error
40659
+ });
40660
+ return /* @__PURE__ */ jsx("div", {
40661
+ className: "newsletter-submit",
40662
+ children: /* @__PURE__ */ jsx(ThemedButton, {
40663
+ type: "submit",
40664
+ variant: buttonVariant,
40665
+ size: "md",
40666
+ disabled,
40667
+ label: buttonLabel
40668
+ })
40669
+ });
40670
+ }
40671
+ /** Visitor-chosen topics as toggle chips. Real checkboxes underneath. */
40672
+ function NewsletterTopicChips({ choices, disabled, error }) {
40673
+ const errorId = `newsletter_${TOPIC_CHOICE_FIELD_ID}-error`;
40674
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("fieldset", {
40675
+ className: "newsletter-topics",
40676
+ "aria-describedby": error ? errorId : void 0,
40677
+ children: [/* @__PURE__ */ jsx("legend", {
40678
+ className: "newsletter-topics-legend",
40679
+ children: "What would you like to hear about?"
40680
+ }), /* @__PURE__ */ jsx("div", {
40681
+ className: "newsletter-topic-chips",
40682
+ children: choices.map((choice) => /* @__PURE__ */ jsxs("label", {
40683
+ className: "newsletter-topic-chip",
40684
+ children: [/* @__PURE__ */ jsx("input", {
40685
+ type: "checkbox",
40686
+ name: TOPIC_CHOICE_FIELD_ID,
40687
+ value: choice.id,
40688
+ disabled
40689
+ }), /* @__PURE__ */ jsx("span", { children: choice.label })]
40690
+ }, choice.id))
40691
+ })]
40692
+ }), error ? /* @__PURE__ */ jsx(FieldValidationMessage, {
40693
+ id: errorId,
40694
+ className: "fb-error",
40695
+ children: error
40696
+ }) : null] });
40697
+ }
40698
+ var TOPIC_CHOICE_FIELD_ID, inputIdFor;
40699
+ var init_newsletter_form_parts = __esmMin((() => {
40700
+ init_ThemedButton();
40701
+ init_FieldValidationMessage();
40702
+ TOPIC_CHOICE_FIELD_ID = "mailingListChoice";
40703
+ inputIdFor = (field) => `newsletter_${field.id}`;
40704
+ }));
40705
+ //#endregion
40099
40706
  //#region ../blocks/src/system/runtime/nodes/newsletter-form.server.tsx
40100
40707
  init_clsx();
40101
- init_ThemedButton();
40708
+ init_newsletter_form_parts();
40102
40709
  init_newsletter_form_interactive();
40103
40710
  /**
40104
40711
  * Newsletter Form Server Component
@@ -40119,36 +40726,15 @@ function NewsletterFormSSR(props) {
40119
40726
  });
40120
40727
  const display = islandProps.render.display;
40121
40728
  const fields = display.fields;
40729
+ const submissionMessage = newsletterBlockSubmissionMessage(islandProps.render.hydration.target);
40122
40730
  if (display.availability === "unavailable") return /* @__PURE__ */ jsx("div", {
40123
40731
  className: clsx("newsletter-form-ssr", className),
40124
40732
  children: /* @__PURE__ */ jsx("p", {
40125
40733
  role: "status",
40126
- children: "We can’t accept signups right now. Please try again later."
40734
+ children: NEWSLETTER_SIGNUPS_PAUSED_MESSAGE
40127
40735
  })
40128
40736
  });
40129
- const renderField = (field) => {
40130
- const inputId = `newsletter_${field.id}`;
40131
- return /* @__PURE__ */ jsxs("div", {
40132
- className: "fb-field newsletter-field",
40133
- children: [/* @__PURE__ */ jsxs("label", {
40134
- htmlFor: inputId,
40135
- className: "form-label",
40136
- children: [field.label, field.required && /* @__PURE__ */ jsx("span", {
40137
- className: "newsletter-required",
40138
- "aria-hidden": "true",
40139
- children: "*"
40140
- })]
40141
- }), /* @__PURE__ */ jsx("input", {
40142
- id: inputId,
40143
- name: field.id,
40144
- type: field.type,
40145
- required: field.required,
40146
- placeholder: field.placeholder,
40147
- className: "form-input",
40148
- autoComplete: field.type === "email" ? "email" : void 0
40149
- })]
40150
- }, field.id);
40151
- };
40737
+ const { email: emailField, extra: extraFields } = partitionNewsletterFields(fields);
40152
40738
  return /* @__PURE__ */ jsxs("div", {
40153
40739
  ...getIslandRootProps("newsletter-form", blockId),
40154
40740
  className: clsx("newsletter-form-ssr", className),
@@ -40167,30 +40753,20 @@ function NewsletterFormSSR(props) {
40167
40753
  /* @__PURE__ */ jsxs("div", {
40168
40754
  className: "newsletter-form-fields",
40169
40755
  children: [
40170
- fields.map(renderField),
40171
- islandProps.render.hydration.choicePresentation === "visitor_choice" ? /* @__PURE__ */ jsxs("fieldset", {
40172
- className: "fb-fieldset newsletter-topics",
40173
- children: [/* @__PURE__ */ jsx("legend", {
40174
- className: "form-label",
40175
- children: "What would you like to hear about?"
40176
- }), display.choices.map((choice) => /* @__PURE__ */ jsxs("label", {
40177
- className: "fb-inline form-label newsletter-topic-choice",
40178
- children: [/* @__PURE__ */ jsx("input", {
40179
- type: "checkbox",
40180
- name: "mailingListChoice",
40181
- value: choice.id,
40182
- className: "form-checkbox"
40183
- }), /* @__PURE__ */ jsx("span", { children: choice.label })]
40184
- }, choice.id))]
40756
+ islandProps.render.hydration.choicePresentation === "visitor_choice" ? /* @__PURE__ */ jsx(NewsletterTopicChips, { choices: display.choices }) : null,
40757
+ extraFields.length > 0 ? /* @__PURE__ */ jsx("div", {
40758
+ className: "newsletter-extra-fields",
40759
+ children: extraFields.map((field) => /* @__PURE__ */ jsx(NewsletterExtraField, { field }, field.id))
40185
40760
  }) : null,
40186
- /* @__PURE__ */ jsx("div", {
40187
- className: "newsletter-submit",
40188
- children: /* @__PURE__ */ jsx(ThemedButton, {
40189
- type: "submit",
40190
- variant: display.buttonVariant,
40191
- size: "md",
40192
- label: display.buttonLabel
40193
- })
40761
+ /* @__PURE__ */ jsx(NewsletterSubmitRow, {
40762
+ emailField,
40763
+ buttonVariant: display.buttonVariant,
40764
+ buttonLabel: display.buttonLabel,
40765
+ disabled: submissionMessage !== null
40766
+ }),
40767
+ submissionMessage && /* @__PURE__ */ jsx("p", {
40768
+ role: "status",
40769
+ children: submissionMessage
40194
40770
  })
40195
40771
  ]
40196
40772
  }),
@@ -42740,121 +43316,6 @@ function isSpamProtectionEnabled() {
42740
43316
  var init_client = __esmMin((() => {
42741
43317
  init_AltchaWidget();
42742
43318
  }));
42743
- //#endregion
42744
- //#region ../blocks/src/system/runtime/shared/components/CheckIcon.tsx
42745
- function CheckIcon({ className, strokeWidth = 2 }) {
42746
- return /* @__PURE__ */ jsx("svg", {
42747
- fill: "none",
42748
- strokeLinecap: "round",
42749
- strokeLinejoin: "round",
42750
- strokeWidth,
42751
- viewBox: "0 0 24 24",
42752
- stroke: "currentColor",
42753
- className,
42754
- width: "1em",
42755
- height: "1em",
42756
- "aria-hidden": "true",
42757
- children: /* @__PURE__ */ jsx("path", { d: "M5 13l4 4L19 7" })
42758
- });
42759
- }
42760
- var init_CheckIcon$1 = __esmMin((() => {}));
42761
- //#endregion
42762
- //#region ../blocks/src/system/runtime/shared/components/StateIcon.tsx
42763
- /**
42764
- * Circular icon wrapper for terminal state screens (success, error, waitlist, etc.).
42765
- *
42766
- * Layout is provided by shared `rb-state-icon` CSS; color variants are
42767
- * block-scoped by the owning registration surface.
42768
- */
42769
- function StateIcon({ variant, children }) {
42770
- return /* @__PURE__ */ jsx("div", {
42771
- className: `rb-state-icon rb-state-icon--${variant}`,
42772
- "aria-hidden": "true",
42773
- children
42774
- });
42775
- }
42776
- var init_StateIcon = __esmMin((() => {}));
42777
- //#endregion
42778
- //#region ../blocks/src/system/runtime/shared/components/TerminalPanel.tsx
42779
- function joinClasses$1(...parts) {
42780
- return parts.filter((part) => typeof part === "string" && part.length > 0).join(" ");
42781
- }
42782
- function TerminalPanel({ tone, title, titleAs: Title = "h3", body, secondaryBody, icon, actions, className, titleClassName, bodyClassName, secondaryBodyClassName, iconClassName, actionsClassName, role, live }) {
42783
- const resolvedRole = role ?? (tone === "error" ? "alert" : "status");
42784
- const resolvedLive = live ?? (resolvedRole === "alert" ? "assertive" : "polite");
42785
- return /* @__PURE__ */ jsxs("div", {
42786
- className,
42787
- "data-terminal-panel": true,
42788
- "data-terminal-tone": tone,
42789
- role: resolvedRole,
42790
- "aria-live": resolvedLive === "off" ? void 0 : resolvedLive,
42791
- children: [
42792
- icon ? /* @__PURE__ */ jsx("div", {
42793
- className: joinClasses$1(iconClassName),
42794
- "data-terminal-icon": true,
42795
- children: icon
42796
- }) : null,
42797
- /* @__PURE__ */ jsx(Title, {
42798
- className: joinClasses$1(titleClassName),
42799
- "data-terminal-title": true,
42800
- children: title
42801
- }),
42802
- body ? /* @__PURE__ */ jsx("div", {
42803
- className: joinClasses$1(bodyClassName),
42804
- "data-terminal-body": true,
42805
- children: body
42806
- }) : null,
42807
- actions ? /* @__PURE__ */ jsx("div", {
42808
- className: joinClasses$1(actionsClassName),
42809
- "data-terminal-actions": true,
42810
- children: actions
42811
- }) : null,
42812
- secondaryBody ? /* @__PURE__ */ jsx("div", {
42813
- className: joinClasses$1(secondaryBodyClassName),
42814
- "data-terminal-secondary-body": true,
42815
- children: secondaryBody
42816
- }) : null
42817
- ]
42818
- });
42819
- }
42820
- var init_TerminalPanel = __esmMin((() => {}));
42821
- //#endregion
42822
- //#region ../blocks/src/system/runtime/components/booking/SuccessMessage.tsx
42823
- /**
42824
- * SuccessMessage Component
42825
- *
42826
- * Terminal success state after a completed appointment booking.
42827
- * Rendered on the shared registration-surface (see booking-form.client),
42828
- * using the shared TerminalPanel + StateIcon primitives.
42829
- */
42830
- var SuccessMessage;
42831
- var init_SuccessMessage = __esmMin((() => {
42832
- init_CheckIcon$1();
42833
- init_StateIcon();
42834
- init_TerminalPanel();
42835
- SuccessMessage = ({ message, resourceName, className }) => {
42836
- return /* @__PURE__ */ jsx(TerminalPanel, {
42837
- tone: "success",
42838
- title: "Booking confirmed",
42839
- icon: /* @__PURE__ */ jsx(StateIcon, {
42840
- variant: "success",
42841
- children: /* @__PURE__ */ jsx(CheckIcon, { strokeWidth: 3 })
42842
- }),
42843
- body: /* @__PURE__ */ jsx("p", {
42844
- className: "ab-text",
42845
- children: message
42846
- }),
42847
- secondaryBody: resourceName ? /* @__PURE__ */ jsxs("p", {
42848
- className: "ab-text rb-on-surface--muted",
42849
- children: ["Practitioner: ", resourceName]
42850
- }) : null,
42851
- className: ["ab-center", className ?? ""].join(" ").trim(),
42852
- titleClassName: "ab-terminal-title",
42853
- role: "alert",
42854
- live: "polite"
42855
- });
42856
- };
42857
- }));
42858
43319
  var init_helpers = __esmMin((() => {
42859
43320
  new TextEncoder();
42860
43321
  }));
@@ -43467,6 +43928,7 @@ function useBookingSubmission(_siteId) {
43467
43928
  startAt: data.startAt,
43468
43929
  endAt: data.endAt,
43469
43930
  customFields: data.customFields,
43931
+ mailingListOptIn: data.mailingListOptIn,
43470
43932
  timezone: data.timezone,
43471
43933
  customerPassId: data.customerPassId
43472
43934
  }) : await api.submitBooking({
@@ -43476,6 +43938,7 @@ function useBookingSubmission(_siteId) {
43476
43938
  startAt: data.startAt,
43477
43939
  endAt: data.endAt,
43478
43940
  customFields: data.customFields,
43941
+ mailingListOptIn: data.mailingListOptIn,
43479
43942
  timezone: data.timezone,
43480
43943
  discountCode: data.discountCode,
43481
43944
  selectedSlidingAmount: data.selectedSlidingAmount,
@@ -43516,6 +43979,43 @@ var init_useBookingSubmission = __esmMin((() => {
43516
43979
  init_useBookingSubmission_state();
43517
43980
  }));
43518
43981
  //#endregion
43982
+ //#region ../blocks/src/system/runtime/nodes/booking-form.submit-success.ts
43983
+ function completeBookingSubmission(input) {
43984
+ const { data } = input;
43985
+ if (data.type === "checkout_redirect") {
43986
+ if (input.redirect === "auto" && typeof window !== "undefined") input.navigateToCheckout(data.checkoutUrl);
43987
+ return {
43988
+ ok: true,
43989
+ outcome: {
43990
+ kind: "checkout_redirect",
43991
+ checkoutUrl: data.checkoutUrl,
43992
+ sessionId: data.sessionId,
43993
+ ...data.mailingListSignupNote ? { mailingListSignupNote: data.mailingListSignupNote } : {}
43994
+ }
43995
+ };
43996
+ }
43997
+ input.dispatch({
43998
+ type: "feedback-set",
43999
+ feedback: {
44000
+ kind: "success",
44001
+ message: getBookingSuccessMessage(input.successMessage),
44002
+ resourceName: data.appointment.resourceName
44003
+ }
44004
+ });
44005
+ return {
44006
+ ok: true,
44007
+ outcome: {
44008
+ kind: "booked",
44009
+ appointmentId: data.appointment.id,
44010
+ resourceName: data.appointment.resourceName,
44011
+ ...data.mailingListSignupNote ? { mailingListSignupNote: data.mailingListSignupNote } : {}
44012
+ }
44013
+ };
44014
+ }
44015
+ var init_booking_form_submit_success = __esmMin((() => {
44016
+ init_booking_form_state();
44017
+ }));
44018
+ //#endregion
43519
44019
  //#region ../blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.state.ts
43520
44020
  function getDiscountContextKey(context) {
43521
44021
  if (!context) return "disabled";
@@ -44013,6 +44513,43 @@ function clearBookingFieldError(errors, fieldId) {
44013
44513
  }
44014
44514
  var init_booking_form_validationErrors = __esmMin((() => {}));
44015
44515
  //#endregion
44516
+ //#region ../blocks/src/system/runtime/nodes/booking-form.mailing-list-state.ts
44517
+ function bookingFormDataWithEligibleOptIn(data, eligible) {
44518
+ return {
44519
+ ...data,
44520
+ mailingListOptIn: eligible && data.mailingListOptIn === true
44521
+ };
44522
+ }
44523
+ function isBookingContactEvent(event) {
44524
+ return event.type === "field-updated" || event.type === "field-touched" || event.type === "mailing-list-opt-in-set";
44525
+ }
44526
+ function applyBookingContactEvent(state, event) {
44527
+ switch (event.type) {
44528
+ case "field-updated": return {
44529
+ ...state,
44530
+ fieldValues: {
44531
+ ...state.fieldValues,
44532
+ [event.fieldId]: event.value
44533
+ },
44534
+ validationErrors: clearBookingFieldError(clearBookingFormError(state.validationErrors), event.fieldId)
44535
+ };
44536
+ case "field-touched": return {
44537
+ ...state,
44538
+ touchedFields: {
44539
+ ...state.touchedFields,
44540
+ [event.fieldId]: true
44541
+ }
44542
+ };
44543
+ case "mailing-list-opt-in-set": return {
44544
+ ...state,
44545
+ mailingListOptIn: event.checked
44546
+ };
44547
+ }
44548
+ }
44549
+ var init_booking_form_mailing_list_state = __esmMin((() => {
44550
+ init_booking_form_validationErrors();
44551
+ }));
44552
+ //#endregion
44016
44553
  //#region ../blocks/src/system/runtime/nodes/booking-form.field-values.ts
44017
44554
  function collectInitialBookingFieldValues(initialData) {
44018
44555
  const values = {};
@@ -44041,6 +44578,7 @@ function createInitialBookingFlowReducerState(input) {
44041
44578
  selectedDate: toOptionalString(initialData.selectedDate),
44042
44579
  selectedSlot: null,
44043
44580
  fieldValues: collectInitialBookingFieldValues(initialData),
44581
+ mailingListOptIn: initialData.mailingListOptIn === true,
44044
44582
  touchedFields: {},
44045
44583
  attemptedStepIds: {},
44046
44584
  discountCode: toOptionalString(initialData.discountCode) ?? "",
@@ -44090,6 +44628,7 @@ function applyAvailabilitySelectionInvalidation(state, invalidation) {
44090
44628
  };
44091
44629
  }
44092
44630
  function bookingFlowReducer(state, event) {
44631
+ if (isBookingContactEvent(event)) return applyBookingContactEvent(state, event);
44093
44632
  switch (event.type) {
44094
44633
  case "service-selected": return applyBookingServiceSelection(state, event.serviceId);
44095
44634
  case "resource-selected": return {
@@ -44112,21 +44651,6 @@ function bookingFlowReducer(state, event) {
44112
44651
  feedback: clearAvailabilityFeedback(state.feedback),
44113
44652
  validationErrors: clearBookingFormError(state.validationErrors)
44114
44653
  };
44115
- case "field-updated": return {
44116
- ...state,
44117
- fieldValues: {
44118
- ...state.fieldValues,
44119
- [event.fieldId]: event.value
44120
- },
44121
- validationErrors: clearBookingFieldError(clearBookingFormError(state.validationErrors), event.fieldId)
44122
- };
44123
- case "field-touched": return {
44124
- ...state,
44125
- touchedFields: {
44126
- ...state.touchedFields,
44127
- [event.fieldId]: true
44128
- }
44129
- };
44130
44654
  case "step-advance-attempted": return state.attemptedStepIds[event.stepId] ? state : {
44131
44655
  ...state,
44132
44656
  attemptedStepIds: {
@@ -44264,6 +44788,7 @@ function deriveBookingSlotDisplayOptions(input) {
44264
44788
  function toBookingFormData(state) {
44265
44789
  return {
44266
44790
  ...state.fieldValues,
44791
+ mailingListOptIn: state.mailingListOptIn,
44267
44792
  serviceId: state.selectedServiceId,
44268
44793
  resourceId: state.selectedResourceId ?? state.selectedSlot?.resourceId,
44269
44794
  selectedDate: state.selectedDate,
@@ -44526,10 +45051,7 @@ function buildBookingSubmitPlan(input) {
44526
45051
  };
44527
45052
  const prepared = prepareBookingSubmission({
44528
45053
  formId: input.formId,
44529
- data: toBookingFormData({
44530
- ...input.state,
44531
- altchaSolution: input.altchaSolution ?? input.state.altchaSolution
44532
- }),
45054
+ data: bookingFormDataWithEligibleOptIn(toBookingFormData(input.state), Boolean(input.mailingListEligible)),
44533
45055
  services: input.services,
44534
45056
  defaultServiceId: input.defaultServiceId,
44535
45057
  defaultResourceId: input.defaultResourceId,
@@ -44677,6 +45199,7 @@ var init_booking_form_headless_state = __esmMin((() => {
44677
45199
  init_dist$1();
44678
45200
  init_booking_form_state();
44679
45201
  init_booking_form_service_categories();
45202
+ init_booking_form_mailing_list_state();
44680
45203
  init_booking_form_validationErrors();
44681
45204
  init_booking_form_field_values();
44682
45205
  unsafeAsBookingFieldId = (id) => id;
@@ -44730,6 +45253,8 @@ function useHeadlessBookingFlow(options) {
44730
45253
  const canLoadAppointmentPackages = Boolean(options.enableAppointmentPackages && hasPortalBearerAuth && selectedService && !selectedServiceSlidingScale && (selectedService.priceAmount ?? 0) > 0);
44731
45254
  const appointmentPackagesUnavailableReason = !options.enableAppointmentPackages ? "disabled" : !selectedService || selectedServiceSlidingScale || (selectedService.priceAmount ?? 0) <= 0 ? "missing-priced-service" : !hasPortalBearerAuth ? "missing-portal-auth" : null;
44732
45255
  const data = useMemo(() => toBookingFormData(state), [state]);
45256
+ const mailingList = resolveBookingSignupOffer(options.mailingList, options.siteName);
45257
+ const mailingListEligible = mailingList !== null;
44733
45258
  const availabilityDatesQuery = useMemo(() => buildBookingAvailabilityQuery({
44734
45259
  serviceId: selectedServiceId,
44735
45260
  resourceId: selectedResourceId,
@@ -44990,7 +45515,8 @@ function useHeadlessBookingFlow(options) {
44990
45515
  viewerTimeZone: latest.viewerTimeZone,
44991
45516
  redirect: submitOptions?.redirect ?? "manual",
44992
45517
  successUrl: submitOptions?.successUrl,
44993
- cancelUrl: submitOptions?.cancelUrl
45518
+ cancelUrl: submitOptions?.cancelUrl,
45519
+ mailingListEligible
44994
45520
  });
44995
45521
  if (!plan.ok) {
44996
45522
  dispatch({
@@ -45023,37 +45549,18 @@ function useHeadlessBookingFlow(options) {
45023
45549
  message: result.error
45024
45550
  };
45025
45551
  }
45026
- if (result.data.type === "checkout_redirect") {
45027
- if (plan.redirect === "auto" && typeof window !== "undefined") latest.navigateToCheckout(result.data.checkoutUrl);
45028
- return {
45029
- ok: true,
45030
- outcome: {
45031
- kind: "checkout_redirect",
45032
- checkoutUrl: result.data.checkoutUrl
45033
- }
45034
- };
45035
- }
45036
- dispatch({
45037
- type: "feedback-set",
45038
- feedback: {
45039
- kind: "success",
45040
- message: getBookingSuccessMessage(latest.successMessage),
45041
- resourceName: result.data.appointment.resourceName
45042
- }
45552
+ return completeBookingSubmission({
45553
+ data: result.data,
45554
+ redirect: plan.redirect,
45555
+ successMessage: latest.successMessage,
45556
+ navigateToCheckout: latest.navigateToCheckout,
45557
+ dispatch
45043
45558
  });
45044
- return {
45045
- ok: true,
45046
- outcome: {
45047
- kind: "booked",
45048
- appointmentId: result.data.appointment.id,
45049
- resourceName: result.data.appointment.resourceName
45050
- }
45051
- };
45052
45559
  } finally {
45053
45560
  submittingRef.current = false;
45054
45561
  dispatch({ type: "submission-finished" });
45055
45562
  }
45056
- }, [latestRef]);
45563
+ }, [latestRef, mailingListEligible]);
45057
45564
  const actions = useMemo(() => ({
45058
45565
  selectService: (serviceId) => dispatch({
45059
45566
  type: "service-selected",
@@ -45076,6 +45583,10 @@ function useHeadlessBookingFlow(options) {
45076
45583
  fieldId: unsafeAsBookingFieldId(fieldId),
45077
45584
  value
45078
45585
  }),
45586
+ setMailingListOptIn: (checked) => dispatch({
45587
+ type: "mailing-list-opt-in-set",
45588
+ checked
45589
+ }),
45079
45590
  markFieldTouched: (fieldId) => dispatch({
45080
45591
  type: "field-touched",
45081
45592
  fieldId: unsafeAsBookingFieldId(fieldId)
@@ -45234,6 +45745,8 @@ function useHeadlessBookingFlow(options) {
45234
45745
  appointmentPackages: appointmentPackagesModel
45235
45746
  };
45236
45747
  return {
45748
+ mailingList,
45749
+ mailingListOptIn: state.mailingListOptIn,
45237
45750
  status,
45238
45751
  view,
45239
45752
  steps: stepState.steps,
@@ -45333,6 +45846,7 @@ var init_useHeadlessBookingFlow = __esmMin((() => {
45333
45846
  init_useAvailableDates();
45334
45847
  init_useAvailableSlots();
45335
45848
  init_useBookingSubmission();
45849
+ init_booking_form_submit_success();
45336
45850
  init_useDiscountCodeUi();
45337
45851
  init_date_formatting();
45338
45852
  init_bookingPaymentOptions();
@@ -45804,6 +46318,24 @@ var init_TimeSlotSelector = __esmMin((() => {
45804
46318
  };
45805
46319
  }));
45806
46320
  //#endregion
46321
+ //#region ../blocks/src/system/runtime/shared/components/CheckIcon.tsx
46322
+ function CheckIcon({ className, strokeWidth = 2 }) {
46323
+ return /* @__PURE__ */ jsx("svg", {
46324
+ fill: "none",
46325
+ strokeLinecap: "round",
46326
+ strokeLinejoin: "round",
46327
+ strokeWidth,
46328
+ viewBox: "0 0 24 24",
46329
+ stroke: "currentColor",
46330
+ className,
46331
+ width: "1em",
46332
+ height: "1em",
46333
+ "aria-hidden": "true",
46334
+ children: /* @__PURE__ */ jsx("path", { d: "M5 13l4 4L19 7" })
46335
+ });
46336
+ }
46337
+ var init_CheckIcon$1 = __esmMin((() => {}));
46338
+ //#endregion
45807
46339
  //#region ../blocks/src/system/runtime/shared/components/StepIndicator.tsx
45808
46340
  function buildClassChannels(slot, classPrefix, emitSharedClasses) {
45809
46341
  const classes = [];
@@ -45977,28 +46509,6 @@ var init_DiscountCodeDisclosure = __esmMin((() => {
45977
46509
  };
45978
46510
  }));
45979
46511
  //#endregion
45980
- //#region ../blocks/src/system/runtime/shared/components/FieldValidationMessage.tsx
45981
- function getFieldValidationControlProps({ message, messageId, describedBy }) {
45982
- const hasMessage = Boolean(message);
45983
- const ariaDescribedBy = [describedBy, hasMessage ? messageId : void 0].filter((part) => typeof part === "string" && part.length > 0).join(" ");
45984
- return {
45985
- "aria-invalid": hasMessage ? "true" : void 0,
45986
- "aria-describedby": ariaDescribedBy || void 0
45987
- };
45988
- }
45989
- function FieldValidationMessage({ id, children, className, live = "assertive" }) {
45990
- return /* @__PURE__ */ jsx("p", {
45991
- id,
45992
- className,
45993
- "data-field-validation-message": true,
45994
- "data-field-validation-tone": "error",
45995
- role: "alert",
45996
- "aria-live": live === "off" ? void 0 : live,
45997
- children
45998
- });
45999
- }
46000
- var init_FieldValidationMessage = __esmMin((() => {}));
46001
- //#endregion
46002
46512
  //#region ../blocks/src/system/runtime/shared/components/BookingConsentAgreement.tsx
46003
46513
  function BookingConsentAgreement({ agreement, showTitle = true, title, titleId }) {
46004
46514
  return /* @__PURE__ */ jsxs(Fragment, { children: [showTitle ? /* @__PURE__ */ jsxs("div", {
@@ -46023,6 +46533,28 @@ var init_BookingConsentAgreement = __esmMin((() => {
46023
46533
  init_RichText();
46024
46534
  }));
46025
46535
  //#endregion
46536
+ //#region ../blocks/src/system/runtime/nodes/booking-form.mailing-list-choice.tsx
46537
+ function BookingMailingListChoice({ booking }) {
46538
+ const id = React.useId();
46539
+ if (!booking.mailingList) return null;
46540
+ return /* @__PURE__ */ jsxs("div", {
46541
+ className: "rb-space-y-2",
46542
+ children: [/* @__PURE__ */ jsx(CheckboxChoice, {
46543
+ id,
46544
+ name: "mailingListOptIn",
46545
+ checked: booking.mailingListOptIn,
46546
+ onChange: (event) => booking.actions.setMailingListOptIn(event.target.checked),
46547
+ label: `Email me news and updates from ${booking.mailingList.siteName}.`
46548
+ }), /* @__PURE__ */ jsx("p", {
46549
+ className: "rb-caption status-muted",
46550
+ children: "Optional. You can unsubscribe at any time."
46551
+ })]
46552
+ });
46553
+ }
46554
+ var init_booking_form_mailing_list_choice = __esmMin((() => {
46555
+ init_CheckboxChoice();
46556
+ }));
46557
+ //#endregion
46026
46558
  //#region ../blocks/src/system/runtime/nodes/booking-form.service-choices.tsx
46027
46559
  function optionCardClassName(isSelected) {
46028
46560
  return `rb-option-card${isSelected ? " rb-option-card--selected" : ""}`;
@@ -46507,12 +47039,17 @@ function PaymentOptionContent({ description, helperText, id, summaryRows, title
46507
47039
  });
46508
47040
  }
46509
47041
  function DefaultDynamicFields({ booking, fields }) {
47042
+ const lastContactIndex = fields.reduce((last, field, index) => [
47043
+ "name",
47044
+ "email",
47045
+ "phone"
47046
+ ].includes(field.id) ? index : last, -1);
46510
47047
  return /* @__PURE__ */ jsx("div", {
46511
47048
  className: "rb-space-y-6",
46512
- children: fields.map((field) => /* @__PURE__ */ jsx(DefaultDynamicField, {
47049
+ children: fields.map((field, index) => /* @__PURE__ */ jsxs(React.Fragment, { children: [/* @__PURE__ */ jsx(DefaultDynamicField, {
46513
47050
  booking,
46514
47051
  field
46515
- }, field.id))
47052
+ }), index === lastContactIndex && booking.mailingList ? /* @__PURE__ */ jsx(BookingMailingListChoice, { booking }) : null] }, field.id))
46516
47053
  });
46517
47054
  }
46518
47055
  function DefaultDynamicField({ booking, field }) {
@@ -46613,7 +47150,7 @@ function DefaultFieldInput({ describedBy, error, errorId, field, onBlur, onChang
46613
47150
  case "radio": return /* @__PURE__ */ jsx("div", {
46614
47151
  className: "rb-space-y-2",
46615
47152
  children: field.field.options?.map((option) => /* @__PURE__ */ jsxs("label", {
46616
- className: "rb-flex rb-items-center rb-gap-2 rb-cursor-pointer",
47153
+ className: "form-check",
46617
47154
  children: [/* @__PURE__ */ jsx("input", {
46618
47155
  type: "radio",
46619
47156
  name: field.id,
@@ -46625,7 +47162,7 @@ function DefaultFieldInput({ describedBy, error, errorId, field, onBlur, onChang
46625
47162
  ...validationProps,
46626
47163
  className: "form-radio"
46627
47164
  }), /* @__PURE__ */ jsx("span", {
46628
- className: "rb-caption",
47165
+ className: "form-check-label",
46629
47166
  children: option.label
46630
47167
  })]
46631
47168
  }, option.value))
@@ -46635,47 +47172,20 @@ function DefaultFieldInput({ describedBy, error, errorId, field, onBlur, onChang
46635
47172
  const checkedValues = toStringArray(value);
46636
47173
  return /* @__PURE__ */ jsx("div", {
46637
47174
  className: "rb-space-y-2",
46638
- children: field.field.options.map((option) => /* @__PURE__ */ jsxs("label", {
46639
- className: "rb-flex rb-items-center rb-gap-2 rb-cursor-pointer",
46640
- children: [/* @__PURE__ */ jsx("input", {
46641
- type: "checkbox",
46642
- name: field.id,
46643
- value: option.value,
46644
- checked: checkedValues.includes(option.value),
46645
- onChange: (event) => {
46646
- onChange(event.target.checked ? [...checkedValues, option.value] : checkedValues.filter((item) => item !== option.value));
46647
- },
46648
- onBlur,
46649
- ...validationProps,
46650
- className: "form-checkbox"
46651
- }), /* @__PURE__ */ jsx("span", {
46652
- className: "rb-caption",
46653
- children: option.label
46654
- })]
47175
+ children: field.field.options.map((option) => /* @__PURE__ */ jsx(CheckboxChoice, {
47176
+ name: field.id,
47177
+ value: option.value,
47178
+ checked: checkedValues.includes(option.value),
47179
+ onChange: (event) => {
47180
+ onChange(event.target.checked ? [...checkedValues, option.value] : checkedValues.filter((item) => item !== option.value));
47181
+ },
47182
+ onBlur,
47183
+ ...validationProps,
47184
+ label: option.label
46655
47185
  }, option.value))
46656
47186
  });
46657
47187
  }
46658
- return /* @__PURE__ */ jsxs("label", {
46659
- className: "rb-flex rb-items-center rb-gap-2 rb-cursor-pointer",
46660
- children: [/* @__PURE__ */ jsx("input", {
46661
- type: "checkbox",
46662
- id: field.inputId,
46663
- name: field.id,
46664
- checked: Boolean(value),
46665
- onChange: (event) => onChange(event.target.checked),
46666
- onBlur,
46667
- required: field.required,
46668
- ...validationProps,
46669
- className: "form-checkbox"
46670
- }), /* @__PURE__ */ jsx("span", {
46671
- className: "rb-caption",
46672
- children: field.field.placeholder || field.label
46673
- })]
46674
- });
46675
- case "booking_requirement_consent": return /* @__PURE__ */ jsxs("label", {
46676
- className: "rb-flex rb-items-start rb-gap-2 rb-cursor-pointer",
46677
- children: [/* @__PURE__ */ jsx("input", {
46678
- type: "checkbox",
47188
+ return /* @__PURE__ */ jsx(CheckboxChoice, {
46679
47189
  id: field.inputId,
46680
47190
  name: field.id,
46681
47191
  checked: Boolean(value),
@@ -46683,11 +47193,18 @@ function DefaultFieldInput({ describedBy, error, errorId, field, onBlur, onChang
46683
47193
  onBlur,
46684
47194
  required: field.required,
46685
47195
  ...validationProps,
46686
- className: "form-checkbox rb-mt-0.5"
46687
- }), /* @__PURE__ */ jsx("span", {
46688
- className: "rb-caption",
46689
- children: field.field.checkboxLabel
46690
- })]
47196
+ label: field.field.placeholder || field.label
47197
+ });
47198
+ case "booking_requirement_consent": return /* @__PURE__ */ jsx(CheckboxChoice, {
47199
+ id: field.inputId,
47200
+ name: field.id,
47201
+ checked: Boolean(value),
47202
+ onChange: (event) => onChange(event.target.checked),
47203
+ onBlur,
47204
+ required: field.required,
47205
+ ...validationProps,
47206
+ label: field.field.checkboxLabel,
47207
+ presentation: "tile"
46691
47208
  });
46692
47209
  case "number": return /* @__PURE__ */ jsx("input", {
46693
47210
  ...commonProps,
@@ -46816,6 +47333,8 @@ var init_booking_form_default_ui = __esmMin((() => {
46816
47333
  init_DiscountCodeDisclosure();
46817
47334
  init_FieldValidationMessage();
46818
47335
  init_BookingConsentAgreement();
47336
+ init_booking_form_mailing_list_choice();
47337
+ init_CheckboxChoice();
46819
47338
  init_booking_form_service_choices();
46820
47339
  }));
46821
47340
  //#endregion
@@ -47041,12 +47560,12 @@ function CrossIcon({ className, strokeWidth = 2 }) {
47041
47560
  var init_CrossIcon = __esmMin((() => {}));
47042
47561
  //#endregion
47043
47562
  //#region ../blocks/src/system/runtime/shared/components/ActionRow.tsx
47044
- function joinClasses(...parts) {
47563
+ function joinClasses$1(...parts) {
47045
47564
  return parts.filter((part) => typeof part === "string" && part.length > 0).join(" ");
47046
47565
  }
47047
47566
  function ActionRow({ children, className, align = "start" }) {
47048
47567
  return /* @__PURE__ */ jsx("div", {
47049
- className: joinClasses("rb-flex rb-flex-wrap rb-items-center rb-gap-2", alignmentClasses[align], className),
47568
+ className: joinClasses$1("rb-flex rb-flex-wrap rb-items-center rb-gap-2", alignmentClasses[align], className),
47050
47569
  "data-action-row": true,
47051
47570
  children
47052
47571
  });
@@ -47083,6 +47602,22 @@ function LoggedInAsUser({ email, onLogout, classPrefix }) {
47083
47602
  });
47084
47603
  }
47085
47604
  var init_LoggedInAsUser = __esmMin((() => {}));
47605
+ //#endregion
47606
+ //#region ../blocks/src/system/runtime/shared/components/StateIcon.tsx
47607
+ /**
47608
+ * Circular icon wrapper for terminal state screens (success, error, waitlist, etc.).
47609
+ *
47610
+ * Layout is provided by shared `rb-state-icon` CSS; color variants are
47611
+ * block-scoped by the owning registration surface.
47612
+ */
47613
+ function StateIcon({ variant, children }) {
47614
+ return /* @__PURE__ */ jsx("div", {
47615
+ className: `rb-state-icon rb-state-icon--${variant}`,
47616
+ "aria-hidden": "true",
47617
+ children
47618
+ });
47619
+ }
47620
+ var init_StateIcon = __esmMin((() => {}));
47086
47621
  var init_MembershipHero$1 = __esmMin((() => {
47087
47622
  init_FeedbackMessage();
47088
47623
  }));
@@ -47245,6 +47780,50 @@ var init_TabBarFragment = __esmMin((() => {
47245
47780
  init_clsx();
47246
47781
  }));
47247
47782
  //#endregion
47783
+ //#region ../blocks/src/system/runtime/shared/components/TerminalPanel.tsx
47784
+ function joinClasses(...parts) {
47785
+ return parts.filter((part) => typeof part === "string" && part.length > 0).join(" ");
47786
+ }
47787
+ function TerminalPanel({ tone, title, titleAs: Title = "h3", body, secondaryBody, icon, actions, className, titleClassName, bodyClassName, secondaryBodyClassName, iconClassName, actionsClassName, role, live }) {
47788
+ const resolvedRole = role ?? (tone === "error" ? "alert" : "status");
47789
+ const resolvedLive = live ?? (resolvedRole === "alert" ? "assertive" : "polite");
47790
+ return /* @__PURE__ */ jsxs("div", {
47791
+ className,
47792
+ "data-terminal-panel": true,
47793
+ "data-terminal-tone": tone,
47794
+ role: resolvedRole,
47795
+ "aria-live": resolvedLive === "off" ? void 0 : resolvedLive,
47796
+ children: [
47797
+ icon ? /* @__PURE__ */ jsx("div", {
47798
+ className: joinClasses(iconClassName),
47799
+ "data-terminal-icon": true,
47800
+ children: icon
47801
+ }) : null,
47802
+ /* @__PURE__ */ jsx(Title, {
47803
+ className: joinClasses(titleClassName),
47804
+ "data-terminal-title": true,
47805
+ children: title
47806
+ }),
47807
+ body ? /* @__PURE__ */ jsx("div", {
47808
+ className: joinClasses(bodyClassName),
47809
+ "data-terminal-body": true,
47810
+ children: body
47811
+ }) : null,
47812
+ actions ? /* @__PURE__ */ jsx("div", {
47813
+ className: joinClasses(actionsClassName),
47814
+ "data-terminal-actions": true,
47815
+ children: actions
47816
+ }) : null,
47817
+ secondaryBody ? /* @__PURE__ */ jsx("div", {
47818
+ className: joinClasses(secondaryBodyClassName),
47819
+ "data-terminal-secondary-body": true,
47820
+ children: secondaryBody
47821
+ }) : null
47822
+ ]
47823
+ });
47824
+ }
47825
+ var init_TerminalPanel = __esmMin((() => {}));
47826
+ //#endregion
47248
47827
  //#region ../blocks/src/system/runtime/shared/components/SelectableOptionCard.tsx
47249
47828
  function SelectableOptionCard(props) {
47250
47829
  const { baseClassName, selectedClassName, disabledClassName, iconClassName, labelClassName, detailClassName, icon, label, detail, selected, disabled, tooltip, extraClassNames = [], onClick, renderCheck, renderDisabledTooltip } = props;
@@ -47282,6 +47861,7 @@ var init_SelectableOptionCard = __esmMin((() => {}));
47282
47861
  //#endregion
47283
47862
  //#region ../blocks/src/system/runtime/shared/components/index.ts
47284
47863
  var init_components = __esmMin((() => {
47864
+ init_CheckboxChoice();
47285
47865
  init_CheckIcon$1();
47286
47866
  init_ClockIcon();
47287
47867
  init_CrossIcon();
@@ -47307,6 +47887,140 @@ var init_shared = __esmMin((() => {
47307
47887
  init_components();
47308
47888
  }));
47309
47889
  //#endregion
47890
+ //#region ../blocks/src/system/runtime/components/booking/SuccessMessage.tsx
47891
+ /**
47892
+ * SuccessMessage Component
47893
+ *
47894
+ * Terminal success state after a completed appointment booking.
47895
+ * Rendered on the shared registration-surface (see booking-form.client),
47896
+ * using the shared TerminalPanel + StateIcon primitives.
47897
+ */
47898
+ var SuccessMessage;
47899
+ var init_SuccessMessage = __esmMin((() => {
47900
+ init_CheckIcon$1();
47901
+ init_StateIcon();
47902
+ init_TerminalPanel();
47903
+ SuccessMessage = ({ message, resourceName, className }) => {
47904
+ return /* @__PURE__ */ jsx(TerminalPanel, {
47905
+ tone: "success",
47906
+ title: "Booking confirmed",
47907
+ icon: /* @__PURE__ */ jsx(StateIcon, {
47908
+ variant: "success",
47909
+ children: /* @__PURE__ */ jsx(CheckIcon, { strokeWidth: 3 })
47910
+ }),
47911
+ body: /* @__PURE__ */ jsx("p", {
47912
+ className: "ab-text",
47913
+ children: message
47914
+ }),
47915
+ secondaryBody: resourceName ? /* @__PURE__ */ jsxs("p", {
47916
+ className: "ab-text rb-on-surface--muted",
47917
+ children: ["Practitioner: ", resourceName]
47918
+ }) : null,
47919
+ className: ["ab-center", className ?? ""].join(" ").trim(),
47920
+ titleClassName: "ab-terminal-title",
47921
+ role: "alert",
47922
+ live: "polite"
47923
+ });
47924
+ };
47925
+ }));
47926
+ //#endregion
47927
+ //#region ../blocks/src/system/runtime/shared/mailingListSignupCopy.ts
47928
+ function getBookingMailingListNoteCopy(note, context) {
47929
+ if (note === "confirmation_required") return {
47930
+ title: MAILING_LIST_CONFIRMATION_MESSAGE,
47931
+ detail: context === "booking" ? "This is separate from your booking confirmation." : null
47932
+ };
47933
+ return {
47934
+ title: "We couldn’t confirm your mailing-list signup.",
47935
+ detail: context === "booking" ? "This does not affect your booking." : null
47936
+ };
47937
+ }
47938
+ var MAILING_LIST_CONFIRMATION_MESSAGE;
47939
+ var init_mailingListSignupCopy = __esmMin((() => {
47940
+ MAILING_LIST_CONFIRMATION_MESSAGE = "Please check your inbox to confirm your signup.";
47941
+ }));
47942
+ //#endregion
47943
+ //#region ../blocks/src/system/runtime/shared/components/BookingMailingListNote.tsx
47944
+ function BookingMailingListNote(props) {
47945
+ const copy = getBookingMailingListNoteCopy(props.note, props.context);
47946
+ return /* @__PURE__ */ jsxs("div", {
47947
+ role: "status",
47948
+ className: props.className,
47949
+ children: [/* @__PURE__ */ jsx("p", { children: copy.title }), copy.detail ? /* @__PURE__ */ jsx("p", { children: copy.detail }) : null]
47950
+ });
47951
+ }
47952
+ var init_BookingMailingListNote = __esmMin((() => {
47953
+ init_mailingListSignupCopy();
47954
+ }));
47955
+ //#endregion
47956
+ //#region ../blocks/src/system/runtime/nodes/booking-form.mailing-list-note.ts
47957
+ function storageKey$1(sessionId) {
47958
+ return `riverbank:booking:mailing-list:${sessionId}`;
47959
+ }
47960
+ function saveAppointmentMailingListNote(sessionId, note) {
47961
+ if (!note) return;
47962
+ try {
47963
+ window.sessionStorage.setItem(storageKey$1(sessionId), note);
47964
+ } catch {}
47965
+ }
47966
+ function readAppointmentMailingListNote(sessionId) {
47967
+ try {
47968
+ const stored = window.sessionStorage.getItem(storageKey$1(sessionId));
47969
+ return stored === "confirmation_required" || stored === "not_confirmed" ? stored : null;
47970
+ } catch {
47971
+ return null;
47972
+ }
47973
+ }
47974
+ var init_booking_form_mailing_list_note = __esmMin((() => {}));
47975
+ //#endregion
47976
+ //#region ../blocks/src/system/runtime/nodes/booking-form.completion.tsx
47977
+ function BookingFormCompletion({ resourceName, successMessage, redirectState, localNote }) {
47978
+ const note = redirectState.kind === "success" ? readAppointmentMailingListNote(redirectState.sessionId) : localNote;
47979
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SuccessMessage, {
47980
+ message: getBookingSuccessMessage(successMessage),
47981
+ resourceName
47982
+ }), note ? /* @__PURE__ */ jsx(BookingMailingListNote, {
47983
+ note,
47984
+ context: "booking",
47985
+ className: "rb-mt-4"
47986
+ }) : null] });
47987
+ }
47988
+ var init_booking_form_completion = __esmMin((() => {
47989
+ init_SuccessMessage();
47990
+ init_BookingMailingListNote();
47991
+ init_booking_form_state();
47992
+ init_booking_form_mailing_list_note();
47993
+ }));
47994
+ //#endregion
47995
+ //#region ../blocks/src/system/runtime/nodes/booking-form.submit-handler.ts
47996
+ function appendRebookFlag(url, enabled) {
47997
+ if (!enabled) return url;
47998
+ const nextUrl = new URL(url);
47999
+ nextUrl.searchParams.set("rebook", "1");
48000
+ return nextUrl.toString();
48001
+ }
48002
+ function createBookingFormSubmitHandler(input) {
48003
+ return async () => {
48004
+ const { successUrl, cancelUrl } = buildCheckoutReturnUrls("booking", input.bookingAnchorId);
48005
+ const result = await input.booking.actions.submit({
48006
+ redirect: "manual",
48007
+ successUrl: appendRebookFlag(successUrl, input.isPortalRebook),
48008
+ cancelUrl: appendRebookFlag(cancelUrl, input.isPortalRebook)
48009
+ });
48010
+ if (!result.ok) return;
48011
+ if (result.outcome.kind === "checkout_redirect") {
48012
+ saveAppointmentMailingListNote(result.outcome.sessionId, result.outcome.mailingListSignupNote);
48013
+ window.location.href = result.outcome.checkoutUrl;
48014
+ return;
48015
+ }
48016
+ input.setLocalMailingListNote(result.outcome.mailingListSignupNote ?? null);
48017
+ };
48018
+ }
48019
+ var init_booking_form_submit_handler = __esmMin((() => {
48020
+ init_shared();
48021
+ init_booking_form_mailing_list_note();
48022
+ }));
48023
+ //#endregion
47310
48024
  //#region ../blocks/src/system/runtime/nodes/booking-form.client.tsx
47311
48025
  function getBookingRedirectLocationSnapshot() {
47312
48026
  if (typeof window === "undefined") return {
@@ -47318,12 +48032,6 @@ function getBookingRedirectLocationSnapshot() {
47318
48032
  hash: window.location.hash
47319
48033
  };
47320
48034
  }
47321
- function appendRebookFlag(url, enabled) {
47322
- if (!enabled) return url;
47323
- const nextUrl = new URL(url);
47324
- nextUrl.searchParams.set(PORTAL_REBOOK_QUERY_PARAM, PORTAL_REBOOK_QUERY_VALUE);
47325
- return nextUrl.toString();
47326
- }
47327
48035
  /**
47328
48036
  * Themed surface container for every booking view state (wizard, success,
47329
48037
  * verifying). Styled by the shared registration-surface layer.
@@ -47338,12 +48046,11 @@ function BookingSurface({ id, className, children }) {
47338
48046
  function buildBookingFormNodeClientProps(props) {
47339
48047
  return buildBookingFormInteractiveIslandProps(props);
47340
48048
  }
47341
- var PORTAL_REBOOK_QUERY_PARAM, PORTAL_REBOOK_QUERY_VALUE, REBOOK_COMPLETION_MODE_VERIFIED_CHECKOUT, REBOOK_COMPLETION_MODE_BYPASSED, BookingFormClient, BookingFormNodeClient;
48049
+ var REBOOK_COMPLETION_MODE_VERIFIED_CHECKOUT, REBOOK_COMPLETION_MODE_BYPASSED, BookingFormClient, BookingFormNodeClient;
47342
48050
  var init_booking_form_client = __esmMin((() => {
47343
48051
  init_noop();
47344
48052
  init_client();
47345
48053
  init_api$1();
47346
- init_SuccessMessage();
47347
48054
  init_useHeadlessBookingFlow();
47348
48055
  init_useAppointmentCheckoutVerification();
47349
48056
  init_booking_form_state();
@@ -47351,9 +48058,9 @@ var init_booking_form_client = __esmMin((() => {
47351
48058
  init_booking_form_interactive();
47352
48059
  init_shared();
47353
48060
  init_FeedbackMessage();
48061
+ init_booking_form_completion();
48062
+ init_booking_form_submit_handler();
47354
48063
  init_date_formatting();
47355
- PORTAL_REBOOK_QUERY_PARAM = "rebook";
47356
- PORTAL_REBOOK_QUERY_VALUE = "1";
47357
48064
  REBOOK_COMPLETION_MODE_VERIFIED_CHECKOUT = "verified_checkout";
47358
48065
  REBOOK_COMPLETION_MODE_BYPASSED = "bypassed";
47359
48066
  BookingFormClient = ({ siteId: siteIdProp, render }) => {
@@ -47367,12 +48074,16 @@ var init_booking_form_client = __esmMin((() => {
47367
48074
  const isPortalRebook = render.hydration.rebookContext?.kind === "portal_rebook";
47368
48075
  const hasLoggedRebookCompletionRef = useRef(false);
47369
48076
  const [redirectState] = useState(() => getBookingRedirectStateFromLocation(getBookingRedirectLocationSnapshot()));
48077
+ const [localMailingListNote, setLocalMailingListNote] = useState(null);
47370
48078
  const showSpamProtection = render.hydration.spamProtectionEnabled ?? isSpamProtectionEnabled();
47371
48079
  const api = useBlockApi();
47372
48080
  const hasPortalAuth = api.config.auth.type === "bearer" || api.config.authOverrides?.portal?.type === "bearer";
48081
+ const formId = render.hydration.formId ?? form?.id ?? "booking-form";
47373
48082
  const booking = useHeadlessBookingFlow({
48083
+ mailingList: render.hydration.mailingList,
48084
+ siteName: render.hydration.siteName,
47374
48085
  siteId,
47375
- formId: render.hydration.formId ?? form?.id ?? "booking-form",
48086
+ formId,
47376
48087
  form,
47377
48088
  services,
47378
48089
  serviceCategories: render.hydration.serviceCategories,
@@ -47442,22 +48153,20 @@ var init_booking_form_client = __esmMin((() => {
47442
48153
  children: render.display.message ?? "Booking form not found. Please check your configuration."
47443
48154
  })
47444
48155
  });
47445
- const handleComplete = async () => {
47446
- const { successUrl, cancelUrl } = buildCheckoutReturnUrls("booking", bookingAnchorId);
47447
- const result = await booking.actions.submit({
47448
- redirect: "manual",
47449
- successUrl: appendRebookFlag(successUrl, isPortalRebook),
47450
- cancelUrl: appendRebookFlag(cancelUrl, isPortalRebook)
47451
- });
47452
- if (!result.ok) return;
47453
- if (result.outcome.kind === "checkout_redirect") window.location.href = result.outcome.checkoutUrl;
47454
- };
48156
+ const handleComplete = createBookingFormSubmitHandler({
48157
+ booking,
48158
+ bookingAnchorId,
48159
+ isPortalRebook,
48160
+ setLocalMailingListNote
48161
+ });
47455
48162
  if (viewState.kind === "success") return /* @__PURE__ */ jsx(BookingSurface, {
47456
48163
  id: bookingAnchorId,
47457
48164
  className: render.display.className,
47458
- children: /* @__PURE__ */ jsx(SuccessMessage, {
47459
- message: getBookingSuccessMessage(render.display.successMessage),
47460
- resourceName: viewState.resourceName
48165
+ children: /* @__PURE__ */ jsx(BookingFormCompletion, {
48166
+ successMessage: render.display.successMessage,
48167
+ resourceName: viewState.resourceName,
48168
+ redirectState,
48169
+ localNote: localMailingListNote
47461
48170
  })
47462
48171
  });
47463
48172
  if (viewState.kind === "verifying") return /* @__PURE__ */ jsx(BookingSurface, {
@@ -48189,7 +48898,8 @@ function createInitialRegistrationFormData() {
48189
48898
  email: "",
48190
48899
  phone: "",
48191
48900
  notes: "",
48192
- consentAccepted: false
48901
+ consentAccepted: false,
48902
+ mailingListOptIn: false
48193
48903
  };
48194
48904
  }
48195
48905
  function validateFormData(formData, requiresConsent = false) {
@@ -49547,7 +50257,10 @@ async function handleCheckoutReturn(options, deps, returnContextRef) {
49547
50257
  }
49548
50258
  const { checkoutAttemptId } = command;
49549
50259
  const pending = deps.getPendingRegistration(siteId, checkoutAttemptId);
49550
- returnContextRef.current = { checkoutAttemptId };
50260
+ returnContextRef.current = {
50261
+ checkoutAttemptId,
50262
+ mailingListSignupNote: pending?.mailingListSignupNote
50263
+ };
49551
50264
  if (pending) restorePendingPresentation(options, pending);
49552
50265
  options.setStep("verifying-payment");
49553
50266
  try {
@@ -49568,7 +50281,10 @@ function completeVerifiedRegistration(options, deps, returnContext) {
49568
50281
  const siteId = options.api.config.siteId;
49569
50282
  const checkoutAttemptId = returnContext?.checkoutAttemptId;
49570
50283
  if (siteId && checkoutAttemptId) deps.clearPendingRegistration(siteId, checkoutAttemptId);
49571
- options.setRegistrationResult({ status: "confirmed" });
50284
+ options.setRegistrationResult({
50285
+ status: "confirmed",
50286
+ mailingListSignupNote: returnContext?.mailingListSignupNote
50287
+ });
49572
50288
  options.setStep("success");
49573
50289
  }
49574
50290
  function useEventRegistrationStripeReturnWithDeps(options, deps) {
@@ -49675,6 +50391,9 @@ var init_registrationErrorPresentation = __esmMin((() => {
49675
50391
  }));
49676
50392
  //#endregion
49677
50393
  //#region ../blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.ts
50394
+ function wantsMailingListSignup(options) {
50395
+ return options.mailingListSignup !== null && options.formData.mailingListOptIn === true;
50396
+ }
49678
50397
  function createClientCommandId(cryptoSource = {
49679
50398
  randomUUID: globalThis.crypto.randomUUID?.bind(globalThis.crypto),
49680
50399
  getRandomValues: (bytes) => globalThis.crypto.getRandomValues(bytes)
@@ -49768,7 +50487,8 @@ async function completeRegistrationSubmission(options, deps, prepared, result, s
49768
50487
  case "paymentStatusRequired":
49769
50488
  options.setPaymentStatusRecovery({
49770
50489
  kind: "ready",
49771
- subject: result.subject
50490
+ subject: result.subject,
50491
+ mailingListSignupNote: result.mailingListSignupNote
49772
50492
  });
49773
50493
  options.setStep("payment-status");
49774
50494
  return {
@@ -49777,14 +50497,15 @@ async function completeRegistrationSubmission(options, deps, prepared, result, s
49777
50497
  };
49778
50498
  case "checkoutRequired":
49779
50499
  options.setPendingRegistrationReference(result.reference);
49780
- savePendingCheckout(options, deps, prepared, result.submissionId, result.reference);
50500
+ savePendingCheckout(options, deps, prepared, result.submissionId, result.reference, result.mailingListSignupNote);
49781
50501
  options.setStep("redirecting");
49782
50502
  return redirectToCheckout(result.checkoutUrl, submitOptions);
49783
50503
  case "waitlisted":
49784
50504
  options.setRegistrationResult({
49785
50505
  status: "waitlist",
49786
50506
  title: "Added to waitlist",
49787
- message: result.waitlist.message
50507
+ message: result.waitlist.message,
50508
+ mailingListSignupNote: result.mailingListSignupNote
49788
50509
  });
49789
50510
  break;
49790
50511
  case "bookingComplete":
@@ -49792,7 +50513,8 @@ async function completeRegistrationSubmission(options, deps, prepared, result, s
49792
50513
  options.setPendingRegistrationReference(result.reference);
49793
50514
  options.setRegistrationResult({
49794
50515
  status: "confirmed",
49795
- message: result.summary.paymentMethod === "pass" ? result.summary.message : void 0
50516
+ message: result.summary.paymentMethod === "pass" ? result.summary.message : void 0,
50517
+ mailingListSignupNote: result.mailingListSignupNote
49796
50518
  });
49797
50519
  break;
49798
50520
  }
@@ -49851,7 +50573,7 @@ function resolveSelectionSnapshot(method, passId, membershipId, bundleProductId,
49851
50573
  if (method === "free") return { method };
49852
50574
  throw new Error("Choose an available payment option.");
49853
50575
  }
49854
- function savePendingCheckout(options, deps, prepared, checkoutAttemptId, reference) {
50576
+ function savePendingCheckout(options, deps, prepared, checkoutAttemptId, reference, mailingListSignupNote) {
49855
50577
  const siteId = options.api.config.siteId;
49856
50578
  if (!siteId) return;
49857
50579
  deps.savePendingRegistration(siteId, checkoutAttemptId, {
@@ -49860,7 +50582,8 @@ function savePendingCheckout(options, deps, prepared, checkoutAttemptId, referen
49860
50582
  ticketSelections: prepared.ticketSelections,
49861
50583
  selectedEventId: options.registrationTarget?.selectedEventId ?? null,
49862
50584
  selectedAttendanceMode: options.selectedAttendanceMode,
49863
- paymentSelection: prepared.selectionSnapshot
50585
+ paymentSelection: prepared.selectionSnapshot,
50586
+ mailingListSignupNote
49864
50587
  });
49865
50588
  }
49866
50589
  function redirectToCheckout(checkoutUrl, submitOptions) {
@@ -49874,7 +50597,7 @@ function redirectToCheckout(checkoutUrl, submitOptions) {
49874
50597
  };
49875
50598
  }
49876
50599
  function registrationRequestIntentKey(request) {
49877
- const { registrationCommandId: _command, altchaSolution: _proof, checkout, ...intent } = request;
50600
+ const { registrationCommandId: _command, altchaSolution: _proof, mailingListOptIn: _marketingConsent, checkout, ...intent } = request;
49878
50601
  return JSON.stringify({
49879
50602
  ...intent,
49880
50603
  checkout: checkout ? {
@@ -49899,6 +50622,7 @@ function buildRegistrationRequest(options, prepared, method, passId, membershipI
49899
50622
  phone: options.formData.phone.trim() || void 0,
49900
50623
  notes: options.formData.notes.trim() || void 0,
49901
50624
  consentAccepted: options.formData.consentAccepted,
50625
+ mailingListOptIn: wantsMailingListSignup(options),
49902
50626
  altchaSolution: options.altchaSolution,
49903
50627
  paymentMethod: method,
49904
50628
  customerPassId: method === "pass" ? passId : void 0,
@@ -50159,13 +50883,17 @@ function isCheckableRecovery(state) {
50159
50883
  function assistanceRequired(recovery) {
50160
50884
  return {
50161
50885
  kind: "assistanceRequired",
50162
- subject: recovery.subject
50886
+ subject: recovery.subject,
50887
+ mailingListSignupNote: recovery.mailingListSignupNote
50163
50888
  };
50164
50889
  }
50165
50890
  function applyStatusOutcome(outcome, recovery, setters, setRecovery) {
50166
50891
  if (outcome.kind === "resolved") {
50167
50892
  setters.setPendingRegistrationReference(outcome.reference);
50168
- setters.setRegistrationResult({ status: "confirmed" });
50893
+ setters.setRegistrationResult({
50894
+ status: "confirmed",
50895
+ mailingListSignupNote: recovery.mailingListSignupNote
50896
+ });
50169
50897
  setRecovery(null);
50170
50898
  setters.setStep("success");
50171
50899
  return;
@@ -50286,6 +51014,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
50286
51014
  const paymentSelection = flowState.paymentSelection;
50287
51015
  const [selectedEvent, setSelectedEvent] = useState(preSelectedEvent ?? null);
50288
51016
  const [formData, setFormData] = useState(createInitialRegistrationFormData);
51017
+ const mailingListSignup = resolveBookingSignupOffer(options.mailingList, options.siteName);
50289
51018
  const [errors, setErrors] = useState({});
50290
51019
  const [guests, setGuests] = useState([]);
50291
51020
  const [guestErrors, setGuestErrors] = useState({});
@@ -50732,6 +51461,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
50732
51461
  ticketSelections,
50733
51462
  selectedSlidingAmount,
50734
51463
  formData,
51464
+ mailingListSignup,
50735
51465
  altchaSolution,
50736
51466
  requireGuestDetails,
50737
51467
  guests,
@@ -50828,6 +51558,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
50828
51558
  hasValidTicketSelection,
50829
51559
  eventRequiresPayment,
50830
51560
  formData,
51561
+ mailingListSignup,
50831
51562
  setFormData,
50832
51563
  errors,
50833
51564
  guests,
@@ -52284,26 +53015,24 @@ function EventConsentField({ consent, error, formData, idBase, onChange }) {
52284
53015
  title: consent.title,
52285
53016
  titleId: `${idBase}-consent-title`
52286
53017
  }),
52287
- /* @__PURE__ */ jsxs("label", {
52288
- className: "er-label rb-flex rb-items-start rb-gap-2 rb-cursor-pointer",
52289
- children: [
52290
- /* @__PURE__ */ jsx("input", {
52291
- "aria-describedby": error ? errorId : void 0,
52292
- className: "form-checkbox rb-mt-0.5",
52293
- checked: formData.consentAccepted === true,
52294
- onChange: (event) => onChange({
52295
- ...formData,
52296
- consentAccepted: event.target.checked
52297
- }),
52298
- type: "checkbox"
52299
- }),
53018
+ /* @__PURE__ */ jsx(CheckboxChoice, {
53019
+ "aria-describedby": error ? errorId : void 0,
53020
+ "aria-invalid": error ? true : void 0,
53021
+ checked: formData.consentAccepted === true,
53022
+ onChange: (event) => onChange({
53023
+ ...formData,
53024
+ consentAccepted: event.target.checked
53025
+ }),
53026
+ label: /* @__PURE__ */ jsxs(Fragment, { children: [
52300
53027
  consent.checkboxLabel,
52301
53028
  " ",
52302
53029
  /* @__PURE__ */ jsx("span", {
52303
53030
  className: "er-required",
52304
53031
  children: "*"
52305
53032
  })
52306
- ]
53033
+ ] }),
53034
+ presentation: "tile",
53035
+ className: "er-consent-check"
52307
53036
  }),
52308
53037
  error ? /* @__PURE__ */ jsx(FieldValidationMessage, {
52309
53038
  id: errorId,
@@ -52333,13 +53062,32 @@ function NotesField({ id, onChange, value }) {
52333
53062
  })]
52334
53063
  });
52335
53064
  }
53065
+ function MailingListOptInField({ signup, formData, onChange }) {
53066
+ if (!signup) return null;
53067
+ return /* @__PURE__ */ jsxs("div", {
53068
+ className: "er-field",
53069
+ children: [/* @__PURE__ */ jsx(CheckboxChoice, {
53070
+ checked: formData.mailingListOptIn === true,
53071
+ onChange: (event) => onChange({
53072
+ ...formData,
53073
+ mailingListOptIn: event.target.checked
53074
+ }),
53075
+ label: `Email me news and updates from ${signup.siteName}.`,
53076
+ presentation: "row"
53077
+ }), /* @__PURE__ */ jsx("p", {
53078
+ className: "er-text er-text--muted",
53079
+ children: "Optional. You can unsubscribe at any time."
53080
+ })]
53081
+ });
53082
+ }
52336
53083
  var AttendeeDetailsStep;
52337
53084
  var init_AttendeeDetailsStep = __esmMin((() => {
52338
53085
  init_GuestDetailsSection();
52339
53086
  init_LoggedInAsUser();
52340
53087
  init_FieldValidationMessage();
52341
53088
  init_BookingConsentAgreement();
52342
- AttendeeDetailsStep = ({ formData, onChange, errors, emailLocked = false, onLogout, ticketsCount = 1, requireGuestDetails = false, guests = [], onGuestsChange, guestErrors = {}, guestSectionShake = false, onGuestShakeEnd, consent }) => {
53089
+ init_CheckboxChoice();
53090
+ AttendeeDetailsStep = ({ formData, onChange, errors, emailLocked = false, onLogout, ticketsCount = 1, requireGuestDetails = false, guests = [], onGuestsChange, guestErrors = {}, guestSectionShake = false, onGuestShakeEnd, consent, mailingListSignup }) => {
52343
53091
  const idBase = useId();
52344
53092
  const nameId = `${idBase}-name`;
52345
53093
  const emailId = `${idBase}-email`;
@@ -52448,6 +53196,11 @@ var init_AttendeeDetailsStep = __esmMin((() => {
52448
53196
  placeholder: "(optional)"
52449
53197
  })]
52450
53198
  }),
53199
+ /* @__PURE__ */ jsx(MailingListOptInField, {
53200
+ signup: mailingListSignup,
53201
+ formData,
53202
+ onChange
53203
+ }),
52451
53204
  /* @__PURE__ */ jsx(NotesField, {
52452
53205
  id: notesId,
52453
53206
  value: formData.notes,
@@ -107253,7 +108006,8 @@ var init_PaymentSelectionStep = __esmMin((() => {
107253
108006
  var SuccessStep;
107254
108007
  var init_SuccessStep = __esmMin((() => {
107255
108008
  init_shared();
107256
- SuccessStep = ({ title, message, variant = "success" }) => {
108009
+ init_BookingMailingListNote();
108010
+ SuccessStep = ({ title, message, variant = "success", mailingListSignupNote, context = "booking" }) => {
107257
108011
  return /* @__PURE__ */ jsx(TerminalPanel, {
107258
108012
  tone: variant === "info" ? "info" : "success",
107259
108013
  className: "er-center",
@@ -107294,7 +108048,11 @@ var init_SuccessStep = __esmMin((() => {
107294
108048
  })
107295
108049
  }),
107296
108050
  title: title ?? (variant === "info" ? "Already Registered" : "Registration Confirmed!"),
107297
- body: message
108051
+ body: message,
108052
+ secondaryBody: mailingListSignupNote ? /* @__PURE__ */ jsx(BookingMailingListNote, {
108053
+ note: mailingListSignupNote,
108054
+ context
108055
+ }) : void 0
107298
108056
  });
107299
108057
  };
107300
108058
  }));
@@ -107498,7 +108256,8 @@ function AttendeeDetailsContent(props) {
107498
108256
  guestErrors: wizard.guestErrors,
107499
108257
  guestSectionShake: wizard.guestSectionShake,
107500
108258
  onGuestShakeEnd: wizard.handleGuestShakeEnd,
107501
- consent: (wizard.selectedEvent ?? wizard.preSelectedEvent)?.consent ?? null
108259
+ consent: (wizard.selectedEvent ?? wizard.preSelectedEvent)?.consent ?? null,
108260
+ mailingListSignup: wizard.mailingListSignup
107502
108261
  }),
107503
108262
  props.showSpamProtection && /* @__PURE__ */ jsx("div", {
107504
108263
  className: "er-altcha",
@@ -107679,6 +108438,10 @@ function PaymentStatusStep(props) {
107679
108438
  "aria-atomic": "true",
107680
108439
  children: props.state.kind === "checking" ? "Checking payment…" : view.title
107681
108440
  })] }),
108441
+ secondaryBody: props.state.mailingListSignupNote ? /* @__PURE__ */ jsx(BookingMailingListNote, {
108442
+ note: props.state.mailingListSignupNote,
108443
+ context: "booking"
108444
+ }) : void 0,
107682
108445
  actionsClassName: "er-button-group",
107683
108446
  actions: view.action ? /* @__PURE__ */ jsx("button", {
107684
108447
  type: "button",
@@ -107691,6 +108454,7 @@ function PaymentStatusStep(props) {
107691
108454
  }
107692
108455
  var init_PaymentStatusStep = __esmMin((() => {
107693
108456
  init_shared();
108457
+ init_BookingMailingListNote();
107694
108458
  }));
107695
108459
  //#endregion
107696
108460
  //#region ../blocks/src/system/runtime/nodes/event-registration/EventRegistrationSurface.tsx
@@ -107784,11 +108548,10 @@ function EventRegistrationTerminalState(props) {
107784
108548
  onReturnToPayment: wizard.handleReturnToPayment,
107785
108549
  onReturnToBooking: wizard.handleReturnToBooking
107786
108550
  }) : null;
107787
- case "success": return wizard.registrationResult ? /* @__PURE__ */ jsx(SuccessStep, {
107788
- title: wizard.registrationResult.title,
107789
- variant: wizard.registrationResult.variant,
107790
- message: wizard.registrationResult.message ?? props.successMessage
107791
- }) : null;
108551
+ case "success": return /* @__PURE__ */ jsx(EventRegistrationSuccess, {
108552
+ wizard,
108553
+ fallbackMessage: props.successMessage
108554
+ });
107792
108555
  case "error": return /* @__PURE__ */ jsx(ErrorStep, {
107793
108556
  message: wizard.errorMessage,
107794
108557
  action: wizard.errorAction,
@@ -107801,6 +108564,17 @@ function EventRegistrationTerminalState(props) {
107801
108564
  case "select-payment": return null;
107802
108565
  }
107803
108566
  }
108567
+ function EventRegistrationSuccess(props) {
108568
+ const result = props.wizard.registrationResult;
108569
+ if (!result) return null;
108570
+ return /* @__PURE__ */ jsx(SuccessStep, {
108571
+ title: result.title,
108572
+ variant: result.variant,
108573
+ message: result.message ?? props.fallbackMessage,
108574
+ mailingListSignupNote: result.mailingListSignupNote,
108575
+ context: result.status === "waitlist" ? "waitlist" : "booking"
108576
+ });
108577
+ }
107804
108578
  function EventRegistrationSurface(props) {
107805
108579
  const { wizard } = props;
107806
108580
  const mainRef = useRef(null);
@@ -108003,19 +108777,23 @@ function getWizardStepLabel(input) {
108003
108777
  case "payment-failed": return "";
108004
108778
  }
108005
108779
  }
108780
+ function useConfiguredEventRegistrationWizard(props) {
108781
+ return useEventRegistrationWizard({
108782
+ anchorId: EVENT_REGISTRATION_ANCHOR_ID,
108783
+ occurrenceContext: props.occurrenceContext ?? null,
108784
+ subject: props.subject ?? null,
108785
+ events: props.events ?? [],
108786
+ maxTicketsNum: normalizeEventRegistrationMaxTickets(props.maxTickets ?? "5"),
108787
+ mailingList: props.mailingList,
108788
+ siteName: props.siteName
108789
+ });
108790
+ }
108006
108791
  function EventRegistrationWizard(props) {
108007
- const { occurrenceContext, subject, events, maxTickets = "5", showVenue = true, showCapacity = true, successMessage = "Thank you for registering! Check your email for confirmation details.", buttonText = "Complete Registration", buttonVariant = "primary", className, spamProtectionEnabled, supportEmail } = props;
108008
- const maxTicketsNum = normalizeEventRegistrationMaxTickets(maxTickets);
108792
+ const { occurrenceContext, subject, events, showVenue = true, showCapacity = true, successMessage = "Thank you for registering! Check your email for confirmation details.", buttonText = "Complete Registration", buttonVariant = "primary", className, spamProtectionEnabled, supportEmail } = props;
108009
108793
  const showSpamProtection = spamProtectionEnabled ?? isSpamProtectionEnabled();
108010
108794
  const registrationRootClassName = `event-registration ${className || ""}`;
108011
108795
  const registrationRootRef = React.useRef(null);
108012
- const wizard = useEventRegistrationWizard({
108013
- anchorId: EVENT_REGISTRATION_ANCHOR_ID,
108014
- occurrenceContext: occurrenceContext ?? null,
108015
- subject: subject ?? null,
108016
- events: events ?? [],
108017
- maxTicketsNum
108018
- });
108796
+ const wizard = useConfiguredEventRegistrationWizard(props);
108019
108797
  useEventCheckoutHandoffRestore(wizard.step === "redirecting");
108020
108798
  const [bookingOverlayOpen, setBookingOverlayOpen] = useState(false);
108021
108799
  const [floatingPortalRoot, setFloatingPortalRoot] = useState(null);
@@ -113451,14 +114229,6 @@ const AccordionItemNode = ({ className, value, trigger, content, question, answe
113451
114229
  });
113452
114230
  };
113453
114231
  //#endregion
113454
- //#region ../theme-core/src/header/navDropdownSizing.ts
113455
- var NAV_DROPDOWN_SHIFT_PROPERTY, NAV_DROPDOWN_MAX_WIDTH_CSS;
113456
- var init_navDropdownSizing = __esmMin((() => {
113457
- NAV_DROPDOWN_SHIFT_PROPERTY = "--nav-dropdown-shift-x";
113458
- NAV_DROPDOWN_MAX_WIDTH_CSS = `min(22rem, calc(100vw - 2rem))`;
113459
- `${NAV_DROPDOWN_MAX_WIDTH_CSS}`, `${NAV_DROPDOWN_SHIFT_PROPERTY}`;
113460
- }));
113461
- //#endregion
113462
114232
  //#region ../blocks/src/system/runtime/header/HeaderCartDrawer.tsx
113463
114233
  function normalizeQuantityInput(value) {
113464
114234
  const parsed = Number(value);
@@ -116725,6 +117495,7 @@ var init_form_client = __esmMin((() => {
116725
117495
  init_useFormSubmission();
116726
117496
  init_ThemedButton();
116727
117497
  init_FeedbackMessage();
117498
+ init_form_fields();
116728
117499
  FormNodeClient = ({ render }) => {
116729
117500
  const form = render.display.form;
116730
117501
  const { submit, state } = useFormSubmission();
@@ -116737,107 +117508,7 @@ var init_form_client = __esmMin((() => {
116737
117508
  children: "Missing or unknown form."
116738
117509
  });
116739
117510
  const groups = render.display.groups;
116740
- const renderField = (field) => {
116741
- const inputId = `f_${field.id}`;
116742
- const label = String(field.label ?? field.id);
116743
- const required = Boolean(field.required);
116744
- const type = String(field.type ?? "text");
116745
- if (type === "textarea") return /* @__PURE__ */ jsxs("div", {
116746
- className: "fb-field",
116747
- children: [/* @__PURE__ */ jsx("label", {
116748
- htmlFor: inputId,
116749
- className: "form-label",
116750
- children: label
116751
- }), /* @__PURE__ */ jsx("textarea", {
116752
- id: inputId,
116753
- name: field.id,
116754
- required,
116755
- placeholder: field.placeholder,
116756
- rows: field.rows,
116757
- className: "form-textarea"
116758
- })]
116759
- }, field.id);
116760
- if (type === "select") {
116761
- const options = field.options ?? [];
116762
- const multiple = Boolean(field.multiple);
116763
- return /* @__PURE__ */ jsxs("div", {
116764
- className: "fb-field",
116765
- children: [/* @__PURE__ */ jsx("label", {
116766
- htmlFor: inputId,
116767
- className: "form-label",
116768
- children: label
116769
- }), /* @__PURE__ */ jsxs("select", {
116770
- id: inputId,
116771
- name: field.id,
116772
- multiple,
116773
- required,
116774
- className: "form-select",
116775
- children: [!multiple && /* @__PURE__ */ jsx("option", {
116776
- value: "",
116777
- children: "Select…"
116778
- }), options.map((opt) => /* @__PURE__ */ jsx("option", {
116779
- value: opt.value,
116780
- children: opt.label
116781
- }, opt.value))]
116782
- })]
116783
- }, field.id);
116784
- }
116785
- if (type === "radio") {
116786
- const options = field.options ?? [];
116787
- return /* @__PURE__ */ jsxs("fieldset", {
116788
- className: "fb-fieldset",
116789
- children: [/* @__PURE__ */ jsx("legend", {
116790
- className: "form-label",
116791
- children: label
116792
- }), options.map((opt) => /* @__PURE__ */ jsxs("label", {
116793
- className: "fb-inline form-label",
116794
- children: [/* @__PURE__ */ jsx("input", {
116795
- type: "radio",
116796
- name: field.id,
116797
- value: opt.value,
116798
- required,
116799
- className: "form-radio"
116800
- }), /* @__PURE__ */ jsx("span", { children: opt.label })]
116801
- }, opt.value))]
116802
- }, field.id);
116803
- }
116804
- if (type === "checkbox" || type === "consent") return /* @__PURE__ */ jsxs("label", {
116805
- className: "fb-inline form-label",
116806
- children: [/* @__PURE__ */ jsx("input", {
116807
- type: "checkbox",
116808
- name: field.id,
116809
- required,
116810
- className: "form-checkbox"
116811
- }), /* @__PURE__ */ jsx("span", { children: label })]
116812
- }, field.id);
116813
- const inputType = type === "email" || type === "url" || type === "tel" || type === "number" ? type : "text";
116814
- const extra = {};
116815
- if (inputType === "text" || inputType === "email" || inputType === "url" || inputType === "tel") {
116816
- if (typeof field.minLength === "number") extra.minLength = field.minLength;
116817
- if (typeof field.maxLength === "number") extra.maxLength = field.maxLength;
116818
- if (typeof field.pattern === "string" && field.pattern) extra.pattern = field.pattern;
116819
- }
116820
- if (inputType === "number") {
116821
- if (typeof field.min === "number") extra.min = field.min;
116822
- if (typeof field.max === "number") extra.max = field.max;
116823
- }
116824
- return /* @__PURE__ */ jsxs("div", {
116825
- className: "fb-field",
116826
- children: [/* @__PURE__ */ jsx("label", {
116827
- htmlFor: inputId,
116828
- className: "form-label",
116829
- children: label
116830
- }), /* @__PURE__ */ jsx("input", {
116831
- id: inputId,
116832
- name: field.id,
116833
- type: inputType,
116834
- required,
116835
- placeholder: field.placeholder,
116836
- ...extra,
116837
- className: "form-input"
116838
- })]
116839
- }, field.id);
116840
- };
117511
+ const renderField = (field) => /* @__PURE__ */ jsx(FormFieldControl, { field }, field.id);
116841
117512
  const handleSubmit = async (e) => {
116842
117513
  e.preventDefault();
116843
117514
  const formData = new FormData(e.currentTarget);
@@ -117128,6 +117799,10 @@ function resolveNewsletterSubmitTarget(input) {
117128
117799
  tag: "unavailable",
117129
117800
  reason: "preview_only_source"
117130
117801
  };
117802
+ case "unpublished-preview": return {
117803
+ tag: "unavailable",
117804
+ reason: "preview_only_source"
117805
+ };
117131
117806
  default: return assertNever$22(input);
117132
117807
  }
117133
117808
  }
@@ -117150,6 +117825,7 @@ var init_newsletter_form_submission = __esmMin((() => {
117150
117825
  //#endregion
117151
117826
  //#region ../blocks/src/system/runtime/nodes/newsletter-form.client.tsx
117152
117827
  function NewsletterFormClient({ render }) {
117828
+ const submissionMessage = newsletterBlockSubmissionMessage(render.hydration.target);
117153
117829
  const api = useBlockApi();
117154
117830
  const [submissionState, dispatchSubmission] = useReducer(newsletterFormSubmissionReducer, initialNewsletterFormSubmissionState);
117155
117831
  const [altchaSolution, setAltchaSolution] = useState(null);
@@ -117159,7 +117835,6 @@ function NewsletterFormClient({ render }) {
117159
117835
  if (succeeded) successRef.current?.focus();
117160
117836
  }, [succeeded]);
117161
117837
  const showSpamProtection = render.hydration.spamProtectionEnabled ?? isSpamProtectionEnabled();
117162
- const fields = render.display.fields;
117163
117838
  const handleSubmit = async (e) => {
117164
117839
  e.preventDefault();
117165
117840
  const formData = new FormData(e.currentTarget);
@@ -117191,7 +117866,7 @@ function NewsletterFormClient({ render }) {
117191
117866
  reportNewsletterSignupRefusal(submitTarget.reason, { target: render.hydration.target });
117192
117867
  dispatchSubmission({
117193
117868
  type: "failed",
117194
- error: newsletterFormError(SIGNUPS_PAUSED_MESSAGE)
117869
+ error: newsletterFormError(NEWSLETTER_SIGNUPS_PAUSED_MESSAGE)
117195
117870
  });
117196
117871
  return;
117197
117872
  }
@@ -117199,7 +117874,7 @@ function NewsletterFormClient({ render }) {
117199
117874
  reportNewsletterSignupRefusal("setup_not_configured");
117200
117875
  dispatchSubmission({
117201
117876
  type: "failed",
117202
- error: newsletterFormError(SIGNUPS_PAUSED_MESSAGE)
117877
+ error: newsletterFormError(NEWSLETTER_SIGNUPS_PAUSED_MESSAGE)
117203
117878
  });
117204
117879
  return;
117205
117880
  }
@@ -117207,7 +117882,7 @@ function NewsletterFormClient({ render }) {
117207
117882
  reportNewsletterSignupRefusal("destination_unavailable", { setupRevision: render.hydration.setupRevision });
117208
117883
  dispatchSubmission({
117209
117884
  type: "failed",
117210
- error: newsletterFormError(SIGNUPS_PAUSED_MESSAGE)
117885
+ error: newsletterFormError(NEWSLETTER_SIGNUPS_PAUSED_MESSAGE)
117211
117886
  });
117212
117887
  return;
117213
117888
  }
@@ -117264,7 +117939,7 @@ function NewsletterFormClient({ render }) {
117264
117939
  tone: "success",
117265
117940
  className: "fb-success",
117266
117941
  role: "status",
117267
- children: getNewsletterSuccessOutcome(submissionState) === "confirmation_required" ? "Please check your inbox to confirm your signup." : render.display.successMessage
117942
+ children: getNewsletterSuccessOutcome(submissionState) === "confirmation_required" ? MAILING_LIST_CONFIRMATION_MESSAGE : render.display.successMessage
117268
117943
  })
117269
117944
  });
117270
117945
  if (render.display.availability === "unavailable") return /* @__PURE__ */ jsx(UnavailableNewsletterForm, { className: render.display.className });
@@ -117282,43 +117957,14 @@ function NewsletterFormClient({ render }) {
117282
117957
  autoComplete: "off",
117283
117958
  "aria-hidden": "true"
117284
117959
  }),
117285
- /* @__PURE__ */ jsxs("div", {
117286
- className: "newsletter-form-fields",
117287
- children: [
117288
- fields.map((field) => /* @__PURE__ */ jsx(NewsletterField, {
117289
- field,
117290
- submitting,
117291
- error: getNewsletterSubmissionFieldError(submissionState, field.id)
117292
- }, field.id)),
117293
- render.hydration.choicePresentation === "visitor_choice" ? /* @__PURE__ */ jsx(NewsletterTopicChoices, {
117294
- choices: render.display.choices,
117295
- submitting,
117296
- error: getNewsletterSubmissionFieldError(submissionState, TOPIC_CHOICE_FIELD_ID)
117297
- }) : null,
117298
- showSpamProtection && /* @__PURE__ */ jsx("div", {
117299
- className: "newsletter-altcha",
117300
- children: /* @__PURE__ */ jsx(AltchaWidget, {
117301
- challengeUrl: getChallengeUrl(),
117302
- onSolutionChange: setAltchaSolution
117303
- })
117304
- }),
117305
- formError && /* @__PURE__ */ jsx(FeedbackMessage, {
117306
- tone: "error",
117307
- className: "fb-error",
117308
- role: "alert",
117309
- children: formError
117310
- }),
117311
- /* @__PURE__ */ jsx("div", {
117312
- className: "newsletter-submit",
117313
- children: /* @__PURE__ */ jsx(ThemedButton, {
117314
- type: "submit",
117315
- variant: render.display.buttonVariant,
117316
- size: "md",
117317
- disabled: submitting,
117318
- label: submitting ? "Subscribing..." : render.display.buttonLabel
117319
- })
117320
- })
117321
- ]
117960
+ /* @__PURE__ */ jsx(NewsletterFormFields, {
117961
+ render,
117962
+ submissionState,
117963
+ submitting,
117964
+ submissionMessage,
117965
+ formError,
117966
+ showSpamProtection,
117967
+ onAltchaSolution: setAltchaSolution
117322
117968
  }),
117323
117969
  render.display.privacyNote && /* @__PURE__ */ jsx("p", {
117324
117970
  className: "newsletter-privacy-note",
@@ -117328,67 +117974,52 @@ function NewsletterFormClient({ render }) {
117328
117974
  })
117329
117975
  });
117330
117976
  }
117331
- function NewsletterField({ field, submitting, error }) {
117332
- const inputId = `newsletter_${field.id}`;
117333
- const errorId = `${inputId}-error`;
117977
+ function NewsletterFormFields({ render, submissionState, submitting, submissionMessage, formError, showSpamProtection, onAltchaSolution }) {
117978
+ const { email: emailField, extra: extraFields } = partitionNewsletterFields(render.display.fields);
117979
+ const fieldError = (id) => getNewsletterSubmissionFieldError(submissionState, id);
117334
117980
  return /* @__PURE__ */ jsxs("div", {
117335
- className: "fb-field newsletter-field",
117981
+ className: "newsletter-form-fields",
117336
117982
  children: [
117337
- /* @__PURE__ */ jsxs("label", {
117338
- htmlFor: inputId,
117339
- className: "form-label",
117340
- children: [field.label, field.required && /* @__PURE__ */ jsx("span", {
117341
- className: "newsletter-required",
117342
- "aria-hidden": "true",
117343
- children: "*"
117344
- })]
117345
- }),
117346
- /* @__PURE__ */ jsx("input", {
117347
- id: inputId,
117348
- name: field.id,
117349
- type: field.type,
117350
- required: field.required,
117351
- placeholder: field.placeholder,
117352
- className: "form-input",
117353
- autoComplete: field.type === "email" ? "email" : void 0,
117983
+ render.hydration.choicePresentation === "visitor_choice" ? /* @__PURE__ */ jsx(NewsletterTopicChips, {
117984
+ choices: render.display.choices,
117354
117985
  disabled: submitting,
117355
- ...getFieldValidationControlProps({
117356
- message: error,
117357
- messageId: errorId
117986
+ error: fieldError(TOPIC_CHOICE_FIELD_ID)
117987
+ }) : null,
117988
+ extraFields.length > 0 ? /* @__PURE__ */ jsx("div", {
117989
+ className: "newsletter-extra-fields",
117990
+ children: extraFields.map((field) => /* @__PURE__ */ jsx(NewsletterExtraField, {
117991
+ field,
117992
+ disabled: submitting,
117993
+ error: fieldError(field.id)
117994
+ }, field.id))
117995
+ }) : null,
117996
+ showSpamProtection && /* @__PURE__ */ jsx("div", {
117997
+ className: "newsletter-altcha",
117998
+ children: /* @__PURE__ */ jsx(AltchaWidget, {
117999
+ challengeUrl: getChallengeUrl(),
118000
+ onSolutionChange: onAltchaSolution
117358
118001
  })
117359
118002
  }),
117360
- error && /* @__PURE__ */ jsx(FieldValidationMessage, {
117361
- id: errorId,
118003
+ formError && /* @__PURE__ */ jsx(FeedbackMessage, {
118004
+ tone: "error",
117362
118005
  className: "fb-error",
117363
- children: error
118006
+ role: "alert",
118007
+ children: formError
118008
+ }),
118009
+ /* @__PURE__ */ jsx(NewsletterSubmitRow, {
118010
+ emailField,
118011
+ buttonVariant: render.display.buttonVariant,
118012
+ buttonLabel: submitting ? "Subscribing..." : render.display.buttonLabel,
118013
+ disabled: submitting || submissionMessage !== null,
118014
+ error: emailField ? fieldError(emailField.id) : null
118015
+ }),
118016
+ submissionMessage && /* @__PURE__ */ jsx("p", {
118017
+ role: "status",
118018
+ children: submissionMessage
117364
118019
  })
117365
118020
  ]
117366
118021
  });
117367
118022
  }
117368
- function NewsletterTopicChoices({ choices, submitting, error }) {
117369
- const errorId = `newsletter_${TOPIC_CHOICE_FIELD_ID}-error`;
117370
- return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("fieldset", {
117371
- className: "fb-fieldset newsletter-topics",
117372
- "aria-describedby": error ? errorId : void 0,
117373
- children: [/* @__PURE__ */ jsx("legend", {
117374
- className: "form-label",
117375
- children: "What would you like to hear about?"
117376
- }), choices.map((choice) => /* @__PURE__ */ jsxs("label", {
117377
- className: "fb-inline form-label newsletter-topic-choice",
117378
- children: [/* @__PURE__ */ jsx("input", {
117379
- type: "checkbox",
117380
- name: TOPIC_CHOICE_FIELD_ID,
117381
- value: choice.id,
117382
- className: "form-checkbox",
117383
- disabled: submitting
117384
- }), /* @__PURE__ */ jsx("span", { children: choice.label })]
117385
- }, choice.id))]
117386
- }), error && /* @__PURE__ */ jsx(FieldValidationMessage, {
117387
- id: errorId,
117388
- className: "fb-error",
117389
- children: error
117390
- })] });
117391
- }
117392
118023
  function UnavailableNewsletterForm({ className }) {
117393
118024
  return /* @__PURE__ */ jsx("div", {
117394
118025
  className: clsx("newsletter-form", className ?? void 0),
@@ -117396,7 +118027,7 @@ function UnavailableNewsletterForm({ className }) {
117396
118027
  tone: "error",
117397
118028
  className: "fb-error",
117398
118029
  role: "status",
117399
- children: SIGNUPS_PAUSED_MESSAGE
118030
+ children: NEWSLETTER_SIGNUPS_PAUSED_MESSAGE
117400
118031
  })
117401
118032
  });
117402
118033
  }
@@ -117416,7 +118047,7 @@ function transportFailureMessage(err) {
117416
118047
  function visitorSelectionError(selection) {
117417
118048
  switch (selection.tag) {
117418
118049
  case "nothing_chosen": return newsletterFieldError(TOPIC_CHOICE_FIELD_ID, "Choose at least one email topic.");
117419
- case "unusable": return newsletterFormError(SIGNUPS_PAUSED_MESSAGE);
118050
+ case "unusable": return newsletterFormError(NEWSLETTER_SIGNUPS_PAUSED_MESSAGE);
117420
118051
  case "not_offered":
117421
118052
  case "chosen": return null;
117422
118053
  }
@@ -117448,7 +118079,7 @@ function publicSignupError(outcome) {
117448
118079
  case "unavailable": switch (outcome.reason) {
117449
118080
  case "configuration_unavailable":
117450
118081
  case "authentication_failed":
117451
- case "target_unavailable": return SIGNUPS_PAUSED_MESSAGE;
118082
+ case "target_unavailable": return NEWSLETTER_SIGNUPS_PAUSED_MESSAGE;
117452
118083
  case "stale_configuration": return "This signup form has changed. Refresh the page, then try again.";
117453
118084
  case "rate_limited": return TOO_MANY_ATTEMPTS_MESSAGE;
117454
118085
  case "temporarily_unavailable": return RETRY_SHORTLY_MESSAGE;
@@ -117456,20 +118087,19 @@ function publicSignupError(outcome) {
117456
118087
  case "uncertain": return "We could not confirm whether your signup completed. Please wait a moment, then try again.";
117457
118088
  }
117458
118089
  }
117459
- var TOPIC_CHOICE_FIELD_ID, SIGNUPS_PAUSED_MESSAGE, RETRY_SHORTLY_MESSAGE, TOO_MANY_ATTEMPTS_MESSAGE;
118090
+ var RETRY_SHORTLY_MESSAGE, TOO_MANY_ATTEMPTS_MESSAGE;
117460
118091
  var init_newsletter_form_client = __esmMin((() => {
117461
118092
  init_clsx();
117462
118093
  init_client();
117463
118094
  init_src();
117464
118095
  init_api$1();
117465
118096
  init_src$2();
117466
- init_ThemedButton();
117467
118097
  init_FeedbackMessage();
117468
- init_FieldValidationMessage();
118098
+ init_mailingListSignupCopy();
118099
+ init_newsletter_form_parts();
117469
118100
  init_newsletter_form_client_state();
117470
118101
  init_newsletter_form_submission();
117471
- TOPIC_CHOICE_FIELD_ID = "mailingListChoice";
117472
- SIGNUPS_PAUSED_MESSAGE = "We can’t accept signups right now. Please try again later.";
118102
+ init_newsletter_form_interactive();
117473
118103
  RETRY_SHORTLY_MESSAGE = "We couldn’t confirm your signup. Please try again in a little while.";
117474
118104
  TOO_MANY_ATTEMPTS_MESSAGE = "There have been too many signup attempts. Please wait a moment and try again.";
117475
118105
  }));
@@ -117693,38 +118323,21 @@ init_types$12();
117693
118323
  init_constants$1();
117694
118324
  init_colorStyles();
117695
118325
  init_surfaces();
118326
+ init_expandPalette();
118327
+ init_cssDeclarations();
117696
118328
  //#endregion
117697
118329
  //#region ../theme-core/src/accordions/defaults.ts
117698
118330
  init_curatedSiteStyles();
117699
118331
  //#endregion
118332
+ //#region ../theme-core/src/inputs/checkable.ts
118333
+ init_colorTokenParts();
118334
+ init_colorStyles();
118335
+ //#endregion
117700
118336
  //#region ../theme-core/src/inputs/generateInputCss.ts
117701
118337
  init_types$11();
117702
118338
  init_constants$2();
117703
118339
  init_colorStyles();
117704
118340
  //#endregion
117705
- //#region ../theme-core/src/navigation/generateNavLinkCSS.ts
117706
- init_types$9();
117707
- init_expandPalette();
117708
- init_colorConversion();
117709
- init_generateBaseCSS();
117710
- init_generateEffectsCSS();
117711
- //#endregion
117712
- //#region ../theme-core/src/header/surfaceRules.ts
117713
- init_shared$4();
117714
- init_colorStyles();
117715
- //#endregion
117716
- //#region ../theme-core/src/header/generateHeaderCss.ts
117717
- init_resolver$1();
117718
- init_siteChromeNavPreferences();
117719
- init_shared$4();
117720
- init_breakpoints();
117721
- init_navDropdownSizing();
117722
- init_scrollTreatment();
117723
- init_paintTargets();
117724
- //#endregion
117725
- //#region ../theme-core/src/footer/generateFooterCss.ts
117726
- init_resolver$1();
117727
- //#endregion
117728
118341
  //#region ../theme-core/src/layout/boundaryCss.ts
117729
118342
  init_sectionTransitions();
117730
118343
  init_transitionCatalogue();
@@ -118329,6 +118942,8 @@ init_atRuleValidation();
118329
118942
  init_expandPalette();
118330
118943
  init_generateButtonCss();
118331
118944
  init_generateCardCss();
118945
+ init_header$1();
118946
+ init_footer();
118332
118947
  init_tokens();
118333
118948
  init_colorStyles();
118334
118949
  //#endregion