@riverbankcms/sdk 0.177.0 → 0.178.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 (198) hide show
  1. package/dist/_dts/{BlocksIslandsHydrator-sYraeqm9.d.ts → BlocksIslandsHydrator-CrKsXtpD.d.ts} +1 -1
  2. package/dist/_dts/{Page-Bp7hTDTy.d.ts → Page-C9i27wZA.d.ts} +7 -7
  3. package/dist/_dts/{SdkPreviewMode-CxkCCyKw.d.ts → SdkPreviewMode-DzGSR3jh.d.ts} +2 -2
  4. package/dist/_dts/{client-K6UhbL3t.d.ts → client-BnYN6XsH.d.ts} +31 -7
  5. package/dist/_dts/{content-types-BLAdIMyr.d.ts → content-types-CXj6lp3d.d.ts} +2 -2
  6. package/dist/_dts/{contracts-BG7yTZ6t.d.ts → contracts-BZLwkTwL.d.ts} +3 -3
  7. package/dist/_dts/{footerPageOutline-DwMHeYmQ.d.ts → footerPageOutline-D_XbQW_o.d.ts} +6 -6
  8. package/dist/_dts/{generatePageMetadata-X_WpGzZZ.d.ts → generatePageMetadata-ByEWwe9j.d.ts} +2 -2
  9. package/dist/_dts/{index-BpAW9AKB.d.ts → index-0HFgCnGz.d.ts} +1 -1
  10. package/dist/_dts/{index-CX9bp60k.d.ts → index-BE9dWIsr.d.ts} +3 -3
  11. package/dist/_dts/{index-Bygd2RCg.d.ts → index-CKDRr54L.d.ts} +4 -4
  12. package/dist/_dts/{index-BMGif2r3.d.ts → index-D9-N1d9v.d.ts} +1 -1
  13. package/dist/_dts/{index--n-wV8Xd.d.ts → index-DCa-8TEY.d.ts} +1 -1
  14. package/dist/_dts/{index-BLseXObg.d.ts → index-cTpvQg_Q.d.ts} +2 -2
  15. package/dist/_dts/{index-CBRbZJ6u.d.ts → index-nnEdgc3Z.d.ts} +2 -2
  16. package/dist/_dts/{loadContent-uhUThWaq.d.ts → loadContent-DYkVV6w4.d.ts} +7 -7
  17. package/dist/_dts/{request-Bf9YImJw.d.ts → request-B20VRWHH.d.ts} +491 -43
  18. package/dist/_dts/{resolveBlockData-D6M5NMZB.d.ts → resolveBlockData-C_aK5GIS.d.ts} +5 -5
  19. package/dist/_dts/{resolvePageContent-DkzWvFbG.d.ts → resolvePageContent-YT6ndha1.d.ts} +2 -2
  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 +6 -6
  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 -2
  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 +24 -12
  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 +56 -4
  38. package/dist/_dts/sdk/src/portal/index.d.ts +95 -13
  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 +5 -5
  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 +1 -1
  55. package/dist/_dts/{types-BdZ5pJSk.d.ts → types-CMZ5mkpv.d.ts} +2 -2
  56. package/dist/_dts/{types-DgV8P2mz.d.ts → types-CYcd15BQ.d.ts} +7 -7
  57. package/dist/_dts/{types-C1l2Sm2h.d.ts → types-rm2M4LGx.d.ts} +3 -3
  58. package/dist/_dts/{validation-BtbZIT5f.d.ts → validation-BSxnRhyy.d.ts} +4 -4
  59. package/dist/client/{BlocksIslandsHydrator-CeYQQQs7.mjs → BlocksIslandsHydrator-D1n09bu-.mjs} +17 -17
  60. package/dist/client/{BookingMailingListNote-CDDWrY_W.mjs → BookingMailingListNote-DSD4gS96.mjs} +6 -6
  61. package/dist/client/{BookingPanelArrangement-BShQSial.mjs → BookingPanelArrangement--EkA1ZQd.mjs} +1 -1
  62. package/dist/client/{BookingQuestionFields-MbvIo2jS.mjs → BookingQuestionFields-B57oGPcj.mjs} +2 -2
  63. package/dist/client/{CalendarNavigationChevron-C6CSVfEB.mjs → CalendarNavigationChevron-qXvsFYOg.mjs} +7 -7
  64. package/dist/client/{DemoBookingPortalAccess-C9Ggcfx3.mjs → DemoBookingPortalAccess-Olvrwi3Z.mjs} +3 -3
  65. package/dist/client/{EventCalendar.client-BSMuSqg0.mjs → EventCalendar.client-DwFNFb-0.mjs} +10 -10
  66. package/dist/client/{EventCombined.client-BTrmSyUB.mjs → EventCombined.client-Ffu-aVOb.mjs} +9 -9
  67. package/dist/client/{EventItem-B0WjGXsH.mjs → EventItem-b8tVkNHA.mjs} +4 -4
  68. package/dist/client/{EventListWeekNavigation-8Ij7vuxY.mjs → EventListWeekNavigation-BxnJW_Gf.mjs} +1 -1
  69. package/dist/client/{EventListing.client-CWk2NEwd.mjs → EventListing.client-ViCnrNg4.mjs} +3 -3
  70. package/dist/client/{EventListing.view-BEH4UbSL.mjs → EventListing.view-CdjiepMf.mjs} +7 -7
  71. package/dist/client/{EventRegistrationPayment-B2EikR3f.mjs → EventRegistrationPayment-BVd70XkH.mjs} +262 -24
  72. package/dist/client/{LocationMapActions-myIQIvQL.mjs → LocationMapActions-CiMtl1Ha.mjs} +1 -1
  73. package/dist/client/{MapDrawingSvg-BfsVyPvB.mjs → MapDrawingSvg-BCZa3dpf.mjs} +1 -1
  74. package/dist/client/{Page-C03rc6jw.mjs → Page-DqETUt-U.mjs} +12 -12
  75. package/dist/client/{SiteTermsAgreementField-BYACYP0T.mjs → SiteTermsAgreementField-DkFnbzf_.mjs} +2 -2
  76. package/dist/client/{StepIndicator-Bb7rPtSq.mjs → StepIndicator-JO2PS03n.mjs} +79 -32
  77. package/dist/client/{accordion-BfsOiweL.mjs → accordion-XgNxl0Wg.mjs} +1 -1
  78. package/dist/client/{booking-form.client-B8ohIj13.mjs → booking-form.client-ljJoDwuI.mjs} +13 -13
  79. package/dist/client/{bookingForm-CXsck2oH.mjs → bookingForm-DtEHwY4W.mjs} +4 -4
  80. package/dist/client/bookings.mjs +5 -5
  81. package/dist/client/{boxStyleClassNames-B_hcuT06.mjs → boxStyleClassNames-BHoMAcun.mjs} +2 -2
  82. package/dist/client/{carousel-Cz5Ddbsx.mjs → carousel-B3UhbFu7.mjs} +1 -1
  83. package/dist/client/{cart-CTC2oS3p.mjs → cart-DzOJfYOR.mjs} +3 -3
  84. package/dist/client/{cart.client-c1YkTC-Q.mjs → cart.client-DBG77v-5.mjs} +1 -1
  85. package/dist/client/{checkout-BeW1ufaH.mjs → checkout-LmePoEgM.mjs} +3 -3
  86. package/dist/client/{checkout.client-BeU32khQ.mjs → checkout.client-DmgZuLBT.mjs} +1 -1
  87. package/dist/client/{checkoutUrls-DVfSUSKp.mjs → checkoutUrls-CMZI8o_V.mjs} +1 -1
  88. package/dist/client/client.mjs +59 -5
  89. package/dist/client/{context-R9p5c8IH.mjs → context-CJIz4FdL.mjs} +1 -1
  90. package/dist/client/{course-CUFVJEAc.mjs → course-DBEU9IA9.mjs} +11 -4
  91. package/dist/client/{dateFormatting-CF6FWCoo.mjs → dateFormatting-UoXqBh10.mjs} +1 -1
  92. package/dist/client/{demoPortalMagicLink-tZxIm3RL.mjs → demoPortalMagicLink-6CgFZNvu.mjs} +5 -4
  93. package/dist/client/{display-4HYOb-AK.mjs → display-D1oVR5Eh.mjs} +180 -15
  94. package/dist/client/{enhanceHeaderSection-DEYDI54E.mjs → enhanceHeaderSection-DaMo6len.mjs} +3 -3
  95. package/dist/client/{event-details.client-BwjBJP-f.mjs → event-details.client-BwASwKIq.mjs} +1 -1
  96. package/dist/client/{event-registration.client-DWvSODTI.mjs → event-registration.client-b6APrFQe.mjs} +118 -180
  97. package/dist/client/{eventCalendar-C9Pn9eeZ.mjs → eventCalendar-DJYz7yZf.mjs} +4 -4
  98. package/dist/client/{eventCombined-Bdhk0fp0.mjs → eventCombined-j9VCVgMW.mjs} +4 -4
  99. package/dist/client/{eventDetails-C2LfNW_o.mjs → eventDetails-BzGOVDI-.mjs} +2 -2
  100. package/dist/client/{eventListing-B-bJOQUk.mjs → eventListing-DWgpGuFM.mjs} +4 -4
  101. package/dist/client/{eventRegistration-CbdmUiDT.mjs → eventRegistration-DCinRot3.mjs} +4 -4
  102. package/dist/client/{form-BbUUt784.mjs → form-BBBtRwvy.mjs} +3 -3
  103. package/dist/client/{form.client-BVlz-9_t.mjs → form.client-CZeRQLGF.mjs} +4 -4
  104. package/dist/client/{form.parts-TB4UIrML.mjs → form.parts-DhGGv4_L.mjs} +1 -1
  105. package/dist/client/{formatDate-TDHhFjFN.mjs → formatDate-DVFVDcDW.mjs} +1 -1
  106. package/dist/client/gifting/client.mjs +6 -5
  107. package/dist/client/{gifting-CbNSrp7C.mjs → gifting-Di9-SpwW.mjs} +4 -4
  108. package/dist/client/{gifting.client-B__bGhFc.mjs → gifting.client-CjT5PrAZ.mjs} +4 -4
  109. package/dist/client/{gifting.parts-CTA1sDW6.mjs → gifting.parts-ffP6mjMd.mjs} +2 -2
  110. package/dist/client/{headerSection-5Wn9nUW_.mjs → headerSection-jjAvtSZk.mjs} +2 -2
  111. package/dist/client/{lookSurfaces-BwiNdgMU.mjs → lookSurfaces-C2VzJfyG.mjs} +1 -1
  112. package/dist/client/{newsletter-form.client-B17WYHxZ.mjs → newsletter-form.client-D45frHoa.mjs} +5 -5
  113. package/dist/client/{newsletter-form.parts-DN9wD1ZG.mjs → newsletter-form.parts-CHdg82ct.mjs} +1 -1
  114. package/dist/client/{newsletterForm-DLMlxInp.mjs → newsletterForm-tS465_vl.mjs} +3 -3
  115. package/dist/client/{noop-CaQxI-Js.mjs → noop-D11X-B6n.mjs} +123 -91
  116. package/dist/client/portal/client.mjs +344 -19
  117. package/dist/client/{product-detail.client-Di_anRGR.mjs → product-detail.client-DIWSeW7P.mjs} +1 -1
  118. package/dist/client/{product-list.client-Duhl6rtL.mjs → product-list.client-BRf14h_e.mjs} +1 -1
  119. package/dist/client/{productDetail-BgKmCwA8.mjs → productDetail-gxF5whea.mjs} +3 -3
  120. package/dist/client/{productList-C_wMKsYS.mjs → productList-B9t0XJrN.mjs} +3 -3
  121. package/dist/client/{propsDecoder-y3LvxaiG.mjs → propsDecoder-Db8wAmgr.mjs} +4 -4
  122. package/dist/client/{registry.server-CIWYKz1V.mjs → registry.server-Bn0gE0uP.mjs} +27 -27
  123. package/dist/client/rendering/client.mjs +23 -23
  124. package/dist/client/rendering/islands.mjs +1 -1
  125. package/dist/client/rendering.mjs +7 -7
  126. package/dist/client/{richText-coerce-DkPBFb_a.mjs → richText-coerce-COnKrLO7.mjs} +1 -1
  127. package/dist/client/{routeIslandApiConfig-BgO0rZce.mjs → routeIslandApiConfig-Bok1Oy50.mjs} +1 -1
  128. package/dist/client/{shop-CFbWlv_W.mjs → shop-D1oTPDxm.mjs} +3 -3
  129. package/dist/client/{shop-commerce-C-I29eaA.mjs → shop-commerce-DyMZLC0a.mjs} +12 -12
  130. package/dist/client/{shop-commerce-store-DGcc7twO.mjs → shop-commerce-store-FODNS63D.mjs} +1 -1
  131. package/dist/client/{shop-discount-apply.state-DOm7vx0X.mjs → shop-discount-apply.state-C4xcmFzZ.mjs} +2 -2
  132. package/dist/client/{shop.client-GHTWUKD6.mjs → shop.client-CRgRulfI.mjs} +12 -12
  133. package/dist/client/{shop.interactive-CxDJ8P2r.mjs → shop.interactive-D7wky1GL.mjs} +6 -33
  134. package/dist/client/{shopShared-Be9QJJpT.mjs → shopShared-Bd_hy9ZO.mjs} +2 -2
  135. package/dist/client/src-DqMbCjI1.mjs +3 -0
  136. package/dist/client/{src-xrjaKaCj.mjs → src-uwCpbHXG.mjs} +2 -1
  137. package/dist/client/{timetableModel--R0zVzZO.mjs → timetableModel-UlWfP1gh.mjs} +9 -9
  138. package/dist/client/{useAvailableSlots-BGu_2F50.mjs → useAvailableSlots-D-qoooLy.mjs} +2 -2
  139. package/dist/client/{useDiscountCodeUi-I_mXI9Yd.mjs → useDiscountCodeUi-B9DODAkj.mjs} +1 -1
  140. package/dist/client/{useEventPagination-DxIJ--JZ.mjs → useEventPagination-CQH2e9sQ.mjs} +7 -7
  141. package/dist/client/{view-BbzH5MQb.mjs → view-DNX59QwM.mjs} +10 -9
  142. package/dist/client/{view-3foOzGWR.mjs → view-bGU1ws-m.mjs} +3 -3
  143. package/dist/preview-next/client/{PageSectionToolbar-D6-jojqh.mjs → PageSectionToolbar-D-Le7O3o.mjs} +3 -3
  144. package/dist/preview-next/client/{PreviewEditorSidebar-BUVFKZ4k.mjs → PreviewEditorSidebar-DNy5j_ce.mjs} +15 -13
  145. package/dist/preview-next/client/{PreviewEditorUI-292pOiSt.mjs → PreviewEditorUI-CzJvgbqt.mjs} +4 -4
  146. package/dist/preview-next/client/{PreviewShell-CW0Yzj3h.mjs → PreviewShell-xhJ6ca1i.mjs} +5 -5
  147. package/dist/preview-next/client/{SdkPreviewModeRuntime-Dba7zoZK.mjs → SdkPreviewModeRuntime-BmYO1TdT.mjs} +5 -5
  148. package/dist/preview-next/client/{previewAssistantSlot-B-utyhbS.mjs → previewAssistantSlot-BN93X9o1.mjs} +1141 -596
  149. package/dist/preview-next/client/{previewChromeRoot-CCoGydUD.mjs → previewChromeRoot-C51RQseo.mjs} +1 -1
  150. package/dist/preview-next/client/runtime.mjs +3 -3
  151. package/dist/preview-next/client/{sdk-runtime-DCpXVcA0.mjs → sdk-runtime-oeGquJM-.mjs} +2 -2
  152. package/dist/preview-next/client/{siteStyleAccess-sjOvRAHY.mjs → siteStyleAccess-BGTAcPud.mjs} +1 -1
  153. package/dist/preview-next/client/src-EO5QoRlU.mjs +3 -0
  154. package/dist/preview-next/client/{src-DzXUmsyK.mjs → src-lX6heoDA.mjs} +2 -1
  155. package/dist/preview-next/client/{useAutosaveStatus-R1rZ9-IZ.mjs → useAutosaveStatus-BMGXjGZq.mjs} +1 -1
  156. package/dist/preview-next/client/{useOpenBlockForSetup-BS7CANPv.mjs → useOpenBlockForSetup-CTDoR_gQ.mjs} +1 -1
  157. package/dist/preview-next/keepAlive.mjs +1 -1
  158. package/dist/preview-next/middleware.mjs +1 -1
  159. package/dist/preview-next/{route-contract-BSSbtz6A.mjs → route-contract-BtdzkSUg.mjs} +55 -1
  160. package/dist/server/{Block.shared-Dc3DX7Cf.mjs → Block.shared-Bp3OlOjj.mjs} +5 -5
  161. package/dist/server/{bindings-VGgS6UvF.mjs → bindings-DrbJuftt.mjs} +3 -3
  162. package/dist/server/{client-BPLLL22F.mjs → client-Bf06n9oj.mjs} +56 -2
  163. package/dist/server/config-validation.mjs +1 -1
  164. package/dist/server/config.mjs +2 -2
  165. package/dist/server/constants-Cj7hfbrA.mjs +41 -0
  166. package/dist/server/data/resolveBlockData.mjs +1 -1
  167. package/dist/server/index.mjs +2 -2
  168. package/dist/server/{loadContent-CxASA3PE.mjs → loadContent-eaTY7RPg.mjs} +4 -4
  169. package/dist/server/{loadPage-CQgde5DN.mjs → loadPage-5iZefzDd.mjs} +2 -2
  170. package/dist/server/{navigation-iC_hXjJI.mjs → navigation-BcNfYYuu.mjs} +1 -1
  171. package/dist/server/navigation.mjs +1 -1
  172. package/dist/server/next.mjs +56 -13
  173. package/dist/server/{overrideResolution-CkpwAHvW.mjs → overrideResolution-CUHtm7tW.mjs} +1 -1
  174. package/dist/server/page-converter.mjs +1 -1
  175. package/dist/server/{pageRenderPlan-CfSnAkCO.mjs → pageRenderPlan-GmPXForc.mjs} +13 -6
  176. package/dist/server/{pageRuntimeSupport-uz4gzBOo.mjs → pageRuntimeSupport-Dd8LFzfa.mjs} +1 -1
  177. package/dist/server/{pageShared-6z6JBU41.mjs → pageShared-tz-GVWft.mjs} +85 -37
  178. package/dist/server/portal-B4JVkdjc.mjs +783 -0
  179. package/dist/server/portal.mjs +3 -3
  180. package/dist/server/{prebuild-B4_Llisx.mjs → prebuild-JmsuYCIH.mjs} +1 -1
  181. package/dist/server/prebuild.mjs +1 -1
  182. package/dist/server/{prefetchBlockData-CCiYV8_s.mjs → prefetchBlockData-Ce9DDwON.mjs} +2 -2
  183. package/dist/server/{registry-CXRXsFSx.mjs → registry-D12XF_h1.mjs} +466 -311
  184. package/dist/server/rendering/components/pageShared.mjs +1 -1
  185. package/dist/server/rendering/helpers/loadPage.mjs +1 -1
  186. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
  187. package/dist/server/rendering/server.mjs +3 -3
  188. package/dist/server/rendering.mjs +7 -7
  189. package/dist/server/{resolveBlockData-yfe8WLEA.mjs → resolveBlockData-D9yZIN3V.mjs} +1 -1
  190. package/dist/server/server.mjs +3 -3
  191. package/dist/server/{validation-BvHio6QI.mjs → validation-CLq5cw6M.mjs} +3 -3
  192. package/dist/server/{version-SuFlio6n.mjs → version-oPbhAx8E.mjs} +1 -1
  193. package/dist/styles/index.css +19 -0
  194. package/package.json +1 -1
  195. package/dist/client/src-BozhJ43Z.mjs +0 -3
  196. package/dist/preview-next/client/src-LUhVXBEQ.mjs +0 -3
  197. package/dist/server/constants-hl17xz6x.mjs +0 -22
  198. package/dist/server/portal-BjVHMAUC.mjs +0 -371
@@ -2,7 +2,7 @@
2
2
  import { n as useOptionalPreviewLayout } from "./PreviewLayoutContext-Dy0LwcHc.mjs";
3
3
  import { At as stableJsonStringify, Bt as toLocationCoordinates, Ft as locationValueSchema, Gt as err$1, Ht as capitalize$1, It as normalizeLocationAddressText, Kt as ok$2, Lt as parseLocationValue, Rt as projectPublicLocation, T as Minus, Tt as decideLocationSave, Ut as trimmedStringOrNull, Wt as mapDrawingSchema, at as CirclePlus, bt as ArrowDown, dt as ChevronLeft, ft as ChevronDown, n as X, ot as CircleMinus, u as Sparkles, ut as ChevronRight, v as Plus, zt as publicLocationSchema } from "./lucide-react-McYZeSMb.mjs";
4
4
  import { $ as ICON_PICKER_PRESETS, A as buttonSizeNameSchema, B as blockColorTokenNames, C as MinusIcon, D as AFFORDANCE_SUPPRESS_CLASS, E as themeButtonSelector, F as buttonSystemSchema, G as paletteColorsFromEntries, H as isThemeColorToken, I as buttonVisualStatesSchema, K as paletteColorsSchema, L as opaqueButtonColourTokenSchema, M as unsafeAsOpaqueButtonColourToken, N as buttonEffectApplicationSchema, O as DEFAULT_VARIANT_ALIAS_ID, P as buttonPressOffsetSchema, Q as themeColorTokenSchema, R as parseOpaqueButtonColourToken, S as FileTextIcon, T as parseThemeButtonVariantId, U as normalizePaletteHex, V as hexColorSchema, W as paletteColorEntries, X as parseThemeColorToken, Y as parseColorTokenParts, Z as themeColorShadeSteps, _ as ClockIcon$1, a as ThemedDownloadLink, b as FileAudioIcon, d as SEMANTIC_ICON_DEFINITIONS, et as SYSTEM_BLOCK_KINDS, f as isSemanticIconId, g as CirclePlusIcon, h as CircleMinusIcon, j as createStandardButtonSurfacePolicy, k as STANDARD_BUTTON_SURFACE_POLICY, m as ChevronDownIcon, n as ThemedButton, nt as SpinnerNode, o as getIconComponent, p as ArrowDownIcon, q as paletteModeSchema, r as ThemedButtonLink, rt as clsx, t as ThemedAuthoredButton, tt as VARIANT_ROLES, v as ExternalLinkIcon, w as PlusIcon, x as FileSpreadsheetIcon, y as FileArchiveIcon, z as PALETTE_TOKEN_NAMES } from "./ThemedButton-CVYz7h68.mjs";
5
- import { a as buildTimetableModel$1, b as shiftCalendarAnchorDate, c as addDays, f as formatDateKey$1, g as getWeekCalendarDayTuple, h as getOrderedDayNames, i as groupItemsByDate, l as addMonths, p as getDayOfWeek, r as calendarLinks, u as buildCalendarViewport$1, v as isSameCalendarDay, y as isToday } from "./src-DzXUmsyK.mjs";
5
+ import { a as buildTimetableModel$1, b as shiftCalendarAnchorDate, c as addDays, f as formatDateKey$1, g as getWeekCalendarDayTuple, h as getOrderedDayNames, i as groupItemsByDate, l as addMonths, p as getDayOfWeek, r as calendarLinks, u as buildCalendarViewport$1, v as isSameCalendarDay, y as isToday } from "./src-lX6heoDA.mjs";
6
6
  import * as React$1 from "react";
7
7
  import React, { Suspense, createContext, createElement, forwardRef, lazy, startTransition, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore, useTransition } from "react";
8
8
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -570,128 +570,6 @@ function servicePageDestination(value) {
570
570
  return mode === "cms-managed" || mode === "system-managed" ? { serviceDestinationMode: mode } : {};
571
571
  }
572
572
  //#endregion
573
- //#region ../core/src/ticket-quantity.ts
574
- function toPositiveTicketQuantity(value) {
575
- if (!Number.isFinite(value) || !Number.isInteger(value) || value <= 0) return err$1("invalid_quantity");
576
- return ok$2(value);
577
- }
578
- /**
579
- * The places a booking holds: the sum of its ticket lines' quantities. The one
580
- * derivation for selections, persisted lines and a booking outcome's lines;
581
- * null when the total is not a positive whole number.
582
- */
583
- function deriveTotalTicketQuantity(lines) {
584
- const parsed = toPositiveTicketQuantity(lines.reduce((sum, line) => sum + line.quantity, 0));
585
- return parsed.ok ? parsed.value : null;
586
- }
587
- //#endregion
588
- //#region ../core/src/booking-flexible-balance.ts
589
- function clampFlexibleBalanceConfiguredAmount(amountCents, totalAmountCents) {
590
- return Math.max(0, Math.min(amountCents, totalAmountCents));
591
- }
592
- function resolveFlexibleBalanceInitialPaymentCents(input) {
593
- return clampFlexibleBalanceConfiguredAmount(input.config.upfrontAmountCents, input.totalAmountCents);
594
- }
595
- //#endregion
596
- //#region ../core/src/booking-instalments.ts
597
- function isDepositBearingBookingInstalmentPlan(plan) {
598
- switch (plan.kind) {
599
- case "deposit_plus_one_remainder":
600
- case "deposit_plus_scheduled_instalments": return true;
601
- case "equal_scheduled_instalments": return false;
602
- default: return assertNever$8(plan);
603
- }
604
- }
605
- function getBookingInstalmentDepositRefundability(plan) {
606
- return isDepositBearingBookingInstalmentPlan(plan) ? plan.depositRefundability : null;
607
- }
608
- function getBookingInstalmentProtectedDepositAmountCents(plan) {
609
- return isDepositBearingBookingInstalmentPlan(plan) ? plan.depositAmountCents : null;
610
- }
611
- function clampConfiguredAmount(amountCents, totalAmountCents) {
612
- return Math.max(0, Math.min(amountCents, totalAmountCents));
613
- }
614
- function splitAmountWithRemainderInFirst(totalAmountCents, partCount) {
615
- if (partCount <= 0) return [];
616
- const baseAmountCents = Math.floor(totalAmountCents / partCount);
617
- const remainderCents = totalAmountCents - baseAmountCents * partCount;
618
- return Array.from({ length: partCount }, (_, index) => index === 0 ? baseAmountCents + remainderCents : baseAmountCents);
619
- }
620
- function addIntervalPreservingMonthAnchor(isoString, intervalCount, intervalUnit) {
621
- const date = new Date(isoString);
622
- if (!Number.isFinite(date.getTime())) return isoString;
623
- switch (intervalUnit) {
624
- case "day":
625
- date.setUTCDate(date.getUTCDate() + intervalCount);
626
- return date.toISOString();
627
- case "week":
628
- date.setUTCDate(date.getUTCDate() + intervalCount * 7);
629
- return date.toISOString();
630
- case "month": return addMonthsPreservingAnchorDay(date, intervalCount).toISOString();
631
- default: return assertNever$8(intervalUnit);
632
- }
633
- }
634
- function getBookingInstalmentPlanIntervalCount(plan) {
635
- switch (plan.kind) {
636
- case "deposit_plus_one_remainder": return plan.remainderDueCount;
637
- case "deposit_plus_scheduled_instalments":
638
- case "equal_scheduled_instalments": return plan.intervalCount;
639
- default: return assertNever$8(plan);
640
- }
641
- }
642
- function omitZeroAmountFutureRows(rows) {
643
- if (rows.length <= 1) return rows;
644
- const firstRow = rows[0];
645
- if (firstRow === void 0) return [];
646
- return [firstRow, ...rows.slice(1).filter((row) => row.amountCents > 0)];
647
- }
648
- function addMonthsPreservingAnchorDay(date, intervalCount) {
649
- const anchorDay = date.getUTCDate();
650
- const nextMonth = new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth() + intervalCount, 1, date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.getUTCMilliseconds()));
651
- const lastDayOfTargetMonth = new Date(Date.UTC(nextMonth.getUTCFullYear(), nextMonth.getUTCMonth() + 1, 0)).getUTCDate();
652
- nextMonth.setUTCDate(Math.min(anchorDay, lastDayOfTargetMonth));
653
- return nextMonth;
654
- }
655
- function assertNever$8(value) {
656
- throw new Error(`Unexpected value: ${String(value)}`);
657
- }
658
- //#endregion
659
- //#region ../core/src/booking-payment-options.ts
660
- /**
661
- * One way a customer may pay for a booking. This is the single definition of
662
- * the option type; `booking-payment-schemas.typetest.ts` keeps it equal to the
663
- * schema's output in both directions.
664
- */
665
- /** When a course's instalments must all be paid by: before its first or its last live session. */
666
- const BOOKING_COURSE_INSTALMENT_DEADLINES = ["first_session", "last_session"];
667
- /** Automatic instalments and a flexible balance cannot share one booking offer. */
668
- function validateBookingPaymentOptionKinds(kinds) {
669
- if (kinds.length === 0) return err$1("no_options");
670
- const uniqueKinds = new Set(kinds);
671
- if (uniqueKinds.size !== kinds.length) return err$1("duplicate_kind");
672
- if (uniqueKinds.has("instalment_plan") && uniqueKinds.has("flexible_balance")) return err$1("incompatible_collection_options");
673
- return ok$2(void 0);
674
- }
675
- //#endregion
676
- //#region ../core/src/booking-date-time/instant.ts
677
- function parseUtcIsoDateTimeString(value) {
678
- const normalized = value.trim();
679
- const hasUtcSuffix = normalized.endsWith("Z");
680
- const hasExplicitOffset = /[+-]\d{2}:\d{2}$/u.test(normalized);
681
- if (!hasUtcSuffix && !hasExplicitOffset) return err$1("missing-timezone-offset");
682
- const date = new Date(normalized);
683
- if (Number.isNaN(date.getTime())) return err$1("invalid-date-time");
684
- return ok$2(date.toISOString());
685
- }
686
- function toUtcIsoDateTimeString(value) {
687
- const parsed = parseUtcIsoDateTimeString(value);
688
- if (!parsed.ok) {
689
- const message = parsed.error === "missing-timezone-offset" ? `Expected an offset-aware ISO datetime, received "${value}"` : `Expected a valid ISO datetime, received "${value}"`;
690
- throw new Error(message);
691
- }
692
- return parsed.value;
693
- }
694
- //#endregion
695
573
  //#region ../core/src/date-time-formatter.ts
696
574
  /** Shared Intl engine, internal to core's date presentation owners. */
697
575
  const FORMATTER_CACHE_LIMIT = 100;
@@ -777,6 +655,25 @@ function resolveBookingBusinessTimeZone(value) {
777
655
  return resolveBookingTimeZoneId(value, DEFAULT_BOOKING_BUSINESS_TIME_ZONE);
778
656
  }
779
657
  //#endregion
658
+ //#region ../core/src/booking-date-time/instant.ts
659
+ function parseUtcIsoDateTimeString(value) {
660
+ const normalized = value.trim();
661
+ const hasUtcSuffix = normalized.endsWith("Z");
662
+ const hasExplicitOffset = /[+-]\d{2}:\d{2}$/u.test(normalized);
663
+ if (!hasUtcSuffix && !hasExplicitOffset) return err$1("missing-timezone-offset");
664
+ const date = new Date(normalized);
665
+ if (Number.isNaN(date.getTime())) return err$1("invalid-date-time");
666
+ return ok$2(date.toISOString());
667
+ }
668
+ function toUtcIsoDateTimeString(value) {
669
+ const parsed = parseUtcIsoDateTimeString(value);
670
+ if (!parsed.ok) {
671
+ const message = parsed.error === "missing-timezone-offset" ? `Expected an offset-aware ISO datetime, received "${value}"` : `Expected a valid ISO datetime, received "${value}"`;
672
+ throw new Error(message);
673
+ }
674
+ return parsed.value;
675
+ }
676
+ //#endregion
780
677
  //#region ../core/src/booking-date-time/local.ts
781
678
  const LOCAL_DATE_PATTERN = /^(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})$/u;
782
679
  function getZonedDateTimeParts(date, timeZone) {
@@ -865,59 +762,6 @@ function resolveLocalInstant(targetLocalMs, timeZone, guess, seen) {
865
762
  return resolveLocalInstant(targetLocalMs, timeZone, nextGuess, [...seen, guess]);
866
763
  }
867
764
  //#endregion
868
- //#region ../core/src/booking-date-time/window.ts
869
- const START_OF_DAY = {
870
- hour: 0,
871
- minute: 0,
872
- second: 0
873
- };
874
- function parseWindowDate(value, field) {
875
- try {
876
- return {
877
- ok: true,
878
- value: parseBookingLocalDate(value)
879
- };
880
- } catch {
881
- return {
882
- ok: false,
883
- field,
884
- reason: "invalid_date_format",
885
- value
886
- };
887
- }
888
- }
889
- function parseBookingUtcDateWindow(input) {
890
- const timeZone = resolveBookingTimeZoneId(input.timeZone);
891
- const start = parseWindowDate(input.startDate, "startDate");
892
- if (!start.ok) return start;
893
- const end = parseWindowDate(input.endDate, "endDate");
894
- if (!end.ok) return end;
895
- const startLocalDate = start.value;
896
- const endLocalDate = end.value;
897
- if (compareLocalScheduleDates(startLocalDate, endLocalDate) > 0) return {
898
- ok: false,
899
- field: "endDate",
900
- reason: "invalid_date_range",
901
- value: input.endDate
902
- };
903
- return {
904
- ok: true,
905
- value: {
906
- timeZone,
907
- startLocalDate,
908
- endLocalDate,
909
- startAt: localScheduleDateTimeToUtcDate(startLocalDate, START_OF_DAY, timeZone),
910
- endExclusive: localScheduleDateTimeToUtcDate(addLocalScheduleDays(endLocalDate, 1), START_OF_DAY, timeZone)
911
- }
912
- };
913
- }
914
- function buildBookingUtcDateWindow(input) {
915
- const result = parseBookingUtcDateWindow(input);
916
- if (result.ok) return result.value;
917
- if (result.reason === "invalid_date_range") throw new Error(`Invalid booking date range: startDate "${input.startDate}" must be on or before endDate "${input.endDate}"`);
918
- throw new Error(`Invalid booking date format: "${result.value}" (expected YYYY-MM-DD)`);
919
- }
920
- //#endregion
921
765
  //#region ../core/src/booking-date-time/scheduled.ts
922
766
  function parseStrictBookingTimeZone(timeZone) {
923
767
  const parsed = parseBookingTimeZone(timeZone);
@@ -1020,6 +864,31 @@ function resolveBookingDisplayContext(input) {
1020
864
  zone: input.surface !== "dashboard" && input.isOnline || input.sessionTimeZone !== input.siteTimeZone ? "always" : "omit"
1021
865
  };
1022
866
  }
867
+ /** Dashboard and assistant site dates read in British English, whatever the site's own language. */
868
+ const SITE_DISPLAY_LOCALE = "en-GB";
869
+ /** The site display policy: `en-GB` in the given zone, falling back to the business zone the server uses. */
870
+ function siteDisplayContext(timeZone) {
871
+ return {
872
+ locale: SITE_DISPLAY_LOCALE,
873
+ timeZone: resolveBookingBusinessTimeZone(timeZone)
874
+ };
875
+ }
876
+ /** A stored instant as a site date, `22 Sept 2026` by default; an unparseable value is shown as it came. */
877
+ function formatSiteInstantDate(iso, timeZone, options = {}) {
878
+ const parsed = parseUtcIsoDateTimeString(iso);
879
+ return parsed.ok ? formatDate$4({
880
+ kind: "instant",
881
+ value: parsed.value
882
+ }, siteDisplayContext(timeZone), {
883
+ date: "short",
884
+ ...options
885
+ }) : iso;
886
+ }
887
+ /** A stored instant as a site time, `2:05pm` without a zone label by default; an unparseable value is shown as it came. */
888
+ function formatSiteInstantTime(iso, timeZone, options = { zone: "omit" }) {
889
+ const parsed = parseUtcIsoDateTimeString(iso);
890
+ return parsed.ok ? formatTime$3(parsed.value, siteDisplayContext(timeZone), options) : iso;
891
+ }
1023
892
  function formatDate$4(value, context, options = {}) {
1024
893
  return presentDate(value, context, displayProfile(options, "omit"));
1025
894
  }
@@ -1224,6 +1093,199 @@ function assertOrdered(start, end) {
1224
1093
  function formatTimeZoneCityLabel(timeZone) {
1225
1094
  return timeZone.startsWith("Etc/") ? "local time" : `${timeZone.split("/").slice(-1)[0]?.replace(/_/gu, " ") ?? timeZone} time`;
1226
1095
  }
1096
+ const MS_PER_HOUR = 36e5;
1097
+ const MS_PER_WEEK = 168 * MS_PER_HOUR;
1098
+ /** The instant bookings stop for something starting at `startsAt`. */
1099
+ function bookingClosesAt(startsAt, cutOffHours) {
1100
+ return (/* @__PURE__ */ new Date(Date.parse(startsAt) - cutOffHours * MS_PER_HOUR)).toISOString();
1101
+ }
1102
+ /** Closing is inclusive, matching the gate: at the exact instant it has closed. */
1103
+ function hasBookingClosed(closesAt, now) {
1104
+ return Date.parse(closesAt) <= now.getTime();
1105
+ }
1106
+ /** The whole hours between closing and the start, for "2 hours before the start". */
1107
+ function bookingCutOffHoursBetween(startsAt, closesAt) {
1108
+ return Math.round((Date.parse(startsAt) - Date.parse(closesAt)) / MS_PER_HOUR);
1109
+ }
1110
+ /**
1111
+ * When bookings closed, in the event's own time zone: "5pm" on the day it starts,
1112
+ * "7pm on Tuesday" earlier in the week, and with the date if it's further back
1113
+ * than that, when a weekday alone could mean the wrong one.
1114
+ */
1115
+ function formatBookingClosedTime(closesAt, startsAt, timeZone) {
1116
+ const time = formatSiteInstantTime(closesAt, timeZone);
1117
+ const dayOf = (iso) => formatSiteInstantDate(iso, timeZone);
1118
+ if (dayOf(closesAt) === dayOf(startsAt)) return time;
1119
+ return `${time} on ${formatSiteInstantDate(closesAt, timeZone, Date.parse(startsAt) - Date.parse(closesAt) >= MS_PER_WEEK ? {
1120
+ date: "long",
1121
+ weekday: "long",
1122
+ year: "omit"
1123
+ } : {
1124
+ date: "omit",
1125
+ weekday: "long",
1126
+ year: "omit"
1127
+ })}`;
1128
+ }
1129
+ /** "1 hour" or "24 hours". */
1130
+ function formatBookingCutOffHours(hours) {
1131
+ return hours === 1 ? "1 hour" : `${hours} hours`;
1132
+ }
1133
+ //#endregion
1134
+ //#region ../core/src/ticket-quantity.ts
1135
+ function toPositiveTicketQuantity(value) {
1136
+ if (!Number.isFinite(value) || !Number.isInteger(value) || value <= 0) return err$1("invalid_quantity");
1137
+ return ok$2(value);
1138
+ }
1139
+ /**
1140
+ * The places a booking holds: the sum of its ticket lines' quantities. The one
1141
+ * derivation for selections, persisted lines and a booking outcome's lines;
1142
+ * null when the total is not a positive whole number.
1143
+ */
1144
+ function deriveTotalTicketQuantity(lines) {
1145
+ const parsed = toPositiveTicketQuantity(lines.reduce((sum, line) => sum + line.quantity, 0));
1146
+ return parsed.ok ? parsed.value : null;
1147
+ }
1148
+ //#endregion
1149
+ //#region ../core/src/booking-flexible-balance.ts
1150
+ function clampFlexibleBalanceConfiguredAmount(amountCents, totalAmountCents) {
1151
+ return Math.max(0, Math.min(amountCents, totalAmountCents));
1152
+ }
1153
+ function resolveFlexibleBalanceInitialPaymentCents(input) {
1154
+ return clampFlexibleBalanceConfiguredAmount(input.config.upfrontAmountCents, input.totalAmountCents);
1155
+ }
1156
+ //#endregion
1157
+ //#region ../core/src/booking-instalments.ts
1158
+ function isDepositBearingBookingInstalmentPlan(plan) {
1159
+ switch (plan.kind) {
1160
+ case "deposit_plus_one_remainder":
1161
+ case "deposit_plus_scheduled_instalments": return true;
1162
+ case "equal_scheduled_instalments": return false;
1163
+ default: return assertNever$8(plan);
1164
+ }
1165
+ }
1166
+ function getBookingInstalmentDepositRefundability(plan) {
1167
+ return isDepositBearingBookingInstalmentPlan(plan) ? plan.depositRefundability : null;
1168
+ }
1169
+ function getBookingInstalmentProtectedDepositAmountCents(plan) {
1170
+ return isDepositBearingBookingInstalmentPlan(plan) ? plan.depositAmountCents : null;
1171
+ }
1172
+ function clampConfiguredAmount(amountCents, totalAmountCents) {
1173
+ return Math.max(0, Math.min(amountCents, totalAmountCents));
1174
+ }
1175
+ function splitAmountWithRemainderInFirst(totalAmountCents, partCount) {
1176
+ if (partCount <= 0) return [];
1177
+ const baseAmountCents = Math.floor(totalAmountCents / partCount);
1178
+ const remainderCents = totalAmountCents - baseAmountCents * partCount;
1179
+ return Array.from({ length: partCount }, (_, index) => index === 0 ? baseAmountCents + remainderCents : baseAmountCents);
1180
+ }
1181
+ function addIntervalPreservingMonthAnchor(isoString, intervalCount, intervalUnit) {
1182
+ const date = new Date(isoString);
1183
+ if (!Number.isFinite(date.getTime())) return isoString;
1184
+ switch (intervalUnit) {
1185
+ case "day":
1186
+ date.setUTCDate(date.getUTCDate() + intervalCount);
1187
+ return date.toISOString();
1188
+ case "week":
1189
+ date.setUTCDate(date.getUTCDate() + intervalCount * 7);
1190
+ return date.toISOString();
1191
+ case "month": return addMonthsPreservingAnchorDay(date, intervalCount).toISOString();
1192
+ default: return assertNever$8(intervalUnit);
1193
+ }
1194
+ }
1195
+ function getBookingInstalmentPlanIntervalCount(plan) {
1196
+ switch (plan.kind) {
1197
+ case "deposit_plus_one_remainder": return plan.remainderDueCount;
1198
+ case "deposit_plus_scheduled_instalments":
1199
+ case "equal_scheduled_instalments": return plan.intervalCount;
1200
+ default: return assertNever$8(plan);
1201
+ }
1202
+ }
1203
+ function omitZeroAmountFutureRows(rows) {
1204
+ if (rows.length <= 1) return rows;
1205
+ const firstRow = rows[0];
1206
+ if (firstRow === void 0) return [];
1207
+ return [firstRow, ...rows.slice(1).filter((row) => row.amountCents > 0)];
1208
+ }
1209
+ function addMonthsPreservingAnchorDay(date, intervalCount) {
1210
+ const anchorDay = date.getUTCDate();
1211
+ const nextMonth = new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth() + intervalCount, 1, date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.getUTCMilliseconds()));
1212
+ const lastDayOfTargetMonth = new Date(Date.UTC(nextMonth.getUTCFullYear(), nextMonth.getUTCMonth() + 1, 0)).getUTCDate();
1213
+ nextMonth.setUTCDate(Math.min(anchorDay, lastDayOfTargetMonth));
1214
+ return nextMonth;
1215
+ }
1216
+ function assertNever$8(value) {
1217
+ throw new Error(`Unexpected value: ${String(value)}`);
1218
+ }
1219
+ //#endregion
1220
+ //#region ../core/src/booking-payment-options.ts
1221
+ /**
1222
+ * One way a customer may pay for a booking. This is the single definition of
1223
+ * the option type; `booking-payment-schemas.typetest.ts` keeps it equal to the
1224
+ * schema's output in both directions.
1225
+ */
1226
+ /** When a course's instalments must all be paid by: before its first or its last live session. */
1227
+ const BOOKING_COURSE_INSTALMENT_DEADLINES = ["first_session", "last_session"];
1228
+ /** Automatic instalments and a flexible balance cannot share one booking offer. */
1229
+ function validateBookingPaymentOptionKinds(kinds) {
1230
+ if (kinds.length === 0) return err$1("no_options");
1231
+ const uniqueKinds = new Set(kinds);
1232
+ if (uniqueKinds.size !== kinds.length) return err$1("duplicate_kind");
1233
+ if (uniqueKinds.has("instalment_plan") && uniqueKinds.has("flexible_balance")) return err$1("incompatible_collection_options");
1234
+ return ok$2(void 0);
1235
+ }
1236
+ //#endregion
1237
+ //#region ../core/src/booking-date-time/window.ts
1238
+ const START_OF_DAY = {
1239
+ hour: 0,
1240
+ minute: 0,
1241
+ second: 0
1242
+ };
1243
+ function parseWindowDate(value, field) {
1244
+ try {
1245
+ return {
1246
+ ok: true,
1247
+ value: parseBookingLocalDate(value)
1248
+ };
1249
+ } catch {
1250
+ return {
1251
+ ok: false,
1252
+ field,
1253
+ reason: "invalid_date_format",
1254
+ value
1255
+ };
1256
+ }
1257
+ }
1258
+ function parseBookingUtcDateWindow(input) {
1259
+ const timeZone = resolveBookingTimeZoneId(input.timeZone);
1260
+ const start = parseWindowDate(input.startDate, "startDate");
1261
+ if (!start.ok) return start;
1262
+ const end = parseWindowDate(input.endDate, "endDate");
1263
+ if (!end.ok) return end;
1264
+ const startLocalDate = start.value;
1265
+ const endLocalDate = end.value;
1266
+ if (compareLocalScheduleDates(startLocalDate, endLocalDate) > 0) return {
1267
+ ok: false,
1268
+ field: "endDate",
1269
+ reason: "invalid_date_range",
1270
+ value: input.endDate
1271
+ };
1272
+ return {
1273
+ ok: true,
1274
+ value: {
1275
+ timeZone,
1276
+ startLocalDate,
1277
+ endLocalDate,
1278
+ startAt: localScheduleDateTimeToUtcDate(startLocalDate, START_OF_DAY, timeZone),
1279
+ endExclusive: localScheduleDateTimeToUtcDate(addLocalScheduleDays(endLocalDate, 1), START_OF_DAY, timeZone)
1280
+ }
1281
+ };
1282
+ }
1283
+ function buildBookingUtcDateWindow(input) {
1284
+ const result = parseBookingUtcDateWindow(input);
1285
+ if (result.ok) return result.value;
1286
+ if (result.reason === "invalid_date_range") throw new Error(`Invalid booking date range: startDate "${input.startDate}" must be on or before endDate "${input.endDate}"`);
1287
+ throw new Error(`Invalid booking date format: "${result.value}" (expected YYYY-MM-DD)`);
1288
+ }
1227
1289
  //#endregion
1228
1290
  //#region ../core/src/site-terms.ts
1229
1291
  function siteTermsApplies(operation, items) {
@@ -3415,16 +3477,17 @@ function nextLiveRunSessionStartMs(sessions, now) {
3415
3477
  return next === void 0 ? null : sessionStartMs(next);
3416
3478
  }
3417
3479
  /**
3418
- * Booking stays open until the run's first surviving session has started.
3480
+ * Booking stays open until the run's cut-off, counted from its first surviving
3481
+ * session. A cut-off of zero closes it as that session starts.
3419
3482
  *
3420
3483
  * There has to be something left to sell: a run with no schedule at all, or one
3421
3484
  * whose every session has been cancelled, is closed rather than open. Adding a
3422
3485
  * future session opens it again, subject to the usual status, visibility and
3423
3486
  * admission rules.
3424
3487
  */
3425
- function isWholeSeriesRegistrationOpen(sessions, now) {
3426
- const firstStart = firstLiveRunSessionStartMs(sessions);
3427
- return firstStart !== null && firstStart > now.getTime();
3488
+ function isWholeSeriesRegistrationOpen(sessions, now, cutOffHours) {
3489
+ const first = orderedLiveRunSessions(sessions)[0];
3490
+ return first !== void 0 && !hasBookingClosed(bookingClosesAt(first.startsAt, cutOffHours), now);
3428
3491
  }
3429
3492
  /**
3430
3493
  * Where the run sits in its own life, independent of any one session.
@@ -3449,8 +3512,8 @@ function resolveWholeSeriesRunLifecycle(input, now) {
3449
3512
  * Whether a prepared run is still inviting bookings at render time.
3450
3513
  *
3451
3514
  * `lifecycle` and `enrollmentOpen` come from the projection; the first session
3452
- * start is the one fact re-read against `now`, because that is the boundary a
3453
- * cached page can cross while it sits in front of a visitor.
3515
+ * start and the cut-off are the facts re-read against `now`, because those are
3516
+ * the boundaries a cached page can cross while it sits in front of a visitor.
3454
3517
  */
3455
3518
  function resolveWholeSeriesBookingPhase(run, now) {
3456
3519
  switch (run.lifecycle) {
@@ -3471,10 +3534,14 @@ function resolveWholeSeriesBookingPhase(run, now) {
3471
3534
  kind: "closed",
3472
3535
  reason: "no-sessions"
3473
3536
  };
3474
- if (!isWholeSeriesRegistrationOpen(run.sessions, now)) return {
3537
+ if (!isWholeSeriesRegistrationOpen(run.sessions, now, 0)) return {
3475
3538
  kind: "closed",
3476
3539
  reason: "in-progress"
3477
3540
  };
3541
+ if (run.bookingClosesAt !== void 0 && hasBookingClosed(run.bookingClosesAt, now)) return {
3542
+ kind: "closed",
3543
+ reason: "bookings-closed"
3544
+ };
3478
3545
  return run.enrollmentOpen ? { kind: "open" } : {
3479
3546
  kind: "closed",
3480
3547
  reason: "enrolment-closed"
@@ -32948,8 +33015,10 @@ const arrangementEndRequestSchema = z.object({
32948
33015
  ...recordedReturn,
32949
33016
  lastDate: localDate
32950
33017
  }).strict();
32951
- z.object({
33018
+ /** `expectedUpdatedAt` is the version the dialog was showing, so a save can't overwrite a newer change. */
33019
+ const arrangementEditSchema = z.object({
32952
33020
  ...operation,
33021
+ expectedUpdatedAt: z.string().min(1),
32953
33022
  serviceId: z.string().uuid(),
32954
33023
  holdsTime: z.boolean(),
32955
33024
  payment: arrangementPaymentSchema
@@ -32983,6 +33052,11 @@ z.discriminatedUnion("kind", [
32983
33052
  kind: z.literal("end"),
32984
33053
  arrangementId: z.string().uuid(),
32985
33054
  request: arrangementEndRequestSchema
33055
+ }).strict(),
33056
+ z.object({
33057
+ kind: z.literal("edit"),
33058
+ arrangementId: z.string().uuid(),
33059
+ request: arrangementEditSchema
32986
33060
  }).strict()
32987
33061
  ]);
32988
33062
  const arrangementTimeOffChoiceSchema = z.discriminatedUnion("kind", [
@@ -33683,6 +33757,20 @@ const APPOINTMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
33683
33757
  auth: "user",
33684
33758
  responseKind: "json"
33685
33759
  },
33760
+ listStaffServiceOnlineDetails: {
33761
+ path: "/sites/{siteId}/bookings/resources/{resourceId}/services/online-details",
33762
+ method: "GET",
33763
+ auth: "user",
33764
+ responseKind: "json",
33765
+ errors: []
33766
+ },
33767
+ setStaffServiceOnlineDetails: {
33768
+ path: "/sites/{siteId}/bookings/resources/{resourceId}/services/online-details",
33769
+ method: "PUT",
33770
+ auth: "user",
33771
+ responseKind: "json",
33772
+ errors: []
33773
+ },
33686
33774
  getServiceResources: {
33687
33775
  path: "/sites/{siteId}/bookings/services/{serviceId}/resources",
33688
33776
  method: "GET",
@@ -34080,6 +34168,18 @@ const EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS = defineEndpointDefinitions
34080
34168
  "server:internal_error"
34081
34169
  ]
34082
34170
  },
34171
+ setEventAttendeesNoShow: {
34172
+ path: "/sites/{siteId}/bookings/attendees/no-show",
34173
+ method: "POST",
34174
+ auth: "user",
34175
+ responseKind: "json",
34176
+ errors: [
34177
+ "validation:invalid_input",
34178
+ "auth:forbidden",
34179
+ "resource:conflict",
34180
+ "server:internal_error"
34181
+ ]
34182
+ },
34083
34183
  listEventOfferingCombinationPrices: {
34084
34184
  path: "/sites/{siteId}/bookings/event-offerings/{eventOfferingId}/combination-prices",
34085
34185
  method: "GET",
@@ -42586,6 +42686,27 @@ const API_ENDPOINTS = {
42586
42686
  responseKind: "json",
42587
42687
  errors: []
42588
42688
  },
42689
+ portalEntryPreview: {
42690
+ path: "/portal/auth/entry/preview",
42691
+ method: "POST",
42692
+ auth: "public",
42693
+ responseKind: "json",
42694
+ errors: []
42695
+ },
42696
+ portalEntryRedeem: {
42697
+ path: "/portal/auth/entry/redeem",
42698
+ method: "POST",
42699
+ auth: "public",
42700
+ responseKind: "json",
42701
+ errors: []
42702
+ },
42703
+ portalEntryResend: {
42704
+ path: "/portal/auth/entry/resend",
42705
+ method: "POST",
42706
+ auth: "public",
42707
+ responseKind: "json",
42708
+ errors: []
42709
+ },
42589
42710
  portalLogout: {
42590
42711
  path: "/portal/auth/logout",
42591
42712
  method: "POST",
@@ -80569,6 +80690,8 @@ const publicWholeSeriesRunSchema = z.object({
80569
80690
  eventSeriesId: z.string(),
80570
80691
  eventOfferingId: z.string(),
80571
80692
  enrollmentOpen: z.boolean(),
80693
+ /** Present when bookings stop before the first session. Older sites ignore it. */
80694
+ bookingClosesAt: z.string().optional(),
80572
80695
  visibility: z.enum(["public", "unlisted"]),
80573
80696
  lifecycle: z.enum([
80574
80697
  "upcoming",
@@ -80616,6 +80739,11 @@ const publicEventBaseSchema = z.object({
80616
80739
  requiresRegistration: z.boolean(),
80617
80740
  bookingAvailability: publicEventBookingAvailabilitySchema,
80618
80741
  bookingClosedDetail: publicEventBookingClosedDetailSchema.optional(),
80742
+ /**
80743
+ * Present when bookings stop before this date starts. It's what says "closed
80744
+ * early": the closed reasons stay as they are, so older sites keep working.
80745
+ */
80746
+ bookingClosesAt: z.string().optional(),
80619
80747
  deliveryMode: z.enum([
80620
80748
  "in_person",
80621
80749
  "online",
@@ -89608,11 +89736,19 @@ function rowFor(rows, mode) {
89608
89736
  * capacity comes from the shared event-domain helpers so uncapped, fallback,
89609
89737
  * and hybrid attendance-mode cases agree with the registration runtime.
89610
89738
  */
89611
- function isBookableEvent(event) {
89739
+ function isBookableEvent(event, now) {
89612
89740
  if (!event.requiresRegistration) return false;
89613
89741
  if (event.bookingAvailability.kind !== "open") return false;
89742
+ if (now && hasEventBookingClosedEarly(event, now)) return false;
89614
89743
  return !isEventFull(event) || canJoinEventWaitlistOnAnyMode(event);
89615
89744
  }
89745
+ /**
89746
+ * Whether a date has passed its cut-off by this clock. The projected availability
89747
+ * can be older than the page it's on, and a cut-off makes that gap matter more.
89748
+ */
89749
+ function hasEventBookingClosedEarly(event, now) {
89750
+ return event.bookingClosesAt !== void 0 && hasBookingClosed(event.bookingClosesAt, now);
89751
+ }
89616
89752
  //#endregion
89617
89753
  //#region ../blocks/src/system/blocks/events/shared/pageSelection.ts
89618
89754
  /**
@@ -89672,7 +89808,7 @@ function planOrdinarySeriesSelection(events) {
89672
89808
  const ordinary = events.filter(isOrdinaryPublicEvent);
89673
89809
  const firstSeriesId = ordinary[0]?.seriesId;
89674
89810
  if (!firstSeriesId || ordinary.some((event) => event.seriesId !== firstSeriesId)) return null;
89675
- const [first, second] = ordinary.filter(isBookableEvent);
89811
+ const [first, second] = ordinary.filter((event) => isBookableEvent(event));
89676
89812
  if (first && second) {
89677
89813
  const [a, b, ...rest] = [...ordinary].filter(isOpenForBooking).sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt));
89678
89814
  if (a && b) return {
@@ -89883,6 +90019,243 @@ function isCancelledOrdinaryDate(event) {
89883
90019
  //#region ../blocks/src/system/blocks/shared/bookingPageKind.ts
89884
90020
  const bookingPageKindSchema = z.enum(["fullPage", "bookingPage"]);
89885
90021
  //#endregion
90022
+ //#region ../blocks/src/system/runtime/nodes/events/domain/dates.ts
90023
+ /** Event presentation adapters; core owns projection, clocks and ranges. */
90024
+ function eventDateLocale(siteTimeZone) {
90025
+ return inferSiteDateLocale(siteTimeZone);
90026
+ }
90027
+ function eventCalendarWeekStart(timeZone, override) {
90028
+ return override ?? (inferSiteDateLocale(resolveBookingBusinessTimeZone(timeZone)) === "en-US" ? "sunday" : "monday");
90029
+ }
90030
+ /** Admit older wire zones once; the booking business fallback remains London. */
90031
+ function eventDateOptions(place) {
90032
+ const siteTimeZone = resolveBookingBusinessTimeZone(place.siteTimeZone);
90033
+ const resolved = resolveBookingDisplayContext({
90034
+ sessionTimeZone: resolveBookingTimeZoneId(place.timeZone, siteTimeZone),
90035
+ siteTimeZone,
90036
+ locale: inferSiteDateLocale(siteTimeZone),
90037
+ isOnline: place.isOnline === true || place.deliveryMode === "online" || place.deliveryMode === "hybrid",
90038
+ surface: "public"
90039
+ });
90040
+ return {
90041
+ ...resolved.context,
90042
+ zone: resolved.zone
90043
+ };
90044
+ }
90045
+ /** Overnight spans keep their end day; folds retain both distinct offsets. */
90046
+ function formatEventTimeRange(times, options) {
90047
+ const start = toUtcIsoDateTimeString(times.startsAt);
90048
+ const end = toUtcIsoDateTimeString(times.endsAt);
90049
+ const startDay = getLocalScheduleDate(new Date(start), options.timeZone);
90050
+ const endDay = getLocalScheduleDate(new Date(end), options.timeZone);
90051
+ return startDay.year === endDay.year && startDay.month === endDay.month && startDay.day === endDay.day ? formatTimeRange(start, end, options, { zone: options.zone }) : formatDateTimeRange({
90052
+ start,
90053
+ end
90054
+ }, options, {
90055
+ date: "short",
90056
+ zone: options.zone
90057
+ });
90058
+ }
90059
+ function resolveEventTimeZone(event, calendarTimeZone) {
90060
+ return resolveBookingTimeZoneId(event.timeZone, resolveBookingBusinessTimeZone(calendarTimeZone));
90061
+ }
90062
+ function formatDate$2(isoTimestamp, options) {
90063
+ return formatDate$4({
90064
+ kind: "instant",
90065
+ value: toUtcIsoDateTimeString(isoTimestamp)
90066
+ }, options, {
90067
+ date: "short",
90068
+ weekday: "long"
90069
+ });
90070
+ }
90071
+ function formatTime$2(isoTimestamp, options) {
90072
+ return formatTime$3(toUtcIsoDateTimeString(isoTimestamp), options, { zone: options.zone });
90073
+ }
90074
+ function formatEventDateParts(args) {
90075
+ return {
90076
+ date: formatDate$2(args.startsAt, args),
90077
+ timeRange: formatEventTimeRange(args, args)
90078
+ };
90079
+ }
90080
+ /** A course run's first to last session date, such as `8–22 Sept 2026`. */
90081
+ function formatEventRunDates(first, last, options) {
90082
+ return formatDateRange({
90083
+ kind: "instant",
90084
+ value: toUtcIsoDateTimeString(first.startsAt)
90085
+ }, {
90086
+ kind: "instant",
90087
+ value: toUtcIsoDateTimeString(last.startsAt)
90088
+ }, options, {
90089
+ date: "short",
90090
+ order: "session"
90091
+ });
90092
+ }
90093
+ /** Civil calendar headings never acquire an instant's timezone shift. */
90094
+ function formatCalendarTitle(viewDate, view, days, timeZone) {
90095
+ const context = eventDateOptions({
90096
+ siteTimeZone: timeZone,
90097
+ timeZone
90098
+ });
90099
+ const first = days[0];
90100
+ const last = days[6];
90101
+ return view === "week" && first && last ? formatDateRange({
90102
+ kind: "civil",
90103
+ value: first
90104
+ }, {
90105
+ kind: "civil",
90106
+ value: last
90107
+ }, context, { date: "short" }) : formatDate$4({
90108
+ kind: "civil",
90109
+ value: viewDate
90110
+ }, context, {
90111
+ date: "long",
90112
+ day: "omit"
90113
+ });
90114
+ }
90115
+ function buildCalendarViewport(input) {
90116
+ const viewport = buildCalendarViewport$1(input);
90117
+ return {
90118
+ ...viewport,
90119
+ title: formatCalendarTitle(input.anchorDate, input.view, viewport.days, input.timeZone)
90120
+ };
90121
+ }
90122
+ /** Tick digits are civil clock values, not session instants. */
90123
+ function formatEventHourLabel(hour, timeZone) {
90124
+ return formatEventClockLabel(`${String(hour % 24).padStart(2, "0")}:00`, eventDateLocale(timeZone));
90125
+ }
90126
+ /** Weekly cadence and tick clocks are civil values; UTC only carries their components. */
90127
+ function formatEventClockLabel(value, locale) {
90128
+ const clock = parseLocalScheduleTime(value);
90129
+ return formatTime$3(toUtcIsoDateTimeString(new Date(Date.UTC(2e3, 0, 1, clock.hour, clock.minute)).toISOString()), {
90130
+ locale,
90131
+ timeZone: resolveBookingBusinessTimeZone("UTC")
90132
+ }, { zone: "omit" });
90133
+ }
90134
+ function formatEventCompactDateRail(isoTimestamp, options, letterCase = "capitals") {
90135
+ const instant = {
90136
+ kind: "instant",
90137
+ value: toUtcIsoDateTimeString(isoTimestamp)
90138
+ };
90139
+ const cased = (value) => letterCase === "capitals" ? value.toLocaleUpperCase(options.locale) : value;
90140
+ return {
90141
+ weekday: cased(formatDate$4(instant, options, {
90142
+ date: "omit",
90143
+ weekday: "short",
90144
+ year: "omit"
90145
+ })),
90146
+ fullWeekday: formatDate$4(instant, options, {
90147
+ date: "omit",
90148
+ weekday: "long",
90149
+ year: "omit"
90150
+ }),
90151
+ day: formatDate$4(instant, options, {
90152
+ date: "omit",
90153
+ day: "numeric",
90154
+ year: "omit"
90155
+ }),
90156
+ month: cased(formatDate$4(instant, options, {
90157
+ date: "short",
90158
+ day: "omit",
90159
+ year: "omit"
90160
+ }).slice(0, 3)),
90161
+ label: formatDate$4(instant, options, {
90162
+ date: "long",
90163
+ weekday: "long"
90164
+ })
90165
+ };
90166
+ }
90167
+ /**
90168
+ * Format the next occurrence for the image-free catalogue card treatment.
90169
+ *
90170
+ * The compact rail already owns this short, booking-local date vocabulary;
90171
+ * keep the fact panel on the same date and timezone rules as event rows.
90172
+ */
90173
+ function formatEventNextDateFact(event) {
90174
+ const rail = formatEventCompactDateRail(event.startsAt, eventDateOptions(event));
90175
+ return {
90176
+ dateTime: event.startsAt,
90177
+ value: `${rail.weekday} ${rail.day} ${rail.month}`,
90178
+ label: rail.label
90179
+ };
90180
+ }
90181
+ /**
90182
+ * Group events by their local date (YYYY-MM-DD key in each event's own
90183
+ * timezone). Thin domain wrapper over `groupItemsByDate` from the calendar
90184
+ * package; preserves the historical `Map<string, PublicEvent[]>` shape.
90185
+ */
90186
+ function groupEventsByDate(events, calendarTimeZone) {
90187
+ const grouped = groupItemsByDate(events, {
90188
+ getStartsAt: (event) => event.startsAt,
90189
+ getTimeZone: () => calendarTimeZone
90190
+ });
90191
+ return new Map([...grouped].map(([dateKey, bucket]) => [dateKey, [...bucket]]));
90192
+ }
90193
+ /** Stable local-day identity shared by ledger continuations and day groups. */
90194
+ function eventLocalDateKey(event) {
90195
+ return getBookingLocalDateKey(toScheduledBookingDateTime({
90196
+ startsAt: event.startsAt,
90197
+ timeZone: resolveBookingBusinessTimeZone(event.timeZone),
90198
+ locale: "en-GB"
90199
+ }));
90200
+ }
90201
+ /** Full weekday and the existing zone-aware time range for a weekly running list. */
90202
+ function formatEventWeekdayTime(event) {
90203
+ const options = eventDateOptions(event);
90204
+ return `${formatDate$4({
90205
+ kind: "instant",
90206
+ value: toUtcIsoDateTimeString(event.startsAt)
90207
+ }, options, {
90208
+ date: "omit",
90209
+ weekday: "long",
90210
+ year: "omit"
90211
+ })} · ${formatEventTimeRange(event, options)}`;
90212
+ }
90213
+ //#endregion
90214
+ //#region ../blocks/src/system/runtime/nodes/event-registration/closedEarlyCopy.ts
90215
+ const isWeekly$1 = (event) => event.scheduleScope === "recurring";
90216
+ function eventTimeZone(event) {
90217
+ return eventDateOptions(event).timeZone;
90218
+ }
90219
+ /** On a date's own read both `path` and the destination name that date; its event's page is one level up. */
90220
+ function eventOwnPagePath(event) {
90221
+ const path = getPublicEventCanonicalPath(event);
90222
+ const dateSegment = `/${event.occurrenceId}`;
90223
+ return path?.endsWith(dateSegment) ? path.slice(0, -dateSegment.length) || "/" : path;
90224
+ }
90225
+ /** "Bookings close 2 hours before the start.", while they're still open. */
90226
+ function openBookingLine(event) {
90227
+ if (!event.bookingClosesAt) return null;
90228
+ const before = formatBookingCutOffHours(bookingCutOffHoursBetween(event.startsAt, event.bookingClosesAt));
90229
+ return isWeekly$1(event) ? `Bookings for each date close ${before} before the start.` : `Bookings close ${before} before the start.`;
90230
+ }
90231
+ /** The course's open line, counted from its first session still running. */
90232
+ function openRunBookingLine(run) {
90233
+ const first = orderedLiveRunSessions(run.sessions)[0];
90234
+ if (!run.bookingClosesAt || !first) return null;
90235
+ return `Bookings close ${formatBookingCutOffHours(bookingCutOffHoursBetween(first.startsAt, run.bookingClosesAt))} before the first session.`;
90236
+ }
90237
+ /** One date between its cut-off and its start, or null. */
90238
+ function closedDateCopy(event, now) {
90239
+ const closesAt = event.bookingClosesAt;
90240
+ if (!closesAt || !hasBookingClosed(closesAt, now) || Date.parse(event.startsAt) <= now.getTime()) return null;
90241
+ const zone = eventTimeZone(event);
90242
+ const closed = formatBookingClosedTime(closesAt, event.startsAt, zone);
90243
+ const start = formatBookingClosedTime(event.startsAt, event.startsAt, zone);
90244
+ const before = formatBookingCutOffHours(bookingCutOffHoursBetween(event.startsAt, closesAt));
90245
+ const weekly = isWeekly$1(event);
90246
+ return {
90247
+ titleText: weekly ? "Bookings for this date have closed" : "Bookings for this event have closed",
90248
+ bodyText: `Bookings closed at ${closed}, ${before} before the ${start} start. The organiser may still be able to help if you’d like to come.`,
90249
+ otherDatesHref: weekly ? eventOwnPagePath(event) : null
90250
+ };
90251
+ }
90252
+ /** The body of a course past its cut-off, or null if the run doesn't say when. */
90253
+ function closedRunBody(run) {
90254
+ const first = orderedLiveRunSessions(run.sessions)[0];
90255
+ if (!run.bookingClosesAt || !first) return null;
90256
+ return `Bookings closed at ${formatBookingClosedTime(run.bookingClosesAt, first.startsAt, first.timeZone)}, ${formatBookingCutOffHours(bookingCutOffHoursBetween(first.startsAt, run.bookingClosesAt))} before the first session. The organiser may still be able to help if you’d like to join.`;
90257
+ }
90258
+ //#endregion
89886
90259
  //#region ../blocks/src/system/runtime/nodes/event-registration/closedRunCopy.ts
89887
90260
  const copy = {
89888
90261
  cancelled: {
@@ -89897,6 +90270,10 @@ const copy = {
89897
90270
  titleText: "These dates have finished",
89898
90271
  bodyText: "The details are kept here for reference."
89899
90272
  },
90273
+ "bookings-closed": {
90274
+ titleText: "Bookings for these dates have closed",
90275
+ bodyText: "Bookings for these dates have closed. The organiser may still be able to help if you’d like to join."
90276
+ },
89900
90277
  "enrolment-closed": {
89901
90278
  titleText: "Booking closed",
89902
90279
  bodyText: "Bookings are no longer being taken for these dates."
@@ -89906,8 +90283,27 @@ const copy = {
89906
90283
  bodyText: "There are no dates to book at the moment. The organiser may add more, and anything already booked still stands."
89907
90284
  }
89908
90285
  };
89909
- function closedRunCopy(reason) {
89910
- return copy[reason];
90286
+ /** A run past its cut-off says when it closed, if it can. */
90287
+ function closedRunCopy(reason, run) {
90288
+ const body = reason === "bookings-closed" && run ? closedRunBody(run) : null;
90289
+ return body ? {
90290
+ ...copy[reason],
90291
+ bodyText: body
90292
+ } : copy[reason];
90293
+ }
90294
+ /**
90295
+ * A list of dates closes once none is left to book and at least one stopped at
90296
+ * its cut-off. Until then the closed ones just leave the list. There's nothing
90297
+ * further to point at, so the copy offers no other dates.
90298
+ */
90299
+ function closedDatesCopy(dates, now) {
90300
+ if (dates.some((date) => Date.parse(date.startsAt) > now.getTime() && !(date.bookingClosesAt && hasBookingClosed(date.bookingClosesAt, now)))) return null;
90301
+ const [firstClosed] = dates.flatMap((date) => closedDateCopy(date, now) ?? []);
90302
+ if (!firstClosed) return null;
90303
+ return {
90304
+ ...dates.length > 1 ? copy["bookings-closed"] : firstClosed,
90305
+ otherDatesHref: null
90306
+ };
89911
90307
  }
89912
90308
  //#endregion
89913
90309
  //#region ../blocks/src/system/runtime/shared/navigation/pageNavigation.ts
@@ -90280,9 +90676,15 @@ function occurrenceCardAvailability(event, count) {
90280
90676
  status: availability.isFull ? "full" : availability.status === "filling" ? "low" : "available"
90281
90677
  } : null;
90282
90678
  }
90283
- /** Preserve projected closure reasons; only an open native run needs its clock rechecked. */
90679
+ /** Preserve projected closure reasons; only an open native booking needs its clock rechecked. */
90284
90680
  function renderClockClosedCta(event, now) {
90285
- if (!now || event.bookingScope !== "whole_series" || event.destination.kind !== "native") return null;
90681
+ if (!now || event.destination.kind !== "native") return null;
90682
+ if (event.bookingScope !== "whole_series") return hasEventBookingClosedEarly(event, now) ? {
90683
+ label: "Registration closed",
90684
+ href: resolveEventHref(event),
90685
+ external: false,
90686
+ hidden: true
90687
+ } : null;
90286
90688
  const phase = resolveWholeSeriesBookingPhase(event.run, now);
90287
90689
  if (phase.kind === "open") return null;
90288
90690
  return {
@@ -90291,6 +90693,7 @@ function renderClockClosedCta(event, now) {
90291
90693
  case "cancelled": return "Cancelled";
90292
90694
  case "completed": return "Completed";
90293
90695
  case "in-progress":
90696
+ case "bookings-closed":
90294
90697
  case "enrolment-closed":
90295
90698
  case "no-sessions": return "Registration closed";
90296
90699
  default: return assertNever$9(phase.reason);
@@ -90298,201 +90701,9 @@ function renderClockClosedCta(event, now) {
90298
90701
  })(),
90299
90702
  href: resolveEventHref(event),
90300
90703
  external: false,
90301
- hidden: phase.reason !== "enrolment-closed"
90302
- };
90303
- }
90304
- //#endregion
90305
- //#region ../blocks/src/system/runtime/nodes/events/domain/dates.ts
90306
- /** Event presentation adapters; core owns projection, clocks and ranges. */
90307
- function eventDateLocale(siteTimeZone) {
90308
- return inferSiteDateLocale(siteTimeZone);
90309
- }
90310
- function eventCalendarWeekStart(timeZone, override) {
90311
- return override ?? (inferSiteDateLocale(resolveBookingBusinessTimeZone(timeZone)) === "en-US" ? "sunday" : "monday");
90312
- }
90313
- /** Admit older wire zones once; the booking business fallback remains London. */
90314
- function eventDateOptions(place) {
90315
- const siteTimeZone = resolveBookingBusinessTimeZone(place.siteTimeZone);
90316
- const resolved = resolveBookingDisplayContext({
90317
- sessionTimeZone: resolveBookingTimeZoneId(place.timeZone, siteTimeZone),
90318
- siteTimeZone,
90319
- locale: inferSiteDateLocale(siteTimeZone),
90320
- isOnline: place.isOnline === true || place.deliveryMode === "online" || place.deliveryMode === "hybrid",
90321
- surface: "public"
90322
- });
90323
- return {
90324
- ...resolved.context,
90325
- zone: resolved.zone
90326
- };
90327
- }
90328
- /** Overnight spans keep their end day; folds retain both distinct offsets. */
90329
- function formatEventTimeRange(times, options) {
90330
- const start = toUtcIsoDateTimeString(times.startsAt);
90331
- const end = toUtcIsoDateTimeString(times.endsAt);
90332
- const startDay = getLocalScheduleDate(new Date(start), options.timeZone);
90333
- const endDay = getLocalScheduleDate(new Date(end), options.timeZone);
90334
- return startDay.year === endDay.year && startDay.month === endDay.month && startDay.day === endDay.day ? formatTimeRange(start, end, options, { zone: options.zone }) : formatDateTimeRange({
90335
- start,
90336
- end
90337
- }, options, {
90338
- date: "short",
90339
- zone: options.zone
90340
- });
90341
- }
90342
- function resolveEventTimeZone(event, calendarTimeZone) {
90343
- return resolveBookingTimeZoneId(event.timeZone, resolveBookingBusinessTimeZone(calendarTimeZone));
90344
- }
90345
- function formatDate$2(isoTimestamp, options) {
90346
- return formatDate$4({
90347
- kind: "instant",
90348
- value: toUtcIsoDateTimeString(isoTimestamp)
90349
- }, options, {
90350
- date: "short",
90351
- weekday: "long"
90352
- });
90353
- }
90354
- function formatTime$2(isoTimestamp, options) {
90355
- return formatTime$3(toUtcIsoDateTimeString(isoTimestamp), options, { zone: options.zone });
90356
- }
90357
- function formatEventDateParts(args) {
90358
- return {
90359
- date: formatDate$2(args.startsAt, args),
90360
- timeRange: formatEventTimeRange(args, args)
90361
- };
90362
- }
90363
- /** A course run's first to last session date, such as `8–22 Sept 2026`. */
90364
- function formatEventRunDates(first, last, options) {
90365
- return formatDateRange({
90366
- kind: "instant",
90367
- value: toUtcIsoDateTimeString(first.startsAt)
90368
- }, {
90369
- kind: "instant",
90370
- value: toUtcIsoDateTimeString(last.startsAt)
90371
- }, options, {
90372
- date: "short",
90373
- order: "session"
90374
- });
90375
- }
90376
- /** Civil calendar headings never acquire an instant's timezone shift. */
90377
- function formatCalendarTitle(viewDate, view, days, timeZone) {
90378
- const context = eventDateOptions({
90379
- siteTimeZone: timeZone,
90380
- timeZone
90381
- });
90382
- const first = days[0];
90383
- const last = days[6];
90384
- return view === "week" && first && last ? formatDateRange({
90385
- kind: "civil",
90386
- value: first
90387
- }, {
90388
- kind: "civil",
90389
- value: last
90390
- }, context, { date: "short" }) : formatDate$4({
90391
- kind: "civil",
90392
- value: viewDate
90393
- }, context, {
90394
- date: "long",
90395
- day: "omit"
90396
- });
90397
- }
90398
- function buildCalendarViewport(input) {
90399
- const viewport = buildCalendarViewport$1(input);
90400
- return {
90401
- ...viewport,
90402
- title: formatCalendarTitle(input.anchorDate, input.view, viewport.days, input.timeZone)
90403
- };
90404
- }
90405
- /** Tick digits are civil clock values, not session instants. */
90406
- function formatEventHourLabel(hour, timeZone) {
90407
- return formatEventClockLabel(`${String(hour % 24).padStart(2, "0")}:00`, eventDateLocale(timeZone));
90408
- }
90409
- /** Weekly cadence and tick clocks are civil values; UTC only carries their components. */
90410
- function formatEventClockLabel(value, locale) {
90411
- const clock = parseLocalScheduleTime(value);
90412
- return formatTime$3(toUtcIsoDateTimeString(new Date(Date.UTC(2e3, 0, 1, clock.hour, clock.minute)).toISOString()), {
90413
- locale,
90414
- timeZone: resolveBookingBusinessTimeZone("UTC")
90415
- }, { zone: "omit" });
90416
- }
90417
- function formatEventCompactDateRail(isoTimestamp, options, letterCase = "capitals") {
90418
- const instant = {
90419
- kind: "instant",
90420
- value: toUtcIsoDateTimeString(isoTimestamp)
90421
- };
90422
- const cased = (value) => letterCase === "capitals" ? value.toLocaleUpperCase(options.locale) : value;
90423
- return {
90424
- weekday: cased(formatDate$4(instant, options, {
90425
- date: "omit",
90426
- weekday: "short",
90427
- year: "omit"
90428
- })),
90429
- fullWeekday: formatDate$4(instant, options, {
90430
- date: "omit",
90431
- weekday: "long",
90432
- year: "omit"
90433
- }),
90434
- day: formatDate$4(instant, options, {
90435
- date: "omit",
90436
- day: "numeric",
90437
- year: "omit"
90438
- }),
90439
- month: cased(formatDate$4(instant, options, {
90440
- date: "short",
90441
- day: "omit",
90442
- year: "omit"
90443
- }).slice(0, 3)),
90444
- label: formatDate$4(instant, options, {
90445
- date: "long",
90446
- weekday: "long"
90447
- })
90448
- };
90449
- }
90450
- /**
90451
- * Format the next occurrence for the image-free catalogue card treatment.
90452
- *
90453
- * The compact rail already owns this short, booking-local date vocabulary;
90454
- * keep the fact panel on the same date and timezone rules as event rows.
90455
- */
90456
- function formatEventNextDateFact(event) {
90457
- const rail = formatEventCompactDateRail(event.startsAt, eventDateOptions(event));
90458
- return {
90459
- dateTime: event.startsAt,
90460
- value: `${rail.weekday} ${rail.day} ${rail.month}`,
90461
- label: rail.label
90704
+ hidden: phase.reason !== "enrolment-closed" && phase.reason !== "bookings-closed"
90462
90705
  };
90463
90706
  }
90464
- /**
90465
- * Group events by their local date (YYYY-MM-DD key in each event's own
90466
- * timezone). Thin domain wrapper over `groupItemsByDate` from the calendar
90467
- * package; preserves the historical `Map<string, PublicEvent[]>` shape.
90468
- */
90469
- function groupEventsByDate(events, calendarTimeZone) {
90470
- const grouped = groupItemsByDate(events, {
90471
- getStartsAt: (event) => event.startsAt,
90472
- getTimeZone: () => calendarTimeZone
90473
- });
90474
- return new Map([...grouped].map(([dateKey, bucket]) => [dateKey, [...bucket]]));
90475
- }
90476
- /** Stable local-day identity shared by ledger continuations and day groups. */
90477
- function eventLocalDateKey(event) {
90478
- return getBookingLocalDateKey(toScheduledBookingDateTime({
90479
- startsAt: event.startsAt,
90480
- timeZone: resolveBookingBusinessTimeZone(event.timeZone),
90481
- locale: "en-GB"
90482
- }));
90483
- }
90484
- /** Full weekday and the existing zone-aware time range for a weekly running list. */
90485
- function formatEventWeekdayTime(event) {
90486
- const options = eventDateOptions(event);
90487
- return `${formatDate$4({
90488
- kind: "instant",
90489
- value: toUtcIsoDateTimeString(event.startsAt)
90490
- }, options, {
90491
- date: "omit",
90492
- weekday: "long",
90493
- year: "omit"
90494
- })} · ${formatEventTimeRange(event, options)}`;
90495
- }
90496
90707
  //#endregion
90497
90708
  //#region ../blocks/src/system/runtime/nodes/events/domain/duration.ts
90498
90709
  function formatEventDuration(event, style = "legacy") {
@@ -90535,8 +90746,8 @@ function formatEventTeacherLine(event) {
90535
90746
  * Sorting before deduplication means a duplicate occurrence keeps its earliest
90536
90747
  * deterministic representation.
90537
90748
  */
90538
- function selectQuickDateEvents(events) {
90539
- return orderedUniqueEventOccurrences(events.filter((event) => event.bookingScope !== "whole_series" && isBookableEvent(event))).slice(0, 4);
90749
+ function selectQuickDateEvents(events, now) {
90750
+ return orderedUniqueEventOccurrences(events.filter((event) => event.bookingScope !== "whole_series" && isBookableEvent(event, now))).slice(0, 4);
90540
90751
  }
90541
90752
  /** Shared ordering and identity selection, independent of booking capacity. */
90542
90753
  function orderedUniqueEventOccurrences(events) {
@@ -94168,6 +94379,7 @@ function bookingCalendar(event, outcome) {
94168
94379
  function toRegistrationEvent(event) {
94169
94380
  return {
94170
94381
  ...event,
94382
+ ...bookingCloseLine(openBookingLine(event)),
94171
94383
  selectionId: event.id,
94172
94384
  registrationSubject: {
94173
94385
  kind: "occurrence",
@@ -94175,6 +94387,9 @@ function toRegistrationEvent(event) {
94175
94387
  }
94176
94388
  };
94177
94389
  }
94390
+ function bookingCloseLine(line) {
94391
+ return line ? { bookingCloseLine: line } : {};
94392
+ }
94178
94393
  function toRegistrationEvents(events) {
94179
94394
  return events.filter((event) => event.bookingScope === "single_occurrence").map(toRegistrationEvent);
94180
94395
  }
@@ -94193,6 +94408,7 @@ function toWholeSeriesRegistrationEvent(group) {
94193
94408
  const lastSession = sessions[sessions.length - 1] ?? firstSession;
94194
94409
  return {
94195
94410
  ...representative,
94411
+ ...bookingCloseLine(openRunBookingLine(run)),
94196
94412
  selectionId: run.eventSeriesId,
94197
94413
  registrationSubject: {
94198
94414
  kind: "wholeSeries",
@@ -94862,6 +95078,11 @@ function resolveWaitlistClaimRestoration(input) {
94862
95078
  message: "This waiting list invitation is for a different event. Please open the link in your invitation email."
94863
95079
  };
94864
95080
  }
95081
+ /** A place held on a run or date that's closed is still theirs, so it stays on the list they see. */
95082
+ function withOfferedEvent(choices, invitation) {
95083
+ const offered = invitation.kind === "ready" ? invitation.restoration.event : null;
95084
+ return offered && !choices.some((event) => event.selectionId === offered.selectionId) ? [offered, ...choices] : choices;
95085
+ }
94865
95086
  //#endregion
94866
95087
  //#region ../blocks/src/system/runtime/nodes/event-registration/registrationBrowserDraft.ts
94867
95088
  const browserDraftSteps = [
@@ -97468,7 +97689,7 @@ function resolveEventRegistrationChoices(events, context, now) {
97468
97689
  const runs = groupPublicEventsByRun(scoped);
97469
97690
  if (context.occurrenceContext || context.subject?.kind === "eventSeries" && context.subject.bookingScope === "whole_series" || runs.length === 1 && scoped.every((event) => event.bookingScope === "whole_series")) return scoped;
97470
97691
  const eligibleRunIds = new Set(runs.filter((group) => resolveWholeSeriesChooserEligibility(group, now).kind === "eligible").map((group) => group.eventSeriesId));
97471
- return scoped.filter((event) => event.bookingScope === "whole_series" ? eligibleRunIds.has(event.seriesId) : Date.parse(event.startsAt) > now.getTime());
97692
+ return scoped.filter((event) => event.bookingScope === "whole_series" ? eligibleRunIds.has(event.seriesId) : Date.parse(event.startsAt) > now.getTime() && !hasEventBookingClosedEarly(event, now));
97472
97693
  }
97473
97694
  //#endregion
97474
97695
  //#region ../blocks/src/system/runtime/nodes/shared/contract-schemas.ts
@@ -97673,7 +97894,7 @@ function closedRegistrationCopy(source, events) {
97673
97894
  if (hasCancelledRegistrationDate(events, source.occurrenceContext?.id)) return cancelledDateCopy;
97674
97895
  const selectedRun = resolveSelectedWholeSeriesRun(events);
97675
97896
  const phase = selectedRun ? resolveWholeSeriesBookingPhase(selectedRun.run, new Date(source.now)) : null;
97676
- return phase?.kind === "closed" ? closedRunCopy(phase.reason) : null;
97897
+ return phase?.kind === "closed" ? closedRunCopy(phase.reason, selectedRun?.run) : null;
97677
97898
  }
97678
97899
  function buildEventRegistrationShellStepLabels(source, scopedSourceEvents) {
97679
97900
  const selectedRun = resolveSelectedWholeSeriesRun(scopedSourceEvents);
@@ -101926,8 +102147,8 @@ function EventQuickDates({ events, pathname, buttonVariant = "primary", dateStyl
101926
102147
  * Null when the date has no registration path (closed, paused, not open yet,
101927
102148
  * no registration, or full with no waitlist), so no caller repeats that gate.
101928
102149
  */
101929
- function eventDateBookingLink(event, pathname, dateLabel) {
101930
- if (!isBookableEvent(event)) return null;
102150
+ function eventDateBookingLink(event, pathname, dateLabel, now) {
102151
+ if (!isBookableEvent(event, now)) return null;
101931
102152
  const cta = resolveEventCta(event);
101932
102153
  return {
101933
102154
  href: resolveRuntimeEventDestination(event).kind === "external" ? cta.href : resolveDedicatedBookingHref(pathname, {
@@ -117425,6 +117646,7 @@ function bookingClosedReason(reason) {
117425
117646
  case "cancelled": return "These dates have been cancelled.";
117426
117647
  case "in-progress": return "Bookings closed when the first session began.";
117427
117648
  case "completed": return "These dates have finished.";
117649
+ case "bookings-closed":
117428
117650
  case "enrolment-closed": return "Bookings for these dates have closed.";
117429
117651
  case "no-sessions": return "No dates are currently scheduled.";
117430
117652
  }
@@ -118096,12 +118318,12 @@ function cardsListDates(props) {
118096
118318
  return props.lookSlots !== void 0 && props.datesMode === "next-dates";
118097
118319
  }
118098
118320
  /** One offering has room for a Book link on each date; several keep plain rows. */
118099
- function catalogueDateBooking(shape, pathname) {
118100
- return shape === "single" ? (event, dateLabel) => eventDateBookingLink(event, pathname ?? "/", dateLabel) : void 0;
118321
+ function catalogueDateBooking(shape, pathname, now) {
118322
+ return shape === "single" ? (event, dateLabel) => eventDateBookingLink(event, pathname ?? "/", dateLabel, now) : void 0;
118101
118323
  }
118102
118324
  function renderOfferingsCatalogueGroups({ props, groups, shape }) {
118103
118325
  const enabledSeriesIds = new Set(groups.flatMap((load) => load.kind === "items" ? load.items.map((item) => item.kind === "event" ? item.event.seriesId : item.run.eventSeriesId) : []));
118104
- const quickDateEvents = cardsListDates(props) ? [] : selectQuickDateEvents((props.quickDateEvents ?? []).filter((event) => enabledSeriesIds.has(event.seriesId)));
118326
+ const quickDateEvents = cardsListDates(props) ? [] : selectQuickDateEvents((props.quickDateEvents ?? []).filter((event) => enabledSeriesIds.has(event.seriesId)), props.now);
118105
118327
  const populated = groups.flatMap(catalogueGroupItems);
118106
118328
  const frames = listGroupFrames(props);
118107
118329
  return /* @__PURE__ */ jsxs("div", {
@@ -118164,7 +118386,7 @@ function renderCatalogueItems({ props, items, shape, groupTitle }) {
118164
118386
  }
118165
118387
  /** Dates are a display sample; the series card never infers availability from them. */
118166
118388
  function catalogueDates(events, now, shape, pathname) {
118167
- return offeringDatesBySeries(events, now, catalogueDateBooking(shape, pathname));
118389
+ return offeringDatesBySeries(events, now, catalogueDateBooking(shape, pathname, now));
118168
118390
  }
118169
118391
  function catalogueCardContent(item, now, dates, typeLabel) {
118170
118392
  const event = item.kind === "event" ? item.event : item.run.representative;
@@ -120939,7 +121161,11 @@ function EventBookingPanelBody({ panel }) {
120939
121161
  });
120940
121162
  case "dropIn": return /* @__PURE__ */ jsx(DropInPanel, { panel: panel.panel });
120941
121163
  case "bookingClosed": return /* @__PURE__ */ jsx(BookingClosedPanel, { detail: panel.detail });
120942
- case "closedRun": return /* @__PURE__ */ jsx(ClosedRunPanel, { reason: panel.reason });
121164
+ case "closedRun": return /* @__PURE__ */ jsx(ClosedRunPanel, { copy: closedRunCopy(panel.reason, panel.run) });
121165
+ case "closedDate": return /* @__PURE__ */ jsx(ClosedRunPanel, {
121166
+ copy: panel.copy,
121167
+ otherDatesHref: panel.copy.otherDatesHref
121168
+ });
120943
121169
  case "single": return /* @__PURE__ */ jsx(SingleDateBooking, { run: panel.run });
120944
121170
  case "choice": return /* @__PURE__ */ jsx(RunChooser, { runs: panel.runs });
120945
121171
  case "unavailable": return /* @__PURE__ */ jsxs("div", {
@@ -121011,17 +121237,27 @@ function BookingClosedPanel({ detail }) {
121011
121237
  });
121012
121238
  }
121013
121239
  /** Dates that cannot be booked keep their details and say why. */
121014
- function ClosedRunPanel({ reason }) {
121015
- const copy = closedRunCopy(reason);
121240
+ function ClosedRunPanel({ copy, otherDatesHref }) {
121016
121241
  return /* @__PURE__ */ jsxs("div", {
121017
121242
  className: "event-booking-panel__closed-run",
121018
- children: [/* @__PURE__ */ jsx("h2", {
121019
- className: "card-title rb-mb-3",
121020
- children: copy.titleText
121021
- }), /* @__PURE__ */ jsx("p", {
121022
- className: "status-muted rb-text-base rb-leading-relaxed",
121023
- children: copy.bodyText
121024
- })]
121243
+ children: [
121244
+ /* @__PURE__ */ jsx("h2", {
121245
+ className: "card-title rb-mb-3",
121246
+ children: copy.titleText
121247
+ }),
121248
+ /* @__PURE__ */ jsx("p", {
121249
+ className: "status-muted rb-text-base rb-leading-relaxed",
121250
+ children: copy.bodyText
121251
+ }),
121252
+ otherDatesHref ? /* @__PURE__ */ jsx("p", {
121253
+ className: "rb-mt-4 rb-text-base",
121254
+ children: /* @__PURE__ */ jsx("a", {
121255
+ className: "rb-underline",
121256
+ href: otherDatesHref,
121257
+ children: "See the other dates"
121258
+ })
121259
+ }) : null
121260
+ ]
121025
121261
  });
121026
121262
  }
121027
121263
  /**
@@ -121155,40 +121391,53 @@ function planEventBookingPanel({ selection, subject }, now) {
121155
121391
  ...nonBookingPanel,
121156
121392
  registration
121157
121393
  };
121158
- const phase = selection.kind === "wholeSeriesRun" ? resolveWholeSeriesBookingPhase(selection.run.run, now) : null;
121159
- return phase?.kind === "closed" ? {
121160
- kind: "closedRun",
121161
- reason: phase.reason,
121162
- registration
121163
- } : {
121164
- kind: "registration",
121394
+ return {
121395
+ ...closedDatePanel(selection, now) ?? closedRunPanel(selection, now) ?? { kind: "registration" },
121165
121396
  registration
121166
121397
  };
121167
121398
  }
121168
121399
  case "wholeSeriesParent": {
121400
+ const registration = parentRegistrationTarget(selection, subject);
121169
121401
  if (nonBookingPanel) return {
121170
121402
  ...nonBookingPanel,
121171
- registration: null
121403
+ registration
121172
121404
  };
121173
121405
  const panel = planWholeSeriesParentBooking(selection.eligibleRuns);
121174
121406
  return panel.kind === "bookTogether" ? {
121175
121407
  kind: "registration",
121176
- registration: {
121177
- events: panel.runs.map((run) => run.representative),
121178
- subject,
121179
- occurrenceContext: null
121180
- }
121408
+ registration
121181
121409
  } : {
121182
121410
  ...panel,
121183
- registration: null
121411
+ registration
121184
121412
  };
121185
121413
  }
121186
121414
  case "wholeSeriesParentUnavailable": return {
121187
121415
  ...nonBookingPanel ?? { kind: "unavailable" },
121188
- registration: null
121416
+ registration: parentRegistrationTarget(selection, subject)
121189
121417
  };
121190
121418
  }
121191
121419
  }
121420
+ /**
121421
+ * A date past its cut-off, however old the page's data is. A list of dates only
121422
+ * closes when every date has: until then the closed ones just leave the list.
121423
+ */
121424
+ function closedRunPanel(selection, now) {
121425
+ if (selection.kind !== "wholeSeriesRun") return null;
121426
+ const phase = resolveWholeSeriesBookingPhase(selection.run.run, now);
121427
+ return phase.kind === "closed" ? {
121428
+ kind: "closedRun",
121429
+ reason: phase.reason,
121430
+ run: selection.run.run
121431
+ } : null;
121432
+ }
121433
+ function closedDatePanel(selection, now) {
121434
+ if (selection.kind === "wholeSeriesRun") return null;
121435
+ const copy = selection.kind === "occurrence" ? closedDateCopy(selection.event, now) : closedDatesCopy(selection.dates, now);
121436
+ return copy ? {
121437
+ kind: "closedDate",
121438
+ copy
121439
+ } : null;
121440
+ }
121192
121441
  /** Drop-in and page-level closure take precedence over fresh booking and run selection. */
121193
121442
  function planNonBookingPanel(selection) {
121194
121443
  if (!selectionRepresentativeEvent(selection).requiresRegistration) return {
@@ -121220,13 +121469,25 @@ function selectionRegistrationTarget(selection, subject) {
121220
121469
  };
121221
121470
  }
121222
121471
  }
121472
+ /**
121473
+ * Every run the course page admits, not just those still taking bookings. An
121474
+ * invitation emailed for a run links here, and stays good after that run closes.
121475
+ * The wizard narrows these to the runs it offers for a new booking.
121476
+ */
121477
+ function parentRegistrationTarget(selection, subject) {
121478
+ return {
121479
+ events: selection.admittedRuns.map((run) => run.representative),
121480
+ occurrenceContext: null,
121481
+ subject
121482
+ };
121483
+ }
121223
121484
  /** Cancelled dates have no new-booking or recovery form, including old direct links. */
121224
121485
  function isCancelledDateSelection(selection) {
121225
121486
  return selection.kind === "occurrence" && hasCancelledRegistrationDate([selection.event]);
121226
121487
  }
121227
121488
  //#endregion
121228
121489
  //#region ../blocks/src/system/runtime/nodes/event-registration/RegistrationClosedState.tsx
121229
- function RegistrationClosedState({ title, body }) {
121490
+ function RegistrationClosedState({ title, body, otherDatesHref }) {
121230
121491
  return /* @__PURE__ */ jsx("div", {
121231
121492
  id: EVENT_REGISTRATION_ANCHOR_ID,
121232
121493
  className: "rb-reg-surface er-container er-registration-closed",
@@ -121245,7 +121506,15 @@ function RegistrationClosedState({ title, body }) {
121245
121506
  /* @__PURE__ */ jsx("p", {
121246
121507
  className: "er-text er-text--muted",
121247
121508
  children: body
121248
- })
121509
+ }),
121510
+ otherDatesHref ? /* @__PURE__ */ jsx("p", {
121511
+ className: "er-text",
121512
+ children: /* @__PURE__ */ jsx("a", {
121513
+ className: "rb-underline",
121514
+ href: otherDatesHref,
121515
+ children: "See the other dates"
121516
+ })
121517
+ }) : null
121249
121518
  ] })
121250
121519
  })
121251
121520
  });
@@ -130381,7 +130650,8 @@ function viewModeButton(variant) {
130381
130650
  case "lost-with-unsaved": return DISCARD_AND_VIEW;
130382
130651
  case "your-other-tab":
130383
130652
  case "another-user":
130384
- case "unreachable": return KEEP_VIEWING;
130653
+ case "unreachable":
130654
+ case "refused": return KEEP_VIEWING;
130385
130655
  }
130386
130656
  }
130387
130657
  function sentenceStart(text) {
@@ -130412,8 +130682,38 @@ function heldElsewhereNotice(holder, thing, unsaved) {
130412
130682
  }]
130413
130683
  };
130414
130684
  }
130685
+ function refusalCopy(refusal, thing) {
130686
+ switch (refusal) {
130687
+ case "forbidden": return {
130688
+ title: `You can't edit ${thing}`,
130689
+ body: "Your access to this site might have changed. Reload the page to check, and if you still can't edit, ask the site's owner or contact support."
130690
+ };
130691
+ case "not-found": return {
130692
+ title: `We can't open ${thing} for editing`,
130693
+ body: "It might have been deleted, or something might be wrong with how it's set up. Reload the page to check, and if it's still there, contact support."
130694
+ };
130695
+ case "invalid":
130696
+ case "required": return {
130697
+ title: `We can't open ${thing} for editing right now`,
130698
+ body: "Reload the page, and if it keeps happening, contact support."
130699
+ };
130700
+ }
130701
+ }
130702
+ function refusedNotice(refusal, thing, unsaved) {
130703
+ const { title, body } = refusalCopy(refusal, thing);
130704
+ return {
130705
+ variant: "refused",
130706
+ title,
130707
+ body: unsaved ? `${body} Anything you haven't saved yet might be lost.` : body,
130708
+ buttons: [{
130709
+ action: "reload",
130710
+ label: "Reload"
130711
+ }]
130712
+ };
130713
+ }
130415
130714
  function readOnlyNotice(editability, thing, unsaved) {
130416
130715
  if (editability.reason === "held-elsewhere") return heldElsewhereNotice(editability.holder, thing, unsaved);
130716
+ if (editability.reason === "refused") return refusedNotice(editability.refusal, thing, unsaved);
130417
130717
  return {
130418
130718
  variant: "unreachable",
130419
130719
  title: "Editing is temporarily unavailable",
@@ -139631,8 +139931,9 @@ function BookingMailingListChoice({ booking }) {
139631
139931
  //#endregion
139632
139932
  //#region ../blocks/src/system/runtime/shared/utils/demoPortalMagicLink.ts
139633
139933
  const CUSTOMER_PORTAL_PATH = "/portal";
139634
- function buildPortalCallbackUrl(origin, redirectTo, callbackPath = "/api/portal/callback") {
139635
- const url = new URL(callbackPath, origin);
139934
+ const PORTAL_CALLBACK_PATH = "/api/portal/callback";
139935
+ function buildPortalCallbackUrl(origin, redirectTo) {
139936
+ const url = new URL(PORTAL_CALLBACK_PATH, origin);
139636
139937
  url.searchParams.set("redirect_to", redirectTo);
139637
139938
  return url.toString();
139638
139939
  }
@@ -141587,20 +141888,128 @@ function registrationAdmissionSurface(input) {
141587
141888
  default: return assertNever$3(input.availability);
141588
141889
  }
141589
141890
  }
141590
- /** Resolve the host guard once; past-date notices only concern new bookings. */
141891
+ /** Resolve the host guard once. Bookings closing is the wizard's to decide: it owns the step. */
141591
141892
  function resolveEventRegistrationClientSurface(input) {
141592
- if (input.recoveryRequest !== "none") return { kind: "wizard" };
141893
+ if (input.recoveryRequest !== "none") return "wizard";
141593
141894
  switch (input.plan.kind) {
141594
- case "wholeSeries": return { kind: "wizard" };
141895
+ case "wholeSeries":
141896
+ case "occurrence": return "wizard";
141595
141897
  case "unavailableWholeSeries":
141596
- case "mixedBookingScopes": return { kind: "unavailable" };
141597
- case "occurrence": return input.pastStartsAt ? {
141598
- kind: "past",
141599
- startsAt: input.pastStartsAt
141600
- } : { kind: "wizard" };
141898
+ case "mixedBookingScopes": return "unavailable";
141601
141899
  default: return assertNever$3(input.plan);
141602
141900
  }
141603
141901
  }
141902
+ function isPastOccurrence(startsAt, now) {
141903
+ if (!startsAt) return false;
141904
+ const startsAtTime = Date.parse(startsAt);
141905
+ if (!Number.isFinite(startsAtTime)) return false;
141906
+ return startsAtTime <= Date.parse(now);
141907
+ }
141908
+ /** Whether someone on this step hasn't been admitted yet, so closing stops them. */
141909
+ function stepStartsNewBooking(step) {
141910
+ switch (step) {
141911
+ case "select-event":
141912
+ case "select-tickets":
141913
+ case "enter-details":
141914
+ case "select-payment": return true;
141915
+ case "submitting":
141916
+ case "payment":
141917
+ case "verifying-payment":
141918
+ case "verifying-timeout":
141919
+ case "payment-status":
141920
+ case "payment-failed":
141921
+ case "error":
141922
+ case "success": return false;
141923
+ default: return assertNever$3(step);
141924
+ }
141925
+ }
141926
+ const FRESH_BOOKING_OPEN = { kind: "open" };
141927
+ /**
141928
+ * Whether this page has stopped taking new bookings, by the clock: a date's page
141929
+ * when that date closes or starts, a course run's when the run closes, and a page
141930
+ * with several to choose from when none of them is left.
141931
+ *
141932
+ * Closing only stops someone starting: a person with a checkout under way, a
141933
+ * confirmation on screen, a place held for them or a payment to come back to
141934
+ * keeps it, whenever the date closes or starts around them.
141935
+ */
141936
+ function resolveFreshBookingClosure(input) {
141937
+ if (input.holdsPlace || input.recoveryRequest !== "none" || !stepStartsNewBooking(input.step)) return { kind: "underway" };
141938
+ const { events, occurrenceContext, subject } = input;
141939
+ const plan = planEventRegistrationSurface({
141940
+ events,
141941
+ occurrenceContext,
141942
+ subject
141943
+ });
141944
+ switch (plan.kind) {
141945
+ case "wholeSeries": return closedRunsClosure(plan.runs, new Date(input.now));
141946
+ case "occurrence": return occurrenceContext ? datePageClosure(events, occurrenceContext, input.now) : closedEarlyClosure(closedDatesCopy(plan.events, new Date(input.now)));
141947
+ case "unavailableWholeSeries":
141948
+ case "mixedBookingScopes": return FRESH_BOOKING_OPEN;
141949
+ default: return assertNever$3(plan);
141950
+ }
141951
+ }
141952
+ function closedEarlyClosure(copy) {
141953
+ return copy ? {
141954
+ kind: "closedEarly",
141955
+ copy
141956
+ } : FRESH_BOOKING_OPEN;
141957
+ }
141958
+ function datePageClosure(events, occurrenceContext, now) {
141959
+ const date = events.find((event) => event.occurrenceId === occurrenceContext.id);
141960
+ const copy = date ? closedDateCopy(date, new Date(now)) : null;
141961
+ if (copy) return {
141962
+ kind: "closedEarly",
141963
+ copy
141964
+ };
141965
+ return isPastOccurrence(occurrenceContext.startsAt, now) ? {
141966
+ kind: "started",
141967
+ startsAt: occurrenceContext.startsAt
141968
+ } : FRESH_BOOKING_OPEN;
141969
+ }
141970
+ /** One run speaks for itself; several say so together, since each closed at its own time. */
141971
+ function closedRunsClosure(runs, now) {
141972
+ const closed = runs.flatMap(({ run }) => {
141973
+ const phase = resolveWholeSeriesBookingPhase(run, now);
141974
+ return phase.kind === "closed" ? [{
141975
+ run,
141976
+ reason: phase.reason
141977
+ }] : [];
141978
+ });
141979
+ const [first] = closed;
141980
+ if (!first || closed.length < runs.length) return FRESH_BOOKING_OPEN;
141981
+ return {
141982
+ kind: "closedEarly",
141983
+ copy: {
141984
+ ...closed.length === 1 ? closedRunCopy(first.reason, first.run) : closedRunCopy("bookings-closed"),
141985
+ otherDatesHref: null
141986
+ }
141987
+ };
141988
+ }
141989
+ /**
141990
+ * The moment that decision next changes while the page stays open. With several
141991
+ * to choose from that's when the last of them closes: the chooser's own clock
141992
+ * takes each one off the list before then.
141993
+ */
141994
+ function nextFreshBookingBoundary(events, occurrenceContext, subject) {
141995
+ const plan = planEventRegistrationSurface({
141996
+ events,
141997
+ occurrenceContext,
141998
+ subject
141999
+ });
142000
+ switch (plan.kind) {
142001
+ case "wholeSeries": return latestInstant(plan.runs.map(({ run }) => run.bookingClosesAt ?? orderedLiveRunSessions(run.sessions)[0]?.startsAt));
142002
+ case "occurrence":
142003
+ if (!occurrenceContext) return latestInstant(plan.events.map((date) => date.bookingClosesAt ?? date.startsAt));
142004
+ return events.find((event) => event.occurrenceId === occurrenceContext.id)?.bookingClosesAt ?? occurrenceContext.startsAt;
142005
+ case "unavailableWholeSeries":
142006
+ case "mixedBookingScopes": return null;
142007
+ default: return assertNever$3(plan);
142008
+ }
142009
+ }
142010
+ function latestInstant(instants) {
142011
+ return instants.reduce((latest, instant) => instant && (latest === null || Date.parse(instant) > Date.parse(latest)) ? instant : latest, null);
142012
+ }
141604
142013
  /**
141605
142014
  * Whether a run agrees with the offering whose page it arrived on.
141606
142015
  *
@@ -142630,7 +143039,8 @@ function eligibilityRequest(params) {
142630
143039
  pricingOptionId,
142631
143040
  quantity
142632
143041
  })),
142633
- selectedSlidingAmount: params.selectedSlidingAmount ?? void 0
143042
+ selectedSlidingAmount: params.selectedSlidingAmount ?? void 0,
143043
+ ...params.waitlistClaim ? { waitlistClaim: params.waitlistClaim } : {}
142634
143044
  };
142635
143045
  }
142636
143046
  /** One effective union owns readiness, including the pre-fetch debounce window. */
@@ -143558,6 +143968,17 @@ function useSelectionCombinationPricing(input) {
143558
143968
  };
143559
143969
  }
143560
143970
  //#endregion
143971
+ //#region ../blocks/src/system/runtime/nodes/event-registration/useEventRegistrationRecoveryRequest.ts
143972
+ /** Retain arrival intent while the payment controller cleans up the return URL. */
143973
+ function useEventRegistrationRecoveryRequest() {
143974
+ const [arrival] = useState(() => {
143975
+ if (typeof window === "undefined") return "none";
143976
+ if (eventRegistrationCheckoutReturnRequest(new URLSearchParams(window.location.search))) return "paymentReturn";
143977
+ return getWaitlistClaimTokenFromUrl() || getWaitlistClaimEntryIdFromUrl() ? "waitlistInvitation" : "none";
143978
+ });
143979
+ return arrival;
143980
+ }
143981
+ //#endregion
143561
143982
  //#region ../blocks/src/system/runtime/nodes/event-registration/useSettledCommerceView.ts
143562
143983
  function buildCandidate(input) {
143563
143984
  if (!input.eligibilityIsSettled || !input.eligibility || !input.currentEvent) return null;
@@ -144175,16 +144596,54 @@ function useEventRegistrationWizard(options) {
144175
144596
  return useEventRegistrationWizardWithDeps(options, eventRegistrationWizardDeps);
144176
144597
  }
144177
144598
  const CHOOSER_CLOCK = { kind: "relative" };
144599
+ /** The wizard owns the step, so it owns whether the clock has stopped this visitor starting a booking. */
144600
+ function useFreshBookingClosure(deps, options, events, step, visitorHoldsPlace) {
144601
+ const recoveryRequest = useEventRegistrationRecoveryRequest();
144602
+ const nextBoundary = useMemo(() => nextFreshBookingBoundary(events, options.occurrenceContext, options.subject), [
144603
+ events,
144604
+ options.occurrenceContext,
144605
+ options.subject
144606
+ ]);
144607
+ const now = deps.useBookingNowIso(options.now, {
144608
+ kind: "presentation",
144609
+ nextBoundary
144610
+ });
144611
+ return resolveFreshBookingClosure({
144612
+ step,
144613
+ holdsPlace: visitorHoldsPlace,
144614
+ recoveryRequest,
144615
+ events,
144616
+ occurrenceContext: options.occurrenceContext,
144617
+ subject: options.subject,
144618
+ now
144619
+ });
144620
+ }
144621
+ function holdsPlace(claim, payment) {
144622
+ return claim.kind !== "none" || payment.retryingHeldPlace;
144623
+ }
144624
+ /** A date that has closed has nothing to quote for a new booking. */
144625
+ function bookingClosureAllowsQuote(closure, wanted) {
144626
+ return closure.kind !== "closedEarly" && closure.kind !== "started" && wanted;
144627
+ }
144628
+ function waitlistClaimCredential(claim) {
144629
+ return claim.kind === "none" ? null : claim.request.credential;
144630
+ }
144178
144631
  /**
144179
144632
  * Preserve source availability through event adaptation and page scoping.
144180
144633
  *
144181
144634
  * `choiceNowIso` is the chooser's clock: it starts at the server snapshot so hydration matches, then
144182
144635
  * follows the browser, so a date that starts while the page is open leaves the chooser.
144183
- * `registrationEvents` stays the full set, so payment recovery still finds a date that has started.
144636
+ * `registrationEvents` stays the full set, so payment recovery still finds a date that has started,
144637
+ * and `recoveryEvents` is that set within this page, so an invitation finds a run that has closed.
144184
144638
  */
144185
144639
  function useRegistrationEventSource(options, choiceNowIso) {
144186
144640
  const events = options.eventSource.kind === "ready" ? options.eventSource.events : NO_EVENTS;
144187
144641
  const registrationEvents = useMemo(() => [...toRegistrationEvents(events), ...toWholeSeriesRegistrationEvents(events)], [events]);
144642
+ const scopeOfPage = [
144643
+ options.occurrenceContext?.seriesId,
144644
+ options.subject?.kind,
144645
+ options.subject?.kind === "eventSeries" ? options.subject.eventSeriesId : options.subject?.kind === "eventOffering" ? `${options.subject.eventOfferingId}:${options.subject.catalogueEventSeriesIds.join(",")}` : options.subject?.reason
144646
+ ].join("|");
144188
144647
  const choiceKey = useMemo(() => {
144189
144648
  const choices = resolveEventRegistrationChoices(events, {
144190
144649
  occurrenceContext: options.occurrenceContext,
@@ -144194,22 +144653,25 @@ function useRegistrationEventSource(options, choiceNowIso) {
144194
144653
  }, [
144195
144654
  events,
144196
144655
  choiceNowIso,
144197
- options.occurrenceContext?.seriesId,
144198
- options.subject?.kind,
144199
- options.subject?.kind === "eventSeries" ? options.subject.eventSeriesId : options.subject?.kind === "eventOffering" ? `${options.subject.eventOfferingId}:${options.subject.catalogueEventSeriesIds.join(",")}` : options.subject?.reason
144656
+ scopeOfPage
144200
144657
  ]);
144201
144658
  const scopedEvents = useMemo(() => {
144202
144659
  const choiceIds = new Set(choiceKey.split("\n"));
144203
144660
  return registrationEvents.filter((event) => choiceIds.has(event.selectionId));
144204
144661
  }, [registrationEvents, choiceKey]);
144662
+ const recoveryEvents = useMemo(() => resolveEventRegistrationScopedEvents(registrationEvents, {
144663
+ occurrenceContext: options.occurrenceContext,
144664
+ subject: options.subject
144665
+ }), [registrationEvents, scopeOfPage]);
144205
144666
  return {
144206
144667
  events,
144207
144668
  registrationEvents,
144669
+ recoveryEvents,
144208
144670
  scopedEvents,
144209
- scopedEventSource: useMemo(() => options.eventSource.kind === "ready" ? {
144671
+ claimEventSource: useMemo(() => options.eventSource.kind === "ready" ? {
144210
144672
  kind: "ready",
144211
- events: scopedEvents
144212
- } : options.eventSource, [options.eventSource, scopedEvents])
144673
+ events: recoveryEvents
144674
+ } : options.eventSource, [options.eventSource, recoveryEvents])
144213
144675
  };
144214
144676
  }
144215
144677
  /** A signed-in booker's email is their verified identity, never a draft copy. */
@@ -144224,7 +144686,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
144224
144686
  const api = useBlockApi();
144225
144687
  const arrivalCredential = deps.useWaitlistClaimCredential();
144226
144688
  const nowIso = deps.useBookingNowIso(options.now);
144227
- const { events, registrationEvents, scopedEvents, scopedEventSource } = useRegistrationEventSource(options, deps.useBookingNowIso(options.now, CHOOSER_CLOCK));
144689
+ const { events, registrationEvents, recoveryEvents, scopedEvents, claimEventSource } = useRegistrationEventSource(options, deps.useBookingNowIso(options.now, CHOOSER_CLOCK));
144228
144690
  const preSelectedEvent = useMemo(() => findPreSelectedEvent({
144229
144691
  scopedEvents,
144230
144692
  occurrenceContext: options.occurrenceContext
@@ -144335,12 +144797,12 @@ function useEventRegistrationWizardWithDeps(options, deps) {
144335
144797
  if (claimLookup) dispatchFlow({
144336
144798
  type: "claim-updated",
144337
144799
  lookup: claimLookup,
144338
- events: scopedEventSource,
144800
+ events: claimEventSource,
144339
144801
  occurrenceContextId: options.occurrenceContext?.id
144340
144802
  });
144341
144803
  }, [
144342
144804
  claimLookup,
144343
- scopedEventSource,
144805
+ claimEventSource,
144344
144806
  options.occurrenceContext?.id
144345
144807
  ]);
144346
144808
  const errorMessage = waitlistClaim.kind === "error" ? waitlistClaim.message : submissionErrorMessage;
@@ -144413,14 +144875,16 @@ function useEventRegistrationWizardWithDeps(options, deps) {
144413
144875
  detailsInPage: () => Object.keys(validateFormData(formData)).length === 0
144414
144876
  });
144415
144877
  const { recovery: paymentStatusRecovery, showRecovery: setPaymentStatusRecovery, check: handleCheckPaymentStatus, continuePayment: handleContinueExistingPayment, returnToPayment: handleReturnToPayment, returnToBooking: handleReturnToBooking } = paymentController;
144878
+ const bookingClosure = useFreshBookingClosure(deps, options, events, step, holdsPlace(waitlistClaim, paymentController));
144416
144879
  const eligibilityResult = deps.useEligibility({
144417
144880
  refreshKey: optionsRefreshKey,
144418
- enabled: shouldRefreshAfterRegistrationError(step, errorAction, shouldLoadRegistrationOptions(portalAuthState, step)),
144881
+ enabled: bookingClosureAllowsQuote(bookingClosure, shouldRefreshAfterRegistrationError(step, errorAction, shouldLoadRegistrationOptions(portalAuthState, step))),
144419
144882
  subject: registrationTarget?.subject ?? null,
144420
144883
  attendanceMode: selectedAttendanceMode,
144421
144884
  ticketSelections,
144422
144885
  selectedSlidingAmount: parseCurrencyInputToCents(selectedSlidingAmountInput),
144423
- subjectEmail: getPortalSubjectEmail(portalProfile)
144886
+ subjectEmail: getPortalSubjectEmail(portalProfile),
144887
+ waitlistClaim: waitlistClaimCredential(waitlistClaim)
144424
144888
  });
144425
144889
  const existingRegistrationResult = deps.useExistingEventRegistration({
144426
144890
  isAuthenticated: portalAuthState === "authenticated",
@@ -145042,6 +145506,8 @@ function useEventRegistrationWizardWithDeps(options, deps) {
145042
145506
  ...registrationNavigation.presentation,
145043
145507
  api,
145044
145508
  nowIso,
145509
+ /** Whether the clock has stopped this visitor starting a booking on this page. */
145510
+ bookingClosure,
145045
145511
  directPaymentOptions,
145046
145512
  paymentDecision,
145047
145513
  anchorId: options.anchorId,
@@ -145050,7 +145516,10 @@ function useEventRegistrationWizardWithDeps(options, deps) {
145050
145516
  subject: options.subject,
145051
145517
  events,
145052
145518
  maxTicketsNum: waitlistClaim.kind === "ready" ? waitlistClaim.restoration.ticketsCount : options.maxTicketsNum,
145053
- scopedEvents,
145519
+ /** The new-booking choices, plus the run or date an invitation holds a place on. */
145520
+ scopedEvents: withOfferedEvent(scopedEvents, waitlistClaim),
145521
+ /** Everything on this page a booking could be for, whether or not it's still a choice. */
145522
+ recoveryEvents,
145054
145523
  preSelectedEvent: preSelectedDisplayEvent(preSelectedEvent, currentEvent, displayEvent),
145055
145524
  hasPreSelectedContext,
145056
145525
  presentation,
@@ -147479,16 +147948,20 @@ const EventSelectionStep = (props) => {
147479
147948
  });
147480
147949
  if (getEventSelectionMode(events) === "date") return /* @__PURE__ */ jsxs("div", {
147481
147950
  className: "rb-reg-stack er-stack",
147482
- children: [/* @__PURE__ */ jsx("h3", {
147483
- tabIndex: -1,
147484
- className: "er-title",
147485
- children: "Choose a date"
147486
- }), /* @__PURE__ */ jsx(DateSelectionList, {
147487
- events: [...events].sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt)),
147488
- selectedEvent,
147489
- display,
147490
- onChoose
147491
- })]
147951
+ children: [
147952
+ /* @__PURE__ */ jsx("h3", {
147953
+ tabIndex: -1,
147954
+ className: "er-title",
147955
+ children: "Choose a date"
147956
+ }),
147957
+ /* @__PURE__ */ jsx(BookingCloseLine, { events }),
147958
+ /* @__PURE__ */ jsx(DateSelectionList, {
147959
+ events: [...events].sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt)),
147960
+ selectedEvent,
147961
+ display,
147962
+ onChoose
147963
+ })
147964
+ ]
147492
147965
  });
147493
147966
  return /* @__PURE__ */ jsx(EventList, {
147494
147967
  events,
@@ -147564,6 +148037,14 @@ function EventListCard({ event, selected, onSelect, display }) {
147564
148037
  })
147565
148038
  });
147566
148039
  }
148040
+ /** When bookings close, inside the booking card, if the cut-off is earlier than the start. */
148041
+ function BookingCloseLine({ events }) {
148042
+ const line = events.find((event) => event.bookingCloseLine)?.bookingCloseLine;
148043
+ return line ? /* @__PURE__ */ jsx("p", {
148044
+ className: "er-text er-text--muted",
148045
+ children: line
148046
+ }) : null;
148047
+ }
147567
148048
  const SEVERAL_HEADINGS = {
147568
148049
  dates: {
147569
148050
  title: "Choose dates",
@@ -147601,6 +148082,7 @@ function SeveralSelection(props) {
147601
148082
  className: "er-text er-text--muted er-selection-lede",
147602
148083
  children: heading.lede
147603
148084
  }),
148085
+ /* @__PURE__ */ jsx(BookingCloseLine, { events: props.events }),
147604
148086
  /* @__PURE__ */ jsx(CombinationOfferLine, { parts: combinationOfferLine(combinationOffersOf(props.events)) }),
147605
148087
  /* @__PURE__ */ jsx("div", {
147606
148088
  className: "er-date-list",
@@ -148436,7 +148918,7 @@ function entitlementRows(props) {
148436
148918
  //#region ../blocks/src/system/runtime/nodes/event-registration/CalendarAction.tsx
148437
148919
  /** Download effects happen only after a click, including in editor preview. */
148438
148920
  async function downloadCalendar(calendar) {
148439
- const { renderCalendarFeedIcs } = await import("./src-LUhVXBEQ.mjs");
148921
+ const { renderCalendarFeedIcs } = await import("./src-EO5QoRlU.mjs");
148440
148922
  const url = URL.createObjectURL(new Blob([renderCalendarFeedIcs(calendar.feed)], { type: "text/calendar;charset=utf-8" }));
148441
148923
  const link = document.createElement("a");
148442
148924
  link.href = url;
@@ -148957,6 +149439,11 @@ function ticketStepInvitation(claim) {
148957
149439
  expiresAt: claim.claim.expiresAt
148958
149440
  } : { kind: "pending" };
148959
149441
  }
149442
+ /** With a date to pick, the choosing step has already said it. */
149443
+ function TicketStepBookingCloseLine({ wizard }) {
149444
+ if (wizard.scopedEvents.length > 1 || wizard.waitlistClaim.kind !== "none") return null;
149445
+ return /* @__PURE__ */ jsx(BookingCloseLine, { events: wizard.scopedEvents });
149446
+ }
148960
149447
  function TicketSelectionContent({ wizard, display }) {
148961
149448
  if (!wizard.selectedEvent && !wizard.occurrenceContext) return null;
148962
149449
  const isWaitlisted = wizard.admission.kind === "closed" && wizard.admission.reason === "alreadyWaitlisted";
@@ -148971,6 +149458,7 @@ function TicketSelectionContent({ wizard, display }) {
148971
149458
  onBookForSomeoneElse: wizard.handleBookForSomeoneElse
148972
149459
  }),
148973
149460
  /* @__PURE__ */ jsx(ClosedAdmissionNotice, { wizard }),
149461
+ /* @__PURE__ */ jsx(TicketStepBookingCloseLine, { wizard }),
148974
149462
  wizard.severalItems === "runs" ? /* @__PURE__ */ jsx(SeveralRunsTicketStep, {
148975
149463
  wizard,
148976
149464
  display
@@ -149464,6 +149952,46 @@ function signInBenefitsTitle(benefits) {
149464
149952
  return benefits.credit ? "Have credit on your account?" : null;
149465
149953
  }
149466
149954
  //#endregion
149955
+ //#region ../blocks/src/system/runtime/nodes/event-registration/PastOccurrenceNotice.tsx
149956
+ function getParentPathname(pathname) {
149957
+ const segments = pathname.split("/").filter(Boolean);
149958
+ if (segments.length < 2) return null;
149959
+ return `/${segments.slice(0, -1).join("/")}`;
149960
+ }
149961
+ function PastOccurrenceNotice(props) {
149962
+ const [parentPathname, setParentPathname] = useState(null);
149963
+ useEffect(() => {
149964
+ setParentPathname(getParentPathname(window.location.pathname));
149965
+ }, []);
149966
+ return /* @__PURE__ */ jsx("div", {
149967
+ id: props.anchorId,
149968
+ className: `event-registration ${props.className || ""}`,
149969
+ "data-block": "event-registration",
149970
+ children: /* @__PURE__ */ jsxs("div", {
149971
+ className: "er-empty",
149972
+ children: [/* @__PURE__ */ jsxs("p", {
149973
+ className: "er-empty__text",
149974
+ children: [
149975
+ "This event date (",
149976
+ formatEventDateTime(props.startsAt, {
149977
+ timeZone: props.timeZone,
149978
+ siteTimeZone: props.siteTimeZone,
149979
+ deliveryMode: props.deliveryMode
149980
+ }, "long"),
149981
+ ") has already started. Registration is closed."
149982
+ ]
149983
+ }), parentPathname && /* @__PURE__ */ jsx("p", {
149984
+ className: "er-empty__text",
149985
+ children: /* @__PURE__ */ jsx("a", {
149986
+ href: parentPathname,
149987
+ className: "er-link",
149988
+ children: "View other dates for this event"
149989
+ })
149990
+ })]
149991
+ })
149992
+ });
149993
+ }
149994
+ //#endregion
149467
149995
  //#region ../blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizard.tsx
149468
149996
  const EVENT_PORTAL_AUTH_COPY = {
149469
149997
  membership: {
@@ -149539,11 +150067,26 @@ function useConfiguredEventRegistrationWizard(props) {
149539
150067
  }
149540
150068
  function EventRegistrationWizard(props) {
149541
150069
  const wizard = useConfiguredEventRegistrationWizard(props);
149542
- return /* @__PURE__ */ jsx(EventRegistrationWizardView, {
150070
+ return /* @__PURE__ */ jsx(EventRegistrationWizardSurface, {
149543
150071
  ...props,
149544
150072
  wizard
149545
150073
  });
149546
150074
  }
150075
+ /** Closing swaps out the booking steps only for someone who hadn't started: the hook decides who that is. */
150076
+ function EventRegistrationWizardSurface(props) {
150077
+ const closure = props.wizard.bookingClosure;
150078
+ switch (closure.kind) {
150079
+ case "open":
150080
+ case "underway": return /* @__PURE__ */ jsx(EventRegistrationWizardView, { ...props });
150081
+ case "closedEarly": return /* @__PURE__ */ jsx(RegistrationClosedState, {
150082
+ title: closure.copy.titleText,
150083
+ body: closure.copy.bodyText,
150084
+ otherDatesHref: closure.copy.otherDatesHref
150085
+ });
150086
+ case "started": return /* @__PURE__ */ jsx(PastOccurrenceNotice, { ...pastOccurrenceNoticeProps(props, closure.startsAt) });
150087
+ default: return assertNever$3(closure);
150088
+ }
150089
+ }
149547
150090
  /** The panel header's pinned progress, while the panel shows a step (issue 1581). */
149548
150091
  function overlayProgress(presentation, stepLabelContext) {
149549
150092
  if (presentation.layout !== "steps" || !presentation.progress) return null;
@@ -149559,6 +150102,18 @@ function overlayProgress(presentation, stepLabelContext) {
149559
150102
  function ticketStepOffersSignIn(wizard, pricingType) {
149560
150103
  return wizard.step === "select-tickets" && wizard.severalItems === null && wizard.portalAuthState !== "authenticated" && wizard.portalAuthState !== "checking" && pricingType !== "free";
149561
150104
  }
150105
+ /** Older sources can omit session facts; admission keeps the notice render-safe. */
150106
+ function pastOccurrenceNoticeProps(props, startsAt) {
150107
+ const event = props.events?.find((candidate) => candidate.occurrenceId === props.occurrenceContext?.id);
150108
+ return {
150109
+ anchorId: EVENT_REGISTRATION_ANCHOR_ID,
150110
+ className: props.className,
150111
+ startsAt,
150112
+ timeZone: props.occurrenceContext?.timeZone ?? null,
150113
+ siteTimeZone: event?.siteTimeZone ?? null,
150114
+ deliveryMode: event?.deliveryMode ?? null
150115
+ };
150116
+ }
149562
150117
  function EventRegistrationWizardView(viewProps) {
149563
150118
  const { wizard, ...props } = viewProps;
149564
150119
  const { display, successMessage, buttonText = DEFAULT_BOOKING_BUTTON_TEXT, buttonVariant = "primary", className, supportEmail } = props;
@@ -149610,7 +150165,7 @@ function EventRegistrationWizardView(viewProps) {
149610
150165
  }));
149611
150166
  const showPortalAuthPrompt = waitlistClaimRequiresPortalLogin || ticketStepOffersSignIn(wizard, summaryEventPricingType) && portalAuthCopy.title !== "";
149612
150167
  const presentation = resolveFinishedPresentation(wizard.presentation, {
149613
- events: wizard.scopedEvents,
150168
+ events: wizard.recoveryEvents,
149614
150169
  completedOutcomes: wizard.flow.completedOutcomes,
149615
150170
  draftEvent: summaryEvent ?? null,
149616
150171
  occurrenceContext: wizard.occurrenceContext,
@@ -149698,63 +150253,6 @@ function EventRegistrationWizardView(viewProps) {
149698
150253
  });
149699
150254
  }
149700
150255
  //#endregion
149701
- //#region ../blocks/src/system/runtime/nodes/event-registration/useEventRegistrationRecoveryRequest.ts
149702
- /** Retain arrival intent while the payment controller cleans up the return URL. */
149703
- function useEventRegistrationRecoveryRequest() {
149704
- const [arrival] = useState(() => {
149705
- if (typeof window === "undefined") return "none";
149706
- if (eventRegistrationCheckoutReturnRequest(new URLSearchParams(window.location.search))) return "paymentReturn";
149707
- return getWaitlistClaimTokenFromUrl() || getWaitlistClaimEntryIdFromUrl() ? "waitlistInvitation" : "none";
149708
- });
149709
- return arrival;
149710
- }
149711
- //#endregion
149712
- //#region ../blocks/src/system/runtime/nodes/event-registration/PastOccurrenceNotice.tsx
149713
- function isPastOccurrence(startsAt, now) {
149714
- if (!startsAt) return false;
149715
- const startsAtTime = Date.parse(startsAt);
149716
- if (!Number.isFinite(startsAtTime)) return false;
149717
- return startsAtTime <= Date.parse(now);
149718
- }
149719
- function getParentPathname(pathname) {
149720
- const segments = pathname.split("/").filter(Boolean);
149721
- if (segments.length < 2) return null;
149722
- return `/${segments.slice(0, -1).join("/")}`;
149723
- }
149724
- function PastOccurrenceNotice(props) {
149725
- const [parentPathname, setParentPathname] = useState(null);
149726
- useEffect(() => {
149727
- setParentPathname(getParentPathname(window.location.pathname));
149728
- }, []);
149729
- return /* @__PURE__ */ jsx("div", {
149730
- id: props.anchorId,
149731
- className: `event-registration ${props.className || ""}`,
149732
- "data-block": "event-registration",
149733
- children: /* @__PURE__ */ jsxs("div", {
149734
- className: "er-empty",
149735
- children: [/* @__PURE__ */ jsxs("p", {
149736
- className: "er-empty__text",
149737
- children: [
149738
- "This event date (",
149739
- formatEventDateTime(props.startsAt, {
149740
- timeZone: props.timeZone,
149741
- siteTimeZone: props.siteTimeZone,
149742
- deliveryMode: props.deliveryMode
149743
- }, "long"),
149744
- ") has already started. Registration is closed."
149745
- ]
149746
- }), parentPathname && /* @__PURE__ */ jsx("p", {
149747
- className: "er-empty__text",
149748
- children: /* @__PURE__ */ jsx("a", {
149749
- href: parentPathname,
149750
- className: "er-link",
149751
- children: "View other dates for this event"
149752
- })
149753
- })]
149754
- })
149755
- });
149756
- }
149757
- //#endregion
149758
150256
  //#region ../blocks/src/system/runtime/nodes/event-registration/useEventSourceRecovery.ts
149759
150257
  const RECOVERY_DELAYS_MS = [
149760
150258
  0,
@@ -149853,47 +150351,27 @@ function toEventRegistrationClientProps(props, display) {
149853
150351
  className: display.className ?? void 0
149854
150352
  };
149855
150353
  }
149856
- /** Older sources can omit session facts; admission keeps the notice render-safe. */
149857
- function pastOccurrenceNoticeProps(clientProps, startsAt) {
149858
- const event = clientProps.events?.find((event) => event.occurrenceId === clientProps.occurrenceContext?.id);
149859
- return {
149860
- anchorId: EVENT_REGISTRATION_ANCHOR_ID,
149861
- className: clientProps.className,
149862
- startsAt,
149863
- timeZone: clientProps.occurrenceContext?.timeZone ?? null,
149864
- siteTimeZone: event?.siteTimeZone ?? null,
149865
- deliveryMode: event?.deliveryMode ?? null
149866
- };
149867
- }
149868
150354
  const EventRegistrationClient = (clientProps) => {
149869
- const recoveryRequest = useEventRegistrationRecoveryRequest();
149870
- const surface = planEventRegistrationSurface({
149871
- events: clientProps.events ?? [],
149872
- occurrenceContext: clientProps.occurrenceContext,
149873
- subject: clientProps.subject
149874
- });
149875
- const startsAt = clientProps.occurrenceContext?.startsAt;
149876
- const presentation = resolveEventRegistrationClientSurface({
149877
- plan: surface,
149878
- recoveryRequest,
149879
- pastStartsAt: isPastOccurrence(startsAt, useBookingNowIso(clientProps.now, {
149880
- kind: "presentation",
149881
- nextBoundary: startsAt ?? null
149882
- })) ? startsAt ?? null : null
150355
+ const surface = resolveEventRegistrationClientSurface({
150356
+ recoveryRequest: useEventRegistrationRecoveryRequest(),
150357
+ plan: planEventRegistrationSurface({
150358
+ events: clientProps.events ?? [],
150359
+ occurrenceContext: clientProps.occurrenceContext,
150360
+ subject: clientProps.subject
150361
+ })
149883
150362
  });
149884
150363
  if (hasCancelledRegistrationDate(clientProps.events ?? [], clientProps.occurrenceContext?.id)) return /* @__PURE__ */ jsx(RegistrationClosedState, {
149885
150364
  title: cancelledDateCopy.titleText,
149886
150365
  body: cancelledDateCopy.bodyText
149887
150366
  });
149888
- switch (presentation.kind) {
150367
+ switch (surface) {
149889
150368
  case "wizard": return /* @__PURE__ */ jsx(EventRegistrationWizard, { ...clientProps });
149890
150369
  case "unavailable": return /* @__PURE__ */ jsx("div", {
149891
150370
  className: clientProps.className,
149892
150371
  role: "status",
149893
150372
  children: "Registration is temporarily unavailable. Please refresh the page or try again shortly."
149894
150373
  });
149895
- case "past": return /* @__PURE__ */ jsx(PastOccurrenceNotice, { ...pastOccurrenceNoticeProps(clientProps, presentation.startsAt) });
149896
- default: return assertNever$3(presentation);
150374
+ default: return assertNever$3(surface);
149897
150375
  }
149898
150376
  };
149899
150377
  const EventRegistrationIslandClient = (props) => {
@@ -157156,6 +157634,63 @@ async function dispatchJournalEffect(request, owners) {
157156
157634
  };
157157
157635
  }
157158
157636
  //#endregion
157637
+ //#region ../content-editor/src/session-journal/grouping.ts
157638
+ /** A journal group has one target; keep its first inverse and last forward value. */
157639
+ function groupedJournalChange(first, last) {
157640
+ return {
157641
+ ...first,
157642
+ after: last.after
157643
+ };
157644
+ }
157645
+ /** Keep the accepted identity and label while adopting only the owner's canonical inverse. */
157646
+ function replaceJournalInverse(change, inverse) {
157647
+ return {
157648
+ ...change,
157649
+ before: inverse.before,
157650
+ after: inverse.after
157651
+ };
157652
+ }
157653
+ /**
157654
+ * The edits one send stands for become one undo step, because the server never saw the values between
157655
+ * them. Undo then lands on what the send's receipt says was stored, and a run that nets to nothing
157656
+ * cancels whole, the same as a typing group. Pending edits sit below the cursor, so it can't split one.
157657
+ */
157658
+ function mergeJournalGroups(state, operationIds) {
157659
+ const merged = state.entries.filter((entry) => operationIds.includes(entry.edit.operationId));
157660
+ const group = merged[0]?.group;
157661
+ const groups = new Set(merged.map((entry) => entry.group));
157662
+ if (group === void 0 || groups.size < 2) return state;
157663
+ return {
157664
+ ...state,
157665
+ entries: state.entries.map((entry) => groups.has(entry.group) ? {
157666
+ ...entry,
157667
+ group
157668
+ } : entry),
157669
+ grouping: state.grouping && groups.has(state.grouping.group) ? {
157670
+ ...state.grouping,
157671
+ group
157672
+ } : state.grouping
157673
+ };
157674
+ }
157675
+ /** A successful manual save closes its captured interaction, even if typing continued during the request. */
157676
+ function closeSavedManualGroup(state, captured) {
157677
+ const last = captured.at(-1);
157678
+ if (!last || typeof last.edit.textKey !== "object" || last.edit.textKey?.kind !== "manual") return state;
157679
+ const following = state.entries.filter((entry) => entry.group === last.group && entry.order > last.order);
157680
+ const nextGroup = following[0]?.order;
157681
+ return {
157682
+ ...state,
157683
+ entries: state.entries.map((entry) => nextGroup !== void 0 && following.includes(entry) ? {
157684
+ ...entry,
157685
+ group: nextGroup
157686
+ } : entry),
157687
+ grouping: state.grouping?.group === last.group ? nextGroup === void 0 ? null : {
157688
+ ...state.grouping,
157689
+ group: nextGroup
157690
+ } : state.grouping
157691
+ };
157692
+ }
157693
+ //#endregion
157159
157694
  //#region ../content-editor/src/session-journal/editorCapture.ts
157160
157695
  const textKey = (command) => {
157161
157696
  switch (command.type) {
@@ -157471,41 +158006,6 @@ function rebaseValueCheckpoint(before, next, checkpoint) {
157471
158006
  };
157472
158007
  }
157473
158008
  //#endregion
157474
- //#region ../content-editor/src/session-journal/grouping.ts
157475
- /** A journal group has one target; keep its first inverse and last forward value. */
157476
- function groupedJournalChange(first, last) {
157477
- return {
157478
- ...first,
157479
- after: last.after
157480
- };
157481
- }
157482
- /** Keep the accepted identity and label while adopting only the owner's canonical inverse. */
157483
- function replaceJournalInverse(change, inverse) {
157484
- return {
157485
- ...change,
157486
- before: inverse.before,
157487
- after: inverse.after
157488
- };
157489
- }
157490
- /** A successful manual save closes its captured interaction, even if typing continued during the request. */
157491
- function closeSavedManualGroup(state, captured) {
157492
- const last = captured.at(-1);
157493
- if (!last || typeof last.edit.textKey !== "object" || last.edit.textKey?.kind !== "manual") return state;
157494
- const following = state.entries.filter((entry) => entry.group === last.group && entry.order > last.order);
157495
- const nextGroup = following[0]?.order;
157496
- return {
157497
- ...state,
157498
- entries: state.entries.map((entry) => nextGroup !== void 0 && following.includes(entry) ? {
157499
- ...entry,
157500
- group: nextGroup
157501
- } : entry),
157502
- grouping: state.grouping?.group === last.group ? nextGroup === void 0 ? null : {
157503
- ...state.grouping,
157504
- group: nextGroup
157505
- } : state.grouping
157506
- };
157507
- }
157508
- //#endregion
157509
158009
  //#region ../content-editor/src/session-journal/replay.ts
157510
158010
  /** Selection never searches for an older usable entry. Focus and the current view are irrelevant. */
157511
158011
  function planJournalReplay(state, direction, operationId) {
@@ -157628,6 +158128,7 @@ function foldSettledPair(first, last) {
157628
158128
  const receipt = first.settlement.receipt === last.settlement.receipt ? first.settlement.receipt : composeJournalCommitReceipts([first.settlement.receipt, last.settlement.receipt], journalTargetKey);
157629
158129
  return receipt ? {
157630
158130
  ...first,
158131
+ order: last.order,
157631
158132
  edit: groupedJournalChange(first.edit, last.edit),
157632
158133
  settlement: {
157633
158134
  kind: "settled",
@@ -157789,6 +158290,7 @@ function journalTransition(state, event) {
157789
158290
  cause: event.cause
157790
158291
  }
157791
158292
  };
158293
+ case "run-formed": return mergeJournalGroups(state, event.operationIds);
157792
158294
  case "conflicted": return adoptConflict(state, event.operationId, event.authoritative);
157793
158295
  case "root-observed": return noteRootRevision(state, event.root, event.revision);
157794
158296
  case "root-write-started": return beginRootWrite(state, event.root, event.operationId);
@@ -158647,7 +159149,7 @@ async function settlePendingReplay(operationIds, direction, effects, dispatch) {
158647
159149
  }
158648
159150
  function replaySelectionMatches(before, after, direction) {
158649
159151
  const selected = (state) => state.entries[direction === "undo" ? state.cursor - 1 : state.cursor]?.order;
158650
- return before.cursor === after.cursor && selected(before) === selected(after);
159152
+ return selected(before) === selected(after);
158651
159153
  }
158652
159154
  /** A failed settlement may have committed; timeout ends this replay, never parks it for later. */
158653
159155
  function boundedJournalSettlement(settlement) {
@@ -159022,19 +159524,25 @@ function fail(state, reason) {
159022
159524
  },
159023
159525
  effects: releaseOwned(state.phase)
159024
159526
  };
159025
- const fatal = reason !== "unavailable";
159527
+ if (reason === "unavailable") return {
159528
+ state: {
159529
+ ...state,
159530
+ phase: { kind: "unavailable" }
159531
+ },
159532
+ effects: releaseOwned(state.phase)
159533
+ };
159026
159534
  return {
159027
159535
  state: {
159028
159536
  ...state,
159029
- phase: fatal ? {
159537
+ phase: {
159030
159538
  kind: "fault",
159031
159539
  reason
159032
- } : { kind: "unavailable" }
159540
+ }
159033
159541
  },
159034
- effects: [...releaseOwned(state.phase), ...fatal ? [{
159542
+ effects: [...releaseOwned(state.phase), {
159035
159543
  kind: "fault",
159036
159544
  reason
159037
- }] : []]
159545
+ }]
159038
159546
  };
159039
159547
  }
159040
159548
  function onGrant(state, event) {
@@ -159264,8 +159772,12 @@ function leaseEditability(state) {
159264
159772
  } : state.phase.showing ?? { kind: "acquiring" };
159265
159773
  case "requesting":
159266
159774
  case "idle":
159267
- case "suspended":
159268
- case "fault": return { kind: "acquiring" };
159775
+ case "suspended": return { kind: "acquiring" };
159776
+ case "fault": return {
159777
+ kind: "read-only",
159778
+ reason: "refused",
159779
+ refusal: state.phase.reason
159780
+ };
159269
159781
  case "closed": return null;
159270
159782
  }
159271
159783
  }
@@ -159402,12 +159914,15 @@ async function release(runtime, token) {
159402
159914
  });
159403
159915
  } catch {}
159404
159916
  }
159917
+ /** The store's editability already explains a refusal; a host may be able to show something better. */
159405
159918
  function reportFault(runtime, reason) {
159406
- if ((reason === "not-found" || reason === "forbidden") && runtime.onAccessChanged.current) {
159407
- runtime.onAccessChanged.current();
159408
- return;
159409
- }
159410
- runtime.setFault(/* @__PURE__ */ new Error(`Editor lease request failed: ${reason}`));
159919
+ logger.warn("editLease.refused", {
159920
+ reason,
159921
+ siteId: runtime.scope.siteId,
159922
+ nodeType: runtime.scope.nodeType,
159923
+ nodeId: runtime.scope.nodeId
159924
+ });
159925
+ if (reason === "not-found" || reason === "forbidden") runtime.onAccessChanged.current?.();
159411
159926
  }
159412
159927
  async function runLeaseEffect(runtime, effect, dispatch, current) {
159413
159928
  switch (effect.kind) {
@@ -159629,6 +160144,9 @@ function useEditLeaseActions() {
159629
160144
  }
159630
160145
  //#endregion
159631
160146
  //#region ../content-editor/src/controller/EditorWriteGate.tsx
160147
+ function reloadPage() {
160148
+ window.location.reload();
160149
+ }
159632
160150
  /** Makes a mount's editing surface inert while the tab is waiting for, or denied, the lease. */
159633
160151
  function EditorWriteSurface({ children }) {
159634
160152
  const blocked = useEditorUiStore((state) => blocksEditingSurface(state.editability) || state.authoringHold() !== null);
@@ -159685,6 +160203,7 @@ function EditLeaseModal({ thing, onKeepViewing }) {
159685
160203
  handlers: {
159686
160204
  "take-over": () => actions.takeOver(),
159687
160205
  retry: () => actions.retry(),
160206
+ reload: reloadPage,
159688
160207
  discard: () => actions.discardLocal(),
159689
160208
  "keep-viewing": keepViewing,
159690
160209
  "discard-and-view": () => {
@@ -161312,9 +161831,31 @@ function captureCheckpoint(state, request) {
161312
161831
  };
161313
161832
  }
161314
161833
  /**
161315
- * A typing group sends once: the latest queued values of each key its operations still owe.
161834
+ * The operations one send stands for: the first queued group, plus every queued operation straight
161835
+ * after it that owes only the same value on the same target. They become one undo step and settle
161836
+ * together from the one receipt. Anything else queued, reserved or settled in between ends the run,
161837
+ * so a value never overtakes a write to something else.
161838
+ */
161839
+ function sendRun(state, entries, first, order, deferred) {
161840
+ const group = entries.filter((entry) => entry.order < order && entry.group === first.group && state.operations.has(entry.edit.operationId));
161841
+ const key = soleKey(state, group, first.edit);
161842
+ const later = key ? entries.filter((entry) => entry.order > (group[group.length - 1]?.order ?? first.order) && entry.order < order) : [];
161843
+ const end = later.findIndex((entry) => deferred.has(entry.edit.operationId) || !key || !owesOnly(state, entry, first.edit, key));
161844
+ return [...group, ...end < 0 ? later : later.slice(0, end)].map((entry) => entry.edit.operationId);
161845
+ }
161846
+ /** The one value a whole group owes and may share a send for, if there is one. */
161847
+ function soleKey(state, group, target) {
161848
+ const owed = state.operations.get(target.operationId)?.keys.values().next().value;
161849
+ return owed && group.every((entry) => owesOnly(state, entry, target, owed.checkpoint.key)) ? owed.checkpoint.key : null;
161850
+ }
161851
+ function owesOnly(state, entry, target, key) {
161852
+ const operation = state.operations.get(entry.edit.operationId);
161853
+ return operation?.keys.size === 1 && operation.keys.get(valueKeyId(key))?.kind === "queued" && journalTargetKey(entry.edit) === journalTargetKey(target);
161854
+ }
161855
+ /**
161856
+ * A run sends once: the latest queued values of each key its operations still owe.
161316
161857
  *
161317
- * Every operation in a group of more than one owes the same single key. Grouping needs a text key,
161858
+ * Every operation in a run of more than one owes the same single key. Grouping needs a text key,
161318
161859
  * and a text key names one block or field, so a grouped command can't change two values. Only a
161319
161860
  * lone operation owes several keys. A group mixing a one-key and a two-key operation can't be
161320
161861
  * built today and isn't designed for: if text keys ever span values, work out how such a group's
@@ -161399,7 +161940,11 @@ async function runBefore(state, drain, deferred = /* @__PURE__ */ new Set()) {
161399
161940
  const first = entries.find((entry) => entry.order < order && !deferred.has(entry.edit.operationId) && state.operations.has(entry.edit.operationId));
161400
161941
  if (!first) return [];
161401
161942
  if (entries.some((entry) => entry.order < first.order && isUnqueuedImmediate(state, entry))) return [];
161402
- const group = entries.filter((entry) => entry.order < order && entry.group === first.group && state.operations.has(entry.edit.operationId)).map((entry) => entry.edit.operationId);
161943
+ const group = sendRun(state, entries, first, order, deferred);
161944
+ state.journal.dispatch({
161945
+ kind: "run-formed",
161946
+ operationIds: group
161947
+ });
161403
161948
  const results = await runGroup(state, group, drain.request);
161404
161949
  return results.some(stopsDrain) ? results : [...results, ...await runBefore(state, drain, /* @__PURE__ */ new Set([...deferred, ...group]))];
161405
161950
  }
@@ -172245,4 +172790,4 @@ function usePreviewAssistantSlot() {
172245
172790
  return useContext(PreviewAssistantSlotContext);
172246
172791
  }
172247
172792
  //#endregion
172248
- export { useFooterComposerState as $, richTextVariantCapabilities as $a, createContextScope as $c, themeRuntimeScopeProps as $i, renderableMediaAssetSchema as $l, readSliderFieldUiConfig as $n, gradientToCss as $o, selectBlockContent as $r, Dialog as $s, listEntryPageContentSlots as $t, editorBlockCollectionOwnersEqual as $u, usePreviewJoinOutcome as A, faqHeadingFragment as Aa, __spreadArray as Ac, resolveMediaSlotContract as Ai, buttonStyleSelectionKey as Al, lifecycleOutcomeMessage as An, backgroundImagePromotedFieldPath as Ao, LocationMapView as Ar, resolveBlockTitle as As, toRoutableLinkPayload as At, parseBrevoListId as Au, initPreviewAuth as B, BLOCK_BUTTON_ROLE_OPTIONS as Ba, Content$1 as Bc, setContextResolveImageUrlContext as Bi, paletteValueKey as Bl, withoutServerVersions as Bn, concretePaletteFromTheme as Bo, defaultTransforms as Br, publicMapLocationParamsSchema as Bs, derivePromotedFieldPlan as Bt, readEditorBlockVersionsFromPlacement as Bu, pageDesignLookTiles as C, pageTemplateFromEntry as Ca, ReactRemoveScroll as Cc, getRichTextImageSize as Ci, siteOptionSources as Cl, recoveryConflictCopy as Cn, buildThemeRuntime as Co, arrangementHooksFromContent as Cr, flowRepeaterGridItems as Cs, EditorWriteSurface as Ct, setFooterSectionSelected as Cu, ObservedJoin as D, headingFragment as Da, __generator as Dc, resolveMediaStorageUrl as Di, resolveButtonStyleSelection as Dl, parseStoredSidebarWidth as Dn, getResponsiveScopeSpec as Do, buildLoadedOfferingsPreviewListing as Dr, resolveRepeaterGridAcceptedSpans as Ds, sendPageCommand as Dt, DEFAULT_MAILING_LIST_TARGETING as Du, selectedImageFromRenderableAsset as E, richTextFragment as Ea, __extends as Ec, resolveImageUrlWithContext as Ei, findButtonStyleRecipe as El, SIDEBAR_WIDTH as En, DEFAULT_THEME_RESPONSIVE_MODE as Eo, getDefaultComponentRegistry as Er, planRepeaterGridStartNewRow as Es, getEditorClientId as Et, parseMailingListPlacementTargeting as Eu, lookTilePosition as F, testimonialsCarouselFragment as Fa, createRovingFocusGroupScope as Fc, systemCustomizeFacetDefinitionForBlock as Fi, rgbColorValue as Fl, renderSourceFor as Fn, resolveEditorArrangementLook as Fo, siblingPath as Fr, editorAdmissionNotice as Fs, NewsletterFormClient as Ft, knownSocialPlatforms as Fu, renderSiteChromeBlock as G, defineFragment as Ga, FocusScope as Gc, isOfferingsPreviewSourceKey as Gi, formatAspectRatioToken as Gl, createManifestFormAdapter as Gn, componentRuntimeRulesForTheme as Go, createEditorPresentationPageReader as Gr, selectedCanvasBlockId as Gs, hasVisibilityConditions as Gt, knownRevision as Gu, renewPreviewSession as H, heroCopyFragment as Ha, createPopperScope as Hc, OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS as Hi, expandPalette as Hl, unsafeAsLinkedContentEntryId as Hn, lookDefinitionForId as Ho, resolvePageRouteTarget as Hr, ApiEnvelopeError as Hs, evaluateVisibility as Ht, selectedContentVersionId as Hu, lookTilesFor as I, testimonialsHeadingFragment as Ia, Presence as Ic, systemCustomizeFacetDefinitionsForBlock as Ii, textColorStyle as Il, renderedFieldChanges as In, restoreCompiledRuntimeFieldsFromContent as Io, withValueAtPath as Ir, editorAdmissionSession as Is, ImageResolveContextProvider as It, parsePublicProfile as Iu, footerLayoutSelection as J, validateManifestDraft as Ja, useCallbackRef$1 as Jc, planOfferingPreviewCardSelection as Ji, getDirectImageUrlForMediaAsset as Jl, getFieldDefault as Jn, headerStyleRecipeForTheme as Jo, mapOutlineRegions as Jr, VISUALLY_HIDDEN_STYLES as Js, createBlock as Jt, valueStatus as Ju, siteChromeHeaderLogoMayBeHardToSee as K, runTransforms as Ka, useFocusGuards as Kc, normalizeOfferingsPreviewGroupOrder as Ki, parseAspectRatioValue as Kl, createManifestValidation as Kn, designRuntimeRulesForTheme as Ko, allOutlineBlocks as Kr, sidebarReturnView as Ks, isNonEmptyValue as Kt, pristineValueSync as Ku, nextLookTilePin as L, ctaCopyFragment as La, Portal as Lc, systemCustomizeFacetStoredValue as Li, mapDrawingStyle as Ll, resolveRenderedValues as Ln, formatSiteChromeBackgroundTokenLabel as Lo, LINKED_CONTENT_ENTRY_META_KEY as Lr, observeEditorAdmission as Ls, useImageResolveContextOptional as Lt, publicProfileWeekdays as Lu, usePreviewRenderReadiness as M, singleButtonFragment as Ma, hideOthers as Mc, resolveArrangementKnobs as Mi, surfaceForegroundInputFromResolved as Ml, activeLinkedSaveHandover as Mn, sectionPhotoPresence as Mo, logger as Mr, isObjectRecord$1 as Ms, updateFooterComposition as Mt, parseMailchimpInterestId as Mu, STYLE_DEFAULT_LOOK_KEY as N, formEmbedFragment as Na, Item$1 as Nc, isSystemCustomizeFacetId as Ni, surfaceForegroundStyle as Nl, planLinkedSaveHandoverRetention as Nn, applyCompiledRuntimeFieldsToContent as No, Text as Nr, isRecord$23 as Ns, footerCreditLine as Nt, parseNewsletterListId as Nu, PreviewRenderObservationsProvider as O, cardFragment as Oa, __read as Oc, SECTION_BACKGROUND_MIN_SOURCE_WIDTH as Oi, updateButtonStyleHoverPreference as Ol, selectAutosaveStatus as On, resolveVisiblePromotedFieldPathsForEditorBlock as Oo, resolveEventDetailsPresentation as Or, resolveRepeaterGridBreakpointForWidth as Os, missingReceiptError as Ot, mailingListTargetingChoiceIds as Ou, lookPositionLabel as P, formCopyFragment as Pa, Root$2 as Pc, systemCustomizeFacetAppliesToLayoutVariant as Pi, surfaceForegroundValue as Pl, remoteDraftValues as Pn, compileEditorModelRuntime as Po, getAtPath as Pr, editorAdmissionIsOpen as Ps, clientComponentRegistry as Pt, knownSocialPlatformLabels as Pu, useFooterAuthoringOptional as Q, isRichTextDoc as Qa, useLayoutEffect2 as Qc, readThemeScopeContext as Qi, buildRenderableMediaAssetIndex as Ql, readNumberFieldUiConfig as Qn, surfaceResolutionContextFromTheme as Qo, readinessFactsFromLoaders as Qr, Spinner as Qs, isSurfaceSlotBlockTarget as Qt, editorBlockCollectionOwnerKey as Qu, selectedLookTile as R, heroCtaRowFragment as Ra, Anchor as Rc, buildResolveImageUrlContext as Ri, parseSurfaceTree as Rl, useStore as Rn, getHeaderLayout as Ro, coerceLinkedContentEntriesPayload as Rr, OPERATION_ID_HEADER as Rs, FormNodeClient as Rt, publishedContactDetails as Ru, pageDesignLookPosition as S, hiddenFromVisitors as Sa, usePortalContainer as Sc, RichText as Si, resolveRepeaterGridSpanFieldId as Sl, useSidebarView as Sn, parseFieldDefinition as So, resolveDefaultBlockTree as Sr, findFirstAvailableRepeaterGridPlacement as Ss, EditLeaseModal as St, resolveFooterSections as Su, selectedImageFromMediaValue as T, bookingConsentCarrierSchema as Ta, __awaiter as Tc, resolveImageSourceSetWithContext as Ti, buttonStyleSelectionParameterValue as Tl, unfinishedBlockCopy as Tn, mergeContentWithBlockStyleOverrides as To, readBlockComposition as Tr, normalizeRepeaterGridSpan as Ts, LeaseNoticeButtons as Tt, planFooterLayout as Tu, usePreviewAuth as U, ctaButton as Ua, useSize as Uc, groupOfferingRunsByCourse as Ui, isRotationDimensionSwap as Ul, editorAuthoredBlockDocument as Un, readStoredMode as Uo, resolveRouteTarget as Ur, extractApiEnvelopeErrorDetails as Us, getFieldIntent as Ut, parseEditLeaseScope as Uu, registerPreviewRenewalFetcher as V, isBlockButtonRole as Va, Root2$1 as Vc, normalizeEventRegistrationPageSurfaceSubject as Vi, defaultThemeTokens as Vl, deriveEditorValuePublicationState as Vn, concretePaletteToTheme as Vo, resolveEntryRouteTarget as Vr, calendarWindowQuerySchema as Vs, collectVisibleWhenWatchPaths as Vt, readPublishedBlockPlacement as Vu, usePreviewToken as W, bodyCopyFragment as Wa, useId$1 as Wc, inferLegacyOfferingsPreviewGroupOrder as Wi, normalizeRightAngle as Wl, initialBlockDraftValues as Wn, defaultPolicyPageFlowPresetId as Wo, fieldsNotShownIn as Wr, unwrapResponse as Ws, getWidgetKey as Wt, displayedValues as Wu, resolveFooterEngagementPreview as X, deriveFieldValidationPlan as Xa, createCollection as Xc, resolveOfferingsPreviewGroupOrderEntries as Xi, mediaSchema as Xl, normalizeFieldForCanonicalValidation as Xn, palettesForSiteStyle as Xo, publishReadinessWarning as Xr, CalloutDescription as Xs, deleteBlock as Xt, createEditorRemoveBlockCommand as Xu, resolveFooterEngagementAuthoringState as Y, admitLayoutGridForPlan as Ya, useDirection as Yc, readOfferingsGrouping as Yi, getImageUrl as Yl, getRepeaterItemDefault as Yn, offeredSiteStyles as Yo, PUBLISH_READINESS_COPY as Yr, Callout as Ys, createSlotBlock as Yt, createEditorInsertBlockCommand as Yu, FooterComposerProvider as Z, RichTextDocSchema as Za, useControllableState as Zc, buildThemeDataAttrs as Zi, runtimeMediaSchema as Zl, getGroupChildFields as Zn, compiledRuntimeStyleFieldNames as Zo, readinessFactsFromPayload as Zr, CalloutTitle as Zs, deleteSlotBlock as Zt, createEditorReorderBlocksCommand as Zu, PreviewFooterProvider as _, resolveDateRuntimeContext as _a, Root$1 as _c, chooseScheduleScope as _i, canEditorWrite as _l, resolveContentTitle as _n, parseInlineTextFromUnknown as _o, createCustomBlockRegistry as _r, isInternalResolvedLinkValue as _s, savedContentReceipt as _t, mailingListProviderName as _u, PreviewPageDesignEditorStateProvider as a, suggestSemanticIconForFeatureCard as aa, DialogTitle as ac, resolveBookingBusinessTimeZone as ad, LOCATION_MAP_LOADER_KEYS as ai, useControlReadiness as al, getDashboardBaseUrl as an, parseGeneratedIconSetId as ao, parseBackgroundColorToken as ar, getSiteFontsStorageUrl as as, readFooterEngagementDraft as at, getFontWidthRange as au, buildPageDesignEditorReadModelForBlocks as b, eventCalendarListGroupingDecision as ba, menuTriggerInteractionClassName as bc, writeEventSelectionChips as bi, resolveRepeaterGridColumnFieldId as bl, useEditorUiStoreInstance as bn, replaceInlineTextRange as bo, makeDefaultBlockComponent as br, planRepeaterGridSpanChange as bs, VIEWING_PARTICIPATION as bt, parseFooterCompositionV1 as bu, usePreviewShownTheme as c, SITE_OVERLAY_HEADER_CLEARANCE_CSS_VAR as ca, Dialog$1 as cc, toUtcIsoDateTimeString as cd, parseLocationMapLoaderResult as ci, createSlottable as cl, SURFACE_DOCUMENT_DATA_ATTRIBUTE as cn, coerceInlineTextWithFallback as co, planBackgroundTransition as cr, sectionTransitionFamilies as cs, EntryControllerProvider as ct, asDesignBlockId as cu, cycleSiteChromeSelectionId as d, measureSiteStickyChromeHeightPx as da, DialogDescription$1 as dc, unsafeAsMediaAssetId as dd, offeringsPreviewBlockDefinition as di, cn as dl, PREVIEW_CHROME_Z_INDEX as dn, inlineTextEqual as do, createPageRenderPlanReader as dr, resolveCompiledSectionContextFromContent as ds, DONE as dt, authoredValuesEqual as du, FEATURE_CARD_GENERATED_ICON_SIZE_PX as ea, DialogClose as ec, unsafeAsEditorBlockId as ed, fieldPathsOwnedBy as ei, composeEventHandlers as el, listPageSurfaceContentSlots as en, sanitizeHref as eo, backgroundColorTokens as er, GRADIENT_PRESETS as es, useFooterPanelOwnsNotice as et, indexRenderableMediaAssets as eu, PreviewThemeJournalProvider as f, measureSiteTopChromeBottomPx as fa, DialogOverlay$1 as fc, unsafeAsPositiveByteCount as fd, publicRouteCandidatesSchema as fi, useShallow as fl, createRoutingHelpers as fn, inlineTextHighlightTones as fo, planArrangementContent as fr, isThemeV2NormalEditorRawStyleFieldName as fs, runHeldLifecycle as ft, generateUuidV4 as fu, previewThemeBase as g, readRuntimeNow as ga, Content as gc, chooseAllEvents as gi, readLinkedEntryLease as gl, resolvePageRouteSlug as gn, normalizeInlineTextMarks as go, retargetJoinsAcrossOmissions as gr, assertNever$5 as gs, createEditorApiClientFactory as gt, resolveMailingListDefaultDestination as gu, composePreviewTheme as h, EDITABLE_SURFACE_FORWARDING_PROP as ha, DialogTrigger$1 as hc, expectParsedBrandedId as hd, EVENT_SELECTION_TYPE_OPTIONS as hi, canWriteLinkedEntry as hl, deriveRouteMetadataPresentation as hn, normalizeInlineText as ho, renderedJoinLayout as hr, lookModes as hs, useSessionJournalHistory as ht, assessMailingListTargeting as hu, usePreviewSidebarNavigation as i, resolveFeatureCardGeneratedIconSizePx as ia, DialogHeader as ic, parseBookingLocalDate as id, normalizeBlockContent as ii, buttonVariants as il, blocksKeys as in, parseGeneratedIconAssetId as io, imagePoolForOverride as ir, generateFontFaceCss as is, footerPartKey as it, asRecord as iu, usePreviewRenderBackgrounds as j, blogFeaturedPostFragment as ja, __spreadArrays as jc, arrangementKnobChoices as ji, parseThemeForPersistence as jl, canDiscardDraft as jn, decideSectionPhoto as jo, renderInlineText as jr, augmentManifestWithStyleGroups as js, publishContentEntry as jt, parseMailchimpAudienceId as ju, PreviewRenderPlanProjection as k, faqAccordionFragment as ka, __rest as kc, resolveMediaSlot as ki, updateButtonStyleSelectionChoice as kl, selectEditorWriteState as kn, heroPhotoPaintsGround as ko, buildAppointmentServicesView as kr, resolveRepeaterGridColumnsForBreakpoint as ks, footerMenuNavigationFacts as kt, sameMailingListPlacementTargeting as ku, SiteChromeCustomizeProvider as l, SITE_STICKY_CHROME_HEIGHT_CSS_VAR as la, DialogClose$1 as lc, assertNever$9 as ld, resolveLocationMapLocation as li, composeRefs as ll, resolveSurfaceDocumentAttributes as ln, deriveInlineTextFieldChanges as lo, rankBackgroundImagePoolItems as lr, sectionTransitionFamilyForBoundaryOptionId as ls, useEntryController as lt, asLayoutVariantKey as lu, usePreviewThemeSourceOptional as m, siteTopChromeMeasurementTargets as ma, DialogTitle$1 as mc, parseSiteId as md, EVENT_SELECTION_SCOPE_OPTIONS as mi, isEdited as ml, routeLifecycleContext as mn, isInlineTextEmpty as mo, joinSlotKey as mr, appearancePresets as ms, useSessionJournal as mt, buildMailingListSignupBlockSourceRef as mu, usePreviewAssistantSlot as n, getFeatureCardIconCompletion as na, DialogDescription as nc, formatDate$4 as nd, getBlockDefinition as ni, dispatchDiscreteCustomEvent as nl, reorderSlotBlocks as nn, getGeneratedBlockIconStyleState as no, defaultBackgroundOverrideForMode as nr, buildFontPreviewUrl as ns, footerHeaderStatus as nt, PUBLIC_FILE_FIELD_KINDS as nu, usePreviewPageDesignEditorState as o, toFeatureCardIconSuggestionInputs as oa, DialogTrigger as oc, resolveBookingTimeZoneId as od, describeUnresolvedLocationMapLocation as oi, cva as ol, getDashboardUrl as on, parseSiteIconStyleGuideVersionId as oo, parseBackgroundOverrideFromContent as or, findCuratedPalette as os, footerEngagementEventFields as ot, isBodyFontFamily as ou, usePreviewThemeSource as p, planSiteOverlayHeaderClearance as pa, DialogPortal$1 as pc, unsafeAsPositiveSeconds as pd, eventCalendarPagingFields as pi, baselineRevisionOf as pl, createSnapshotFromPageRecord as pn, inlineTextToPlainText as po, composePageJoins as pr, isThemeV2NormalEditorRawStylePath as ps, useServerRefresh as pt, slugify as pu, buildFooterRuntimeViewModel as q, compileManifestContentContract as qa, DismissableLayer as qc, offeringsListingFor as qi, resolveMediaTransformForAspect as ql, manifestFieldSectionOptions as qn, getCuratedSiteStyle as qo, mapOutlineBlocks as qr, Root as qs, partitionFieldsByIntent as qt, syncStateOf as qu, PreviewSidebarBootstrap as r, parseFeatureCardGeneratedIconSizePx as ra, DialogFooter as rc, formatDateTime as rd, listBlockDescriptors as ri, Button as rl, withSlotCompositionHash as rn, parseBlockIconValue as ro, enabledBackgroundModes as rr, buildGoogleFontFamilyQuery as rs, footerEngagementStarted as rt, mediaIdentifierSchema as ru, usePreviewPageDesignRenderState as s, SITE_CHROME_VISIBLE_HEADER_SELECTOR as sa, overlayScrimClass as sc, parseUtcIsoDateTimeString as sd, normalizeLocationMapSource as si, createSlot as sl, DEFAULT_SURFACE_ID as sn, applyInlineTextMarkToRange as so, parseCanonicalSectionBackground as sr, defaultSectionTransitionVariantForFamily as ss, parseFooterEngagementDraft as st, asAppearancePresetId as su, PreviewAssistantSlotProvider as t, createFeatureCardIconKey as ta, DialogContent as tc, unsafeAsEditorBlockValues as td, resolveFieldOwnership as ti, Primitive as tl, reorderBlocks as tn, getBlockIconSemanticId as to, canCycleBackgroundOverrideValue as tr, getGradientPreset as ts, SessionJournalHost as tt, resolveManagedMediaReference as tu, useSiteChromeCustomizeOptional as u, SITE_STICKY_CHROME_HEIGHT_FALLBACK as ua, DialogContent$1 as uc, parseMediaAssetId as ud, buildNewsletterFormInteractiveIslandProps as ui, useComposedRefs as ul, ApiRequestError as un, inlineTextAccentTones as uo, resolveBackgroundCapability as ur, sectionTransitionVariantForBoundaryOptionId as us, useEntryEditorController as ut, asSiteStyleId as uu, useLiveFooterRuntime as v, planSiteChromePlacement as va, Trigger as vc, readEventSelectionChips as vi, bindingSchema as vl, planLeaseNotice as vn, plainTextToInlineText as vo, mergeBlockDescriptorsWithRegistry as vr, planLayoutGridColumnEdit as vs, savedPageSurfaceMetadataReceipt as vt, deriveFooterEditorOverview as vu, setPageDesignBlockBackground as w, publicEventsArraySchema as wa, __assign as wc, computeMediaTransformStyle as wi, buttonStyleHoverPreferenceValue as wl, shouldRevealAllBlockFieldValidation as wn, escapeStyleContent as wo, blockLookFromContent as wr, isRepeaterGridLayoutInvalid as ws, LeaseDiscardedNoticeView as wt, unsafeAsFooterModuleId as wu, cyclePageDesignBlockLook as x, projectRecurringSchedule as xa, PortalContainerProvider as xc, cardListPresentationSchemaShape as xi, resolveRepeaterGridRowFieldId as xl, useOptionalEditorUiStoreInstance as xn, truncateInlineText as xo, resolveBlockVariantKey as xr, projectRepeaterGridLayout as xs, EditLeaseDiscardedNotice as xt, parseFooterModuleId as xu, applyBindingsToContent as y, buildFormInteractiveIslandProps as ya, menuItemInteractionClassName as yc, toggleEventType as yi, isAcceptedRepeaterGridSpan as yl, useEditorUiStore as yn, removeInlineTextMarkFromRange as yo, mergeManifestWithSdkOptions as yr, buildRepeaterGridDropTargets as ys, useRetentionTicks as yt, normalizeLegacyFooterContentToV1 as yu, createGuardedPreviewApiClient as z, ctaRowFragment as za, Arrow as zc, getCurrentResolveImageUrlContext as zi, resolveSurfaceForeground as zl, toEditorBlockItem as zn, getHeaderStyle as zo, getLinkedContentEntryMeta as zr, API_ENDPOINTS as zs, BlockApiProvider as zt, NO_BLOCK_VERSIONS as zu };
172793
+ export { useFooterComposerState as $, isRichTextDoc as $a, useLayoutEffect2 as $c, readThemeScopeContext as $i, buildRenderableMediaAssetIndex as $l, readNumberFieldUiConfig as $n, surfaceResolutionContextFromTheme as $o, readinessFactsFromLoaders as $r, Spinner as $s, isSurfaceSlotBlockTarget as $t, editorBlockCollectionOwnerKey as $u, usePreviewJoinOutcome as A, faqAccordionFragment as Aa, __rest as Ac, resolveMediaSlot as Ai, updateButtonStyleSelectionChoice as Al, selectEditorWriteState as An, heroPhotoPaintsGround as Ao, buildAppointmentServicesView as Ar, resolveRepeaterGridColumnsForBreakpoint as As, footerMenuNavigationFacts as At, sameMailingListPlacementTargeting as Au, initPreviewAuth as B, ctaRowFragment as Ba, Arrow as Bc, getCurrentResolveImageUrlContext as Bi, resolveSurfaceForeground as Bl, toEditorBlockItem as Bn, getHeaderStyle as Bo, getLinkedContentEntryMeta as Br, API_ENDPOINTS as Bs, BlockApiProvider as Bt, NO_BLOCK_VERSIONS as Bu, pageDesignLookTiles as C, hiddenFromVisitors as Ca, usePortalContainer as Cc, RichText as Ci, resolveRepeaterGridSpanFieldId as Cl, useSidebarView as Cn, parseFieldDefinition as Co, resolveDefaultBlockTree as Cr, findFirstAvailableRepeaterGridPlacement as Cs, EditorWriteSurface as Ct, resolveFooterSections as Cu, ObservedJoin as D, richTextFragment as Da, __extends as Dc, resolveImageUrlWithContext as Di, findButtonStyleRecipe as Dl, SIDEBAR_WIDTH as Dn, DEFAULT_THEME_RESPONSIVE_MODE as Do, getDefaultComponentRegistry as Dr, planRepeaterGridStartNewRow as Ds, getEditorClientId as Dt, parseMailingListPlacementTargeting as Du, selectedImageFromRenderableAsset as E, bookingConsentCarrierSchema as Ea, __awaiter as Ec, resolveImageSourceSetWithContext as Ei, buttonStyleSelectionParameterValue as El, unfinishedBlockCopy as En, mergeContentWithBlockStyleOverrides as Eo, readBlockComposition as Er, normalizeRepeaterGridSpan as Es, reloadPage as Et, planFooterLayout as Eu, lookTilePosition as F, formCopyFragment as Fa, Root$2 as Fc, systemCustomizeFacetAppliesToLayoutVariant as Fi, surfaceForegroundValue as Fl, remoteDraftValues as Fn, compileEditorModelRuntime as Fo, getAtPath as Fr, editorAdmissionIsOpen as Fs, clientComponentRegistry as Ft, knownSocialPlatformLabels as Fu, renderSiteChromeBlock as G, bodyCopyFragment as Ga, useId$1 as Gc, inferLegacyOfferingsPreviewGroupOrder as Gi, normalizeRightAngle as Gl, initialBlockDraftValues as Gn, defaultPolicyPageFlowPresetId as Go, fieldsNotShownIn as Gr, unwrapResponse as Gs, getWidgetKey as Gt, displayedValues as Gu, renewPreviewSession as H, isBlockButtonRole as Ha, Root2$1 as Hc, normalizeEventRegistrationPageSurfaceSubject as Hi, defaultThemeTokens as Hl, deriveEditorValuePublicationState as Hn, concretePaletteToTheme as Ho, resolveEntryRouteTarget as Hr, calendarWindowQuerySchema as Hs, collectVisibleWhenWatchPaths as Ht, readPublishedBlockPlacement as Hu, lookTilesFor as I, testimonialsCarouselFragment as Ia, createRovingFocusGroupScope as Ic, systemCustomizeFacetDefinitionForBlock as Ii, rgbColorValue as Il, renderSourceFor as In, resolveEditorArrangementLook as Io, siblingPath as Ir, editorAdmissionNotice as Is, NewsletterFormClient as It, knownSocialPlatforms as Iu, footerLayoutSelection as J, compileManifestContentContract as Ja, DismissableLayer as Jc, offeringsListingFor as Ji, resolveMediaTransformForAspect as Jl, manifestFieldSectionOptions as Jn, getCuratedSiteStyle as Jo, mapOutlineBlocks as Jr, Root as Js, partitionFieldsByIntent as Jt, syncStateOf as Ju, siteChromeHeaderLogoMayBeHardToSee as K, defineFragment as Ka, FocusScope as Kc, isOfferingsPreviewSourceKey as Ki, formatAspectRatioToken as Kl, createManifestFormAdapter as Kn, componentRuntimeRulesForTheme as Ko, createEditorPresentationPageReader as Kr, selectedCanvasBlockId as Ks, hasVisibilityConditions as Kt, knownRevision as Ku, nextLookTilePin as L, testimonialsHeadingFragment as La, Presence as Lc, systemCustomizeFacetDefinitionsForBlock as Li, textColorStyle as Ll, renderedFieldChanges as Ln, restoreCompiledRuntimeFieldsFromContent as Lo, withValueAtPath as Lr, editorAdmissionSession as Ls, ImageResolveContextProvider as Lt, parsePublicProfile as Lu, usePreviewRenderReadiness as M, blogFeaturedPostFragment as Ma, __spreadArrays as Mc, arrangementKnobChoices as Mi, parseThemeForPersistence as Ml, canDiscardDraft as Mn, decideSectionPhoto as Mo, renderInlineText as Mr, augmentManifestWithStyleGroups as Ms, publishContentEntry as Mt, parseMailchimpAudienceId as Mu, STYLE_DEFAULT_LOOK_KEY as N, singleButtonFragment as Na, hideOthers as Nc, resolveArrangementKnobs as Ni, surfaceForegroundInputFromResolved as Nl, activeLinkedSaveHandover as Nn, sectionPhotoPresence as No, logger as Nr, isObjectRecord$1 as Ns, updateFooterComposition as Nt, parseMailchimpInterestId as Nu, PreviewRenderObservationsProvider as O, headingFragment as Oa, __generator as Oc, resolveMediaStorageUrl as Oi, resolveButtonStyleSelection as Ol, parseStoredSidebarWidth as On, getResponsiveScopeSpec as Oo, buildLoadedOfferingsPreviewListing as Or, resolveRepeaterGridAcceptedSpans as Os, sendPageCommand as Ot, DEFAULT_MAILING_LIST_TARGETING as Ou, lookPositionLabel as P, formEmbedFragment as Pa, Item$1 as Pc, isSystemCustomizeFacetId as Pi, surfaceForegroundStyle as Pl, planLinkedSaveHandoverRetention as Pn, applyCompiledRuntimeFieldsToContent as Po, Text as Pr, isRecord$23 as Ps, footerCreditLine as Pt, parseNewsletterListId as Pu, useFooterAuthoringOptional as Q, RichTextDocSchema as Qa, useControllableState as Qc, buildThemeDataAttrs as Qi, runtimeMediaSchema as Ql, getGroupChildFields as Qn, compiledRuntimeStyleFieldNames as Qo, readinessFactsFromPayload as Qr, CalloutTitle as Qs, deleteSlotBlock as Qt, createEditorReorderBlocksCommand as Qu, selectedLookTile as R, ctaCopyFragment as Ra, Portal as Rc, systemCustomizeFacetStoredValue as Ri, mapDrawingStyle as Rl, resolveRenderedValues as Rn, formatSiteChromeBackgroundTokenLabel as Ro, LINKED_CONTENT_ENTRY_META_KEY as Rr, observeEditorAdmission as Rs, useImageResolveContextOptional as Rt, publicProfileWeekdays as Ru, pageDesignLookPosition as S, projectRecurringSchedule as Sa, PortalContainerProvider as Sc, cardListPresentationSchemaShape as Si, resolveRepeaterGridRowFieldId as Sl, useOptionalEditorUiStoreInstance as Sn, truncateInlineText as So, resolveBlockVariantKey as Sr, projectRepeaterGridLayout as Ss, EditLeaseModal as St, parseFooterModuleId as Su, selectedImageFromMediaValue as T, publicEventsArraySchema as Ta, __assign as Tc, computeMediaTransformStyle as Ti, buttonStyleHoverPreferenceValue as Tl, shouldRevealAllBlockFieldValidation as Tn, escapeStyleContent as To, blockLookFromContent as Tr, isRepeaterGridLayoutInvalid as Ts, LeaseNoticeButtons as Tt, unsafeAsFooterModuleId as Tu, usePreviewAuth as U, heroCopyFragment as Ua, createPopperScope as Uc, OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS as Ui, expandPalette as Ul, unsafeAsLinkedContentEntryId as Un, lookDefinitionForId as Uo, resolvePageRouteTarget as Ur, ApiEnvelopeError as Us, evaluateVisibility as Ut, selectedContentVersionId as Uu, registerPreviewRenewalFetcher as V, BLOCK_BUTTON_ROLE_OPTIONS as Va, Content$1 as Vc, setContextResolveImageUrlContext as Vi, paletteValueKey as Vl, withoutServerVersions as Vn, concretePaletteFromTheme as Vo, defaultTransforms as Vr, publicMapLocationParamsSchema as Vs, derivePromotedFieldPlan as Vt, readEditorBlockVersionsFromPlacement as Vu, usePreviewToken as W, ctaButton as Wa, useSize as Wc, groupOfferingRunsByCourse as Wi, isRotationDimensionSwap as Wl, editorAuthoredBlockDocument as Wn, readStoredMode as Wo, resolveRouteTarget as Wr, extractApiEnvelopeErrorDetails as Ws, getFieldIntent as Wt, parseEditLeaseScope as Wu, resolveFooterEngagementPreview as X, admitLayoutGridForPlan as Xa, useDirection as Xc, readOfferingsGrouping as Xi, getImageUrl as Xl, getRepeaterItemDefault as Xn, offeredSiteStyles as Xo, PUBLISH_READINESS_COPY as Xr, Callout as Xs, createSlotBlock as Xt, createEditorInsertBlockCommand as Xu, resolveFooterEngagementAuthoringState as Y, validateManifestDraft as Ya, useCallbackRef$1 as Yc, planOfferingPreviewCardSelection as Yi, getDirectImageUrlForMediaAsset as Yl, getFieldDefault as Yn, headerStyleRecipeForTheme as Yo, mapOutlineRegions as Yr, VISUALLY_HIDDEN_STYLES as Ys, createBlock as Yt, valueStatus as Yu, FooterComposerProvider as Z, deriveFieldValidationPlan as Za, createCollection as Zc, resolveOfferingsPreviewGroupOrderEntries as Zi, mediaSchema as Zl, normalizeFieldForCanonicalValidation as Zn, palettesForSiteStyle as Zo, publishReadinessWarning as Zr, CalloutDescription as Zs, deleteBlock as Zt, createEditorRemoveBlockCommand as Zu, PreviewFooterProvider as _, readRuntimeNow as _a, Content as _c, chooseAllEvents as _i, readLinkedEntryLease as _l, resolvePageRouteSlug as _n, normalizeInlineTextMarks as _o, retargetJoinsAcrossOmissions as _r, assertNever$5 as _s, savedContentReceipt as _t, resolveMailingListDefaultDestination as _u, PreviewPageDesignEditorStateProvider as a, resolveFeatureCardGeneratedIconSizePx as aa, DialogHeader as ac, parseBookingLocalDate as ad, normalizeBlockContent as ai, buttonVariants as al, blocksKeys as an, parseGeneratedIconAssetId as ao, imagePoolForOverride as ar, generateFontFaceCss as as, readFooterEngagementDraft as at, asRecord as au, buildPageDesignEditorReadModelForBlocks as b, buildFormInteractiveIslandProps as ba, menuItemInteractionClassName as bc, toggleEventType as bi, isAcceptedRepeaterGridSpan as bl, useEditorUiStore as bn, removeInlineTextMarkFromRange as bo, mergeManifestWithSdkOptions as br, buildRepeaterGridDropTargets as bs, VIEWING_PARTICIPATION as bt, normalizeLegacyFooterContentToV1 as bu, usePreviewShownTheme as c, SITE_CHROME_VISIBLE_HEADER_SELECTOR as ca, overlayScrimClass as cc, resolveBookingBusinessTimeZone as cd, normalizeLocationMapSource as ci, createSlot as cl, DEFAULT_SURFACE_ID as cn, applyInlineTextMarkToRange as co, parseCanonicalSectionBackground as cr, defaultSectionTransitionVariantForFamily as cs, EntryControllerProvider as ct, asAppearancePresetId as cu, cycleSiteChromeSelectionId as d, SITE_STICKY_CHROME_HEIGHT_FALLBACK as da, DialogContent$1 as dc, parseMediaAssetId as dd, buildNewsletterFormInteractiveIslandProps as di, useComposedRefs as dl, ApiRequestError as dn, inlineTextAccentTones as do, resolveBackgroundCapability as dr, sectionTransitionVariantForBoundaryOptionId as ds, DONE as dt, asSiteStyleId as du, themeRuntimeScopeProps as ea, Dialog as ec, editorBlockCollectionOwnersEqual as ed, selectBlockContent as ei, createContextScope as el, listEntryPageContentSlots as en, richTextVariantCapabilities as eo, readSliderFieldUiConfig as er, gradientToCss as es, useFooterPanelOwnsNotice as et, renderableMediaAssetSchema as eu, PreviewThemeJournalProvider as f, measureSiteStickyChromeHeightPx as fa, DialogDescription$1 as fc, unsafeAsMediaAssetId as fd, offeringsPreviewBlockDefinition as fi, cn as fl, PREVIEW_CHROME_Z_INDEX as fn, inlineTextEqual as fo, createPageRenderPlanReader as fr, resolveCompiledSectionContextFromContent as fs, runHeldLifecycle as ft, authoredValuesEqual as fu, previewThemeBase as g, EDITABLE_SURFACE_FORWARDING_PROP as ga, DialogTrigger$1 as gc, expectParsedBrandedId as gd, EVENT_SELECTION_TYPE_OPTIONS as gi, canWriteLinkedEntry as gl, deriveRouteMetadataPresentation as gn, normalizeInlineText as go, renderedJoinLayout as gr, lookModes as gs, createEditorApiClientFactory as gt, assessMailingListTargeting as gu, composePreviewTheme as h, siteTopChromeMeasurementTargets as ha, DialogTitle$1 as hc, parseSiteId as hd, EVENT_SELECTION_SCOPE_OPTIONS as hi, isEdited as hl, routeLifecycleContext as hn, isInlineTextEmpty as ho, joinSlotKey as hr, appearancePresets as hs, useSessionJournalHistory as ht, buildMailingListSignupBlockSourceRef as hu, usePreviewSidebarNavigation as i, parseFeatureCardGeneratedIconSizePx as ia, DialogFooter as ic, formatDateTime as id, listBlockDescriptors as ii, Button as il, withSlotCompositionHash as in, parseBlockIconValue as io, enabledBackgroundModes as ir, buildGoogleFontFamilyQuery as is, footerPartKey as it, mediaIdentifierSchema as iu, usePreviewRenderBackgrounds as j, faqHeadingFragment as ja, __spreadArray as jc, resolveMediaSlotContract as ji, buttonStyleSelectionKey as jl, lifecycleOutcomeMessage as jn, backgroundImagePromotedFieldPath as jo, LocationMapView as jr, resolveBlockTitle as js, toRoutableLinkPayload as jt, parseBrevoListId as ju, PreviewRenderPlanProjection as k, cardFragment as ka, __read as kc, SECTION_BACKGROUND_MIN_SOURCE_WIDTH as ki, updateButtonStyleHoverPreference as kl, selectAutosaveStatus as kn, resolveVisiblePromotedFieldPathsForEditorBlock as ko, resolveEventDetailsPresentation as kr, resolveRepeaterGridBreakpointForWidth as ks, missingReceiptError as kt, mailingListTargetingChoiceIds as ku, SiteChromeCustomizeProvider as l, SITE_OVERLAY_HEADER_CLEARANCE_CSS_VAR as la, Dialog$1 as lc, resolveBookingTimeZoneId as ld, parseLocationMapLoaderResult as li, createSlottable as ll, SURFACE_DOCUMENT_DATA_ATTRIBUTE as ln, coerceInlineTextWithFallback as lo, planBackgroundTransition as lr, sectionTransitionFamilies as ls, useEntryController as lt, asDesignBlockId as lu, usePreviewThemeSourceOptional as m, planSiteOverlayHeaderClearance as ma, DialogPortal$1 as mc, unsafeAsPositiveSeconds as md, eventCalendarPagingFields as mi, baselineRevisionOf as ml, createSnapshotFromPageRecord as mn, inlineTextToPlainText as mo, composePageJoins as mr, isThemeV2NormalEditorRawStylePath as ms, useSessionJournal as mt, slugify as mu, usePreviewAssistantSlot as n, createFeatureCardIconKey as na, DialogContent as nc, unsafeAsEditorBlockValues as nd, resolveFieldOwnership as ni, Primitive as nl, reorderBlocks as nn, getBlockIconSemanticId as no, canCycleBackgroundOverrideValue as nr, getGradientPreset as ns, footerHeaderStatus as nt, resolveManagedMediaReference as nu, usePreviewPageDesignEditorState as o, suggestSemanticIconForFeatureCard as oa, DialogTitle as oc, parseUtcIsoDateTimeString as od, LOCATION_MAP_LOADER_KEYS as oi, useControlReadiness as ol, getDashboardBaseUrl as on, parseGeneratedIconSetId as oo, parseBackgroundColorToken as or, getSiteFontsStorageUrl as os, footerEngagementEventFields as ot, getFontWidthRange as ou, usePreviewThemeSource as p, measureSiteTopChromeBottomPx as pa, DialogOverlay$1 as pc, unsafeAsPositiveByteCount as pd, publicRouteCandidatesSchema as pi, useShallow as pl, createRoutingHelpers as pn, inlineTextHighlightTones as po, planArrangementContent as pr, isThemeV2NormalEditorRawStyleFieldName as ps, useServerRefresh as pt, generateUuidV4 as pu, buildFooterRuntimeViewModel as q, runTransforms as qa, useFocusGuards as qc, normalizeOfferingsPreviewGroupOrder as qi, parseAspectRatioValue as ql, createManifestValidation as qn, designRuntimeRulesForTheme as qo, allOutlineBlocks as qr, sidebarReturnView as qs, isNonEmptyValue as qt, pristineValueSync as qu, PreviewSidebarBootstrap as r, getFeatureCardIconCompletion as ra, DialogDescription as rc, formatDate$4 as rd, getBlockDefinition as ri, dispatchDiscreteCustomEvent as rl, reorderSlotBlocks as rn, getGeneratedBlockIconStyleState as ro, defaultBackgroundOverrideForMode as rr, buildFontPreviewUrl as rs, footerEngagementStarted as rt, PUBLIC_FILE_FIELD_KINDS as ru, usePreviewPageDesignRenderState as s, toFeatureCardIconSuggestionInputs as sa, DialogTrigger as sc, toUtcIsoDateTimeString as sd, describeUnresolvedLocationMapLocation as si, cva as sl, getDashboardUrl as sn, parseSiteIconStyleGuideVersionId as so, parseBackgroundOverrideFromContent as sr, findCuratedPalette as ss, parseFooterEngagementDraft as st, isBodyFontFamily as su, PreviewAssistantSlotProvider as t, FEATURE_CARD_GENERATED_ICON_SIZE_PX as ta, DialogClose as tc, unsafeAsEditorBlockId as td, fieldPathsOwnedBy as ti, composeEventHandlers as tl, listPageSurfaceContentSlots as tn, sanitizeHref as to, backgroundColorTokens as tr, GRADIENT_PRESETS as ts, SessionJournalHost as tt, indexRenderableMediaAssets as tu, useSiteChromeCustomizeOptional as u, SITE_STICKY_CHROME_HEIGHT_CSS_VAR as ua, DialogClose$1 as uc, assertNever$9 as ud, resolveLocationMapLocation as ui, composeRefs as ul, resolveSurfaceDocumentAttributes as un, deriveInlineTextFieldChanges as uo, rankBackgroundImagePoolItems as ur, sectionTransitionFamilyForBoundaryOptionId as us, useEntryEditorController as ut, asLayoutVariantKey as uu, useLiveFooterRuntime as v, resolveDateRuntimeContext as va, Root$1 as vc, chooseScheduleScope as vi, canEditorWrite as vl, resolveContentTitle as vn, parseInlineTextFromUnknown as vo, createCustomBlockRegistry as vr, isInternalResolvedLinkValue as vs, savedPageSurfaceMetadataReceipt as vt, mailingListProviderName as vu, setPageDesignBlockBackground as w, pageTemplateFromEntry as wa, ReactRemoveScroll as wc, getRichTextImageSize as wi, siteOptionSources as wl, recoveryConflictCopy as wn, buildThemeRuntime as wo, arrangementHooksFromContent as wr, flowRepeaterGridItems as ws, LeaseDiscardedNoticeView as wt, setFooterSectionSelected as wu, cyclePageDesignBlockLook as x, eventCalendarListGroupingDecision as xa, menuTriggerInteractionClassName as xc, writeEventSelectionChips as xi, resolveRepeaterGridColumnFieldId as xl, useEditorUiStoreInstance as xn, replaceInlineTextRange as xo, makeDefaultBlockComponent as xr, planRepeaterGridSpanChange as xs, EditLeaseDiscardedNotice as xt, parseFooterCompositionV1 as xu, applyBindingsToContent as y, planSiteChromePlacement as ya, Trigger as yc, readEventSelectionChips as yi, bindingSchema as yl, planLeaseNotice as yn, plainTextToInlineText as yo, mergeBlockDescriptorsWithRegistry as yr, planLayoutGridColumnEdit as ys, useRetentionTicks as yt, deriveFooterEditorOverview as yu, createGuardedPreviewApiClient as z, heroCtaRowFragment as za, Anchor as zc, buildResolveImageUrlContext as zi, parseSurfaceTree as zl, useStore as zn, getHeaderLayout as zo, coerceLinkedContentEntriesPayload as zr, OPERATION_ID_HEADER as zs, FormNodeClient as zt, publishedContactDetails as zu };