@riverbankcms/sdk 0.180.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 (232) hide show
  1. package/dist/_dts/{BlocksIslandsHydrator-DC_AvZwy.d.ts → BlocksIslandsHydrator-CVCasDPz.d.ts} +1 -1
  2. package/dist/_dts/{Page-DQOxVtp3.d.ts → Page-Dtj2Ui3S.d.ts} +7 -7
  3. package/dist/_dts/{SdkPreviewMode-DrLgY9_f.d.ts → SdkPreviewMode-D1f_60WW.d.ts} +2 -2
  4. package/dist/_dts/{client-BP7VBRvs.d.ts → client-Chr9pNVW.d.ts} +58 -70
  5. package/dist/_dts/{content-types-1-K2qi__.d.ts → content-types-kjccgopX.d.ts} +2 -2
  6. package/dist/_dts/{contracts-Dfqz0Tcu.d.ts → contracts-BodaiS00.d.ts} +3 -3
  7. package/dist/_dts/{generatePageMetadata-CSfAqmry.d.ts → generatePageMetadata-BS6kaJFp.d.ts} +2 -2
  8. package/dist/_dts/{index-BeM5Ylwf.d.ts → index-Brl6_I2j.d.ts} +1 -2
  9. package/dist/_dts/{index-CB5Csefo.d.ts → index-CJkefwYh.d.ts} +2 -2
  10. package/dist/_dts/{index-DQBGwBPx.d.ts → index-D1WpKwQe.d.ts} +1 -1
  11. package/dist/_dts/{index-DQr358-m.d.ts → index-DG0OvBs0.d.ts} +8 -8
  12. package/dist/_dts/{index-Blrw2oVk.d.ts → index-Diqt0PvG.d.ts} +1 -1
  13. package/dist/_dts/{index-DCcxLa8p.d.ts → index-Dy50xUMK.d.ts} +2 -2
  14. package/dist/_dts/{loadContent-BG2tLGXj.d.ts → loadContent-BgxshKrA.d.ts} +7 -7
  15. package/dist/_dts/{request-P08l6mkr.d.ts → request-CA0izds5.d.ts} +2498 -1108
  16. package/dist/_dts/{resolveBlockData-BDHc8lFs.d.ts → resolveBlockData-ChQmwEd3.d.ts} +5 -5
  17. package/dist/_dts/{resolvePageContent-Y3IZBbtL.d.ts → resolvePageContent-BvGyvblj.d.ts} +1 -1
  18. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  19. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  20. package/dist/_dts/sdk/src/client.d.ts +7 -7
  21. package/dist/_dts/sdk/src/config/index.d.ts +6 -6
  22. package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
  23. package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
  24. package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
  25. package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
  26. package/dist/_dts/sdk/src/data/types.d.ts +2 -2
  27. package/dist/_dts/sdk/src/gifting/client.d.ts +1 -2
  28. package/dist/_dts/sdk/src/index.d.ts +104 -8
  29. package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
  30. package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
  31. package/dist/_dts/sdk/src/navigation/index.d.ts +3 -3
  32. package/dist/_dts/sdk/src/next/index.d.ts +83 -52
  33. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  34. package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
  35. package/dist/_dts/sdk/src/portal/client.d.ts +43 -56
  36. package/dist/_dts/sdk/src/portal/index.d.ts +3 -18
  37. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  38. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  39. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  40. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  41. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  42. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
  43. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
  44. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
  45. package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
  46. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  47. package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
  48. package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
  49. package/dist/_dts/sdk/src/routing/index.d.ts +6 -6
  50. package/dist/_dts/sdk/src/server.d.ts +5 -5
  51. package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
  52. package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
  53. package/dist/_dts/{serviceBookingOutline-BvtNagjw.d.ts → serviceBookingOutline-BgFbJQhU.d.ts} +6 -6
  54. package/dist/_dts/{types-HAy1-Jjo.d.ts → types-CQrsP1x_.d.ts} +3 -3
  55. package/dist/_dts/{types-DpEAnP4F.d.ts → types-CgS3xLk8.d.ts} +2 -2
  56. package/dist/_dts/{types-BrK6SS5c.d.ts → types-R65DKjPn.d.ts} +7 -7
  57. package/dist/_dts/{validation-D6q3tOBA.d.ts → validation-6LTIbuBA.d.ts} +4 -4
  58. package/dist/client/{BlocksIslandsHydrator-DJSmdNUJ.mjs → BlocksIslandsHydrator-DqZPz6oW.mjs} +19 -19
  59. package/dist/client/{BookingMailingListNote-CGxg37zx.mjs → BookingMailingListNote-uWfR2kaG.mjs} +93 -18
  60. package/dist/client/{BookingQuestionFields-DXegGSnS.mjs → BookingQuestionFields-CyNIKw6k.mjs} +7 -87
  61. package/dist/client/CalendarAction-D_Glwvz2.mjs +105 -0
  62. package/dist/client/{CalendarNavigationChevron-VfP50sYm.mjs → CalendarNavigationChevron-BGCX3zwG.mjs} +6 -6
  63. package/dist/client/{CheckboxChoice-BZPLCgTU.mjs → CheckboxChoice-C8i4NraK.mjs} +1 -1
  64. package/dist/client/{DemoBookingPortalAccess-0Ua44F1j.mjs → DemoBookingPortalAccess-DFLPyuqe.mjs} +9 -6
  65. package/dist/client/{EventCalendar.client-CrpiyDSP.mjs → EventCalendar.client-zDL4-t-B.mjs} +10 -10
  66. package/dist/client/{EventCombined.client-D0me9wnz.mjs → EventCombined.client-uciDKLID.mjs} +60 -10
  67. package/dist/client/{EventEmbeddedCheckoutStep-BDnicDM6.mjs → EventEmbeddedCheckoutStep-BGkbUhuw.mjs} +1 -1
  68. package/dist/client/{EventItem-CJITrGkF.mjs → EventItem-CwzrjcRw.mjs} +6 -6
  69. package/dist/client/{EventListWeekNavigation-BlEm_xjq.mjs → EventListWeekNavigation-ChvcnPma.mjs} +1 -1
  70. package/dist/client/{EventListing.client-BNM_HuS0.mjs → EventListing.client-DA57Qoyx.mjs} +3 -3
  71. package/dist/client/{EventListing.view-CXfb7RRy.mjs → EventListing.view-DZ0qMFF4.mjs} +6 -6
  72. package/dist/client/{EventRegistrationPayment-DiD9uYs6.mjs → EventRegistrationPayment-DSqCJL8E.mjs} +700 -514
  73. package/dist/client/{Page-bX7iy_MK.mjs → Page-C7mygH_f.mjs} +389 -248
  74. package/dist/client/{ProtectedSubmitButton-De6AzhE6.mjs → ProtectedSubmitButton-BNnKuir8.mjs} +1 -1
  75. package/dist/client/{SiteTermsAgreementField-BAdW5DvE.mjs → SiteTermsAgreementField-B4z-e4Wq.mjs} +7 -11
  76. package/dist/client/{StepIndicator-DCfdcb7s.mjs → StepIndicator-Dn_DY4oY.mjs} +1 -1
  77. package/dist/client/{StepIndicator-DCqorVne.mjs → StepIndicator-atfDU82W.mjs} +21 -13
  78. package/dist/client/{ThemedButton-CnSa7o-I.mjs → ThemedButton-PFOhXktM.mjs} +1 -33
  79. package/dist/client/{accessibleSurfaces-Wl8-_OVJ.mjs → accessibleSurfaces-n6kS6Hct.mjs} +77 -1
  80. package/dist/client/{accordion-wofJY8xY.mjs → accordion-CsW8U3ff.mjs} +1 -1
  81. package/dist/client/{booking-form.client-CYl9NrqS.mjs → booking-form.client-cBWM392H.mjs} +52 -29
  82. package/dist/client/bookingCalendar--aWnqFDn.mjs +180 -0
  83. package/dist/client/{bookingForm-kgVWtuMe.mjs → bookingForm-DgySpp6C.mjs} +4 -4
  84. package/dist/client/bookings.mjs +17 -11
  85. package/dist/client/{boxStyleClassNames-CQHWz5gJ.mjs → boxStyleClassNames-BpGVdLFD.mjs} +2 -2
  86. package/dist/client/{carousel-BE1dEFsD.mjs → carousel-DJoleFV3.mjs} +2 -2
  87. package/dist/client/{carousel.client-DMtGYTTM.mjs → carousel.client-BtLwHefX.mjs} +1 -1
  88. package/dist/client/{cart-BsjsdGZE.mjs → cart-EO5o6uPH.mjs} +3 -3
  89. package/dist/client/{cart.client-DylGUWXY.mjs → cart.client-D_gPw45z.mjs} +1 -1
  90. package/dist/client/{checkout-B5KxEUDr.mjs → checkout-NVfZW0kR.mjs} +3 -3
  91. package/dist/client/{checkout.client-C98fhch3.mjs → checkout.client-DD3JuqOy.mjs} +1 -1
  92. package/dist/client/{checkoutUrls-BMLYTf38.mjs → checkoutUrls-z2gXvlGw.mjs} +1 -1
  93. package/dist/client/client.mjs +87 -43
  94. package/dist/client/{constants-PfYJsEZF.mjs → constants-CoOkvw__.mjs} +1 -2
  95. package/dist/client/{context-DtKdUdkO.mjs → context-CRhn9qzS.mjs} +732 -370
  96. package/dist/client/{dateFormatting-BaGPvQS3.mjs → dateFormatting-BnWB4L1s.mjs} +15 -25
  97. package/dist/client/{demoPortalMagicLink-B8eDjhuG.mjs → demoPortalMagicLink-CWDGSTBu.mjs} +2 -3
  98. package/dist/client/{enhanceHeaderSection-DvhD-8eE.mjs → enhanceHeaderSection-tdP_-Z9o.mjs} +4 -5
  99. package/dist/client/{event-registration.client-Du9a_xAN.mjs → event-registration.client-D7YYKySQ.mjs} +191 -210
  100. package/dist/client/{eventCalendar-Di9wDfzl.mjs → eventCalendar-CsAfu5d0.mjs} +4 -4
  101. package/dist/client/{eventCombined-CNW6nBsB.mjs → eventCombined-VXJB5CoS.mjs} +4 -4
  102. package/dist/client/{eventListing-CQMxQ8By.mjs → eventListing-B3KIZNfY.mjs} +4 -4
  103. package/dist/client/{eventRegistration-CprS9k1D.mjs → eventRegistration-BP-dEk1c.mjs} +4 -4
  104. package/dist/client/{form-Zl1_8RJ6.mjs → form-DM8Zbxbv.mjs} +3 -3
  105. package/dist/client/{form.client-TaMUys6I.mjs → form.client-e2z_Tlgk.mjs} +5 -5
  106. package/dist/client/{form.parts-CpNPbPPM.mjs → form.parts-Ctljy1a3.mjs} +3 -3
  107. package/dist/client/gifting/client.mjs +32 -29
  108. package/dist/client/{gifting-DNVa7-Wj.mjs → gifting-DWIsqQru.mjs} +4 -4
  109. package/dist/client/{gifting.client-CFUq3GVx.mjs → gifting.client-QsSWF0uA.mjs} +5 -5
  110. package/dist/client/{gifting.parts-CDQvxA4A.mjs → gifting.parts-CedLgwa_.mjs} +2 -2
  111. package/dist/client/{headerSection-Cg6083rn.mjs → headerSection-DAkRkwb-.mjs} +2 -2
  112. package/dist/client/{mediaAssets-B99AP7ai.mjs → mediaAssets-COfQolI3.mjs} +1 -1
  113. package/dist/client/{mediaContext-Fusweriw.mjs → mediaContext-DzvnjYXm.mjs} +1 -1
  114. package/dist/client/{newsletter-form.client-VuL9I96G.mjs → newsletter-form.client-WYja9-WN.mjs} +7 -7
  115. package/dist/client/{newsletter-form.interactive-7Of3eYn0.mjs → newsletter-form.interactive-RuM86VAv.mjs} +23 -24
  116. package/dist/client/{newsletter-form.parts-OBqsfT24.mjs → newsletter-form.parts-2petDnWv.mjs} +2 -2
  117. package/dist/client/{newsletterForm-BkJe_RTv.mjs → newsletterForm-BUbXdA_e.mjs} +3 -3
  118. package/dist/client/{lookSurfaces-gJ3OqPf9.mjs → noop-Dl4mZ-rr.mjs} +167 -49
  119. package/dist/client/portal/client.mjs +13040 -8190
  120. package/dist/client/portalOrders-COGn4BKG.mjs +596 -0
  121. package/dist/client/portalRoutes-D72yvtDh.mjs +862 -0
  122. package/dist/client/{product-detail.client-B2hdxqJN.mjs → product-detail.client-pOAryevt.mjs} +1 -1
  123. package/dist/client/{product-list.client-CCEgu9rx.mjs → product-list.client-CcUpUiud.mjs} +1 -1
  124. package/dist/client/{productDetail-CRX_ZRfS.mjs → productDetail-BZJCfqat.mjs} +3 -3
  125. package/dist/client/{productList-BAdJ6z5S.mjs → productList-CiRs3mNb.mjs} +3 -3
  126. package/dist/client/{propsDecoder-BLKAmX0S.mjs → propsDecoder--uHW4tFM.mjs} +2 -2
  127. package/dist/client/{registry.server-Bj9cmHHF.mjs → registry.server-CDNNd8wC.mjs} +247 -203
  128. package/dist/client/{renderableMediaAssetAdmission-BlfqYLJW.mjs → renderableMediaAssetAdmission-BsOWd9lf.mjs} +1 -1
  129. package/dist/client/rendering/client.mjs +26 -26
  130. package/dist/client/rendering/islands.mjs +1 -1
  131. package/dist/client/rendering.mjs +16 -8
  132. package/dist/client/{richText-coerce-Z45OLLEX.mjs → richText-coerce-CQGE_wHV.mjs} +2 -1
  133. package/dist/client/{routeIslandApiConfig-DHpTTK77.mjs → routeIslandApiConfig-BtCg87-N.mjs} +1 -1
  134. package/dist/client/{runtimeResponse-D2j2-mOk.mjs → runtimeResponse-DL_ARBpa.mjs} +1 -1
  135. package/dist/client/{runtimeResponse-DtWSfWSZ.mjs → runtimeResponse-Ds9cmBUf.mjs} +1 -1
  136. package/dist/client/{shop-BKsgxm_-.mjs → shop-Rx_gEMK8.mjs} +3 -3
  137. package/dist/client/{shop-commerce-Cbtk_kUW.mjs → shop-commerce-D8evQnMT.mjs} +53 -16
  138. package/dist/client/{shop-commerce-store-B-rv2p5h.mjs → shop-commerce-store-C9PcsSTj.mjs} +22 -5
  139. package/dist/client/{shop-discount-apply.state-CiCDLNh7.mjs → shop-discount-apply.state-D5CtGfJI.mjs} +2 -2
  140. package/dist/client/{shop.client-Rnqa74Tk.mjs → shop.client-D4lzQ9oY.mjs} +17 -39
  141. package/dist/client/{shopShared-BaBfhjCq.mjs → shopShared-BVbq7Nm-.mjs} +2 -2
  142. package/dist/client/spam-protection.mjs +1 -1
  143. package/dist/client/src-Al4ooTl_.mjs +164 -0
  144. package/dist/client/{src-o7WEvbK1.mjs → src-ZSqRK3dD.mjs} +228 -90
  145. package/dist/client/{timetableModel-BOff1Kk5.mjs → timetableModel-BQJrSK0K.mjs} +9 -78
  146. package/dist/client/{shop-add-feedback-DvC2kP1K.mjs → urlParams-C2QHo1Pa.mjs} +1 -42
  147. package/dist/client/{useAvailableSlots-DQJNh10g.mjs → useAvailableSlots-Dm3lKJKR.mjs} +2 -3
  148. package/dist/client/{useDiscountCodeUi-BcFQRI_7.mjs → useDiscountCodeUi-klgfGn7f.mjs} +1 -1
  149. package/dist/client/{useEventPagination-BvdcexDC.mjs → useEventPagination-Jnjt7_ly.mjs} +8 -8
  150. package/dist/client/{view-CTBwSpKv.mjs → view-CC_yQLSA.mjs} +4 -4
  151. package/dist/client/{wizardSteps-CWIQyRIw.mjs → wizardSteps-BliJOzEX.mjs} +953 -279
  152. package/dist/preview-next/client/{PageSectionToolbar-CG6KwITA.mjs → PageSectionToolbar-BhL0uADo.mjs} +3 -3
  153. package/dist/preview-next/client/{PreviewEditorSidebar-BGBqrC9m.mjs → PreviewEditorSidebar-Ct8eIm0i.mjs} +5 -5
  154. package/dist/preview-next/client/{PreviewEditorUI-Bwkyx28x.mjs → PreviewEditorUI-BS32G4V9.mjs} +4 -4
  155. package/dist/preview-next/client/{PreviewShell-DB1l6JNU.mjs → PreviewShell-RL0WfZXD.mjs} +5 -5
  156. package/dist/preview-next/client/{SdkPreviewModeRuntime-Bs6Cwzr3.mjs → SdkPreviewModeRuntime-MK_gHeGy.mjs} +29 -5
  157. package/dist/preview-next/client/{previewAssistantSlot-T-oDD_Dd.mjs → previewAssistantSlot-CQyS8pcq.mjs} +5011 -2074
  158. package/dist/preview-next/client/{previewChromeRoot-BeukcDRy.mjs → previewChromeRoot-BSxp3Mfu.mjs} +1 -1
  159. package/dist/preview-next/client/runtime.mjs +3 -3
  160. package/dist/preview-next/client/{sdk-runtime-ceDW_9q2.mjs → sdk-runtime-DKnTzy74.mjs} +2 -2
  161. package/dist/preview-next/client/{siteStyleAccess-CCB9bScO.mjs → siteStyleAccess-BlmbvbLN.mjs} +3 -3
  162. package/dist/preview-next/client/{useAutosaveStatus-D4o0CKq7.mjs → useAutosaveStatus-D-7GwZOQ.mjs} +1 -1
  163. package/dist/preview-next/client/{useOpenBlockForSetup-Seccrvwu.mjs → useOpenBlockForSetup-BNZtGM5g.mjs} +1 -1
  164. package/dist/preview-next/container-responsive.css +203 -174
  165. package/dist/preview-next/keepAlive.mjs +1 -1
  166. package/dist/preview-next/middleware.mjs +1 -1
  167. package/dist/preview-next/{route-contract-FwFj8zGL.mjs → route-contract-R3PcMmax.mjs} +71 -37
  168. package/dist/server/{Block.shared-D6WrRCxX.mjs → Block.shared-CniF9tSu.mjs} +5 -5
  169. package/dist/server/{ThemeScopeCore-BQzjDQ2q.mjs → ThemeScopeCore-BQWsnGT6.mjs} +126 -120
  170. package/dist/server/{accessibleSurfaces-CM3QANtw.mjs → accessibleSurfaces-WPzUAHp4.mjs} +33 -2
  171. package/dist/server/accordions-By_0Ykks.mjs +111 -0
  172. package/dist/server/{bindings-CS6ih1Yc.mjs → bindings-DxojjtK3.mjs} +7 -7
  173. package/dist/server/{client-m0ylCj_f.mjs → client-CDndhbYO.mjs} +86 -42
  174. package/dist/server/config-validation.mjs +1 -1
  175. package/dist/server/config.mjs +2 -2
  176. package/dist/server/constants-VyF5nEhL.mjs +1474 -0
  177. package/dist/server/{customCss-BZ8YSrQg.mjs → customCss-C9kgPHvr.mjs} +41 -5
  178. package/dist/server/data/resolveBlockData.mjs +1 -1
  179. package/dist/server/index.mjs +3 -3
  180. package/dist/server/{loadContent-vgWMz1uD.mjs → loadContent-BKstMBmX.mjs} +5 -4
  181. package/dist/server/{loadPage-CIOL3-9t.mjs → loadPage-IgNnZaqr.mjs} +3 -3
  182. package/dist/server/{lookMediaFrame-m-91jGGn.mjs → lookMediaFrame-TFjgNG61.mjs} +38 -18
  183. package/dist/server/manifest.mjs +36 -25
  184. package/dist/server/{mapLocation-BM5WX7FY.mjs → mapLocation-MDDSubTp.mjs} +1 -1
  185. package/dist/server/media-BRmYrnzb.mjs +31 -0
  186. package/dist/server/{media-luf7RF22.mjs → media-gvfIw3z8.mjs} +2 -31
  187. package/dist/server/{navigation-BcNfYYuu.mjs → navigation-quBYlSKD.mjs} +2 -2
  188. package/dist/server/navigation.mjs +1 -1
  189. package/dist/server/next.mjs +134 -81
  190. package/dist/server/{overrideResolution-BiHmsvTZ.mjs → overrideResolution-CCaAPpIa.mjs} +1 -1
  191. package/dist/server/page-converter.mjs +3 -3
  192. package/dist/server/{pageRenderPlan-DJo_obpi.mjs → pageRenderPlan-B7iULvKe.mjs} +8 -7
  193. package/dist/server/{pageRuntimeSupport-BnSuoHON.mjs → pageRuntimeSupport-BytMroxn.mjs} +5 -5
  194. package/dist/server/{pageShared-BJuOzxzn.mjs → pageShared-Dcs_XTIO.mjs} +243 -323
  195. package/dist/server/{parseThemeForPersistence-DOsfofCy.mjs → parseThemeForPersistence-Bihl4W5K.mjs} +3 -2
  196. package/dist/server/{portal-B4JVkdjc.mjs → portal-CMW_b9mG.mjs} +62 -46
  197. package/dist/server/portal.mjs +3 -3
  198. package/dist/server/portalQuestions-oUyohgL9.mjs +225 -0
  199. package/dist/server/{prebuild-Cr8p8T7V.mjs → prebuild-agaH-vZV.mjs} +1 -1
  200. package/dist/server/prebuild.mjs +1 -1
  201. package/dist/server/{prefetchBlockData-BZh57-ua.mjs → prefetchBlockData-DwpRjqw4.mjs} +4 -3
  202. package/dist/server/{registry-CvhFwbXJ.mjs → registry-DM9dHfDC.mjs} +345 -449
  203. package/dist/server/rendering/components/pageShared.mjs +1 -1
  204. package/dist/server/rendering/helpers/loadPage.mjs +1 -1
  205. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
  206. package/dist/server/rendering/server.mjs +4 -4
  207. package/dist/server/rendering.mjs +10 -9
  208. package/dist/server/{resolveBlockData-Cv_W1LVB.mjs → resolveBlockData-CinHGf8l.mjs} +2 -2
  209. package/dist/server/{resolveButtonColourStates--6yJp9Tq.mjs → resolveButtonColourStates-B0O1IM16.mjs} +2 -1028
  210. package/dist/server/{responseMedia-KRKguBC5.mjs → responseMedia-IfH65QAH.mjs} +1 -1
  211. package/dist/server/{schema-BpsqaSSU.mjs → schema-CwfxQjc4.mjs} +10 -113
  212. package/dist/server/server.mjs +3 -3
  213. package/dist/server/{servicePageContent-CRKbTm_7.mjs → servicePageContent-BBBhOtdE.mjs} +21 -20
  214. package/dist/server/theme-bridge.mjs +3 -2
  215. package/dist/server/theme.mjs +2 -2
  216. package/dist/server/{three-pass-converter-39SXCCnh.mjs → three-pass-converter-DPaUPTfl.mjs} +34 -16
  217. package/dist/server/titleSourceSchema-NhK6azFS.mjs +2018 -0
  218. package/dist/server/typeGuards-CTW_9AXq.mjs +413 -0
  219. package/dist/server/types-BKaBZFjD.mjs +1085 -0
  220. package/dist/server/{validation-DCl-FCk_.mjs → validation-DG5jX3jH.mjs} +70 -17
  221. package/dist/server/{version-DT_R5JAR.mjs → version-CipbxPHL.mjs} +1 -1
  222. package/dist/server/video-Cdr3wh-q.mjs +272 -0
  223. package/dist/styles/index.css +1013 -1840
  224. package/package.json +2 -1
  225. package/dist/_dts/index-B0_2-65A.d.ts +0 -101
  226. package/dist/client/TabBarFragment-DlKQRhP4.mjs +0 -56
  227. package/dist/client/checkoutRoute-DKlZRNZD.mjs +0 -22
  228. package/dist/client/creditProducts-BQ1t1erI.mjs +0 -266
  229. package/dist/client/formatDate-hhI1-tzt.mjs +0 -26
  230. package/dist/server/constants-Cj7hfbrA.mjs +0 -41
  231. package/dist/server/richTextSchema-QLaQrbII.mjs +0 -212
  232. package/dist/server/titleSourceSchema-Cu-3PRvv.mjs +0 -122
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { r as ThemedButton } from "./ThemedButton-CnSa7o-I.mjs";
2
+ import { n as ThemedButton } from "./ThemedButton-PFOhXktM.mjs";
3
3
  import "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  //#region ../blocks/src/system/runtime/shared/components/ProtectedSubmitButton.tsx
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- import { l as verifiedSiteTermsAcceptanceSchema, t as assertNever } from "./src-o7WEvbK1.mjs";
3
- import { i as BlockApiError, n as useBlockApi } from "./context-DtKdUdkO.mjs";
4
- import { t as CheckboxChoice } from "./CheckboxChoice-BZPLCgTU.mjs";
2
+ import { t as assertNever } from "./src-ZSqRK3dD.mjs";
3
+ import { i as BlockApiError, n as useBlockApi } from "./context-CRhn9qzS.mjs";
4
+ import { t as CheckboxChoice } from "./CheckboxChoice-C8i4NraK.mjs";
5
5
  import { n as getFieldValidationControlProps, t as FieldValidationMessage } from "./FieldValidationMessage-CsqxShw4.mjs";
6
6
  import { t as FeedbackMessage } from "./FeedbackMessage-CSJrAuXH.mjs";
7
7
  import { useCallback, useEffect, useId, useMemo, useReducer } from "react";
@@ -263,15 +263,11 @@ function siteTermsFailureKind(error) {
263
263
  if (codes.some((code) => code === "SITE_TERMS_CHANGED" || code === "site_terms_changed")) return "changed";
264
264
  return codes.some((code) => code === "SITE_TERMS_AGREEMENT_MISSING" || code === "site_terms_agreement_missing") ? "missing" : null;
265
265
  }
266
+ /** What the signed-in customer last agreed to; a guest, or a profile that couldn't be read, has agreed to nothing we know of. */
266
267
  async function readVerifiedAcceptance(api) {
267
- if ((api.config.authOverrides?.portal ?? api.config.auth).type !== "bearer") return null;
268
- try {
269
- const response = await api.getPortalProfile();
270
- const parsed = verifiedSiteTermsAcceptanceSchema.nullable().safeParse(response.siteTermsAcceptance ?? null);
271
- return parsed.success ? parsed.data : null;
272
- } catch {
273
- return null;
274
- }
268
+ if (!api.portalVisitor) return null;
269
+ const result = await api.portalVisitor.profile();
270
+ return result.ok ? result.value.siteTermsAcceptance : null;
275
271
  }
276
272
  function privateIdentity(api) {
277
273
  const auth = api.config.authOverrides?.portal ?? api.config.auth;
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { ja as bookingPresentation } from "./wizardSteps-CWIQyRIw.mjs";
2
+ import { ao as bookingPresentation } from "./wizardSteps-BliJOzEX.mjs";
3
3
  import "react";
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
5
  //#region ../blocks/src/system/runtime/shared/BookingPanelArrangement.tsx
@@ -1,12 +1,12 @@
1
1
  "use client";
2
- import { C as resolveEventRegistrationEventSource, M as cancelledDateCopy, N as hasCancelledRegistrationDate } from "./newsletter-form.interactive-7Of3eYn0.mjs";
3
- import { $r as resolveSelectionBookingClosedDetail, Gr as getPublicEventCanonicalPath, Jr as planOrdinarySeriesSelection, Kr as isOrdinaryPublicEvent, Lr as closedDatesCopy, Rr as closedRunCopy, Ur as resolveEventRegistrationScopedEvents, Vr as normalizeEventRegistrationPageSurfaceSubject, Wr as eventOccurrenceContext, Xr as planWholeSeriesParentSelection, Yr as planWholeSeriesParentBooking, Zr as planWholeSeriesRunSelection, ds as orderedLiveRunSessions, ei as selectionRepresentativeEvent, fs as resolveWholeSeriesBookingPhase, ja as bookingPresentation, qr as planDropInPanel, ro as eventDateOptions, zr as closedDateCopy } from "./wizardSteps-CWIQyRIw.mjs";
4
- import { Zt as formatDate, vn as toUtcIsoDateTimeString } from "./src-o7WEvbK1.mjs";
5
- import { T as assertNever } from "./creditProducts-BQ1t1erI.mjs";
6
- import { r as boxStyleClassNames } from "./boxStyleClassNames-CQHWz5gJ.mjs";
7
- import { i as ThemedButtonLink, r as ThemedButton } from "./ThemedButton-CnSa7o-I.mjs";
8
- import { t as EVENT_REGISTRATION_ANCHOR_ID } from "./constants-PfYJsEZF.mjs";
9
- import { n as BookingPanelArrangement, t as StepIndicator$1 } from "./StepIndicator-DCfdcb7s.mjs";
2
+ import { C as resolveEventRegistrationEventSource, M as cancelledDateCopy, N as hasCancelledRegistrationDate } from "./newsletter-form.interactive-RuM86VAv.mjs";
3
+ import { Cn as toUtcIsoDateTimeString, nn as formatDate } from "./src-ZSqRK3dD.mjs";
4
+ import { Ci as planWholeSeriesParentBooking, Di as resolveSelectionBookingClosedDetail, Gs as resolveWholeSeriesBookingPhase, Oi as selectionRepresentativeEvent, Si as planOrdinarySeriesSelection, Ti as planWholeSeriesRunSelection, Ws as orderedLiveRunSessions, _i as resolveEventRegistrationScopedEvents, ao as bookingPresentation, bi as isOrdinaryPublicEvent, di as closedDatesCopy, fi as closedRunCopy, hi as normalizeEventRegistrationPageSurfaceSubject, jo as eventDateOptions, pi as closedDateCopy, vi as eventOccurrenceContext, wi as planWholeSeriesParentSelection, xi as planDropInPanel, yi as getPublicEventCanonicalPath } from "./wizardSteps-BliJOzEX.mjs";
5
+ import { h as assertNever } from "./bookingCalendar--aWnqFDn.mjs";
6
+ import { r as boxStyleClassNames } from "./boxStyleClassNames-BpGVdLFD.mjs";
7
+ import { n as ThemedButton, r as ThemedButtonLink } from "./ThemedButton-PFOhXktM.mjs";
8
+ import { t as EVENT_REGISTRATION_ANCHOR_ID } from "./constants-CoOkvw__.mjs";
9
+ import { n as BookingPanelArrangement, t as StepIndicator$1 } from "./StepIndicator-Dn_DY4oY.mjs";
10
10
  import React from "react";
11
11
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
12
  //#region ../blocks/src/system/runtime/nodes/event-registration/BookingPanel.tsx
@@ -221,7 +221,8 @@ function resolveBookingPanelSelection(source) {
221
221
  }, events);
222
222
  return selection ? {
223
223
  selection,
224
- subject
224
+ subject,
225
+ pageEvents: events
225
226
  } : null;
226
227
  }
227
228
  function selectPagePanel(source, events) {
@@ -257,7 +258,7 @@ function selectOccurrenceForPanel(events, occurrenceId) {
257
258
  event
258
259
  } : null;
259
260
  }
260
- function planEventBookingPanel({ selection, subject }, now) {
261
+ function planEventBookingPanel({ selection, subject, pageEvents }, now) {
261
262
  if (isCancelledDateSelection(selection)) return {
262
263
  kind: "cancelled",
263
264
  registration: null
@@ -267,7 +268,7 @@ function planEventBookingPanel({ selection, subject }, now) {
267
268
  case "occurrence":
268
269
  case "dateChoice":
269
270
  case "wholeSeriesRun": {
270
- const registration = selectionRegistrationTarget(selection, subject);
271
+ const registration = selectionRegistrationTarget(selection, subject, pageEvents);
271
272
  if (nonBookingPanel) return {
272
273
  ...nonBookingPanel,
273
274
  registration
@@ -331,10 +332,14 @@ function planNonBookingPanel(selection) {
331
332
  detail
332
333
  } : null;
333
334
  }
334
- function selectionRegistrationTarget(selection, subject) {
335
+ /**
336
+ * A date's own page hands over its series' other dates as well as its own:
337
+ * the wizard decides whether the visitor can add them (`decideRegistrationEntry`).
338
+ */
339
+ function selectionRegistrationTarget(selection, subject, pageEvents) {
335
340
  switch (selection.kind) {
336
341
  case "occurrence": return {
337
- events: [selection.event],
342
+ events: seriesDates(selection.event, pageEvents),
338
343
  occurrenceContext: eventOccurrenceContext(selection.event),
339
344
  subject
340
345
  };
@@ -350,6 +355,9 @@ function selectionRegistrationTarget(selection, subject) {
350
355
  };
351
356
  }
352
357
  }
358
+ function seriesDates(pageDate, pageEvents) {
359
+ return [pageDate, ...pageEvents.filter((event) => isOrdinaryPublicEvent(event) && event.seriesId === pageDate.seriesId && event.occurrenceId !== pageDate.occurrenceId)];
360
+ }
353
361
  /**
354
362
  * Every run the course page admits, not just those still taking bookings. An
355
363
  * invitation emailed for a run links here, and stays good after that run closes.
@@ -1327,38 +1327,6 @@ function ThemedButtonLink({ variant, size, extraClassName, screenReaderSuffix, l
1327
1327
  })
1328
1328
  });
1329
1329
  }
1330
- /** Fixed icon-only actions control; callers cannot supply icon children. */
1331
- function ThemedActionsButton({ variant, size, extraClassName, ...buttonProps }) {
1332
- return /* @__PURE__ */ jsx("button", {
1333
- ...buttonProps,
1334
- "aria-label": "Actions",
1335
- className: themedButtonClasses(variant, size, extraClassName),
1336
- children: /* @__PURE__ */ jsxs("svg", {
1337
- width: "16",
1338
- height: "16",
1339
- viewBox: "0 0 16 16",
1340
- fill: "currentColor",
1341
- "aria-hidden": "true",
1342
- children: [
1343
- /* @__PURE__ */ jsx("circle", {
1344
- cx: "8",
1345
- cy: "3",
1346
- r: "1.5"
1347
- }),
1348
- /* @__PURE__ */ jsx("circle", {
1349
- cx: "8",
1350
- cy: "8",
1351
- r: "1.5"
1352
- }),
1353
- /* @__PURE__ */ jsx("circle", {
1354
- cx: "8",
1355
- cy: "13",
1356
- r: "1.5"
1357
- })
1358
- ]
1359
- })
1360
- });
1361
- }
1362
1330
  /** Fixed semantic download affordance; callers cannot supply arbitrary icon children. */
1363
1331
  function ThemedDownloadLink({ variant, size, extraClassName, label, screenReaderSuffix, labelClassName, ...anchorProps }) {
1364
1332
  return /* @__PURE__ */ jsxs("a", {
@@ -1403,4 +1371,4 @@ function ThemedAuthoredButton({ label, href, variant, size, extraClassName, disa
1403
1371
  });
1404
1372
  }
1405
1373
  //#endregion
1406
- export { parseThemeButtonVariantId as C, clsx as S, AFFORDANCE_SUPPRESS_CLASS as T, FileSpreadsheetIcon as _, ThemedDownloadLink as a, PlusIcon as b, isSemanticIconId as c, CircleMinusIcon as d, CirclePlusIcon as f, FileAudioIcon as g, FileArchiveIcon as h, ThemedButtonLink as i, ArrowDownIcon as l, ExternalLinkIcon as m, ThemedAuthoredButton as n, ThemedFileChooser as o, ClockIcon as p, ThemedButton as r, getIconComponent as s, ThemedActionsButton as t, ChevronDownIcon as u, FileTextIcon as v, themeButtonSelector as w, SpinnerNode as x, MinusIcon as y };
1374
+ export { themeButtonSelector as C, parseThemeButtonVariantId as S, FileTextIcon as _, ThemedFileChooser as a, SpinnerNode as b, ArrowDownIcon as c, CirclePlusIcon as d, ClockIcon as f, FileSpreadsheetIcon as g, FileAudioIcon as h, ThemedDownloadLink as i, ChevronDownIcon as l, FileArchiveIcon as m, ThemedButton as n, getIconComponent as o, ExternalLinkIcon as p, ThemedButtonLink as r, isSemanticIconId as s, ThemedAuthoredButton as t, CircleMinusIcon as u, MinusIcon as v, AFFORDANCE_SUPPRESS_CLASS as w, clsx as x, PlusIcon as y };
@@ -1101,6 +1101,36 @@ function inkFrom(family, paint, ratio, maxDistance = BRAND_INK_MAX_DELTA_E) {
1101
1101
  source: "family"
1102
1102
  };
1103
1103
  }
1104
+ /**
1105
+ * Neutral text for a paint. The style's preferred neutral wins when one of its
1106
+ * pair clears (the higher-contrast one, dark on a tie); otherwise literal black
1107
+ * or white by `maxContrastBlackOrWhite`; otherwise `unpaintable`.
1108
+ */
1109
+ function neutralInk(paint, ratio, preferred) {
1110
+ assertContrastRatio(ratio);
1111
+ if (preferred) {
1112
+ const dark = worstContrast(hexLuminance(preferred.dark), paint);
1113
+ const light = worstContrast(hexLuminance(preferred.light), paint);
1114
+ const [hex, achieved] = dark >= light ? [preferred.dark, dark] : [preferred.light, light];
1115
+ if (achieved >= ratio) return {
1116
+ kind: "ink",
1117
+ hex,
1118
+ ratio: achieved,
1119
+ source: "neutral"
1120
+ };
1121
+ }
1122
+ const literal = maxContrastBlackOrWhite(paint);
1123
+ return literal.ratio >= ratio ? {
1124
+ kind: "ink",
1125
+ hex: literal.ink === "black" ? "#000000" : "#ffffff",
1126
+ ratio: literal.ratio,
1127
+ source: "neutral"
1128
+ } : {
1129
+ kind: "unpaintable",
1130
+ interval: paint,
1131
+ ratio
1132
+ };
1133
+ }
1104
1134
  //#endregion
1105
1135
  //#region ../theme-core/src/surfaces/surfaceInks.ts
1106
1136
  /** Lines and focus rings are graphics: WCAG non-text contrast. */
@@ -1372,6 +1402,50 @@ function normalizedReference(value) {
1372
1402
  return normalized.length > 0 ? normalized : null;
1373
1403
  }
1374
1404
  //#endregion
1405
+ //#region ../theme-core/src/utils/cssValueSafety.ts
1406
+ /**
1407
+ * Whether a value can be written into CSS where its author meant it to go
1408
+ * (issue 1185).
1409
+ *
1410
+ * Server rendering writes a `style` object as one attribute string, and
1411
+ * generated stylesheets interpolate tokens into declarations. Either way the
1412
+ * value is left as it is, so one holding a `;` or a brace adds declarations or
1413
+ * rules nobody wrote. This is the one rule for "a value stays inside its
1414
+ * declaration"; the inline style guard, the colour token helpers and the
1415
+ * custom-block layout gate all build on it.
1416
+ */
1417
+ /** A complete quoted string, inside which `;` is just text (a font name, a data URI). */
1418
+ const QUOTED_STRING = /"[^"\\\n]*"|'[^'\\\n]*'/g;
1419
+ /**
1420
+ * Outside quoted strings: the end of a declaration, a block, a CSS escape, or
1421
+ * a quote that never closes and would swallow what follows.
1422
+ */
1423
+ const DECLARATION_BREAK = /[;{}\\"']/;
1424
+ /**
1425
+ * Refused inside quoted strings too: values also go into `<style>` elements,
1426
+ * where `</style>` ends the stylesheet whether or not CSS reads it as a string.
1427
+ */
1428
+ const TAG_BRACKET = /[<>]/;
1429
+ /** The value with its complete quoted strings removed. */
1430
+ const outsideQuotedStrings = (value) => value.replace(QUOTED_STRING, "");
1431
+ /** True when `value` cannot end its declaration or open another construct. */
1432
+ function staysInsideDeclaration(value) {
1433
+ return !TAG_BRACKET.test(value) && !DECLARATION_BREAK.test(outsideQuotedStrings(value));
1434
+ }
1435
+ /** `url(` and `image-set(` (which `-webkit-image-set(` ends in), the two every browser fetches through. */
1436
+ const LOADING_FUNCTION_CALL = /(?:url|image-set)\(/i;
1437
+ /**
1438
+ * True when `value` calls `url()` or `image-set()`, in any letter case.
1439
+ *
1440
+ * Only meaningful for a value that `staysInsideDeclaration`: that rule refuses
1441
+ * backslashes, so the name cannot be spelled with CSS escapes. A name split
1442
+ * from its bracket by a space or a comment is not a function call to a browser
1443
+ * either, so it fetches nothing.
1444
+ */
1445
+ function callsCssLoadingFunction(value) {
1446
+ return LOADING_FUNCTION_CALL.test(outsideQuotedStrings(value));
1447
+ }
1448
+ //#endregion
1375
1449
  //#region ../theme-core/src/utils/colorStyles.ts
1376
1450
  const COLOR_VAR_PREFIX = "--tb-";
1377
1451
  function parseToken(source) {
@@ -1407,6 +1481,7 @@ function surfaceRoleForTextToken(token) {
1407
1481
  * rgbColorValue('raw:transparent') // => 'transparent'
1408
1482
  */
1409
1483
  function rgbColorValue(token) {
1484
+ if (typeof token !== "string" || !staysInsideDeclaration(token)) return "transparent";
1410
1485
  const { token: baseToken, opacityPercent, raw } = parseToken(token);
1411
1486
  if (raw) return raw;
1412
1487
  const cssVar = `${COLOR_VAR_PREFIX}${baseToken}`;
@@ -1425,6 +1500,7 @@ function rgbColorValue(token) {
1425
1500
  * cssVarValue('surface/95') // => 'var(--tb-surface)' (opacity ignored)
1426
1501
  */
1427
1502
  function cssVarValue(token) {
1503
+ if (typeof token !== "string" || !staysInsideDeclaration(token)) return "transparent";
1428
1504
  const { token: baseToken } = parseToken(token);
1429
1505
  return `var(${COLOR_VAR_PREFIX}${baseToken})`;
1430
1506
  }
@@ -4397,4 +4473,4 @@ function mapSurfaceTreeChildren(value, map) {
4397
4473
  return isSurfaceTreeRecord(value) ? Object.fromEntries(Object.entries(value).map(([key, item]) => [key, map(item)])) : value;
4398
4474
  }
4399
4475
  //#endregion
4400
- export { solveSurfaceInks as $, DEFAULT_BUTTON_SIZES as A, featuresFromHex as At, resolveThemeColorReferenceValue as B, buttonRadius as C, resolveOpaqueSurfaceHex as Ct, materializeRuntimeButtonAppearance as D, contrastRatio as Dt, buttonTypographyDeclarations as E, requirePaletteColorsFromEntries as Et, defineButtonStyleRecipe as F, rgbToHex as Ft, mergeStyles as G, backgroundColorStyle as H, mapButtonRoleAppearances as I, srgbToOklab as It, textColorValue as J, rgbColorValue as K, mapButtonVisualAppearances as L, FONT_SIZE_MAP as M, oklabToOklch as Mt, generateShadowValue as N, oklabToSrgb as Nt, paddingDeclarations as O, preparePaletteColourIndex as Ot, PUBLIC_BUTTON_ROLES as P, oklchToHexGamut as Pt, CONTROL_EDGE_SEED_TOKEN as Q, isCssColorLiteral as R, buttonBorder as S, resolveConcreteColorHex as St, buttonStateAppearanceDeclarations as T, paletteValueKeySchema as Tt, borderColorStyle as U, resolveTokenOrCssColorValue as V, cssVarValue as W, safeTokenOr as X, resolveSurfaceForeground as Y, surfaceInkPublication as Z, contextualButtonSurfaceResetStyles as _, surfaceInkDeclarations as _t, requireResolvedSurface as a, inkReference as at, BUTTON_CONTRAST_POLICY as b, freezeOwnedThemeValue as bt, surfaceButtonRequest as c, planForegroundHover as ct, toAccessibleColorSurfaceIntent as d, SURFACE_INK_CSS_VARS as dt, _classPrivateFieldGet2 as et, compositeHex as f, surfaceForegroundDeclarations as ft, actionVariableFallback as g, surfaceForegroundValueWithOpacity as gt, scrimTone as h, surfaceForegroundValue as ht, prepareThemeSurfaceRevision as i, contrastThresholdByPolicy as it, ELEVATION_OFFSET as j, hexToRgb as jt, BORDER_WIDTH_MAP as k, _classPrivateFieldInitSpec as kt, surfaceDecorationColors as l, DEFAULT_SURFACE_TEXT_COLOR as lt, minimumScrimOpacity as m, surfaceForegroundStyle as mt, parseSurfaceTree as n, HOVER_TEXT_THRESHOLD as nt, resolveSurface as o, expandPalette as ot, gradientScrimSamples as p, surfaceForegroundInputFromResolved as pt, textColorStyle as q, prepareSurfaceIndex as r, certifyPaint as rt, serializeSurfaceTree as s, getTextColorForBackground as st, parseResolvedSurface as t, _classPrivateFieldSet2 as tt, surfaceTransportContext as u, SURFACE_FOREGROUND_CSS_VARS as ut, compileButtonColourStates as v, surfaceInkStyle as vt, buttonShadow as w, paletteValueKey as wt, formatButtonColourContractError as x, ownedThemeSnapshot as xt, resolveSolidButtonColour as y, surfaceInkValue as yt, resolveOnColorForThemeToken as z };
4476
+ export { surfaceInkPublication as $, DEFAULT_BUTTON_SIZES as A, ORDINARY_TEXT_MIN_CONTRAST_RATIO as At, resolveThemeColorReferenceValue as B, rgbToHex as Bt, buttonRadius as C, freezeOwnedThemeValue as Ct, materializeRuntimeButtonAppearance as D, paletteValueKey as Dt, buttonTypographyDeclarations as E, resolveOpaqueSurfaceHex as Et, defineButtonStyleRecipe as F, featuresFromHex as Ft, mergeStyles as G, backgroundColorStyle as H, mapButtonRoleAppearances as I, hexToRgb as It, textColorValue as J, rgbColorValue as K, mapButtonVisualAppearances as L, oklabToOklch as Lt, FONT_SIZE_MAP as M, preparePaletteColourIndex as Mt, generateShadowValue as N, solidPaint as Nt, paddingDeclarations as O, paletteValueKeySchema as Ot, PUBLIC_BUTTON_ROLES as P, _classPrivateFieldInitSpec as Pt, safeTokenOr as Q, isCssColorLiteral as R, oklabToSrgb as Rt, buttonBorder as S, surfaceInkValue as St, buttonStateAppearanceDeclarations as T, resolveConcreteColorHex as Tt, borderColorStyle as U, resolveTokenOrCssColorValue as V, srgbToOklab as Vt, cssVarValue as W, staysInsideDeclaration as X, callsCssLoadingFunction as Y, resolveSurfaceForeground as Z, contextualButtonSurfaceResetStyles as _, surfaceForegroundStyle as _t, requireResolvedSurface as a, HOVER_TEXT_THRESHOLD as at, BUTTON_CONTRAST_POLICY as b, surfaceInkDeclarations as bt, surfaceButtonRequest as c, inkReference as ct, toAccessibleColorSurfaceIntent as d, planForegroundHover as dt, CONTROL_EDGE_SEED_TOKEN as et, compositeHex as f, DEFAULT_SURFACE_TEXT_COLOR as ft, actionVariableFallback as g, surfaceForegroundInputFromResolved as gt, scrimTone as h, surfaceForegroundDeclarations as ht, prepareThemeSurfaceRevision as i, _classPrivateFieldSet2 as it, ELEVATION_OFFSET as j, contrastRatio as jt, BORDER_WIDTH_MAP as k, requirePaletteColorsFromEntries as kt, surfaceDecorationColors as l, expandPalette as lt, minimumScrimOpacity as m, SURFACE_INK_CSS_VARS as mt, parseSurfaceTree as n, neutralInk as nt, resolveSurface as o, certifyPaint as ot, gradientScrimSamples as p, SURFACE_FOREGROUND_CSS_VARS as pt, textColorStyle as q, prepareSurfaceIndex as r, _classPrivateFieldGet2 as rt, serializeSurfaceTree as s, contrastThresholdByPolicy as st, parseResolvedSurface as t, solveSurfaceInks as tt, surfaceTransportContext as u, getTextColorForBackground as ut, compileButtonColourStates as v, surfaceForegroundValue as vt, buttonShadow as w, ownedThemeSnapshot as wt, formatButtonColourContractError as x, surfaceInkStyle as xt, resolveSolidButtonColour as y, surfaceForegroundValueWithOpacity as yt, resolveOnColorForThemeToken as z, oklchToHexGamut as zt };
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { t as defineIslandPropsDecoder } from "./propsDecoder-BLKAmX0S.mjs";
2
+ import { t as defineIslandPropsDecoder } from "./propsDecoder--uHW4tFM.mjs";
3
3
  //#region src/rendering/islands/enhancers/accordion.ts
4
4
  const decode = defineIslandPropsDecoder("accordion");
5
5
  function parseDefaultValues(value) {
@@ -1,32 +1,30 @@
1
1
  "use client";
2
- import { $i as resolveBookingPaymentChoice, Ai as appointmentQuestionsRefusal, Bn as isEmailAddress, Ci as selectedBookingCollectionOptionKind, Cr as formatCommercePrice, Da as leavePage, Di as resolveSelectedAppointmentConsent, Ei as projectSelectedAppointmentConsentIntoForm, Fi as decideBookingQuestionsRestoration, Gi as applyBookingPaymentAdmission, H as buildReviewedBookingPaymentViewModel, Is as unsafeAsSiteId, Ji as bookingRequiresResourceSelection, Jo as resolveDateRuntimeContext, Ki as bookingHasPackagePaymentChoices, Mi as isAppointmentBookingQuestionsEvent, Ni as needsAppointmentQuestionsRefresh, Oi as EMPTY_APPOINTMENT_BOOKING_QUESTIONS, Pi as bookingQuestionsAnswerDraftSchema, Qi as resolveBookingPaymentAvailability, Ri as restoreBookingQuestionsAnswers, Si as resolveLowestBookingPaymentStep, Ti as toSelectedCollectionOptionKind, Tr as formatValidity, U as paymentChoiceDetails, Ui as BOOKING_FORM_DATA_RESERVED_KEYS, V as buildBookingPaymentSelectionViewModel, Vi as formatCentsAsCurrencyInput, W as paymentChoicePrice, Xi as resolveBookingPackagePaymentSelection, Yi as reconcileBookingPackagePurchase, Zi as resolveBookingPackageSources, _i as resolveAppointmentCheckoutVerificationState, ai as deriveBookingFormViewState, bi as resolveBookingSiteId, ci as getBookingSuccessCopy, di as isBookingServiceSlidingAmountInRange, ea as resolveBookingPaymentMode, fi as isSameOpenCheckout, gi as prepareBookingSubmission, gs as resolveBookingSignupOffer, hi as parseBookingCurrencyInputToCents, ii as readOverrideServiceCategories, ja as bookingPresentation, ji as deriveAppointmentBookingQuestions, ki as applyAppointmentBookingQuestionsEvent, mi as normalizeBookingServices, na as toBookingPurchasablePackages, oi as formatBookingSubmissionPreparationError, or as createSignInReturnDraftStore, pi as normalizeBookingFormConfig, qi as bookingPackageRequestKey, qo as readRuntimeNow, ra as getBookingServiceSlidingScale, ri as buildBookingFormInteractiveIslandProps, si as getBookingRedirectStateFromLocation, ss as repriceBookingCollectionOptions, ta as resolveBookingPurchasablePackages, vi as resolveBookingPaymentStep, wi as snapshotBookingShownTerms, xi as resolveDefaultBookingServiceId, yi as resolveBookingSelectedService, z as onlineBookingUnavailableMessage, zi as toBookingQuestionsAnswerDraft } from "./wizardSteps-CWIQyRIw.mjs";
3
- import { Kt as hasText, Tn as formatCurrencyAmount, Zt as formatDate, _n as parseUtcIsoDateTimeString, a as clearWorkflowFeedback, an as formatTimeZoneCityLabel, bn as resolveBookingTimeZoneId, en as formatDateTimeRange, i as okWith, k as isBookingRequirementConsentFieldId, n as err, o as reportWorkflowError, on as inferSiteDateLocale, rn as formatTime, s as reportWorkflowSuccess, sn as resolveBookingDisplayContext, t as assertNever, u as logger, vn as toUtcIsoDateTimeString, yn as resolveBookingBusinessTimeZone } from "./src-o7WEvbK1.mjs";
4
- import { D as unsafeAsAppointmentResourceId, O as unsafeAsAppointmentServiceId, T as assertNever$1, g as formatCreditProductUnits, h as formatCreditProductPayment, m as formatCreditProductBalance, o as checkBookingQuestionsAnswered } from "./creditProducts-BQ1t1erI.mjs";
5
- import { i as useSiteTermsAgreement, n as SiteTermsChangedNotice, t as SiteTermsAgreementField } from "./SiteTermsAgreementField-BAdW5DvE.mjs";
2
+ import { An as formatCurrencyAmount, Cn as toUtcIsoDateTimeString, D as isBookingRequirementConsentFieldId, Fn as unsafeAsAppointmentResourceId, In as unsafeAsAppointmentServiceId, Sn as parseUtcIsoDateTimeString, Tn as resolveBookingTimeZoneId, Zt as hasText, a as clearWorkflowFeedback, an as formatDateTimeRange, cn as formatTime, dn as inferSiteDateLocale, fn as resolveBookingDisplayContext, i as okWith, n as err, nn as formatDate, o as reportWorkflowError, s as reportWorkflowSuccess, t as assertNever, un as formatTimeZoneCityLabel, wn as resolveBookingBusinessTimeZone } from "./src-ZSqRK3dD.mjs";
3
+ import { $i as toSelectedCollectionOptionKind, $r as formatValidity, Aa as toBookingPurchasablePackages, Bi as isSameOpenCheckout, Bs as formatCreditProductPayment, Ca as reconcileBookingPackagePurchase, Da as resolveBookingPaymentChoice, Ea as resolveBookingPaymentAvailability, Fi as getBookingRedirectStateFromLocation, Gi as resolveAppointmentCheckoutVerificationState, Hi as normalizeBookingServices, Ii as getBookingSuccessCopy, Ji as resolveBookingSiteId, Ki as resolveBookingPaymentStep, Ls as repriceBookingCollectionOptions, Mi as readOverrideServiceCategories, Ni as deriveBookingFormViewState, Oa as resolveBookingPaymentMode, Pi as formatBookingSubmissionPreparationError, Pr as createSignInReturnDraftStore, Qi as snapshotBookingShownTerms, Sa as bookingRequiresResourceSelection, Ss as resolveDateRuntimeContext, Ta as resolveBookingPackageSources, Ui as parseBookingCurrencyInputToCents, Vi as normalizeBookingFormConfig, Vs as formatCreditProductUnits, Wi as prepareBookingSubmission, Xi as resolveLowestBookingPaymentStep, Yi as resolveDefaultBookingServiceId, Ys as resolveBookingSignupOffer, Zi as selectedBookingCollectionOptionKind, Zr as formatCommercePrice, _a as BOOKING_FORM_DATA_RESERVED_KEYS, aa as deriveAppointmentBookingQuestions, ao as bookingPresentation, ba as bookingHasPackagePaymentChoices, ca as bookingQuestionsAnswerDraftSchema, dt as paymentChoiceDetails, ea as projectSelectedAppointmentConsentIntoForm, fa as restoreBookingQuestionsAnswers, ft as paymentChoicePrice, gc as unsafeAsSiteId, ha as formatCentsAsCurrencyInput, ia as appointmentQuestionsRefusal, ja as getBookingServiceSlidingScale, ji as buildBookingFormInteractiveIslandProps, ka as resolveBookingPurchasablePackages, la as decideBookingQuestionsRestoration, lt as buildBookingPaymentSelectionViewModel, mr as isEmailAddress, na as EMPTY_APPOINTMENT_BOOKING_QUESTIONS, oa as isAppointmentBookingQuestionsEvent, pa as toBookingQuestionsAnswerDraft, qi as resolveBookingSelectedService, ra as applyAppointmentBookingQuestionsEvent, sa as needsAppointmentQuestionsRefresh, st as onlineBookingUnavailableMessage, ta as resolveSelectedAppointmentConsent, to as leavePage, ut as buildReviewedBookingPaymentViewModel, wa as resolveBookingPackagePaymentSelection, xa as bookingPackageRequestKey, xs as readRuntimeNow, ya as applyBookingPaymentAdmission, zi as isBookingServiceSlidingAmountInRange, zs as formatCreditProductBalance } from "./wizardSteps-BliJOzEX.mjs";
4
+ import { f as unsafeAsCustomerPassId, p as unsafeAsPassId } from "./portalRoutes-D72yvtDh.mjs";
5
+ import { c as checkBookingQuestionsAnswered, h as assertNever$1 } from "./bookingCalendar--aWnqFDn.mjs";
6
+ import { i as useSiteTermsAgreement, n as SiteTermsChangedNotice, t as SiteTermsAgreementField } from "./SiteTermsAgreementField-B4z-e4Wq.mjs";
6
7
  import { t as layoutServicesByCategory } from "./appointment-service-categories-Cl2pqw-z.mjs";
7
- import { i as useBookingNowIso, n as OptionalMark, o as clientPersonPhrases, r as parseBookingSubmissionFailure } from "./BookingQuestionFields-DXegGSnS.mjs";
8
- import { i as BlockApiError, n as useBlockApi, t as BlockApiProvider } from "./context-DtKdUdkO.mjs";
9
- import { r as ThemedButton, x as SpinnerNode } from "./ThemedButton-CnSa7o-I.mjs";
10
- import { n as BookingPanelArrangement, t as StepIndicator } from "./StepIndicator-DCfdcb7s.mjs";
11
- import { i as discountEmailProblem, m as DiscountCodeDisclosure, p as NavigationHandOffPanel, r as DISCOUNT_APPLY_MESSAGES, t as BookingConfirmation } from "./DemoBookingPortalAccess-0Ua44F1j.mjs";
12
- import { t as buildCheckoutReturnUrls } from "./checkoutUrls-BMLYTf38.mjs";
8
+ import { o as clientPersonPhrases, r as OptionalMark } from "./BookingQuestionFields-CyNIKw6k.mjs";
9
+ import { i as BlockApiError, n as useBlockApi, t as BlockApiProvider } from "./context-CRhn9qzS.mjs";
10
+ import { t as logger } from "./noop-Dl4mZ-rr.mjs";
11
+ import { b as SpinnerNode, n as ThemedButton } from "./ThemedButton-PFOhXktM.mjs";
12
+ import { n as BookingPanelArrangement, t as StepIndicator } from "./StepIndicator-Dn_DY4oY.mjs";
13
+ import { i as discountEmailProblem, m as DiscountCodeDisclosure, p as NavigationHandOffPanel, r as DISCOUNT_APPLY_MESSAGES, t as BookingConfirmation } from "./DemoBookingPortalAccess-DFLPyuqe.mjs";
14
+ import { t as buildCheckoutReturnUrls } from "./checkoutUrls-z2gXvlGw.mjs";
13
15
  import { t as scrollToBlock } from "./scrollToBlock-DrgKE0qZ.mjs";
14
- import { t as CheckboxChoice } from "./CheckboxChoice-BZPLCgTU.mjs";
16
+ import { t as CheckboxChoice } from "./CheckboxChoice-C8i4NraK.mjs";
15
17
  import { t as CheckIcon } from "./CheckIcon-CVcKteXH.mjs";
16
18
  import { n as getFieldValidationControlProps, t as FieldValidationMessage } from "./FieldValidationMessage-CsqxShw4.mjs";
17
19
  import { t as FeedbackMessage } from "./FeedbackMessage-CSJrAuXH.mjs";
18
- import { n as TerminalPanel, r as StateIcon, t as useDiscountCodeUi } from "./useDiscountCodeUi-BcFQRI_7.mjs";
19
- import { c as portalSessionIdentity, d as PaymentChoiceRows, i as SignInNotice, l as useSignInReturn, n as OrganiserContactLine, o as BookingConsentAgreement, r as BookingQuestionSections, s as usePolling, t as BookingMailingListNote, u as useBookingQuestionsRefresh } from "./BookingMailingListNote-CGxg37zx.mjs";
20
- import { a as formatTime$1, i as formatDatePillParts, n as useAvailableDates, o as getRuntimeTimeZone, r as formatDate$1, t as useAvailableSlots } from "./useAvailableSlots-DQJNh10g.mjs";
21
- import { c as storeDemoBookingPassIfAvailable } from "./demoPortalMagicLink-B8eDjhuG.mjs";
22
- import { i as getDiscountApplyFeedback } from "./shop-discount-apply.state-CiCDLNh7.mjs";
20
+ import { c as parseBookingSubmissionFailure, d as useSignInReturn, f as useBookingQuestionsRefresh, i as SignInNotice, l as useBookingNowIso, n as OrganiserContactLine, o as BookingConsentAgreement, p as PaymentChoiceRows, r as BookingQuestionSections, s as usePolling, t as BookingMailingListNote, u as portalSessionIdentity } from "./BookingMailingListNote-uWfR2kaG.mjs";
21
+ import { n as TerminalPanel, r as StateIcon, t as useDiscountCodeUi } from "./useDiscountCodeUi-klgfGn7f.mjs";
22
+ import { a as formatTime$1, i as formatDatePillParts, n as useAvailableDates, o as getRuntimeTimeZone, r as formatDate$1, t as useAvailableSlots } from "./useAvailableSlots-Dm3lKJKR.mjs";
23
+ import { c as storeDemoBookingPassIfAvailable } from "./demoPortalMagicLink-CWDGSTBu.mjs";
24
+ import { i as getDiscountApplyFeedback } from "./shop-discount-apply.state-D5CtGfJI.mjs";
23
25
  import React, { useCallback, useEffect, useLayoutEffect, useMemo, useReducer, useRef, useState } from "react";
24
26
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
25
27
  import { z } from "zod";
26
- //#region ../core/src/branded/entitlements.ts
27
- const unsafeAsPassId = (id) => id;
28
- const unsafeAsCustomerPassId = (id) => id;
29
- //#endregion
30
28
  //#region ../core/src/branded/communications.ts
31
29
  const unsafeAsFormId = (id) => id;
32
30
  //#endregion
@@ -365,6 +363,14 @@ function decideBookingAdmission(input) {
365
363
  case "unreadable": return refused(packagesUnreadableMessage(input.businessName), "retry");
366
364
  }
367
365
  }
366
+ /**
367
+ * Whether to ask a signed-out client to sign in and use a package. We can't see
368
+ * what they hold until they do, so it's offered whenever the service takes
369
+ * packages. A refusal already makes the same offer, so it isn't made twice.
370
+ */
371
+ function bookingOffersPackageSignIn(heldPackages, admission) {
372
+ return heldPackages === "signedOut" && admission.kind !== "refused";
373
+ }
368
374
  function packagesUnreadableMessage(businessName) {
369
375
  return `We couldn’t check your packages just now. Please try again, or contact ${businessName?.trim() || "the organiser"} to book.`;
370
376
  }
@@ -2852,7 +2858,8 @@ function useHeadlessBookingFlow(options) {
2852
2858
  const packagePaymentModel = {
2853
2859
  choice: paymentChoice,
2854
2860
  purchasablePackages,
2855
- availability: resolveBookingPaymentAvailability(!packageOnly && paymentResolution.kind !== "unavailable", appointmentPackagesModel, purchasablePackages)
2861
+ availability: resolveBookingPaymentAvailability(!packageOnly && paymentResolution.kind !== "unavailable", appointmentPackagesModel, purchasablePackages),
2862
+ packageSignInOffered: bookingOffersPackageSignIn(heldPackages, stepState.admission)
2856
2863
  };
2857
2864
  const payment = paymentResolution.kind === "unavailable" && packagePaymentModel.availability.kind === "no_choices" ? {
2858
2865
  ...packagePaymentModel,
@@ -4088,7 +4095,6 @@ function DefaultAdmissionRefusal({ booking }) {
4088
4095
  function AdmissionRefusalNotice({ booking }) {
4089
4096
  const admission = booking.admission;
4090
4097
  if (admission.kind !== "refused") return null;
4091
- const email = booking.fields.values.email;
4092
4098
  return /* @__PURE__ */ jsx(FeedbackMessage, {
4093
4099
  tone: "info",
4094
4100
  className: "alert alert-info rb-mb-4",
@@ -4098,11 +4104,9 @@ function AdmissionRefusalNotice({ booking }) {
4098
4104
  children: [
4099
4105
  /* @__PURE__ */ jsx("p", { children: admission.message }),
4100
4106
  admission.contact ? /* @__PURE__ */ jsx(OrganiserContactLine, { contact: admission.contact }) : null,
4101
- admission.recovery === "signIn" ? /* @__PURE__ */ jsx(SignInNotice, {
4102
- lead: "Already have a package?",
4103
- after: "to use it.",
4104
- email: typeof email === "string" && email.trim() ? email.trim() : void 0,
4105
- returnPath: booking.questions.signInReturnPath
4107
+ admission.recovery === "signIn" ? /* @__PURE__ */ jsx(PackageSignInNotice, {
4108
+ booking,
4109
+ lead: "Already have a package?"
4106
4110
  }) : null,
4107
4111
  admission.recovery === "retry" ? /* @__PURE__ */ jsx(ThemedButton, {
4108
4112
  type: "button",
@@ -4115,6 +4119,23 @@ function AdmissionRefusalNotice({ booking }) {
4115
4119
  })
4116
4120
  });
4117
4121
  }
4122
+ /** The offer to sign in so a package can pay, worded the way the event form offers a pass. */
4123
+ function PackageSignInNotice({ booking, lead }) {
4124
+ const email = booking.fields.values.email;
4125
+ return /* @__PURE__ */ jsx(SignInNotice, {
4126
+ lead,
4127
+ after: "to use it.",
4128
+ email: typeof email === "string" && email.trim() ? email.trim() : void 0,
4129
+ returnPath: booking.questions.signInReturnPath
4130
+ });
4131
+ }
4132
+ /** Signed out, we can't tell whether the client holds a package for this service, so we ask. */
4133
+ function OfferedPackageSignIn({ booking }) {
4134
+ return booking.payment.packageSignInOffered ? /* @__PURE__ */ jsx(PackageSignInNotice, {
4135
+ booking,
4136
+ lead: "Have a package?"
4137
+ }) : null;
4138
+ }
4118
4139
  /** Refused, nothing on the form leads anywhere but the notice and choosing another service. */
4119
4140
  function admissionRefused(booking) {
4120
4141
  return booking.admission.kind === "refused";
@@ -4312,7 +4333,8 @@ function DefaultDateTimeSelectionStep({ booking, errorSummaryId, presentation })
4312
4333
  zoneNote: booking.availability.zoneNote,
4313
4334
  ariaDescribedBy: validationDescribedBy,
4314
4335
  ariaInvalid: hasValidationError
4315
- }) : null
4336
+ }) : null,
4337
+ /* @__PURE__ */ jsx(OfferedPackageSignIn, { booking })
4316
4338
  ]
4317
4339
  });
4318
4340
  }
@@ -4391,7 +4413,8 @@ function HeadlessBookingPaymentSelectionStep({ booking, presentation = bookingPr
4391
4413
  booking,
4392
4414
  serviceTitle: service.title,
4393
4415
  hasOtherChoices: otherRows.length > 0
4394
- })
4416
+ }),
4417
+ /* @__PURE__ */ jsx(OfferedPackageSignIn, { booking })
4395
4418
  ]
4396
4419
  });
4397
4420
  }
@@ -0,0 +1,180 @@
1
+ "use client";
2
+ import { n as calendarLinks } from "./src-uwCpbHXG.mjs";
3
+ //#region ../core/src/assert-never.ts
4
+ function assertNever(value, message = "Unexpected variant") {
5
+ throw new Error(`${message}: ${String(value)}`);
6
+ }
7
+ //#endregion
8
+ //#region ../core/src/slug.ts
9
+ const REMOVED_CHARACTERS = /['\u2019]/g;
10
+ const COMBINING_DIACRITICS = /[\u0300-\u036f]/g;
11
+ const SEPARATOR_RUN = /[^a-z0-9]+/g;
12
+ const TRAILING_SLUG_SEPARATORS = /[-/]+$/g;
13
+ function slugifySegment(text) {
14
+ return text.normalize("NFD").replace(COMBINING_DIACRITICS, "").toLowerCase().replace(REMOVED_CHARACTERS, "").replace(SEPARATOR_RUN, "-").replace(/^-+|-+$/g, "");
15
+ }
16
+ /**
17
+ * Convert a string to a URL-safe slug.
18
+ *
19
+ * Every non-alphanumeric character (underscores included) is a separator and
20
+ * collapses to a single hyphen, which keeps output inside the `site_routes`
21
+ * slug constraint `^[a-z0-9]+([a-z0-9\-/]*[a-z0-9])?$`.
22
+ *
23
+ * This is the single slug implementation for the monorepo: block-form and the
24
+ * shop admin catalog delegate here rather than keeping their own variants.
25
+ *
26
+ * @example
27
+ * slugify("Initial Consultation") // "initial-consultation"
28
+ * slugify("Reiki & Energy Healing") // "reiki-energy-healing"
29
+ * slugify("Don't Stop") // "dont-stop"
30
+ * slugify("draft_post") // "draft-post"
31
+ * slugify("Blog / My Post", { preserveSegments: true }) // "blog/my-post"
32
+ */
33
+ function slugify(text, options = {}) {
34
+ const source = text.toString().trim();
35
+ const slug = options.preserveSegments === true ? source.split("/").map(slugifySegment).filter((segment) => segment.length > 0).join("/") : slugifySegment(source);
36
+ if (options.maxLength === void 0) return slug;
37
+ return slug.slice(0, options.maxLength).replace(TRAILING_SLUG_SEPARATORS, "");
38
+ }
39
+ //#endregion
40
+ //#region ../blocks/src/system/runtime/shared/bookingQuestionValues.ts
41
+ function getInitialFieldValue(field, answers) {
42
+ const value = answers[field.id];
43
+ if (value !== void 0) return value;
44
+ if (field.type === "checkbox" && field.options && field.options.length > 1) return [];
45
+ if (field.type === "checkbox") return false;
46
+ if (field.type === "document_upload") return null;
47
+ return "";
48
+ }
49
+ /** One value per question, taken from earlier answers where there are any. */
50
+ function initialBookingQuestionValues(sections, answers = {}) {
51
+ return Object.fromEntries(sections.flatMap((section) => section.items.map((field) => [field.id, getInitialFieldValue(field, answers)])));
52
+ }
53
+ /** Where a booker starts: keeping earlier answers when we already have them. */
54
+ function initialBookingQuestionsAnswerMode(presentation) {
55
+ return presentation.kind === "already_answered" ? "keep_existing" : "answers";
56
+ }
57
+ /**
58
+ * What the submission sends. Keeping earlier answers is only possible when the
59
+ * presentation says we have them, so a mode left over from an earlier
60
+ * presentation (say the booker switched service) can't send `keep_existing`
61
+ * beside questions they can see and edit.
62
+ */
63
+ function resolveBookingQuestionsAnswerMode(presentation, answerMode) {
64
+ return presentation.kind === "already_answered" ? answerMode : "answers";
65
+ }
66
+ /** Both booking flows submit the same decision made from the current presentation. */
67
+ function buildBookingQuestionsSubmission(presentation, answerMode, values) {
68
+ if (presentation.kind === "none" || presentation.kind === "unavailable") return void 0;
69
+ const requirementId = presentation.set.requirementId;
70
+ return resolveBookingQuestionsAnswerMode(presentation, answerMode) === "keep_existing" ? {
71
+ requirementId,
72
+ kind: "keep_existing"
73
+ } : {
74
+ requirementId,
75
+ kind: "answers",
76
+ raw: values
77
+ };
78
+ }
79
+ /** Starting values, seeded from earlier answers when the presentation carries them. */
80
+ function initialBookingQuestionsValues(presentation) {
81
+ switch (presentation.kind) {
82
+ case "none":
83
+ case "unavailable": return {};
84
+ case "ask": return initialBookingQuestionValues(presentation.set.sections);
85
+ case "prefill":
86
+ case "already_answered": return initialBookingQuestionValues(presentation.set.sections, presentation.answers);
87
+ }
88
+ }
89
+ /** No answer given: blank text, nothing chosen, an unticked box, or no file. Mirrors the server's required check. */
90
+ function isUnansweredBookingQuestion(value) {
91
+ if (value === void 0 || value === null || value === false) return true;
92
+ if (typeof value === "string") return value.trim() === "";
93
+ if (Array.isArray(value)) return value.every((item) => item.trim() === "");
94
+ return false;
95
+ }
96
+ /**
97
+ * The required questions still without an answer, so a flow can point at
98
+ * them before sending; the server makes the same check and has the last word.
99
+ */
100
+ function unansweredRequiredBookingQuestions(sections, values) {
101
+ return sections.flatMap((section) => section.items.flatMap((field) => field.required && isUnansweredBookingQuestion(values[field.id]) ? [field.id] : []));
102
+ }
103
+ /** The same words the server uses when it refuses an unanswered question. */
104
+ const UNANSWERED_QUESTION_MESSAGE = "Please answer this question.";
105
+ const UNANSWERED_QUESTIONS_SUMMARY = "Some questions still need an answer.";
106
+ /**
107
+ * The during-booking questions before the details step moves on: required
108
+ * questions need an answer, unless the booker is keeping earlier ones. Format
109
+ * checks (length, email and so on) are left to the server.
110
+ */
111
+ function checkBookingQuestionsAnswered(view) {
112
+ const { presentation } = view;
113
+ if (presentation.kind === "none") return { kind: "ok" };
114
+ if (presentation.kind === "unavailable") return {
115
+ kind: "refused",
116
+ message: presentation.message
117
+ };
118
+ if (view.answerMode === "keep_existing") return { kind: "ok" };
119
+ const missing = unansweredRequiredBookingQuestions(presentation.set.sections, view.values);
120
+ return missing.length === 0 ? { kind: "ok" } : {
121
+ kind: "unanswered",
122
+ message: UNANSWERED_QUESTIONS_SUMMARY,
123
+ fieldErrors: Object.fromEntries(missing.map((fieldId) => [fieldId, UNANSWERED_QUESTION_MESSAGE]))
124
+ };
125
+ }
126
+ //#endregion
127
+ //#region ../blocks/src/system/runtime/nodes/event-registration/bookingCalendar.ts
128
+ /** Public schedule plus the authorised outcome's arrival text; online access stays in email. */
129
+ function bookingCalendar(event, outcome) {
130
+ if (!event) return null;
131
+ const { identity } = outcome;
132
+ const sessions = event.registrationSubject.kind === "wholeSeries" ? event.registrationSubject.sessions : [{
133
+ occurrenceId: event.registrationSubject.occurrenceId,
134
+ startsAt: event.startsAt,
135
+ endsAt: event.endsAt
136
+ }];
137
+ const bookingId = identity.scope === "occurrence" ? identity.attendeeId : identity.registrationId;
138
+ const entries = sessions.map((session) => ({
139
+ uid: `booking-${bookingId}-${session.occurrenceId}@riverbankcms.com`,
140
+ sequence: 0,
141
+ title: event.title,
142
+ startsAt: new Date(session.startsAt),
143
+ endsAt: new Date(session.endsAt),
144
+ timezone: "UTC",
145
+ status: "confirmed",
146
+ location: identity.attendanceMode === "online" ? ONLINE_CALENDAR_LOCATION : outcome.arrivalVenues?.[session.occurrenceId] ?? event.venue?.name,
147
+ description: identity.attendanceMode === "online" ? ONLINE_CALENDAR_DESCRIPTION : void 0
148
+ }));
149
+ return bookingCalendarFromEntries(event.title, entries);
150
+ }
151
+ /** The online-booking entry's wording: joining details are kept out of a file that's easy to forward. */
152
+ const ONLINE_CALENDAR_LOCATION = "Online";
153
+ const ONLINE_CALENDAR_DESCRIPTION = "See your confirmation email for joining instructions.";
154
+ /** A calendar entry needs an end; a booking nobody gave one shows as an hour. */
155
+ function calendarEntryEnd(startsAt, endsAt) {
156
+ return endsAt && endsAt.getTime() > startsAt.getTime() ? endsAt : new Date(startsAt.getTime() + 60 * 6e4);
157
+ }
158
+ /** One booking's entries as a download, with Google and Outlook links when it's a single date. */
159
+ function bookingCalendarFromEntries(title, entries) {
160
+ const first = entries[0];
161
+ if (!first) return null;
162
+ const common = {
163
+ fileName: `${slugify(title) || "event"}.ics`,
164
+ feed: {
165
+ timezone: "UTC",
166
+ entries
167
+ }
168
+ };
169
+ return entries.length === 1 ? {
170
+ ...common,
171
+ kind: "single",
172
+ ...calendarLinks(first)
173
+ } : {
174
+ ...common,
175
+ kind: "sessions",
176
+ sessionCount: entries.length
177
+ };
178
+ }
179
+ //#endregion
180
+ export { calendarEntryEnd as a, checkBookingQuestionsAnswered as c, initialBookingQuestionsAnswerMode as d, initialBookingQuestionsValues as f, assertNever as h, bookingCalendarFromEntries as i, getInitialFieldValue as l, unansweredRequiredBookingQuestions as m, ONLINE_CALENDAR_LOCATION as n, UNANSWERED_QUESTION_MESSAGE as o, resolveBookingQuestionsAnswerMode as p, bookingCalendar as r, buildBookingQuestionsSubmission as s, ONLINE_CALENDAR_DESCRIPTION as t, initialBookingQuestionValues as u };