@riverbankcms/sdk 0.182.0 → 0.184.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 (231) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/README.md +83 -4
  3. package/dist/_dts/{BlocksIslandsHydrator-Bvw2bUif.d.ts → BlocksIslandsHydrator-DjBTJYiF.d.ts} +1 -1
  4. package/dist/_dts/{Page-B2EAT-bE.d.ts → Page-BpXEM2ET.d.ts} +7 -7
  5. package/dist/_dts/{SdkPreviewMode-D0vww6rh.d.ts → SdkPreviewMode-Bb3h7KRE.d.ts} +2 -2
  6. package/dist/_dts/{client-D6T430bk.d.ts → client-DgTRRtl_.d.ts} +14 -1
  7. package/dist/_dts/{content-types-wZVWccC6.d.ts → content-types-DZQJp_ak.d.ts} +9 -16
  8. package/dist/_dts/{contracts-B-vtOcr8.d.ts → contracts-Ww1fmd-c.d.ts} +3 -3
  9. package/dist/_dts/{generatePageMetadata-CxfwHE6z.d.ts → generatePageMetadata-BGc7dju6.d.ts} +2 -2
  10. package/dist/_dts/{index-CciRW_w1.d.ts → index-BECaUNYs.d.ts} +2 -2
  11. package/dist/_dts/{index-CEyYMhLJ.d.ts → index-Cc85KVLW.d.ts} +3 -3
  12. package/dist/_dts/{index-CQrb3Ccc.d.ts → index-Cni4jykw.d.ts} +4 -4
  13. package/dist/_dts/{index-DIU-wL1M.d.ts → index-DxxTQ_0V.d.ts} +2 -2
  14. package/dist/_dts/{index-Cqxis-nv.d.ts → index-W9-7djG3.d.ts} +1 -1
  15. package/dist/_dts/{index-DqPKdeTk.d.ts → index-ukS-Ffem.d.ts} +1 -1
  16. package/dist/_dts/{loadContent-D0wrxiSp.d.ts → loadContent-BlSWTlbD.d.ts} +7 -7
  17. package/dist/_dts/{request-DEwxUSw8.d.ts → request-CZz2BoXJ.d.ts} +89478 -88093
  18. package/dist/_dts/{resolveBlockData-VaG_MYbN.d.ts → resolveBlockData-D12HXnS3.d.ts} +5 -5
  19. package/dist/_dts/{resolvePageContent-DTwklC_v.d.ts → resolvePageContent-BteMsSGP.d.ts} +1 -1
  20. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  21. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  22. package/dist/_dts/sdk/src/client.d.ts +7 -7
  23. package/dist/_dts/sdk/src/config/index.d.ts +7 -7
  24. package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
  25. package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
  26. package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
  27. package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
  28. package/dist/_dts/sdk/src/data/types.d.ts +2 -2
  29. package/dist/_dts/sdk/src/gifting/client.d.ts +1 -1
  30. package/dist/_dts/sdk/src/index.d.ts +8 -8
  31. package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
  32. package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
  33. package/dist/_dts/sdk/src/navigation/index.d.ts +3 -3
  34. package/dist/_dts/sdk/src/next/index.d.ts +7 -7
  35. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  36. package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
  37. package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
  38. package/dist/_dts/sdk/src/portal/index.d.ts +10 -2
  39. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  40. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  41. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  42. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  43. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  44. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
  45. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
  46. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
  47. package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
  48. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  49. package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
  50. package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
  51. package/dist/_dts/sdk/src/routing/index.d.ts +6 -6
  52. package/dist/_dts/sdk/src/server.d.ts +5 -5
  53. package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
  54. package/dist/_dts/sdk/src/theme/index.d.ts +126 -2
  55. package/dist/_dts/{serviceBookingOutline-DtQuFlID.d.ts → serviceBookingOutline-aTlOvO3U.d.ts} +16 -8
  56. package/dist/_dts/{types-B3RjeBLV.d.ts → types-Bi7R07RX.d.ts} +45 -4
  57. package/dist/_dts/{types-BvUSGQrw.d.ts → types-CCcQlRBi.d.ts} +22 -12
  58. package/dist/_dts/{types-CkRFtBqd.d.ts → types-Du4aMnWC.d.ts} +13 -15
  59. package/dist/_dts/{validation-BZA3DhcV.d.ts → validation-CjCWVmwe.d.ts} +4 -4
  60. package/dist/client/{BlocksIslandsHydrator-CQMf0HdN.mjs → BlocksIslandsHydrator-CFLWxjxR.mjs} +22 -18
  61. package/dist/client/{BookingMailingListNote-7kdvuPow.mjs → BookingMailingListNote-C4LcfwyA.mjs} +8 -8
  62. package/dist/client/{BookingQuestionFields-BJI7mZuV.mjs → BookingQuestionFields-DdcmoHqQ.mjs} +2 -2
  63. package/dist/client/{CalendarAction-D_Glwvz2.mjs → CalendarAction-DYGewmvh.mjs} +1 -1
  64. package/dist/client/{CalendarNavigationChevron-DPUD6wjy.mjs → CalendarNavigationChevron-ZfrUiiiI.mjs} +25 -8
  65. package/dist/client/{CheckboxChoice-C8i4NraK.mjs → CheckboxChoice-CTMIII37.mjs} +1 -1
  66. package/dist/client/{DemoBookingPortalAccess-8kwNF9HN.mjs → DemoBookingPortalAccess-pzkGVkgG.mjs} +7 -5
  67. package/dist/client/{EventCalendar.client-Dhb14bcC.mjs → EventCalendar.client-Ct1B3xI4.mjs} +10 -10
  68. package/dist/client/{EventCombined.client-C1jEZBN9.mjs → EventCombined.client-DgfNtcgW.mjs} +9 -9
  69. package/dist/client/{EventEmbeddedCheckoutStep-BGkbUhuw.mjs → EventEmbeddedCheckoutStep-CjoaG1zy.mjs} +1 -1
  70. package/dist/client/{EventItem-Bb0ppG2N.mjs → EventItem-KGKkK19N.mjs} +29 -14
  71. package/dist/client/{EventListWeekNavigation-DMryCaNV.mjs → EventListWeekNavigation-Ba9ezxuC.mjs} +1 -1
  72. package/dist/client/{EventListing.client-BuH5kKA3.mjs → EventListing.client-xFKRDLwC.mjs} +3 -3
  73. package/dist/client/{EventListing.view-DsqvuulZ.mjs → EventListing.view-Dy36vWHi.mjs} +84 -7
  74. package/dist/client/{EventRegistrationPayment-D4FvQSFF.mjs → EventRegistrationPayment-Dth9L00x.mjs} +118 -76
  75. package/dist/client/{Page-sV6BJkXX.mjs → Page-DB5KODiu.mjs} +4491 -1398
  76. package/dist/client/{ProtectedSubmitButton-BNnKuir8.mjs → ProtectedSubmitButton-CY6u5sQa.mjs} +1 -1
  77. package/dist/client/{SiteTermsAgreementField-VfSd6JU-.mjs → SiteTermsAgreementField-BDVP_HeK.mjs} +3 -3
  78. package/dist/client/{StepIndicator-B6o5B7g3.mjs → StepIndicator-CLgDVzCs.mjs} +1 -1
  79. package/dist/client/{StepIndicator-BTqO7cJl.mjs → StepIndicator-DRyZ8igu.mjs} +7 -7
  80. package/dist/client/{ThemedButton-PFOhXktM.mjs → ThemedButton-C4rCsPCt.mjs} +52 -10
  81. package/dist/client/{accessibleSurfaces-BogaGutk.mjs → accessibleSurfaces-CqroimVQ.mjs} +1024 -619
  82. package/dist/client/{accordion-6cuswD_s.mjs → accordion-BQYRP5xV.mjs} +1 -1
  83. package/dist/client/{booking-form.client-BOMe_SKi.mjs → booking-form.client-B7ckDuOC.mjs} +191 -71
  84. package/dist/client/{bookingForm-DSCH-VHo.mjs → bookingForm-BeD4650p.mjs} +7 -6
  85. package/dist/client/bookings.mjs +5 -5
  86. package/dist/client/{boxStyleClassNames-BFuqZCfz.mjs → boxStyleClassNames-CA7FirMH.mjs} +2 -2
  87. package/dist/client/buttonParts-C39GC0kz.mjs +1518 -0
  88. package/dist/client/{carousel-CGyQVV1M.mjs → carousel-DJ9Aa1m3.mjs} +2 -2
  89. package/dist/client/{carousel.client-BtLwHefX.mjs → carousel.client-DKWqVHHh.mjs} +1 -1
  90. package/dist/client/{cart-BYOe7MCh.mjs → cart-DdCenbTy.mjs} +3 -3
  91. package/dist/client/{cart.client-BKFkaXdV.mjs → cart.client-BQm06qNw.mjs} +1 -1
  92. package/dist/client/{checkout-Dwd7Di77.mjs → checkout-45wPQULN.mjs} +3 -3
  93. package/dist/client/{checkout.client-C25hpi-z.mjs → checkout.client-bSv4cc5z.mjs} +1 -1
  94. package/dist/client/{checkoutUrls-tG788sw0.mjs → checkoutUrls-CwlaMl3W.mjs} +1 -1
  95. package/dist/client/client.mjs +460 -119
  96. package/dist/client/{constants-DdxFG3Ic.mjs → constants-DXV4KR7l.mjs} +1 -1
  97. package/dist/client/{context-Hi1RuYEM.mjs → context-lCPfX-xe.mjs} +15 -5
  98. package/dist/client/{dateFormatting-C8vBCHuo.mjs → dateFormatting-HvfmS_cH.mjs} +1 -1
  99. package/dist/client/{demoPortalMagicLink-BAL5UIDG.mjs → demoPortalMagicLink-Ce3Gyin_.mjs} +1 -1
  100. package/dist/client/{enhanceHeaderSection-Dv1Lr9kJ.mjs → enhanceHeaderSection-CGcDE9aE.mjs} +4 -4
  101. package/dist/client/{event-registration.client-dB_Z7bb-.mjs → event-registration.client-DlPfn4YG.mjs} +52 -29
  102. package/dist/client/{eventCalendar-CQnRA4Ww.mjs → eventCalendar-CioAdryV.mjs} +4 -4
  103. package/dist/client/{eventCombined-BDOG1hVp.mjs → eventCombined-Dwt0G6ez.mjs} +4 -4
  104. package/dist/client/{eventListing-DSVmhy9n.mjs → eventListing-B3H9ifOC.mjs} +4 -4
  105. package/dist/client/{eventRegistration-CD5mRtEH.mjs → eventRegistration-Do7cAhXb.mjs} +7 -6
  106. package/dist/client/{form-DWnlEVSK.mjs → form-CsqzgC6v.mjs} +3 -3
  107. package/dist/client/{form.client-D7zmeqNI.mjs → form.client-DVDB7hY6.mjs} +5 -5
  108. package/dist/client/{form.parts-C-G6N_MK.mjs → form.parts-1q2rzSYt.mjs} +3 -3
  109. package/dist/client/gifting/client.mjs +16 -9
  110. package/dist/client/{gifting-Cn0jidP5.mjs → gifting-BrXQGX-k.mjs} +4 -4
  111. package/dist/client/{gifting.client-DVo1YFLs.mjs → gifting.client--zAjnY5N.mjs} +155 -85
  112. package/dist/client/gifting.interactive-CrwHpUJG.mjs +207 -0
  113. package/dist/client/gifting.parts-CcKdDaQq.mjs +124 -0
  114. package/dist/client/{headerSection-DjQuj_6v.mjs → headerSection-DlcDH4bi.mjs} +2 -2
  115. package/dist/client/{noop-jesvJXEE.mjs → islands-dMh0Oxli.mjs} +16103 -7965
  116. package/dist/client/{newsletter-form.client-rIYPziZC.mjs → newsletter-form.client-BxA1PsdS.mjs} +6 -6
  117. package/dist/client/{newsletter-form.interactive-DVt3enLr.mjs → newsletter-form.interactive-D0iRg7p2.mjs} +229 -197
  118. package/dist/client/{newsletter-form.parts-CH6dGfdn.mjs → newsletter-form.parts-Dmuklz0r.mjs} +2 -2
  119. package/dist/client/{newsletterForm-Cg8cBDHd.mjs → newsletterForm-CBzvgIfg.mjs} +3 -3
  120. package/dist/client/portal/client.mjs +51 -35
  121. package/dist/client/{portalOrders-oEoTvzkW.mjs → portalOrders-tCxS04g0.mjs} +3 -2
  122. package/dist/client/{portalRoutes-ByyVZfVq.mjs → portalRoutes-DiGibcZI.mjs} +31 -9
  123. package/dist/client/portalSession-0XhXyTxT.mjs +41 -0
  124. package/dist/client/{product-detail.client-5aHq-vuu.mjs → product-detail.client-D9MP8hvH.mjs} +1 -1
  125. package/dist/client/{product-list.client-CyAk5rnC.mjs → product-list.client-wCz1qcUY.mjs} +1 -1
  126. package/dist/client/{productDetail-B8aZ2mqY.mjs → productDetail-D9-fCY6c.mjs} +3 -3
  127. package/dist/client/{productList-BuLemmod.mjs → productList-PJyxXSac.mjs} +3 -3
  128. package/dist/client/{propsDecoder-0Unsqn3R.mjs → propsDecoder-B8lrKGPw.mjs} +4 -2
  129. package/dist/client/{registry.server-DzvtVVD0.mjs → registry.server-CI63JVHW.mjs} +2444 -1078
  130. package/dist/client/rendering/client.mjs +32 -28
  131. package/dist/client/rendering/islands.mjs +1 -1
  132. package/dist/client/rendering.mjs +5 -5
  133. package/dist/client/{richText-coerce-Bnng7JFA.mjs → richText-coerce-Jt9hDHdh.mjs} +2 -2
  134. package/dist/client/{routeIslandApiConfig-BGfcc9sk.mjs → routeIslandApiConfig-ZSPcJWx1.mjs} +1 -1
  135. package/dist/client/runtimeResponse-DlPBWBd9.mjs +3 -0
  136. package/dist/client/{runtimeResponse-DAPVRToN.mjs → runtimeResponse-_iW9oEYc.mjs} +1 -1
  137. package/dist/client/{shop-GuMqnDL-.mjs → shop-CbdJlWOw.mjs} +3 -3
  138. package/dist/client/{shop-commerce-D5bDY1o1.mjs → shop-commerce-BqLbzUUn.mjs} +47 -28
  139. package/dist/client/{shop-commerce-store-B7sHnLwI.mjs → shop-commerce-store-BT0-zRqN.mjs} +1 -1
  140. package/dist/client/{shop-discount-apply.state-Dos2zdC2.mjs → shop-discount-apply.state-Cws0lnSb.mjs} +2 -2
  141. package/dist/client/{shop.client-uvj5GDZb.mjs → shop.client-0cNErhJT.mjs} +54 -24
  142. package/dist/client/{shopShared-3giNWE3H.mjs → shopShared-COuQ2MhQ.mjs} +2 -2
  143. package/dist/client/spam-protection.mjs +1 -1
  144. package/dist/client/{src-CmXh3JWs.mjs → src-Do_s2lqH.mjs} +11 -18
  145. package/dist/client/{timetableModel-GA-hn1qM.mjs → timetableModel-DqI6U1BS.mjs} +11 -8
  146. package/dist/client/{urlParams-C2QHo1Pa.mjs → useAutomaticDiscountPreview-CeVUVzGf.mjs} +44 -1
  147. package/dist/client/{useAvailableSlots-CBneCxbG.mjs → useAvailableSlots-B0mjVhZr.mjs} +2 -2
  148. package/dist/client/{useDiscountCodeUi-D0kGF0C7.mjs → useDiscountCodeUi-B_hfgdAP.mjs} +6 -2
  149. package/dist/client/{useEventPagination-xX8n_Tuu.mjs → useEventPagination-Ct4A6iR1.mjs} +14 -16
  150. package/dist/client/{view-DOyZc-DF.mjs → view-Cj151w4m.mjs} +24 -9
  151. package/dist/client/{wizardSteps-B952ify5.mjs → wizardSteps-B3gsXNnb.mjs} +283 -222
  152. package/dist/preview-next/client/{EventEmbeddedCheckoutStep-aRJjq4x8.mjs → EventEmbeddedCheckoutStep-CVy9oapv.mjs} +1 -1
  153. package/dist/preview-next/client/{LocationPickerEnvironment-BW3dRFIv.mjs → LocationPickerEnvironment-DuRUwUrK.mjs} +1 -1
  154. package/dist/preview-next/client/{MapLibreEditMap-Db9BHyXh.mjs → MapLibreEditMap-CdSDYBq9.mjs} +2 -2
  155. package/dist/preview-next/client/{PageSectionToolbar-BI3UCdpu.mjs → PageSectionToolbar-Dv4CW0AQ.mjs} +952 -138
  156. package/dist/preview-next/client/{PreviewEditorSidebar-jkfLVOgY.mjs → PreviewEditorSidebar-B7WW58uE.mjs} +4774 -2040
  157. package/dist/preview-next/client/{PreviewEditorUI-DwJQs4hM.mjs → PreviewEditorUI-BnJ1ughv.mjs} +71 -47
  158. package/dist/preview-next/client/{PreviewShell-BAxAkuz8.mjs → PreviewShell-C7qWzAe4.mjs} +72 -40
  159. package/dist/preview-next/client/{SdkPreviewModeRuntime-0UVB-39f.mjs → SdkPreviewModeRuntime-CYi4UHtG.mjs} +135 -30
  160. package/dist/preview-next/client/{ThemedButton-CVYz7h68.mjs → ThemedButton-CRgbU75r.mjs} +799 -17
  161. package/dist/preview-next/client/{lucide-react-00FF_oar.mjs → lucide-react-B4c6U3ZU.mjs} +11 -1
  162. package/dist/preview-next/client/{previewAssistantSlot-BgiYk3PB.mjs → previewAssistantSlot-DrUoRNu9.mjs} +24203 -9291
  163. package/dist/preview-next/client/{previewChromeRoot-tieNdF3E.mjs → previewChromeRoot-CEYp90mM.mjs} +3 -90
  164. package/dist/preview-next/client/runtime.mjs +3 -3
  165. package/dist/preview-next/client/{sdk-runtime-DXb_Evl0.mjs → sdk-runtime-DnO2_c0A.mjs} +2 -2
  166. package/dist/preview-next/client/{siteStyleAccess-BlN0jt2c.mjs → siteStyleAccess-B3PwHw2z.mjs} +46 -11
  167. package/dist/preview-next/client/{useAutosaveStatus-BUEPA4oL.mjs → useAutosaveStatus-DrdQ4ier.mjs} +49 -3
  168. package/dist/preview-next/client/{useOpenBlockForSetup-BVfr5P--.mjs → useOpenBlockForSetup-kuGRKaRL.mjs} +2008 -448
  169. package/dist/preview-next/container-responsive.css +469 -2
  170. package/dist/preview-next/editor-chrome.css +23 -2
  171. package/dist/preview-next/keepAlive.mjs +1 -1
  172. package/dist/preview-next/middleware.mjs +1 -1
  173. package/dist/preview-next/{route-contract-BHTBA48n.mjs → route-contract-CwrXkLT3.mjs} +177 -43
  174. package/dist/server/{Block.shared-hGoyEdjJ.mjs → Block.shared-C5ucphCJ.mjs} +5 -5
  175. package/dist/server/{ThemeScopeCore-BfUCTOwj.mjs → ThemeScopeCore-DvbqYXdK.mjs} +46 -10
  176. package/dist/server/{accessibleSurfaces-Dskni4Xj.mjs → accessibleSurfaces-CAcf1lHT.mjs} +732 -176
  177. package/dist/server/{accordions-By_0Ykks.mjs → accordions-DjcsqjCK.mjs} +1 -1
  178. package/dist/server/{bindings-DMJH4bvo.mjs → bindings-CFw4M-gZ.mjs} +69 -248
  179. package/dist/server/{client-DrwlRNAH.mjs → client-D0XCgITW.mjs} +488 -119
  180. package/dist/server/config-validation.mjs +1 -1
  181. package/dist/server/config.mjs +2 -2
  182. package/dist/server/{constants-CeMywaiD.mjs → constants-BZduY8jG.mjs} +31 -8
  183. package/dist/server/data/resolveBlockData.mjs +1 -1
  184. package/dist/server/index.mjs +4 -4
  185. package/dist/server/{loadContent-D0prFflT.mjs → loadContent-C-qyB8Tq.mjs} +11 -10
  186. package/dist/server/{loadPage-CBLke9pJ.mjs → loadPage-BpKKmi8E.mjs} +3 -3
  187. package/dist/server/lookMediaFrame-EFws7tAj.mjs +31835 -0
  188. package/dist/server/manifest.mjs +2 -2
  189. package/dist/server/{navigation-wrcuWmgp.mjs → navigation-DYkuiNXa.mjs} +1 -1
  190. package/dist/server/navigation.mjs +1 -1
  191. package/dist/server/next.mjs +9 -9
  192. package/dist/server/{overrideResolution-DUgCEH8z.mjs → overrideResolution-DmZn4xUE.mjs} +1 -1
  193. package/dist/server/page-converter.mjs +18 -5
  194. package/dist/server/{pageRenderPlan-BHrmogsW.mjs → pageRenderPlan-DRB7cUZ0.mjs} +674 -298
  195. package/dist/server/{pageRuntimeSupport-D2-YMRei.mjs → pageRuntimeSupport-Uv1xDieJ.mjs} +13 -6
  196. package/dist/server/{pageShared-CG8O31Eo.mjs → pageShared-BdQF875z.mjs} +911 -516
  197. package/dist/server/{parseThemeForPersistence-CrPlbJEN.mjs → parseThemeForPersistence-CwcWZL7u.mjs} +3 -3
  198. package/dist/server/{portal-pG_uhsI2.mjs → portal-BQ8qiQnk.mjs} +22 -2
  199. package/dist/server/portal.mjs +3 -3
  200. package/dist/server/{prebuild-C8Amvzce.mjs → prebuild-B51QZVNe.mjs} +1 -1
  201. package/dist/server/prebuild.mjs +1 -1
  202. package/dist/server/{prefetchBlockData-BxUETRIZ.mjs → prefetchBlockData-CppDAfJW.mjs} +4 -4
  203. package/dist/server/{registry-Cc88-23f.mjs → registry-Bf4W8Qa7.mjs} +7585 -24378
  204. package/dist/server/rendering/components/pageShared.mjs +1 -1
  205. package/dist/server/rendering/helpers/loadPage.mjs +1 -1
  206. package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
  207. package/dist/server/rendering/server.mjs +4 -4
  208. package/dist/server/rendering.mjs +10 -10
  209. package/dist/server/{resolveBlockData-OG3KOkig.mjs → resolveBlockData-DMHAZooQ.mjs} +2 -2
  210. package/dist/server/{expandPalette-ehuW8r2g.mjs → resolveButtonColourStates-BMtAAPzp.mjs} +1670 -1346
  211. package/dist/server/{responseMedia-IfH65QAH.mjs → responseMedia-DKYfR518.mjs} +1 -1
  212. package/dist/server/{schema-CwfxQjc4.mjs → schema-DGaihVwp.mjs} +300 -29
  213. package/dist/server/server.mjs +3 -3
  214. package/dist/server/{servicePageContent-BcFuhhD7.mjs → servicePageContent-CRvmreX7.mjs} +40 -16
  215. package/dist/server/theme-bridge.mjs +5 -4
  216. package/dist/server/theme.mjs +2 -2
  217. package/dist/server/{three-pass-converter-DPaUPTfl.mjs → three-pass-converter-mcy2E1Yd.mjs} +2 -2
  218. package/dist/server/{titleSourceSchema-NhK6azFS.mjs → titleSourceSchema-B2qFOUwZ.mjs} +4 -5
  219. package/dist/server/{typeGuards-CTW_9AXq.mjs → typeGuards-DZOaGTEv.mjs} +126 -126
  220. package/dist/server/{types-BKaBZFjD.mjs → types-C_S0pWbR.mjs} +487 -9
  221. package/dist/server/{validation-BovmbS8N.mjs → validation-CUtNT_EZ.mjs} +14 -10
  222. package/dist/server/{version-hws4hgyX.mjs → version-DebJQ4zn.mjs} +1 -1
  223. package/dist/server/{video-Cdr3wh-q.mjs → video-DBaeSawZ.mjs} +1 -1
  224. package/dist/styles/index.css +2987 -168
  225. package/package.json +1 -1
  226. package/dist/client/gifting.parts-Bak93gD2.mjs +0 -86
  227. package/dist/client/runtimeResponse-nXT8VAMl.mjs +0 -3
  228. package/dist/client/types-BEaKfam_.mjs +0 -778
  229. package/dist/server/customCss-C9kgPHvr.mjs +0 -247
  230. package/dist/server/lookMediaFrame-H0fi4bJk.mjs +0 -2701
  231. package/dist/server/media-gvfIw3z8.mjs +0 -216
@@ -1,21 +1,21 @@
1
1
  "use client";
2
2
  "use client";
3
3
  import { m as ok, p as err } from "../renderableMediaAssetAdmission-BsOWd9lf.mjs";
4
- import { An as formatCurrencyAmount, Fn as unsafeAsAppointmentResourceId, On as parsePositiveMoneyInputToCents, Sn as parseUtcIsoDateTimeString, _t as unknownKind, an as formatDateTimeRange, bn as parseBookingLocalDate, cn as formatTime, gt as exactSchema, ht as evolvingSchema, in as formatDateTime, ln as formatTimeRange, nn as formatDate, rn as formatDateRange, t as assertNever, vt as unknownTag } from "../src-CmXh3JWs.mjs";
5
- import { a as withPortalArrival, c as portalBookingViewSchema, d as portalWaitlistOfferPriceSchema, h as parseOrderPaymentReceiptId, i as portalPath, l as portalBookingsResponseSchema, m as parseOrderId, n as isServerPortalTarget, o as portalBookingPath, r as parsePortalLocation, s as portalBookingResponseSchema, u as portalRegularSessionsResponseSchema } from "../portalRoutes-ByyVZfVq.mjs";
4
+ import { An as formatCurrencyAmount, Fn as unsafeAsAppointmentResourceId, On as parsePositiveMoneyInputToCents, Sn as parseUtcIsoDateTimeString, _t as unknownKind, an as formatDateTimeRange, bn as parseBookingLocalDate, cn as formatTime, gt as exactSchema, ht as evolvingSchema, in as formatDateTime, ln as formatTimeRange, nn as formatDate, rn as formatDateRange, t as assertNever, vt as unknownTag } from "../src-Do_s2lqH.mjs";
5
+ import { a as withPortalArrival, c as portalBookingViewSchema, d as portalWaitlistOfferPriceSchema, h as parseOrderPaymentReceiptId, i as portalPath, l as portalBookingsResponseSchema, m as parseOrderId, n as isServerPortalTarget, o as portalBookingPath, r as parsePortalLocation, s as portalBookingResponseSchema, u as portalRegularSessionsResponseSchema } from "../portalRoutes-DiGibcZI.mjs";
6
6
  import { a as calendarEntryEnd, h as assertNever$1, i as bookingCalendarFromEntries, l as getInitialFieldValue, m as unansweredRequiredBookingQuestions, n as ONLINE_CALENDAR_LOCATION, o as UNANSWERED_QUESTION_MESSAGE, t as ONLINE_CALENDAR_DESCRIPTION, u as initialBookingQuestionValues } from "../bookingCalendar--aWnqFDn.mjs";
7
7
  import { t as generateUuidV4 } from "../uuid-BETKW8rS.mjs";
8
- import { a as questionControlProps, i as isChoiceGroup, o as clientPersonPhrases, t as BookingQuestionFieldInput } from "../BookingQuestionFields-BJI7mZuV.mjs";
9
- import { C as customerProfileSchema, _ as portalPaymentToDoSchema, f as portalDeadlineSchema, g as portalPaymentDueSchema, h as portalOrderNameSchema, i as bookingContextRefSchema, l as eventAttendeeRefSchema, m as portalOrderBreakdownSchema, n as customerOrderSchema, p as portalMoneySchema, x as customerPassUseCaseSchema } from "../portalOrders-oEoTvzkW.mjs";
10
- import { C as portalMeUpdateResponseSchema, E as portalTransferEventRegistrationResultSchema, S as portalMeResponseSchema, T as portalRescheduleAppointmentResponseSchema, _ as portalDigitalProductsResponseSchema, a as createPortalTransport, b as portalEventRescheduleResultSchema, c as PORTAL, d as portalBookingQuestionsTaskResponseSchema, f as portalBookingQuestionsUploadUrlResponseSchema, g as portalDigitalProductDownloadUrlResponseSchema, h as portalDigitalProductAccessResponseSchema, l as magicLinkResponseSchema, m as portalCancelOutcomeSchema, n as useBlockApi, o as field, p as portalCancelMembershipAtPeriodEndResultSchema, s as isUncertainPortalFailure, t as BlockApiProvider, u as portalBookingQuestionsFinalizeUploadResponseSchema, v as portalEventGuestsResponseSchema, w as portalOrderCheckoutResponseSchema, x as portalEventTicketResponseSchema, y as portalEventRescheduleDatesSchema } from "../context-Hi1RuYEM.mjs";
11
- import { a as ThemedFileChooser, n as ThemedButton, r as ThemedButtonLink, x as clsx } from "../ThemedButton-PFOhXktM.mjs";
8
+ import { a as questionControlProps, i as isChoiceGroup, o as clientPersonPhrases, t as BookingQuestionFieldInput } from "../BookingQuestionFields-DdcmoHqQ.mjs";
9
+ import { C as customerProfileSchema, _ as portalPaymentToDoSchema, f as portalDeadlineSchema, g as portalPaymentDueSchema, h as portalOrderNameSchema, i as bookingContextRefSchema, l as eventAttendeeRefSchema, m as portalOrderBreakdownSchema, n as customerOrderSchema, p as portalMoneySchema, x as customerPassUseCaseSchema } from "../portalOrders-tCxS04g0.mjs";
10
+ import { C as portalMeUpdateResponseSchema, E as portalTransferEventRegistrationResultSchema, S as portalMeResponseSchema, T as portalRescheduleAppointmentResponseSchema, _ as portalDigitalProductsResponseSchema, a as createPortalTransport, b as portalEventRescheduleResultSchema, c as PORTAL, d as portalBookingQuestionsTaskResponseSchema, f as portalBookingQuestionsUploadUrlResponseSchema, g as portalDigitalProductDownloadUrlResponseSchema, h as portalDigitalProductAccessResponseSchema, l as magicLinkResponseSchema, m as portalCancelOutcomeSchema, n as useBlockApi, o as field, p as portalCancelMembershipAtPeriodEndResultSchema, s as isUncertainPortalFailure, t as BlockApiProvider, u as portalBookingQuestionsFinalizeUploadResponseSchema, v as portalEventGuestsResponseSchema, w as portalOrderCheckoutResponseSchema, x as portalEventTicketResponseSchema, y as portalEventRescheduleDatesSchema } from "../context-lCPfX-xe.mjs";
11
+ import { O as clsx, a as ThemedFileChooser, n as ThemedButton, r as ThemedButtonLink } from "../ThemedButton-C4rCsPCt.mjs";
12
12
  import { n as assertSafeAppPath } from "../src-Al4ooTl_.mjs";
13
13
  import { t as resolveDedicatedBookingHref } from "../bookingRoute-D6DlxYx6.mjs";
14
14
  import { t as FieldValidationMessage } from "../FieldValidationMessage-CsqxShw4.mjs";
15
- import { n as useAvailableDates, t as useAvailableSlots } from "../useAvailableSlots-CBneCxbG.mjs";
16
- import { i as getDemoBookingPass, n as buildPortalCallbackUrl, t as PORTAL_CALLBACK_PATH } from "../demoPortalMagicLink-BAL5UIDG.mjs";
17
- import { n as downloadCalendar } from "../CalendarAction-D_Glwvz2.mjs";
18
- import { a as formatPortalSessionTime, c as portalSessionDisplay, i as formatPortalSessionDay, o as formatPortalSessionWithWeekday, r as formatPortalSession, s as lastCoveredInstant, t as formatDateTime$1 } from "../dateFormatting-C8vBCHuo.mjs";
15
+ import { n as useAvailableDates, t as useAvailableSlots } from "../useAvailableSlots-B0mjVhZr.mjs";
16
+ import { i as getDemoBookingPass, n as buildPortalCallbackUrl, t as PORTAL_CALLBACK_PATH } from "../demoPortalMagicLink-Ce3Gyin_.mjs";
17
+ import { n as downloadCalendar } from "../CalendarAction-DYGewmvh.mjs";
18
+ import { a as formatPortalSessionTime, c as portalSessionDisplay, i as formatPortalSessionDay, o as formatPortalSessionWithWeekday, r as formatPortalSession, s as lastCoveredInstant, t as formatDateTime$1 } from "../dateFormatting-HvfmS_cH.mjs";
19
19
  import * as React$1 from "react";
20
20
  import { forwardRef, useCallback, useEffect, useId, useMemo, useReducer, useRef, useState, useSyncExternalStore } from "react";
21
21
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -4676,6 +4676,12 @@ function waitlistCardModel(entry, context) {
4676
4676
  }
4677
4677
  }
4678
4678
  }
4679
+ //#endregion
4680
+ //#region ../blocks/src/portal/app/model/listWithAnd.ts
4681
+ /** "A", "A and B", "A, B and C". */
4682
+ function listWithAnd(items) {
4683
+ return items.length < 2 ? items.join("") : `${items.slice(0, -1).join(", ")} and ${items.slice(-1).join("")}`;
4684
+ }
4679
4685
  /** The label for revealing a folded group's hidden cards: "Show 4 more". */
4680
4686
  function showMoreLabel(group) {
4681
4687
  return group.folded === null ? null : `Show ${group.cards.length - group.folded} more`;
@@ -4755,14 +4761,20 @@ const NTH = {
4755
4761
  4: "fourth",
4756
4762
  last: "last"
4757
4763
  };
4764
+ /**
4765
+ * "Mondays, Wednesdays and Thursdays at 6:30am", "Mondays at 6:30am and Thursdays at
4766
+ * 7am", "Every other Monday and Thursday at 6:30am", or a monthly day as before.
4767
+ */
4758
4768
  function cadenceLine(session, context) {
4759
- const { cadence, localStart } = session.schedule;
4760
- const time = portalLocalTime(localStart, context.site);
4761
- const day = portalWeekday(cadence.weekday, context.site);
4762
- switch (cadence.kind) {
4763
- case "weekly": return cadence.everyWeeks === 2 ? `Every other ${day} at ${time}` : `${day}s at ${time}`;
4764
- case "monthly": return `The ${NTH[cadence.nth]} ${day} of each month at ${time}`;
4765
- }
4769
+ const { cadence, days } = session.pattern;
4770
+ const time = (day) => portalLocalTime(day.localStart, context.site);
4771
+ const name = (day) => portalWeekday(day.weekday, context.site);
4772
+ const [first] = days;
4773
+ if (!first) return "";
4774
+ if (cadence.kind === "monthly") return `The ${NTH[cadence.nth]} ${name(first)} of each month at ${time(first)}`;
4775
+ const sameTime = days.every((day) => day.localStart === first.localStart);
4776
+ if (cadence.everyWeeks === 2) return sameTime ? `Every other ${listWithAnd(days.map(name))} at ${time(first)}` : `Every other ${listWithAnd(days.map((day) => `${name(day)} at ${time(day)}`))}`;
4777
+ return sameTime ? `${listWithAnd(days.map((day) => `${name(day)}s`))} at ${time(first)}` : listWithAnd(days.map((day) => `${name(day)}s at ${time(day)}`));
4766
4778
  }
4767
4779
  function dateChip(date, trainer) {
4768
4780
  switch (date.state) {
@@ -4788,15 +4800,27 @@ function dateChip(date, trainer) {
4788
4800
  };
4789
4801
  }
4790
4802
  }
4803
+ function packageList(packages) {
4804
+ const named = packages.map((pack) => `your ${pack.name ?? "package"} (${pack.sessionsLeft === 0 ? "none" : pack.sessionsLeft} left)`);
4805
+ return named.length <= 1 ? named[0] ?? "" : `${named.slice(0, -1).join(", ")} and ${named.at(-1) ?? ""}`;
4806
+ }
4791
4807
  function paymentLine(session) {
4792
- switch (session.payment.kind) {
4793
- case "package": {
4794
- const left = session.payment.sessionsLeft;
4795
- return `Paid from your ${session.payment.name ?? "package"}, which has ${left === 1 ? "1 session" : `${left} sessions`} left.`;
4796
- }
4797
- case "owed": return "You pay for each session as it comes up.";
4798
- case "payment_link": return "We'll send you a link to pay for each session.";
4808
+ const { coverage, owedFollowUp } = session.payment;
4809
+ const forNew = coverage.packages.filter((pack) => pack.forNewSessions);
4810
+ const bookedOnly = coverage.packages.filter((pack) => !pack.forNewSessions);
4811
+ if (forNew.length > 0) {
4812
+ const otherwise = owedFollowUp === "payment_link" ? "When no package covers a session, we’ll send you a link to pay for it." : "When no package covers a session, you pay for it as it comes up.";
4813
+ return `Your next sessions come out of ${packageList(coverage.packages)}. ${otherwise}`;
4814
+ }
4815
+ if (bookedOnly.length > 0) {
4816
+ const after = owedFollowUp === "payment_link" ? "we’ll send you a link to pay for each session." : "you pay for each session as it comes up.";
4817
+ return `Your booked sessions come out of ${bookedList(bookedOnly)}. After those, ${after}`;
4799
4818
  }
4819
+ return owedFollowUp === "payment_link" ? "We’ll send you a link to pay for each session." : "You pay for each session as it comes up.";
4820
+ }
4821
+ function bookedList(packages) {
4822
+ const named = packages.map((pack) => `your ${pack.name ?? "package"}`);
4823
+ return named.length <= 1 ? named[0] ?? "" : `${named.slice(0, -1).join(", ")} and ${named.at(-1) ?? ""}`;
4800
4824
  }
4801
4825
  function bookedRef(date) {
4802
4826
  return date.state === "booked" ? {
@@ -4831,7 +4855,7 @@ function regularSessionModel(session, context) {
4831
4855
  payment: paymentLine(session),
4832
4856
  note: holdsTimeNote(session, trainer),
4833
4857
  dates,
4834
- heldNote: !session.dates.some((date) => date.state === "held") ? null : session.payment.kind === "package" ? "Held dates aren't booked yet, so nothing's taken from your package until they are." : "Held dates aren't booked yet."
4858
+ heldNote: !session.dates.some((date) => date.state === "held") ? null : session.payment.coverage.packages.length > 0 ? "Held dates aren't booked yet, so nothing's taken from your package until they are." : "Held dates aren't booked yet."
4835
4859
  };
4836
4860
  }
4837
4861
  //#endregion
@@ -12064,10 +12088,6 @@ const studioName = (studio) => studio?.trim() || "the organiser";
12064
12088
  function firstName(name) {
12065
12089
  return name.trim().split(/\s+/)[0] ?? name;
12066
12090
  }
12067
- function joinNames(names) {
12068
- if (names.length <= 1) return names[0] ?? "";
12069
- return `${names.slice(0, -1).join(", ")} and ${names.at(-1) ?? ""}`;
12070
- }
12071
12091
  const guestCount = (subject) => Math.max(0, subject.ticketsCount - 1);
12072
12092
  /** Every guest has a name, so the copy can use them. */
12073
12093
  const allGuestsNamed = (subject) => guestCount(subject) > 0 && subject.guestNames.length === guestCount(subject);
@@ -12076,7 +12096,7 @@ function guestsPhrase(count) {
12076
12096
  }
12077
12097
  /** "you, Tom Nair and Asha Patel", or "you and your 2 guests". */
12078
12098
  function everyonePhrase(subject) {
12079
- if (allGuestsNamed(subject)) return joinNames(["you", ...subject.guestNames]);
12099
+ if (allGuestsNamed(subject)) return listWithAnd(["you", ...subject.guestNames]);
12080
12100
  return `you and ${guestsPhrase(guestCount(subject))}`;
12081
12101
  }
12082
12102
  const sessionFacts = (facts) => ({
@@ -12103,7 +12123,7 @@ function rescheduleCurrentCard(subject, site) {
12103
12123
  }
12104
12124
  function reschedulePickLead(subject) {
12105
12125
  if (guestCount(subject) === 0) return "Choose a new date for your booking.";
12106
- return `Choose a new date. Your whole booking moves together, so ${allGuestsNamed(subject) ? joinNames(subject.guestNames.map(firstName)) : guestsPhrase(guestCount(subject))} will come with you.`;
12126
+ return `Choose a new date. Your whole booking moves together, so ${allGuestsNamed(subject) ? listWithAnd(subject.guestNames.map(firstName)) : guestsPhrase(guestCount(subject))} will come with you.`;
12107
12127
  }
12108
12128
  const BLOCKED_BADGES = {
12109
12129
  full: "Full",
@@ -15324,10 +15344,6 @@ function newsletterModel(newsletter, contact, context) {
15324
15344
  }
15325
15345
  }
15326
15346
  }
15327
- /** "A", "A and B", "A, B and C". */
15328
- function listWithAnd(names) {
15329
- return names.length < 2 ? names.join("") : `${names.slice(0, -1).join(", ")} and ${names.slice(-1).join("")}`;
15330
- }
15331
15347
  const firstFieldError = (errors, field) => errors.find((error) => error.field === field)?.message ?? null;
15332
15348
  /** One field at a time, as the rows are edited one at a time. A name can't be blank; a blank phone clears it. */
15333
15349
  const profileEditTask = {
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { Ln as parseSiteTermsVersionId, Mn as parseAppointmentId, Rn as parseAttendeeId, Vn as parseEventSeriesRegistrationId, gt as exactSchema } from "./src-CmXh3JWs.mjs";
2
+ import { Ln as parseSiteTermsVersionId, Mn as parseAppointmentId, Rn as parseAttendeeId, Vn as parseEventSeriesRegistrationId, gt as exactSchema } from "./src-Do_s2lqH.mjs";
3
3
  import { z } from "zod";
4
4
  //#region ../core/src/appointment-lifecycle.ts
5
5
  const APPOINTMENT_REQUEST_OUTCOME_VALUES = [
@@ -455,7 +455,8 @@ const orderItemSchema = exactSchema()(z.object({
455
455
  "event_series_registration",
456
456
  "pass",
457
457
  "membership",
458
- "appointment"
458
+ "appointment",
459
+ "gift"
459
460
  ]),
460
461
  displayName: z.string(),
461
462
  quantity: z.number(),
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { c as parseMediaAssetId, f as parseUuidBrand } from "./renderableMediaAssetAdmission-BsOWd9lf.mjs";
3
- import { Mn as parseAppointmentId, Pn as parseClientArrangementId, Rn as parseAttendeeId, Vn as parseEventSeriesRegistrationId, _t as unknownKind, gt as exactSchema, ht as evolvingSchema, mt as portalBeforeYouComeTaskSchema } from "./src-CmXh3JWs.mjs";
4
- import { D as portalJoiningDetailsSchema, _ as portalPaymentToDoSchema, a as brandedId, c as courseRegistrationRefSchema, l as eventAttendeeRefSchema, o as cancellationMoneyOutcomeSchema, p as portalMoneySchema, r as appointmentRefSchema, t as customerOrderPaymentLabelsSchema, u as refundRecipientSchema, x as customerPassUseCaseSchema, y as customerMembershipStatusSchema } from "./portalOrders-oEoTvzkW.mjs";
3
+ import { Mn as parseAppointmentId, Pn as parseClientArrangementId, Rn as parseAttendeeId, Vn as parseEventSeriesRegistrationId, _t as unknownKind, gt as exactSchema, ht as evolvingSchema, mt as portalBeforeYouComeTaskSchema } from "./src-Do_s2lqH.mjs";
4
+ import { D as portalJoiningDetailsSchema, _ as portalPaymentToDoSchema, a as brandedId, c as courseRegistrationRefSchema, l as eventAttendeeRefSchema, o as cancellationMoneyOutcomeSchema, p as portalMoneySchema, r as appointmentRefSchema, t as customerOrderPaymentLabelsSchema, u as refundRecipientSchema, x as customerPassUseCaseSchema, y as customerMembershipStatusSchema } from "./portalOrders-tCxS04g0.mjs";
5
5
  import { z } from "zod";
6
6
  //#region ../core/src/branded/orders.ts
7
7
  const unsafeAsOrderId = (id) => id;
@@ -133,6 +133,25 @@ const portalRegularSessionCadenceSchema = exactSchema()(z.discriminatedUnion("ki
133
133
  "last"
134
134
  ])
135
135
  })]));
136
+ const patternSchema = exactSchema()(z.object({
137
+ cadence: z.discriminatedUnion("kind", [z.object({
138
+ kind: z.literal("weekly"),
139
+ everyWeeks: z.literal([1, 2])
140
+ }), z.object({
141
+ kind: z.literal("monthly"),
142
+ nth: z.literal([
143
+ 1,
144
+ 2,
145
+ 3,
146
+ 4,
147
+ "last"
148
+ ])
149
+ })]),
150
+ days: z.array(z.object({
151
+ weekday: weekdaySchema,
152
+ localStart: z.string()
153
+ })).min(1).readonly()
154
+ }));
136
155
  const dateSchema = exactSchema()(z.union([
137
156
  z.object({
138
157
  state: z.literal("booked"),
@@ -159,19 +178,22 @@ const dateSchema = exactSchema()(z.union([
159
178
  const portalRegularSessionSchema = exactSchema()(z.object({
160
179
  arrangementId: brandedId(parseClientArrangementId, "regular sessions id"),
161
180
  timezone: z.string(),
162
- schedule: z.object({
163
- effectiveFrom: z.string(),
164
- cadence: portalRegularSessionCadenceSchema,
165
- localStart: z.string()
166
- }),
181
+ pattern: patternSchema,
167
182
  trainerName: z.string().nullable(),
168
183
  serviceName: z.string().nullable(),
169
184
  holdsTime: z.boolean(),
170
- payment: z.union([z.object({
185
+ payment: z.intersection(z.union([z.object({
171
186
  kind: z.literal("package"),
172
187
  name: z.string().nullable(),
173
188
  sessionsLeft: z.number()
174
- }), z.object({ kind: z.enum(["owed", "payment_link"]) })]),
189
+ }), z.object({ kind: z.enum(["owed", "payment_link"]) })]), z.object({
190
+ coverage: z.object({ packages: z.array(z.object({
191
+ name: z.string().nullable(),
192
+ sessionsLeft: z.number(),
193
+ forNewSessions: z.boolean()
194
+ })).readonly() }),
195
+ owedFollowUp: z.enum(["direct", "payment_link"])
196
+ })),
175
197
  dates: z.array(dateSchema).readonly()
176
198
  }));
177
199
  const portalRegularSessionsResponseSchema = exactSchema()(z.object({ arrangements: z.array(portalRegularSessionSchema).readonly() }));
@@ -0,0 +1,41 @@
1
+ "use client";
2
+ import { z } from "zod";
3
+ //#region src/rendering/islands/enhancers/portalSession.ts
4
+ const sessionResponse = z.object({ portalToken: z.string().min(1).nullable() });
5
+ /**
6
+ * How long a form waits for the session before mounting signed out. The route only reads a
7
+ * cookie, so a healthy answer is quick; a slow one shouldn't hold up booking for long.
8
+ */
9
+ const PORTAL_SESSION_LOOKUP_BUDGET_MS = 1500;
10
+ /** The page's one in-flight lookup; cleared when it settles. */
11
+ const pageLookup = { current: null };
12
+ async function lookUpPortalSession() {
13
+ try {
14
+ const response = await fetch("/api/portal/session", {
15
+ method: "POST",
16
+ credentials: "same-origin",
17
+ mode: "same-origin",
18
+ cache: "no-store",
19
+ signal: AbortSignal.timeout(PORTAL_SESSION_LOOKUP_BUDGET_MS)
20
+ });
21
+ if (!response.ok) return null;
22
+ const parsed = sessionResponse.safeParse(await response.json());
23
+ return parsed.success ? parsed.data.portalToken : null;
24
+ } catch {
25
+ return null;
26
+ }
27
+ }
28
+ /**
29
+ * Resolve before mounting a form, so a waiting-list visitor never sees a second sign-in sheet.
30
+ * Forms mounting together share one lookup (and so agree on who's signed in); a later mount
31
+ * asks again, so a sign-in or sign-out since then is picked up.
32
+ */
33
+ function resolveFormPortalToken(initialToken) {
34
+ if (initialToken) return Promise.resolve(initialToken);
35
+ pageLookup.current ?? (pageLookup.current = lookUpPortalSession().finally(() => {
36
+ pageLookup.current = null;
37
+ }));
38
+ return pageLookup.current;
39
+ }
40
+ //#endregion
41
+ export { resolveFormPortalToken as t };
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { r as ProductDetailController } from "./shop-commerce-D5bDY1o1.mjs";
2
+ import { r as ProductDetailController } from "./shop-commerce-BqLbzUUn.mjs";
3
3
  import "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  //#region ../blocks/src/system/runtime/nodes/product-detail.client.tsx
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { i as ProductListController } from "./shop-commerce-D5bDY1o1.mjs";
2
+ import { i as ProductListController } from "./shop-commerce-BqLbzUUn.mjs";
3
3
  import "react";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  //#region ../blocks/src/system/runtime/nodes/product-list.client.tsx
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- import { t as defineIslandPropsDecoder } from "./propsDecoder-0Unsqn3R.mjs";
3
- import { t as ProductDetailClient } from "./product-detail.client-5aHq-vuu.mjs";
4
- import { t as mountShopBlockIsland } from "./shopShared-3giNWE3H.mjs";
2
+ import { t as defineIslandPropsDecoder } from "./propsDecoder-B8lrKGPw.mjs";
3
+ import { t as ProductDetailClient } from "./product-detail.client-D9MP8hvH.mjs";
4
+ import { t as mountShopBlockIsland } from "./shopShared-COuQ2MhQ.mjs";
5
5
  //#region src/rendering/islands/enhancers/productDetail.tsx
6
6
  const decode = defineIslandPropsDecoder("product-detail");
7
7
  const enhance = (root, props) => mountShopBlockIsland(root, props, ProductDetailClient, "product-detail");
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- import { t as defineIslandPropsDecoder } from "./propsDecoder-0Unsqn3R.mjs";
3
- import { t as ProductListClient } from "./product-list.client-CyAk5rnC.mjs";
4
- import { t as mountShopBlockIsland } from "./shopShared-3giNWE3H.mjs";
2
+ import { t as defineIslandPropsDecoder } from "./propsDecoder-B8lrKGPw.mjs";
3
+ import { t as ProductListClient } from "./product-list.client-wCz1qcUY.mjs";
4
+ import { t as mountShopBlockIsland } from "./shopShared-COuQ2MhQ.mjs";
5
5
  //#region src/rendering/islands/enhancers/productList.tsx
6
6
  const decode = defineIslandPropsDecoder("product-list");
7
7
  const enhance = (root, props) => mountShopBlockIsland(root, props, ProductListClient, "product-list");
@@ -1,6 +1,8 @@
1
1
  "use client";
2
- import { $ as productListInteractiveIslandPropsCodec, Dt as eventCombinedInteractiveIslandPropsCodec, J as checkoutInteractiveIslandPropsCodec, K as cartInteractiveIslandPropsCodec, L as giftingInteractiveIslandPropsCodec, S as eventRegistrationInteractiveIslandPropsCodec, Z as productDetailInteractiveIslandPropsCodec, _ as formInteractiveIslandPropsCodec, a as newsletterFormInteractiveIslandPropsCodec, c as eventListingInteractiveIslandPropsCodec, p as eventCalendarInteractiveIslandPropsCodec, pn as headerChromeRuntimeContractSchema, tt as shopInteractiveIslandPropsCodec } from "./newsletter-form.interactive-DVt3enLr.mjs";
3
- import { Ha as isDecodeSuccess, Pi as bookingFormInteractiveIslandPropsCodec, za as createZodCodec } from "./wizardSteps-B952ify5.mjs";
2
+ import { H as cartInteractiveIslandPropsCodec, Ot as eventCombinedInteractiveIslandPropsCodec, S as eventRegistrationInteractiveIslandPropsCodec, W as checkoutInteractiveIslandPropsCodec, Y as productListInteractiveIslandPropsCodec, Z as shopInteractiveIslandPropsCodec, _ as formInteractiveIslandPropsCodec, a as newsletterFormInteractiveIslandPropsCodec, c as eventListingInteractiveIslandPropsCodec, mn as headerChromeRuntimeContractSchema, p as eventCalendarInteractiveIslandPropsCodec, q as productDetailInteractiveIslandPropsCodec } from "./newsletter-form.interactive-D0iRg7p2.mjs";
3
+ import { Pi as bookingFormInteractiveIslandPropsCodec } from "./wizardSteps-B3gsXNnb.mjs";
4
+ import { i as createZodCodec, s as isDecodeSuccess } from "./islands-dMh0Oxli.mjs";
5
+ import { i as giftingInteractiveIslandPropsCodec } from "./gifting.interactive-CrwHpUJG.mjs";
4
6
  import { z } from "zod";
5
7
  //#region ../blocks/src/contracts/non-block-islands.ts
6
8
  const accordionIslandSchema = z.object({