@riverbankcms/sdk 0.181.0 → 0.183.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 (226) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/README.md +49 -3
  3. package/dist/_dts/{BlocksIslandsHydrator-CVCasDPz.d.ts → BlocksIslandsHydrator-X1_G96iN.d.ts} +1 -1
  4. package/dist/_dts/{Page-Dtj2Ui3S.d.ts → Page-CEqZJZEE.d.ts} +7 -7
  5. package/dist/_dts/{SdkPreviewMode-D1f_60WW.d.ts → SdkPreviewMode-DQejfbXL.d.ts} +2 -2
  6. package/dist/_dts/{client-Chr9pNVW.d.ts → client-B_B_amKD.d.ts} +2 -3
  7. package/dist/_dts/{content-types-kjccgopX.d.ts → content-types-Dhx5Ocvx.d.ts} +9 -16
  8. package/dist/_dts/{contracts-BodaiS00.d.ts → contracts-FeOnfoa1.d.ts} +3 -3
  9. package/dist/_dts/{generatePageMetadata-BS6kaJFp.d.ts → generatePageMetadata-m70J6tit.d.ts} +2 -2
  10. package/dist/_dts/{index-Brl6_I2j.d.ts → index-BOpUh8kO.d.ts} +1 -1
  11. package/dist/_dts/{index-CJkefwYh.d.ts → index-Bizdaxji.d.ts} +2 -2
  12. package/dist/_dts/{index-Diqt0PvG.d.ts → index-BxCmCit0.d.ts} +1 -1
  13. package/dist/_dts/{index-DG0OvBs0.d.ts → index-CjAkEWAp.d.ts} +4 -4
  14. package/dist/_dts/{index-D1WpKwQe.d.ts → index-iuFrbIjt.d.ts} +1 -1
  15. package/dist/_dts/{index-Dy50xUMK.d.ts → index-liuhlOX7.d.ts} +2 -2
  16. package/dist/_dts/{loadContent-BgxshKrA.d.ts → loadContent-D4wrTIIw.d.ts} +7 -7
  17. package/dist/_dts/{request-CA0izds5.d.ts → request-Gn0O1blj.d.ts} +25042 -23761
  18. package/dist/_dts/{resolveBlockData-ChQmwEd3.d.ts → resolveBlockData-D5duwuqS.d.ts} +5 -5
  19. package/dist/_dts/{resolvePageContent-BvGyvblj.d.ts → resolvePageContent-xzJ3c9Na.d.ts} +1 -1
  20. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  21. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  22. package/dist/_dts/sdk/src/client.d.ts +7 -7
  23. package/dist/_dts/sdk/src/config/index.d.ts +7 -7
  24. package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
  25. package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
  26. package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
  27. package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
  28. package/dist/_dts/sdk/src/data/types.d.ts +2 -2
  29. package/dist/_dts/sdk/src/gifting/client.d.ts +1 -1
  30. package/dist/_dts/sdk/src/index.d.ts +8 -8
  31. package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
  32. package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
  33. package/dist/_dts/sdk/src/navigation/index.d.ts +3 -3
  34. package/dist/_dts/sdk/src/next/index.d.ts +7 -7
  35. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  36. package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
  37. package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
  38. package/dist/_dts/sdk/src/portal/index.d.ts +1 -1
  39. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  40. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  41. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  42. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  43. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  44. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
  45. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
  46. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
  47. package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
  48. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  49. package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
  50. package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
  51. package/dist/_dts/sdk/src/routing/index.d.ts +6 -6
  52. package/dist/_dts/sdk/src/server.d.ts +5 -5
  53. package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
  54. package/dist/_dts/sdk/src/theme/index.d.ts +91 -2
  55. package/dist/_dts/{serviceBookingOutline-BgFbJQhU.d.ts → serviceBookingOutline-B1gyJon_.d.ts} +7 -7
  56. package/dist/_dts/{types-CgS3xLk8.d.ts → types-BoITy0rA.d.ts} +41 -4
  57. package/dist/_dts/{types-CQrsP1x_.d.ts → types-DBNuMtSk.d.ts} +16 -5
  58. package/dist/_dts/{types-R65DKjPn.d.ts → types-DHMcuoeQ.d.ts} +7 -7
  59. package/dist/_dts/{validation-6LTIbuBA.d.ts → validation-BIPO-XlE.d.ts} +4 -4
  60. package/dist/client/{BlocksIslandsHydrator-DqZPz6oW.mjs → BlocksIslandsHydrator-Ct8slgRk.mjs} +22 -18
  61. package/dist/client/{BookingMailingListNote-uWfR2kaG.mjs → BookingMailingListNote-qqTxGGS4.mjs} +7 -7
  62. package/dist/client/{BookingQuestionFields-CyNIKw6k.mjs → BookingQuestionFields-DCh9MUIF.mjs} +2 -2
  63. package/dist/client/{CalendarAction-D_Glwvz2.mjs → CalendarAction-RcdaStG7.mjs} +1 -1
  64. package/dist/client/{CalendarNavigationChevron-BGCX3zwG.mjs → CalendarNavigationChevron-D7Wt-Oaa.mjs} +27 -10
  65. package/dist/client/{CheckboxChoice-C8i4NraK.mjs → CheckboxChoice-BdGxZWeg.mjs} +1 -1
  66. package/dist/client/{DemoBookingPortalAccess-DFLPyuqe.mjs → DemoBookingPortalAccess-HFVkoOac.mjs} +5 -5
  67. package/dist/client/{EventCalendar.client-zDL4-t-B.mjs → EventCalendar.client-BtkJW8bA.mjs} +10 -10
  68. package/dist/client/{EventCombined.client-uciDKLID.mjs → EventCombined.client-DxaGjFFS.mjs} +9 -9
  69. package/dist/client/{EventEmbeddedCheckoutStep-BGkbUhuw.mjs → EventEmbeddedCheckoutStep-B2c5dR49.mjs} +1 -1
  70. package/dist/client/{EventItem-CwzrjcRw.mjs → EventItem-Fr2qi2C2.mjs} +33 -186
  71. package/dist/client/{EventListWeekNavigation-ChvcnPma.mjs → EventListWeekNavigation-BRMaq0ky.mjs} +1 -1
  72. package/dist/client/{EventListing.client-DA57Qoyx.mjs → EventListing.client-BhGxfbjt.mjs} +3 -3
  73. package/dist/client/{EventListing.view-DZ0qMFF4.mjs → EventListing.view-COuEJzbO.mjs} +8 -8
  74. package/dist/client/{EventRegistrationPayment-DSqCJL8E.mjs → EventRegistrationPayment-BTLYhVxD.mjs} +41 -195
  75. package/dist/client/{Page-C7mygH_f.mjs → Page-CgbQZP5g.mjs} +2947 -1018
  76. package/dist/client/{ProtectedSubmitButton-BNnKuir8.mjs → ProtectedSubmitButton-BG7my0Qf.mjs} +1 -1
  77. package/dist/client/{SiteTermsAgreementField-B4z-e4Wq.mjs → SiteTermsAgreementField-DQNkfNLA.mjs} +3 -3
  78. package/dist/client/{StepIndicator-Dn_DY4oY.mjs → StepIndicator-DvPekKeM.mjs} +1 -1
  79. package/dist/client/{StepIndicator-atfDU82W.mjs → StepIndicator-DyXoI3ob.mjs} +221 -20
  80. package/dist/client/{ThemedButton-PFOhXktM.mjs → ThemedButton-Bc9DBbVp.mjs} +42 -9
  81. package/dist/client/{accessibleSurfaces-n6kS6Hct.mjs → accessibleSurfaces-wj4Rloo5.mjs} +1214 -724
  82. package/dist/client/{accordion-CsW8U3ff.mjs → accordion-BVXfjnh-.mjs} +1 -1
  83. package/dist/client/{booking-form.client-cBWM392H.mjs → booking-form.client-DycPGtke.mjs} +191 -71
  84. package/dist/client/{bookingForm-DgySpp6C.mjs → bookingForm-DrWSUqL3.mjs} +4 -4
  85. package/dist/client/bookings.mjs +5 -5
  86. package/dist/client/{boxStyleClassNames-BpGVdLFD.mjs → boxStyleClassNames-CduDRcIk.mjs} +2 -2
  87. package/dist/client/buttonParts-CJEtVOUy.mjs +1511 -0
  88. package/dist/client/{carousel-DJoleFV3.mjs → carousel-DyCLMP8s.mjs} +2 -2
  89. package/dist/client/{carousel.client-BtLwHefX.mjs → carousel.client-DffP_Nv0.mjs} +1 -1
  90. package/dist/client/{cart-EO5o6uPH.mjs → cart-BuEp_cj4.mjs} +3 -3
  91. package/dist/client/{cart.client-D_gPw45z.mjs → cart.client-CAO39uDG.mjs} +1 -1
  92. package/dist/client/{checkout-NVfZW0kR.mjs → checkout-BoxzT64s.mjs} +3 -3
  93. package/dist/client/{checkout.client-DD3JuqOy.mjs → checkout.client-IGUy7XOx.mjs} +1 -1
  94. package/dist/client/{checkoutUrls-z2gXvlGw.mjs → checkoutUrls-D0UsiFmm.mjs} +1 -1
  95. package/dist/client/client.mjs +466 -94
  96. package/dist/client/{constants-CoOkvw__.mjs → constants-C_8AxMdm.mjs} +1 -1
  97. package/dist/client/{context-CRhn9qzS.mjs → context-D1L0pe__.mjs} +23 -5
  98. package/dist/client/{dateFormatting-BnWB4L1s.mjs → dateFormatting-HvfmS_cH.mjs} +1 -1
  99. package/dist/client/{demoPortalMagicLink-CWDGSTBu.mjs → demoPortalMagicLink-BunFTnIq.mjs} +1 -1
  100. package/dist/client/{enhanceHeaderSection-tdP_-Z9o.mjs → enhanceHeaderSection-CtLAG651.mjs} +4 -4
  101. package/dist/client/{event-registration.client-D7YYKySQ.mjs → event-registration.client-DiSxkBUP.mjs} +15 -15
  102. package/dist/client/{eventCalendar-CsAfu5d0.mjs → eventCalendar-DUnhwZ1o.mjs} +4 -4
  103. package/dist/client/{eventCombined-VXJB5CoS.mjs → eventCombined-BvBQo0nF.mjs} +4 -4
  104. package/dist/client/{eventListing-B3KIZNfY.mjs → eventListing-aTLifOX7.mjs} +4 -4
  105. package/dist/client/{eventRegistration-BP-dEk1c.mjs → eventRegistration-DFd7pr09.mjs} +4 -4
  106. package/dist/client/{form-DM8Zbxbv.mjs → form-Dikmc2AO.mjs} +3 -3
  107. package/dist/client/{form.client-e2z_Tlgk.mjs → form.client-zHaQK5I9.mjs} +5 -5
  108. package/dist/client/{form.parts-Ctljy1a3.mjs → form.parts-BLl9n8TH.mjs} +3 -3
  109. package/dist/client/gifting/client.mjs +16 -9
  110. package/dist/client/{gifting-DWIsqQru.mjs → gifting-CufPM38H.mjs} +4 -4
  111. package/dist/client/{gifting.client-QsSWF0uA.mjs → gifting.client--N1GaSY8.mjs} +155 -84
  112. package/dist/client/gifting.interactive-D9MK4HkV.mjs +157 -0
  113. package/dist/client/gifting.parts-CRtiRzo-.mjs +119 -0
  114. package/dist/client/{headerSection-DAkRkwb-.mjs → headerSection-BIaBpmk3.mjs} +2 -2
  115. package/dist/client/{noop-Dl4mZ-rr.mjs → islands-DJDLGQEm.mjs} +16008 -8676
  116. package/dist/client/{newsletter-form.client-WYja9-WN.mjs → newsletter-form.client-wg_JHTxm.mjs} +6 -6
  117. package/dist/client/{newsletter-form.interactive-RuM86VAv.mjs → newsletter-form.interactive-hzpkW9NQ.mjs} +384 -326
  118. package/dist/client/{newsletter-form.parts-2petDnWv.mjs → newsletter-form.parts-CgzpSv9p.mjs} +2 -2
  119. package/dist/client/{newsletterForm-BUbXdA_e.mjs → newsletterForm-CvxLiEBT.mjs} +3 -3
  120. package/dist/client/portal/client.mjs +291 -101
  121. package/dist/client/{portalOrders-COGn4BKG.mjs → portalOrders-tCxS04g0.mjs} +3 -2
  122. package/dist/client/{portalRoutes-D72yvtDh.mjs → portalRoutes-DTHlWg_F.mjs} +33 -7
  123. package/dist/client/{product-detail.client-pOAryevt.mjs → product-detail.client-22Q7zgjN.mjs} +1 -1
  124. package/dist/client/{product-list.client-CcUpUiud.mjs → product-list.client-DFWYvK8z.mjs} +1 -1
  125. package/dist/client/{productDetail-BZJCfqat.mjs → productDetail-DhZAwo60.mjs} +3 -3
  126. package/dist/client/{productList-CiRs3mNb.mjs → productList-BiVpbZK2.mjs} +3 -3
  127. package/dist/client/{propsDecoder--uHW4tFM.mjs → propsDecoder-DFYqKnLy.mjs} +4 -2
  128. package/dist/client/{registry.server-CDNNd8wC.mjs → registry.server-C3OBRg7x.mjs} +2305 -873
  129. package/dist/client/rendering/client.mjs +29 -26
  130. package/dist/client/rendering/islands.mjs +1 -1
  131. package/dist/client/rendering.mjs +5 -5
  132. package/dist/client/{richText-coerce-CQGE_wHV.mjs → richText-coerce-ms477Z08.mjs} +2 -2
  133. package/dist/client/{routeIslandApiConfig-BtCg87-N.mjs → routeIslandApiConfig-B6nQeqvH.mjs} +1 -1
  134. package/dist/client/{runtimeResponse-Ds9cmBUf.mjs → runtimeResponse-BYqsV1Kb.mjs} +1 -1
  135. package/dist/client/runtimeResponse-CUX_lldL.mjs +3 -0
  136. package/dist/client/{shop-commerce-D8evQnMT.mjs → shop-commerce-DVsIcPaI.mjs} +16 -15
  137. package/dist/client/{shop-commerce-store-C9PcsSTj.mjs → shop-commerce-store-7mO6KY7_.mjs} +1 -1
  138. package/dist/client/{shop-discount-apply.state-D5CtGfJI.mjs → shop-discount-apply.state-L1Vge8tG.mjs} +2 -2
  139. package/dist/client/{shop-Rx_gEMK8.mjs → shop-xt4dQ3HH.mjs} +3 -3
  140. package/dist/client/{shop.client-D4lzQ9oY.mjs → shop.client-DNJfD3VQ.mjs} +28 -17
  141. package/dist/client/{shopShared-BVbq7Nm-.mjs → shopShared-DS8t6749.mjs} +2 -2
  142. package/dist/client/spam-protection.mjs +1 -1
  143. package/dist/client/{src-ZSqRK3dD.mjs → src-Do_s2lqH.mjs} +16 -19
  144. package/dist/client/{timetableModel-BQJrSK0K.mjs → timetableModel-Dy3nNfTG.mjs} +13 -17
  145. package/dist/client/{useAvailableSlots-Dm3lKJKR.mjs → useAvailableSlots-DcjtDpUu.mjs} +2 -2
  146. package/dist/client/{useDiscountCodeUi-klgfGn7f.mjs → useDiscountCodeUi-DvdFFWOT.mjs} +1 -1
  147. package/dist/client/{useEventPagination-Jnjt7_ly.mjs → useEventPagination-Cq-7sU5_.mjs} +8 -8
  148. package/dist/client/{view-CC_yQLSA.mjs → view-4gnPcpWJ.mjs} +24 -9
  149. package/dist/client/{wizardSteps-BliJOzEX.mjs → wizardSteps-DDvL3iza.mjs} +375 -186
  150. package/dist/preview-next/client/{EventEmbeddedCheckoutStep-aRJjq4x8.mjs → EventEmbeddedCheckoutStep-CLqSRUpt.mjs} +1 -1
  151. package/dist/preview-next/client/{LocationPickerEnvironment-BW3dRFIv.mjs → LocationPickerEnvironment-CIdAg-Tm.mjs} +1 -1
  152. package/dist/preview-next/client/{MapLibreEditMap-Db9BHyXh.mjs → MapLibreEditMap-Bm85jX35.mjs} +2 -2
  153. package/dist/preview-next/client/{PageSectionToolbar-BhL0uADo.mjs → PageSectionToolbar-D8srnz9R.mjs} +445 -18
  154. package/dist/preview-next/client/{PreviewEditorSidebar-Ct8eIm0i.mjs → PreviewEditorSidebar-DVpk5cqp.mjs} +3871 -1947
  155. package/dist/preview-next/client/{PreviewEditorUI-BS32G4V9.mjs → PreviewEditorUI-XoTtHSFH.mjs} +11 -36
  156. package/dist/preview-next/client/{PreviewShell-RL0WfZXD.mjs → PreviewShell-VQHsRg2u.mjs} +40 -35
  157. package/dist/preview-next/client/{SdkPreviewModeRuntime-MK_gHeGy.mjs → SdkPreviewModeRuntime-CLdF9f6o.mjs} +51 -20
  158. package/dist/preview-next/client/{ThemedButton-CVYz7h68.mjs → ThemedButton-ORNN4x-3.mjs} +782 -16
  159. package/dist/preview-next/client/{lucide-react-00FF_oar.mjs → lucide-react-eAi3tDAr.mjs} +11 -1
  160. package/dist/preview-next/client/{previewAssistantSlot-CQyS8pcq.mjs → previewAssistantSlot-CqH91EwA.mjs} +20687 -8562
  161. package/dist/preview-next/client/{previewChromeRoot-BSxp3Mfu.mjs → previewChromeRoot-B3ySEu6p.mjs} +3 -90
  162. package/dist/preview-next/client/runtime.mjs +3 -3
  163. package/dist/preview-next/client/{sdk-runtime-DKnTzy74.mjs → sdk-runtime-CdpSupcr.mjs} +2 -2
  164. package/dist/preview-next/client/{siteStyleAccess-BlmbvbLN.mjs → siteStyleAccess-C6eOP6QW.mjs} +35 -6
  165. package/dist/preview-next/client/{useAutosaveStatus-D-7GwZOQ.mjs → useAutosaveStatus-BhPg4e-r.mjs} +49 -3
  166. package/dist/preview-next/client/{useOpenBlockForSetup-BNZtGM5g.mjs → useOpenBlockForSetup-BaWUF9D7.mjs} +2007 -448
  167. package/dist/preview-next/container-responsive.css +320 -0
  168. package/dist/preview-next/editor-chrome.css +23 -2
  169. package/dist/preview-next/keepAlive.mjs +1 -1
  170. package/dist/preview-next/middleware.mjs +1 -1
  171. package/dist/preview-next/{route-contract-R3PcMmax.mjs → route-contract-Ch0X99vE.mjs} +183 -18
  172. package/dist/server/{Block.shared-CniF9tSu.mjs → Block.shared-B2FmczLO.mjs} +5 -5
  173. package/dist/server/{ThemeScopeCore-BQWsnGT6.mjs → ThemeScopeCore-DtAyv9qA.mjs} +51 -29
  174. package/dist/server/{accessibleSurfaces-WPzUAHp4.mjs → accessibleSurfaces-BtPqb76u.mjs} +509 -389
  175. package/dist/server/{accordions-By_0Ykks.mjs → accordions-vzdZ2Wt1.mjs} +1 -1
  176. package/dist/server/{bindings-DxojjtK3.mjs → bindings-B_9JuU66.mjs} +7 -7
  177. package/dist/server/{client-CDndhbYO.mjs → client-DC7cjiSw.mjs} +489 -93
  178. package/dist/server/config-validation.mjs +1 -1
  179. package/dist/server/config.mjs +2 -2
  180. package/dist/server/{constants-VyF5nEhL.mjs → constants-d6nPNJpe.mjs} +33 -6
  181. package/dist/server/{customCss-C9kgPHvr.mjs → customCss-rtIfEYwQ.mjs} +1 -18
  182. package/dist/server/data/resolveBlockData.mjs +1 -1
  183. package/dist/server/{resolveButtonColourStates-B0O1IM16.mjs → expandPalette-DxPrNOAB.mjs} +950 -316
  184. package/dist/server/index.mjs +3 -3
  185. package/dist/server/{loadContent-BKstMBmX.mjs → loadContent-hb27HYic.mjs} +11 -10
  186. package/dist/server/{loadPage-IgNnZaqr.mjs → loadPage-JToD8wDD.mjs} +3 -3
  187. package/dist/server/{lookMediaFrame-TFjgNG61.mjs → lookMediaFrame-CTsycLLK.mjs} +94 -39
  188. package/dist/server/manifest.mjs +2 -2
  189. package/dist/server/{navigation-quBYlSKD.mjs → navigation-B2WhGofA.mjs} +1 -1
  190. package/dist/server/navigation.mjs +1 -1
  191. package/dist/server/next.mjs +8 -8
  192. package/dist/server/{overrideResolution-CCaAPpIa.mjs → overrideResolution-vD5KTClL.mjs} +1 -1
  193. package/dist/server/page-converter.mjs +3 -3
  194. package/dist/server/{pageRenderPlan-B7iULvKe.mjs → pageRenderPlan-CdqJ1NQZ.mjs} +242 -336
  195. package/dist/server/{pageRuntimeSupport-BytMroxn.mjs → pageRuntimeSupport-CAhr4oOf.mjs} +3 -3
  196. package/dist/server/{pageShared-Dcs_XTIO.mjs → pageShared-m80Xu2pd.mjs} +1292 -877
  197. package/dist/server/{parseThemeForPersistence-Bihl4W5K.mjs → parseThemeForPersistence-CRwOZfpa.mjs} +3 -3
  198. package/dist/server/{portal-CMW_b9mG.mjs → portal-B2wCQno_.mjs} +1 -1
  199. package/dist/server/portal.mjs +2 -2
  200. package/dist/server/{prebuild-agaH-vZV.mjs → prebuild-BWIkFaXq.mjs} +1 -1
  201. package/dist/server/prebuild.mjs +1 -1
  202. package/dist/server/{prefetchBlockData-DwpRjqw4.mjs → prefetchBlockData-D1PHU-K9.mjs} +3 -3
  203. package/dist/server/{registry-DM9dHfDC.mjs → registry-KtsOsAzY.mjs} +21703 -10936
  204. package/dist/server/rendering/components/pageShared.mjs +1 -1
  205. package/dist/server/rendering/helpers/loadPage.mjs +1 -1
  206. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
  207. package/dist/server/rendering/server.mjs +4 -4
  208. package/dist/server/rendering.mjs +9 -9
  209. package/dist/server/{resolveBlockData-CinHGf8l.mjs → resolveBlockData-sjIDJYl7.mjs} +1 -1
  210. package/dist/server/{schema-CwfxQjc4.mjs → schema-BBEqquBM.mjs} +44 -28
  211. package/dist/server/server.mjs +3 -3
  212. package/dist/server/{servicePageContent-BBBhOtdE.mjs → servicePageContent-ChEZDRwU.mjs} +38 -15
  213. package/dist/server/theme-bridge.mjs +34 -9
  214. package/dist/server/theme.mjs +2 -2
  215. package/dist/server/{three-pass-converter-DPaUPTfl.mjs → three-pass-converter-DKCIBeb1.mjs} +2 -2
  216. package/dist/server/{titleSourceSchema-NhK6azFS.mjs → titleSourceSchema-DybHErxH.mjs} +4 -4
  217. package/dist/server/{typeGuards-CTW_9AXq.mjs → typeGuards-DZOaGTEv.mjs} +126 -126
  218. package/dist/server/{types-BKaBZFjD.mjs → types-vyz09w64.mjs} +479 -8
  219. package/dist/server/{validation-DG5jX3jH.mjs → validation-Cvi-1TZZ.mjs} +13 -9
  220. package/dist/server/{version-CipbxPHL.mjs → version-B-icAIV1.mjs} +1 -1
  221. package/dist/server/{video-Cdr3wh-q.mjs → video-DBaeSawZ.mjs} +1 -1
  222. package/dist/styles/index.css +2568 -154
  223. package/package.json +1 -1
  224. package/dist/client/gifting.parts-CedLgwa_.mjs +0 -86
  225. package/dist/client/runtimeResponse-DL_ARBpa.mjs +0 -3
  226. package/dist/client/types-BEaKfam_.mjs +0 -778
@@ -1,19 +1,19 @@
1
- import { D as surfaceInkStyle, E as surfaceInkDeclarations, F as textColorValue, J as parseColorTokenParts, L as callsCssLoadingFunction, M as mergeStyles, N as rgbColorValue, P as textColorStyle, R as staysInsideDeclaration, S as surfaceForegroundInputFromResolved, Y as parseThemeColorToken, a as createStandardButtonSurfacePolicy, i as buttonSizeNameSchema, j as cssVarValue, k as backgroundColorStyle, s as unsafeAsOpaqueButtonColourToken, t as DEFAULT_VARIANT_ALIAS_ID, w as surfaceForegroundValue, x as surfaceForegroundDeclarations, y as SURFACE_INK_CSS_VARS } from "./types-BKaBZFjD.mjs";
2
- import { C as contrastRatio, a as formatButtonColourContractError, c as DEFAULT_BUTTON_SIZES, d as generateShadowValue$1, g as expandPalette, i as BUTTON_CONTRAST_POLICY, j as hexToRgb, n as compileButtonColourStates, r as resolveSolidButtonColour, s as BORDER_WIDTH_MAP, u as FONT_SIZE_MAP } from "./resolveButtonColourStates-B0O1IM16.mjs";
3
- import { $ as formatEventDuration, A as OfferingCourseCards, B as EventItem, C as resolvePageRouteTarget, D as EVENT_REGISTRATION_ANCHOR_ID, E as EventHeader, F as createEditorPresentationPageReader, G as eventDisplayTitleText, H as CalendarIcon, I as createPresentationPageReader, J as buildMonthDay, K as formatCourseDatesAfter, L as EmptyState, M as offeringDatesBySeries, N as deriveEventScheduleSummary, O as MonthLookView, P as derivePreviewRunSchedule, Q as formatEventTeacherLine, R as CardListCollection, S as resolveEntryRouteTarget, T as lookPartShown, U as MapPinIcon, V as eventCategoryBadge, W as eventDisplayTitle, X as formatEventQuickDate, Y as resolveMonthSelectedDay, Z as selectQuickDateEvents, _ as publicAppointmentLocationSchema, a as joinSlotKey, ct as buildThemeTokens, d as resolveLinkedEntryInlineFieldEligibility, et as resolveEventCardBooking, g as formatAppointmentPrice, h as formatAppointmentLocation, i as composePageJoins, j as eventCardListContent, k as EventListingFrameView, l as buildLinkedContentEditTarget, lt as defaultThemeTokens, m as formatAppointmentDuration, n as createPageRenderPlanReader, nt as resolveEventLinkProps, o as renderedJoinLayout, p as defaultTransforms, q as formatCourseSessions, rt as parseStoredVariant, s as retargetJoinsAcrossOmissions, tt as resolveEventCta, v as publicAppointmentPricingSchema, w as resolveRouteTarget, z as CardListItems } from "./pageRenderPlan-B7iULvKe.mjs";
4
- import { $i as PUBLIC_DOWNLOAD_MEDIA_TYPES, $n as composeHeaderSectionWrapperClassName, $r as singleButtonFragment, $s as resolveBookingBusinessTimeZone, $t as eventOnlinePlace, A as membershipClassesLabel, Ai as el, An as isOrdinaryPublicEvent, Ar as Grid, As as resolveWholeSeriesBookingPhase, At as offeringRunLifecycle, B as eventListingBlockDefinition, Bi as FileArchiveIcon, Bn as isBookableEvent, Br as formatEventDepositNote, Bt as ThemedButtonLink, C as buildCartInteractiveIslandProps, Ca as authoredHeaderLinkForeground, Cn as groupEventsByDate, Cr as defineProgressiveBlockRuntime, Cs as pageTemplateFromEntry, D as buildShopInteractiveIslandProps, Da as headerNeedsPhotoShade, Dn as hasCancelledRegistrationDate, Dr as lookListPresentationSchemaShape, Ds as CANCELLED_SESSION_STATUS, Dt as buildOfferingsPreviewListing, E as buildProductListInteractiveIslandProps, En as cancelledDateCopy, Eo as boundaryRuntimeMetricsForDecorativeTransition, Er as listLookSlot, Et as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, F as offeringsCatalogueShape, Fi as ArrowDownIcon, Fn as planWholeSeriesRunSelection, Fs as parseMailingListPlacementTargeting, Ft as resolveOfferingsRenderInput, G as eventCollectionDisplaySchemaShape, Gi as PlusIcon, Gn as getEventAvailabilityStatus, Gs as addLocalScheduleDays, Gt as eventListWeekDays, H as buildEventCollectionDisplay, Hi as FileSpreadsheetIcon, Hn as formatEventRemainingPlaces, Hr as formatEventPriceAmount, Ht as getIconComponent, I as eventCalendarBlockDefinition, Ii as ChevronDownIcon, Is as sameMailingListPlacementTargeting, It as normalizeEventRegistrationPageSurfaceSubject, J as catalogueEventCardProps, Ji as parseInlineTextFromUnknown, Jn as FEATURE_CARD_ICON_TREATMENTS, Jr as headingFragment, Js as getBookingLocalDateKey, K as eventCollectionHydrationSchema, Ki as inlineTextToPlainText, Kn as isEventFull, Kt as eventWeekGroupingContext, L as buildEventCalendarInteractiveIslandProps, Li as CircleMinusIcon, Ln as resolveSelectionBookingClosedDetail, Lt as resolveEventRegistrationScopedEvents, M as offeringsPreviewBlockDefinition, Mi as buildGeneratedBlockIconRenderAssetLookupFromUnknown, Mn as planOrdinarySeriesSelection, Ms as buildMailingListSignupBlockSourceRef, Mt as readOfferingsGrouping, N as publicRouteCandidatesSchema, Ni as parseBlockIconValue, Nn as planWholeSeriesParentBooking, No as anglePolygonCss, Ns as parseMailingListRuntimeContext, Nt as resolveOfferingsPreviewGroupCta, O as shopProductPresentation, Oa as headerRootIsTransparent, On as eventOccurrenceContext, Or as resolvedItemSurfaceProps, Ot as groupOfferingRunsByCourse, P as buildOfferingsCatalogueListing, Pi as resolveBlockIconRenderValue, Pn as planWholeSeriesParentSelection, Po as transitionCatalogueEntries, Pt as resolveOfferingsPreviewGroups, Q as cardListPresentationSchemaShape, Qi as parseFieldDefinitions, Qr as blogFeaturedPostFragment, Qs as toUtcIsoDateTimeString, Qt as browserReadAuthoritySchema, R as buildEventCalendarListingDisplay, Ri as CirclePlusIcon, Rn as selectionRepresentativeEvent, Rs as EVENT_ADDRESS_AFTER_BOOKING_LABEL, Rt as ThemedAuthoredButton, S as shopBlockDefinition, Si as defineFragment, Sn as formatTime, Sr as defineClientOwnedBlockRuntime, Ss as loadedReadinessFact, St as previewStageSchema, T as buildProductDetailInteractiveIslandProps, Ta as readOpeningToneProjection, Tn as bookingPageKindSchema, Tr as listLookControl, U as buildEventCollectionHydration, Ui as FileTextIcon, Un as formatTotalCapacity, Us as formatBookingCompactEnglishTime, Ut as SpinnerNode, V as buildEventListingInteractiveIslandProps, Va as resolveEffectiveArrangement, Vi as FileAudioIcon, Vr as formatEventPrice, Vt as ThemedDownloadLink, W as buildEventCollectionListingDisplay, Wi as MinusIcon, Ws as toScheduledBookingDateTime, Wt as buildEventListWeek, X as CardListContentPart, Xn as shouldReserveFeatureCardIconZone, Xr as faqAccordionFragment, Xs as parseBookingLocalDate, Y as listingEventCardProps, Yn as resolveFeatureCardGeneratedIconSizePx, Yr as cardFragment, Ys as getLocalScheduleDate, Yt as resolveRuntimeEventDestination, Zr as faqHeadingFragment, Zs as parseLocalScheduleTime, Zt as bookingPresentation, _ as buildGiftingInteractiveIslandProps, _a as AFFORDANCE_SUPPRESS_CLASS, _n as formatEventHourLabel, _r as buildFormInteractiveIslandProps, _t as getContainerClass, a as LOCATION_MAP_LOADER_KEYS, ac as publicEventPricingDisplay, ai as heroCtaRowFragment, an as closedDatesCopy, ar as teamMemberCardBiography, as as getDayOfWeek, b as productDetailBlockDefinition, bn as formatEventTimeRange, br as defineInteractiveIslandMetaKeys, bs as admitReadinessFacts, bt as resolveEventRegistrationEventSource, c as normalizeLocationMapSource, ci as heroCopyFragment, cn as buildCalendarViewport, co as generateDefaultCardSystem, cs as getWeekCalendarDays, d as newsletterSignupBlockDefinition, di as normalizeBoxStylesBorder, do as generateNavLinkCSS, ec as toBookingTimeZone, ei as formEmbedFragment, en as eventPlaceName, er as markEditableSurfaceForwarding, fi as resolveCardRoleForBoxStyles, fn as formatCalendarTitle, fo as generateEffectsCSS, fr as staticHeaderChromeRuntime, fs as publicEventsArraySchema, ft as buildResolveImageUrlContext, g as giftingBlockDefinition, ga as themeButtonSelector, gn as formatEventDateParts, gr as formBlockDefinition, gs as beforeBookingQuestionsPresentationSchema, gt as getCardOrientation, h as newsletterBlockSubmissionMessage, ha as parseThemeButtonVariantId, hn as formatEventCompactDateRail, ho as generateInteractiveChildInheritanceCSS, hs as bookingConsentCarrierSchema, ht as EventQuickFacts, ic as publicEventPricingCurrency, ii as ctaCopyFragment, in as pageNavigationSchema, ir as teamMemberBiography, is as formatDateKey, it as MediaPlaceholder, j as passCardListContent, ja as arrangementLookHooks, ji as when, jn as planDropInPanel, jr as clsx, js as resolveWholeSeriesPaymentDates, jt as offeringsListingFor, k as membershipCardListContent, ka as headerRootPaint, ki as runTransforms, kn as getPublicEventCanonicalPath, kr as itemRole, ks as orderedLiveRunSessions, kt as normalizeOfferingsPreviewItemLimit, l as parseLocationMapLoaderResult, lc as formatCurrencyAmount, lo as generateFooterCss, ls as isSameCalendarDay, lt as resolvePublicMediaUrl, m as buildNewsletterFormInteractiveIslandProps, mc as TokenResolver, mn as formatEventClockLabel, mo as resolveEffectPaint, ms as blockBookingConsentSchema, mt as setContextResolveImageUrlContext, nc as formatBookingPriceDisplay, ni as testimonialsCarouselFragment, nn as formatEventLocation, ns as getLocalMinuteOfDay, nt as RichText, o as describeUnresolvedLocationMapLocation, oa as eventReadinessResultSchema, oc as publicEventPricingType, oi as ctaRowFragment, on as closedRunCopy, or as readRuntimeNow, os as getOrderedDayNames, p as NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, pn as formatDate, po as resolveEffectApplications, ps as blockBookingPaymentTermsSchema, pt as getCurrentResolveImageUrlContext, q as eventCollectionSourceSchemaShape, qi as isInlineTextEmpty, qn as groupPublicEventsByRun, qr as richTextFragment, qs as formatLocalScheduleDate, r as normalizeBlockContent, ra as eventReadinessLoaderKey, rc as isPublicEventPricingOptionDisplayable, ri as testimonialsHeadingFragment, rn as blockSiteTermsSchema, rr as parseTeamMemberSpecialties, rs as addDays, rt as ImagePresets, s as normalizeLocationMapProps, sc as resolveExactOrFreePriceDisplay, si as isBlockButtonRole, sn as closedDateCopy, so as resolveCardRole, sr as resolveDateRuntimeContext, ss as getWeekCalendarDayTuple, t as getBlockDefinition, ta as chosenString, ti as formCopyFragment, tn as eventVenuePlace, to as requireCuratedSiteStyle, tr as splitPositioningClasses, ts as getLocalDateKey, tt as MediaNodeServer, u as resolveLocationMapLocation, ui as boxStyleClassNames, un as eventDateOptions, uo as buildTextContrastShadow, us as isToday, v as checkoutBlockDefinition, va as resolveHeaderRootForeground, vi as resolveBackgroundColorValue, vn as formatEventNextDateFact, vr as buildInteractiveIslandProps, vt as eventRegistrationBlockDefinition, w as buildCheckoutInteractiveIslandProps, wa as effectiveHeaderNavLinkStyle, wn as resolveEventTimeZone, wr as listItemPresentation, ws as unavailableReadinessFact, x as productListBlockDefinition, xa as selectItemSurfacePresentation, xi as bodyCopyFragment, xr as createZodCodec, xs as hiddenFromVisitors, xt as bookingNowSchema, y as cartBlockDefinition, yi as ctaButton, yr as createInteractiveIslandCodec, yt as buildEventRegistrationInteractiveIslandProps, za as arrangementManifestFromVariants, zi as ClockIcon, zr as formatCoursePrice, zs as formatDate$1, zt as ThemedButton } from "./registry-DM9dHfDC.mjs";
5
- import { C as materializeRuntimeButtonAppearance, F as resolveSurfaceForeground, H as certifyPaint, K as resolveConcreteColorHex, L as surfaceInkPublication, N as freezeOwnedThemeValue, O as mapButtonVisualAppearances, P as ownedThemeSnapshot, S as buttonTypographyDeclarations, U as contrastThresholdByPolicy, V as HOVER_TEXT_THRESHOLD, W as inkReference, b as buttonShadow, f as compositeHex, g as actionVariableFallback, n as parseSurfaceTree, o as resolveSurface, q as resolveOpaqueSurfaceHex, s as serializeSurfaceTree, v as buttonBorder, w as paddingDeclarations, x as buttonStateAppearanceDeclarations, y as buttonRadius } from "./accessibleSurfaces-WPzUAHp4.mjs";
6
- import { b as siteChromeBackgroundOverrideOwner, m as surfaceCardRoleValues, s as boxBackgroundSchema } from "./schema-CwfxQjc4.mjs";
1
+ import { $ as parseThemeColorToken, A as surfaceInkDeclarations, C as SURFACE_INK_CSS_VARS, E as surfaceForegroundInputFromResolved, F as cssVarValue, H as staysInsideDeclaration, I as mergeStyles, L as rgbColorValue, N as backgroundColorStyle, O as surfaceForegroundValue, Q as parseColorTokenParts, R as textColorStyle, T as surfaceForegroundDeclarations, V as callsCssLoadingFunction, a as createStandardButtonSurfacePolicy, i as buttonSizeNameSchema, j as surfaceInkStyle, s as unsafeAsOpaqueButtonColourToken, t as DEFAULT_VARIANT_ALIAS_ID, z as textColorValue } from "./types-vyz09w64.mjs";
2
+ import { L as contrastRatio, M as resolveOpaqueSurfaceHex, U as hexToRgb, a as compositeHex, d as resolveSolidButtonColour, f as BUTTON_CONTRAST_POLICY, g as DEFAULT_BUTTON_SIZES, h as BORDER_WIDTH_MAP, j as resolveConcreteColorHex, p as formatButtonColourContractError, r as expandPalette, u as compileButtonColourStates, v as FONT_SIZE_MAP, y as generateShadowValue$1 } from "./expandPalette-DxPrNOAB.mjs";
3
+ import { $ as parseStoredVariant, A as eventCardListContent, B as eventCategoryBadge, C as resolvePageRouteTarget, D as MonthLookView, E as EVENT_REGISTRATION_ANCHOR_ID, F as createPresentationPageReader, G as formatCourseDatesAfter, H as MapPinIcon, I as EmptyState, J as resolveMonthSelectedDay, K as formatCourseSessions, L as CardListCollection, M as deriveEventScheduleSummary, N as derivePreviewRunSchedule, O as EventListingFrameView, P as createEditorPresentationPageReader, Q as formatEventDuration, R as CardListItems, S as resolveEntryRouteTarget, T as EventHeader, U as eventDisplayTitle, V as CalendarIcon, W as eventDisplayTitleText, X as selectQuickDateEvents, Y as formatEventQuickDate, Z as formatEventTeacherLine, _ as publicAppointmentLocationSchema, a as joinSlotKey, at as defaultThemeTokens, d as resolveLinkedEntryInlineFieldEligibility, g as formatAppointmentPrice, h as formatAppointmentLocation, i as composePageJoins, it as buildThemeTokens, j as offeringDatesBySeries, k as OfferingCourseCards, l as buildLinkedContentEditTarget, m as formatAppointmentDuration, n as createPageRenderPlanReader, o as renderedJoinLayout, p as defaultTransforms, q as buildMonthDay, s as retargetJoinsAcrossOmissions, v as publicAppointmentPricingSchema, w as resolveRouteTarget, z as EventItem } from "./pageRenderPlan-CdqJ1NQZ.mjs";
4
+ import { $ as cardListPresentationSchemaShape, $i as when, $n as resolveSelectionBookingClosedDetail, $t as bookingPresentation, A as membershipCardListContent, An as getLocalDateKey, Ao as generateNavLinkCSS, At as buildOfferingsPreviewListing, Ba as selectItemSurfacePresentation, Bi as ctaButton, Bn as bookingPageKindSchema, Br as createInteractiveIslandCodec, Bt as resolveEventRegistrationScopedEvents, C as shopBlockDefinition, Ca as chosenString, Cc as publicEventPricingCurrency, Ci as testimonialsCarouselFragment, Cn as formatEventNextDateFact, Ct as resolveEventRegistrationEventSource, D as buildProductListInteractiveIslandProps, Di as ctaRowFragment, Dn as formatTime, Do as generateDefaultCardSystem, Dr as readRuntimeNow, Ds as pageTemplateFromEntry, E as buildProductDetailInteractiveIslandProps, Ec as resolveExactOrFreePriceDisplay, Ei as heroCtaRowFragment, Eo as resolveCardRole, Er as teamMemberCardBiography, Es as loadedReadinessFact, F as buildOfferingsCatalogueListing, Fa as themeButtonSelector, Fn as getOrderedDayNames, Ft as readOfferingsGrouping, G as buildEventCollectionListingDisplay, Gn as isDropInPublicEvent, Gr as listItemPresentation, Gt as getIconComponent, H as buildEventListingInteractiveIslandProps, Ha as authoredHeaderLinkForeground, Hn as hasCancelledRegistrationDate, Hr as createZodCodec, Ht as ThemedButton, I as offeringsCatalogueShape, Ia as AFFORDANCE_SUPPRESS_CLASS, In as getWeekCalendarDayTuple, It as resolveOfferingsPreviewGroupCta, J as eventCollectionSourceSchemaShape, Ja as headerNeedsPhotoShade, Jn as planOrdinarySeriesSelection, Jr as lookListPresentationSchemaShape, Js as orderedLiveRunSessions, Jt as eventListWeekDays, K as eventCollectionDisplaySchemaShape, Kn as isOrdinaryPublicEvent, Kr as listLookControl, Ks as CANCELLED_SESSION_STATUS, Kt as SpinnerNode, L as eventCalendarBlockDefinition, La as resolveHeaderRootForeground, Ln as getWeekCalendarDays, Lr as formBlockDefinition, Lt as resolveOfferingsPreviewGroups, M as passCardListContent, Mc as TokenResolver, Mi as normalizeBoxStylesBorder, Mn as addDays, Mo as resolveEffectApplications, Mt as normalizeOfferingsPreviewItemLimit, N as offeringsPreviewBlockDefinition, Ni as resolveCardRoleForBoxStyles, Nn as formatDateKey, No as resolveEffectPaint, Nr as staticHeaderChromeRuntime, Nt as offeringRunLifecycle, O as buildShopInteractiveIslandProps, Oa as eventReadinessResultSchema, Oc as formatCurrencyAmount, Oi as isBlockButtonRole, On as groupEventsByDate, Oo as generateFooterCss, Or as resolveDateRuntimeContext, Os as unavailableReadinessFact, P as publicRouteCandidatesSchema, Pa as parseThemeButtonVariantId, Pn as getDayOfWeek, Po as generateInteractiveChildInheritanceCSS, Pt as offeringsListingFor, Qa as arrangementLookHooks, Qi as el, Qr as clsx, Qs as parseMailingListRuntimeContext, R as buildEventCalendarInteractiveIslandProps, Rn as isSameCalendarDay, Rr as buildFormInteractiveIslandProps, Rt as resolveOfferingsRenderInput, S as productListBlockDefinition, Sc as isPublicEventPricingOptionDisplayable, Si as formCopyFragment, Sn as formatEventHourLabel, So as requireCuratedSiteStyle, Sr as splitPositioningClasses, St as buildEventRegistrationInteractiveIslandProps, T as buildCheckoutInteractiveIslandProps, Ta as eventReadinessLoaderKey, Tc as publicEventPricingType, Ti as ctaCopyFragment, Tn as formatEventTimeRange, Tr as teamMemberBiography, Ts as hiddenFromVisitors, Tt as previewStageSchema, U as buildEventCollectionDisplay, Ua as effectiveHeaderNavLinkStyle, Ui as bodyCopyFragment, Un as eventOccurrenceContext, Ur as defineClientOwnedBlockRuntime, Us as mapReadinessFact, Ut as ThemedButtonLink, V as eventListingBlockDefinition, Vi as layoutSectionGround, Vn as cancelledDateCopy, Vo as pageGround, Vr as defineInteractiveIslandMetaKeys, Vt as ThemedAuthoredButton, W as buildEventCollectionHydration, Wa as readOpeningToneProjection, Wi as defineFragment, Wn as getPublicEventCanonicalPath, Wr as defineProgressiveBlockRuntime, Wt as ThemedDownloadLink, X as listingEventCardProps, Xa as headerRootPaint, Xn as planWholeSeriesParentSelection, Xr as itemRole, Xs as resolveWholeSeriesPaymentDates, Y as catalogueEventCardProps, Ya as headerRootIsTransparent, Yn as planWholeSeriesParentBooking, Yr as resolvedItemSurfaceProps, Ys as resolveWholeSeriesBookingPhase, Yt as eventWeekGroupingContext, Z as CardListContentPart, Zi as runTransforms, Zn as planWholeSeriesRunSelection, Zr as Grid, Zs as buildMailingListSignupBlockSourceRef, _ as giftingBlockDefinition, _c as toUtcIsoDateTimeString, _i as faqAccordionFragment, _n as formatCalendarTitle, _r as shouldReserveFeatureCardIconZone, _s as blockBookingPaymentTermsSchema, _t as getCardOrientation, aa as CircleMinusIcon, an as blockSiteTermsSchema, ar as resolveEventPageLink, at as MediaPlaceholder, b as cartBlockDefinition, ba as parseFieldDefinitions, bi as singleButtonFragment, bn as formatEventCompactDateRail, br as composeHeaderSectionWrapperClassName, bs as beforeBookingQuestionsPresentationSchema, bt as lookPartShown, c as normalizeLocationMapProps, ca as FileArchiveIcon, cc as formatBookingCompactEnglishTime, ci as formatEventPrice, cn as closedDatesCopy, co as resolveEffectiveArrangement, cr as isInBookingCutOffWindow, d as resolveLocationMapLocation, da as FileTextIcon, dn as closedDateCopy, ea as buildGeneratedBlockIconRenderAssetLookupFromUnknown, ec as parseMailingListPlacementTargeting, en as browserReadAuthoritySchema, er as selectionRepresentativeEvent, es as anglePolygonCss, f as newsletterSignupBlockDefinition, fa as MinusIcon, fc as formatLocalScheduleDate, fn as cutOffDateCopy, fr as getEventAvailabilityStatus, g as newsletterBlockSubmissionMessage, ga as parseInlineTextFromUnknown, gc as parseLocalScheduleTime, gi as cardFragment, gr as resolveFeatureCardGeneratedIconSizePx, gs as publicEventsArraySchema, gt as EventQuickFacts, h as buildNewsletterFormInteractiveIslandProps, ha as isInlineTextEmpty, hc as parseBookingLocalDate, hi as headingFragment, hn as eventDateOptions, hr as FEATURE_CARD_ICON_TREATMENTS, ht as setContextResolveImageUrlContext, i as normalizeBlockContent, ia as ChevronDownIcon, ic as formatDate$1, in as formatEventLocation, ir as resolveEventCta, it as ImagePresets, j as membershipClassesLabel, ji as boxStyleClassNames, jn as getLocalMinuteOfDay, jo as generateEffectsCSS, jt as groupOfferingRunsByCourse, k as shopProductPresentation, ki as heroCopyFragment, kn as resolveEventTimeZone, ko as buildTextContrastShadow, kt as OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS, l as normalizeLocationMapSource, la as FileAudioIcon, lc as toScheduledBookingDateTime, li as formatEventPriceAmount, ln as closedRunCopy, lr as formatEventRemainingPlaces, m as NEWSLETTER_SIGNUPS_PAUSED_MESSAGE, ma as inlineTextToPlainText, mc as getLocalScheduleDate, mi as richTextFragment, mr as groupPublicEventsByRun, mt as getCurrentResolveImageUrlContext, n as hasBlockDefinition, na as resolveBlockIconRenderValue, nn as eventPlaceName, nr as eventDestinationPagePath, nt as MediaNodeServer, o as LOCATION_MAP_LOADER_KEYS, oa as CirclePlusIcon, oi as formatCoursePrice, on as pageNavigationSchema, oo as arrangementManifestFromVariants, or as resolveRuntimeEventDestination, pa as PlusIcon, pc as getBookingLocalDateKey, pn as buildCalendarViewport, pr as isEventFull, pt as buildResolveImageUrlContext, q as eventCollectionHydrationSchema, qn as planDropInPanel, qo as boundaryRuntimeMetricsForDecorativeTransition, qr as listLookSlot, qt as buildEventListWeek, ra as ArrowDownIcon, rc as EVENT_ADDRESS_AFTER_BOOKING_LABEL, rn as eventVenuePlace, rr as resolveEventCardBooking, rt as RichText, s as describeUnresolvedLocationMapLocation, sa as ClockIcon, si as formatEventDepositNote, sn as closedDateListCopy, sr as isBookableEvent, t as getBlockDefinition, ta as parseBlockIconValue, tc as sameMailingListPlacementTargeting, tn as eventOnlinePlace, tr as eventDestinationBookingLink, ts as transitionCatalogueEntries, u as parseLocationMapLoaderResult, ua as FileSpreadsheetIcon, uc as addLocalScheduleDays, un as bookElsewhereDateCopy, ur as formatTotalCapacity, ut as resolvePublicMediaUrl, v as buildGiftingInteractiveIslandProps, vc as resolveBookingBusinessTimeZone, vi as faqHeadingFragment, vn as formatDate, vs as blockBookingConsentSchema, vt as getContainerClass, w as buildCartInteractiveIslandProps, wc as publicEventPricingDisplay, wi as testimonialsHeadingFragment, wr as parseTeamMemberSpecialties, ws as admitReadinessFacts, wt as bookingNowSchema, x as productDetailBlockDefinition, xa as PUBLIC_DOWNLOAD_MEDIA_TYPES, xc as formatBookingPriceDisplay, xi as formEmbedFragment, xn as formatEventDateParts, xr as markEditableSurfaceForwarding, xt as eventRegistrationBlockDefinition, y as checkoutBlockDefinition, yc as toBookingTimeZone, yi as blogFeaturedPostFragment, yn as formatEventClockLabel, ys as bookingConsentCarrierSchema, z as buildEventCalendarListingDisplay, zi as resolveBackgroundColorValue, zn as isToday, zr as buildInteractiveIslandProps, zt as normalizeEventRegistrationPageSurfaceSubject } from "./registry-KtsOsAzY.mjs";
5
+ import { A as actionVariableFallback, C as buttonShadowLayersValue, F as freezeOwnedThemeValue, G as inkReference, H as HOVER_TEXT_THRESHOLD, I as ownedThemeSnapshot, L as resolveSurfaceForeground, S as buttonPartsCss, T as affordanceIconMaskUrl, U as certifyPaint, W as contrastThresholdByPolicy, _ as buttonTypographyDeclarations, g as buttonStateShadow, h as buttonStateAppearanceDeclarations, k as mapButtonVisualAppearances, m as buttonRadius, n as parseSurfaceTree, o as resolveSurface, p as buttonBorder, s as serializeSurfaceTree, v as materializeRuntimeButtonAppearance, w as partOwnedPseudoElements, y as paddingDeclarations, z as surfaceInkPublication } from "./accessibleSurfaces-BtPqb76u.mjs";
6
+ import { h as surfaceCardRoleValues, l as fontWidthFits, s as boxBackgroundSchema, x as siteChromeBackgroundOverrideOwner } from "./schema-BBEqquBM.mjs";
7
7
  import { a as normalizeLocationAddressText, c as publicLocationSchema, d as mapDrawingSchema } from "./mapLocation-MDDSubTp.mjs";
8
8
  import { t as assertNever$3 } from "./assert-never-ku-PUn9U.mjs";
9
- import { A as MQ_MD_UP, M as MQ_SM_UP, N as MQ_TABLET_ONLY, O as MQ_LG_UP, c as readSdkPreviewPublishedPlacement, h as compileManifestContentContract, j as MQ_SM_DOWN, k as MQ_MD_DOWN, y as validateManifestDraft } from "./pageRuntimeSupport-BytMroxn.mjs";
10
- import { a as bindingSchema, l as RichTextDocSchema, m as sanitizeHref, n as isRecord$4, t as isObjectRecord } from "./typeGuards-CTW_9AXq.mjs";
9
+ import { A as MQ_MD_UP, M as MQ_SM_UP, N as MQ_TABLET_ONLY, O as MQ_LG_UP, c as readSdkPreviewPublishedPlacement, h as compileManifestContentContract, j as MQ_SM_DOWN, k as MQ_MD_DOWN, y as validateManifestDraft } from "./pageRuntimeSupport-CAhr4oOf.mjs";
10
+ import { f as bindingSchema, i as RichTextDocSchema, l as sanitizeHref, n as isRecord$4, t as isObjectRecord } from "./typeGuards-DZOaGTEv.mjs";
11
11
  import { l as renderableMediaAssetSchema, o as runtimeMediaSchema } from "./media-gvfIw3z8.mjs";
12
- import { M as opaqueSurfaceDeclarations, T as testimonialsCompositionTreatmentValues, j as opaqueSurfaceContextFromTheme, v as featureCardCompositionTreatmentValues, x as offeringsPreviewCompositionTreatmentValues, y as introCompositionTreatmentValues } from "./lookMediaFrame-TFjgNG61.mjs";
13
- import { l as mergeHeaderNavTypographyPreference, u as readHeaderNavFontSizePreference } from "./bindings-DxojjtK3.mjs";
14
- import { A as generateShadowCssVars, C as INPUT_ERROR_BORDER_COLOR_VAR, D as RESOLVED_BUTTON_DISABLED_DECLARATIONS, E as generateOpaquePanelCss, M as cardBorderDeclarations, N as cardDecorationPseudoRules, O as resolvedButtonColourDeclarations, S as INPUT_EDGE_COLOR_VAR, T as generateCheckableCss, _ as getResponsiveScopeSpec, a as escapeStyleContent, b as INPUT_GROUP_SELECTOR, c as parseBlockCustomCssRules, d as generateBlockCustomVarsCss, f as generateTypographyCss, g as THEME_RESPONSIVE_CONTAINER_NAME, h as DEFAULT_THEME_RESPONSIVE_MODE, i as compileCustomCssRules, j as renderCssDeclarations, k as resolvedButtonFocusDeclarations, l as parseCustomCssRules, m as generateStatusCss, n as THEME_RADIUS_CSS_VARS, o as prefixSelector, p as generateProgressCss, r as compileBlockCustomCssRules, s as toKebabCase, t as ThemeScopeCore, u as generateAllBlockVarsCss, v as INPUT_GROUP_ERROR_SELECTOR, w as inputEdgeColorValue, x as generateInputGroupCss, y as INPUT_GROUP_FOCUS_SELECTOR } from "./ThemeScopeCore-BQWsnGT6.mjs";
15
- import { c as ACCORDION_SPACING_MAP, d as ICON_CONFIG, f as ICON_SIZE_PX, i as getNodeProps, l as ACCORDION_TRIGGER_FONT_SCALE, n as getVideoEmbed, r as getVideoEmbedLoadingStrategy, s as ACCORDION_OPEN_ACCENT_THICKNESS, t as VIDEO_ASPECT_RATIO_PATTERN, u as ACCORDION_TRIGGER_LETTER_SPACING } from "./video-Cdr3wh-q.mjs";
16
- import { t as parseThemeForPersistence } from "./parseThemeForPersistence-Bihl4W5K.mjs";
12
+ import { M as opaqueSurfaceDeclarations, T as testimonialsCompositionTreatmentValues, j as opaqueSurfaceContextFromTheme, v as featureCardCompositionTreatmentValues, x as offeringsPreviewCompositionTreatmentValues, y as introCompositionTreatmentValues } from "./lookMediaFrame-CTsycLLK.mjs";
13
+ import { l as mergeHeaderNavTypographyPreference, u as readHeaderNavFontSizePreference } from "./bindings-B_9JuU66.mjs";
14
+ import { A as generateShadowCssVars, C as INPUT_ERROR_BORDER_COLOR_VAR, D as RESOLVED_BUTTON_DISABLED_DECLARATIONS, E as generateOpaquePanelCss, M as cardBorderDeclarations, N as cardDecorationPseudoRules, O as resolvedButtonColourDeclarations, S as INPUT_EDGE_COLOR_VAR, T as generateCheckableCss, _ as getResponsiveScopeSpec, a as escapeStyleContent, b as INPUT_GROUP_SELECTOR, c as parseBlockCustomCssRules, d as generateBlockCustomVarsCss, f as generateTypographyCss, g as THEME_RESPONSIVE_CONTAINER_NAME, h as DEFAULT_THEME_RESPONSIVE_MODE, i as compileCustomCssRules, j as renderCssDeclarations, k as resolvedButtonFocusDeclarations, l as parseCustomCssRules, m as generateStatusCss, n as THEME_RADIUS_CSS_VARS, o as prefixSelector, p as generateProgressCss, r as compileBlockCustomCssRules, s as toKebabCase, t as ThemeScopeCore, u as generateAllBlockVarsCss, v as INPUT_GROUP_ERROR_SELECTOR, w as inputEdgeColorValue, x as generateInputGroupCss, y as INPUT_GROUP_FOCUS_SELECTOR } from "./ThemeScopeCore-DtAyv9qA.mjs";
15
+ import { c as ACCORDION_SPACING_MAP, d as ICON_CONFIG, f as ICON_SIZE_PX, i as getNodeProps, l as ACCORDION_TRIGGER_FONT_SCALE, n as getVideoEmbed, r as getVideoEmbedLoadingStrategy, s as ACCORDION_OPEN_ACCENT_THICKNESS, t as VIDEO_ASPECT_RATIO_PATTERN, u as ACCORDION_TRIGGER_LETTER_SPACING } from "./video-DBaeSawZ.mjs";
16
+ import { t as parseThemeForPersistence } from "./parseThemeForPersistence-CRwOZfpa.mjs";
17
17
  import { n as mapOutlineBlocks } from "./pageRegions-BaeEF2MU.mjs";
18
18
  import { t as getAtPath } from "./src-DHK4JUlp.mjs";
19
19
  import * as React$1 from "react";
@@ -406,554 +406,238 @@ function flexibleBalanceDueDay(config, bookingStartAt, timeZone) {
406
406
  return formatLocalScheduleDate(rule.kind === "fixed_calendar_date" ? parseBookingLocalDate(rule.dueAt.slice(0, 10)) : addLocalScheduleDays(getLocalScheduleDate(new Date(bookingStartAt), timeZone), -rule.daysBeforeStart));
407
407
  }
408
408
  //#endregion
409
- //#region ../calendar/src/lane-packing.ts
409
+ //#region ../theme-core/src/styles/skinTokens.ts
410
+ function skinTokenCssVars(tokens) {
411
+ return Object.fromEntries(Object.entries(tokens ?? {}).map(([name, value]) => [`--rb-skin-${name}`, value]));
412
+ }
413
+ //#endregion
414
+ //#region ../theme-core/src/cards/constants.ts
410
415
  /**
411
- * Assign lanes to a list of intervals.
412
- *
413
- * Returns one result per input in the same order as the input. Internally
414
- * sorts a copy by `(start, end, orderKey)` to ensure determinism, then
415
- * permutes results back to input order.
416
+ * Corner style to border-radius value map for content-bearing card surfaces.
417
+ * Full pill radii are reserved for controls; cards need a capped radius so
418
+ * long titles, media, and expanded content do not clip into capsule shapes.
416
419
  */
417
- function assignLanes(intervals) {
418
- if (intervals.length === 0) return [];
419
- const indexed = intervals.map((interval, index) => ({
420
- interval,
421
- index
422
- }));
423
- indexed.sort((left, right) => left.interval.start - right.interval.start || left.interval.end - right.interval.end || left.interval.orderKey.localeCompare(right.interval.orderKey));
424
- const results = new Array(intervals.length);
425
- let cluster = [];
426
- let activeLaneEnds = [];
427
- let clusterMaxEnd = -Infinity;
428
- const closeCluster = () => {
429
- if (cluster.length === 0) return;
430
- const laneCount = Math.max(1, cluster.reduce((max, entry) => Math.max(max, entry.laneIndex + 1), 0));
431
- for (const entry of cluster) results[entry.index] = {
432
- laneIndex: entry.laneIndex,
433
- laneCount
434
- };
435
- cluster = [];
436
- activeLaneEnds = [];
437
- clusterMaxEnd = -Infinity;
420
+ const CORNER_RADIUS_MAP = {
421
+ square: "0px",
422
+ soft: "8px",
423
+ rounded: "16px",
424
+ pill: "24px"
425
+ };
426
+ /**
427
+ * Gradient direction to CSS direction map
428
+ */
429
+ const GRADIENT_DIRECTION_MAP = {
430
+ "to-r": "to right",
431
+ "to-l": "to left",
432
+ "to-t": "to top",
433
+ "to-b": "to bottom",
434
+ "to-tr": "to top right",
435
+ "to-tl": "to top left",
436
+ "to-br": "to bottom right",
437
+ "to-bl": "to bottom left"
438
+ };
439
+ /**
440
+ * Generate CSS box-shadow value from Shadow object
441
+ */
442
+ function generateShadowValue(shadow) {
443
+ if (shadow.elevation === "none") return "none";
444
+ const offset = {
445
+ low: 2,
446
+ medium: 4,
447
+ high: 6
448
+ }[shadow.elevation];
449
+ const xOffset = shadow.position === "bottom-right" ? offset : 0;
450
+ if (shadow.softness === "hard") return `${xOffset}px ${offset}px 0 0 rgba(0,0,0,1)`;
451
+ const soft = shadow.softness !== "crisp";
452
+ switch (shadow.elevation) {
453
+ case "low": return soft ? `${xOffset}px 1px 2px rgba(0,0,0,.06)` : `${xOffset}px 1px 1px rgba(0,0,0,.12)`;
454
+ case "medium": return soft ? `${xOffset}px 10px 20px rgba(0,0,0,.08)` : `${xOffset}px 6px 12px rgba(0,0,0,.16)`;
455
+ case "high": return soft ? `${xOffset}px 25px 50px rgba(0,0,0,.18)` : `${xOffset}px 20px 30px rgba(0,0,0,.28)`;
456
+ }
457
+ }
458
+ //#endregion
459
+ //#region ../theme-core/src/cards/generateCardCss.ts
460
+ const PER_CORNER_RADIUS_MAP = {
461
+ square: "0",
462
+ soft: "0.5rem",
463
+ rounded: "1rem",
464
+ pill: "1.5rem",
465
+ expressive: "calc(var(--rb-block-radius) * 3)"
466
+ };
467
+ function resolveCornerRadiiCss(cornerRadii, fallback) {
468
+ const fallbackValue = CORNER_RADIUS_MAP[fallback];
469
+ const at = (value) => value ? PER_CORNER_RADIUS_MAP[value] : fallbackValue;
470
+ return `${at(cornerRadii.topLeft)} ${at(cornerRadii.topRight)} ${at(cornerRadii.bottomRight)} ${at(cornerRadii.bottomLeft)}`;
471
+ }
472
+ function generateCardCss(options) {
473
+ const { themeId, cardSystem: providedCardSystem, solvedInks } = options;
474
+ const theme = {
475
+ ...options.theme,
476
+ buttons: ownedThemeSnapshot(options.theme.buttons)
438
477
  };
439
- for (const { interval, index } of indexed) {
440
- if (interval.start >= clusterMaxEnd) closeCluster();
441
- const laneIndex = firstAvailableLane(activeLaneEnds, interval.start);
442
- activeLaneEnds[laneIndex] = interval.end;
443
- clusterMaxEnd = Math.max(clusterMaxEnd, interval.end);
444
- cluster.push({
445
- index,
446
- laneIndex
447
- });
478
+ const tokens = new TokenResolver(theme);
479
+ const palette = freezeOwnedThemeValue(expandPalette(theme.palette));
480
+ const cardSystem = providedCardSystem ?? generateDefaultCardSystem(theme);
481
+ const source = providedCardSystem ? "site-style" : "generated-baseline";
482
+ const aliasGroups = resolveRoleAliasGroups(theme, providedCardSystem ?? null);
483
+ const cssChunks = [];
484
+ const emittedGroupKeys = /* @__PURE__ */ new Set();
485
+ for (const variant of cardSystem.variants) {
486
+ if (!variant.enabled) continue;
487
+ const groupKey = roleAliasGroupKey(source, variant.id);
488
+ emittedGroupKeys.add(groupKey);
489
+ const aliasClasses = aliasGroups.get(groupKey)?.classes ?? [];
490
+ cssChunks.push(generateVariantCSS(variant, themeId, [`card-${variant.id}`, ...aliasClasses], tokens, theme, palette, solvedInks));
448
491
  }
449
- closeCluster();
450
- return results;
492
+ for (const [groupKey, group] of aliasGroups) {
493
+ if (emittedGroupKeys.has(groupKey)) continue;
494
+ cssChunks.push(generateVariantCSS(group.variant, themeId, group.classes, tokens, theme, palette, solvedInks));
495
+ }
496
+ return cssChunks.filter(Boolean).join("\n\n");
451
497
  }
452
- function firstAvailableLane(activeLaneEnds, start) {
453
- const laneIndex = activeLaneEnds.findIndex((end) => end <= start);
454
- return laneIndex >= 0 ? laneIndex : activeLaneEnds.length;
498
+ function roleAliasGroupKey(source, variantId) {
499
+ return `${source}:${variantId}`;
455
500
  }
456
- //#endregion
457
- //#region ../calendar/src/timetable.ts
458
501
  /**
459
- * Timetable model — the package's core surface.
460
- *
461
- * Generic over `T`. Takes a list of timed items + a viewport; returns a
462
- * day-by-day layout with overlap-packed lanes and percent-based positions
463
- * plus a diagnostics list for items dropped during processing.
502
+ * Stable per-theme role aliases (`.card-role-default` and friends), resolved
503
+ * through the fallback chain so compiled content can address a role without
504
+ * knowing which variant id a site style used — or whether it defined one.
464
505
  *
465
- * The function is pure: given identical input (including `now`), it returns
466
- * the same output. The model has no opinion on what an item is — pass
467
- * accessors.
506
+ * Aliases are grouped by the variant they resolve to, so an alias shares one
507
+ * rule with that variant rather than duplicating its declarations.
468
508
  */
469
- const DEFAULT_BOUNDS = {
470
- minStartHour: 5,
471
- maxEndHour: 23,
472
- defaultStartHour: 6,
473
- defaultEndHour: 21,
474
- minHeightPercent: 2.5,
475
- marginMinutes: 0
476
- };
477
- function buildTimetableModel$1(input) {
478
- const bounds = resolveBounds(input.bounds);
479
- const viewportDays = getTimetableDays(input.viewDate, input.view ?? "week", input.startOfWeek);
480
- const viewportKeys = new Set(viewportDays.map(formatDateKey));
481
- const parsed = parseAllItems(input.items, input);
482
- const inViewport = deriveVisibleSegments(parsed.drafts, viewportKeys);
483
- const hourRange = input.hours === void 0 ? resolveHourRange(inViewport, bounds) : fixedHourRange(input.hours);
484
- const laid = layoutCellsByDate(inViewport, hourRange, bounds);
485
- return {
486
- days: assembleDays(viewportDays, laid.cellsByDate, input.today),
487
- hourTicks: buildHourTicks(hourRange.startHour, hourRange.endHour),
488
- startHour: hourRange.startHour,
489
- endHour: hourRange.endHour,
490
- rangeMinutes: (hourRange.endHour - hourRange.startHour) * 60,
491
- hasItems: inViewport.length > 0,
492
- diagnostics: [...parsed.diagnostics, ...laid.diagnostics]
493
- };
494
- }
495
- function parseAllItems(items, accessors) {
496
- const drafts = [];
497
- const diagnostics = [];
498
- for (const item of items) {
499
- const result = parseDraft(item, accessors);
500
- if (result.ok) drafts.push(result.draft);
501
- else diagnostics.push({
502
- item,
503
- reason: result.reason
509
+ function resolveRoleAliasGroups(theme, cardSystem) {
510
+ const groups = /* @__PURE__ */ new Map();
511
+ for (const role of surfaceCardRoleValues) {
512
+ const resolved = resolveCardRole(theme, cardSystem, role);
513
+ if (resolved.kind === "none") continue;
514
+ const groupKey = roleAliasGroupKey(resolved.source, resolved.variant.id);
515
+ const aliasClass = `card-role-${role}`;
516
+ const group = groups.get(groupKey);
517
+ if (group) group.classes.push(aliasClass);
518
+ else groups.set(groupKey, {
519
+ variant: resolved.variant,
520
+ classes: [aliasClass]
504
521
  });
505
522
  }
506
- return {
507
- drafts,
508
- diagnostics
509
- };
510
- }
511
- function layoutCellsByDate(segments, hourRange, bounds) {
512
- const rangeMinutes = (hourRange.endHour - hourRange.startHour) * 60;
513
- const rangeStartMinutes = hourRange.startHour * 60;
514
- const rangeEndMinutes = hourRange.endHour * 60;
515
- const segmentsByDate = groupSegmentsByDate(segments);
516
- const cellsByDate = /* @__PURE__ */ new Map();
517
- const diagnostics = [];
518
- for (const [dateKey, daySegments] of segmentsByDate) {
519
- const clipped = [];
520
- for (const segment of daySegments) {
521
- const result = clipDraft(segment, rangeStartMinutes, rangeEndMinutes);
522
- if (result.ok) clipped.push(result.clipped);
523
- else diagnostics.push({
524
- item: segment.draft.item,
525
- reason: result.reason
526
- });
527
- }
528
- const laneResults = assignLanes(clipped.map((entry) => ({
529
- start: entry.visibleStart,
530
- end: entry.visibleEnd,
531
- orderKey: entry.segment.draft.orderKey
532
- })));
533
- cellsByDate.set(dateKey, clipped.map((entry, idx) => buildCell(entry, laneResults[idx] ?? {
534
- laneIndex: 0,
535
- laneCount: 1
536
- }, rangeStartMinutes, rangeMinutes, bounds.minHeightPercent)));
537
- }
538
- return {
539
- cellsByDate,
540
- diagnostics
541
- };
542
- }
543
- function assembleDays(viewportDays, cellsByDate, today) {
544
- return viewportDays.map((date) => {
545
- const dateKey = formatDateKey(date);
546
- return {
547
- date,
548
- dateKey,
549
- isToday: isSameCalendarDay(date, today),
550
- cells: cellsByDate.get(dateKey) ?? []
551
- };
552
- });
523
+ return groups;
553
524
  }
554
- function parseDraft(item, accessors) {
555
- const startsAtIso = accessors.getStartsAt(item);
556
- const endsAtIso = accessors.getEndsAt(item);
557
- const timeZone = accessors.getTimeZone(item);
558
- const startsAtMinutes = getLocalMinuteOfDay(startsAtIso, timeZone);
559
- if (Number.isNaN(startsAtMinutes)) return {
560
- ok: false,
561
- reason: "invalid-start"
562
- };
563
- const startDateKey = getLocalDateKey(startsAtIso, timeZone);
564
- if (startDateKey == null) return {
565
- ok: false,
566
- reason: "invalid-timezone"
567
- };
568
- const endDateKey = getLocalDateKey(endsAtIso, timeZone);
569
- if (endDateKey == null) return {
570
- ok: false,
571
- reason: "invalid-end"
572
- };
573
- const endsAtMinutesRaw = getLocalMinuteOfDay(endsAtIso, timeZone);
574
- if (Number.isNaN(endsAtMinutesRaw)) return {
575
- ok: false,
576
- reason: "invalid-end"
577
- };
578
- const spansMultipleDays = startDateKey < endDateKey;
579
- const endsAtMinutes = spansMultipleDays || endsAtMinutesRaw > startsAtMinutes ? endsAtMinutesRaw : Math.min(1440, startsAtMinutes + 60);
580
- if (!spansMultipleDays && endsAtMinutes <= startsAtMinutes) return {
581
- ok: false,
582
- reason: "non-positive-duration"
583
- };
584
- return {
585
- ok: true,
586
- draft: {
587
- item,
588
- startDateKey,
589
- endDateKey,
590
- startsAtMinutes,
591
- endsAtMinutes,
592
- color: accessors.getColor?.(item) ?? null,
593
- orderKey: accessors.getOrderKey?.(item) ?? accessors.getId(item)
594
- }
595
- };
596
- }
597
- function deriveVisibleSegments(drafts, viewportKeys) {
598
- const segments = [];
599
- for (const draft of drafts) for (const dateKey of enumerateDateKeys(draft.startDateKey, draft.endDateKey)) {
600
- if (!viewportKeys.has(dateKey)) continue;
601
- const isStartDay = dateKey === draft.startDateKey;
602
- const isEndDay = dateKey === draft.endDateKey;
603
- const startsAtMinutes = isStartDay ? draft.startsAtMinutes : 0;
604
- const endsAtMinutes = isEndDay ? draft.endsAtMinutes : 1440;
605
- if (endsAtMinutes <= startsAtMinutes) continue;
606
- segments.push({
607
- draft,
608
- dateKey,
609
- startsAtMinutes,
610
- endsAtMinutes,
611
- continuesBefore: !isStartDay,
612
- continuesAfter: !isEndDay
613
- });
525
+ /**
526
+ * Padding map for card content based on spacing semantic values
527
+ */
528
+ const CONTENT_PADDING_MAP = {
529
+ none: "0",
530
+ compact: "0.75rem",
531
+ cozy: "1rem",
532
+ medium: "1.25rem",
533
+ comfortable: "1.5rem",
534
+ spacious: "2rem"
535
+ };
536
+ /**
537
+ * Corner radius map for card media (top corners only). Match card surface
538
+ * radii rather than button pills so media does not become capsule-clipped.
539
+ */
540
+ const MEDIA_CORNER_MAP = {
541
+ square: "0",
542
+ soft: "0.5rem",
543
+ rounded: "1rem",
544
+ pill: "1.5rem"
545
+ };
546
+ /**
547
+ * Generate CSS for a single card variant
548
+ *
549
+ * Generates complete CSS for card containers and their children:
550
+ * - Container: background, shadow, corners, border
551
+ * - .card-media: top corners matching container
552
+ * - .card-content: padding based on spacing
553
+ *
554
+ * This CSS-first approach eliminates runtime transforms for styling,
555
+ * keeping transforms only for data normalization and dynamic layout.
556
+ */
557
+ function generateVariantCSS(variant, themeId, cardClasses, tokens, theme, palette, solvedInks) {
558
+ const selectorsFor = (suffix) => cardClasses.map((cardClass) => `:where([data-theme-scope="${themeId}"]) .${cardClass}.${cardClass}${suffix}`).join(",\n");
559
+ const containerSelectors = cardClasses.map((cardClass) => `:where([data-theme-scope="${themeId}"]) .${cardClass}.${cardClass}`);
560
+ const containerSelector = containerSelectors.join(",\n");
561
+ const mediaSelector = selectorsFor(" .card-media");
562
+ const contentSelector = selectorsFor(" .card-content");
563
+ const fallbackBackgroundSelector = selectorsFor(" > .rb-bg-surface");
564
+ const rules = [];
565
+ rules.push(...cardSurfaceRules(variant, tokens, theme, palette, solvedInks));
566
+ const resolveColor = (token) => tokens.getColor(token);
567
+ rules.push(...cardBorderDeclarations(variant.border ? borderDeclaration(variant.border, tokens) : null, variant.decorations, resolveColor));
568
+ const corners = variant.corners ?? theme.corners;
569
+ const radius = variant.cornerRadii ? resolveCornerRadiiCss(variant.cornerRadii, corners) : CORNER_RADIUS_MAP[corners];
570
+ rules.push(`border-radius: ${radius}`);
571
+ const shadow = variant.shadow ?? theme.shadow;
572
+ if (shadow.elevation !== "none") {
573
+ const shadowValue = generateShadowValue(shadow);
574
+ rules.push(`box-shadow: ${shadowValue}`);
614
575
  }
615
- return segments;
616
- }
617
- function clipDraft(segment, rangeStartMinutes, rangeEndMinutes) {
618
- const visibleStart = Math.max(rangeStartMinutes, segment.startsAtMinutes);
619
- const visibleEnd = Math.min(rangeEndMinutes, segment.endsAtMinutes);
620
- if (visibleEnd <= visibleStart) return {
621
- ok: false,
622
- reason: "out-of-visible-hours"
623
- };
624
- return {
625
- ok: true,
626
- clipped: {
627
- segment,
628
- visibleStart,
629
- visibleEnd
630
- }
631
- };
632
- }
633
- function buildCell(entry, lane, rangeStartMinutes, rangeMinutes, minHeightPercent) {
634
- const heightPercent = Math.max(minHeightPercent, toRangePercent(entry.visibleEnd - entry.visibleStart, rangeMinutes));
635
- const rawTopPercent = toRangePercent(entry.visibleStart - rangeStartMinutes, rangeMinutes);
636
- const topPercent = Math.min(rawTopPercent, 100 - heightPercent);
637
- return {
638
- item: entry.segment.draft.item,
639
- dateKey: entry.segment.dateKey,
640
- startsAtMinutes: entry.segment.startsAtMinutes,
641
- endsAtMinutes: entry.segment.endsAtMinutes,
642
- visibleStartsAtMinutes: entry.visibleStart,
643
- visibleEndsAtMinutes: entry.visibleEnd,
644
- topPercent,
645
- heightPercent,
646
- isClippedStart: entry.segment.continuesBefore || entry.segment.startsAtMinutes < entry.visibleStart,
647
- isClippedEnd: entry.segment.continuesAfter || entry.segment.endsAtMinutes > entry.visibleEnd,
648
- laneIndex: lane.laneIndex,
649
- laneCount: lane.laneCount,
650
- color: entry.segment.draft.color
651
- };
652
- }
653
- function resolveBounds(bounds) {
654
- return {
655
- ...DEFAULT_BOUNDS,
656
- ...bounds
657
- };
658
- }
659
- function resolveHourRange(segments, bounds) {
660
- if (segments.length === 0) return {
661
- startHour: bounds.defaultStartHour,
662
- endHour: bounds.defaultEndHour
663
- };
664
- const earliestStart = Math.min(...segments.map((segment) => segment.startsAtMinutes));
665
- const latestEnd = Math.max(...segments.map((segment) => segment.endsAtMinutes));
666
- const startHour = Math.max(bounds.minStartHour, Math.floor((earliestStart - bounds.marginMinutes) / 60));
667
- const endHour = Math.min(bounds.maxEndHour, Math.ceil((latestEnd + bounds.marginMinutes) / 60));
668
- return {
669
- startHour,
670
- endHour: Math.max(startHour + 1, endHour)
671
- };
672
- }
673
- function fixedHourRange(hours) {
674
- const startHour = Math.min(23, Math.max(0, Math.floor(hours.startHour)));
675
- return {
676
- startHour,
677
- endHour: Math.min(24, Math.max(startHour + 1, Math.ceil(hours.endHour)))
678
- };
576
+ const structureSelector = cardClasses.map((cardClass) => `:where([data-theme-scope="${themeId}"]) :where(.${cardClass})`).join(",\n");
577
+ const mediaRadius = MEDIA_CORNER_MAP[corners];
578
+ const mediaRules = [`border-top-left-radius: ${mediaRadius}`, `border-top-right-radius: ${mediaRadius}`];
579
+ const contentRules = [`padding: ${resolveContentPadding(variant)}`];
580
+ return [
581
+ `${structureSelector} {\n display: flex;\n flex-direction: column;\n position: relative;\n overflow: visible;\n}`,
582
+ `${containerSelector} {\n ${renderCssDeclarations(rules)}\n}`,
583
+ ...cardDecorationPseudoRules(containerSelectors, variant.decorations, resolveColor),
584
+ `${fallbackBackgroundSelector} {\n background: transparent;\n}`,
585
+ `${mediaSelector} {\n ${mediaRules.join(";\n ")};\n}`,
586
+ `${contentSelector} {\n ${contentRules.join(";\n ")};\n}`
587
+ ].join("\n\n");
679
588
  }
680
- function buildHourTicks(startHour, endHour) {
681
- const ticks = [];
682
- for (let hour = startHour; hour <= endHour; hour += 1) ticks.push(hour);
683
- return ticks;
589
+ function cardSurfaceRules(variant, tokens, theme, palette, solvedInks) {
590
+ if (variant.background.type === "transparent") return ["background: transparent"];
591
+ const surface = resolveSurface({
592
+ kind: "paint",
593
+ paint: cardSurfacePaint(variant)
594
+ }, {
595
+ palette,
596
+ buttonSystem: theme.buttons,
597
+ linkHoverToken: theme.typography.proseLinkStyle?.hoverColorToken,
598
+ solvedInks
599
+ });
600
+ return [cardBackgroundRule(variant.background, tokens), ...opaqueSurfaceDeclarations(surface)];
684
601
  }
685
- function groupSegmentsByDate(segments) {
686
- const grouped = /* @__PURE__ */ new Map();
687
- for (const segment of segments) {
688
- const existing = grouped.get(segment.dateKey) ?? [];
689
- existing.push(segment);
690
- grouped.set(segment.dateKey, existing);
602
+ function cardSurfacePaint(variant) {
603
+ switch (variant.background.type) {
604
+ case "transparent": return { kind: "transparent" };
605
+ case "solid": return {
606
+ kind: "solid",
607
+ token: variant.background.colorToken,
608
+ foregroundToken: variant.foregroundToken
609
+ };
610
+ case "gradient": return {
611
+ kind: "gradient",
612
+ foregroundToken: variant.foregroundToken
613
+ };
691
614
  }
692
- return grouped;
693
- }
694
- function toRangePercent(minutes, rangeMinutes) {
695
- if (rangeMinutes <= 0) return 0;
696
- return minutes / rangeMinutes * 100;
697
615
  }
698
- function getTimetableDays(viewDate, view, startOfWeek) {
699
- if (view === "day") return [viewDate];
700
- return getWeekCalendarDays(viewDate, startOfWeek);
616
+ function cardBackgroundRule(background, tokens) {
617
+ if (background.type === "solid") return `background: ${tokens.getColor(background.colorToken)}`;
618
+ const from = tokens.getColor(background.fromToken);
619
+ const to = tokens.getColor(background.toToken);
620
+ return `background: linear-gradient(${GRADIENT_DIRECTION_MAP[background.direction] || "to right"}, ${from}, ${to})`;
701
621
  }
702
- function enumerateDateKeys(startDateKey, endDateKey) {
703
- if (startDateKey > endDateKey) throw new Error(`Invalid timetable date range: ${startDateKey} is after ${endDateKey}`);
704
- const start = parseDateKey(startDateKey);
705
- parseDateKey(endDateKey);
706
- const keys = [];
707
- let cursor = start;
708
- while (formatDateKey(cursor) <= endDateKey) {
709
- keys.push(formatDateKey(cursor));
710
- cursor = addDays(cursor, 1);
711
- }
712
- return keys;
622
+ function borderDeclaration(border, tokens) {
623
+ const borderColor = tokens.getColor(border.colorToken);
624
+ return `border: ${border.widthClass === "border-4" ? "4px" : border.widthClass === "border-2" ? "2px" : border.widthClass === "border" ? "1px" : "1px"} solid ${borderColor}`;
713
625
  }
714
- function parseDateKey(dateKey) {
715
- const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(dateKey);
716
- if (match === null) throw new Error(`Invalid timetable date key: ${dateKey}`);
717
- const [, year, month, day] = match;
718
- return {
719
- year: Number(year),
720
- month: Number(month),
721
- day: Number(day)
722
- };
626
+ function paddingFor(spacing) {
627
+ return CONTENT_PADDING_MAP[spacing] || CONTENT_PADDING_MAP.comfortable;
723
628
  }
724
- //#endregion
725
- //#region ../theme-core/src/styles/skinTokens.ts
726
- function skinTokenCssVars(tokens) {
727
- return Object.fromEntries(Object.entries(tokens ?? {}).map(([name, value]) => [`--rb-skin-${name}`, value]));
629
+ /** A card's padding: one value for both axes, or one per axis. */
630
+ function resolveContentPadding(variant) {
631
+ const spacing = variant.spacing;
632
+ return typeof spacing === "string" ? paddingFor(spacing) : `${paddingFor(spacing.block)} ${paddingFor(spacing.inline)}`;
728
633
  }
729
634
  //#endregion
730
- //#region ../theme-core/src/cards/constants.ts
635
+ //#region ../theme-core/src/accordions/defaults.ts
731
636
  /**
732
- * Corner style to border-radius value map for content-bearing card surfaces.
733
- * Full pill radii are reserved for controls; cards need a capped radius so
734
- * long titles, media, and expanded content do not clip into capsule shapes.
735
- */
736
- const CORNER_RADIUS_MAP = {
737
- square: "0px",
738
- soft: "8px",
739
- rounded: "16px",
740
- pill: "24px"
741
- };
742
- /**
743
- * Gradient direction to CSS direction map
744
- */
745
- const GRADIENT_DIRECTION_MAP = {
746
- "to-r": "to right",
747
- "to-l": "to left",
748
- "to-t": "to top",
749
- "to-b": "to bottom",
750
- "to-tr": "to top right",
751
- "to-tl": "to top left",
752
- "to-br": "to bottom right",
753
- "to-bl": "to bottom left"
754
- };
755
- /**
756
- * Generate CSS box-shadow value from Shadow object
757
- */
758
- function generateShadowValue(shadow) {
759
- if (shadow.elevation === "none") return "none";
760
- const offset = {
761
- low: 2,
762
- medium: 4,
763
- high: 6
764
- }[shadow.elevation];
765
- const xOffset = shadow.position === "bottom-right" ? offset : 0;
766
- if (shadow.softness === "hard") return `${xOffset}px ${offset}px 0 0 rgba(0,0,0,1)`;
767
- const soft = shadow.softness !== "crisp";
768
- switch (shadow.elevation) {
769
- case "low": return soft ? `${xOffset}px 1px 2px rgba(0,0,0,.06)` : `${xOffset}px 1px 1px rgba(0,0,0,.12)`;
770
- case "medium": return soft ? `${xOffset}px 10px 20px rgba(0,0,0,.08)` : `${xOffset}px 6px 12px rgba(0,0,0,.16)`;
771
- case "high": return soft ? `${xOffset}px 25px 50px rgba(0,0,0,.18)` : `${xOffset}px 20px 30px rgba(0,0,0,.28)`;
772
- }
773
- }
774
- //#endregion
775
- //#region ../theme-core/src/cards/generateCardCss.ts
776
- const PER_CORNER_RADIUS_MAP = {
777
- square: "0",
778
- soft: "0.5rem",
779
- rounded: "1rem",
780
- pill: "1.5rem",
781
- expressive: "calc(var(--rb-block-radius) * 3)"
782
- };
783
- function resolveCornerRadiiCss(cornerRadii, fallback) {
784
- const fallbackValue = CORNER_RADIUS_MAP[fallback];
785
- const at = (value) => value ? PER_CORNER_RADIUS_MAP[value] : fallbackValue;
786
- return `${at(cornerRadii.topLeft)} ${at(cornerRadii.topRight)} ${at(cornerRadii.bottomRight)} ${at(cornerRadii.bottomLeft)}`;
787
- }
788
- function generateCardCss(options) {
789
- const { themeId, cardSystem: providedCardSystem, solvedInks } = options;
790
- const theme = {
791
- ...options.theme,
792
- buttons: ownedThemeSnapshot(options.theme.buttons)
793
- };
794
- const tokens = new TokenResolver(theme);
795
- const palette = freezeOwnedThemeValue(expandPalette(theme.palette));
796
- const cardSystem = providedCardSystem ?? generateDefaultCardSystem(theme);
797
- const source = providedCardSystem ? "site-style" : "generated-baseline";
798
- const aliasGroups = resolveRoleAliasGroups(theme, providedCardSystem ?? null);
799
- const cssChunks = [];
800
- const emittedGroupKeys = /* @__PURE__ */ new Set();
801
- for (const variant of cardSystem.variants) {
802
- if (!variant.enabled) continue;
803
- const groupKey = roleAliasGroupKey(source, variant.id);
804
- emittedGroupKeys.add(groupKey);
805
- const aliasClasses = aliasGroups.get(groupKey)?.classes ?? [];
806
- cssChunks.push(generateVariantCSS(variant, themeId, [`card-${variant.id}`, ...aliasClasses], tokens, theme, palette, solvedInks));
807
- }
808
- for (const [groupKey, group] of aliasGroups) {
809
- if (emittedGroupKeys.has(groupKey)) continue;
810
- cssChunks.push(generateVariantCSS(group.variant, themeId, group.classes, tokens, theme, palette, solvedInks));
811
- }
812
- return cssChunks.filter(Boolean).join("\n\n");
813
- }
814
- function roleAliasGroupKey(source, variantId) {
815
- return `${source}:${variantId}`;
816
- }
817
- /**
818
- * Stable per-theme role aliases (`.card-role-default` and friends), resolved
819
- * through the fallback chain so compiled content can address a role without
820
- * knowing which variant id a site style used — or whether it defined one.
821
- *
822
- * Aliases are grouped by the variant they resolve to, so an alias shares one
823
- * rule with that variant rather than duplicating its declarations.
824
- */
825
- function resolveRoleAliasGroups(theme, cardSystem) {
826
- const groups = /* @__PURE__ */ new Map();
827
- for (const role of surfaceCardRoleValues) {
828
- const resolved = resolveCardRole(theme, cardSystem, role);
829
- if (resolved.kind === "none") continue;
830
- const groupKey = roleAliasGroupKey(resolved.source, resolved.variant.id);
831
- const aliasClass = `card-role-${role}`;
832
- const group = groups.get(groupKey);
833
- if (group) group.classes.push(aliasClass);
834
- else groups.set(groupKey, {
835
- variant: resolved.variant,
836
- classes: [aliasClass]
837
- });
838
- }
839
- return groups;
840
- }
841
- /**
842
- * Padding map for card content based on spacing semantic values
843
- */
844
- const CONTENT_PADDING_MAP = {
845
- none: "0",
846
- compact: "0.75rem",
847
- cozy: "1rem",
848
- medium: "1.25rem",
849
- comfortable: "1.5rem",
850
- spacious: "2rem"
851
- };
852
- /**
853
- * Corner radius map for card media (top corners only). Match card surface
854
- * radii rather than button pills so media does not become capsule-clipped.
855
- */
856
- const MEDIA_CORNER_MAP = {
857
- square: "0",
858
- soft: "0.5rem",
859
- rounded: "1rem",
860
- pill: "1.5rem"
861
- };
862
- /**
863
- * Generate CSS for a single card variant
864
- *
865
- * Generates complete CSS for card containers and their children:
866
- * - Container: background, shadow, corners, border
867
- * - .card-media: top corners matching container
868
- * - .card-content: padding based on spacing
869
- *
870
- * This CSS-first approach eliminates runtime transforms for styling,
871
- * keeping transforms only for data normalization and dynamic layout.
872
- */
873
- function generateVariantCSS(variant, themeId, cardClasses, tokens, theme, palette, solvedInks) {
874
- const selectorsFor = (suffix) => cardClasses.map((cardClass) => `:where([data-theme-scope="${themeId}"]) .${cardClass}.${cardClass}${suffix}`).join(",\n");
875
- const containerSelectors = cardClasses.map((cardClass) => `:where([data-theme-scope="${themeId}"]) .${cardClass}.${cardClass}`);
876
- const containerSelector = containerSelectors.join(",\n");
877
- const mediaSelector = selectorsFor(" .card-media");
878
- const contentSelector = selectorsFor(" .card-content");
879
- const fallbackBackgroundSelector = selectorsFor(" > .rb-bg-surface");
880
- const rules = [];
881
- rules.push(...cardSurfaceRules(variant, tokens, theme, palette, solvedInks));
882
- const resolveColor = (token) => tokens.getColor(token);
883
- rules.push(...cardBorderDeclarations(variant.border ? borderDeclaration(variant.border, tokens) : null, variant.decorations, resolveColor));
884
- const corners = variant.corners ?? theme.corners;
885
- const radius = variant.cornerRadii ? resolveCornerRadiiCss(variant.cornerRadii, corners) : CORNER_RADIUS_MAP[corners];
886
- rules.push(`border-radius: ${radius}`);
887
- const shadow = variant.shadow ?? theme.shadow;
888
- if (shadow.elevation !== "none") {
889
- const shadowValue = generateShadowValue(shadow);
890
- rules.push(`box-shadow: ${shadowValue}`);
891
- }
892
- const structureSelector = cardClasses.map((cardClass) => `:where([data-theme-scope="${themeId}"]) :where(.${cardClass})`).join(",\n");
893
- const mediaRadius = MEDIA_CORNER_MAP[corners];
894
- const mediaRules = [`border-top-left-radius: ${mediaRadius}`, `border-top-right-radius: ${mediaRadius}`];
895
- const contentRules = [`padding: ${resolveContentPadding(variant)}`];
896
- return [
897
- `${structureSelector} {\n display: flex;\n flex-direction: column;\n position: relative;\n overflow: visible;\n}`,
898
- `${containerSelector} {\n ${renderCssDeclarations(rules)}\n}`,
899
- ...cardDecorationPseudoRules(containerSelectors, variant.decorations, resolveColor),
900
- `${fallbackBackgroundSelector} {\n background: transparent;\n}`,
901
- `${mediaSelector} {\n ${mediaRules.join(";\n ")};\n}`,
902
- `${contentSelector} {\n ${contentRules.join(";\n ")};\n}`
903
- ].join("\n\n");
904
- }
905
- function cardSurfaceRules(variant, tokens, theme, palette, solvedInks) {
906
- if (variant.background.type === "transparent") return ["background: transparent"];
907
- const surface = resolveSurface({
908
- kind: "paint",
909
- paint: cardSurfacePaint(variant)
910
- }, {
911
- palette,
912
- buttonSystem: theme.buttons,
913
- linkHoverToken: theme.typography.proseLinkStyle?.hoverColorToken,
914
- solvedInks
915
- });
916
- return [cardBackgroundRule(variant.background, tokens), ...opaqueSurfaceDeclarations(surface)];
917
- }
918
- function cardSurfacePaint(variant) {
919
- switch (variant.background.type) {
920
- case "transparent": return { kind: "transparent" };
921
- case "solid": return {
922
- kind: "solid",
923
- token: variant.background.colorToken,
924
- foregroundToken: variant.foregroundToken
925
- };
926
- case "gradient": return {
927
- kind: "gradient",
928
- foregroundToken: variant.foregroundToken
929
- };
930
- }
931
- }
932
- function cardBackgroundRule(background, tokens) {
933
- if (background.type === "solid") return `background: ${tokens.getColor(background.colorToken)}`;
934
- const from = tokens.getColor(background.fromToken);
935
- const to = tokens.getColor(background.toToken);
936
- return `background: linear-gradient(${GRADIENT_DIRECTION_MAP[background.direction] || "to right"}, ${from}, ${to})`;
937
- }
938
- function borderDeclaration(border, tokens) {
939
- const borderColor = tokens.getColor(border.colorToken);
940
- return `border: ${border.widthClass === "border-4" ? "4px" : border.widthClass === "border-2" ? "2px" : border.widthClass === "border" ? "1px" : "1px"} solid ${borderColor}`;
941
- }
942
- function paddingFor(spacing) {
943
- return CONTENT_PADDING_MAP[spacing] || CONTENT_PADDING_MAP.comfortable;
944
- }
945
- /** A card's padding: one value for both axes, or one per axis. */
946
- function resolveContentPadding(variant) {
947
- const spacing = variant.spacing;
948
- return typeof spacing === "string" ? paddingFor(spacing) : `${paddingFor(spacing.block)} ${paddingFor(spacing.inline)}`;
949
- }
950
- //#endregion
951
- //#region ../theme-core/src/accordions/defaults.ts
952
- /**
953
- * Generate default accordion system based on theme configuration
954
- *
955
- * Creates a single accordion style that harmonizes with the theme's
956
- * visual language (spacing, borders, shadows, colors).
637
+ * Generate default accordion system based on theme configuration
638
+ *
639
+ * Creates a single accordion style that harmonizes with the theme's
640
+ * visual language (spacing, borders, shadows, colors).
957
641
  */
958
642
  function generateDefaultAccordionSystem(theme) {
959
643
  const overrides = theme.siteStyleId ? requireCuratedSiteStyle(theme.siteStyleId).themeOverrides?.accordions : void 0;
@@ -1423,46 +1107,6 @@ function generateDefaultButtonSystem(theme) {
1423
1107
  };
1424
1108
  }
1425
1109
  //#endregion
1426
- //#region ../theme-core/src/buttons/affordanceIcons.ts
1427
- /**
1428
- * Affordance icon path data for CSS-emitted button affordances.
1429
- *
1430
- * A button variant may declare a trailing `affordance` icon (see
1431
- * `ButtonVariantAffordance`). The generated button CSS renders that icon as a
1432
- * masked `::after` pseudo-element, so the theme supplies it to every
1433
- * button of the variant without per-node authoring.
1434
- *
1435
- * Icons live in the `@riverbankcms/blocks` registry, but the button CSS is
1436
- * generated here in theme-core, so this module carries a small, curated copy of
1437
- * the *affordance-eligible* icon path data (arrows/chevrons — the action-oriented
1438
- * subset). The `d` values below are duplicated verbatim from the matching entries
1439
- * in `blocks/src/system/icons/svg.tsx`; ids match the registry ids exactly so a
1440
- * node-level `trailingIcon` and a theme-owned `affordance` share one id space.
1441
- *
1442
- * Keep this set intentionally tiny. It is not the full CTA icon set — only the
1443
- * shapes that read as a trailing affordance.
1444
- */
1445
- /** Registry icon id → the SVG path `d` fragments composing that icon. */
1446
- const AFFORDANCE_ICON_PATHS = {
1447
- ArrowRight: ["M5 12h14", "m13 6 6 6-6 6"],
1448
- ArrowLeft: ["M19 12H5", "m11 6-6 6 6 6"],
1449
- ChevronRight: ["m9 18 6-6-6-6"],
1450
- ChevronLeft: ["m15 18-6-6 6-6"],
1451
- ChevronDown: ["m6 9 6 6 6-6"],
1452
- ArrowUpRight: ["M7 17 17 7", "M7 7h10v10"]
1453
- };
1454
- /**
1455
- * Build a `data:image/svg+xml,...` URL for an affordance icon, suitable for use
1456
- * as a CSS `mask-image`. The stroke is painted solid black so the mask's alpha
1457
- * traces the icon outline; the visible colour is supplied separately by the
1458
- * `::after` rule's `background-color`. Returns `null` for unknown ids.
1459
- */
1460
- function affordanceIconMaskUrl(iconId) {
1461
- const paths = AFFORDANCE_ICON_PATHS[iconId];
1462
- if (!paths || paths.length === 0) return null;
1463
- return `data:image/svg+xml,${`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'>${paths.map((d) => `<path d='${d}'/>`).join("")}</svg>`.replace(/"/g, "'").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ")}`;
1464
- }
1465
- //#endregion
1466
1110
  //#region ../theme-core/src/buttons/generateButtonCss.ts
1467
1111
  const BUTTON_SIZE_NAMES = buttonSizeNameSchema.options;
1468
1112
  function rule$1(selector, declarations) {
@@ -1610,20 +1254,27 @@ function variantChunks(variant, global, themeSizes, themeId, tokens, theme, colo
1610
1254
  const out = [];
1611
1255
  const variantId = parseButtonVariantIdForCss(variant.id);
1612
1256
  const selector = `:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}`;
1613
- out.push(variantBaseRule(variant, selector, tokens, colours.base));
1257
+ const paint = {
1258
+ role: variant.id,
1259
+ colours,
1260
+ keyframePrefix: `${themeId.replace(/[^a-zA-Z0-9_-]/g, "-")}-${variant.id}`
1261
+ };
1262
+ out.push(variantBaseRule(variant, selector, tokens, colours.base, paint));
1614
1263
  out.push({ raw: generateInteractiveChildInheritanceCSS(selector) });
1615
1264
  for (const state of [
1616
1265
  "hover",
1617
1266
  "focus",
1618
1267
  "active"
1619
- ]) out.push(variantStateColourRule(variant, variantId, themeId, state, colours[state], tokens));
1268
+ ]) out.push(variantStateColourRule(variant, variantId, themeId, state, colours[state], tokens, paint));
1620
1269
  const effects = variantEffectsCss(variant, nonColourEffects, themeId, tokens, theme);
1621
1270
  if (effects) out.push({ raw: effects });
1622
1271
  out.push(...variantStateTransformRules(variant, selector));
1623
- out.push(variantFocusVisibleRule(variantId, themeId, focusIndicator));
1272
+ const parts = buttonPartsCss(variant, selector, paint);
1273
+ if (parts) out.push({ raw: parts });
1274
+ out.push(variantFocusVisibleRule(variantId, themeId, focusIndicator, focusShadowLayers(variant, paint)));
1624
1275
  const affordance = variantAffordanceRule(variant, selector);
1625
1276
  if (affordance) out.push(affordance);
1626
- out.push(...variantDisabledRules(variant, variantId, themeId, colours.disabled, tokens));
1277
+ out.push(...variantDisabledRules(variant, variantId, themeId, colours.disabled, tokens, paint));
1627
1278
  out.push(...variantSizeRules(variant, variantId, themeSizes, themeId));
1628
1279
  out.push(...variantStateSizeRules(variant, variantId, themeId));
1629
1280
  return out;
@@ -1660,7 +1311,7 @@ function parseButtonVariantIdForCss(value) {
1660
1311
  if (!variantId) throw new Error("Button variant id must be a non-empty string");
1661
1312
  return variantId;
1662
1313
  }
1663
- function variantBaseRule(variant, selector, tokens, colour) {
1314
+ function variantBaseRule(variant, selector, tokens, colour, paint) {
1664
1315
  const appearance = variant.visualStates?.base;
1665
1316
  if (!appearance) throw new Error("Button appearance must be materialized before CSS emission");
1666
1317
  const border = buttonBorder(appearance.border, tokens);
@@ -1668,7 +1319,7 @@ function variantBaseRule(variant, selector, tokens, colour) {
1668
1319
  ...buttonTypographyDeclarations(appearance.typography),
1669
1320
  ...STRUCTURAL_DECLARATIONS,
1670
1321
  ["border-radius", buttonRadius(appearance.borderRadius)],
1671
- ["box-shadow", buttonShadow(appearance.shadow, tokens)],
1322
+ ["box-shadow", buttonStateShadow(appearance, tokens, paint) ?? "none"],
1672
1323
  ...resolvedButtonColourDeclarations(colour, {
1673
1324
  role: variant.id,
1674
1325
  state: "base"
@@ -1685,15 +1336,19 @@ function variantBaseRule(variant, selector, tokens, colour) {
1685
1336
  * token fallback keeps buttons usable in contexts that do not provide that
1686
1337
  * contract (and preserves the existing theme behaviour there).
1687
1338
  */
1688
- function variantStateColourRule(variant, variantId, themeId, state, colour, tokens) {
1339
+ function variantStateColourRule(variant, variantId, themeId, state, colour, tokens, paint) {
1689
1340
  const baseSelector = `:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}`;
1690
1341
  return rule$1(state === "hover" ? [`${baseSelector}:hover`, `${baseSelector}[data-force-hover="true"]`] : `${baseSelector}:${state}`, [...resolvedButtonColourDeclarations(colour, {
1691
1342
  role: variantId,
1692
1343
  state
1693
- }), ...variant.visualStates ? buttonStateAppearanceDeclarations(variant.visualStates.base, variant.visualStates[state], tokens) : []]);
1344
+ }), ...variant.visualStates ? buttonStateAppearanceDeclarations(variant.visualStates.base, variant.visualStates[state], tokens, paint) : []]);
1345
+ }
1346
+ function variantFocusVisibleRule(variantId, themeId, focusIndicator, layers) {
1347
+ return rule$1(`:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}:focus-visible`, resolvedButtonFocusDeclarations(focusIndicator, variantId).map(([property, value]) => property === "box-shadow" && layers !== null ? [property, `${layers}, ${value}`] : [property, value]));
1694
1348
  }
1695
- function variantFocusVisibleRule(variantId, themeId, focusIndicator) {
1696
- return rule$1(`:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}:focus-visible`, resolvedButtonFocusDeclarations(focusIndicator, variantId));
1349
+ function focusShadowLayers(variant, paint) {
1350
+ const layers = variant.visualStates?.focus.shadowLayers;
1351
+ return layers && layers.length > 0 ? buttonShadowLayersValue(layers, paint) : null;
1697
1352
  }
1698
1353
  function variantEffectsCss(variant, effects, themeId, tokens, theme) {
1699
1354
  if (!effects) return "";
@@ -1711,7 +1366,7 @@ function variantEffectsCss(variant, effects, themeId, tokens, theme) {
1711
1366
  theme
1712
1367
  });
1713
1368
  }
1714
- function variantDisabledRules(variant, variantId, themeId, colour, tokens) {
1369
+ function variantDisabledRules(variant, variantId, themeId, colour, tokens, paint) {
1715
1370
  const base = `:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}:disabled`;
1716
1371
  const disabledSelectors = [
1717
1372
  base,
@@ -1719,19 +1374,20 @@ function variantDisabledRules(variant, variantId, themeId, colour, tokens) {
1719
1374
  `${base}:active`,
1720
1375
  `${base}:focus`
1721
1376
  ];
1722
- const pseudoSelectors = [`${base}::before`, `${base}::after`];
1377
+ const owned = partOwnedPseudoElements(variant.visualStates);
1378
+ const [firstHidden, ...otherHidden] = ["before", "after"].filter((pseudo) => !owned.includes(pseudo)).map((pseudo) => `${base}::${pseudo}`);
1723
1379
  return [rule$1(disabledSelectors, [
1724
1380
  ...resolvedButtonColourDeclarations(colour, {
1725
1381
  role: variantId,
1726
1382
  state: "disabled"
1727
1383
  }),
1728
- ...variant.visualStates ? buttonStateAppearanceDeclarations(variant.visualStates.base, variant.visualStates.disabled, tokens, true) : [],
1384
+ ...variant.visualStates ? buttonStateAppearanceDeclarations(variant.visualStates.base, variant.visualStates.disabled, tokens, paint, true) : [],
1729
1385
  ...RESOLVED_BUTTON_DISABLED_DECLARATIONS
1730
- ]), rule$1(pseudoSelectors, [
1386
+ ]), ...firstHidden === void 0 ? [] : [rule$1([firstHidden, ...otherHidden], [
1731
1387
  ["opacity", "0"],
1732
1388
  ["animation", "none"],
1733
1389
  ["pointer-events", "none"]
1734
- ])];
1390
+ ])]];
1735
1391
  }
1736
1392
  /** Explicit rest transforms follow hover effects so :active can return to rest. */
1737
1393
  function variantStateTransformRules(variant, selector) {
@@ -2849,6 +2505,19 @@ function resolvedHeaderNavLinkStyle(header, contrastTreatment, navTextSize) {
2849
2505
  });
2850
2506
  }
2851
2507
  //#endregion
2508
+ //#region ../theme-core/src/typography/fontWeight.ts
2509
+ const fontWeights = {
2510
+ light: 300,
2511
+ regular: 400,
2512
+ medium: 500,
2513
+ semibold: 600,
2514
+ bold: 700
2515
+ };
2516
+ /** The CSS weight of a typography weight. Every role that names one (headings, body, eyebrow, the logo) is drawn through this. */
2517
+ function mapWeight(weight) {
2518
+ return fontWeights[weight];
2519
+ }
2520
+ //#endregion
2852
2521
  //#region ../theme-core/src/header/generateHeaderLogoStyles.ts
2853
2522
  function generateHeaderLogoStyles(input) {
2854
2523
  const { logo, themeId } = input;
@@ -2856,6 +2525,7 @@ function generateHeaderLogoStyles(input) {
2856
2525
  ...logoTextColorRules(input),
2857
2526
  logo?.fontFamily === "body" ? "font-family: var(--font-body);" : "font-family: var(--font-heading);",
2858
2527
  ...logoLetterSpacingRules(logo),
2528
+ ...logoTypeRules(logo, input.theme.typography),
2859
2529
  ...logoContrastRules(input)
2860
2530
  ].join("\n ")}\n}\n${mobilePanelLogoColor(input)}`;
2861
2531
  }
@@ -2877,6 +2547,23 @@ function logoLetterSpacingRules(logo) {
2877
2547
  widest: "0.15em"
2878
2548
  }[spacing]};`];
2879
2549
  }
2550
+ /**
2551
+ * The site name's weight, case and width, each only when the recipe states it. The width is checked
2552
+ * against the logo's own family the way typography widths are: a family whose width axis doesn't reach
2553
+ * it (after the owner picks another heading font, say) draws the site name at its normal width.
2554
+ */
2555
+ function logoTypeRules(logo, typography) {
2556
+ return [
2557
+ ...logo?.weight ? [`font-weight: ${mapWeight(logo.weight)};`] : [],
2558
+ ...logo?.case ? [`text-transform: ${logo.case === "uppercase" ? "uppercase" : "none"};`] : [],
2559
+ ...logoWidthRules(logo, typography)
2560
+ ];
2561
+ }
2562
+ function logoWidthRules(logo, typography) {
2563
+ if (logo?.width == null) return [];
2564
+ const family = logo.fontFamily === "body" ? typography.body.family : typography.headings.default.family;
2565
+ return fontWidthFits(logo.width, family) ? [`font-stretch: ${logo.width}%;`] : [];
2566
+ }
2880
2567
  function logoContrastRules(input) {
2881
2568
  const colorToken = input.textColor?.trim() || input.fallbackTextColor?.trim() || "text";
2882
2569
  const shadow = buildTextContrastShadow({
@@ -3414,6 +3101,11 @@ function arcMaskDataUrl(echo) {
3414
3101
  const lines = arcEchoLinePaths.map((d) => `<path d='${d}' fill='none' stroke='url(#fade)' stroke-width='1.5' vector-effect='non-scaling-stroke'/>`).join("");
3415
3102
  return svgDataUrl(`<svg viewBox='0 0 1440 110' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'>${echo ? `<defs><linearGradient id='fade' gradientUnits='userSpaceOnUse' x1='0' y1='0' x2='1440' y2='0'><stop offset='0' stop-color='black' stop-opacity='0.42'/><stop offset='0.5' stop-color='black' stop-opacity='0'/><stop offset='1' stop-color='black' stop-opacity='0.42'/></linearGradient><mask id='lines'><rect width='1440' height='110' fill='white'/>${lines}</mask></defs><path d='${arcShapePath}' fill='white' mask='url(#lines)'/>` : `<path d='${arcShapePath}' fill='white'/>`}</svg>`);
3416
3103
  }
3104
+ /** One half disc of the next colour, rising from the join. Between two of them the colour above shows as a punched hole would. */
3105
+ function tornMaskDataUrl(pitchPx, holeRadiusPx) {
3106
+ const height = Math.ceil(holeRadiusPx);
3107
+ return svgDataUrl(`<svg viewBox='0 0 ${pitchPx} ${height}' xmlns='http://www.w3.org/2000/svg'><circle cx='${pitchPx / 2}' cy='${height}' r='${holeRadiusPx}' fill='white'/></svg>`);
3108
+ }
3417
3109
  function waveMaskDataUrl(mask) {
3418
3110
  return svgDataUrl(`<svg viewBox='0 0 1440 72' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><path d='${waveMaskSvgPaths[mask]}' fill='white'/></svg>`);
3419
3111
  }
@@ -3478,6 +3170,9 @@ function generateBoundaryCss(selector) {
3478
3170
  * footer blocks intervene, document adapters mark their region so only their
3479
3171
  * ending receives the reserve (and an empty region falls back to the page).
3480
3172
  *
3173
+ * A two-column layout (a booking page) marks itself rather than a block: its
3174
+ * sections have no padding of their own, and either column can end lower.
3175
+ *
3481
3176
  * Pages that don't come from the page renderer (privacy, terms, checkout, the
3482
3177
  * portal, a not-found page) have no block ending. The site document's content
3483
3178
  * area takes the reserve for them instead, but only when nothing inside it is
@@ -3487,7 +3182,11 @@ function footerEdgeReserveCss(selector, entry) {
3487
3182
  const metrics = boundaryRuntimeMetricsForDecorativeTransition(entry.intent);
3488
3183
  const withEdge = `${selector}:has([data-footer-edge][data-boundary-treatment='${entry.intent}'])`;
3489
3184
  const pageEnds = `${withEdge}:not(:has([data-footer-blocks] [data-page-ending]))`;
3490
- return [rule(`${pageEnds} [data-block][data-page-ending] > ${blockSection}, ${withEdge} [data-footer-blocks] [data-block][data-page-ending] > ${blockSection}`, [`padding-bottom: calc(var(--rb-section-pad-y, 0rem) + ${metrics.heightCss});`]), rule(`${pageEnds} [data-site-document-content]:not(:has([data-page-ending]))`, [`padding-bottom: ${metrics.heightCss};`])];
3185
+ return [
3186
+ rule(`${pageEnds} [data-block][data-page-ending] > ${blockSection}, ${withEdge} [data-footer-blocks] [data-block][data-page-ending] > ${blockSection}`, [`padding-bottom: calc(var(--rb-section-pad-y, 0rem) + ${metrics.heightCss});`]),
3187
+ rule(`${pageEnds} [data-page-layout][data-page-ending]`, [`padding-bottom: calc(var(--rb-page-layout-pad-y, 0rem) + ${metrics.heightCss});`]),
3188
+ rule(`${pageEnds} [data-site-document-content]:not(:has([data-page-ending]))`, [`padding-bottom: ${metrics.heightCss};`])
3189
+ ];
3491
3190
  }
3492
3191
  function placementCss(boundary) {
3493
3192
  return Object.keys(placementRules).flatMap((placement) => {
@@ -3519,6 +3218,20 @@ function shapeDeclarations(entry) {
3519
3218
  ];
3520
3219
  case "wave": return maskDeclarations(waveMaskDataUrl(entry.shape.mask));
3521
3220
  case "arc": return [...maskDeclarations(entry.shape.bulge ? arcBulgeMaskDataUrl() : arcMaskDataUrl(entry.shape.echo === true)), "height: calc(var(--boundary-height) + 2px);"];
3221
+ case "torn": {
3222
+ const mask = tornMaskDataUrl(entry.shape.pitchPx, entry.shape.holeRadiusPx);
3223
+ return [
3224
+ "background: var(--boundary-shape-paint);",
3225
+ `mask-image: url("${mask}");`,
3226
+ "mask-repeat: repeat-x;",
3227
+ `mask-size: ${entry.shape.pitchPx}px 100%;`,
3228
+ "mask-position: center bottom;",
3229
+ `-webkit-mask-image: url("${mask}");`,
3230
+ "-webkit-mask-repeat: repeat-x;",
3231
+ `-webkit-mask-size: ${entry.shape.pitchPx}px 100%;`,
3232
+ "-webkit-mask-position: center bottom;"
3233
+ ];
3234
+ }
3522
3235
  case "angle": return [
3523
3236
  "height: calc(var(--boundary-height) + 2px);",
3524
3237
  "background: var(--boundary-shape-paint);",
@@ -4163,15 +3876,6 @@ function typographyFontRoleCssVars(typography) {
4163
3876
  } : {}
4164
3877
  };
4165
3878
  }
4166
- function mapWeight(w) {
4167
- return {
4168
- light: 300,
4169
- regular: 400,
4170
- medium: 500,
4171
- semibold: 600,
4172
- bold: 700
4173
- }[w];
4174
- }
4175
3879
  function mapShadow(level, softness, position = "bottom", colorToken) {
4176
3880
  if (level === "none") return "none";
4177
3881
  const tintVar = colorToken ? cssVarValue(colorToken) : null;
@@ -4608,72 +4312,516 @@ function lazyRegisterFragments(registerFn) {
4608
4312
  ALL_FRAGMENTS.forEach(registerFn);
4609
4313
  initialized = true;
4610
4314
  }
4611
- //#endregion
4612
- //#region ../blocks/src/system/fragments/registry.ts
4613
- const fragmentRegistry = {};
4614
- /**
4615
- * Ensure all fragments are registered.
4616
- * This is called automatically by getFragmentRegistry() and getFragment().
4617
- * Can also be called explicitly to force registration.
4618
- */
4619
- function ensureInitialized() {
4620
- lazyRegisterFragments((fragment) => {
4621
- if (!fragmentRegistry[fragment.id]) fragmentRegistry[fragment.id] = fragment;
4622
- });
4315
+ //#endregion
4316
+ //#region ../blocks/src/system/fragments/registry.ts
4317
+ const fragmentRegistry = {};
4318
+ /**
4319
+ * Ensure all fragments are registered.
4320
+ * This is called automatically by getFragmentRegistry() and getFragment().
4321
+ * Can also be called explicitly to force registration.
4322
+ */
4323
+ function ensureInitialized() {
4324
+ lazyRegisterFragments((fragment) => {
4325
+ if (!fragmentRegistry[fragment.id]) fragmentRegistry[fragment.id] = fragment;
4326
+ });
4327
+ }
4328
+ /**
4329
+ * Get the full fragment registry.
4330
+ * Useful for passing to runtime components.
4331
+ *
4332
+ * @returns The complete fragment registry
4333
+ */
4334
+ function getFragmentRegistry() {
4335
+ ensureInitialized();
4336
+ return fragmentRegistry;
4337
+ }
4338
+ //#endregion
4339
+ //#region ../blocks/src/system/blocks/events/shared/detailsSelection.ts
4340
+ function isFutureOrNow(iso, nowIso) {
4341
+ const ts = Date.parse(iso);
4342
+ const now = Date.parse(nowIso);
4343
+ if (!Number.isFinite(ts) || !Number.isFinite(now)) return false;
4344
+ return ts >= now;
4345
+ }
4346
+ const localDateKey = (startsAt, timeZone) => getBookingLocalDateKey(toScheduledBookingDateTime({
4347
+ startsAt,
4348
+ timeZone
4349
+ }));
4350
+ function selectRequested(events, requested) {
4351
+ if (!requested) return null;
4352
+ const byId = events.find((event) => event.occurrenceId === requested.id || event.id === requested.id);
4353
+ if (byId) return byId;
4354
+ if (!requested.startsAt || !requested.timeZone) return null;
4355
+ const requestedDate = localDateKey(requested.startsAt, requested.timeZone);
4356
+ return events.find((event) => localDateKey(event.startsAt, event.timeZone) === requestedDate) ?? null;
4357
+ }
4358
+ function selectNextUpcoming(events, nowIso) {
4359
+ return [...events].filter((event) => isFutureOrNow(event.startsAt, nowIso)).sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt))[0] ?? null;
4360
+ }
4361
+ function selectCompletedWholeSeries(events) {
4362
+ if (events.length === 0 || !events.every((event) => event.bookingScope === "whole_series")) return null;
4363
+ return [...events].sort((left, right) => Date.parse(right.startsAt) - Date.parse(left.startsAt))[0] ?? null;
4364
+ }
4365
+ function selectEventDetailsCandidate(events, requested, nowIso) {
4366
+ const selected = selectRequested(events, requested);
4367
+ if (selected) return {
4368
+ event: selected,
4369
+ mode: "selected"
4370
+ };
4371
+ const upcoming = selectNextUpcoming(events, nowIso);
4372
+ if (upcoming) return {
4373
+ event: upcoming,
4374
+ mode: "next"
4375
+ };
4376
+ const completed = selectCompletedWholeSeries(events);
4377
+ return completed ? {
4378
+ event: completed,
4379
+ mode: "completed"
4380
+ } : null;
4381
+ }
4382
+ //#endregion
4383
+ //#region ../blocks/src/system/blocks/events/shared/bookedElsewhere.ts
4384
+ /**
4385
+ * The booking decision for a page whose event is booked on another website.
4386
+ *
4387
+ * Such a page has no booking form here, only a button out, so what it needs to
4388
+ * know is which date (if any) that button books and, when none, why not. The
4389
+ * page's header and its registration panel both read this one decision, so a
4390
+ * recurring class whose today's date is past its cut-off can't be "closed" in
4391
+ * one place and bookable for next week in the other. Copy projects from the
4392
+ * closure; it never decides eligibility.
4393
+ *
4394
+ * The render clock is part of the input: a page's projected availability can be
4395
+ * older than the page, and a cut-off or start makes that gap matter.
4396
+ */
4397
+ /** Every date the page scopes in is booked elsewhere. */
4398
+ function isBookedElsewherePage(events) {
4399
+ return events.length > 0 && events.every((event) => event.destination.kind === "external");
4400
+ }
4401
+ /** Null while the date is open by both its projected availability and this clock. */
4402
+ function bookedElsewhereDateClosure(event, now) {
4403
+ const closesAt = event.bookingClosesAt;
4404
+ if (closesAt && isInBookingCutOffWindow(event, now)) return {
4405
+ kind: "cutOff",
4406
+ closesAt
4407
+ };
4408
+ const reason = event.bookingAvailability.kind === "closed" ? event.bookingAvailability.reason : null;
4409
+ if (reason === "occurrence_completed" || reason === "series_completed" || Date.parse(event.endsAt) <= now.getTime()) return { kind: "finished" };
4410
+ if (reason === "already_started" || Date.parse(event.startsAt) <= now.getTime()) return { kind: "started" };
4411
+ return reason ? { kind: "notTaking" } : null;
4412
+ }
4413
+ /**
4414
+ * What a page booked elsewhere books. Null when the selection isn't booked
4415
+ * elsewhere, so pages booked here keep their own rules. A page-level closure
4416
+ * (paused, opening soon) comes first; then the selection's own dates.
4417
+ */
4418
+ function decideBookedElsewhereBooking(selection, now) {
4419
+ const destination = selectionRepresentativeEvent(selection).destination;
4420
+ if (destination.kind !== "external") return null;
4421
+ const open = (target) => ({
4422
+ kind: "open",
4423
+ target,
4424
+ destination
4425
+ });
4426
+ const closed = (closure) => ({
4427
+ kind: "closed",
4428
+ closure
4429
+ });
4430
+ const detail = resolveSelectionBookingClosedDetail(selection);
4431
+ if (detail) return closed({
4432
+ kind: "bookingClosed",
4433
+ detail
4434
+ });
4435
+ switch (selection.kind) {
4436
+ case "occurrence": {
4437
+ const closure = bookedElsewhereDateClosure(selection.event, now);
4438
+ return closure ? closed({
4439
+ kind: "date",
4440
+ event: selection.event,
4441
+ closure
4442
+ }) : open(selection.event);
4443
+ }
4444
+ case "dateChoice": {
4445
+ const target = selection.dates.find((date) => bookedElsewhereDateClosure(date, now) === null);
4446
+ if (target) return open(target);
4447
+ const firstCutOff = selection.dates.flatMap((event) => {
4448
+ const closure = bookedElsewhereDateClosure(event, now);
4449
+ return closure?.kind === "cutOff" ? [{
4450
+ event,
4451
+ closesAt: closure.closesAt
4452
+ }] : [];
4453
+ })[0];
4454
+ return closed(firstCutOff ? {
4455
+ kind: "datesCutOff",
4456
+ dates: selection.dates,
4457
+ firstCutOff
4458
+ } : { kind: "unavailable" });
4459
+ }
4460
+ case "wholeSeriesRun": {
4461
+ const { run, representative } = selection.run;
4462
+ const phase = resolveWholeSeriesBookingPhase(run, now);
4463
+ if (phase.kind === "closed") return closed({
4464
+ kind: "run",
4465
+ reason: phase.reason,
4466
+ run
4467
+ });
4468
+ return representative.bookingAvailability.kind === "closed" ? closed({
4469
+ kind: "run",
4470
+ reason: "enrolment-closed",
4471
+ run
4472
+ }) : open(representative);
4473
+ }
4474
+ case "wholeSeriesParent": return open(selection.eligibleRuns[0].representative);
4475
+ case "wholeSeriesParentUnavailable": return closed({ kind: "unavailable" });
4476
+ }
4477
+ }
4478
+ /**
4479
+ * The date a page of dates booked elsewhere speaks for: the route's own date,
4480
+ * else the series' earliest date still open there, so one closed date (today's,
4481
+ * past its cut-off) doesn't close the page while next week's can still be
4482
+ * booked. With none open, the series' usual choice speaks and shows its closed
4483
+ * state. Null when the page isn't booked elsewhere or names no such date.
4484
+ */
4485
+ function selectBookedElsewhereDates(events, occurrenceId, now) {
4486
+ if (!isBookedElsewherePage(events)) return null;
4487
+ if (occurrenceId) {
4488
+ const event = events.find((candidate) => candidate.occurrenceId === occurrenceId);
4489
+ return event && isOrdinaryPublicEvent(event) ? {
4490
+ kind: "occurrence",
4491
+ event
4492
+ } : null;
4493
+ }
4494
+ const fallback = planOrdinarySeriesSelection(events);
4495
+ if (fallback?.kind !== "occurrence") return fallback;
4496
+ const open = events.filter(isOrdinaryPublicEvent).filter((event) => event.seriesId === fallback.event.seriesId).filter((event) => decideBookedElsewhereBooking({
4497
+ kind: "occurrence",
4498
+ event
4499
+ }, now)?.kind === "open").sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt))[0];
4500
+ return open ? {
4501
+ kind: "occurrence",
4502
+ event: open
4503
+ } : fallback;
4504
+ }
4505
+ /** The page's whole decision for dates booked elsewhere, for consumers that show it without a selection of their own. */
4506
+ function decideBookedElsewhereDatesPage(events, occurrenceId, now) {
4507
+ const selection = selectBookedElsewhereDates(events, occurrenceId, now);
4508
+ return selection ? decideBookedElsewhereBooking(selection, now) : null;
4509
+ }
4510
+ //#endregion
4511
+ //#region ../calendar/src/lane-packing.ts
4512
+ /**
4513
+ * Assign lanes to a list of intervals.
4514
+ *
4515
+ * Returns one result per input in the same order as the input. Internally
4516
+ * sorts a copy by `(start, end, orderKey)` to ensure determinism, then
4517
+ * permutes results back to input order.
4518
+ */
4519
+ function assignLanes(intervals) {
4520
+ if (intervals.length === 0) return [];
4521
+ const indexed = intervals.map((interval, index) => ({
4522
+ interval,
4523
+ index
4524
+ }));
4525
+ indexed.sort((left, right) => left.interval.start - right.interval.start || left.interval.end - right.interval.end || left.interval.orderKey.localeCompare(right.interval.orderKey));
4526
+ const results = new Array(intervals.length);
4527
+ let cluster = [];
4528
+ let activeLaneEnds = [];
4529
+ let clusterMaxEnd = -Infinity;
4530
+ const closeCluster = () => {
4531
+ if (cluster.length === 0) return;
4532
+ const laneCount = Math.max(1, cluster.reduce((max, entry) => Math.max(max, entry.laneIndex + 1), 0));
4533
+ for (const entry of cluster) results[entry.index] = {
4534
+ laneIndex: entry.laneIndex,
4535
+ laneCount
4536
+ };
4537
+ cluster = [];
4538
+ activeLaneEnds = [];
4539
+ clusterMaxEnd = -Infinity;
4540
+ };
4541
+ for (const { interval, index } of indexed) {
4542
+ if (interval.start >= clusterMaxEnd) closeCluster();
4543
+ const laneIndex = firstAvailableLane(activeLaneEnds, interval.start);
4544
+ activeLaneEnds[laneIndex] = interval.end;
4545
+ clusterMaxEnd = Math.max(clusterMaxEnd, interval.end);
4546
+ cluster.push({
4547
+ index,
4548
+ laneIndex
4549
+ });
4550
+ }
4551
+ closeCluster();
4552
+ return results;
4553
+ }
4554
+ function firstAvailableLane(activeLaneEnds, start) {
4555
+ const laneIndex = activeLaneEnds.findIndex((end) => end <= start);
4556
+ return laneIndex >= 0 ? laneIndex : activeLaneEnds.length;
4557
+ }
4558
+ //#endregion
4559
+ //#region ../calendar/src/timetable.ts
4560
+ /**
4561
+ * Timetable model — the package's core surface.
4562
+ *
4563
+ * Generic over `T`. Takes a list of timed items + a viewport; returns a
4564
+ * day-by-day layout with overlap-packed lanes and percent-based positions
4565
+ * plus a diagnostics list for items dropped during processing.
4566
+ *
4567
+ * The function is pure: given identical input (including `now`), it returns
4568
+ * the same output. The model has no opinion on what an item is — pass
4569
+ * accessors.
4570
+ */
4571
+ const DEFAULT_BOUNDS = {
4572
+ minStartHour: 5,
4573
+ maxEndHour: 23,
4574
+ defaultStartHour: 6,
4575
+ defaultEndHour: 21,
4576
+ minHeightPercent: 2.5,
4577
+ marginMinutes: 0
4578
+ };
4579
+ function buildTimetableModel$1(input) {
4580
+ const bounds = resolveBounds(input.bounds);
4581
+ const viewportDays = getTimetableDays(input.viewDate, input.view ?? "week", input.startOfWeek);
4582
+ const viewportKeys = new Set(viewportDays.map(formatDateKey));
4583
+ const parsed = parseAllItems(input.items, input);
4584
+ const inViewport = deriveVisibleSegments(parsed.drafts, viewportKeys);
4585
+ const hourRange = input.hours === void 0 ? resolveHourRange(inViewport, bounds) : fixedHourRange(input.hours);
4586
+ const laid = layoutCellsByDate(inViewport, hourRange, bounds);
4587
+ return {
4588
+ days: assembleDays(viewportDays, laid.cellsByDate, input.today),
4589
+ hourTicks: buildHourTicks(hourRange.startHour, hourRange.endHour),
4590
+ startHour: hourRange.startHour,
4591
+ endHour: hourRange.endHour,
4592
+ rangeMinutes: (hourRange.endHour - hourRange.startHour) * 60,
4593
+ hasItems: inViewport.length > 0,
4594
+ diagnostics: [...parsed.diagnostics, ...laid.diagnostics]
4595
+ };
4596
+ }
4597
+ function parseAllItems(items, accessors) {
4598
+ const drafts = [];
4599
+ const diagnostics = [];
4600
+ for (const item of items) {
4601
+ const result = parseDraft(item, accessors);
4602
+ if (result.ok) drafts.push(result.draft);
4603
+ else diagnostics.push({
4604
+ item,
4605
+ reason: result.reason
4606
+ });
4607
+ }
4608
+ return {
4609
+ drafts,
4610
+ diagnostics
4611
+ };
4612
+ }
4613
+ function layoutCellsByDate(segments, hourRange, bounds) {
4614
+ const rangeMinutes = (hourRange.endHour - hourRange.startHour) * 60;
4615
+ const rangeStartMinutes = hourRange.startHour * 60;
4616
+ const rangeEndMinutes = hourRange.endHour * 60;
4617
+ const segmentsByDate = groupSegmentsByDate(segments);
4618
+ const cellsByDate = /* @__PURE__ */ new Map();
4619
+ const diagnostics = [];
4620
+ for (const [dateKey, daySegments] of segmentsByDate) {
4621
+ const clipped = [];
4622
+ for (const segment of daySegments) {
4623
+ const result = clipDraft(segment, rangeStartMinutes, rangeEndMinutes);
4624
+ if (result.ok) clipped.push(result.clipped);
4625
+ else diagnostics.push({
4626
+ item: segment.draft.item,
4627
+ reason: result.reason
4628
+ });
4629
+ }
4630
+ const laneResults = assignLanes(clipped.map((entry) => ({
4631
+ start: entry.visibleStart,
4632
+ end: entry.visibleEnd,
4633
+ orderKey: entry.segment.draft.orderKey
4634
+ })));
4635
+ cellsByDate.set(dateKey, clipped.map((entry, idx) => buildCell(entry, laneResults[idx] ?? {
4636
+ laneIndex: 0,
4637
+ laneCount: 1
4638
+ }, rangeStartMinutes, rangeMinutes, bounds.minHeightPercent)));
4639
+ }
4640
+ return {
4641
+ cellsByDate,
4642
+ diagnostics
4643
+ };
4644
+ }
4645
+ function assembleDays(viewportDays, cellsByDate, today) {
4646
+ return viewportDays.map((date) => {
4647
+ const dateKey = formatDateKey(date);
4648
+ return {
4649
+ date,
4650
+ dateKey,
4651
+ isToday: isSameCalendarDay(date, today),
4652
+ cells: cellsByDate.get(dateKey) ?? []
4653
+ };
4654
+ });
4655
+ }
4656
+ function parseDraft(item, accessors) {
4657
+ const startsAtIso = accessors.getStartsAt(item);
4658
+ const endsAtIso = accessors.getEndsAt(item);
4659
+ const timeZone = accessors.getTimeZone(item);
4660
+ const startsAtMinutes = getLocalMinuteOfDay(startsAtIso, timeZone);
4661
+ if (Number.isNaN(startsAtMinutes)) return {
4662
+ ok: false,
4663
+ reason: "invalid-start"
4664
+ };
4665
+ const startDateKey = getLocalDateKey(startsAtIso, timeZone);
4666
+ if (startDateKey == null) return {
4667
+ ok: false,
4668
+ reason: "invalid-timezone"
4669
+ };
4670
+ const endDateKey = getLocalDateKey(endsAtIso, timeZone);
4671
+ if (endDateKey == null) return {
4672
+ ok: false,
4673
+ reason: "invalid-end"
4674
+ };
4675
+ const endsAtMinutesRaw = getLocalMinuteOfDay(endsAtIso, timeZone);
4676
+ if (Number.isNaN(endsAtMinutesRaw)) return {
4677
+ ok: false,
4678
+ reason: "invalid-end"
4679
+ };
4680
+ const spansMultipleDays = startDateKey < endDateKey;
4681
+ const endsAtMinutes = spansMultipleDays || endsAtMinutesRaw > startsAtMinutes ? endsAtMinutesRaw : Math.min(1440, startsAtMinutes + 60);
4682
+ if (!spansMultipleDays && endsAtMinutes <= startsAtMinutes) return {
4683
+ ok: false,
4684
+ reason: "non-positive-duration"
4685
+ };
4686
+ return {
4687
+ ok: true,
4688
+ draft: {
4689
+ item,
4690
+ startDateKey,
4691
+ endDateKey,
4692
+ startsAtMinutes,
4693
+ endsAtMinutes,
4694
+ color: accessors.getColor?.(item) ?? null,
4695
+ orderKey: accessors.getOrderKey?.(item) ?? accessors.getId(item)
4696
+ }
4697
+ };
4698
+ }
4699
+ function deriveVisibleSegments(drafts, viewportKeys) {
4700
+ const segments = [];
4701
+ for (const draft of drafts) for (const dateKey of enumerateDateKeys(draft.startDateKey, draft.endDateKey)) {
4702
+ if (!viewportKeys.has(dateKey)) continue;
4703
+ const isStartDay = dateKey === draft.startDateKey;
4704
+ const isEndDay = dateKey === draft.endDateKey;
4705
+ const startsAtMinutes = isStartDay ? draft.startsAtMinutes : 0;
4706
+ const endsAtMinutes = isEndDay ? draft.endsAtMinutes : 1440;
4707
+ if (endsAtMinutes <= startsAtMinutes) continue;
4708
+ segments.push({
4709
+ draft,
4710
+ dateKey,
4711
+ startsAtMinutes,
4712
+ endsAtMinutes,
4713
+ continuesBefore: !isStartDay,
4714
+ continuesAfter: !isEndDay
4715
+ });
4716
+ }
4717
+ return segments;
4718
+ }
4719
+ function clipDraft(segment, rangeStartMinutes, rangeEndMinutes) {
4720
+ const visibleStart = Math.max(rangeStartMinutes, segment.startsAtMinutes);
4721
+ const visibleEnd = Math.min(rangeEndMinutes, segment.endsAtMinutes);
4722
+ if (visibleEnd <= visibleStart) return {
4723
+ ok: false,
4724
+ reason: "out-of-visible-hours"
4725
+ };
4726
+ return {
4727
+ ok: true,
4728
+ clipped: {
4729
+ segment,
4730
+ visibleStart,
4731
+ visibleEnd
4732
+ }
4733
+ };
4734
+ }
4735
+ function buildCell(entry, lane, rangeStartMinutes, rangeMinutes, minHeightPercent) {
4736
+ const heightPercent = Math.max(minHeightPercent, toRangePercent(entry.visibleEnd - entry.visibleStart, rangeMinutes));
4737
+ const rawTopPercent = toRangePercent(entry.visibleStart - rangeStartMinutes, rangeMinutes);
4738
+ const topPercent = Math.min(rawTopPercent, 100 - heightPercent);
4739
+ return {
4740
+ item: entry.segment.draft.item,
4741
+ dateKey: entry.segment.dateKey,
4742
+ startsAtMinutes: entry.segment.startsAtMinutes,
4743
+ endsAtMinutes: entry.segment.endsAtMinutes,
4744
+ visibleStartsAtMinutes: entry.visibleStart,
4745
+ visibleEndsAtMinutes: entry.visibleEnd,
4746
+ topPercent,
4747
+ heightPercent,
4748
+ isClippedStart: entry.segment.continuesBefore || entry.segment.startsAtMinutes < entry.visibleStart,
4749
+ isClippedEnd: entry.segment.continuesAfter || entry.segment.endsAtMinutes > entry.visibleEnd,
4750
+ laneIndex: lane.laneIndex,
4751
+ laneCount: lane.laneCount,
4752
+ color: entry.segment.draft.color
4753
+ };
4754
+ }
4755
+ function resolveBounds(bounds) {
4756
+ return {
4757
+ ...DEFAULT_BOUNDS,
4758
+ ...bounds
4759
+ };
4760
+ }
4761
+ function resolveHourRange(segments, bounds) {
4762
+ if (segments.length === 0) return {
4763
+ startHour: bounds.defaultStartHour,
4764
+ endHour: bounds.defaultEndHour
4765
+ };
4766
+ const earliestStart = Math.min(...segments.map((segment) => segment.startsAtMinutes));
4767
+ const latestEnd = Math.max(...segments.map((segment) => segment.endsAtMinutes));
4768
+ const startHour = Math.max(bounds.minStartHour, Math.floor((earliestStart - bounds.marginMinutes) / 60));
4769
+ const endHour = Math.min(bounds.maxEndHour, Math.ceil((latestEnd + bounds.marginMinutes) / 60));
4770
+ return {
4771
+ startHour,
4772
+ endHour: Math.max(startHour + 1, endHour)
4773
+ };
4623
4774
  }
4624
- /**
4625
- * Get the full fragment registry.
4626
- * Useful for passing to runtime components.
4627
- *
4628
- * @returns The complete fragment registry
4629
- */
4630
- function getFragmentRegistry() {
4631
- ensureInitialized();
4632
- return fragmentRegistry;
4775
+ function fixedHourRange(hours) {
4776
+ const startHour = Math.min(23, Math.max(0, Math.floor(hours.startHour)));
4777
+ return {
4778
+ startHour,
4779
+ endHour: Math.min(24, Math.max(startHour + 1, Math.ceil(hours.endHour)))
4780
+ };
4633
4781
  }
4634
- //#endregion
4635
- //#region ../blocks/src/system/blocks/events/shared/detailsSelection.ts
4636
- function isFutureOrNow(iso, nowIso) {
4637
- const ts = Date.parse(iso);
4638
- const now = Date.parse(nowIso);
4639
- if (!Number.isFinite(ts) || !Number.isFinite(now)) return false;
4640
- return ts >= now;
4782
+ function buildHourTicks(startHour, endHour) {
4783
+ const ticks = [];
4784
+ for (let hour = startHour; hour <= endHour; hour += 1) ticks.push(hour);
4785
+ return ticks;
4641
4786
  }
4642
- const localDateKey = (startsAt, timeZone) => getBookingLocalDateKey(toScheduledBookingDateTime({
4643
- startsAt,
4644
- timeZone
4645
- }));
4646
- function selectRequested(events, requested) {
4647
- if (!requested) return null;
4648
- const byId = events.find((event) => event.occurrenceId === requested.id || event.id === requested.id);
4649
- if (byId) return byId;
4650
- if (!requested.startsAt || !requested.timeZone) return null;
4651
- const requestedDate = localDateKey(requested.startsAt, requested.timeZone);
4652
- return events.find((event) => localDateKey(event.startsAt, event.timeZone) === requestedDate) ?? null;
4787
+ function groupSegmentsByDate(segments) {
4788
+ const grouped = /* @__PURE__ */ new Map();
4789
+ for (const segment of segments) {
4790
+ const existing = grouped.get(segment.dateKey) ?? [];
4791
+ existing.push(segment);
4792
+ grouped.set(segment.dateKey, existing);
4793
+ }
4794
+ return grouped;
4653
4795
  }
4654
- function selectNextUpcoming(events, nowIso) {
4655
- return [...events].filter((event) => isFutureOrNow(event.startsAt, nowIso)).sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt))[0] ?? null;
4796
+ function toRangePercent(minutes, rangeMinutes) {
4797
+ if (rangeMinutes <= 0) return 0;
4798
+ return minutes / rangeMinutes * 100;
4656
4799
  }
4657
- function selectCompletedWholeSeries(events) {
4658
- if (events.length === 0 || !events.every((event) => event.bookingScope === "whole_series")) return null;
4659
- return [...events].sort((left, right) => Date.parse(right.startsAt) - Date.parse(left.startsAt))[0] ?? null;
4800
+ function getTimetableDays(viewDate, view, startOfWeek) {
4801
+ if (view === "day") return [viewDate];
4802
+ return getWeekCalendarDays(viewDate, startOfWeek);
4660
4803
  }
4661
- function selectEventDetailsCandidate(events, requested, nowIso) {
4662
- const selected = selectRequested(events, requested);
4663
- if (selected) return {
4664
- event: selected,
4665
- mode: "selected"
4666
- };
4667
- const upcoming = selectNextUpcoming(events, nowIso);
4668
- if (upcoming) return {
4669
- event: upcoming,
4670
- mode: "next"
4804
+ function enumerateDateKeys(startDateKey, endDateKey) {
4805
+ if (startDateKey > endDateKey) throw new Error(`Invalid timetable date range: ${startDateKey} is after ${endDateKey}`);
4806
+ const start = parseDateKey(startDateKey);
4807
+ parseDateKey(endDateKey);
4808
+ const keys = [];
4809
+ let cursor = start;
4810
+ while (formatDateKey(cursor) <= endDateKey) {
4811
+ keys.push(formatDateKey(cursor));
4812
+ cursor = addDays(cursor, 1);
4813
+ }
4814
+ return keys;
4815
+ }
4816
+ function parseDateKey(dateKey) {
4817
+ const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(dateKey);
4818
+ if (match === null) throw new Error(`Invalid timetable date key: ${dateKey}`);
4819
+ const [, year, month, day] = match;
4820
+ return {
4821
+ year: Number(year),
4822
+ month: Number(month),
4823
+ day: Number(day)
4671
4824
  };
4672
- const completed = selectCompletedWholeSeries(events);
4673
- return completed ? {
4674
- event: completed,
4675
- mode: "completed"
4676
- } : null;
4677
4825
  }
4678
4826
  //#endregion
4679
4827
  //#region ../blocks/src/system/runtime/nodes/events/domain/depositOffer.ts
@@ -4971,6 +5119,45 @@ function StepIndicator$1({ currentStep, totalSteps, stepLabels, classPrefix, emi
4971
5119
  });
4972
5120
  }
4973
5121
  //#endregion
5122
+ //#region ../blocks/src/system/runtime/shared/components/ChoiceGroup.tsx
5123
+ function ChoiceGroup(props) {
5124
+ const size = props.size ?? "pill";
5125
+ return /* @__PURE__ */ jsxs("fieldset", {
5126
+ className: ["rb-choice-group", props.className].filter(Boolean).join(" "),
5127
+ "data-choice-size": size,
5128
+ disabled: props.disabled,
5129
+ children: [/* @__PURE__ */ jsx("legend", {
5130
+ className: props.legendHidden ? "rb-choice-legend rb-choice-legend--hidden" : "rb-choice-legend",
5131
+ children: props.legend
5132
+ }), /* @__PURE__ */ jsx("div", {
5133
+ className: "rb-choice-options",
5134
+ children: props.options.map((option) => /* @__PURE__ */ jsxs("label", {
5135
+ className: "rb-choice",
5136
+ "data-choice-size": size,
5137
+ children: [/* @__PURE__ */ jsx("input", {
5138
+ type: "radio",
5139
+ className: "rb-choice-input",
5140
+ name: props.name,
5141
+ value: option.value,
5142
+ required: props.required,
5143
+ disabled: option.disabled,
5144
+ ...props.value === void 0 ? { defaultChecked: option.value === props.defaultValue } : { checked: option.value === props.value },
5145
+ onChange: props.onChange ? () => props.onChange?.(option.value) : void 0
5146
+ }), /* @__PURE__ */ jsxs("span", {
5147
+ className: "rb-choice-face",
5148
+ children: [/* @__PURE__ */ jsx("span", {
5149
+ className: "rb-choice-label",
5150
+ children: option.label
5151
+ }), option.detail ? /* @__PURE__ */ jsx("span", {
5152
+ className: "rb-choice-detail",
5153
+ children: option.detail
5154
+ }) : null]
5155
+ })]
5156
+ }, option.value))
5157
+ })]
5158
+ });
5159
+ }
5160
+ //#endregion
4974
5161
  //#region ../blocks/src/system/runtime/nodes/events/shared/EventCard.tsx
4975
5162
  /**
4976
5163
  * EventCard Component
@@ -5098,7 +5285,7 @@ function EventCardContent(props) {
5098
5285
  className: "card-title rb-mb-3",
5099
5286
  children: /* @__PURE__ */ jsx("a", {
5100
5287
  className: "event-title-link",
5101
- ...resolveEventLinkProps(event),
5288
+ ...resolveEventPageLink(event),
5102
5289
  children: props.title
5103
5290
  })
5104
5291
  }),
@@ -5357,7 +5544,7 @@ const LegacyEventCompactRow = ({ event, buttonVariant = "primary", buttonText, s
5357
5544
  className: "event-compact-row-title",
5358
5545
  children: /* @__PURE__ */ jsx("a", {
5359
5546
  className: "event-title-link",
5360
- ...resolveEventLinkProps(event),
5547
+ ...resolveEventPageLink(event),
5361
5548
  children: eventDisplayTitle(event).title
5362
5549
  })
5363
5550
  }),
@@ -5493,7 +5680,7 @@ function EventQuickDateCard(props) {
5493
5680
  className: "event-quick-date-title",
5494
5681
  children: /* @__PURE__ */ jsx("a", {
5495
5682
  className: "event-title-link",
5496
- ...resolveEventLinkProps(event),
5683
+ ...resolveEventPageLink(event),
5497
5684
  children: event.title
5498
5685
  })
5499
5686
  }),
@@ -5578,9 +5765,12 @@ const formSchema = z.union([z.null(), z.object({
5578
5765
  slug: z.string().optional()
5579
5766
  })]).transform((form) => form !== null);
5580
5767
  const productsSchema = z.object({ products: z.array(z.object({ slug: z.string() })) });
5768
+ const passesSchema = z.object({ passes: countSchema }).transform(({ passes }) => passes);
5769
+ const membershipsSchema = z.object({ memberships: countSchema }).transform(({ memberships }) => memberships);
5581
5770
  /** Both producers pass raw facts through the same stage admission. */
5582
5771
  function readinessFactsFromLoaders(stage, input) {
5583
5772
  const facts = {
5773
+ catalogue: loaderFactProducers.catalogue(input),
5584
5774
  mailingList: loaderFactProducers.mailingList(input),
5585
5775
  testimonials: loaderFactProducers.testimonials(input),
5586
5776
  events: loaderFactProducers.events(input),
@@ -5595,8 +5785,16 @@ function readinessFactsFromLoaders(stage, input) {
5595
5785
  });
5596
5786
  }
5597
5787
  const loaderFactProducers = {
5788
+ catalogue: (input) => {
5789
+ const passes = firstLoaderFact(input, "catalogue", "passes", passesSchema);
5790
+ const memberships = firstLoaderFact(input, "catalogue", "memberships", membershipsSchema);
5791
+ return passes.kind === "Loaded" && memberships.kind === "Loaded" ? loadedReadinessFact({
5792
+ passes: passes.value,
5793
+ memberships: memberships.value
5794
+ }) : unavailableReadinessFact;
5795
+ },
5598
5796
  mailingList: (input) => input.mailingList === void 0 ? unavailableReadinessFact : loadedReadinessFact(input.mailingList),
5599
- testimonials: (input) => mapFact(firstLoaderFact(input, "testimonials", "entries", countSchema), (count) => ({
5797
+ testimonials: (input) => mapReadinessFact(firstLoaderFact(input, "testimonials", "entries", countSchema), (count) => ({
5600
5798
  count,
5601
5799
  total: "unknown"
5602
5800
  })),
@@ -5608,7 +5806,7 @@ const loaderFactProducers = {
5608
5806
  })),
5609
5807
  products: (input) => new Map(projections(input, "products").flatMap(({ id, block }) => {
5610
5808
  const selection = chosenString(block.content.productSlug);
5611
- return selection ? [[selection, mapFact(loaderFact(input, id, "products", productsSchema), ({ products }) => products.some((product) => product.slug === selection))]] : [];
5809
+ return selection ? [[selection, mapReadinessFact(loaderFact(input, id, "products", productsSchema), ({ products }) => products.some((product) => product.slug === selection))]] : [];
5612
5810
  })),
5613
5811
  template: (input) => loadedReadinessFact(input.template)
5614
5812
  };
@@ -5629,9 +5827,6 @@ function loaderFact(input, id, key, schema) {
5629
5827
  const parsed = z.safeParse(schema, prefetched.resolvedData[id]?.[key]);
5630
5828
  return parsed.success ? loadedReadinessFact(parsed.data) : unavailableReadinessFact;
5631
5829
  }
5632
- function mapFact(fact, project) {
5633
- return fact.kind === "Loaded" ? loadedReadinessFact(project(fact.value)) : fact;
5634
- }
5635
5830
  //#endregion
5636
5831
  //#region ../blocks/src/system/runtime/nodes/carousel.shared.ts
5637
5832
  /**
@@ -5814,7 +6009,7 @@ function renderedInlineStyle(style, nodeType) {
5814
6009
  }
5815
6010
  //#endregion
5816
6011
  //#region ../blocks/src/primitives/layout/Section.tsx
5817
- const Section = forwardRef(function Section({ as: Comp = "section", children, background, className = "", style, "data-slot": dataSlot, "data-arrangement": dataArrangement, "data-look": dataLook, "data-surface": dataSurface }, ref) {
6012
+ const Section = forwardRef(function Section({ as: Comp = "section", children, background, className = "", style, "data-slot": dataSlot, "data-arrangement": dataArrangement, "data-look": dataLook, "data-surface": dataSurface, "data-rb-section": geometryHook }, ref) {
5818
6013
  return /* @__PURE__ */ jsx(Comp, {
5819
6014
  ref,
5820
6015
  className: clsx("rb-relative rb-isolate rb-overflow-visible", className),
@@ -5823,6 +6018,7 @@ const Section = forwardRef(function Section({ as: Comp = "section", children, ba
5823
6018
  "data-surface": dataSurface,
5824
6019
  "data-arrangement": dataArrangement,
5825
6020
  "data-look": dataLook,
6021
+ "data-rb-section": geometryHook,
5826
6022
  children
5827
6023
  });
5828
6024
  });
@@ -6110,7 +6306,8 @@ function renderMark(mark, key, child) {
6110
6306
  /**
6111
6307
  * `compact` (event details) is one plain Google Maps text link under the venue;
6112
6308
  * `block` (the map block) leads with a secondary directions button and keeps
6113
- * the same Google Maps text link beside it.
6309
+ * the same Google Maps text link beside it. Look layouts mark the row as the
6310
+ * `actions` slot, so a skin dresses it like every other button row.
6114
6311
  */
6115
6312
  function LocationMapActions(props) {
6116
6313
  const links = locationMapLinks(props);
@@ -6118,6 +6315,7 @@ function LocationMapActions(props) {
6118
6315
  const googleMapsLabel = props.googleMapsLabel ?? "Open in Google Maps";
6119
6316
  if (props.layout === "block") return /* @__PURE__ */ jsxs("div", {
6120
6317
  className: "rb-location-map-actions",
6318
+ "data-slot": props.lookLayout ? "actions" : void 0,
6121
6319
  children: [links.directions ? /* @__PURE__ */ jsx(ThemedButtonLink, {
6122
6320
  href: links.directions,
6123
6321
  target: "_blank",
@@ -6424,6 +6622,7 @@ function LocationMapPlace(props) {
6424
6622
  }) : null,
6425
6623
  props.showDirections ? /* @__PURE__ */ jsx(LocationMapActions, {
6426
6624
  layout: "block",
6625
+ lookLayout: props.lookLayout,
6427
6626
  location: props.location,
6428
6627
  addressText: props.addressText,
6429
6628
  directionsLabel: props.directionsLabel,
@@ -8348,6 +8547,10 @@ function selectRelatedDates(input) {
8348
8547
  const dates = input.events.filter((event) => event.seriesId === input.seriesId).filter((event) => isWholeSeries || isFutureOrNow(event.startsAt, input.nowIso)).filter((event) => !selectedOccurrenceId || (event.occurrenceId || event.id) !== selectedOccurrenceId).sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt));
8349
8548
  return isWholeSeries ? dates : dates.slice(0, input.limit);
8350
8549
  }
8550
+ /** The registration panel's own decision, read from the same scoped dates and clock. */
8551
+ function pageBookedElsewhere(events, occurrenceContext, nowIso) {
8552
+ return decideBookedElsewhereDatesPage(events, occurrenceContext?.id ?? null, new Date(nowIso));
8553
+ }
8351
8554
  function selectEventDetails(args) {
8352
8555
  const all = uniqByOccurrenceId(resolveEventRegistrationScopedEvents((args.events ?? []).filter(Boolean), {
8353
8556
  occurrenceContext: args.occurrenceContext,
@@ -8391,7 +8594,8 @@ function selectEventDetails(args) {
8391
8594
  selected,
8392
8595
  otherDates: otherDates.filter(isOrdinaryEvent),
8393
8596
  timeZone,
8394
- depositOffer: resolvePublicEventDepositOffer(selected, { nowIso: args.nowIso })
8597
+ depositOffer: resolvePublicEventDepositOffer(selected, { nowIso: args.nowIso }),
8598
+ bookedElsewhere: pageBookedElsewhere(all, occurrenceContext, args.nowIso)
8395
8599
  };
8396
8600
  }
8397
8601
  //#endregion
@@ -8447,25 +8651,42 @@ function resolveEventDetailsPresentation(input) {
8447
8651
  };
8448
8652
  }
8449
8653
  //#endregion
8654
+ //#region ../blocks/src/system/runtime/nodes/event-details/detailSlots.ts
8655
+ function resolveDetailSlots(presentation) {
8656
+ return {
8657
+ detail: listLookSlot(presentation, "detail"),
8658
+ label: listLookSlot(presentation, "detail-label"),
8659
+ value: listLookSlot(presentation, "detail-value"),
8660
+ sessions: listLookSlot(presentation, "sessions"),
8661
+ session: listLookSlot(presentation, "session")
8662
+ };
8663
+ }
8664
+ //#endregion
8450
8665
  //#region ../blocks/src/system/runtime/nodes/event-details/WholeSeriesPricingDisplay.tsx
8451
8666
  /** A course lists every active option, whether or not its sale window is open. */
8452
8667
  function wholeSeriesPriceOptions(pricing) {
8453
8668
  return pricing.kind === "tiered" ? pricing.options.filter((option) => option.isActive) : [];
8454
8669
  }
8455
8670
  /** The price, with any deposit option said beside it. */
8456
- function PriceLine({ price, depositNote }) {
8457
- return /* @__PURE__ */ jsxs("p", { children: [/* @__PURE__ */ jsx("strong", { children: price }), depositNote ? `, ${depositNote}` : null] });
8671
+ function PriceLine({ price, depositNote, valueSlot }) {
8672
+ return /* @__PURE__ */ jsxs("p", {
8673
+ ...valueSlot,
8674
+ children: [/* @__PURE__ */ jsx("strong", { children: price }), depositNote ? `, ${depositNote}` : null]
8675
+ });
8458
8676
  }
8459
- function WholeSeriesPricingDisplay({ pricing, depositNote, acceptedItems }) {
8677
+ function WholeSeriesPricingDisplay({ pricing, depositNote, acceptedItems, slots }) {
8460
8678
  const options = wholeSeriesPriceOptions(pricing);
8461
8679
  return /* @__PURE__ */ jsxs("div", {
8680
+ ...slots.detail,
8462
8681
  className: "rb-mt-6",
8463
8682
  children: [
8464
8683
  /* @__PURE__ */ jsx("div", {
8684
+ ...slots.label,
8465
8685
  className: "rb-label rb-mb-2",
8466
8686
  children: options.length > 1 ? "Pricing" : "Cost"
8467
8687
  }),
8468
8688
  options.length > 1 ? /* @__PURE__ */ jsx("div", {
8689
+ ...slots.value,
8469
8690
  className: "rb-flex rb-flex-col rb-gap-2",
8470
8691
  children: options.map((option) => /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs("strong", { children: [
8471
8692
  option.name,
@@ -8478,7 +8699,8 @@ function WholeSeriesPricingDisplay({ pricing, depositNote, acceptedItems }) {
8478
8699
  }) : null] }, option.id))
8479
8700
  }) : /* @__PURE__ */ jsx(PriceLine, {
8480
8701
  price: formatBookingPriceDisplay(publicEventPricingDisplay(pricing), { decimals: "auto" }),
8481
- depositNote
8702
+ depositNote,
8703
+ valueSlot: slots.value
8482
8704
  }),
8483
8705
  depositNote && options.length > 1 ? /* @__PURE__ */ jsxs("p", {
8484
8706
  className: "rb-caption rb-mt-1",
@@ -8525,13 +8747,16 @@ function TicketTypePriceList({ ticketTypes, currency }) {
8525
8747
  }, ticketType.id))
8526
8748
  });
8527
8749
  }
8528
- function EventPricingDetails({ isDropIn, wholeSeriesPricingDisplay, acceptedItems, eventCostLabel, depositNote, eventPricingCurrency, ticketTypes, autoApplyDiscount }) {
8750
+ function EventPricingDetails({ isDropIn, wholeSeriesPricingDisplay, acceptedItems, eventCostLabel, depositNote, eventPricingCurrency, ticketTypes, autoApplyDiscount, slots }) {
8529
8751
  if (isDropIn) return /* @__PURE__ */ jsxs("div", {
8752
+ ...slots.detail,
8530
8753
  className: "rb-mt-6",
8531
8754
  children: [/* @__PURE__ */ jsx("div", {
8755
+ ...slots.label,
8532
8756
  className: "rb-label rb-mb-2",
8533
8757
  children: "Registration"
8534
8758
  }), /* @__PURE__ */ jsx("p", {
8759
+ ...slots.value,
8535
8760
  className: "rb-caption status-muted",
8536
8761
  children: "No registration required - just show up"
8537
8762
  })]
@@ -8539,18 +8764,22 @@ function EventPricingDetails({ isDropIn, wholeSeriesPricingDisplay, acceptedItem
8539
8764
  if (wholeSeriesPricingDisplay) return /* @__PURE__ */ jsx(WholeSeriesPricingDisplay, {
8540
8765
  pricing: wholeSeriesPricingDisplay,
8541
8766
  depositNote,
8542
- acceptedItems: [...acceptedItems]
8767
+ acceptedItems: [...acceptedItems],
8768
+ slots
8543
8769
  });
8544
8770
  if (eventCostLabel) return /* @__PURE__ */ jsxs("div", {
8771
+ ...slots.detail,
8545
8772
  className: "rb-mt-6",
8546
8773
  children: [
8547
8774
  /* @__PURE__ */ jsx("div", {
8775
+ ...slots.label,
8548
8776
  className: "rb-label rb-mb-2",
8549
8777
  children: "Cost"
8550
8778
  }),
8551
8779
  /* @__PURE__ */ jsx(PriceLine, {
8552
8780
  price: eventCostLabel,
8553
- depositNote
8781
+ depositNote,
8782
+ valueSlot: slots.value
8554
8783
  }),
8555
8784
  autoApplyDiscount && eventPricingCurrency ? /* @__PURE__ */ jsx("p", {
8556
8785
  className: "rb-caption rb-mt-1",
@@ -8567,14 +8796,16 @@ function EventPricingDetails({ isDropIn, wholeSeriesPricingDisplay, acceptedItem
8567
8796
  ]
8568
8797
  });
8569
8798
  return acceptedItems.length > 0 ? /* @__PURE__ */ jsx("div", {
8799
+ ...slots.detail,
8570
8800
  className: "rb-mt-6",
8571
8801
  children: /* @__PURE__ */ jsxs("p", {
8802
+ ...slots.value,
8572
8803
  className: "rb-caption",
8573
8804
  children: ["You can also attend with: ", acceptedItems.join(", ")]
8574
8805
  })
8575
8806
  }) : null;
8576
8807
  }
8577
- function EventFacts({ selection, selected, venue, online, addressAfterBooking, teamMembers, pricing, showCapacity, lookSlots }) {
8808
+ function EventFacts({ selection, selected, venue, online, addressAfterBooking, teamMembers, pricing, showCapacity, lookSlots, slots }) {
8578
8809
  const { date, timeRange } = formatEventDateParts({
8579
8810
  startsAt: selected.startsAt,
8580
8811
  endsAt: selected.endsAt,
@@ -8585,34 +8816,51 @@ function EventFacts({ selection, selected, venue, online, addressAfterBooking, t
8585
8816
  ...listLookSlot({ lookSlots }, "facts"),
8586
8817
  className: "rb-flex rb-flex-col rb-gap-4",
8587
8818
  children: [
8588
- /* @__PURE__ */ jsxs("div", { children: [
8589
- /* @__PURE__ */ jsx("div", {
8590
- className: "rb-label rb-mb-2",
8591
- children: dateHeading
8592
- }),
8593
- /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: date }) }),
8594
- /* @__PURE__ */ jsx("p", {
8595
- className: "rb-caption",
8596
- children: timeRange
8597
- })
8598
- ] }),
8819
+ /* @__PURE__ */ jsxs("div", {
8820
+ ...slots.detail,
8821
+ children: [
8822
+ /* @__PURE__ */ jsx("div", {
8823
+ ...slots.label,
8824
+ className: "rb-label rb-mb-2",
8825
+ children: dateHeading
8826
+ }),
8827
+ /* @__PURE__ */ jsx("p", {
8828
+ ...slots.value,
8829
+ children: /* @__PURE__ */ jsx("strong", { children: date })
8830
+ }),
8831
+ /* @__PURE__ */ jsx("p", {
8832
+ className: "rb-caption",
8833
+ children: timeRange
8834
+ })
8835
+ ]
8836
+ }),
8599
8837
  /* @__PURE__ */ jsx(EventVenueFact, {
8600
8838
  venue,
8601
8839
  online,
8602
- addressAfterBooking
8840
+ addressAfterBooking,
8841
+ slots
8842
+ }),
8843
+ /* @__PURE__ */ jsx(EventTeacherFacts, {
8844
+ teamMembers,
8845
+ slots
8603
8846
  }),
8604
- /* @__PURE__ */ jsx(EventTeacherFacts, { teamMembers }),
8605
8847
  showCapacity && selected.capacity != null ? /* @__PURE__ */ jsxs("div", {
8848
+ ...slots.detail,
8606
8849
  className: "rb-mt-6",
8607
8850
  children: [/* @__PURE__ */ jsx("div", {
8851
+ ...slots.label,
8608
8852
  className: "rb-label rb-mb-2",
8609
8853
  children: "Places"
8610
- }), /* @__PURE__ */ jsx("p", { children: formatEventRemainingPlaces(selected) ?? formatTotalCapacity(selected.capacity) })]
8854
+ }), /* @__PURE__ */ jsx("p", {
8855
+ ...slots.value,
8856
+ children: formatEventRemainingPlaces(selected) ?? formatTotalCapacity(selected.capacity)
8857
+ })]
8611
8858
  }) : null,
8612
8859
  pricing,
8613
8860
  selection.kind === "wholeSeries" ? /* @__PURE__ */ jsx(BookingState, {
8614
8861
  phase: selection.bookingPhase,
8615
- event: selected
8862
+ event: selected,
8863
+ slots
8616
8864
  }) : null
8617
8865
  ]
8618
8866
  });
@@ -8621,23 +8869,33 @@ const eventOnlinePlaceShown = (event, showVenue) => showVenue ? eventOnlinePlace
8621
8869
  const hasEventPlaceFact = (event, showVenue) => showVenue && (Boolean(event.venue) || eventOnlinePlace(event) !== null || event.addressAfterBooking === true);
8622
8870
  const addressAfterBookingShown = (event, showVenue) => showVenue && event.addressAfterBooking === true;
8623
8871
  /** Where a venue would go: online, the owner's word that the address follows the booking, or nothing at all. */
8624
- function EventPlaceWithoutVenue({ online, addressAfterBooking }) {
8872
+ function EventPlaceWithoutVenue({ online, addressAfterBooking, slots }) {
8625
8873
  if (!online && !addressAfterBooking) return null;
8626
8874
  if (!online) return /* @__PURE__ */ jsxs("div", {
8875
+ ...slots.detail,
8627
8876
  className: "rb-mt-6",
8628
8877
  children: [/* @__PURE__ */ jsx("div", {
8878
+ ...slots.label,
8629
8879
  className: "rb-label rb-mb-2",
8630
8880
  children: "Venue"
8631
- }), /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: EVENT_ADDRESS_AFTER_BOOKING_LABEL }) })]
8881
+ }), /* @__PURE__ */ jsx("p", {
8882
+ ...slots.value,
8883
+ children: /* @__PURE__ */ jsx("strong", { children: EVENT_ADDRESS_AFTER_BOOKING_LABEL })
8884
+ })]
8632
8885
  });
8633
8886
  return /* @__PURE__ */ jsxs("div", {
8887
+ ...slots.detail,
8634
8888
  className: "rb-mt-6",
8635
8889
  children: [
8636
8890
  /* @__PURE__ */ jsx("div", {
8891
+ ...slots.label,
8637
8892
  className: "rb-label rb-mb-2",
8638
8893
  children: "Venue"
8639
8894
  }),
8640
- /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: online.mode === "online" ? "Online" : "In person or online" }) }),
8895
+ /* @__PURE__ */ jsx("p", {
8896
+ ...slots.value,
8897
+ children: /* @__PURE__ */ jsx("strong", { children: online.mode === "online" ? "Online" : "In person or online" })
8898
+ }),
8641
8899
  addressAfterBooking ? /* @__PURE__ */ jsxs("p", {
8642
8900
  className: "rb-caption",
8643
8901
  children: [EVENT_ADDRESS_AFTER_BOOKING_LABEL, "."]
@@ -8650,20 +8908,26 @@ function EventPlaceWithoutVenue({ online, addressAfterBooking }) {
8650
8908
  });
8651
8909
  }
8652
8910
  /** An online event says so where a venue would go; a hybrid one adds it under the venue. */
8653
- function EventVenueFact({ venue, online, addressAfterBooking }) {
8911
+ function EventVenueFact({ venue, online, addressAfterBooking, slots }) {
8654
8912
  if (!venue) return /* @__PURE__ */ jsx(EventPlaceWithoutVenue, {
8655
8913
  online,
8656
- addressAfterBooking
8914
+ addressAfterBooking,
8915
+ slots
8657
8916
  });
8658
8917
  const { place, addressWithBooking } = eventVenuePlace(venue);
8659
8918
  return /* @__PURE__ */ jsxs("div", {
8919
+ ...slots.detail,
8660
8920
  className: "rb-mt-6",
8661
8921
  children: [
8662
8922
  /* @__PURE__ */ jsx("div", {
8923
+ ...slots.label,
8663
8924
  className: "rb-label rb-mb-2",
8664
8925
  children: "Venue"
8665
8926
  }),
8666
- /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: venue.name }) }),
8927
+ /* @__PURE__ */ jsx("p", {
8928
+ ...slots.value,
8929
+ children: /* @__PURE__ */ jsx("strong", { children: venue.name })
8930
+ }),
8667
8931
  place ? /* @__PURE__ */ jsx("p", {
8668
8932
  className: "rb-caption",
8669
8933
  children: place
@@ -8682,13 +8946,16 @@ function EventVenueFact({ venue, online, addressAfterBooking }) {
8682
8946
  ]
8683
8947
  });
8684
8948
  }
8685
- function EventTeacherFacts({ teamMembers }) {
8949
+ function EventTeacherFacts({ teamMembers, slots }) {
8686
8950
  return teamMembers.length ? /* @__PURE__ */ jsxs("div", {
8951
+ ...slots.detail,
8687
8952
  className: "rb-mt-6",
8688
8953
  children: [/* @__PURE__ */ jsx("div", {
8954
+ ...slots.label,
8689
8955
  className: "rb-label rb-mb-2",
8690
8956
  children: "With"
8691
8957
  }), /* @__PURE__ */ jsx("div", {
8958
+ ...slots.value,
8692
8959
  className: "rb-flex rb-flex-col rb-gap-3",
8693
8960
  children: teamMembers.map((member) => /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx(TeamMemberName, {
8694
8961
  name: member.name,
@@ -8722,15 +8989,20 @@ function runLifecycleLabel(lifecycle) {
8722
8989
  * the booking panel beside it says cancelled is the contradiction a visitor
8723
8990
  * actually notices.
8724
8991
  */
8725
- function BookingState({ phase, event }) {
8992
+ function BookingState({ phase, event, slots }) {
8726
8993
  return /* @__PURE__ */ jsxs("div", {
8994
+ ...slots.detail,
8727
8995
  className: "rb-mt-6",
8728
8996
  children: [
8729
8997
  /* @__PURE__ */ jsx("div", {
8998
+ ...slots.label,
8730
8999
  className: "rb-label rb-mb-2",
8731
9000
  children: "Booking"
8732
9001
  }),
8733
- /* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: phase.kind === "closed" ? "Closed" : isEventFull(event) ? formatEventRemainingPlaces(event) : "Open" }) }),
9002
+ /* @__PURE__ */ jsx("p", {
9003
+ ...slots.value,
9004
+ children: /* @__PURE__ */ jsx("strong", { children: phase.kind === "closed" ? "Closed" : isEventFull(event) ? formatEventRemainingPlaces(event) : "Open" })
9005
+ }),
8734
9006
  phase.kind === "closed" ? /* @__PURE__ */ jsx("p", {
8735
9007
  className: "rb-caption",
8736
9008
  children: bookingClosedReason(phase.reason)
@@ -8756,16 +9028,19 @@ function bookingClosedReason(reason) {
8756
9028
  * the list and says so: dropping it would leave a visitor wondering whether
8757
9029
  * they had misremembered the dates.
8758
9030
  */
8759
- function SessionSchedule({ sessions, event }) {
9031
+ function SessionSchedule({ sessions, event, slots }) {
8760
9032
  if (sessions.length === 0) return null;
8761
9033
  return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", {
9034
+ ...slots.label,
8762
9035
  className: "rb-label",
8763
9036
  children: "Session schedule"
8764
9037
  }), /* @__PURE__ */ jsx("div", {
9038
+ ...slots.sessions,
8765
9039
  className: "rb-mt-2 rb-tiles-grid",
8766
9040
  children: sessions.map((session) => {
8767
9041
  const cancelled = session.status === CANCELLED_SESSION_STATUS;
8768
9042
  return /* @__PURE__ */ jsxs("div", {
9043
+ ...slots.session,
8769
9044
  className: `rb-tile${cancelled ? " rb-tile--cancelled" : ""}`,
8770
9045
  children: [/* @__PURE__ */ jsx(DateTimeTile, {
8771
9046
  startsAt: session.startsAt,
@@ -8782,22 +9057,26 @@ function SessionSchedule({ sessions, event }) {
8782
9057
  })
8783
9058
  })] });
8784
9059
  }
8785
- function OtherEventDates({ selection }) {
9060
+ function OtherEventDates({ selection, slots }) {
8786
9061
  if (selection.kind === "empty") return null;
8787
9062
  if (selection.kind === "wholeSeries") return /* @__PURE__ */ jsx(SessionSchedule, {
8788
9063
  sessions: selection.sessions,
8789
- event: selection.selected
9064
+ event: selection.selected,
9065
+ slots
8790
9066
  });
8791
9067
  const dates = selection.otherDates;
8792
9068
  if (dates.length === 0) return null;
8793
9069
  return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", {
9070
+ ...slots.label,
8794
9071
  className: "rb-label",
8795
9072
  children: "Other dates"
8796
9073
  }), /* @__PURE__ */ jsx("div", {
9074
+ ...slots.sessions,
8797
9075
  className: "rb-mt-2 rb-tiles-grid",
8798
9076
  children: dates.map((event) => /* @__PURE__ */ jsx("a", {
9077
+ ...slots.session,
8799
9078
  className: "rb-tile rb-tile--interactive",
8800
- ...resolveEventLinkProps(event),
9079
+ ...resolveEventPageLink(event),
8801
9080
  children: /* @__PURE__ */ jsx(DateTimeTile, {
8802
9081
  startsAt: event.startsAt,
8803
9082
  endsAt: event.endsAt,
@@ -8832,7 +9111,7 @@ function EventVenueMap({ venue, drawing, showMap, mapHeight, mapClassName }) {
8832
9111
  /** One pricing projection governs the selected panel, including drop-in and whole-series behavior. */
8833
9112
  function selectedEventPricing(selection, showCost) {
8834
9113
  const event = selection.selected;
8835
- const isDropIn = isDropInEvent(event);
9114
+ const isDropIn = isDropInPublicEvent(event);
8836
9115
  const wholeSeriesPricing = wholeSeriesPricingOf(event);
8837
9116
  const showEventCost = showCost && !isDropIn && wholeSeriesPricing === null;
8838
9117
  return {
@@ -8844,7 +9123,6 @@ function selectedEventPricing(selection, showCost) {
8844
9123
  ticketTypes: showEventCost && isPaid(event) ? getDisplayablePricingOptions(event) : []
8845
9124
  };
8846
9125
  }
8847
- const isDropInEvent = (event) => event.bookingScope === "single_occurrence" && event.requiresRegistration === false;
8848
9126
  const wholeSeriesPricingOf = (event) => event.bookingScope === "whole_series" && event.pricing.kind !== "external" ? event.pricing : null;
8849
9127
  const isPaid = (event) => publicEventPricingType(event.pricing) !== "free";
8850
9128
  function SelectedEventDetailsView(props) {
@@ -8867,6 +9145,7 @@ function SelectedEventDetailsView(props) {
8867
9145
  className: "rb-grid rb-grid-cols-1 rb-gap-6 rb-items-start rb-sm-grid-cols-2",
8868
9146
  children: [/* @__PURE__ */ jsx(EventFacts, {
8869
9147
  lookSlots: props.lookSlots,
9148
+ slots: props.slots,
8870
9149
  selection,
8871
9150
  selected,
8872
9151
  venue,
@@ -8877,7 +9156,8 @@ function SelectedEventDetailsView(props) {
8877
9156
  pricing: /* @__PURE__ */ jsx(EventPricingDetails, {
8878
9157
  ...pricing,
8879
9158
  acceptedItems,
8880
- autoApplyDiscount: props.autoApplyDiscount ?? null
9159
+ autoApplyDiscount: props.autoApplyDiscount ?? null,
9160
+ slots: props.slots
8881
9161
  })
8882
9162
  }), /* @__PURE__ */ jsx(EventVenueMap, {
8883
9163
  venue,
@@ -8887,7 +9167,10 @@ function SelectedEventDetailsView(props) {
8887
9167
  drawing: props.selectedVenueDrawing
8888
9168
  })]
8889
9169
  }),
8890
- showOtherDates ? /* @__PURE__ */ jsx(OtherEventDates, { selection }) : null
9170
+ showOtherDates ? /* @__PURE__ */ jsx(OtherEventDates, {
9171
+ selection,
9172
+ slots: props.slots
9173
+ }) : null
8891
9174
  ]
8892
9175
  });
8893
9176
  }
@@ -8898,6 +9181,7 @@ function LegacyEventDetailsView(props) {
8898
9181
  });
8899
9182
  return /* @__PURE__ */ jsx(SelectedEventDetailsView, {
8900
9183
  lookSlots: props.lookSlots,
9184
+ slots: resolveDetailSlots(props),
8901
9185
  selection: props.selection,
8902
9186
  showVenue: props.showVenue,
8903
9187
  showMap: props.showMap,
@@ -8947,34 +9231,48 @@ function EventDetailsView(input) {
8947
9231
  function EventHeaderPanel(props) {
8948
9232
  const content = headerPanelContent(props);
8949
9233
  if (!content.hasFacts && !content.hasMap && !content.hasDates) return null;
9234
+ const slots = resolveDetailSlots(props);
8950
9235
  return /* @__PURE__ */ jsx("div", {
8951
9236
  ...listLookSlot(props, "panel"),
8952
9237
  children: /* @__PURE__ */ jsxs("div", {
8953
9238
  className: "rb-flex rb-flex-col rb-gap-6 rb-text-left",
8954
9239
  children: [content.hasFacts || content.hasMap ? /* @__PURE__ */ jsxs("div", {
8955
9240
  className: "rb-grid rb-grid-cols-1 rb-gap-6 rb-items-start rb-sm-grid-cols-2",
8956
- children: [content.hasFacts ? /* @__PURE__ */ jsx(HeaderPanelFacts, { ...content }) : null, /* @__PURE__ */ jsx(EventVenueMap, {
9241
+ children: [content.hasFacts ? /* @__PURE__ */ jsx(HeaderPanelFacts, {
9242
+ ...content,
9243
+ slots
9244
+ }) : null, /* @__PURE__ */ jsx(EventVenueMap, {
8957
9245
  venue: content.venue,
8958
9246
  showMap: props.showMap,
8959
9247
  drawing: props.selectedVenueDrawing,
8960
9248
  mapHeight: props.mapHeight ?? 200,
8961
9249
  mapClassName: props.mapClassName ?? "event-details-map"
8962
9250
  })]
8963
- }) : null, content.hasDates ? /* @__PURE__ */ jsx(OtherEventDates, { selection: props.selection }) : null]
9251
+ }) : null, content.hasDates ? /* @__PURE__ */ jsx(OtherEventDates, {
9252
+ selection: props.selection,
9253
+ slots
9254
+ }) : null]
8964
9255
  })
8965
9256
  });
8966
9257
  }
8967
- function HeaderPanelFacts({ venue, online, addressAfterBooking, teamMembers, pricing }) {
9258
+ function HeaderPanelFacts({ venue, online, addressAfterBooking, teamMembers, pricing, slots }) {
8968
9259
  return /* @__PURE__ */ jsxs("div", {
8969
9260
  className: "rb-flex rb-flex-col rb-gap-4",
8970
9261
  children: [
8971
9262
  /* @__PURE__ */ jsx(EventVenueFact, {
8972
9263
  venue,
8973
9264
  online,
8974
- addressAfterBooking
9265
+ addressAfterBooking,
9266
+ slots
9267
+ }),
9268
+ /* @__PURE__ */ jsx(EventTeacherFacts, {
9269
+ teamMembers,
9270
+ slots
8975
9271
  }),
8976
- /* @__PURE__ */ jsx(EventTeacherFacts, { teamMembers }),
8977
- pricing ? /* @__PURE__ */ jsx(EventPricingDetails, { ...pricing }) : null
9272
+ pricing ? /* @__PURE__ */ jsx(EventPricingDetails, {
9273
+ ...pricing,
9274
+ slots
9275
+ }) : null
8978
9276
  ]
8979
9277
  });
8980
9278
  }
@@ -9297,7 +9595,7 @@ function runDataFromMaybeArray(events) {
9297
9595
  items: [...groupPublicEventsByRun(events)].map((run) => ({
9298
9596
  kind: "run",
9299
9597
  run,
9300
- path: run.representative.destination.kind === "native" ? run.representative.destination.path : null
9598
+ path: eventDestinationPagePath(run.representative.destination)
9301
9599
  }))
9302
9600
  };
9303
9601
  }
@@ -10233,8 +10531,8 @@ function buildSlotCtaLabel(ctaText, slot) {
10233
10531
  }
10234
10532
  function WeeklySlotAvailabilityView({ availability, loading = false, error, emptyMessage, ctaText, ctaUrl }) {
10235
10533
  const slots = availability?.slots ?? [];
10236
- const resolvedEmptyMessage = emptyMessage ?? "No regular weekly openings are currently available.";
10237
- const resolvedCtaText = ctaText ?? "Enquire about this slot";
10534
+ const resolvedEmptyMessage = emptyMessage?.trim() || "No regular weekly openings are currently available.";
10535
+ const resolvedCtaText = ctaText?.trim() || "Enquire about this slot";
10238
10536
  const resolvedCtaUrl = typeof ctaUrl === "string" ? ctaUrl.trim() : "";
10239
10537
  return /* @__PURE__ */ jsxs("div", {
10240
10538
  className: "weekly-slot-availability",
@@ -10303,15 +10601,8 @@ function WeeklySlotAvailabilitySSR(props) {
10303
10601
  }
10304
10602
  //#endregion
10305
10603
  //#region ../blocks/src/system/runtime/nodes/events/RecurringSchedule.tsx
10306
- function destinationHref(destination) {
10307
- return destination.kind === "external" ? destination.url : destination.path;
10308
- }
10309
10604
  function bookingLinkProps(booking) {
10310
- return booking.destination.kind === "external" ? {
10311
- href: destinationHref(booking.destination),
10312
- target: "_blank",
10313
- rel: "noopener noreferrer"
10314
- } : { href: destinationHref(booking.destination) };
10605
+ return eventDestinationBookingLink(booking.destination);
10315
10606
  }
10316
10607
  function bookingActionContent(input) {
10317
10608
  switch (input.booking.kind) {
@@ -10405,6 +10696,11 @@ function RecurringScheduleRow({ item, locale, buttonText, buttonVariant, showVen
10405
10696
  });
10406
10697
  }
10407
10698
  //#endregion
10699
+ //#region ../blocks/src/system/runtime/editorParts.ts
10700
+ const unmarked = {};
10701
+ /** Visitors' pages, and any renderer the editor doesn't drive. */
10702
+ const noEditorParts = () => unmarked;
10703
+ //#endregion
10408
10704
  //#region ../blocks/src/system/runtime/nodes/commerce/shared/view.tsx
10409
10705
  function VariantSelectView(props) {
10410
10706
  const { options, selectedVariantId, disabled = false, onChange } = props;
@@ -10653,9 +10949,10 @@ function MembershipCardView(props) {
10653
10949
  });
10654
10950
  }
10655
10951
  function PassesMembershipsSectionView(props) {
10656
- const { display, beforeContent, passCards, membershipCards } = props;
10952
+ const { display, beforeContent, passCards, membershipCards, part = noEditorParts } = props;
10657
10953
  if (props.presentation?.lookSlots) return /* @__PURE__ */ jsx(ShopCardListSections, {
10658
10954
  ...props,
10955
+ part,
10659
10956
  presentation: props.presentation
10660
10957
  });
10661
10958
  const productsClass = `shop__products shop__products--${display.layout}`;
@@ -10675,6 +10972,7 @@ function PassesMembershipsSectionView(props) {
10675
10972
  className: "shop__section shop__section--passes",
10676
10973
  children: [/* @__PURE__ */ jsx("h3", {
10677
10974
  className: "shop__section-heading",
10975
+ ...part("passesHeading"),
10678
10976
  children: display.passesHeading
10679
10977
  }), /* @__PURE__ */ jsx("div", {
10680
10978
  className: productsClass,
@@ -10685,6 +10983,7 @@ function PassesMembershipsSectionView(props) {
10685
10983
  className: "shop__section shop__section--memberships",
10686
10984
  children: [/* @__PURE__ */ jsx("h3", {
10687
10985
  className: "shop__section-heading",
10986
+ ...part("membershipsHeading"),
10688
10987
  children: display.membershipsHeading
10689
10988
  }), /* @__PURE__ */ jsx("div", {
10690
10989
  className: productsClass,
@@ -10752,13 +11051,15 @@ function CheckoutShellView(props) {
10752
11051
  });
10753
11052
  }
10754
11053
  function ShopCardListSections(props) {
10755
- const { display, presentation } = props;
11054
+ const { display, presentation, part } = props;
10756
11055
  const groups = [{
10757
11056
  heading: display.passesHeading,
11057
+ headingPart: part("passesHeading"),
10758
11058
  items: display.passes,
10759
11059
  cards: props.passCards
10760
11060
  }, {
10761
11061
  heading: display.membershipsHeading,
11062
+ headingPart: part("membershipsHeading"),
10762
11063
  items: display.memberships,
10763
11064
  cards: props.membershipCards
10764
11065
  }];
@@ -10773,6 +11074,7 @@ function ShopCardListSections(props) {
10773
11074
  ...listLookSlot(presentation, "group"),
10774
11075
  children: [/* @__PURE__ */ jsx("h3", {
10775
11076
  ...listLookSlot(presentation, "group-label"),
11077
+ ...group.headingPart,
10776
11078
  children: group.heading
10777
11079
  }), /* @__PURE__ */ jsx(ShopCardListCollection, {
10778
11080
  presentation,
@@ -10799,14 +11101,18 @@ function ShopCardListCollection(props) {
10799
11101
  }))
10800
11102
  });
10801
11103
  }
10802
- function ShopPurchaseAction({ presentation, ...props }) {
10803
- if (presentation?.itemActionStyle !== "link") return /* @__PURE__ */ jsx(ThemedButton, { ...props });
11104
+ function ShopPurchaseAction({ presentation, editorPart, ...props }) {
11105
+ if (presentation?.itemActionStyle !== "link") return /* @__PURE__ */ jsx(ThemedButton, {
11106
+ ...props,
11107
+ ...editorPart
11108
+ });
10804
11109
  return /* @__PURE__ */ jsx("button", {
10805
11110
  type: "button",
10806
11111
  className: "rb-item-text-link",
10807
11112
  onClick: props.onClick,
10808
11113
  disabled: props.disabled,
10809
11114
  "aria-disabled": props["aria-disabled"],
11115
+ ...editorPart,
10810
11116
  children: props.label
10811
11117
  });
10812
11118
  }
@@ -10931,75 +11237,69 @@ const CUSTOM_GIFT_AMOUNT = "custom";
10931
11237
  function giftingSlot(look, slot) {
10932
11238
  return listLookSlot(look ?? {}, slot);
10933
11239
  }
10934
- /** The word above the heading: only one kind on offer names it here, two kinds label their own groups. */
10935
- function giftingEyebrow(offers, headings) {
10936
- const giftCards = offers?.giftCards.length ?? 0;
10937
- const vouchers = offers?.vouchers.length ?? 0;
10938
- if (giftCards > 0 && vouchers === 0) return headings.giftCards;
10939
- if (vouchers > 0 && giftCards === 0) return headings.vouchers;
10940
- return null;
10941
- }
10942
11240
  function GiftingPanelHead(props) {
10943
11241
  const { look } = props;
10944
11242
  return /* @__PURE__ */ jsxs("div", {
10945
11243
  className: "gifting-panel-head",
10946
11244
  ...giftingSlot(look, "head"),
10947
- children: [
10948
- props.eyebrow ? /* @__PURE__ */ jsx("span", {
10949
- className: "gifting-eyebrow",
10950
- ...giftingSlot(look, "eyebrow"),
10951
- children: props.eyebrow
10952
- }) : null,
10953
- /* @__PURE__ */ jsx("h2", {
10954
- className: "gifting-heading",
10955
- ...giftingSlot(look, "heading"),
10956
- children: props.heading
10957
- }),
10958
- props.intro ? /* @__PURE__ */ jsx("p", {
10959
- className: "gifting-intro",
10960
- ...giftingSlot(look, "intro"),
10961
- children: props.intro
10962
- }) : null
10963
- ]
11245
+ children: [/* @__PURE__ */ jsx("h2", {
11246
+ className: "gifting-heading",
11247
+ ...giftingSlot(look, "heading"),
11248
+ children: props.heading
11249
+ }), props.intro ? /* @__PURE__ */ jsx("p", {
11250
+ className: "gifting-intro",
11251
+ ...giftingSlot(look, "intro"),
11252
+ children: props.intro
11253
+ }) : null]
10964
11254
  });
10965
11255
  }
10966
11256
  /** Amount buttons are radios, so they keep working from the keyboard and post with the form. */
10967
11257
  function GiftCardAmounts(props) {
10968
11258
  const { offer, currency, disabled, onChoose } = props;
10969
- const denominations = offer.giftCard.fixedDenominations;
10970
- const checkedChoice = props.initialChoice ?? firstGiftAmountChoice(offer);
10971
- const chip = (value, label) => /* @__PURE__ */ jsxs("label", {
10972
- className: "gifting-amount",
10973
- children: [/* @__PURE__ */ jsx("input", {
10974
- type: "radio",
10975
- name: props.groupName ?? "amountChoice",
10976
- value,
10977
- required: true,
10978
- disabled,
10979
- defaultChecked: value === checkedChoice,
10980
- onChange: onChoose ? () => onChoose(value) : void 0
10981
- }), /* @__PURE__ */ jsx("span", {
10982
- ...giftingSlot(props.look, "chip"),
10983
- children: label
10984
- })]
10985
- }, value);
10986
- return /* @__PURE__ */ jsxs("fieldset", {
11259
+ const options = [...offer.giftCard.fixedDenominations.map((amount) => ({
11260
+ value: String(amount),
11261
+ label: formatGiftAmount(amount, currency)
11262
+ })), ...offer.giftCard.customAmountEnabled ? [{
11263
+ value: CUSTOM_GIFT_AMOUNT,
11264
+ label: "Another amount"
11265
+ }] : []];
11266
+ return /* @__PURE__ */ jsx(ChoiceGroup, {
10987
11267
  className: "gifting-amounts",
10988
- ...giftingSlot(props.look, "chips"),
10989
- children: [
10990
- /* @__PURE__ */ jsx("legend", {
10991
- className: "gifting-visually-hidden",
10992
- children: "Amount"
10993
- }),
10994
- denominations.map((amount) => chip(String(amount), formatCurrencyAmount(amount, currency))),
10995
- offer.giftCard.customAmountEnabled ? chip(CUSTOM_GIFT_AMOUNT, "Another amount") : null
10996
- ]
11268
+ name: props.groupName ?? "amountChoice",
11269
+ legend: "Amount",
11270
+ legendHidden: true,
11271
+ options,
11272
+ defaultValue: props.initialChoice ?? firstGiftAmountChoice(offer),
11273
+ disabled,
11274
+ required: true,
11275
+ onChange: onChoose
10997
11276
  });
10998
11277
  }
10999
11278
  function firstGiftAmountChoice(offer) {
11000
11279
  const first = offer.giftCard.fixedDenominations[0];
11001
11280
  return first === void 0 ? CUSTOM_GIFT_AMOUNT : String(first);
11002
11281
  }
11282
+ function formatGiftAmount(amount, currency) {
11283
+ return formatCurrencyAmount(amount, currency, { decimals: "auto" });
11284
+ }
11285
+ /** Shared by first paint and the island; the resolved group carries all its copy. */
11286
+ function GiftGroup(props) {
11287
+ return /* @__PURE__ */ jsxs("div", {
11288
+ className: "gifting-group",
11289
+ "data-gift-kind": props.group.kind,
11290
+ ...giftingSlot(props.look, "panel"),
11291
+ children: [/* @__PURE__ */ jsxs("div", {
11292
+ className: "gifting-group-head",
11293
+ children: [/* @__PURE__ */ jsx("h3", {
11294
+ className: "gifting-group-title",
11295
+ children: props.group.heading
11296
+ }), /* @__PURE__ */ jsx("p", {
11297
+ className: "gifting-group-line",
11298
+ children: props.group.line
11299
+ })]
11300
+ }), props.children]
11301
+ });
11302
+ }
11003
11303
  //#endregion
11004
11304
  //#region ../blocks/src/system/runtime/nodes/gifting.server.tsx
11005
11305
  /** What shows until the island takes over: the same panel, with the details form still closed. */
@@ -11010,10 +11310,6 @@ function GiftingSSR({ blockId, ...rest }) {
11010
11310
  const giftCards = offers?.giftCards ?? [];
11011
11311
  const vouchers = offers?.vouchers ?? [];
11012
11312
  const hasOffers = giftCards.length > 0 || vouchers.length > 0;
11013
- const eyebrow = giftingEyebrow(offers, {
11014
- giftCards: display.giftCardsHeading,
11015
- vouchers: display.vouchersHeading
11016
- });
11017
11313
  return /* @__PURE__ */ jsx(IslandRoot, {
11018
11314
  kind: "gifting",
11019
11315
  id: blockId,
@@ -11024,69 +11320,88 @@ function GiftingSSR({ blockId, ...rest }) {
11024
11320
  },
11025
11321
  value: islandProps,
11026
11322
  children: /* @__PURE__ */ jsxs("div", {
11027
- className: "gifting-panel",
11028
- ...giftingSlot(display, "panel"),
11323
+ className: "gifting",
11324
+ ...display.lookSlots ? { "data-slot": "layout" } : {},
11029
11325
  children: [/* @__PURE__ */ jsx(GiftingPanelHead, {
11030
- eyebrow,
11031
11326
  heading: display.heading,
11032
11327
  intro: display.intro,
11033
11328
  look: display
11034
- }), hasOffers ? /* @__PURE__ */ jsxs("div", {
11035
- className: "gifting-panel-offers",
11036
- children: [giftCards.map((offer) => /* @__PURE__ */ jsxs("div", {
11037
- className: "gifting-offer",
11038
- "data-gift-offer": offer.id,
11039
- children: [
11040
- giftCards.length > 1 ? /* @__PURE__ */ jsx("h3", {
11041
- className: "gifting-offer-title",
11042
- children: offer.title
11043
- }) : null,
11044
- offer.description ? /* @__PURE__ */ jsx("p", {
11045
- className: "gifting-offer-description",
11046
- children: offer.description
11047
- }) : null,
11048
- /* @__PURE__ */ jsxs("div", {
11049
- className: "gifting-offer-row",
11050
- "data-gift-offer-row": "",
11051
- children: [/* @__PURE__ */ jsx(GiftCardAmounts, {
11052
- offer,
11053
- currency: offers?.currency ?? "GBP",
11054
- groupName: `amountChoice-${offer.id}`,
11055
- look: display
11056
- }), /* @__PURE__ */ jsx(ThemedButton, {
11057
- ...giftingSlot(display, "action"),
11058
- type: "button",
11059
- variant: "primary",
11060
- size: "md",
11061
- extraClassName: "gifting-buy",
11062
- label: "Buy a gift card"
11063
- })]
11064
- })
11065
- ]
11066
- }, offer.id)), vouchers.map((offer) => /* @__PURE__ */ jsxs("div", {
11067
- className: "gifting-offer",
11068
- children: [
11069
- /* @__PURE__ */ jsx("h3", {
11070
- className: "gifting-offer-title",
11071
- children: offer.title
11072
- }),
11073
- offer.description ? /* @__PURE__ */ jsx("p", {
11074
- className: "gifting-offer-description",
11075
- children: offer.description
11076
- }) : null,
11077
- /* @__PURE__ */ jsx(ThemedButton, {
11078
- ...giftingSlot(display, "action"),
11079
- type: "button",
11080
- variant: "primary",
11081
- size: "md",
11082
- extraClassName: "gifting-buy",
11083
- label: "Buy this voucher"
11329
+ }), /* @__PURE__ */ jsx("div", {
11330
+ className: "gifting-main",
11331
+ children: hasOffers ? /* @__PURE__ */ jsx("div", {
11332
+ className: "gifting-groups",
11333
+ "data-group-count": display.groups.length,
11334
+ children: display.groups.map((group) => /* @__PURE__ */ jsx(GiftGroup, {
11335
+ group,
11336
+ look: display,
11337
+ children: group.kind === "gift_card" ? /* @__PURE__ */ jsx(Fragment, { children: giftCards.map((offer) => /* @__PURE__ */ jsxs("div", {
11338
+ className: "gifting-offer",
11339
+ "data-gift-offer": offer.id,
11340
+ children: [
11341
+ giftCards.length > 1 ? /* @__PURE__ */ jsx("h4", {
11342
+ className: "gifting-offer-title",
11343
+ children: offer.title
11344
+ }) : null,
11345
+ offer.description ? /* @__PURE__ */ jsx("p", {
11346
+ className: "gifting-offer-description",
11347
+ children: offer.description
11348
+ }) : null,
11349
+ /* @__PURE__ */ jsxs("div", {
11350
+ className: "gifting-offer-row",
11351
+ "data-gift-offer-row": "",
11352
+ children: [/* @__PURE__ */ jsx(GiftCardAmounts, {
11353
+ offer,
11354
+ currency: offers?.currency ?? "GBP",
11355
+ groupName: `amountChoice-${offer.id}`,
11356
+ look: display
11357
+ }), /* @__PURE__ */ jsx(ThemedButton, {
11358
+ ...giftingSlot(display, "action"),
11359
+ type: "button",
11360
+ variant: "primary",
11361
+ size: "md",
11362
+ extraClassName: "gifting-buy",
11363
+ label: "Buy a gift card"
11364
+ })]
11365
+ })
11366
+ ]
11367
+ }, offer.id)) }) : /* @__PURE__ */ jsx("ul", {
11368
+ className: "gifting-voucher-list",
11369
+ children: vouchers.map((offer) => /* @__PURE__ */ jsx("li", {
11370
+ className: "gifting-voucher",
11371
+ children: /* @__PURE__ */ jsxs("div", {
11372
+ className: "gifting-offer",
11373
+ children: [
11374
+ /* @__PURE__ */ jsxs("div", {
11375
+ className: "gifting-offer-summary",
11376
+ children: [/* @__PURE__ */ jsx("h4", {
11377
+ className: "gifting-offer-title",
11378
+ children: offer.title
11379
+ }), /* @__PURE__ */ jsx("strong", {
11380
+ className: "gifting-offer-price",
11381
+ children: formatGiftAmount(offer.voucher.purchaseAmountCents, offers?.currency ?? "GBP")
11382
+ })]
11383
+ }),
11384
+ offer.description ? /* @__PURE__ */ jsx("p", {
11385
+ className: "gifting-offer-description",
11386
+ children: offer.description
11387
+ }) : null,
11388
+ /* @__PURE__ */ jsx(ThemedButton, {
11389
+ ...giftingSlot(display, "action"),
11390
+ type: "button",
11391
+ variant: "secondary",
11392
+ size: "md",
11393
+ extraClassName: "gifting-buy",
11394
+ label: "Buy this voucher"
11395
+ })
11396
+ ]
11397
+ })
11398
+ }, offer.id))
11084
11399
  })
11085
- ]
11086
- }, offer.id))]
11087
- }) : /* @__PURE__ */ jsx("p", {
11088
- className: "gifting-empty",
11089
- children: display.emptyStateText
11400
+ }, group.kind))
11401
+ }) : /* @__PURE__ */ jsx("p", {
11402
+ className: "gifting-empty",
11403
+ children: display.emptyStateText
11404
+ })
11090
11405
  })]
11091
11406
  })
11092
11407
  });
@@ -11261,7 +11576,7 @@ function AgendaModalCard({ event, showCapacity, calendarTimeZone, onClick }) {
11261
11576
  });
11262
11577
  }
11263
11578
  function AgendaLinkCard({ event, showCapacity, showVenue, buttonVariant, buttonText, calendarTimeZone }) {
11264
- const eventLinkProps = resolveEventLinkProps(event);
11579
+ const eventLinkProps = resolveEventPageLink(event);
11265
11580
  const categoryColor = event.eventCategory?.color || "rgb(var(--tb-accent))";
11266
11581
  const timeZone = resolveEventTimeZone(event, calendarTimeZone);
11267
11582
  const teacherLine = formatEventTeacherLine(event);
@@ -11502,7 +11817,7 @@ function formatCompactTimeRange(event, calendarTimeZone) {
11502
11817
  }));
11503
11818
  }
11504
11819
  const WeekBoardCard = ({ event, showCapacity, calendarTimeZone }) => {
11505
- const linkProps = resolveEventLinkProps(event);
11820
+ const linkProps = resolveEventPageLink(event);
11506
11821
  const { status, label } = getEventAvailabilityStatus(event);
11507
11822
  const pill = showCapacity ? label : null;
11508
11823
  return /* @__PURE__ */ jsxs("a", {
@@ -11939,7 +12254,7 @@ function renderCalendarSsr(display, hydration) {
11939
12254
  }), /* @__PURE__ */ jsxs("div", {
11940
12255
  className: "event-calendar-events",
11941
12256
  children: [day.visibleEntries.map(({ event, timeZone }) => /* @__PURE__ */ jsxs("a", {
11942
- ...resolveEventLinkProps(event),
12257
+ ...resolveEventPageLink(event),
11943
12258
  className: "event-calendar-event",
11944
12259
  title: `${eventDisplayTitleText(event)} at ${formatTime(event.startsAt, eventDateOptions({
11945
12260
  ...event,
@@ -12045,7 +12360,7 @@ function renderTimetableSsr(display, hydration) {
12045
12360
  className: "event-timetable-day-empty",
12046
12361
  children: "No classes"
12047
12362
  }) : day.events.map((cell) => /* @__PURE__ */ jsxs("a", {
12048
- ...resolveEventLinkProps(cell.event),
12363
+ ...resolveEventPageLink(cell.event),
12049
12364
  className: "event-timetable-event",
12050
12365
  title: `${eventDisplayTitleText(cell.event)}, ${cell.timeLabel}`,
12051
12366
  style: {
@@ -12204,6 +12519,18 @@ function EventBookingPanelBody({ panel }) {
12204
12519
  children: cancelledDateCopy.bodyText
12205
12520
  })]
12206
12521
  });
12522
+ case "bookElsewhere": return /* @__PURE__ */ jsx("div", {
12523
+ className: "event-booking-panel__book-elsewhere",
12524
+ children: /* @__PURE__ */ jsx(ThemedButtonLink, {
12525
+ variant: "primary",
12526
+ size: "md",
12527
+ extraClassName: "event-booking-panel__book-link rb-block rb-w-full rb-text-center",
12528
+ href: panel.url,
12529
+ target: "_blank",
12530
+ rel: "noopener noreferrer",
12531
+ label: panel.label
12532
+ })
12533
+ });
12207
12534
  case "dropIn": return /* @__PURE__ */ jsx(DropInPanel, { panel: panel.panel });
12208
12535
  case "bookingClosed": return /* @__PURE__ */ jsx(BookingClosedPanel, { detail: panel.detail });
12209
12536
  case "closedRun": return /* @__PURE__ */ jsx(ClosedRunPanel, { copy: closedRunCopy(panel.reason, panel.run) });
@@ -12390,20 +12717,36 @@ function resolveBookingPanelSelection(source) {
12390
12717
  } : null;
12391
12718
  }
12392
12719
  function selectPagePanel(source, events) {
12393
- if (source.subject?.kind === "eventOffering" && source.subject.bookingScope === "whole_series") {
12394
- if (source.pageKind !== "bookingPage") return null;
12395
- return planWholeSeriesParentSelection({
12396
- offeringId: source.subject.eventOfferingId,
12397
- events,
12398
- now: new Date(source.now)
12399
- });
12400
- }
12401
- if (source.subject?.kind === "eventSeries" && source.subject.bookingScope === "whole_series") return planWholeSeriesRunSelection({
12402
- eventSeriesId: source.subject.eventSeriesId,
12720
+ const bookedElsewhere = isBookedElsewherePage(events);
12721
+ const subject = source.subject;
12722
+ if (subject?.kind === "eventOffering" && subject.bookingScope === "whole_series") return source.pageKind === "bookingPage" || bookedElsewhere ? planWholeSeriesParentSelection({
12723
+ offeringId: subject.eventOfferingId,
12724
+ events,
12725
+ now: new Date(source.now)
12726
+ }) : null;
12727
+ if (subject?.kind === "eventSeries" && subject.bookingScope === "whole_series") return planWholeSeriesRunSelection({
12728
+ eventSeriesId: subject.eventSeriesId,
12403
12729
  events
12404
12730
  });
12405
- if (!source.occurrenceContext && source.subject?.kind === "eventSeries") return planOrdinarySeriesSelection(events);
12406
- return selectOccurrenceForPanel(events, source.occurrenceContext?.id);
12731
+ return bookedElsewhere ? selectBookedElsewherePanel(source, events) : selectBookedHerePanel(source, events);
12732
+ }
12733
+ /** The page header reads the same choice (`decideBookedElsewhereDatesPage`). Unscoped blocks show no panel. */
12734
+ function selectBookedElsewherePanel(source, events) {
12735
+ const occurrenceId = source.occurrenceContext?.id ?? null;
12736
+ return occurrenceId || offersSeriesDates(source, true) ? selectBookedElsewhereDates(events, occurrenceId, new Date(source.now)) : null;
12737
+ }
12738
+ function selectBookedHerePanel(source, events) {
12739
+ return offersSeriesDates(source, false) ? planOrdinarySeriesSelection(events) : selectOccurrenceForPanel(events, source.occurrenceContext?.id);
12740
+ }
12741
+ /**
12742
+ * A series subject without a dated route offers the same eligible dates in
12743
+ * CMS/SDK and hosted pages. Unscoped blocks keep their catalogue picker, as
12744
+ * does an offering's page booked here.
12745
+ */
12746
+ function offersSeriesDates(source, bookedElsewhere) {
12747
+ if (source.occurrenceContext) return false;
12748
+ const kind = source.subject?.kind;
12749
+ return kind === "eventSeries" || kind === "eventOffering" && bookedElsewhere;
12407
12750
  }
12408
12751
  /** The decided target is also retained for recovery when fresh booking is closed. */
12409
12752
  function registrationSourceForPanel(source, panel) {
@@ -12427,6 +12770,8 @@ function planEventBookingPanel({ selection, subject, pageEvents }, now) {
12427
12770
  kind: "cancelled",
12428
12771
  registration: null
12429
12772
  };
12773
+ const elsewhere = planBookElsewherePanel(selection, now);
12774
+ if (elsewhere) return elsewhere;
12430
12775
  const nonBookingPanel = planNonBookingPanel(selection);
12431
12776
  switch (selection.kind) {
12432
12777
  case "occurrence":
@@ -12484,6 +12829,49 @@ function closedDatePanel(selection, now) {
12484
12829
  copy
12485
12830
  } : null;
12486
12831
  }
12832
+ /**
12833
+ * An event booked on another website is saved with no booking here, so it
12834
+ * would otherwise read as a drop-in ("No booking needed"). It is decided
12835
+ * first, after a cancelled date, by the shared booked-elsewhere decision the
12836
+ * page header also reads: a closed, started or finished date says so rather
12837
+ * than sending people out. There is nothing here to recover, so no
12838
+ * registration target is kept.
12839
+ */
12840
+ function planBookElsewherePanel(selection, now) {
12841
+ const booking = decideBookedElsewhereBooking(selection, now);
12842
+ if (!booking) return null;
12843
+ return booking.kind === "open" ? {
12844
+ kind: "bookElsewhere",
12845
+ url: booking.destination.url,
12846
+ label: booking.destination.label,
12847
+ registration: null
12848
+ } : {
12849
+ ...bookElsewhereClosedPanel(booking.closure),
12850
+ registration: null
12851
+ };
12852
+ }
12853
+ function bookElsewhereClosedPanel(closure) {
12854
+ switch (closure.kind) {
12855
+ case "bookingClosed": return {
12856
+ kind: "bookingClosed",
12857
+ detail: closure.detail
12858
+ };
12859
+ case "date": return {
12860
+ kind: "closedDate",
12861
+ copy: bookElsewhereDateCopy(closure.event, closure.closure)
12862
+ };
12863
+ case "datesCutOff": return {
12864
+ kind: "closedDate",
12865
+ copy: closedDateListCopy(closure.dates.length, cutOffDateCopy(closure.firstCutOff.event, closure.firstCutOff.closesAt))
12866
+ };
12867
+ case "run": return {
12868
+ kind: "closedRun",
12869
+ reason: closure.reason,
12870
+ run: closure.run
12871
+ };
12872
+ case "unavailable": return { kind: "unavailable" };
12873
+ }
12874
+ }
12487
12875
  /** Drop-in and page-level closure take precedence over fresh booking and run selection. */
12488
12876
  function planNonBookingPanel(selection) {
12489
12877
  if (!selectionRepresentativeEvent(selection).requiresRegistration) return {
@@ -15345,10 +15733,14 @@ function blockBoundaryReserves(input) {
15345
15733
  return {
15346
15734
  topPlacement: top?.placement,
15347
15735
  bottomPlacement: bottom?.placement,
15348
- fieldSeam: input.before?.fieldsMeet ? "top" : void 0,
15736
+ seamBefore: seamAttribute(input.before),
15737
+ seamAfter: seamAttribute(input.after),
15349
15738
  style: top || bottom ? style : void 0
15350
15739
  };
15351
15740
  }
15741
+ function seamAttribute(slot) {
15742
+ return slot && slot.seam !== "none" ? slot.seam : void 0;
15743
+ }
15352
15744
  /** The reserve one join needs on one side of itself, if it draws at all. */
15353
15745
  function reserveOnSide(slot, side) {
15354
15746
  const layout = renderedJoinLayout(slot?.join ?? null);
@@ -15858,7 +16250,7 @@ function survivingPreparedRegion(entries, survivors) {
15858
16250
  }
15859
16251
  /** Admission always sees current loader provenance, even when block preparation can be reused. */
15860
16252
  function preparationAdmission(input) {
15861
- const facts = readinessFactsFromLoaders("published", {
16253
+ const facts = readinessFactsFromLoaders(input.dataContext?.previewStage === "preview" ? "draft" : "published", {
15862
16254
  prefetched: input.dataContext?.prefetchedBlockData,
15863
16255
  previewStage: input.dataContext?.previewStage,
15864
16256
  mailingList: input.dataContext?.mailingList,
@@ -15942,11 +16334,32 @@ function composeSurvivorJoins(plan, survivors, themeResources) {
15942
16334
  survivors: survivors.map(({ entry }) => ({
15943
16335
  id: entry.block.id,
15944
16336
  kind: entry.block.kind,
15945
- content: boundaryClassificationContent(entry, themeResources)
16337
+ content: boundaryClassificationContent(entry, themeResources),
16338
+ ...seamSectionFacts(entry)
15946
16339
  }))
15947
16340
  });
15948
16341
  }
15949
16342
  /**
16343
+ * Whether the platform paints this entry's section, and the ground it
16344
+ * declares. Only a system block whose layout is a styled section is
16345
+ * `platform`: that section carries the geometry hook the seam rules target,
16346
+ * whatever the Look or skin. An override component, a custom block, a layout
16347
+ * that draws its own root, or a block that manages its own wrapper (so never
16348
+ * carries the seam attributes) owns its ground and padding.
16349
+ */
16350
+ function seamSectionFacts(entry) {
16351
+ const own = {
16352
+ ground: pageGround,
16353
+ section: "own"
16354
+ };
16355
+ if (entry.kind !== "renderable" || entry.override || entry.managesOwnWrapper || !hasBlockDefinition(entry.block.kind)) return own;
16356
+ const ground = layoutSectionGround(resolveBlockLayout(entry.definition.manifest, entry.effectiveArrangementKey));
16357
+ return ground ? {
16358
+ ground,
16359
+ section: "platform"
16360
+ } : own;
16361
+ }
16362
+ /**
15950
16363
  * The content a join is classified from must be the content that paints the
15951
16364
  * section. The default block renderer layers the theme's per-block style
15952
16365
  * defaults (`theme.blockOverrides[kind].styles`, background included) under
@@ -16247,7 +16660,7 @@ function wrapRenderedPage(props, plan, rendered) {
16247
16660
  function renderPreparedPage(props, preparation, themeResources, imageResolveContext, headingPresentation) {
16248
16661
  const resolvedRegistry = props.registry ?? getDefaultComponentRegistry();
16249
16662
  const joinSlots = joinSlotsByPair(preparation.joins);
16250
- const renderRegion = (entries, joins, flow) => entries.map((entry, index) => renderGuardedPlanEntry({
16663
+ const renderRegion = (entries, joins, ending) => entries.map((entry, index) => renderGuardedPlanEntry({
16251
16664
  entry,
16252
16665
  index,
16253
16666
  entries,
@@ -16257,27 +16670,28 @@ function renderPreparedPage(props, preparation, themeResources, imageResolveCont
16257
16670
  resolvedRegistry,
16258
16671
  systemTrees: headingPresentation.trees,
16259
16672
  joinSlots: joins,
16260
- flow,
16673
+ ending,
16261
16674
  wrapBlock: props.wrapBlock,
16262
16675
  renderJoin: props.renderJoin
16263
16676
  }));
16264
16677
  const { main, aside } = preparation.regions;
16265
16678
  const title = headingPresentation.needsPageTitle ? /* @__PURE__ */ jsx(PageTitleFallback, { name: props.page?.name ?? "" }) : null;
16266
- if (aside.length === 0) return /* @__PURE__ */ jsxs("div", { children: [title, renderRegion(main, joinSlots, "main")] });
16679
+ if (aside.length === 0) return /* @__PURE__ */ jsxs("div", { children: [title, renderRegion(main, joinSlots, "lastBlock")] });
16267
16680
  return /* @__PURE__ */ jsxs("div", {
16268
16681
  className: "rb-page-layout",
16269
16682
  "data-page-layout": "main-aside",
16683
+ "data-page-ending": "",
16270
16684
  children: [
16271
16685
  title,
16272
16686
  /* @__PURE__ */ jsx("div", {
16273
16687
  className: "rb-page-layout__main",
16274
16688
  "data-page-region": "main",
16275
- children: renderRegion(main, joinSlots, "main")
16689
+ children: renderRegion(main, joinSlots, "elsewhere")
16276
16690
  }),
16277
16691
  /* @__PURE__ */ jsx("aside", {
16278
16692
  className: "rb-page-layout__aside rb-sticky-below-site-chrome",
16279
16693
  "data-page-region": "aside",
16280
- children: renderRegion(aside, /* @__PURE__ */ new Map(), "aside")
16694
+ children: renderRegion(aside, /* @__PURE__ */ new Map(), "elsewhere")
16281
16695
  })
16282
16696
  ]
16283
16697
  });
@@ -16366,9 +16780,9 @@ function requireEntryBlockOverride(entry, themeResources) {
16366
16780
  }
16367
16781
  requireBlockOverride(themeResources, entry.override, entry.block.kind);
16368
16782
  }
16369
- /** The footer meets the main flow's last block, which marks itself for the footer edge's reserve. */
16370
- function pageEndingAttribute(flow, position) {
16371
- return flow === "main" && (position === "last" || position === "only") ? "" : void 0;
16783
+ /** The block the footer meets marks itself for the footer edge's reserve. */
16784
+ function pageEndingAttribute(ending, position) {
16785
+ return ending === "lastBlock" && (position === "last" || position === "only") ? "" : void 0;
16372
16786
  }
16373
16787
  /** The block's stored identifier, emitted as its section `id` so `#identifier` links land on it. */
16374
16788
  function blockAnchorId(block) {
@@ -16435,10 +16849,11 @@ function renderPlanEntry(input) {
16435
16849
  "data-block-composition": blockComposition?.treatment,
16436
16850
  "data-block-composition-kind": blockComposition?.kind,
16437
16851
  "data-page-block-position": blockPosition,
16438
- "data-page-ending": pageEndingAttribute(input.flow, blockPosition),
16852
+ "data-page-ending": pageEndingAttribute(input.ending, blockPosition),
16439
16853
  "data-site-style-boundary-before": reserves.topPlacement,
16440
16854
  "data-site-style-boundary-after": reserves.bottomPlacement,
16441
- "data-site-style-field-seam": reserves.fieldSeam,
16855
+ "data-site-style-seam-before": reserves.seamBefore,
16856
+ "data-site-style-seam-after": reserves.seamAfter,
16442
16857
  "data-style-group": styleGroup,
16443
16858
  style: reserves.style,
16444
16859
  children: /* @__PURE__ */ jsx(MemoBlockSection, { ...blockSectionProps })