@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
@@ -0,0 +1,862 @@
1
+ "use client";
2
+ import { c as parseMediaAssetId, f as parseUuidBrand } from "./renderableMediaAssetAdmission-BsOWd9lf.mjs";
3
+ import { Mn as parseAppointmentId, Pn as parseClientArrangementId, Rn as parseAttendeeId, Vn as parseEventSeriesRegistrationId, _t as unknownKind, gt as exactSchema, ht as evolvingSchema, mt as portalBeforeYouComeTaskSchema } from "./src-ZSqRK3dD.mjs";
4
+ import { D as portalJoiningDetailsSchema, _ as portalPaymentToDoSchema, a as brandedId, c as courseRegistrationRefSchema, l as eventAttendeeRefSchema, o as cancellationMoneyOutcomeSchema, p as portalMoneySchema, r as appointmentRefSchema, t as customerOrderPaymentLabelsSchema, u as refundRecipientSchema, x as customerPassUseCaseSchema, y as customerMembershipStatusSchema } from "./portalOrders-COGn4BKG.mjs";
5
+ import { z } from "zod";
6
+ //#region ../core/src/branded/orders.ts
7
+ const unsafeAsOrderId = (id) => id;
8
+ const unsafeAsOrderPaymentReceiptId = (id) => id;
9
+ const parseOrderId = (value) => parseUuidBrand(value, unsafeAsOrderId);
10
+ const parseOrderPaymentReceiptId = (value) => parseUuidBrand(value, unsafeAsOrderPaymentReceiptId);
11
+ //#endregion
12
+ //#region ../core/src/branded/bookings.ts
13
+ const unsafeAsWaitlistEntryId = (id) => id;
14
+ const parseWaitlistEntryId = (value) => parseUuidBrand(value, unsafeAsWaitlistEntryId);
15
+ //#endregion
16
+ //#region ../core/src/branded/entitlements.ts
17
+ const unsafeAsEntitlementId = (id) => id;
18
+ const unsafeAsPassId = (id) => id;
19
+ const unsafeAsCustomerPassId = (id) => id;
20
+ const parseEntitlementId = (value) => parseUuidBrand(value, unsafeAsEntitlementId);
21
+ //#endregion
22
+ //#region ../core/src/booking-context-ref.ts
23
+ /** The raw id a booking's reference carries. Callers never choose among nullable columns. */
24
+ function bookingContextId(ref) {
25
+ switch (ref.tag) {
26
+ case "appointment": return ref.appointmentId;
27
+ case "event_attendee": return ref.attendeeId;
28
+ case "event_series_registration": return ref.registrationId;
29
+ }
30
+ }
31
+ //#endregion
32
+ //#region ../site-contracts/src/siteData/portalWaitlists.ts
33
+ const customerPortalWaitlistSubjectSchema = exactSchema()(z.discriminatedUnion("kind", [z.object({
34
+ kind: z.literal("occurrence"),
35
+ occurrenceId: z.string(),
36
+ eventSeriesId: z.string(),
37
+ startsAt: z.string(),
38
+ endsAt: z.string(),
39
+ timeZone: z.string(),
40
+ isOnline: z.boolean()
41
+ }), z.object({
42
+ kind: z.literal("wholeSeries"),
43
+ timeZone: z.string(),
44
+ isOnline: z.boolean(),
45
+ eventSeriesId: z.string(),
46
+ scheduleSummary: z.string().nullable()
47
+ })]));
48
+ const OFFER_PRICE_KINDS = [
49
+ "total",
50
+ "free",
51
+ "chosen_at_booking",
52
+ "not_known"
53
+ ];
54
+ const knownOfferPriceSchema = z.discriminatedUnion("kind", [
55
+ z.object({
56
+ kind: z.literal("total"),
57
+ amount: z.object({
58
+ amountCents: z.number(),
59
+ currency: z.string()
60
+ })
61
+ }),
62
+ z.object({ kind: z.literal("free") }),
63
+ z.object({ kind: z.literal("chosen_at_booking") }),
64
+ z.object({ kind: z.literal("not_known") })
65
+ ]);
66
+ /** A kind this build doesn't know reads as not known, never as a failed list. */
67
+ const unknownOfferPriceSchema = z.object({ kind: z.string().refine((kind) => !OFFER_PRICE_KINDS.includes(kind), "a known price failed to decode") }).transform(() => ({ kind: "not_known" }));
68
+ const portalWaitlistOfferPriceSchema = evolvingSchema()(z.union([knownOfferPriceSchema, unknownOfferPriceSchema]));
69
+ const waitlistEntryBase = {
70
+ id: z.string(),
71
+ subject: customerPortalWaitlistSubjectSchema,
72
+ eventTitle: z.string(),
73
+ eventPath: z.string().nullable(),
74
+ requestedPlaces: z.number(),
75
+ joinedAt: z.string()
76
+ };
77
+ const customerPortalWaitlistEntrySchema = exactSchema()(z.discriminatedUnion("status", [
78
+ z.object({
79
+ ...waitlistEntryBase,
80
+ status: z.literal("waiting"),
81
+ queuePosition: z.number().nullable(),
82
+ canLeave: z.literal(true)
83
+ }),
84
+ z.object({
85
+ ...waitlistEntryBase,
86
+ status: z.literal("placeAvailable"),
87
+ claimExpiresAt: z.string(),
88
+ claimPath: z.string().nullable(),
89
+ offerPrice: portalWaitlistOfferPriceSchema,
90
+ canLeave: z.literal(true)
91
+ }),
92
+ z.object({
93
+ ...waitlistEntryBase,
94
+ status: z.literal("offerExpired"),
95
+ claimExpiredAt: z.string(),
96
+ canLeave: z.literal(false)
97
+ })
98
+ ]));
99
+ //#endregion
100
+ //#region ../site-contracts/src/siteData/portalRegularSessions.ts
101
+ const weekdaySchema = z.literal([
102
+ 0,
103
+ 1,
104
+ 2,
105
+ 3,
106
+ 4,
107
+ 5,
108
+ 6
109
+ ]);
110
+ const portalRegularSessionCadenceSchema = exactSchema()(z.discriminatedUnion("kind", [z.object({
111
+ kind: z.literal("weekly"),
112
+ everyWeeks: z.literal([1, 2]),
113
+ weekday: weekdaySchema
114
+ }), z.object({
115
+ kind: z.literal("monthly"),
116
+ weekday: weekdaySchema,
117
+ nth: z.literal([
118
+ 1,
119
+ 2,
120
+ 3,
121
+ 4,
122
+ "last"
123
+ ])
124
+ })]));
125
+ const dateSchema = exactSchema()(z.union([
126
+ z.object({
127
+ state: z.literal("booked"),
128
+ occurrence: z.string(),
129
+ appointmentId: brandedId(parseAppointmentId, "appointment id"),
130
+ startAt: z.string(),
131
+ endAt: z.string()
132
+ }),
133
+ z.object({
134
+ state: z.enum([
135
+ "held",
136
+ "open",
137
+ "trainer_away"
138
+ ]),
139
+ occurrence: z.string(),
140
+ startAt: z.string(),
141
+ endAt: z.string()
142
+ }),
143
+ z.object({
144
+ state: z.literal("away"),
145
+ occurrence: z.string()
146
+ })
147
+ ]));
148
+ const portalRegularSessionSchema = exactSchema()(z.object({
149
+ arrangementId: brandedId(parseClientArrangementId, "regular sessions id"),
150
+ timezone: z.string(),
151
+ schedule: z.object({
152
+ effectiveFrom: z.string(),
153
+ cadence: portalRegularSessionCadenceSchema,
154
+ localStart: z.string()
155
+ }),
156
+ trainerName: z.string().nullable(),
157
+ serviceName: z.string().nullable(),
158
+ holdsTime: z.boolean(),
159
+ payment: z.union([z.object({
160
+ kind: z.literal("package"),
161
+ name: z.string().nullable(),
162
+ sessionsLeft: z.number()
163
+ }), z.object({ kind: z.enum(["owed", "payment_link"]) })]),
164
+ dates: z.array(dateSchema).readonly()
165
+ }));
166
+ const portalRegularSessionsResponseSchema = exactSchema()(z.object({ arrangements: z.array(portalRegularSessionSchema).readonly() }));
167
+ //#endregion
168
+ //#region ../site-contracts/src/siteData/portalBookings.ts
169
+ /**
170
+ * One booking model for the customer portal, from GET /api/portal/bookings and
171
+ * GET /api/portal/bookings/{kind}/{id}. Every kind shares the fields a card and
172
+ * a booking page need, and its own extras ride in `detail`. The server decides
173
+ * every fact and action here, including whether the booking is over; the
174
+ * portal only words them.
175
+ *
176
+ * Wire evolution (pinned SDK clients): decoding is strict for the variants
177
+ * this build knows. Three points are extensible, and a value a newer server
178
+ * adds there decodes to a closed `unsupported` state instead of failing the
179
+ * page: the booking kind (the booking still shows, with nothing to act on), an
180
+ * action's state (the action is disabled), and the money a cancellation would
181
+ * return (cancel is disabled, so the portal never guesses a refund).
182
+ * Explanations of why an action isn't offered come from the server as text,
183
+ * so new reasons need no client change.
184
+ */
185
+ const PORTAL_BOOKING_KINDS = [
186
+ "event",
187
+ "course",
188
+ "appointment"
189
+ ];
190
+ /** The one map from a booking's reference to its URL words. */
191
+ function portalBookingPath(ref) {
192
+ return {
193
+ kind: portalBookingKind(ref),
194
+ bookingId: bookingContextId(ref)
195
+ };
196
+ }
197
+ function portalBookingKind(ref) {
198
+ switch (ref.tag) {
199
+ case "event_attendee": return "event";
200
+ case "event_series_registration": return "course";
201
+ case "appointment": return "appointment";
202
+ }
203
+ }
204
+ function brandedBookingId(parse) {
205
+ return z.string().transform((value, ctx) => {
206
+ const parsed = parse(value);
207
+ if (parsed.ok) return parsed.value;
208
+ ctx.addIssue({
209
+ code: "custom",
210
+ message: "Invalid booking ID"
211
+ });
212
+ return z.NEVER;
213
+ });
214
+ }
215
+ /**
216
+ * The URL words back to the booking's reference, refusing anything that isn't
217
+ * a real id of that kind. The route's params, the client router and
218
+ * `parsePortalBookingRef` all read bookings through this.
219
+ */
220
+ const portalBookingPathSchema = z.union([
221
+ z.object({
222
+ kind: z.literal("event"),
223
+ bookingId: brandedBookingId(parseAttendeeId)
224
+ }).transform(({ bookingId }) => ({
225
+ tag: "event_attendee",
226
+ attendeeId: bookingId
227
+ })),
228
+ z.object({
229
+ kind: z.literal("course"),
230
+ bookingId: brandedBookingId(parseEventSeriesRegistrationId)
231
+ }).transform(({ bookingId }) => ({
232
+ tag: "event_series_registration",
233
+ registrationId: bookingId
234
+ })),
235
+ z.object({
236
+ kind: z.literal("appointment"),
237
+ bookingId: brandedBookingId(parseAppointmentId)
238
+ }).transform(({ bookingId }) => ({
239
+ tag: "appointment",
240
+ appointmentId: bookingId
241
+ }))
242
+ ]);
243
+ /** The listed values must cover the union, so a new member here is a compile error, not a silent fallback. */
244
+ function allOf() {
245
+ return (values) => values;
246
+ }
247
+ const unsupported = (known) => unknownKind(known).transform(() => ({ kind: "unsupported" }));
248
+ const whenSchema = exactSchema()(z.object({
249
+ startsAt: z.string(),
250
+ endsAt: z.string().nullable(),
251
+ timeZone: z.string()
252
+ }));
253
+ const venueSchema = exactSchema()(z.object({
254
+ name: z.string().nullable(),
255
+ address: z.discriminatedUnion("kind", [
256
+ z.object({
257
+ kind: z.literal("shown"),
258
+ address: z.string().nullable(),
259
+ doorNote: z.string().nullable(),
260
+ directions: z.string().nullable()
261
+ }),
262
+ z.object({
263
+ kind: z.literal("after_booking"),
264
+ area: z.string().nullable()
265
+ }),
266
+ z.object({ kind: z.literal("not_given") })
267
+ ])
268
+ }));
269
+ const whereSchema = exactSchema()(z.discriminatedUnion("kind", [
270
+ z.object({
271
+ kind: z.literal("venue"),
272
+ venue: venueSchema
273
+ }),
274
+ z.object({
275
+ kind: z.literal("online"),
276
+ joining: portalJoiningDetailsSchema.nullable()
277
+ }),
278
+ z.object({
279
+ kind: z.literal("hybrid"),
280
+ venue: venueSchema,
281
+ joining: portalJoiningDetailsSchema.nullable()
282
+ }),
283
+ z.object({ kind: z.literal("not_given") })
284
+ ]));
285
+ const standingSchema = exactSchema()(z.discriminatedUnion("kind", [
286
+ z.object({ kind: z.literal("booked") }),
287
+ z.object({ kind: z.literal("awaiting_payment") }),
288
+ z.object({ kind: z.literal("requested") }),
289
+ z.object({
290
+ kind: z.literal("waitlisted"),
291
+ position: z.number().nullable()
292
+ }),
293
+ z.object({ kind: z.literal("cancelled") }),
294
+ z.object({
295
+ kind: z.literal("request_not_accepted"),
296
+ outcome: z.enum([
297
+ "declined",
298
+ "lapsed",
299
+ "withdrawn"
300
+ ])
301
+ }),
302
+ z.object({ kind: z.literal("missed") }),
303
+ z.object({ kind: z.literal("given_away") })
304
+ ]));
305
+ const peopleSchema = exactSchema()(z.object({
306
+ places: z.number(),
307
+ guests: z.array(z.object({
308
+ place: z.number(),
309
+ name: z.string().nullable(),
310
+ email: z.string().nullable(),
311
+ phone: z.string().nullable()
312
+ })).readonly(),
313
+ namesMissing: z.number()
314
+ }));
315
+ const ticketLineSchema = exactSchema()(z.object({
316
+ label: z.string(),
317
+ quantity: z.number(),
318
+ unitPrice: portalMoneySchema.nullable()
319
+ }));
320
+ const orderSchema = exactSchema()(z.object({
321
+ orderId: z.string(),
322
+ orderNumber: z.string(),
323
+ total: portalMoneySchema,
324
+ paidWithCredit: portalMoneySchema.nullable(),
325
+ paidSoFar: portalMoneySchema,
326
+ paymentLabels: customerOrderPaymentLabelsSchema,
327
+ toDo: portalPaymentToDoSchema,
328
+ bookingCount: z.number().int().positive()
329
+ }));
330
+ const paymentSchema = exactSchema()(z.discriminatedUnion("kind", [
331
+ z.object({ kind: z.literal("free") }),
332
+ z.object({ kind: z.literal("not_decided") }),
333
+ z.object({
334
+ kind: z.literal("pass"),
335
+ pass: z.object({
336
+ customerPassId: z.string(),
337
+ name: z.string(),
338
+ useCase: customerPassUseCaseSchema,
339
+ creditsRemaining: z.number(),
340
+ expiresAt: z.string().nullable()
341
+ }).nullable()
342
+ }),
343
+ z.object({
344
+ kind: z.literal("membership"),
345
+ membership: z.object({
346
+ customerMembershipId: z.string(),
347
+ name: z.string(),
348
+ status: customerMembershipStatusSchema
349
+ }).nullable()
350
+ }),
351
+ z.object({
352
+ kind: z.literal("order"),
353
+ order: orderSchema
354
+ }),
355
+ z.object({
356
+ kind: z.literal("owed"),
357
+ amount: portalMoneySchema.nullable()
358
+ }),
359
+ z.object({ kind: z.literal("unavailable") })
360
+ ]));
361
+ const ACTION_KINDS = allOf()([
362
+ "available",
363
+ "closed",
364
+ "not_offered"
365
+ ]);
366
+ const closedActionSchema = z.object({
367
+ kind: z.literal("closed"),
368
+ closedAt: z.string()
369
+ });
370
+ const notOfferedActionSchema = z.object({
371
+ kind: z.literal("not_offered"),
372
+ explanation: z.string().nullable()
373
+ });
374
+ const knownActionSchema = exactSchema()(z.discriminatedUnion("kind", [
375
+ z.object({
376
+ kind: z.literal("available"),
377
+ until: z.string().nullable()
378
+ }),
379
+ closedActionSchema,
380
+ notOfferedActionSchema
381
+ ]));
382
+ const portalBookingActionSchema = evolvingSchema()(z.union([knownActionSchema, unsupported(ACTION_KINDS)]));
383
+ const RESCHEDULE_KINDS = allOf()([
384
+ "available",
385
+ "closed",
386
+ "not_offered",
387
+ "single_run"
388
+ ]);
389
+ const knownRescheduleSchema = exactSchema()(z.discriminatedUnion("kind", [
390
+ z.object({
391
+ kind: z.literal("available"),
392
+ until: z.string().nullable()
393
+ }),
394
+ closedActionSchema,
395
+ notOfferedActionSchema,
396
+ z.object({ kind: z.literal("single_run") })
397
+ ]));
398
+ /** An event's reschedule: a reason this build doesn't know decodes to `unsupported`, as every action's does. */
399
+ const portalRescheduleActionSchema = evolvingSchema()(z.union([knownRescheduleSchema, unsupported(RESCHEDULE_KINDS)]));
400
+ const MONEY_KINDS = allOf()([
401
+ "nothing_to_return",
402
+ "refund",
403
+ "credit_back",
404
+ "keep_money",
405
+ "keep_credit",
406
+ "contact_business",
407
+ "not_known"
408
+ ]);
409
+ const cancelMoneySchema = exactSchema()(z.union([cancellationMoneyOutcomeSchema, z.object({ kind: z.literal("not_known") })]));
410
+ const knownCancelSchema = exactSchema()(z.discriminatedUnion("kind", [
411
+ z.object({
412
+ kind: z.literal("available"),
413
+ until: z.string().nullable(),
414
+ money: cancelMoneySchema,
415
+ recipient: refundRecipientSchema,
416
+ termsApply: z.boolean()
417
+ }),
418
+ closedActionSchema,
419
+ notOfferedActionSchema
420
+ ]));
421
+ /** Open, but with money this build can't read: cancel is withheld rather than offered without its outcome. */
422
+ const cancelWithUnknownMoney = z.object({
423
+ kind: z.literal("available"),
424
+ money: unknownKind(MONEY_KINDS)
425
+ }).transform(() => ({ kind: "unsupported" }));
426
+ const sharedActionsShape = {
427
+ cancel: evolvingSchema()(z.union([
428
+ knownCancelSchema,
429
+ cancelWithUnknownMoney,
430
+ unsupported(ACTION_KINDS)
431
+ ])),
432
+ rebook: portalBookingActionSchema,
433
+ editGuests: portalBookingActionSchema,
434
+ showTicket: portalBookingActionSchema
435
+ };
436
+ const eventActionsSchema = evolvingSchema()(z.object({
437
+ ...sharedActionsShape,
438
+ transfer: portalBookingActionSchema,
439
+ reschedule: portalRescheduleActionSchema
440
+ }));
441
+ const courseActionsSchema = evolvingSchema()(z.object(sharedActionsShape));
442
+ const appointmentActionsSchema = evolvingSchema()(z.object({
443
+ ...sharedActionsShape,
444
+ reschedule: portalBookingActionSchema
445
+ }));
446
+ const baseShape = {
447
+ title: z.string(),
448
+ timing: z.enum(["upcoming", "over"]),
449
+ where: whereSchema,
450
+ standing: standingSchema,
451
+ bookedAt: z.string().nullable(),
452
+ people: peopleSchema,
453
+ questions: portalBeforeYouComeTaskSchema.nullable(),
454
+ payment: paymentSchema
455
+ };
456
+ const eventDetailSchema = exactSchema()(z.object({
457
+ occurrenceId: z.string(),
458
+ seriesName: z.string().nullable(),
459
+ eventPath: z.string().nullable(),
460
+ occurrencePath: z.string().nullable(),
461
+ ticketLines: z.array(ticketLineSchema).readonly(),
462
+ transfer: z.discriminatedUnion("kind", [
463
+ z.object({ kind: z.literal("none") }),
464
+ z.object({
465
+ kind: z.literal("received"),
466
+ from: z.string().nullable(),
467
+ at: z.string().nullable()
468
+ }),
469
+ z.object({
470
+ kind: z.literal("given"),
471
+ to: z.string().nullable(),
472
+ at: z.string().nullable()
473
+ })
474
+ ]),
475
+ rooms: z.array(z.object({
476
+ name: z.string(),
477
+ sleeps: z.number(),
478
+ bookedAs: z.enum(["private", "shared"]),
479
+ people: z.array(z.string()).readonly()
480
+ })).readonly(),
481
+ guestNamesRequired: z.boolean()
482
+ }));
483
+ const courseDetailSchema = exactSchema()(z.object({
484
+ eventPath: z.string().nullable(),
485
+ sessions: z.array(whenSchema).readonly(),
486
+ nextSessionAt: z.string().nullable(),
487
+ ticketLines: z.array(ticketLineSchema).readonly()
488
+ }));
489
+ const appointmentDetailSchema = exactSchema()(z.object({
490
+ serviceName: z.string(),
491
+ serviceId: z.string(),
492
+ resourceId: z.string().nullable(),
493
+ withName: z.string().nullable(),
494
+ request: z.object({
495
+ requestedAt: z.string().nullable(),
496
+ decidedAt: z.string().nullable()
497
+ }).nullable(),
498
+ regularSession: z.object({
499
+ cadence: portalRegularSessionCadenceSchema,
500
+ localStart: z.string()
501
+ }).nullable()
502
+ }));
503
+ const knownBookingSchema = evolvingSchema()(z.discriminatedUnion("kind", [
504
+ z.object({
505
+ kind: z.literal("event"),
506
+ ref: eventAttendeeRefSchema,
507
+ ...baseShape,
508
+ when: whenSchema,
509
+ actions: eventActionsSchema,
510
+ detail: eventDetailSchema
511
+ }),
512
+ z.object({
513
+ kind: z.literal("course"),
514
+ ref: courseRegistrationRefSchema,
515
+ ...baseShape,
516
+ when: whenSchema.nullable(),
517
+ actions: courseActionsSchema,
518
+ detail: courseDetailSchema
519
+ }),
520
+ z.object({
521
+ kind: z.literal("appointment"),
522
+ ref: appointmentRefSchema,
523
+ ...baseShape,
524
+ when: whenSchema,
525
+ actions: appointmentActionsSchema,
526
+ detail: appointmentDetailSchema
527
+ })
528
+ ]));
529
+ /** A newer kind's reference, read only far enough to key the card on it. */
530
+ const unknownRefKey = z.record(z.string(), z.unknown()).catch({}).transform((ref) => Object.values(ref).filter((value) => typeof value === "string").join(":"));
531
+ const unsupportedBookingSchema = unknownKind(PORTAL_BOOKING_KINDS).extend({
532
+ title: z.string(),
533
+ when: whenSchema.nullable().catch(null),
534
+ ref: unknownRefKey
535
+ }).transform((booking) => ({
536
+ kind: "unsupported",
537
+ key: `${booking.kind}:${booking.ref}`,
538
+ title: booking.title,
539
+ when: booking.when
540
+ }));
541
+ const portalBookingViewSchema = evolvingSchema()(z.union([knownBookingSchema, unsupportedBookingSchema]));
542
+ const portalBookingsResponseSchema = evolvingSchema()(z.object({
543
+ waitlist: z.array(customerPortalWaitlistEntrySchema).readonly(),
544
+ comingUp: z.array(portalBookingViewSchema).readonly(),
545
+ cancelled: z.array(portalBookingViewSchema).readonly(),
546
+ past: z.array(portalBookingViewSchema).readonly(),
547
+ nextPastCursor: z.string().nullable()
548
+ }));
549
+ const portalBookingResponseSchema = evolvingSchema()(z.object({ booking: knownBookingSchema }));
550
+ //#endregion
551
+ //#region ../site-contracts/src/siteData/portalRoutes.ts
552
+ /**
553
+ * Pages the server renders on its own: Continue (before any session), tickets
554
+ * and downloads. Every other page is the client portal's. The hosts' renderer
555
+ * and the client's navigation both read this split, so neither can disagree
556
+ * about who draws a page.
557
+ */
558
+ const SERVER_PORTAL_PAGES = [
559
+ "continue",
560
+ "ticket",
561
+ "download",
562
+ "download_file"
563
+ ];
564
+ function isServerPortalTarget(target) {
565
+ return SERVER_PORTAL_PAGES.includes(target.page);
566
+ }
567
+ const CUSTOMER_PORTAL_PATH = "/portal";
568
+ const NOT_FOUND = { page: "not_found" };
569
+ const ARRIVAL_PARAMS = {
570
+ signed_in: ["portal_login", "success"],
571
+ order_paid: ["order", "success"],
572
+ order_checkout_left: ["order", "cancelled"]
573
+ };
574
+ const ENTRY_REASON_PARAMS = {
575
+ none: [],
576
+ opened: [["entry", "1"]],
577
+ stale: [["entry", "1"], ["stale", "1"]],
578
+ link_sent: [["link", "sent"]],
579
+ link_limited: [["link", "limited"]],
580
+ demo_refused: [["link", "demo"]]
581
+ };
582
+ /** The query a page's own data puts in its address. */
583
+ function targetParams(target) {
584
+ return target.page === "continue" ? ENTRY_REASON_PARAMS[target.reason] : [];
585
+ }
586
+ function withQuery(path, params) {
587
+ const query = new URLSearchParams(params.map(([name, value]) => [name, value])).toString();
588
+ return query ? `${path}?${query}` : path;
589
+ }
590
+ function bookingPath(ref) {
591
+ const { kind, bookingId } = portalBookingPath(ref);
592
+ return `${CUSTOMER_PORTAL_PATH}/bookings/${kind}/${bookingId}`;
593
+ }
594
+ function targetPath(target) {
595
+ const base = CUSTOMER_PORTAL_PATH;
596
+ switch (target.page) {
597
+ case "home": return base;
598
+ case "bookings": return `${base}/bookings`;
599
+ case "booking": return bookingPath(target.ref);
600
+ case "booking_questions": return `${bookingPath(target.ref)}/questions`;
601
+ case "booking_cancel": return `${bookingPath(target.ref)}/cancel`;
602
+ case "booking_transfer": return `${bookingPath(target.ref)}/transfer`;
603
+ case "booking_reschedule": return `${bookingPath(target.ref)}/reschedule`;
604
+ case "ticket": return `${bookingPath(target.ref)}/ticket`;
605
+ case "waitlist_offer": return `${base}/bookings/waitlist/${target.entryId}`;
606
+ case "passes": return `${base}/passes`;
607
+ case "payments": return `${base}/payments`;
608
+ case "order": return `${base}/payments/orders/${target.orderId}`;
609
+ case "receipt": return `${base}/payments/receipts/${target.receiptId}`;
610
+ case "downloads": return `${base}/downloads`;
611
+ case "download": return `${base}/downloads/${target.entitlementId}`;
612
+ case "download_file": return `${base}/downloads/${target.entitlementId}/files/${target.assetId}`;
613
+ case "details": return `${base}/details`;
614
+ case "sign_in": return `${base}/sign-in`;
615
+ case "continue": return `${base}/continue`;
616
+ }
617
+ }
618
+ /** The site-relative path of a portal page, optionally carrying an arrival outcome. */
619
+ function portalPath(target, options = {}) {
620
+ const arrival = options.arrival ? [ARRIVAL_PARAMS[options.arrival]] : [];
621
+ return withQuery(targetPath(target), [...targetParams(target), ...arrival]);
622
+ }
623
+ /**
624
+ * A destination marked with an arrival outcome (the callback marks where sign-in
625
+ * lands), keeping its own query: a checkout outcome already on it stays.
626
+ */
627
+ function withPortalArrival(destination, arrival) {
628
+ const marked = new URL(destination);
629
+ const [name, value] = ARRIVAL_PARAMS[arrival];
630
+ marked.searchParams.set(name, value);
631
+ return marked;
632
+ }
633
+ /** Query parameters the portal reads and removes: the old link shapes and the arrival outcomes. */
634
+ const CONSUMED_PARAMS = [
635
+ "portal_tab",
636
+ "portal_task",
637
+ "portal_order",
638
+ "portal_login",
639
+ "order"
640
+ ];
641
+ /** Continue's own query, which only Continue reads. */
642
+ const ENTRY_PARAMS = [
643
+ "entry",
644
+ "stale",
645
+ "link"
646
+ ];
647
+ function parsePortalLocation(url) {
648
+ const signedIn = cleanParam(url.searchParams, "portal_login") === "success";
649
+ const checkout = parseCheckoutArrival(url.searchParams);
650
+ const arrivals = [...signedIn ? ["signed_in"] : [], ...checkout ? [checkout] : []];
651
+ const segments = portalSegments(url.pathname);
652
+ if (segments === null) return {
653
+ route: NOT_FOUND,
654
+ arrivals,
655
+ rewrite: null
656
+ };
657
+ const route = (segments.length === 0 ? legacyQueryRoute(url.searchParams, checkout) : null) ?? routeFromSegments(segments, url.searchParams);
658
+ return {
659
+ route,
660
+ arrivals,
661
+ rewrite: rewriteFor(url, route)
662
+ };
663
+ }
664
+ function parseCheckoutArrival(params) {
665
+ const order = cleanParam(params, "order");
666
+ return order === "success" ? "order_paid" : order === "cancelled" ? "order_checkout_left" : null;
667
+ }
668
+ function parseEntryReason(params) {
669
+ const link = params.get("link");
670
+ if (link === "sent") return "link_sent";
671
+ if (link === "limited") return "link_limited";
672
+ if (link === "demo") return "demo_refused";
673
+ if (params.get("entry") !== "1") return "none";
674
+ return params.get("stale") === "1" ? "stale" : "opened";
675
+ }
676
+ /** Whether a path is under the portal at all, whatever page it names. */
677
+ function isPortalPathname(pathname) {
678
+ return pathname === "/portal" || pathname.startsWith(`/portal/`);
679
+ }
680
+ /** The path below `/portal`, decoded; null when the path isn't the portal's. */
681
+ function portalSegments(pathname) {
682
+ if (!isPortalPathname(pathname)) return null;
683
+ try {
684
+ return pathname.slice(7).split("/").filter((part) => part !== "").map(decodeURIComponent);
685
+ } catch {
686
+ return null;
687
+ }
688
+ }
689
+ function rewriteFor(url, route) {
690
+ if (route.page === "not_found") return null;
691
+ const kept = new URLSearchParams(url.searchParams);
692
+ [...CONSUMED_PARAMS, ...route.page === "continue" ? ENTRY_PARAMS : []].forEach((name) => kept.delete(name));
693
+ const canonical = withQuery(targetPath(route), [...targetParams(route), ...kept.entries()]);
694
+ const visited = url.searchParams.toString();
695
+ return canonical === `${url.pathname}${visited ? `?${visited}` : ""}` ? null : canonical;
696
+ }
697
+ function cleanParam(params, name) {
698
+ const value = params.get(name)?.trim();
699
+ return value ? value : null;
700
+ }
701
+ const only = (rest, route) => rest.length === 0 ? route : NOT_FOUND;
702
+ function routeFromSegments(segments, params) {
703
+ const [first, ...rest] = segments;
704
+ switch (first) {
705
+ case void 0: return { page: "home" };
706
+ case "bookings": return bookingsRoute(rest);
707
+ case "passes": return only(rest, { page: "passes" });
708
+ case "payments": return paymentsRoute(rest);
709
+ case "downloads":
710
+ case "digital-products": return downloadsRoute(rest);
711
+ case "tickets": return rest.length === 1 ? ticketRoute(parseBookingRef("event", rest[0])) : NOT_FOUND;
712
+ case "details": return only(rest, { page: "details" });
713
+ case "sign-in": return only(rest, { page: "sign_in" });
714
+ case "continue": return only(rest, {
715
+ page: "continue",
716
+ reason: parseEntryReason(params)
717
+ });
718
+ default: return NOT_FOUND;
719
+ }
720
+ }
721
+ function parseBookingRef(kind, bookingId) {
722
+ const parsed = portalBookingPathSchema.safeParse({
723
+ kind,
724
+ bookingId
725
+ });
726
+ return parsed.success ? parsed.data : null;
727
+ }
728
+ function ticketRoute(ref) {
729
+ return ref?.tag === "event_attendee" ? {
730
+ page: "ticket",
731
+ ref
732
+ } : NOT_FOUND;
733
+ }
734
+ function bookingsRoute(rest) {
735
+ const [kind, id, action, ...extra] = rest;
736
+ if (kind === void 0) return { page: "bookings" };
737
+ if (kind === "waitlist") {
738
+ const entryId = parseWaitlistEntryId(id);
739
+ return entryId.ok && action === void 0 ? {
740
+ page: "waitlist_offer",
741
+ entryId: entryId.value
742
+ } : NOT_FOUND;
743
+ }
744
+ const ref = parseBookingRef(kind, id);
745
+ if (!ref || extra.length > 0) return NOT_FOUND;
746
+ return bookingActionRoute(ref, action);
747
+ }
748
+ function bookingActionRoute(ref, action) {
749
+ switch (action) {
750
+ case void 0: return {
751
+ page: "booking",
752
+ ref
753
+ };
754
+ case "questions": return {
755
+ page: "booking_questions",
756
+ ref
757
+ };
758
+ case "cancel": return {
759
+ page: "booking_cancel",
760
+ ref
761
+ };
762
+ case "transfer": return ref.tag === "event_attendee" ? {
763
+ page: "booking_transfer",
764
+ ref
765
+ } : NOT_FOUND;
766
+ case "reschedule": return ref.tag === "event_series_registration" ? NOT_FOUND : {
767
+ page: "booking_reschedule",
768
+ ref
769
+ };
770
+ case "ticket": return ticketRoute(ref);
771
+ default: return NOT_FOUND;
772
+ }
773
+ }
774
+ function paymentsRoute(rest) {
775
+ const [what, id, ...extra] = rest;
776
+ if (what === void 0) return { page: "payments" };
777
+ if (extra.length > 0) return NOT_FOUND;
778
+ if (what === "orders") {
779
+ const orderId = parseOrderId(id);
780
+ return orderId.ok ? {
781
+ page: "order",
782
+ orderId: orderId.value
783
+ } : NOT_FOUND;
784
+ }
785
+ if (what === "receipts") {
786
+ const receiptId = parseOrderPaymentReceiptId(id);
787
+ return receiptId.ok ? {
788
+ page: "receipt",
789
+ receiptId: receiptId.value
790
+ } : NOT_FOUND;
791
+ }
792
+ return NOT_FOUND;
793
+ }
794
+ function downloadsRoute(rest) {
795
+ const [id, files, asset, ...extra] = rest;
796
+ if (id === void 0) return { page: "downloads" };
797
+ const entitlementId = parseEntitlementId(id);
798
+ if (!entitlementId.ok || extra.length > 0) return NOT_FOUND;
799
+ if (files === void 0) return {
800
+ page: "download",
801
+ entitlementId: entitlementId.value
802
+ };
803
+ const assetId = parseMediaAssetId(asset);
804
+ return files === "files" && assetId.ok ? {
805
+ page: "download_file",
806
+ entitlementId: entitlementId.value,
807
+ assetId: assetId.value
808
+ } : NOT_FOUND;
809
+ }
810
+ /**
811
+ * `/portal?…` as emails and pages wrote it before the portal had paths. A task
812
+ * link wins, then an order, then a tab; a part that doesn't parse is ignored,
813
+ * as the old portal ignored it. Coming back from paying lands on payments.
814
+ */
815
+ function legacyQueryRoute(params, checkout) {
816
+ return legacyTaskRoute(cleanParam(params, "portal_task")) ?? legacyOrderRoute(cleanParam(params, "portal_order")) ?? legacyTabRoute(cleanParam(params, "portal_tab")) ?? (checkout ? { page: "payments" } : null);
817
+ }
818
+ /** `portal_task` named the questions task of a booking, or a waitlist offer. */
819
+ const LEGACY_TASK_KINDS = /* @__PURE__ */ new Map([
820
+ ["appointment", "appointment"],
821
+ ["event", "event"],
822
+ ["event_series_registration", "course"]
823
+ ]);
824
+ function legacyTaskRoute(value) {
825
+ const [kind, id, ...rest] = value?.split(":") ?? [];
826
+ if (!kind || !id || rest.length > 0) return null;
827
+ if (kind === "waitlist") {
828
+ const entryId = parseWaitlistEntryId(id);
829
+ return entryId.ok ? {
830
+ page: "waitlist_offer",
831
+ entryId: entryId.value
832
+ } : null;
833
+ }
834
+ const bookingKind = LEGACY_TASK_KINDS.get(kind);
835
+ const ref = bookingKind ? parseBookingRef(bookingKind, id) : null;
836
+ return ref ? {
837
+ page: "booking_questions",
838
+ ref
839
+ } : null;
840
+ }
841
+ function legacyOrderRoute(value) {
842
+ if (value === null) return null;
843
+ const orderId = parseOrderId(value);
844
+ return orderId.ok ? {
845
+ page: "order",
846
+ orderId: orderId.value
847
+ } : { page: "payments" };
848
+ }
849
+ const LEGACY_TABS = /* @__PURE__ */ new Map([
850
+ ["events", { page: "bookings" }],
851
+ ["appointments", { page: "bookings" }],
852
+ ["orders", { page: "payments" }],
853
+ ["digital-products", { page: "downloads" }],
854
+ ["passes-memberships", { page: "passes" }],
855
+ ["credit", { page: "passes" }],
856
+ ["profile", { page: "details" }]
857
+ ]);
858
+ function legacyTabRoute(value) {
859
+ return value === null ? null : LEGACY_TABS.get(value) ?? null;
860
+ }
861
+ //#endregion
862
+ export { withPortalArrival as a, portalBookingViewSchema as c, portalWaitlistOfferPriceSchema as d, unsafeAsCustomerPassId as f, parseOrderPaymentReceiptId as h, portalPath as i, portalBookingsResponseSchema as l, parseOrderId as m, isServerPortalTarget as n, portalBookingPath as o, unsafeAsPassId as p, parsePortalLocation as r, portalBookingResponseSchema as s, CUSTOMER_PORTAL_PATH as t, portalRegularSessionsResponseSchema as u };