@riverbankcms/sdk 0.179.0 → 0.181.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 (240) hide show
  1. package/README.md +2 -2
  2. package/dist/_dts/{BlocksIslandsHydrator-DKwgs95u.d.ts → BlocksIslandsHydrator-CVCasDPz.d.ts} +1 -1
  3. package/dist/_dts/{Page-lWenra5i.d.ts → Page-Dtj2Ui3S.d.ts} +7 -7
  4. package/dist/_dts/{SdkPreviewMode-BRxhRw4I.d.ts → SdkPreviewMode-D1f_60WW.d.ts} +3 -2
  5. package/dist/_dts/{client-qWn7xAwJ.d.ts → client-Chr9pNVW.d.ts} +288 -121
  6. package/dist/_dts/{content-types-DL6GIvTm.d.ts → content-types-kjccgopX.d.ts} +2 -2
  7. package/dist/_dts/{contracts-CzWyAiJj.d.ts → contracts-BodaiS00.d.ts} +3 -3
  8. package/dist/_dts/{generatePageMetadata-CBKd0cJ4.d.ts → generatePageMetadata-BS6kaJFp.d.ts} +2 -2
  9. package/dist/_dts/{index-DCiSHd-C.d.ts → index-Brl6_I2j.d.ts} +5 -4
  10. package/dist/_dts/{index-CaCum9mM.d.ts → index-CJkefwYh.d.ts} +2 -2
  11. package/dist/_dts/{index-7CDBZGb-.d.ts → index-D1WpKwQe.d.ts} +1 -1
  12. package/dist/_dts/{index-BU9uAkHB.d.ts → index-DG0OvBs0.d.ts} +8 -8
  13. package/dist/_dts/{index-BYnG_vF5.d.ts → index-Diqt0PvG.d.ts} +1 -1
  14. package/dist/_dts/{index-CZgJrhzT.d.ts → index-Dy50xUMK.d.ts} +2 -2
  15. package/dist/_dts/{loadContent-CPKbFQyq.d.ts → loadContent-BgxshKrA.d.ts} +7 -7
  16. package/dist/_dts/{request-BjKBCS7t.d.ts → request-CA0izds5.d.ts} +4561 -1390
  17. package/dist/_dts/{resolveBlockData-DupbMCup.d.ts → resolveBlockData-ChQmwEd3.d.ts} +5 -5
  18. package/dist/_dts/{resolvePageContent-BqNyCHi8.d.ts → resolvePageContent-BvGyvblj.d.ts} +1 -1
  19. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  20. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  21. package/dist/_dts/sdk/src/client.d.ts +7 -7
  22. package/dist/_dts/sdk/src/config/index.d.ts +6 -6
  23. package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
  24. package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
  25. package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
  26. package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
  27. package/dist/_dts/sdk/src/data/types.d.ts +2 -2
  28. package/dist/_dts/sdk/src/gifting/client.d.ts +1 -2
  29. package/dist/_dts/sdk/src/index.d.ts +104 -8
  30. package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
  31. package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
  32. package/dist/_dts/sdk/src/navigation/index.d.ts +3 -3
  33. package/dist/_dts/sdk/src/next/index.d.ts +84 -53
  34. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  35. package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
  36. package/dist/_dts/sdk/src/portal/client.d.ts +43 -56
  37. package/dist/_dts/sdk/src/portal/index.d.ts +3 -18
  38. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  39. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  40. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  41. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  42. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  43. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
  44. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
  45. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
  46. package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
  47. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  48. package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
  49. package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
  50. package/dist/_dts/sdk/src/routing/index.d.ts +6 -6
  51. package/dist/_dts/sdk/src/server.d.ts +5 -5
  52. package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
  53. package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
  54. package/dist/_dts/{serviceBookingOutline-YcsIjvn1.d.ts → serviceBookingOutline-BgFbJQhU.d.ts} +8 -7
  55. package/dist/_dts/{types-B7e6Lmo5.d.ts → types-CQrsP1x_.d.ts} +3 -3
  56. package/dist/_dts/{types-CT-KOxl_.d.ts → types-CgS3xLk8.d.ts} +7 -2
  57. package/dist/_dts/{types-BOxSq-Bq.d.ts → types-R65DKjPn.d.ts} +9 -8
  58. package/dist/_dts/{validation-Dz6qccue.d.ts → validation-6LTIbuBA.d.ts} +4 -4
  59. package/dist/client/{BlocksIslandsHydrator-1XifJg6V.mjs → BlocksIslandsHydrator-DqZPz6oW.mjs} +19 -19
  60. package/dist/client/{BookingMailingListNote-BsbEgagJ.mjs → BookingMailingListNote-uWfR2kaG.mjs} +177 -70
  61. package/dist/client/{BookingQuestionFields-C8IbeLHj.mjs → BookingQuestionFields-CyNIKw6k.mjs} +23 -82
  62. package/dist/client/CalendarAction-D_Glwvz2.mjs +105 -0
  63. package/dist/client/{CalendarNavigationChevron-Bbqij1XQ.mjs → CalendarNavigationChevron-BGCX3zwG.mjs} +6 -6
  64. package/dist/client/{CheckboxChoice-BZPLCgTU.mjs → CheckboxChoice-C8i4NraK.mjs} +1 -1
  65. package/dist/client/{DemoBookingPortalAccess-uA9H8LIL.mjs → DemoBookingPortalAccess-DFLPyuqe.mjs} +18 -10
  66. package/dist/client/{EventCalendar.client-yoSI77ov.mjs → EventCalendar.client-zDL4-t-B.mjs} +10 -10
  67. package/dist/client/{EventCombined.client-HeCNlliq.mjs → EventCombined.client-uciDKLID.mjs} +60 -10
  68. package/dist/client/{EventEmbeddedCheckoutStep-BDnicDM6.mjs → EventEmbeddedCheckoutStep-BGkbUhuw.mjs} +1 -1
  69. package/dist/client/{EventItem-Duhk1vnF.mjs → EventItem-CwzrjcRw.mjs} +8 -7
  70. package/dist/client/{EventListWeekNavigation-BiutEqPK.mjs → EventListWeekNavigation-ChvcnPma.mjs} +1 -1
  71. package/dist/client/{EventListing.client-B5ln77jG.mjs → EventListing.client-DA57Qoyx.mjs} +3 -3
  72. package/dist/client/{EventListing.view-hUDhNtMv.mjs → EventListing.view-DZ0qMFF4.mjs} +8 -211
  73. package/dist/client/{EventRegistrationPayment-DqtX1vB2.mjs → EventRegistrationPayment-DSqCJL8E.mjs} +1657 -403
  74. package/dist/client/{Page-ChJ2TGVk.mjs → Page-C7mygH_f.mjs} +536 -287
  75. package/dist/client/{ProtectedSubmitButton-De6AzhE6.mjs → ProtectedSubmitButton-BNnKuir8.mjs} +1 -1
  76. package/dist/client/{SiteTermsAgreementField-CDBU31xW.mjs → SiteTermsAgreementField-B4z-e4Wq.mjs} +27 -24
  77. package/dist/client/{StepIndicator-JQA-VuEH.mjs → StepIndicator-Dn_DY4oY.mjs} +1 -1
  78. package/dist/client/{StepIndicator-2Dl9zon2.mjs → StepIndicator-atfDU82W.mjs} +21 -13
  79. package/dist/client/{ThemedButton-CnSa7o-I.mjs → ThemedButton-PFOhXktM.mjs} +1 -33
  80. package/dist/client/{accessibleSurfaces-Wl8-_OVJ.mjs → accessibleSurfaces-n6kS6Hct.mjs} +77 -1
  81. package/dist/client/{accordion-B6SqU49k.mjs → accordion-CsW8U3ff.mjs} +1 -1
  82. package/dist/client/{booking-form.client-DrEOjQ3N.mjs → booking-form.client-cBWM392H.mjs} +442 -86
  83. package/dist/client/bookingCalendar--aWnqFDn.mjs +180 -0
  84. package/dist/client/{bookingForm-drZBwEZW.mjs → bookingForm-DgySpp6C.mjs} +4 -4
  85. package/dist/client/bookings.mjs +51 -15
  86. package/dist/client/{boxStyleClassNames-DEh45w16.mjs → boxStyleClassNames-BpGVdLFD.mjs} +2 -2
  87. package/dist/client/{carousel-C-YJliD-.mjs → carousel-DJoleFV3.mjs} +2 -2
  88. package/dist/client/{carousel.client-DMtGYTTM.mjs → carousel.client-BtLwHefX.mjs} +1 -1
  89. package/dist/client/{cart-acGFWK9R.mjs → cart-EO5o6uPH.mjs} +3 -3
  90. package/dist/client/{cart.client-BzlOGP2j.mjs → cart.client-D_gPw45z.mjs} +1 -1
  91. package/dist/client/{checkout-SEontwhy.mjs → checkout-NVfZW0kR.mjs} +3 -3
  92. package/dist/client/{checkout.client-C0Qvh-d4.mjs → checkout.client-DD3JuqOy.mjs} +1 -1
  93. package/dist/client/{checkoutUrls-yUKeq1N9.mjs → checkoutUrls-z2gXvlGw.mjs} +1 -1
  94. package/dist/client/client.mjs +306 -196
  95. package/dist/client/constants-CoOkvw__.mjs +100 -0
  96. package/dist/client/{context-DTrwaQtg.mjs → context-CRhn9qzS.mjs} +922 -388
  97. package/dist/client/{dateFormatting-Cg8E1r9l.mjs → dateFormatting-BnWB4L1s.mjs} +15 -25
  98. package/dist/client/{demoPortalMagicLink-D0kOJYOX.mjs → demoPortalMagicLink-CWDGSTBu.mjs} +2 -3
  99. package/dist/client/{enhanceHeaderSection-DyrpZ7ks.mjs → enhanceHeaderSection-tdP_-Z9o.mjs} +4 -5
  100. package/dist/client/{event-registration.client-RLZQWi2V.mjs → event-registration.client-D7YYKySQ.mjs} +2084 -1640
  101. package/dist/client/{eventCalendar-CphYnImh.mjs → eventCalendar-CsAfu5d0.mjs} +4 -4
  102. package/dist/client/{eventCombined-BvqjASB_.mjs → eventCombined-VXJB5CoS.mjs} +4 -4
  103. package/dist/client/{eventListing-BaNAoC_M.mjs → eventListing-B3KIZNfY.mjs} +4 -4
  104. package/dist/client/{eventRegistration-COMHoRl6.mjs → eventRegistration-BP-dEk1c.mjs} +4 -4
  105. package/dist/client/{form-DyH2juYT.mjs → form-DM8Zbxbv.mjs} +3 -3
  106. package/dist/client/{form.client-DBwzkB0M.mjs → form.client-e2z_Tlgk.mjs} +5 -5
  107. package/dist/client/{form.parts-CY4kX3mh.mjs → form.parts-Ctljy1a3.mjs} +3 -3
  108. package/dist/client/gifting/client.mjs +32 -29
  109. package/dist/client/{gifting-CIx4V378.mjs → gifting-DWIsqQru.mjs} +4 -4
  110. package/dist/client/{gifting.client-BEVPpzJM.mjs → gifting.client-QsSWF0uA.mjs} +5 -5
  111. package/dist/client/{gifting.parts-VnORjnZK.mjs → gifting.parts-CedLgwa_.mjs} +2 -2
  112. package/dist/client/{headerSection-DGcJfRS8.mjs → headerSection-DAkRkwb-.mjs} +2 -2
  113. package/dist/client/{mediaAssets-B99AP7ai.mjs → mediaAssets-COfQolI3.mjs} +1 -1
  114. package/dist/client/{mediaContext-Fusweriw.mjs → mediaContext-DzvnjYXm.mjs} +1 -1
  115. package/dist/client/{newsletter-form.client-BvEDkjiD.mjs → newsletter-form.client-WYja9-WN.mjs} +7 -7
  116. package/dist/client/{newsletter-form.interactive-DCO1lErD.mjs → newsletter-form.interactive-RuM86VAv.mjs} +37 -44
  117. package/dist/client/{newsletter-form.parts-BIy4IUT3.mjs → newsletter-form.parts-2petDnWv.mjs} +2 -2
  118. package/dist/client/{newsletterForm-CoTXDNFS.mjs → newsletterForm-BUbXdA_e.mjs} +3 -3
  119. package/dist/client/{lookSurfaces-IqT_SVnX.mjs → noop-Dl4mZ-rr.mjs} +257 -49
  120. package/dist/client/portal/client.mjs +11779 -6745
  121. package/dist/client/portalOrders-COGn4BKG.mjs +596 -0
  122. package/dist/client/portalRoutes-D72yvtDh.mjs +862 -0
  123. package/dist/client/{product-detail.client-YHQ2aKX1.mjs → product-detail.client-pOAryevt.mjs} +1 -1
  124. package/dist/client/{product-list.client-DxoZw1vF.mjs → product-list.client-CcUpUiud.mjs} +1 -1
  125. package/dist/client/{productDetail-DjuFvkey.mjs → productDetail-BZJCfqat.mjs} +3 -3
  126. package/dist/client/{productList-DE9GEFoZ.mjs → productList-CiRs3mNb.mjs} +3 -3
  127. package/dist/client/{propsDecoder-Cyag_HOs.mjs → propsDecoder--uHW4tFM.mjs} +2 -2
  128. package/dist/client/{registry.server-BPwV-0Pp.mjs → registry.server-CDNNd8wC.mjs} +318 -235
  129. package/dist/client/{renderableMediaAssetAdmission-BlfqYLJW.mjs → renderableMediaAssetAdmission-BsOWd9lf.mjs} +1 -1
  130. package/dist/client/rendering/client.mjs +26 -26
  131. package/dist/client/rendering/islands.mjs +1 -1
  132. package/dist/client/rendering.mjs +16 -8
  133. package/dist/client/{richText-coerce-NrRqDeOg.mjs → richText-coerce-CQGE_wHV.mjs} +2 -1
  134. package/dist/client/{routeIslandApiConfig-BWq5gKFK.mjs → routeIslandApiConfig-BtCg87-N.mjs} +1 -1
  135. package/dist/client/{runtimeResponse-D2j2-mOk.mjs → runtimeResponse-DL_ARBpa.mjs} +1 -1
  136. package/dist/client/{runtimeResponse-DtWSfWSZ.mjs → runtimeResponse-Ds9cmBUf.mjs} +1 -1
  137. package/dist/client/{shop-C3wM0Hr4.mjs → shop-Rx_gEMK8.mjs} +3 -3
  138. package/dist/client/{shop-commerce-34YvcpbX.mjs → shop-commerce-D8evQnMT.mjs} +53 -16
  139. package/dist/client/{shop-commerce-store-B7xHksOs.mjs → shop-commerce-store-C9PcsSTj.mjs} +22 -5
  140. package/dist/client/{shop-discount-apply.state-BiBnozfO.mjs → shop-discount-apply.state-D5CtGfJI.mjs} +2 -2
  141. package/dist/client/{shop.client-C0v88nLd.mjs → shop.client-D4lzQ9oY.mjs} +17 -39
  142. package/dist/client/{shopShared-Ct-BRNez.mjs → shopShared-BVbq7Nm-.mjs} +2 -2
  143. package/dist/client/spam-protection.mjs +1 -1
  144. package/dist/client/src-Al4ooTl_.mjs +164 -0
  145. package/dist/client/{src-CCtanNlD.mjs → src-ZSqRK3dD.mjs} +345 -92
  146. package/dist/client/{timetableModel-lhE29TNT.mjs → timetableModel-BQJrSK0K.mjs} +205 -80
  147. package/dist/client/{shop-add-feedback-DvC2kP1K.mjs → urlParams-C2QHo1Pa.mjs} +1 -42
  148. package/dist/client/{useAvailableSlots-BelJviOT.mjs → useAvailableSlots-Dm3lKJKR.mjs} +3 -24
  149. package/dist/client/{useDiscountCodeUi-rQRE1-Ho.mjs → useDiscountCodeUi-klgfGn7f.mjs} +1 -1
  150. package/dist/client/{useEventPagination-C4rS2Xxl.mjs → useEventPagination-Jnjt7_ly.mjs} +8 -8
  151. package/dist/client/{view-LJVHVqsy.mjs → view-CC_yQLSA.mjs} +4 -4
  152. package/dist/client/{wizardSteps-CNDsxeJH.mjs → wizardSteps-BliJOzEX.mjs} +2512 -675
  153. package/dist/preview-next/before-render.mjs +1 -0
  154. package/dist/preview-next/client/{LocationPickerEnvironment-BHAT81Wx.mjs → LocationPickerEnvironment-BW3dRFIv.mjs} +1 -1
  155. package/dist/preview-next/client/{MapLibreEditMap-B52hkdIZ.mjs → MapLibreEditMap-Db9BHyXh.mjs} +2 -2
  156. package/dist/preview-next/client/{PageSectionToolbar-C4TtBPN-.mjs → PageSectionToolbar-BhL0uADo.mjs} +4 -4
  157. package/dist/preview-next/client/{PreviewEditorSidebar-D6fkE59-.mjs → PreviewEditorSidebar-Ct8eIm0i.mjs} +8 -7
  158. package/dist/preview-next/client/{PreviewEditorUI-amcDlj0O.mjs → PreviewEditorUI-BS32G4V9.mjs} +5 -5
  159. package/dist/preview-next/client/{PreviewShell-DeQjx4zk.mjs → PreviewShell-RL0WfZXD.mjs} +7 -7
  160. package/dist/preview-next/client/{SdkPreviewModeRuntime-Cx0SXnoX.mjs → SdkPreviewModeRuntime-MK_gHeGy.mjs} +39 -7
  161. package/dist/preview-next/client/{lucide-react-McYZeSMb.mjs → lucide-react-00FF_oar.mjs} +13 -1
  162. package/dist/preview-next/client/{previewAssistantSlot-aqpU34WI.mjs → previewAssistantSlot-CQyS8pcq.mjs} +10318 -3719
  163. package/dist/preview-next/client/{previewChromeRoot-D3Gy_Rs0.mjs → previewChromeRoot-BSxp3Mfu.mjs} +1 -1
  164. package/dist/preview-next/client/runtime.mjs +3 -3
  165. package/dist/preview-next/client/{sdk-runtime-Dzx_RrN7.mjs → sdk-runtime-DKnTzy74.mjs} +2 -2
  166. package/dist/preview-next/client/{siteStyleAccess-LHedw83e.mjs → siteStyleAccess-BlmbvbLN.mjs} +37 -25
  167. package/dist/preview-next/client/{useAutosaveStatus-DpSd9aVk.mjs → useAutosaveStatus-D-7GwZOQ.mjs} +1 -1
  168. package/dist/preview-next/client/{useOpenBlockForSetup-BGZn5AT1.mjs → useOpenBlockForSetup-BNZtGM5g.mjs} +2 -2
  169. package/dist/preview-next/container-responsive.css +292 -170
  170. package/dist/preview-next/keepAlive.mjs +1 -1
  171. package/dist/preview-next/middleware.mjs +1 -1
  172. package/dist/preview-next/{route-contract-DnL-FgSV.mjs → route-contract-R3PcMmax.mjs} +114 -37
  173. package/dist/server/{Block.shared-BEbq6EwO.mjs → Block.shared-CniF9tSu.mjs} +5 -5
  174. package/dist/server/{ThemeScopeCore-DFEM1a85.mjs → ThemeScopeCore-BQWsnGT6.mjs} +133 -120
  175. package/dist/server/{accessibleSurfaces-CM3QANtw.mjs → accessibleSurfaces-WPzUAHp4.mjs} +33 -2
  176. package/dist/server/accordions-By_0Ykks.mjs +111 -0
  177. package/dist/server/{bindings-Bly0dRs7.mjs → bindings-DxojjtK3.mjs} +7 -7
  178. package/dist/server/{client-CGJ2ztYp.mjs → client-CDndhbYO.mjs} +1412 -1307
  179. package/dist/server/config-validation.mjs +1 -1
  180. package/dist/server/config.mjs +2 -2
  181. package/dist/server/constants-VyF5nEhL.mjs +1474 -0
  182. package/dist/server/{customCss-BZ8YSrQg.mjs → customCss-C9kgPHvr.mjs} +41 -5
  183. package/dist/server/data/resolveBlockData.mjs +1 -1
  184. package/dist/server/index.mjs +3 -3
  185. package/dist/server/{loadContent-BkK1w3QQ.mjs → loadContent-BKstMBmX.mjs} +7 -4
  186. package/dist/server/{loadPage-DTLe0FEs.mjs → loadPage-IgNnZaqr.mjs} +3 -3
  187. package/dist/server/{lookMediaFrame-CaH018pK.mjs → lookMediaFrame-TFjgNG61.mjs} +74 -18
  188. package/dist/server/manifest.mjs +36 -25
  189. package/dist/server/{mapLocation-BM5WX7FY.mjs → mapLocation-MDDSubTp.mjs} +1 -1
  190. package/dist/server/media-BRmYrnzb.mjs +31 -0
  191. package/dist/server/{media-luf7RF22.mjs → media-gvfIw3z8.mjs} +2 -31
  192. package/dist/server/{navigation-BcNfYYuu.mjs → navigation-quBYlSKD.mjs} +2 -2
  193. package/dist/server/navigation.mjs +1 -1
  194. package/dist/server/next.mjs +170 -104
  195. package/dist/server/{overrideResolution-Uy9Zp2Ks.mjs → overrideResolution-CCaAPpIa.mjs} +1 -1
  196. package/dist/server/page-converter.mjs +3 -3
  197. package/dist/server/{pageRenderPlan-JzxBnqfV.mjs → pageRenderPlan-B7iULvKe.mjs} +15 -12
  198. package/dist/server/{pageRuntimeSupport-DyNSd2Yj.mjs → pageRuntimeSupport-BytMroxn.mjs} +9 -5
  199. package/dist/server/{pageShared-DU4ETFPS.mjs → pageShared-Dcs_XTIO.mjs} +836 -624
  200. package/dist/server/{parseThemeForPersistence-DOsfofCy.mjs → parseThemeForPersistence-Bihl4W5K.mjs} +3 -2
  201. package/dist/server/{portal-B4JVkdjc.mjs → portal-CMW_b9mG.mjs} +62 -46
  202. package/dist/server/portal.mjs +3 -3
  203. package/dist/server/portalQuestions-oUyohgL9.mjs +225 -0
  204. package/dist/server/{prebuild-8jNtDXmS.mjs → prebuild-agaH-vZV.mjs} +1 -1
  205. package/dist/server/prebuild.mjs +1 -1
  206. package/dist/server/{prefetchBlockData-xeMG42aw.mjs → prefetchBlockData-DwpRjqw4.mjs} +5 -3
  207. package/dist/server/{registry-DH1VrsCl.mjs → registry-DM9dHfDC.mjs} +582 -526
  208. package/dist/server/rendering/components/pageShared.mjs +1 -1
  209. package/dist/server/rendering/helpers/loadPage.mjs +1 -1
  210. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
  211. package/dist/server/rendering/server.mjs +4 -4
  212. package/dist/server/rendering.mjs +10 -9
  213. package/dist/server/{resolveBlockData-BN8tweTx.mjs → resolveBlockData-CinHGf8l.mjs} +39 -31
  214. package/dist/server/{resolveButtonColourStates--6yJp9Tq.mjs → resolveButtonColourStates-B0O1IM16.mjs} +2 -1028
  215. package/dist/server/{resolvePageContent-DnM16_f9.mjs → resolvePageContent-BWKUZUIn.mjs} +1 -1
  216. package/dist/server/{responseMedia-F-ElH2Rd.mjs → responseMedia-IfH65QAH.mjs} +57 -2
  217. package/dist/server/routing.mjs +1 -1
  218. package/dist/server/{schema-BpsqaSSU.mjs → schema-CwfxQjc4.mjs} +10 -113
  219. package/dist/server/server.mjs +3 -3
  220. package/dist/server/{servicePageContent-B-FezJmH.mjs → servicePageContent-BBBhOtdE.mjs} +31 -26
  221. package/dist/server/theme-bridge.mjs +3 -2
  222. package/dist/server/theme.mjs +2 -2
  223. package/dist/server/{three-pass-converter-39SXCCnh.mjs → three-pass-converter-DPaUPTfl.mjs} +34 -16
  224. package/dist/server/titleSourceSchema-NhK6azFS.mjs +2018 -0
  225. package/dist/server/typeGuards-CTW_9AXq.mjs +413 -0
  226. package/dist/server/types-BKaBZFjD.mjs +1085 -0
  227. package/dist/server/{validation-3jOzYdPL.mjs → validation-DG5jX3jH.mjs} +70 -17
  228. package/dist/server/{version-8t0o6_jd.mjs → version-CipbxPHL.mjs} +1 -1
  229. package/dist/server/video-Cdr3wh-q.mjs +272 -0
  230. package/dist/styles/index.css +3446 -3796
  231. package/package.json +2 -1
  232. package/dist/_dts/index-DVSipdrT.d.ts +0 -101
  233. package/dist/client/TabBarFragment-DlKQRhP4.mjs +0 -56
  234. package/dist/client/checkoutRoute-DKlZRNZD.mjs +0 -22
  235. package/dist/client/constants-4o4_hl34.mjs +0 -6
  236. package/dist/client/creditProducts-BQ1t1erI.mjs +0 -266
  237. package/dist/client/formatDate-CTEN7gxW.mjs +0 -26
  238. package/dist/server/constants-Cj7hfbrA.mjs +0 -41
  239. package/dist/server/richTextSchema-QLaQrbII.mjs +0 -212
  240. package/dist/server/titleSourceSchema-Cu-3PRvv.mjs +0 -122
@@ -1,16 +1,30 @@
1
1
  "use client";
2
- import { Jn as decideSignInReturn, Kn as clearSignInReturnDrafts, Qn as sweepExpiredSignInReturnDrafts, Xn as readSignInReturn, Yn as nextSignInReturnExpiry, Zn as signInReturnPath, ha as requestSignIn, za as RichText } from "./wizardSteps-CNDsxeJH.mjs";
3
- import { t as assertNever } from "./src-CCtanNlD.mjs";
4
- import { i as BlockApiError, n as useBlockApi, r as useBlockApiOptional } from "./context-DTrwaQtg.mjs";
5
- import { r as ThemedButton } from "./ThemedButton-CnSa7o-I.mjs";
6
- import { f as NavigationHandOffPanel } from "./DemoBookingPortalAccess-uA9H8LIL.mjs";
7
- import { a as DemoPortalSignInLink, t as BookingQuestionFields } from "./BookingQuestionFields-C8IbeLHj.mjs";
2
+ import { Cn as toUtcIsoDateTimeString, t as assertNever } from "./src-ZSqRK3dD.mjs";
3
+ import { Do as RichText, Fr as decideSignInReturn, Ir as nextSignInReturnExpiry, Lr as readSignInReturn, Nr as clearSignInReturnDrafts, Rr as signInReturnPath, ro as requestSignIn, zr as sweepExpiredSignInReturnDrafts } from "./wizardSteps-BliJOzEX.mjs";
4
+ import { n as BookingQuestionFields } from "./BookingQuestionFields-CyNIKw6k.mjs";
5
+ import { i as BlockApiError, n as useBlockApi, r as useBlockApiOptional } from "./context-CRhn9qzS.mjs";
6
+ import { n as ThemedButton, r as ThemedButtonLink } from "./ThemedButton-PFOhXktM.mjs";
7
+ import { p as NavigationHandOffPanel } from "./DemoBookingPortalAccess-DFLPyuqe.mjs";
8
8
  import { t as ModalShell } from "./ModalShell-B_fHWK71.mjs";
9
- import { i as requestDemoPortalMagicLink, r as buildPortalCallbackUrl } from "./demoPortalMagicLink-D0kOJYOX.mjs";
9
+ import { n as buildPortalCallbackUrl, r as requestDemoPortalMagicLink } from "./demoPortalMagicLink-CWDGSTBu.mjs";
10
10
  import { n as getBookingMailingListNoteCopy } from "./mailingListSignupCopy-CX4sDozG.mjs";
11
11
  import * as React$1 from "react";
12
12
  import { useCallback, useEffect, useId, useLayoutEffect, useMemo, useReducer, useRef, useState } from "react";
13
13
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
14
+ //#region ../blocks/src/system/runtime/shared/components/DemoPortalSignInLink.tsx
15
+ function DemoPortalSignInLink(props) {
16
+ return /* @__PURE__ */ jsxs("div", { children: [
17
+ /* @__PURE__ */ jsx("h3", { children: "Your sign-in link" }),
18
+ /* @__PURE__ */ jsx("p", { children: "In the demo we don’t send emails, so here’s the link we’d have sent you." }),
19
+ /* @__PURE__ */ jsx(ThemedButtonLink, {
20
+ variant: "default",
21
+ size: "md",
22
+ label: "Sign in to the portal",
23
+ href: props.url
24
+ })
25
+ ] });
26
+ }
27
+ //#endregion
14
28
  //#region ../blocks/src/system/runtime/shared/components/PaymentChoiceRows.tsx
15
29
  /**
16
30
  * Payment choices as a radio group. Native radios give the whole row as the
@@ -233,17 +247,14 @@ function useReturnSession(input, waiting) {
233
247
  useEffect(() => {
234
248
  if (!waiting || identity === null) return;
235
249
  const run = { live: true };
236
- api.getPortalProfile().then((me) => {
237
- if (run.live) setRead({
238
- identity,
239
- email: me.profile.email
240
- });
241
- }, () => {
250
+ const settleRead = (email) => {
242
251
  if (run.live) setRead({
243
252
  identity,
244
- email: null
253
+ email
245
254
  });
246
- });
255
+ };
256
+ if (!api.portalVisitor) settleRead(null);
257
+ else api.portalVisitor.profile().then((result) => settleRead(result.ok ? result.value.profile.email : null));
247
258
  return () => {
248
259
  run.live = false;
249
260
  };
@@ -312,6 +323,71 @@ function portalSessionIdentity(config) {
312
323
  return portalAuth.type === "bearer" ? portalAuth.token : null;
313
324
  }
314
325
  //#endregion
326
+ //#region ../blocks/src/system/runtime/hooks/useBookingNowIso.ts
327
+ const ANCHOR_CLOCK = { kind: "anchor" };
328
+ const MAX_TIMER_DELAY_MS = 2147483647;
329
+ const browserClock = () => toUtcIsoDateTimeString((/* @__PURE__ */ new Date()).toISOString());
330
+ /** The effect owns one timer, including long-delay and early-timer retries. */
331
+ function scheduleBookingClockBoundary(boundary, refresh, clock) {
332
+ const timer = {};
333
+ const schedule = () => {
334
+ const delay = Date.parse(boundary) - Date.parse(clock());
335
+ if (!Number.isFinite(delay) || delay <= 0) return;
336
+ timer.current = setTimeout(() => {
337
+ refresh();
338
+ schedule();
339
+ }, Math.min(delay, MAX_TIMER_DELAY_MS));
340
+ };
341
+ schedule();
342
+ return () => {
343
+ if (timer.current !== void 0) clearTimeout(timer.current);
344
+ };
345
+ }
346
+ /**
347
+ * The supplied server clock snapshot for this booking or registration flow.
348
+ *
349
+ * Payment previews take this as their "now" so the pure view-model builders
350
+ * never read the clock themselves. The anchor stays fixed per mount. Lifecycle
351
+ * presentation starts with the same snapshot, then reconciles in effects.
352
+ */
353
+ function useBookingNowIso(snapshot, policy = ANCHOR_CLOCK, clock = browserClock) {
354
+ const [nowIso, setNowIso] = useState(snapshot);
355
+ const refresh = useCallback(() => setNowIso(clock()), [clock]);
356
+ const nextBoundary = policy.kind === "presentation" ? policy.nextBoundary : null;
357
+ useEffect(() => {
358
+ if (policy.kind === "anchor") return;
359
+ refresh();
360
+ const interval = policy.kind === "relative" ? setInterval(refresh, 6e4) : null;
361
+ window.addEventListener("focus", refresh);
362
+ document.addEventListener("visibilitychange", refresh);
363
+ return () => {
364
+ if (interval !== null) clearInterval(interval);
365
+ window.removeEventListener("focus", refresh);
366
+ document.removeEventListener("visibilitychange", refresh);
367
+ };
368
+ }, [policy.kind, refresh]);
369
+ useEffect(() => {
370
+ if (!nextBoundary) return;
371
+ return scheduleBookingClockBoundary(nextBoundary, refresh, clock);
372
+ }, [
373
+ nextBoundary,
374
+ clock,
375
+ refresh
376
+ ]);
377
+ return nowIso;
378
+ }
379
+ //#endregion
380
+ //#region ../blocks/src/system/runtime/shared/parseBookingSubmissionFailure.ts
381
+ /** `fieldPrefix` is where the server puts question field ids: booking flows send them under `bookingQuestions.`, the portal under `answers.`. */
382
+ function parseBookingSubmissionFailure(error, fallbackMessage, fieldPrefix = "bookingQuestions.") {
383
+ const fieldErrors = error instanceof BlockApiError ? error.fieldErrors : [];
384
+ return {
385
+ message: error instanceof Error ? error.message : fallbackMessage,
386
+ answersNeeded: fieldErrors.some(({ field, code }) => field === "bookingQuestions" && code === "validation:required"),
387
+ questionFieldErrors: Object.fromEntries(fieldErrors.flatMap(({ field, message }) => field.startsWith(fieldPrefix) && field.length > fieldPrefix.length ? [[field.slice(fieldPrefix.length), message]] : []))
388
+ };
389
+ }
390
+ //#endregion
315
391
  //#region ../blocks/src/system/runtime/hooks/usePolling.state.ts
316
392
  function createInitialPollingState() {
317
393
  return {
@@ -605,10 +681,9 @@ function getMagicLinkError(state) {
605
681
  //#endregion
606
682
  //#region ../blocks/src/system/runtime/nodes/shared/MagicLinkForm.tsx
607
683
  function usesThemedControls(classPrefix) {
608
- return classPrefix === "cp" || classPrefix === "rb-reg";
684
+ return classPrefix === "rb-reg";
609
685
  }
610
686
  function emailInputClassName(classPrefix) {
611
- if (classPrefix === "cp") return "cp-input";
612
687
  if (classPrefix === "rb-reg") return "form-input";
613
688
  return `${classPrefix}-form__input`;
614
689
  }
@@ -802,6 +877,73 @@ function getMagicLinkErrorMessage(error) {
802
877
  return error instanceof BlockApiError ? error.message : "We couldn’t send the sign-in link. Try again in a moment.";
803
878
  }
804
879
  //#endregion
880
+ //#region ../blocks/src/system/runtime/nodes/shared/SignInNotice.tsx
881
+ /**
882
+ * A one-line offer to sign in by email link, read as one sentence around the
883
+ * "Sign in" link ("Booked with us before? Sign in and we’ll…"). The booking
884
+ * flows share it; each says what signing in gets the booker. `returnPath`
885
+ * keeps what they've typed for when they come back.
886
+ */
887
+ function SignInNotice(props) {
888
+ const [open, setOpen] = React$1.useState(false);
889
+ const [handOff, setHandOff] = React$1.useState(null);
890
+ const api = useBlockApiOptional();
891
+ const signIn = () => {
892
+ const outcome = requestSignIn(window.location.href, () => setOpen(true), api?.config.pageNavigation);
893
+ if (outcome.kind === "handOff") setHandOff(outcome);
894
+ };
895
+ if (handOff) return /* @__PURE__ */ jsx(NavigationHandOffPanel, {
896
+ handOff,
897
+ onBack: () => setHandOff(null)
898
+ });
899
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("p", {
900
+ className: "rb-bq-note",
901
+ children: [
902
+ props.lead,
903
+ " ",
904
+ /* @__PURE__ */ jsx("button", {
905
+ type: "button",
906
+ className: "rb-bq-link",
907
+ onClick: signIn,
908
+ children: "Sign in"
909
+ }),
910
+ " ",
911
+ props.after
912
+ ]
913
+ }), open ? /* @__PURE__ */ jsx(SignInModal, {
914
+ email: props.email,
915
+ returnPath: props.returnPath,
916
+ onClose: () => setOpen(false)
917
+ }) : null] });
918
+ }
919
+ function SignInModal(props) {
920
+ return /* @__PURE__ */ jsx(ModalShell, {
921
+ title: "Sign in with email",
922
+ titleId: `${React$1.useId()}-sign-in-title`,
923
+ onClose: props.onClose,
924
+ overlayClassName: "rb-reg-modal-overlay",
925
+ modalClassName: "rb-reg-modal",
926
+ titleClassName: "rb-reg-modal-title",
927
+ closeButtonClassName: "rb-reg-modal-close",
928
+ children: /* @__PURE__ */ jsx("div", {
929
+ className: "rb-reg-modal-content",
930
+ children: /* @__PURE__ */ jsx(MagicLinkForm, {
931
+ initialEmail: props.email,
932
+ subtitle: "Enter your email and we’ll send you a link to sign in.",
933
+ buttonText: "Send sign-in link",
934
+ successMessage: (email) => `We’ve sent a sign-in link to ${email}.`,
935
+ successDetail: "Open it on this device and you’ll come back to this booking with everything you’ve typed so far.",
936
+ successAction: {
937
+ label: "Back to my booking",
938
+ onClick: props.onClose
939
+ },
940
+ classPrefix: "rb-reg",
941
+ returnPath: props.returnPath
942
+ })
943
+ })
944
+ });
945
+ }
946
+ //#endregion
805
947
  //#region ../blocks/src/system/runtime/nodes/shared/BookingQuestionSections.tsx
806
948
  /**
807
949
  * The question set asked while booking, shared by the appointment booking
@@ -817,6 +959,8 @@ function BookingQuestionSections(props) {
817
959
  children: presentation.message
818
960
  });
819
961
  case "ask": return /* @__PURE__ */ jsxs(QuestionSetSection, { children: [presentation.signIn === "offered" ? /* @__PURE__ */ jsx(SignInNotice, {
962
+ lead: "Booked with us before?",
963
+ after: "and we’ll fill in the answers you gave last time.",
820
964
  email: props.signInEmail,
821
965
  returnPath: props.signInReturnPath
822
966
  }) : null, /* @__PURE__ */ jsx(QuestionFields, {
@@ -896,58 +1040,21 @@ function AlreadyAnswered(input) {
896
1040
  }) })]
897
1041
  });
898
1042
  }
899
- function SignInNotice(props) {
900
- const [open, setOpen] = React$1.useState(false);
901
- const [handOff, setHandOff] = React$1.useState(null);
902
- const api = useBlockApiOptional();
903
- const signIn = () => {
904
- const outcome = requestSignIn(window.location.href, () => setOpen(true), api?.config.pageNavigation);
905
- if (outcome.kind === "handOff") setHandOff(outcome);
906
- };
907
- const titleId = `${React$1.useId()}-sign-in-title`;
908
- if (handOff) return /* @__PURE__ */ jsx(NavigationHandOffPanel, {
909
- handOff,
910
- onBack: () => setHandOff(null)
911
- });
912
- return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("p", {
913
- className: "rb-bq-note",
914
- children: [
915
- "Booked with us before?",
916
- " ",
917
- /* @__PURE__ */ jsx("button", {
918
- type: "button",
919
- className: "rb-bq-link",
920
- onClick: signIn,
921
- children: "Sign in"
922
- }),
923
- " ",
924
- "and we’ll fill in the answers you gave last time."
925
- ]
926
- }), open ? /* @__PURE__ */ jsx(ModalShell, {
927
- title: "Sign in with email",
928
- titleId,
929
- onClose: () => setOpen(false),
930
- overlayClassName: "rb-reg-modal-overlay",
931
- modalClassName: "rb-reg-modal",
932
- titleClassName: "rb-reg-modal-title",
933
- closeButtonClassName: "rb-reg-modal-close",
934
- children: /* @__PURE__ */ jsx("div", {
935
- className: "rb-reg-modal-content",
936
- children: /* @__PURE__ */ jsx(MagicLinkForm, {
937
- initialEmail: props.email,
938
- subtitle: "Enter your email and we’ll send you a link to sign in.",
939
- buttonText: "Send sign-in link",
940
- successMessage: (email) => `We’ve sent a sign-in link to ${email}.`,
941
- successDetail: "Open it on this device and you’ll come back to this booking with everything you’ve typed so far.",
942
- successAction: {
943
- label: "Back to my booking",
944
- onClick: () => setOpen(false)
945
- },
946
- classPrefix: "rb-reg",
947
- returnPath: props.returnPath
948
- })
949
- })
950
- }) : null] });
1043
+ //#endregion
1044
+ //#region ../blocks/src/system/runtime/shared/components/OrganiserContactLine.tsx
1045
+ /** The business's published email and phone, as links a client can tap. */
1046
+ function OrganiserContactLine({ contact }) {
1047
+ return /* @__PURE__ */ jsxs("p", { children: [
1048
+ contact.email ? /* @__PURE__ */ jsx("a", {
1049
+ href: `mailto:${contact.email}`,
1050
+ children: contact.email
1051
+ }) : null,
1052
+ contact.email && contact.phone ? " · " : null,
1053
+ contact.phone ? /* @__PURE__ */ jsx("a", {
1054
+ href: `tel:${contact.phone.replace(/\s+/g, "")}`,
1055
+ children: contact.phone
1056
+ }) : null
1057
+ ] });
951
1058
  }
952
1059
  //#endregion
953
1060
  //#region ../blocks/src/system/runtime/shared/components/BookingMailingListNote.tsx
@@ -960,4 +1067,4 @@ function BookingMailingListNote(props) {
960
1067
  });
961
1068
  }
962
1069
  //#endregion
963
- export { usePolling as a, useBookingQuestionsRefresh as c, BookingConsentAgreement as i, PaymentChoiceRows as l, BookingQuestionSections as n, portalSessionIdentity as o, MagicLinkForm as r, useSignInReturn as s, BookingMailingListNote as t };
1070
+ export { MagicLinkForm as a, parseBookingSubmissionFailure as c, useSignInReturn as d, useBookingQuestionsRefresh as f, SignInNotice as i, useBookingNowIso as l, OrganiserContactLine as n, BookingConsentAgreement as o, PaymentChoiceRows as p, BookingQuestionSections as r, usePolling as s, BookingMailingListNote as t, portalSessionIdentity as u };
@@ -1,88 +1,28 @@
1
1
  "use client";
2
- import { pn as toUtcIsoDateTimeString } from "./src-CCtanNlD.mjs";
3
- import { s as getInitialFieldValue } from "./creditProducts-BQ1t1erI.mjs";
4
- import { i as BlockApiError } from "./context-DTrwaQtg.mjs";
5
- import { i as ThemedButtonLink } from "./ThemedButton-CnSa7o-I.mjs";
6
- import { t as CheckboxChoice } from "./CheckboxChoice-BZPLCgTU.mjs";
2
+ import { Xt as capitalize } from "./src-ZSqRK3dD.mjs";
3
+ import { l as getInitialFieldValue } from "./bookingCalendar--aWnqFDn.mjs";
4
+ import { t as CheckboxChoice } from "./CheckboxChoice-C8i4NraK.mjs";
7
5
  import { n as getFieldValidationControlProps, t as FieldValidationMessage } from "./FieldValidationMessage-CsqxShw4.mjs";
8
- import { useCallback, useEffect, useState } from "react";
6
+ import "react";
9
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
10
- //#region ../blocks/src/system/runtime/shared/components/DemoPortalSignInLink.tsx
11
- function DemoPortalSignInLink(props) {
12
- return /* @__PURE__ */ jsxs("div", { children: [
13
- /* @__PURE__ */ jsx("h3", { children: "Your sign-in link" }),
14
- /* @__PURE__ */ jsx("p", { children: "In the demo we don’t send emails, so here’s the link we’d have sent you." }),
15
- /* @__PURE__ */ jsx(ThemedButtonLink, {
16
- variant: "default",
17
- size: "md",
18
- label: "Sign in to the portal",
19
- href: props.url
20
- })
21
- ] });
22
- }
23
- //#endregion
24
- //#region ../blocks/src/system/runtime/hooks/useBookingNowIso.ts
25
- const ANCHOR_CLOCK = { kind: "anchor" };
26
- const MAX_TIMER_DELAY_MS = 2147483647;
27
- const browserClock = () => toUtcIsoDateTimeString((/* @__PURE__ */ new Date()).toISOString());
28
- /** The effect owns one timer, including long-delay and early-timer retries. */
29
- function scheduleBookingClockBoundary(boundary, refresh, clock) {
30
- const timer = {};
31
- const schedule = () => {
32
- const delay = Date.parse(boundary) - Date.parse(clock());
33
- if (!Number.isFinite(delay) || delay <= 0) return;
34
- timer.current = setTimeout(() => {
35
- refresh();
36
- schedule();
37
- }, Math.min(delay, MAX_TIMER_DELAY_MS));
8
+ const indefiniteArticle = (word) => /^(honest|honour|hour|heir)/i.test(word) ? "an" : /^(uni([^nmd]|$)|use|user|euro|one|once)/i.test(word) ? "a" : /^[aeiou]/i.test(word) ? "an" : "a";
9
+ function clientPersonPhrases(noun) {
10
+ if (noun == null) return {
11
+ label: "Who with",
12
+ chooseAnother: "Choose someone else",
13
+ anyone: "Anyone who's free",
14
+ chooseYours: "Choose who you'd like to see",
15
+ withName: (name) => `With ${name}`,
16
+ listLabel: () => "With"
38
17
  };
39
- schedule();
40
- return () => {
41
- if (timer.current !== void 0) clearTimeout(timer.current);
42
- };
43
- }
44
- /**
45
- * The supplied server clock snapshot for this booking or registration flow.
46
- *
47
- * Payment previews take this as their "now" so the pure view-model builders
48
- * never read the clock themselves. The anchor stays fixed per mount. Lifecycle
49
- * presentation starts with the same snapshot, then reconciles in effects.
50
- */
51
- function useBookingNowIso(snapshot, policy = ANCHOR_CLOCK, clock = browserClock) {
52
- const [nowIso, setNowIso] = useState(snapshot);
53
- const refresh = useCallback(() => setNowIso(clock()), [clock]);
54
- const nextBoundary = policy.kind === "presentation" ? policy.nextBoundary : null;
55
- useEffect(() => {
56
- if (policy.kind === "anchor") return;
57
- refresh();
58
- const interval = policy.kind === "relative" ? setInterval(refresh, 6e4) : null;
59
- window.addEventListener("focus", refresh);
60
- document.addEventListener("visibilitychange", refresh);
61
- return () => {
62
- if (interval !== null) clearInterval(interval);
63
- window.removeEventListener("focus", refresh);
64
- document.removeEventListener("visibilitychange", refresh);
65
- };
66
- }, [policy.kind, refresh]);
67
- useEffect(() => {
68
- if (!nextBoundary) return;
69
- return scheduleBookingClockBoundary(nextBoundary, refresh, clock);
70
- }, [
71
- nextBoundary,
72
- clock,
73
- refresh
74
- ]);
75
- return nowIso;
76
- }
77
- //#endregion
78
- //#region ../blocks/src/system/runtime/shared/parseBookingSubmissionFailure.ts
79
- /** `fieldPrefix` is where the server puts question field ids: booking flows send them under `bookingQuestions.`, the portal under `answers.`. */
80
- function parseBookingSubmissionFailure(error, fallbackMessage, fieldPrefix = "bookingQuestions.") {
81
- const fieldErrors = error instanceof BlockApiError ? error.fieldErrors : [];
18
+ const singularLabel = capitalize(noun.singular);
82
19
  return {
83
- message: error instanceof Error ? error.message : fallbackMessage,
84
- answersNeeded: fieldErrors.some(({ field, code }) => field === "bookingQuestions" && code === "validation:required"),
85
- questionFieldErrors: Object.fromEntries(fieldErrors.flatMap(({ field, message }) => field.startsWith(fieldPrefix) && field.length > fieldPrefix.length ? [[field.slice(fieldPrefix.length), message]] : []))
20
+ label: singularLabel,
21
+ chooseAnother: `Choose another ${noun.singular}`,
22
+ anyone: `Any ${noun.singular}`,
23
+ chooseYours: `Choose your ${noun.singular}`,
24
+ withName: (name) => `${singularLabel}: ${name}`,
25
+ listLabel: (count) => count === 1 ? singularLabel : capitalize(noun.plural)
86
26
  };
87
27
  }
88
28
  //#endregion
@@ -153,7 +93,7 @@ function SelectQuestionInput({ field, inputId, value, disabled, control, onChang
153
93
  onChange: (event) => onChange(event.target.value),
154
94
  children: [/* @__PURE__ */ jsx("option", {
155
95
  value: "",
156
- children: "Select an option..."
96
+ children: "Choose one"
157
97
  }), options]
158
98
  });
159
99
  }
@@ -244,6 +184,7 @@ function BookingQuestionFieldInput(props) {
244
184
  });
245
185
  }
246
186
  }
187
+ /** The input's ARIA: described by its help and error, required when the question is. */
247
188
  function questionControlProps(field, ids, error) {
248
189
  return {
249
190
  ...getFieldValidationControlProps({
@@ -356,4 +297,4 @@ function BookingQuestionFields({ sections, values, fieldErrors = {}, onChange, d
356
297
  }, section.id)) });
357
298
  }
358
299
  //#endregion
359
- export { DemoPortalSignInLink as a, useBookingNowIso as i, OptionalMark as n, parseBookingSubmissionFailure as r, BookingQuestionFields as t };
300
+ export { questionControlProps as a, isChoiceGroup as i, BookingQuestionFields as n, clientPersonPhrases as o, OptionalMark as r, indefiniteArticle as s, BookingQuestionFieldInput as t };
@@ -0,0 +1,105 @@
1
+ "use client";
2
+ import { n as ThemedButton } from "./ThemedButton-PFOhXktM.mjs";
3
+ import { useEffect, useId, useRef, useState } from "react";
4
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
+ //#region ../blocks/src/system/runtime/nodes/event-registration/CalendarAction.tsx
6
+ /** Download effects happen only after a click, including in editor preview. */
7
+ async function downloadCalendar(calendar) {
8
+ const { renderCalendarFeedIcs } = await import("./src-DqMbCjI1.mjs");
9
+ const url = URL.createObjectURL(new Blob([renderCalendarFeedIcs(calendar.feed)], { type: "text/calendar;charset=utf-8" }));
10
+ const link = document.createElement("a");
11
+ link.href = url;
12
+ link.download = calendar.fileName;
13
+ document.body.append(link);
14
+ link.click();
15
+ link.remove();
16
+ setTimeout(() => URL.revokeObjectURL(url), 0);
17
+ }
18
+ function CalendarAction({ calendar }) {
19
+ const [open, setOpen] = useState(false);
20
+ const [downloadFailed, setDownloadFailed] = useState(false);
21
+ const id = useId();
22
+ const choicesRef = useRef(null);
23
+ useEffect(() => {
24
+ if (open) choicesRef.current?.scrollIntoView({ block: "nearest" });
25
+ }, [open]);
26
+ const close = () => setOpen(false);
27
+ const download = async (value) => {
28
+ setDownloadFailed(false);
29
+ try {
30
+ await downloadCalendar(value);
31
+ close();
32
+ } catch {
33
+ setDownloadFailed(true);
34
+ }
35
+ };
36
+ if (!calendar) return null;
37
+ return /* @__PURE__ */ jsxs("div", {
38
+ className: "er-calendar-action",
39
+ onBlur: (event) => {
40
+ if (!event.currentTarget.contains(event.relatedTarget)) close();
41
+ },
42
+ onKeyDown: (event) => {
43
+ if (event.key === "Escape" && open) {
44
+ event.stopPropagation();
45
+ close();
46
+ event.currentTarget.querySelector("button")?.focus();
47
+ }
48
+ },
49
+ children: [calendar.kind === "sessions" ? /* @__PURE__ */ jsx(ThemedButton, {
50
+ type: "button",
51
+ variant: "outline",
52
+ size: "md",
53
+ extraClassName: "er-calendar-action__trigger",
54
+ label: calendar.sessionCount === 2 ? "Add both sessions to your calendar" : `Add all ${calendar.sessionCount} sessions to your calendar`,
55
+ onClick: () => {
56
+ download(calendar);
57
+ }
58
+ }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ThemedButton, {
59
+ type: "button",
60
+ variant: "outline",
61
+ size: "md",
62
+ extraClassName: "er-calendar-action__trigger er-calendar-action__trigger--disclosure",
63
+ label: "Add to calendar",
64
+ "aria-expanded": open,
65
+ "aria-controls": id,
66
+ onClick: () => setOpen(!open)
67
+ }), open ? /* @__PURE__ */ jsxs("div", {
68
+ id,
69
+ ref: choicesRef,
70
+ className: "er-calendar-action__choices",
71
+ children: [
72
+ /* @__PURE__ */ jsx("a", {
73
+ className: "er-calendar-action__choice",
74
+ href: calendar.googleUrl,
75
+ target: "_blank",
76
+ rel: "noopener noreferrer",
77
+ onClick: close,
78
+ children: "Google Calendar"
79
+ }),
80
+ /* @__PURE__ */ jsx("a", {
81
+ className: "er-calendar-action__choice",
82
+ href: calendar.outlookUrl,
83
+ target: "_blank",
84
+ rel: "noopener noreferrer",
85
+ onClick: close,
86
+ children: "Outlook.com"
87
+ }),
88
+ /* @__PURE__ */ jsx("button", {
89
+ type: "button",
90
+ className: "er-calendar-action__choice",
91
+ onClick: () => {
92
+ download(calendar);
93
+ },
94
+ children: "Apple Calendar or other (.ics file)"
95
+ })
96
+ ]
97
+ }) : null] }), downloadFailed ? /* @__PURE__ */ jsx("p", {
98
+ role: "alert",
99
+ className: "er-calendar-action__error",
100
+ children: "We couldn't create the calendar file. Please try again."
101
+ }) : null]
102
+ });
103
+ }
104
+ //#endregion
105
+ export { downloadCalendar as n, CalendarAction as t };
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import { bn as formatEventPrice } from "./newsletter-form.interactive-DCO1lErD.mjs";
3
- import { Da as formatEventRemainingPlaces, Na as isEventFull, Ua as eventDateOptions, no as groupEventsByDate, ro as resolveEventTimeZone, to as formatTime, xa as formatEventLocation, ya as eventPlaceName } from "./wizardSteps-CNDsxeJH.mjs";
4
- import { Kt as formatDate, un as parseBookingLocalDate } from "./src-CCtanNlD.mjs";
5
- import { r as listLookSlot, t as listItemPresentation } from "./lookSurfaces-IqT_SVnX.mjs";
6
- import { i as ThemedButtonLink, r as ThemedButton } from "./ThemedButton-CnSa7o-I.mjs";
2
+ import { xn as formatEventPrice } from "./newsletter-form.interactive-RuM86VAv.mjs";
3
+ import { bn as parseBookingLocalDate, nn as formatDate } from "./src-ZSqRK3dD.mjs";
4
+ import { Go as resolveEventTimeZone, Uo as formatTime, Wo as groupEventsByDate, ho as formatEventRemainingPlaces, jo as eventDateOptions, lo as formatEventLocation, so as eventPlaceName, xo as isEventFull } from "./wizardSteps-BliJOzEX.mjs";
5
+ import { i as listLookSlot, n as listItemPresentation } from "./noop-Dl4mZ-rr.mjs";
6
+ import { n as ThemedButton, r as ThemedButtonLink } from "./ThemedButton-PFOhXktM.mjs";
7
7
  import { d as formatDateKey, v as isToday } from "./src-uwCpbHXG.mjs";
8
- import { _ as resolveEventLinkProps, g as resolveEventCta, l as eventDisplayTitle, m as formatEventTeacherLine, r as EventItem, u as eventDisplayTitleText } from "./EventItem-Duhk1vnF.mjs";
8
+ import { _ as resolveEventLinkProps, g as resolveEventCta, l as eventDisplayTitle, m as formatEventTeacherLine, r as EventItem, u as eventDisplayTitleText } from "./EventItem-CwzrjcRw.mjs";
9
9
  import "react";
10
10
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
11
11
  //#region ../core/src/duration.ts
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { S as clsx } from "./ThemedButton-CnSa7o-I.mjs";
2
+ import { x as clsx } from "./ThemedButton-PFOhXktM.mjs";
3
3
  import React from "react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  //#region ../blocks/src/system/runtime/shared/components/CheckboxChoice.tsx
@@ -1,9 +1,10 @@
1
1
  "use client";
2
- import { f as err, p as ok } from "./renderableMediaAssetAdmission-BlfqYLJW.mjs";
3
- import { pa as leavePage } from "./wizardSteps-CNDsxeJH.mjs";
4
- import { i as BlockApiError, n as useBlockApi } from "./context-DTrwaQtg.mjs";
5
- import { r as ThemedButton } from "./ThemedButton-CnSa7o-I.mjs";
6
- import { i as requestDemoPortalMagicLink, r as buildPortalCallbackUrl, t as CUSTOMER_PORTAL_PATH } from "./demoPortalMagicLink-D0kOJYOX.mjs";
2
+ import { m as ok, p as err } from "./renderableMediaAssetAdmission-BsOWd9lf.mjs";
3
+ import { mr as isEmailAddress, to as leavePage } from "./wizardSteps-BliJOzEX.mjs";
4
+ import { t as CUSTOMER_PORTAL_PATH } from "./portalRoutes-D72yvtDh.mjs";
5
+ import { i as BlockApiError, n as useBlockApi } from "./context-CRhn9qzS.mjs";
6
+ import { n as ThemedButton } from "./ThemedButton-PFOhXktM.mjs";
7
+ import { n as buildPortalCallbackUrl, r as requestDemoPortalMagicLink } from "./demoPortalMagicLink-CWDGSTBu.mjs";
7
8
  import React, { useCallback, useEffect, useId, useRef, useState } from "react";
8
9
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
10
  //#region ../blocks/src/system/runtime/api/types/discounts.ts
@@ -22,7 +23,7 @@ function getAutoAppliedDiscountPreview(availability) {
22
23
  }
23
24
  }
24
25
  //#endregion
25
- //#region ../blocks/src/system/runtime/shared/components/DiscountCodeDisclosure.tsx
26
+ //#region ../blocks/src/system/runtime/shared/components/DiscountCodeDisclosure.classes.ts
26
27
  const BLOCK_DISCOUNT_CODE_DISCLOSURE_CLASSES = { "event-registration": {
27
28
  root: "er-discount",
28
29
  toggle: "er-discount__toggle",
@@ -52,6 +53,8 @@ function getDiscountCodeDisclosureClasses(surface) {
52
53
  if (surface === "theme-form") return themeFormClasses;
53
54
  return BLOCK_DISCOUNT_CODE_DISCLOSURE_CLASSES[surface];
54
55
  }
56
+ //#endregion
57
+ //#region ../blocks/src/system/runtime/shared/components/DiscountCodeDisclosure.tsx
55
58
  function DiscountActionButton(props) {
56
59
  return props.surface === "theme-form" ? /* @__PURE__ */ jsx(ThemedButton, {
57
60
  type: "button",
@@ -220,7 +223,6 @@ function handOffDescription(props, offering) {
220
223
  }
221
224
  //#endregion
222
225
  //#region ../blocks/src/system/runtime/nodes/shop-checkout-form.ts
223
- const EMAIL_PATTERN = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
224
226
  function normalizeManualDiscountCode(raw) {
225
227
  const trimmed = raw.trim();
226
228
  return trimmed ? trimmed : null;
@@ -231,7 +233,7 @@ function normalizeCheckoutEmail(raw) {
231
233
  type: "missing_contact",
232
234
  message: "Please enter your email"
233
235
  });
234
- if (!EMAIL_PATTERN.test(email)) return err({
236
+ if (!isEmailAddress(email)) return err({
235
237
  type: "invalid_email",
236
238
  message: "Please enter a valid email address"
237
239
  });
@@ -352,9 +354,15 @@ function checkoutFormForDiscountUiState(form, discountUiState) {
352
354
  const DISCOUNT_APPLY_MESSAGES = {
353
355
  emptyCode: "Enter a discount code first.",
354
356
  emailRequired: "Enter your email before applying a code.",
357
+ emailInvalid: "Your email address doesn't look quite right. Check it, then apply the code again.",
355
358
  unavailable: "This code doesn't work for this booking.",
356
359
  unknown: "We couldn't check that code. Try again."
357
360
  };
361
+ /** Why a code can't be checked yet: the server prices a code for a customer, so it needs a valid email first. */
362
+ function discountEmailProblem(email) {
363
+ if (!email.trim()) return DISCOUNT_APPLY_MESSAGES.emailRequired;
364
+ return isEmailAddress(email) ? null : DISCOUNT_APPLY_MESSAGES.emailInvalid;
365
+ }
358
366
  /** A code the server refused at checkout, as opposed to the checkout itself failing. */
359
367
  function isDiscountCodeRefusal(error) {
360
368
  return error instanceof BlockApiError && error.fieldErrors.some((field) => field.field === "discountCode");
@@ -374,7 +382,7 @@ function planDiscountApplyRequest(options) {
374
382
  const discountCode = normalizeManualDiscountCode(options.state.draftCode);
375
383
  if (!discountCode) return refusedDiscountApply("empty_code", DISCOUNT_APPLY_MESSAGES.emptyCode);
376
384
  const email = normalizeCheckoutEmail(options.getCustomerEmail());
377
- if (!email.ok) return refusedDiscountApply("email_required", DISCOUNT_APPLY_MESSAGES.emailRequired);
385
+ if (!email.ok) return refusedDiscountApply("email_required", discountEmailProblem(options.getCustomerEmail()) ?? DISCOUNT_APPLY_MESSAGES.emailRequired);
378
386
  const linesPlan = options.getLines();
379
387
  if (!linesPlan.ok || linesPlan.lines.length === 0) return refusedDiscountApply("unavailable", DISCOUNT_APPLY_MESSAGES.unavailable);
380
388
  return {
@@ -542,4 +550,4 @@ function handlePortalAccessError(error) {
542
550
  };
543
551
  }
544
552
  //#endregion
545
- export { useDiscountApply as a, normalizeManualDiscountCode as c, planUnifiedCheckoutRequest as d, NavigationHandOffPanel as f, getAutoAppliedDiscountPreview as g, discountAvailabilityHasDiscounts as h, isDiscountCodeRefusal as i, planCartDiscountAvailabilityRequests as l, discountAvailabilityAllowsManualEntry as m, DemoBookingPortalAccess as n, aggregateCartDiscountUiState as o, DiscountCodeDisclosure as p, DISCOUNT_APPLY_MESSAGES as r, checkoutFormForDiscountUiState as s, BookingConfirmation as t, planDirectShopCheckoutRequest as u };
553
+ export { getAutoAppliedDiscountPreview as _, isDiscountCodeRefusal as a, checkoutFormForDiscountUiState as c, planDirectShopCheckoutRequest as d, planUnifiedCheckoutRequest as f, discountAvailabilityHasDiscounts as g, discountAvailabilityAllowsManualEntry as h, discountEmailProblem as i, normalizeManualDiscountCode as l, DiscountCodeDisclosure as m, DemoBookingPortalAccess as n, useDiscountApply as o, NavigationHandOffPanel as p, DISCOUNT_APPLY_MESSAGES as r, aggregateCartDiscountUiState as s, BookingConfirmation as t, planCartDiscountAvailabilityRequests as u };