@riverbankcms/sdk 0.160.0 → 0.161.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 (207) hide show
  1. package/dist/_dts/{BlocksIslandsHydrator-CoqeotCL.d.ts → BlocksIslandsHydrator-Bx4kLiTA.d.ts} +1 -1
  2. package/dist/_dts/{Page-C0ENVLCF.d.ts → Page-Dm7_P13o.d.ts} +211 -9
  3. package/dist/_dts/{SdkPreviewMode-jZK0A49V.d.ts → SdkPreviewMode-D7HdWWwF.d.ts} +4 -4
  4. package/dist/_dts/{auth-contract-FPg0-2MC.d.ts → auth-contract-CgJ5nMaH.d.ts} +2 -0
  5. package/dist/_dts/{client-uMMuPq9V.d.ts → client-Ep0jI9eE.d.ts} +1 -1
  6. package/dist/_dts/{content-types-D6nXGqdQ.d.ts → content-types-BgAzCrBc.d.ts} +2 -2
  7. package/dist/_dts/{contracts-Bnmj1nxu.d.ts → contracts-DUiOnj9e.d.ts} +8 -5
  8. package/dist/_dts/{footerPageOutline-CeLjFX8b.d.ts → footerPageOutline-B-uXamTG.d.ts} +6 -6
  9. package/dist/_dts/{generatePageMetadata-nyU8q02J.d.ts → generatePageMetadata-BDkZYEcS.d.ts} +2 -2
  10. package/dist/_dts/{index-Blwl7yl6.d.ts → index-BQDBQvdu.d.ts} +1 -1
  11. package/dist/_dts/{index-lkpjIg5i.d.ts → index-BVkP8f70.d.ts} +1 -1
  12. package/dist/_dts/{index-CEaKil7G.d.ts → index-CF6Cjs7b.d.ts} +2 -2
  13. package/dist/_dts/{index-nVoi_74l.d.ts → index-CSsfq6KG.d.ts} +3 -17
  14. package/dist/_dts/{index-DahMwisK.d.ts → index-D_8uz4OP.d.ts} +3 -3
  15. package/dist/_dts/{index-Bg64CkV-.d.ts → index-DvKQA6AZ.d.ts} +4 -4
  16. package/dist/_dts/{index-C5xslEBn.d.ts → index-KPrWM0KF.d.ts} +1 -1
  17. package/dist/_dts/{index-BaaGBY1v.d.ts → index-ylivB7Jj.d.ts} +2 -2
  18. package/dist/_dts/{loadContent-CYLmzvLq.d.ts → loadContent-DTjKOO-T.d.ts} +10 -10
  19. package/dist/_dts/{resolvePageContent-DqnxChOs.d.ts → resolvePageContent-C1vA5c5w.d.ts} +2 -2
  20. package/dist/_dts/{schema-D0bNcPWK.d.ts → schema-BHu0PYWl.d.ts} +18821 -16622
  21. package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
  22. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  23. package/dist/_dts/sdk/src/client.d.ts +7 -7
  24. package/dist/_dts/sdk/src/config/index.d.ts +6 -6
  25. package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
  26. package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
  27. package/dist/_dts/sdk/src/index.d.ts +8 -8
  28. package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
  29. package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
  30. package/dist/_dts/sdk/src/navigation/index.d.ts +2 -2
  31. package/dist/_dts/sdk/src/next/index.d.ts +7 -7
  32. package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
  33. package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
  34. package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
  35. package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
  36. package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
  37. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
  38. package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
  39. package/dist/_dts/sdk/src/preview-next/keep-alive.d.ts +1 -1
  40. package/dist/_dts/sdk/src/preview-next/session.d.ts +2 -2
  41. package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
  42. package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
  43. package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
  44. package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
  45. package/dist/_dts/sdk/src/routing/index.d.ts +5 -5
  46. package/dist/_dts/sdk/src/server.d.ts +5 -5
  47. package/dist/_dts/sdk/src/theme/index.d.ts +1 -1
  48. package/dist/_dts/{session-Ba2CsnK5.d.ts → session-C_gtSFyZ.d.ts} +2 -1
  49. package/dist/_dts/{types-D8czmbQF.d.ts → types-BR1Yboa9.d.ts} +1060 -140
  50. package/dist/_dts/{types-Dm-KW7nj.d.ts → types-CJXTCF_F.d.ts} +3 -3
  51. package/dist/_dts/{types-CFrYuXYP.d.ts → types-D02ngcUH.d.ts} +4 -2
  52. package/dist/_dts/{types-DSgmJ15W.d.ts → types-ZGUiHpDE.d.ts} +7 -7
  53. package/dist/_dts/{validation-Bmb4WnHg.d.ts → validation-BaV565gb.d.ts} +4 -4
  54. package/dist/client/{BlocksIslandsHydrator-DZRKi6tT.mjs → BlocksIslandsHydrator-DTExCJsb.mjs} +22 -21
  55. package/dist/client/{BookingMailingListNote-C00sLLdL.mjs → BookingMailingListNote-BDpxmn1p.mjs} +1 -1
  56. package/dist/client/{CalendarNavigationChevron-CHSi9b3E.mjs → CalendarNavigationChevron-PeCiL82X.mjs} +6 -6
  57. package/dist/client/{CheckboxChoice-Bhm6RAUL.mjs → CheckboxChoice-DWexRLf6.mjs} +1 -1
  58. package/dist/client/{DemoBookingPortalAccess-CaN-7ui7.mjs → DemoBookingPortalAccess-3zmIqakW.mjs} +5 -5
  59. package/dist/client/{DemoPortalSignInLink-ClxN5_xZ.mjs → DemoPortalSignInLink-GHi-8BW5.mjs} +1 -1
  60. package/dist/client/{EventCalendar.client-BncvSa1n.mjs → EventCalendar.client-BxQLY5cX.mjs} +9 -9
  61. package/dist/client/{EventCombined.client-DluBxVVu.mjs → EventCombined.client-B5bmQ03b.mjs} +8 -8
  62. package/dist/client/{EventEmbeddedCheckoutStep-BiJrMtfp.mjs → EventEmbeddedCheckoutStep-CgMZ9TeU.mjs} +1 -1
  63. package/dist/client/{EventItem-CXhnT9pF.mjs → EventItem-BEx-qiDE.mjs} +4 -4
  64. package/dist/client/{EventListWeekNavigation-V-dtoDlD.mjs → EventListWeekNavigation-CyH5tA6Y.mjs} +1 -1
  65. package/dist/client/{EventListing.client-DPO6SZbx.mjs → EventListing.client-D3uySdGP.mjs} +3 -3
  66. package/dist/client/{EventListing.view-B-Yi5JZS.mjs → EventListing.view-9RFrBejr.mjs} +29 -13
  67. package/dist/client/{EventRegistrationPayment-Dc3Fnlnw.mjs → EventRegistrationPayment-CG2tQx8K.mjs} +25 -13
  68. package/dist/client/LocationMapActions-Wsr83Q7q.mjs +268 -0
  69. package/dist/client/{Page-7PkzO04N.mjs → Page-Bf2nPACI.mjs} +809 -298
  70. package/dist/client/{StepIndicator-DiD6euZ8.mjs → StepIndicator-CZweb1vs.mjs} +2 -2
  71. package/dist/client/{TabBarFragment-BHd8GN8y.mjs → TabBarFragment-Bkgz67gt.mjs} +1 -1
  72. package/dist/client/ThemedButton-CnyL3s1A.mjs +2243 -0
  73. package/dist/client/{accordion-2m27DsIk.mjs → accordion-TcimLLRQ.mjs} +1 -1
  74. package/dist/client/{booking-form.client-BddWV5w1.mjs → booking-form.client-q-RpJ4aF.mjs} +12 -12
  75. package/dist/client/{bookingForm-bcdXQjmw.mjs → bookingForm-DjGfk3Wj.mjs} +4 -4
  76. package/dist/client/bookings.mjs +5 -5
  77. package/dist/client/{carousel-D7nj9I0y.mjs → carousel-CGAk6j0m.mjs} +2 -2
  78. package/dist/client/{carousel.client-AffDJo_s.mjs → carousel.client-ArlGmYWV.mjs} +1 -1
  79. package/dist/client/{cart-PN6yCw1H.mjs → cart-D_h3rAZ2.mjs} +3 -3
  80. package/dist/client/{cart.client-D4t1f0cJ.mjs → cart.client-DHOxZbJ7.mjs} +1 -1
  81. package/dist/client/{checkout-CsTwXVSb.mjs → checkout-tC-3CzuM.mjs} +3 -3
  82. package/dist/client/{checkout.client-BhQE3zY7.mjs → checkout.client-DsBb2Pkm.mjs} +1 -1
  83. package/dist/client/client.mjs +5 -4
  84. package/dist/client/{context-BLAvalAa.mjs → context-9ZfMb6GA.mjs} +1 -1
  85. package/dist/client/{cta-CUXhX_D7.mjs → cta-D-ZqL7-e.mjs} +1 -1
  86. package/dist/client/{dateFormatting-BHIHxNuo.mjs → dateFormatting-BCwLqYpW.mjs} +1 -1
  87. package/dist/client/{demoPortalMagicLink-R-awbk_0.mjs → demoPortalMagicLink-BxkSS9fx.mjs} +1 -1
  88. package/dist/client/{enhanceHeaderSection-9Q93uvTo.mjs → enhanceHeaderSection-xg6to91E.mjs} +3 -3
  89. package/dist/client/{event-details.client-BS1WtG-a.mjs → event-details.client-C670TgRd.mjs} +2 -17
  90. package/dist/client/{event-registration.client-BXndwsET.mjs → event-registration.client-C6GApWTB.mjs} +16 -16
  91. package/dist/client/{eventCalendar-HyoOt1Qz.mjs → eventCalendar-CWc0dg9i.mjs} +4 -4
  92. package/dist/client/{eventCombined-sdG5oEaH.mjs → eventCombined-D4DbOrvQ.mjs} +4 -4
  93. package/dist/client/{eventDetails-FFAknE4w.mjs → eventDetails-C2DfmbC0.mjs} +2 -2
  94. package/dist/client/{eventListing-CGK6urk3.mjs → eventListing-C_yXmHyz.mjs} +4 -4
  95. package/dist/client/{eventRegistration-VhrvCs4l.mjs → eventRegistration-DJuaCB-O.mjs} +4 -4
  96. package/dist/client/{form-C-B5O_ko.mjs → form-QZhtdFHA.mjs} +3 -3
  97. package/dist/client/{form.client-DoZVcl8d.mjs → form.client-CgvPACwG.mjs} +4 -4
  98. package/dist/client/{form.parts-mttKpgif.mjs → form.parts-2uI0-5N-.mjs} +3 -3
  99. package/dist/client/{formatDate-xUSCknEO.mjs → formatDate-Danr0Nk4.mjs} +1 -1
  100. package/dist/client/gifting/client.mjs +3 -3
  101. package/dist/client/{headerSection-BHUEXsaI.mjs → headerSection-DJdlLdvZ.mjs} +2 -2
  102. package/dist/client/{mediaAssets-BOj-Co0B.mjs → mediaAssets-BvjcAZpS.mjs} +1 -1
  103. package/dist/client/mediaContext-jPeJ2PmJ.mjs +10801 -0
  104. package/dist/client/{newsletter-form.client-D_n0rftg.mjs → newsletter-form.client-Cbepz2KU.mjs} +5 -5
  105. package/dist/client/{newsletter-form.parts-DKHye4IE.mjs → newsletter-form.parts-DN8oMCQ0.mjs} +2 -2
  106. package/dist/client/{newsletterForm-tEaYelzx.mjs → newsletterForm-wjLtW-wq.mjs} +3 -3
  107. package/dist/client/{noop-B610YKEx.mjs → noop-B7H6gCbj.mjs} +297 -3
  108. package/dist/client/portal/client.mjs +12 -12
  109. package/dist/client/{product-detail.client-DUf5x5Jt.mjs → product-detail.client-CYTR165c.mjs} +1 -1
  110. package/dist/client/{product-list.client-Cqp1BPTV.mjs → product-list.client-B4vTvag8.mjs} +1 -1
  111. package/dist/client/{productDetail-B8bBiogP.mjs → productDetail-k8LEMSWn.mjs} +3 -3
  112. package/dist/client/{productList-BKN4D-1z.mjs → productList-DEo8Bqoe.mjs} +3 -3
  113. package/dist/client/{propsDecoder-2nNZh2Oe.mjs → propsDecoder-G0j0HXBO.mjs} +3 -28
  114. package/dist/client/{registry.server-BAm4RPNJ.mjs → registry.server-BTmSXE3D.mjs} +355 -162
  115. package/dist/client/rendering/client.mjs +27 -28
  116. package/dist/client/rendering/islands.mjs +1 -1
  117. package/dist/client/rendering.mjs +15 -9
  118. package/dist/client/{richText-coerce-Cv-qomNB.mjs → richText-coerce-B19taoH6.mjs} +1 -1
  119. package/dist/client/{routeIslandApiConfig-C5u8MbAA.mjs → routeIslandApiConfig-Chu5BHra.mjs} +1 -1
  120. package/dist/client/{ThemedButton-C22C9cCF.mjs → schema-C-m8XHuW.mjs} +990 -2310
  121. package/dist/client/{shop-DZNC0VKk.mjs → shop-RGWa43H7.mjs} +3 -3
  122. package/dist/client/{shop-commerce-DdX4LSa3.mjs → shop-commerce-TJYCBO_H.mjs} +11 -11
  123. package/dist/client/{shop-commerce-store-BJtrZov9.mjs → shop-commerce-store-CjCcUB_o.mjs} +1 -1
  124. package/dist/client/{shop.client-DmDd-igg.mjs → shop.client-tsKfZw1W.mjs} +12 -12
  125. package/dist/client/{shop.interactive-5SnnDHz3.mjs → shop.interactive-CVqLAU53.mjs} +6 -158
  126. package/dist/client/{shopShared-CPqUlAh9.mjs → shopShared-C3lHMz_R.mjs} +2 -2
  127. package/dist/client/{timetableModel-C19rcHEw.mjs → timetableModel-V2ifvGGy.mjs} +148 -8
  128. package/dist/client/{useAvailableSlots-BjbJXotk.mjs → useAvailableSlots-D1X69-pN.mjs} +3 -3
  129. package/dist/client/{useBookingNowIso-CMgfL7YJ.mjs → useBookingNowIso-Ch30jino.mjs} +1 -1
  130. package/dist/client/{useDiscountApply-KG8jB7WC.mjs → useDiscountApply-Bwzr1RjV.mjs} +2 -2
  131. package/dist/client/{useDiscountCodeUi-DK2w_i0a.mjs → useDiscountCodeUi-BimJbFC7.mjs} +1 -1
  132. package/dist/client/{useEventPagination-DW6MCirb.mjs → useEventPagination-CLAS0upd.mjs} +8 -21
  133. package/dist/client/{view-CkUn3Y0Y.mjs → view-BUh4LnLS.mjs} +4 -4
  134. package/dist/client/{view-CseyBW07.mjs → view-Dj_FZHmg.mjs} +18 -15
  135. package/dist/client/wizardSteps-BkZc-hKH.mjs +6598 -0
  136. package/dist/preview-next/before-render.mjs +5 -4
  137. package/dist/preview-next/chrome.css +2 -0
  138. package/dist/preview-next/client/{EventEmbeddedCheckoutStep-lUHBrzHv.mjs → EventEmbeddedCheckoutStep-CwerMfzn.mjs} +2 -1
  139. package/dist/preview-next/client/LocationPickerEnvironment-QtSG2Bl-.mjs +138 -0
  140. package/dist/preview-next/client/MapLibreEditMap-B-rohNcG.mjs +488 -0
  141. package/dist/preview-next/client/{PreviewEditorSidebar-DWyUGCAG.mjs → PreviewEditorSidebar-Dvq-RW9-.mjs} +110 -63
  142. package/dist/preview-next/client/{PreviewEditorUI-Wq0b3Daw.mjs → PreviewEditorUI-BdFjS39R.mjs} +4 -3
  143. package/dist/preview-next/client/{SdkPreviewModeRuntime-wSI_R361.mjs → SdkPreviewModeRuntime-BEfHln1E.mjs} +425 -412
  144. package/dist/preview-next/client/{SdkPreviewModeRuntime-BtZPcwYV.mjs → SdkPreviewModeRuntime-CjkGh1IG.mjs} +1 -1
  145. package/dist/preview-next/client/{SiteChromeCustomizeContext-Hc4pYnNe.mjs → SiteChromeCustomizeContext-CDbxk_qZ.mjs} +2982 -53859
  146. package/dist/preview-next/client/{ThemedButton-DzeycIlD.mjs → ThemedButton-b14Bv03E.mjs} +1079 -340
  147. package/dist/preview-next/client/lucide-react-CA9cpo0P.mjs +51984 -0
  148. package/dist/preview-next/client/maplibre-gl-DykfOYYn.mjs +34208 -0
  149. package/dist/preview-next/client/{previewChromeSurface-Corq4AG7.mjs → previewChromeSurface-Dd1_mNIg.mjs} +1 -1
  150. package/dist/preview-next/client/result-BjJUoxUF.mjs +16 -0
  151. package/dist/preview-next/client/rolldown-runtime-CE6sIgz8.mjs +34 -0
  152. package/dist/preview-next/client/runtime.mjs +3 -3
  153. package/dist/preview-next/client/{sdk-runtime-CWymRWhK.mjs → sdk-runtime-B-CXyGVb.mjs} +1 -1
  154. package/dist/preview-next/client/siteStyleAccess-Kqk0j0dE.mjs +5812 -0
  155. package/dist/preview-next/client/{spinner-C4If5Y-O.mjs → spinner-CGxS8Ns-.mjs} +2 -1
  156. package/dist/preview-next/{constants-D8Ya7bO4.mjs → constants-Bf-vqdKH.mjs} +2 -1
  157. package/dist/preview-next/editor-base.css +2 -2
  158. package/dist/preview-next/keepAlive.mjs +2 -2
  159. package/dist/preview-next/middleware.mjs +7 -3
  160. package/dist/preview-next/{route-contract-8csADeIT.mjs → route-contract-hLg-yjQN.mjs} +41 -4
  161. package/dist/preview-next/{session-BgkrPqu0.mjs → session-P1R_ajT7.mjs} +12 -2
  162. package/dist/preview-next/session.mjs +1 -1
  163. package/dist/server/{Block.shared-D1_gonwM.mjs → Block.shared-CeTd2saO.mjs} +4 -4
  164. package/dist/server/{bindings-CFmJg5lm.mjs → bindings-C5YpKuKt.mjs} +2 -1
  165. package/dist/server/{client-DPsi0Dai.mjs → client-Cv26lZQ4.mjs} +7 -5
  166. package/dist/server/config-validation.mjs +1 -1
  167. package/dist/server/config.mjs +2 -2
  168. package/dist/server/{siteChromeOverlayClearance-DALIAMwo.mjs → effectiveNavLinkStyle-CGvGr3yD.mjs} +461 -1064
  169. package/dist/server/index.mjs +3 -3
  170. package/dist/server/{loadContent-RMCcuVU_.mjs → loadContent-C8a0b-cC.mjs} +11 -5
  171. package/dist/server/loadPage--DXBwI8V.mjs +2 -0
  172. package/dist/server/{loadPage-DhDGzj7t.mjs → loadPage-BW7dklu3.mjs} +3 -2
  173. package/dist/server/next.mjs +9 -9
  174. package/dist/server/{overrideResolution-OxY5FMuy.mjs → overrideResolution-tIuqmJB3.mjs} +1 -1
  175. package/dist/server/{overrides-Bz_A6sB9.mjs → overrides-D1fiPOKF.mjs} +596 -301
  176. package/dist/server/page-converter.mjs +1 -1
  177. package/dist/server/{prebuild-B_1vrSru.mjs → prebuild--fO0E2tr.mjs} +1 -1
  178. package/dist/server/prebuild.mjs +1 -1
  179. package/dist/server/{prefetchBlockData-B7ukYXXR.mjs → prefetchBlockData-CqJnokWJ.mjs} +133 -87
  180. package/dist/server/{publicProducts-Djbpc81A.mjs → publicProducts-CvvZ4JIe.mjs} +41 -3
  181. package/dist/server/{registry-eFjKtEhF.mjs → registry-BVfCqaCq.mjs} +477 -1021
  182. package/dist/server/rendering/server.mjs +4 -4
  183. package/dist/server/rendering.mjs +8 -8
  184. package/dist/server/{resolveBlockData-DYvEa9c5.mjs → resolveBlockData-DPNvhXEz.mjs} +1 -1
  185. package/dist/server/routing.mjs +1 -1
  186. package/dist/server/{schema-C3dJ5UkL.mjs → schema-CD4peO7m.mjs} +2203 -1223
  187. package/dist/server/server.mjs +3 -3
  188. package/dist/server/site-styles-H-EvTJiW.mjs +787 -0
  189. package/dist/server/siteChromeOverlayClearance-DNC2k1U0.mjs +750 -0
  190. package/dist/server/{src-C5Mu-z0F.mjs → src-ILxc6pid.mjs} +161 -3
  191. package/dist/server/theme-bridge.mjs +1 -1
  192. package/dist/server/theme.mjs +1 -1
  193. package/dist/server/{themeAdmission-ruoyXb_0.mjs → themeAdmission-BNHIXiUj.mjs} +117 -26
  194. package/dist/server/{validation-B-Xar8QS.mjs → validation-B1ieVemg.mjs} +2 -2
  195. package/dist/server/{version-Bg7VHK3i.mjs → version-BQK44wFg.mjs} +1 -1
  196. package/dist/styles/index.css +157 -0
  197. package/package.json +1 -1
  198. package/dist/client/LeafletStaticMap-ClZCCzAm.mjs +0 -135
  199. package/dist/client/location-map.client-Cylb_MHw.mjs +0 -28
  200. package/dist/client/location-map.view-Cx4Bl7ij.mjs +0 -345
  201. package/dist/client/locationMap-QnKJi-nZ.mjs +0 -15
  202. package/dist/client/mediaContext-DThoeEBU.mjs +0 -136
  203. package/dist/client/renderableMediaAssetAdmission-DGjBr_e-.mjs +0 -152
  204. package/dist/client/wizardSteps-zgq10lN1.mjs +0 -17181
  205. package/dist/preview-next/client/siteStyleAccess-QZkJRHl5.mjs +0 -1359
  206. package/dist/server/loadPage-DUPP51C-.mjs +0 -2
  207. package/dist/server/media-CcHwZkdJ.mjs +0 -243
@@ -1,302 +1,94 @@
1
1
  "use client";
2
- import { T as ok, a as mediaIdentifierSchema, n as renderableMediaAssetSchema, w as err } from "./renderableMediaAssetAdmission-DGjBr_e-.mjs";
3
- import "react";
4
2
  import { z } from "zod";
5
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
- //#region ../core/src/date-math.ts
7
- function addDaysToDate(date, dayCount) {
8
- const next = new Date(date);
9
- next.setUTCDate(next.getUTCDate() + dayCount);
10
- return next;
11
- }
12
- function addDaysToIso(isoString, dayCount) {
13
- const date = new Date(isoString);
14
- if (!Number.isFinite(date.getTime())) return isoString;
15
- return addDaysToDate(date, dayCount).toISOString();
3
+ //#region ../core/src/result.ts
4
+ function ok(value) {
5
+ return {
6
+ ok: true,
7
+ value
8
+ };
16
9
  }
17
- function subtractDaysFromIso(isoString, dayCount) {
18
- return addDaysToIso(isoString, -dayCount);
10
+ function err(error) {
11
+ return {
12
+ ok: false,
13
+ error
14
+ };
19
15
  }
20
16
  //#endregion
21
- //#region ../core/src/currency-format.ts
22
- const CURRENCY_CODE_INPUT_PATTERN = /^[A-Za-z]{3}$/;
23
- /** Parse + normalize a currency code, or return null if it isn't a 3-letter code. */
24
- function parseCurrencyCode(value) {
25
- return CURRENCY_CODE_INPUT_PATTERN.test(value) ? value.toUpperCase() : null;
26
- }
27
- const CURRENCY_LOCALE_BY_CODE = {
28
- USD: "en-US",
29
- GBP: "en-GB",
30
- EUR: "de-DE",
31
- AUD: "en-AU",
32
- CAD: "en-CA",
33
- NZD: "en-NZ",
34
- JPY: "ja-JP",
35
- CNY: "zh-CN",
36
- CHF: "de-CH"
37
- };
38
- function resolveCurrencyLocale(currencyCode, override) {
39
- return override ?? CURRENCY_LOCALE_BY_CODE[currencyCode] ?? "en";
40
- }
41
- function fractionDigitsFor(decimals, exactFormatter, amount) {
42
- switch (decimals) {
43
- case "exact": return {};
44
- case "auto": return exactFormatter.formatToParts(amount).find((part) => part.type === "fraction")?.value === exactFormatter.formatToParts(0).find((part) => part.type === "fraction")?.value ? {
45
- minimumFractionDigits: 0,
46
- maximumFractionDigits: exactFormatter.resolvedOptions().maximumFractionDigits
47
- } : {};
48
- case "whole": return {
49
- minimumFractionDigits: 0,
50
- maximumFractionDigits: 0
51
- };
52
- }
53
- }
54
- /**
55
- * The single currency-amount formatter for the product: minor units in,
56
- * localized string out.
57
- *
58
- * The locale is derived from the currency by default, so output is deterministic
59
- * across server and client (no SSR/hydration mismatch). All other money
60
- * formatters in the codebase should delegate here rather than constructing their
61
- * own `Intl.NumberFormat`.
62
- */
63
- function formatCurrencyAmount(amountCents, currency, options) {
64
- return formatCurrencyMajorUnits(amountCents / 100, currency, options);
65
- }
66
- /**
67
- * `formatCurrencyAmount` for an amount already in MAJOR units (29.99 = £29.99),
68
- * such as a registrar price. Prefer minor units everywhere else.
69
- */
70
- function formatCurrencyMajorUnits(amount, currency, options) {
71
- const currencyCode = currency.toUpperCase();
72
- const locale = resolveCurrencyLocale(currencyCode, options?.locale);
73
- try {
74
- const exactFormatter = new Intl.NumberFormat(locale, {
75
- style: "currency",
76
- currency: currencyCode
77
- });
78
- return new Intl.NumberFormat(locale, {
79
- style: "currency",
80
- currency: currencyCode,
81
- ...fractionDigitsFor(options?.decimals ?? "exact", exactFormatter, amount)
82
- }).format(amount);
83
- } catch {
84
- return `${amount.toFixed(2)} ${currencyCode}`;
85
- }
86
- }
87
- /** Gift-card copy retains pence only when the amount has a fractional part. */
88
- function formatGiftCardAmountLabel(amountCents, currency = "GBP") {
89
- return formatCurrencyAmount(amountCents, currency, {
90
- locale: "en-GB",
91
- decimals: amountCents % 100 === 0 ? "whole" : "exact"
92
- });
93
- }
17
+ //#region ../core/src/branded.ts
18
+ const UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
19
+ function parseUuidBrand(value, unsafeConstructor) {
20
+ if (typeof value !== "string") return err({ kind: "not_string" });
21
+ const normalized = value.trim().toLowerCase();
22
+ if (normalized.length === 0) return err({ kind: "empty_string" });
23
+ if (!UUID_PATTERN.test(normalized)) return err({ kind: "invalid_uuid" });
24
+ return ok(unsafeConstructor(normalized));
25
+ }
26
+ const unsafeAsSiteId = (id) => id;
27
+ const unsafeAsApiKeyId = (id) => id;
28
+ const unsafeAsEventOfferingId = (id) => id;
29
+ const unsafeAsEventSeriesId = (id) => id;
30
+ const unsafeAsMediaAssetId = (id) => id;
31
+ const unsafeAsStorageBucketName = (value) => value;
32
+ const unsafeAsStoragePath = (value) => value;
33
+ const unsafeAsUserId = (id) => id;
34
+ const unsafeAsFormId = (id) => id;
35
+ const unsafeAsPassId = (id) => id;
36
+ const unsafeAsSiteTermsVersionId = (id) => id;
37
+ const unsafeAsCustomerPassId = (id) => id;
38
+ const unsafeAsAppointmentServiceId = (id) => id;
39
+ const unsafeAsAppointmentResourceId = (id) => id;
40
+ const unsafeAsContentVersionId = (id) => id;
41
+ const parseSiteId = (value) => parseUuidBrand(value, unsafeAsSiteId);
42
+ const parseApiKeyId = (value) => parseUuidBrand(value, unsafeAsApiKeyId);
43
+ const parseEventOfferingId = (value) => parseUuidBrand(value, unsafeAsEventOfferingId);
44
+ const parseUserId = (value) => parseUuidBrand(value, unsafeAsUserId);
45
+ const parseMediaAssetId = (value) => parseUuidBrand(value, unsafeAsMediaAssetId);
46
+ const parseContentVersionId = (value) => parseUuidBrand(value, unsafeAsContentVersionId);
47
+ const parseSiteTermsVersionId = (value) => parseUuidBrand(value, unsafeAsSiteTermsVersionId);
48
+ const parseEventSeriesId = (value) => parseUuidBrand(value, unsafeAsEventSeriesId);
94
49
  //#endregion
95
- //#region ../core/src/money-input.ts
96
- function unsafeAsCents(value) {
97
- return value;
50
+ //#region ../media-core/src/identifiers.ts
51
+ function slugifyMediaIdentifier(value) {
52
+ return value.toLowerCase().trim().replace(/[^a-z0-9\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-");
98
53
  }
99
- function unsafeAsNonNegativeCents(value) {
100
- return value;
101
- }
102
- function unsafeAsPositiveCents(value) {
103
- return value;
54
+ function parseMediaIdentifier(value) {
55
+ if (typeof value !== "string") return err({ kind: "not_string" });
56
+ const trimmed = value.trim();
57
+ if (trimmed.length === 0) return err({ kind: "empty_identifier" });
58
+ const normalized = slugifyMediaIdentifier(trimmed);
59
+ if (normalized.length === 0) return err({
60
+ kind: "empty_after_normalization",
61
+ value
62
+ });
63
+ return ok(normalized);
104
64
  }
105
65
  /**
106
- * Normalizes a derived amount to non-negative whole cents. This intentionally
107
- * clamps negatives to zero; use parseNonNegativeCents for validation.
66
+ * Admits identifiers read from trusted persistence without repairing dirty data in memory.
67
+ * User input should use parseMediaIdentifier, which intentionally canonicalizes it.
108
68
  */
109
- function toNonNegativeCents(value) {
110
- return unsafeAsNonNegativeCents(Math.max(0, Math.trunc(value)));
111
- }
112
- function parseCents(value) {
113
- if (!Number.isFinite(value)) return err({ kind: "invalid-number" });
114
- if (!Number.isInteger(value)) return err({ kind: "not-whole-cents" });
115
- return ok(unsafeAsCents(value));
116
- }
117
- function parseNonNegativeCents(value) {
118
- const parsed = parseCents(value);
119
- if (!parsed.ok) return parsed;
120
- if (parsed.value < 0) return err({ kind: "negative" });
121
- return ok(unsafeAsNonNegativeCents(parsed.value));
122
- }
123
- function parsePositiveCents(value) {
124
- const parsed = parseNonNegativeCents(value);
125
- if (!parsed.ok) return parsed;
126
- if (parsed.value === 0) return err({ kind: "zero-not-allowed" });
127
- return ok(unsafeAsPositiveCents(parsed.value));
128
- }
129
- function normalizeMoneyInput(value, options) {
130
- return (options.stripFormatting === true ? value.replace(/[^0-9.-]/g, "") : value).trim();
131
- }
132
- function parseFiniteMoneyAmount(value, options) {
133
- const normalized = normalizeMoneyInput(value, options);
134
- if (normalized.length === 0) return err({ kind: "empty" });
135
- const amount = Number(normalized);
136
- if (!Number.isFinite(amount)) return err({ kind: "invalid-number" });
137
- return ok(amount);
138
- }
139
- function roundMoneyAmountToCents(amount) {
140
- return Math.round(amount * 100);
141
- }
142
- function parsePositiveMoneyInputToCents(value, options = {}) {
143
- const parsed = parseFiniteMoneyAmount(value, options);
69
+ function parseCanonicalMediaIdentifier(value) {
70
+ if (typeof value !== "string") return err({ kind: "not_string" });
71
+ const parsed = parseMediaIdentifier(value);
144
72
  if (!parsed.ok) return parsed;
145
- if (parsed.value < 0) return err({ kind: "negative" });
146
- const amountCents = roundMoneyAmountToCents(parsed.value);
147
- if (amountCents <= 0) return err({ kind: "zero-not-allowed" });
148
- return ok(unsafeAsPositiveCents(amountCents));
149
- }
150
- //#endregion
151
- //#region ../core/src/booking-flexible-balance.ts
152
- function clampFlexibleBalanceConfiguredAmount(amountCents, totalAmountCents) {
153
- return Math.max(0, Math.min(amountCents, totalAmountCents));
154
- }
155
- function resolveFlexibleBalanceInitialPaymentCents(input) {
156
- return clampFlexibleBalanceConfiguredAmount(input.config.upfrontAmountCents, input.totalAmountCents);
157
- }
158
- function resolveFlexibleBalanceDueAt(input) {
159
- switch (input.dueDateRule.kind) {
160
- case "relative_to_start_date": return subtractDaysFromIso(input.bookingStartAt, input.dueDateRule.daysBeforeStart);
161
- case "fixed_calendar_date": return input.dueDateRule.dueAt;
162
- default: return assertNever$3(input.dueDateRule);
163
- }
164
- }
165
- function calculateFlexibleBalanceMinimumPaymentCents(input) {
166
- if (input.remainingBalanceCents <= 0) return 0;
167
- const minimumPercentageBps = input.minimumPercentageBps ?? 1e3;
168
- const percentageFloor = Math.ceil(input.remainingBalanceCents * minimumPercentageBps / 1e4);
169
- return Math.min(input.remainingBalanceCents, Math.max(input.stripeMinimumChargeCents, percentageFloor));
170
- }
171
- function resolveFlexibleBalancePaymentEligibility(input) {
172
- if (input.remainingBalanceCents <= 0 || input.status === "completed") return {
173
- kind: "unavailable",
174
- reason: "already_settled"
175
- };
176
- switch (input.status) {
177
- case "payment_pending":
178
- case "cancelled_due_to_non_payment":
179
- case "refunded":
180
- case "waived": return {
181
- kind: "unavailable",
182
- reason: input.status
183
- };
184
- case "closed_order_failed": return {
185
- kind: "unavailable",
186
- reason: "order_failed"
187
- };
188
- case "overdue": return {
189
- kind: "full_balance_only",
190
- remainingBalanceCents: input.remainingBalanceCents,
191
- reason: "overdue"
192
- };
193
- case "active": {
194
- const minimumAmountCents = calculateFlexibleBalanceMinimumPaymentCents({
195
- remainingBalanceCents: input.remainingBalanceCents,
196
- stripeMinimumChargeCents: input.stripeMinimumChargeCents,
197
- minimumPercentageBps: input.minimumPercentageBps
198
- });
199
- if (minimumAmountCents >= input.remainingBalanceCents) return {
200
- kind: "full_balance_only",
201
- remainingBalanceCents: input.remainingBalanceCents,
202
- reason: "dust_balance"
203
- };
204
- return {
205
- kind: "eligible",
206
- minimumAmountCents,
207
- maximumCustomAmountCents: input.remainingBalanceCents,
208
- suggestedPayFullAmountCents: input.remainingBalanceCents
209
- };
210
- }
211
- default: return assertNever$3(input.status);
212
- }
213
- }
214
- function assertNever$3(value) {
215
- throw new Error(`Unexpected value: ${String(value)}`);
216
- }
217
- //#endregion
218
- //#region ../core/src/booking-instalments.ts
219
- function isDepositBearingBookingInstalmentPlan(plan) {
220
- switch (plan.kind) {
221
- case "deposit_plus_one_remainder":
222
- case "deposit_plus_scheduled_instalments": return true;
223
- case "equal_scheduled_instalments": return false;
224
- default: return assertNever$2(plan);
225
- }
226
- }
227
- function getBookingInstalmentDepositRefundability(plan) {
228
- return isDepositBearingBookingInstalmentPlan(plan) ? plan.depositRefundability : null;
229
- }
230
- function clampConfiguredAmount(amountCents, totalAmountCents) {
231
- return Math.max(0, Math.min(amountCents, totalAmountCents));
232
- }
233
- function splitAmountWithRemainderInFirst(totalAmountCents, partCount) {
234
- if (partCount <= 0) return [];
235
- const baseAmountCents = Math.floor(totalAmountCents / partCount);
236
- const remainderCents = totalAmountCents - baseAmountCents * partCount;
237
- return Array.from({ length: partCount }, (_, index) => index === 0 ? baseAmountCents + remainderCents : baseAmountCents);
238
- }
239
- function addIntervalPreservingMonthAnchor(isoString, intervalCount, intervalUnit) {
240
- const date = new Date(isoString);
241
- if (!Number.isFinite(date.getTime())) return isoString;
242
- switch (intervalUnit) {
243
- case "day":
244
- date.setUTCDate(date.getUTCDate() + intervalCount);
245
- return date.toISOString();
246
- case "week":
247
- date.setUTCDate(date.getUTCDate() + intervalCount * 7);
248
- return date.toISOString();
249
- case "month": return addMonthsPreservingAnchorDay(date, intervalCount).toISOString();
250
- default: return assertNever$2(intervalUnit);
251
- }
252
- }
253
- function getBookingInstalmentPlanIntervalCount(plan) {
254
- switch (plan.kind) {
255
- case "deposit_plus_one_remainder": return plan.remainderDueCount;
256
- case "deposit_plus_scheduled_instalments":
257
- case "equal_scheduled_instalments": return plan.intervalCount;
258
- default: return assertNever$2(plan);
259
- }
260
- }
261
- function omitZeroAmountFutureRows(rows) {
262
- if (rows.length <= 1) return rows;
263
- const firstRow = rows[0];
264
- if (firstRow === void 0) return [];
265
- return [firstRow, ...rows.slice(1).filter((row) => row.amountCents > 0)];
266
- }
267
- function formatOrderInstalmentStatusLabel(input) {
268
- switch (input.status) {
269
- case "pending_initial_payment": return input.phaseKind === "initial" ? "Due today" : "Scheduled";
270
- case "scheduled": return "Scheduled";
271
- case "paid": return input.phaseKind === "initial" ? "Paid today" : "Paid";
272
- case "failed": return "Payment failed";
273
- case "waived": return "Waived";
274
- case "cancelled": return "Cancelled";
275
- case "cancelled_as_paid_early": return "Paid early";
276
- case "refunded": return "Refunded";
277
- default: return assertNever$2(input.status);
278
- }
279
- }
280
- function addMonthsPreservingAnchorDay(date, intervalCount) {
281
- const anchorDay = date.getUTCDate();
282
- const nextMonth = new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth() + intervalCount, 1, date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.getUTCMilliseconds()));
283
- const lastDayOfTargetMonth = new Date(Date.UTC(nextMonth.getUTCFullYear(), nextMonth.getUTCMonth() + 1, 0)).getUTCDate();
284
- nextMonth.setUTCDate(Math.min(anchorDay, lastDayOfTargetMonth));
285
- return nextMonth;
286
- }
287
- function assertNever$2(value) {
288
- throw new Error(`Unexpected value: ${String(value)}`);
73
+ if (value !== parsed.value) return err({
74
+ kind: "non_canonical_identifier",
75
+ value,
76
+ canonical: parsed.value
77
+ });
78
+ return parsed;
289
79
  }
290
80
  //#endregion
291
- //#region ../core/src/booking-payment-options.ts
292
- /** Automatic instalments and a flexible balance cannot share one booking offer. */
293
- function validateBookingPaymentOptionKinds(kinds) {
294
- if (kinds.length === 0) return err("no_options");
295
- const uniqueKinds = new Set(kinds);
296
- if (uniqueKinds.size !== kinds.length) return err("duplicate_kind");
297
- if (uniqueKinds.has("instalment_plan") && uniqueKinds.has("flexible_balance")) return err("incompatible_collection_options");
298
- return ok(void 0);
299
- }
81
+ //#region ../media-core/src/mediaIdentifierSchema.ts
82
+ /** Strict stored-reference admission delegates the canonical identifier decision. */
83
+ const mediaIdentifierSchema = z.string().transform((value, context) => {
84
+ const parsed = parseCanonicalMediaIdentifier(value);
85
+ if (parsed.ok) return parsed.value;
86
+ context.addIssue({
87
+ code: "custom",
88
+ message: "Expected a canonical media identifier"
89
+ });
90
+ return z.NEVER;
91
+ });
300
92
  //#endregion
301
93
  //#region ../media-core/src/mediaKinds.ts
302
94
  const mediaTypeDiscriminants = [
@@ -308,6 +100,65 @@ const mediaTypeDiscriminants = [
308
100
  "archive"
309
101
  ];
310
102
  //#endregion
103
+ //#region ../media-core/src/renderableMediaAsset.ts
104
+ /** Shared identifier indexing for admitted site-scoped projections. */
105
+ function buildMediaIdentifierIndex(assets) {
106
+ const index = new Map(assets.map((asset) => [asset.identifier, asset]));
107
+ if (index.size !== assets.length) throw new Error("Duplicate media identifier in a site asset list");
108
+ return index;
109
+ }
110
+ /** Index already admitted projections, including runtime registration updates. */
111
+ function indexRenderableMediaAssets(assets) {
112
+ if (!assets.length) return void 0;
113
+ const byId = new Map(assets.map((asset) => [asset.id, asset]));
114
+ const byIdentifier = buildMediaIdentifierIndex(assets);
115
+ if (byId.size !== assets.length) throw new Error("Duplicate media asset identity in a site asset list");
116
+ return {
117
+ assets,
118
+ byId,
119
+ byIdentifier
120
+ };
121
+ }
122
+ /** A portable reference never uses an incidental UUID, URL or storage snapshot for identity. */
123
+ function resolveManagedMediaReference(reference, index) {
124
+ const asset = index?.byIdentifier.get(reference.identifier);
125
+ return asset ? {
126
+ kind: "resolved",
127
+ reference,
128
+ asset
129
+ } : {
130
+ kind: "missing",
131
+ reference
132
+ };
133
+ }
134
+ //#endregion
135
+ //#region ../media-core/src/renderableMediaAssetAdmission.ts
136
+ const mediaAssetIdSchema = z.string().transform((value, context) => {
137
+ const parsed = parseMediaAssetId(value);
138
+ if (parsed.ok) return parsed.value;
139
+ context.addIssue({
140
+ code: "custom",
141
+ message: "Expected a media asset ID"
142
+ });
143
+ return z.NEVER;
144
+ });
145
+ const nonemptyStorageValue = z.string().refine((value) => value.trim().length > 0);
146
+ const renderableMediaAssetSchema = z.object({
147
+ id: mediaAssetIdSchema,
148
+ identifier: mediaIdentifierSchema,
149
+ storageBucket: nonemptyStorageValue,
150
+ storagePath: nonemptyStorageValue,
151
+ mimeType: nonemptyStorageValue,
152
+ filename: z.string().optional(),
153
+ width: z.number().positive().nullable(),
154
+ height: z.number().positive().nullable()
155
+ });
156
+ /** Admission precedes the identifier-only runtime resolution decision. */
157
+ function buildRenderableMediaAssetIndex(assets) {
158
+ if (!assets?.length) return void 0;
159
+ return indexRenderableMediaAssets(assets.map((asset) => renderableMediaAssetSchema.parse(asset)));
160
+ }
161
+ //#endregion
311
162
  //#region ../media-core/src/media.ts
312
163
  const hotspotSchema = z.object({
313
164
  x: z.number().min(0).max(1),
@@ -1279,10 +1130,10 @@ function resolveOpaqueSurfaceHex(reference, palette, underlayReference) {
1279
1130
  const parts = parseColorTokenParts(reference);
1280
1131
  if (parts.kind === "token" && parts.opacityPercent !== null) {
1281
1132
  const foregroundHex = normalizePaletteHex(palette[parts.token] ?? "");
1282
- return foregroundHex ? compositeHex(foregroundHex, underlayHex, parts.opacityPercent / 100) : null;
1133
+ return foregroundHex ? compositeHex$1(foregroundHex, underlayHex, parts.opacityPercent / 100) : null;
1283
1134
  }
1284
1135
  const rgba = parseRgba(parts.kind === "raw" ? parts.value : reference);
1285
- return rgba ? compositeHex(rgbToHex(rgba.r, rgba.g, rgba.b), underlayHex, rgba.alpha) : null;
1136
+ return rgba ? compositeHex$1(rgbToHex(rgba.r, rgba.g, rgba.b), underlayHex, rgba.alpha) : null;
1286
1137
  }
1287
1138
  /** Resolve a colour reference only when it is already fully opaque. */
1288
1139
  function resolveConcreteColorHex(reference, palette) {
@@ -1298,7 +1149,7 @@ function resolveConcreteColorHex(reference, palette) {
1298
1149
  if (literal.toLowerCase() === "white") return "#ffffff";
1299
1150
  return normalizePaletteHex(literal);
1300
1151
  }
1301
- function compositeHex(foregroundHex, underlayHex, alpha) {
1152
+ function compositeHex$1(foregroundHex, underlayHex, alpha) {
1302
1153
  const foreground = hexToRgb(foregroundHex);
1303
1154
  const underlay = hexToRgb(underlayHex);
1304
1155
  const channel = (foregroundValue, underlayValue) => Math.round(foregroundValue * alpha + underlayValue * (1 - alpha));
@@ -1609,8 +1460,8 @@ function expandBasePalette(palette) {
1609
1460
  function deriveSurfaceDecorationColors(ground, text, accent) {
1610
1461
  const ink = getTextColorForBackground(ground);
1611
1462
  return {
1612
- line: firstContrastBlend(ground, text, ground, 1.5),
1613
- mark: firstContrastBlend(accent, ink, ground, 3)
1463
+ line: firstContrastBlend$1(ground, text, ground, 1.5),
1464
+ mark: firstContrastBlend$1(accent, ink, ground, 3)
1614
1465
  };
1615
1466
  }
1616
1467
  /** Secondary ink is blended toward its ground, with an ordinary-text contrast floor. */
@@ -1626,7 +1477,7 @@ function firstSafeMutedSample(sample, ground, low, high) {
1626
1477
  const middle = Math.floor((low + high) / 2);
1627
1478
  return contrastRatio(sample(middle), ground) >= 4.5 ? firstSafeMutedSample(sample, ground, low, middle) : firstSafeMutedSample(sample, ground, middle + 1, high);
1628
1479
  }
1629
- function firstContrastBlend(from, to, ground, threshold) {
1480
+ function firstContrastBlend$1(from, to, ground, threshold) {
1630
1481
  const start = hexToRgb(from);
1631
1482
  const end = hexToRgb(to);
1632
1483
  return Array.from({ length: 101 }, (_, index) => {
@@ -1827,6 +1678,20 @@ function selectLogoVariant(tone, variants) {
1827
1678
  return tone === "dark" ? forDarkBackgrounds ?? forLightBackgrounds : forLightBackgrounds ?? forDarkBackgrounds;
1828
1679
  }
1829
1680
  //#endregion
1681
+ //#region ../theme-core/src/site-styles/ownedThemeSnapshot.ts
1682
+ /** Copy before freezing: the editor still owns its source data. */
1683
+ function ownedThemeSnapshot(input) {
1684
+ return freezeOwnedThemeValue(structuredClone(input));
1685
+ }
1686
+ /** Only freshly owned data belongs here; no caller-owned object is frozen. */
1687
+ function freezeOwnedThemeValue(value) {
1688
+ if (typeof value === "object" && value !== null) {
1689
+ Object.values(value).forEach(freezeOwnedThemeValue);
1690
+ Object.freeze(value);
1691
+ }
1692
+ return value;
1693
+ }
1694
+ //#endregion
1830
1695
  //#region ../theme-core/src/buttons/typography.ts
1831
1696
  const textTransformSchema = z.enum([
1832
1697
  "none",
@@ -3736,25 +3601,42 @@ function resolveSurfaceButtonContext(input) {
3736
3601
  kind: "reset",
3737
3602
  styles: contextualButtonSurfaceResetStyles()
3738
3603
  };
3739
- return {
3740
- kind: "resolved",
3741
- styles: knownSurfaceButtonContextStyles({
3742
- surface: context.surface,
3743
- palette: input.palette,
3744
- colourIndex: input.colourIndex,
3745
- buttonSystem: surfaceButtonSystem(input.buttonSystem, input.primaryToken)
3746
- })
3747
- };
3748
- }
3749
- /** Every role's contextual styles against one proven solid surface. */
3750
- function knownSurfaceButtonContextStyles(input) {
3751
- return Object.fromEntries(VARIANT_ROLES.flatMap((role) => Object.entries(contextualButtonSurfaceStyles(resolveContextualButtonRole({
3752
- role,
3753
- buttonSystem: input.buttonSystem,
3604
+ return knownSurfaceButtonContext({
3605
+ surface: context.surface,
3754
3606
  palette: input.palette,
3755
3607
  colourIndex: input.colourIndex,
3756
- surface: input.surface
3757
- })))));
3608
+ buttonSystem: surfaceButtonSystem(input.buttonSystem, input.primaryToken)
3609
+ });
3610
+ }
3611
+ function knownSurfaceButtonContext(input) {
3612
+ const roles = freezeOwnedThemeValue({
3613
+ primary: resolveContextualButtonRole({
3614
+ ...input,
3615
+ role: "primary"
3616
+ }),
3617
+ secondary: resolveContextualButtonRole({
3618
+ ...input,
3619
+ role: "secondary"
3620
+ }),
3621
+ outline: resolveContextualButtonRole({
3622
+ ...input,
3623
+ role: "outline"
3624
+ }),
3625
+ ghost: resolveContextualButtonRole({
3626
+ ...input,
3627
+ role: "ghost"
3628
+ }),
3629
+ accent: resolveContextualButtonRole({
3630
+ ...input,
3631
+ role: "accent"
3632
+ })
3633
+ });
3634
+ const styles = Object.fromEntries(VARIANT_ROLES.flatMap((role) => Object.entries(contextualButtonSurfaceStyles(roles[role]))));
3635
+ return Object.defineProperty({
3636
+ kind: "resolved",
3637
+ styles,
3638
+ roles
3639
+ }, "roles", { enumerable: false });
3758
3640
  }
3759
3641
  function resolveContextualButtonRole(input) {
3760
3642
  const requested = findVariant(input.buttonSystem, input.role);
@@ -3777,15 +3659,18 @@ function preferredButtonResolution(requested, compiled, role) {
3777
3659
  focusIndicator: compiled.focusIndicator,
3778
3660
  boundary: boundaryForVariant(requested)
3779
3661
  };
3780
- return compiled.contextualHoverRepair ? {
3662
+ const boundaries = boundariesForVariant(requested);
3663
+ return compiled.contextualHoverRepair ? hideBoundaryEvidence({
3781
3664
  ...appearance,
3665
+ boundaries,
3782
3666
  kind: "repaired",
3783
3667
  candidate: "contextual-hover",
3784
3668
  rejectedCandidates: []
3785
- } : {
3669
+ }) : hideBoundaryEvidence({
3786
3670
  ...appearance,
3671
+ boundaries,
3787
3672
  kind: "preferred"
3788
- };
3673
+ });
3789
3674
  }
3790
3675
  /** Ordered, lazy fallback selection; the rejected evidence belongs to this decision. */
3791
3676
  function resolveFallbackButtonRole(input, requested, fallbacks, rejected) {
@@ -3798,15 +3683,16 @@ function resolveFallbackButtonRole(input, requested, fallbacks, rejected) {
3798
3683
  const candidate = candidateVariant(fallback, requested, input.buttonSystem);
3799
3684
  if (!candidate) return resolveFallbackButtonRole(input, requested, remaining, rejected);
3800
3685
  const compiled = compileCandidate(candidate.variant, input);
3801
- return compiled.ok ? {
3686
+ return compiled.ok ? hideBoundaryEvidence({
3802
3687
  kind: "repaired",
3803
3688
  requestedRole: input.role,
3804
3689
  candidate: candidate.name,
3690
+ boundaries: boundariesForVariant(candidate.variant),
3805
3691
  states: candidate.name === "surface-outline" ? withSurfaceInversion(compiled.states, input.surface) : compiled.states,
3806
3692
  focusIndicator: compiled.focusIndicator,
3807
3693
  boundary: candidate.boundary,
3808
3694
  rejectedCandidates: rejected
3809
- } : resolveFallbackButtonRole(input, requested, remaining, [...rejected, {
3695
+ }) : resolveFallbackButtonRole(input, requested, remaining, [...rejected, {
3810
3696
  candidate: candidate.name,
3811
3697
  error: compiled.error
3812
3698
  }]);
@@ -3913,6 +3799,25 @@ function candidateVariant(fallback, requested, system) {
3913
3799
  }
3914
3800
  };
3915
3801
  }
3802
+ function hideBoundaryEvidence(value) {
3803
+ return Object.defineProperty(value, "boundaries", { enumerable: false });
3804
+ }
3805
+ function boundariesForVariant(variant) {
3806
+ const boundary = (state) => {
3807
+ const appearance = variant.visualStates?.[state];
3808
+ return boundaryForVariant(appearance ? {
3809
+ ...variant,
3810
+ border: appearance.border === "none" ? void 0 : appearance.border
3811
+ } : variant);
3812
+ };
3813
+ return freezeOwnedThemeValue({
3814
+ base: boundary("base"),
3815
+ hover: boundary("hover"),
3816
+ focus: boundary("focus"),
3817
+ active: boundary("active"),
3818
+ disabled: boundary("disabled")
3819
+ });
3820
+ }
3916
3821
  function boundaryForVariant(variant) {
3917
3822
  if (!variant.border) return null;
3918
3823
  return {
@@ -4025,51 +3930,62 @@ function contextualBoundaryStyles(boundary) {
4025
3930
  };
4026
3931
  }
4027
3932
  //#endregion
4028
- //#region ../theme-core/src/surfaces/opaqueSurface.ts
4029
- function opaqueSurfaceContextFromTheme(theme) {
4030
- const palette = expandPalette(theme.palette);
4031
- return {
4032
- palette,
4033
- colourIndex: preparePaletteColourIndex(palette),
4034
- buttonSystem: theme.buttons,
4035
- linkHoverToken: theme.typography.proseLinkStyle?.hoverColorToken
4036
- };
4037
- }
4038
- /**
4039
- * The declarations that make an element own its surface: `color`, every
4040
- * `--rb-surface-*` role and every `--rb-action-*` variable. Card roles and
4041
- * opaque block panels both publish through this, so a nested surface can never
4042
- * inherit a band's light text or its band-resolved buttons.
4043
- */
4044
- function opaqueSurfaceDeclarations(surface, arrangement = false) {
4045
- if (surface.kind === "inherit") return inheritedSurfaceDeclarations(arrangement);
4046
- const foreground = surface.foreground;
4047
- return [
4048
- ...surfaceForegroundDeclarations({
4049
- text: colorValue(foreground.text),
4050
- heading: colorValue(foreground.heading),
4051
- link: colorValue(foreground.link),
4052
- linkHover: colorValue(foreground.linkHover),
4053
- supporting: colorValue(foreground.supporting),
4054
- ...arrangement ? { muted: colorValue(foreground.muted) } : {},
4055
- hoverDecoration: surface.hoverDecoration
4056
- }),
4057
- ...arrangement && surface.decorations !== void 0 ? [`${SURFACE_FOREGROUND_CSS_VARS.line}: ${surface.decorations.line};`, `${SURFACE_FOREGROUND_CSS_VARS.mark}: ${surface.decorations.mark};`] : [],
4058
- ...Object.entries(surface.buttonContext.styles).map(([property, value]) => `${property}: ${value};`)
4059
- ];
4060
- }
4061
- function colorValue(token) {
4062
- const parsed = parseThemeColorToken(token);
4063
- return parsed ? rgbColorValue(parsed) : token;
4064
- }
4065
- /** Every property a surface publishes, set to `inherit`. */
4066
- function inheritedSurfaceDeclarations(arrangement) {
4067
- return [
4068
- "color",
4069
- ...Object.entries(SURFACE_FOREGROUND_CSS_VARS).filter(([role]) => arrangement || role !== "line" && role !== "mark" && role !== "muted").map(([, variable]) => variable),
4070
- "--rb-surface-link-hover-decoration",
4071
- ...Object.keys(contextualButtonSurfaceResetStyles())
4072
- ].map((property) => `${property}: inherit;`);
3933
+ //#region ../theme-core/src/palette/utils/scrimContrast.ts
3934
+ const WHITE = "#ffffff";
3935
+ const BLACK = "#000000";
3936
+ /** `top` at `alpha` over opaque `bottom`, blended as CSS paints an overlay. */
3937
+ function compositeHex(topHex, alpha, bottomHex) {
3938
+ const top = hexToRgb(topHex);
3939
+ const bottom = hexToRgb(bottomHex);
3940
+ const mix = (a, b) => Math.round(alpha * a + (1 - alpha) * b);
3941
+ return rgbToHex(mix(top.r, bottom.r), mix(top.g, bottom.g), mix(top.b, bottom.b));
3942
+ }
3943
+ /**
3944
+ * The lowest contrast `foreground` can reach over `scrim` at `alpha` laid on
3945
+ * any pixel. A foreground whose luminance falls inside the range the
3946
+ * composites can take has a worst case of 1:1.
3947
+ */
3948
+ function worstCaseScrimContrast(input) {
3949
+ const overWhite = compositeHex(input.scrimHex, input.alpha, WHITE);
3950
+ const overBlack = compositeHex(input.scrimHex, input.alpha, BLACK);
3951
+ const luminance = (hex) => {
3952
+ const { r, g, b } = hexToRgb(hex);
3953
+ return relativeLuminance(r, g, b);
3954
+ };
3955
+ const foreground = luminance(input.foregroundHex);
3956
+ const low = luminance(overBlack);
3957
+ const high = luminance(overWhite);
3958
+ if (foreground >= low && foreground <= high) return 1;
3959
+ return Math.min(contrastRatio(input.foregroundHex, overWhite), contrastRatio(input.foregroundHex, overBlack));
3960
+ }
3961
+ /** Shared samples for literal RGB washes and palette-token gradient veils. */
3962
+ function gradientScrimSamples(gradient, alpha, palette) {
3963
+ const literal = [...gradient.matchAll(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/g)].map((stop) => ({
3964
+ hex: rgbToHex(Number(stop[1]), Number(stop[2]), Number(stop[3])),
3965
+ alpha: alpha * (stop[4] === void 0 ? 1 : Number(stop[4]))
3966
+ }));
3967
+ const tokens = [...gradient.matchAll(/var\(--tb-([\w-]+)\)/g)].flatMap((stop) => {
3968
+ const hex = stop[1] ? resolveConcreteColorHex(stop[1], palette) : null;
3969
+ return hex ? [{
3970
+ hex,
3971
+ alpha
3972
+ }] : [];
3973
+ });
3974
+ return [...literal, ...tokens];
3975
+ }
3976
+ /** The ink with the stronger worst-pixel guarantee identifies the veil tone.
3977
+ * No readable samples (or a tie) leaves classification to the foreground owner.
3978
+ */
3979
+ function scrimTone(samples) {
3980
+ if (samples.length === 0) return null;
3981
+ const worst = (foregroundHex) => Math.min(...samples.map((sample) => worstCaseScrimContrast({
3982
+ foregroundHex,
3983
+ scrimHex: sample.hex,
3984
+ alpha: sample.alpha
3985
+ })));
3986
+ const white = worst(WHITE);
3987
+ const black = worst(BLACK);
3988
+ return white === black ? null : white > black ? "dark" : "light";
4073
3989
  }
4074
3990
  //#endregion
4075
3991
  //#region ../theme-core/src/site-styles/accessibleSurfaces.ts
@@ -4419,12 +4335,67 @@ function terminalFallbackSurface(input) {
4419
4335
  rejectedCandidates: input.rejectedCandidates
4420
4336
  };
4421
4337
  }
4338
+ const resolvedSurfaceBrand = Symbol("ResolvedSurface");
4339
+ const surfaceOwners = /* @__PURE__ */ new WeakSet();
4340
+ const preparedIndexOwners = /* @__PURE__ */ new WeakSet();
4341
+ const surfaceTransports = /* @__PURE__ */ new WeakMap();
4342
+ const ownedRevisionInputs = /* @__PURE__ */ new WeakMap();
4343
+ const revisionOwners = /* @__PURE__ */ new WeakMap();
4344
+ const surfaceRevisionOwners = /* @__PURE__ */ new WeakMap();
4345
+ const surfaceTextPolicy = Object.freeze({
4346
+ heading: "large-text-aa",
4347
+ text: "body-aa",
4348
+ link: "body-aa",
4349
+ linkHover: "body-aa",
4350
+ supporting: "body-aa",
4351
+ muted: "body-aa"
4352
+ });
4353
+ function ownSurfaceRevision(context) {
4354
+ if (!ownedRevisionInputs.get(context.palette)?.has(context.buttonSystem)) {
4355
+ const revision = ownedThemeSnapshot({
4356
+ palette: context.palette,
4357
+ buttonSystem: context.buttonSystem
4358
+ });
4359
+ registerOwnedRevisionInputs(revision);
4360
+ surfaceRevisionOwners.set(revision, revision);
4361
+ revisionOwners.set(revision.palette, /* @__PURE__ */ new Map([[revision.buttonSystem, revision]]));
4362
+ return revision;
4363
+ }
4364
+ const revisions = revisionOwners.get(context.palette) ?? /* @__PURE__ */ new Map();
4365
+ const existing = revisions.get(context.buttonSystem);
4366
+ if (existing) return existing;
4367
+ const revision = Object.freeze({
4368
+ palette: context.palette,
4369
+ buttonSystem: context.buttonSystem
4370
+ });
4371
+ surfaceRevisionOwners.set(revision, revision);
4372
+ revisions.set(context.buttonSystem, revision);
4373
+ revisionOwners.set(context.palette, revisions);
4374
+ return revision;
4375
+ }
4376
+ /** Called only after copying and recursively freezing owner inputs. */
4377
+ function registerOwnedRevisionInputs(context) {
4378
+ const buttons = ownedRevisionInputs.get(context.palette) ?? /* @__PURE__ */ new Set();
4379
+ buttons.add(context.buttonSystem);
4380
+ ownedRevisionInputs.set(context.palette, buttons);
4381
+ }
4382
+ function isResolvedSurface(value) {
4383
+ return typeof value === "object" && value !== null && surfaceOwners.has(value) && "kind" in value && (value.kind === "owned" || value.kind === "inherit");
4384
+ }
4385
+ /** Opaque immutable surface/context values have no child DTOs to project. */
4386
+ function isSurfaceTransportLeaf(value) {
4387
+ return isResolvedSurface(value) || isSurfaceTreeRecord(value) && surfaceRevisionOwners.has(value);
4388
+ }
4389
+ /** Runtime serializers reject copies and forged structural objects, too. */
4390
+ function requireResolvedSurface(value) {
4391
+ if (!isResolvedSurface(value)) throw new Error("Surface must be produced by resolveSurface");
4392
+ }
4422
4393
  function resolveSurface(spec, context) {
4423
- return spec.kind === "section" ? resolveSectionSurface(spec.background, context) : preparedSurfaceValue(spec, context) ?? resolveSurfaceSpec(spec, context);
4394
+ return spec.kind === "section" ? resolveSectionSurface(spec.background, context) : preparedSurfaceValue(spec, context) ?? certifySurface(spec, context);
4424
4395
  }
4425
4396
  function preparedSurfaceValue(spec, context) {
4426
4397
  const index = context.preparedSurfaces;
4427
- if (!index || index.palette !== context.palette || index.buttonSystem !== context.buttonSystem || index.colourIndex !== context.colourIndex) return void 0;
4398
+ if (!index || !preparedIndexOwners.has(index) || index.palette !== context.palette || index.buttonSystem !== context.buttonSystem || index.colourIndex !== context.colourIndex) return void 0;
4428
4399
  return index.values[surfaceResolutionKey(spec, context)];
4429
4400
  }
4430
4401
  function surfaceResolutionKey(spec, context) {
@@ -4512,7 +4483,7 @@ function resolveOwnedSurface(paint, context) {
4512
4483
  }, context.palette, {
4513
4484
  linkHover: context.linkHoverToken,
4514
4485
  ...context.foreground
4515
- });
4486
+ }, { compositeBase: context.compositeBase });
4516
4487
  return {
4517
4488
  kind: "owned",
4518
4489
  paint,
@@ -4547,6 +4518,7 @@ function resolveSurfaceButtons(paint, foreground, context) {
4547
4518
  palette: context.palette,
4548
4519
  colourIndex: context.colourIndex,
4549
4520
  buttonSystem: context.buttonSystem,
4521
+ fallbackToken: context.compositeBase,
4550
4522
  primaryToken: context.buttonContext?.primary ?? (paint.kind === "solid" ? context.buttonSystem?.surfaceContexts?.[paint.token]?.primary : void 0),
4551
4523
  withoutButtonSystem: "reset"
4552
4524
  });
@@ -4573,24 +4545,35 @@ function resolveSectionSurface(background, context) {
4573
4545
  linkHover: context.linkHoverToken,
4574
4546
  ...context.foreground
4575
4547
  }, { compositeBase: context.compositeBase });
4576
- return {
4548
+ const surface = background === null ? { kind: "inherit" } : background.type === "color" ? {
4549
+ kind: "solid",
4550
+ color: background.color,
4551
+ composited: false,
4552
+ foreground: foreground.kind === "known" ? foreground.roles.link : void 0
4553
+ } : background.type === "gradient" ? { kind: "gradient" } : { kind: "image" };
4554
+ const revision = ownSurfaceRevision(context);
4555
+ const result = {
4577
4556
  kind: "section",
4578
4557
  foreground,
4579
4558
  buttonStyles: resolveSurfaceButtonContext({
4580
- surface: background === null ? { kind: "inherit" } : background.type === "color" ? {
4581
- kind: "solid",
4582
- color: background.color,
4583
- composited: false,
4584
- foreground: foreground.kind === "known" ? foreground.roles.link : void 0
4585
- } : background.type === "gradient" ? { kind: "gradient" } : { kind: "image" },
4586
- palette: context.palette,
4587
- colourIndex: context.colourIndex,
4588
- buttonSystem: context.buttonSystem,
4559
+ surface,
4560
+ palette: revision.palette,
4561
+ buttonSystem: revision.buttonSystem,
4589
4562
  primaryToken: sectionPrimaryButtonToken(background, context),
4590
4563
  fallbackToken: context.compositeBase,
4591
4564
  withoutButtonSystem: "inherit"
4592
- }).styles
4593
- };
4565
+ }).styles,
4566
+ proof: sectionProof(background, foreground),
4567
+ revision,
4568
+ textPolicy: surfaceTextPolicy,
4569
+ [resolvedSurfaceBrand]: true
4570
+ };
4571
+ Object.defineProperties(result, {
4572
+ proof: { enumerable: false },
4573
+ revision: { enumerable: false },
4574
+ textPolicy: { enumerable: false }
4575
+ });
4576
+ return freezeOwnedThemeValue(result);
4594
4577
  }
4595
4578
  function sectionPrimaryButtonToken(background, context) {
4596
4579
  if (background?.type !== "color" || typeof background.color !== "string") return void 0;
@@ -4621,42 +4604,650 @@ function resolveTintSurface(spec, context) {
4621
4604
  ...context,
4622
4605
  foreground: base.foreground
4623
4606
  });
4624
- return spec.gradient === "radial" ? {
4607
+ if (spec.gradient !== "radial") return surface;
4608
+ assertTintSamples(surface, spec.base, context.palette);
4609
+ return {
4625
4610
  ...surface,
4626
4611
  tintBase: spec.base
4627
- } : surface;
4612
+ };
4613
+ }
4614
+ /** A sampled gradient may never borrow a proof for just its painted endpoint. */
4615
+ function assertTintSamples(surface, base, palette) {
4616
+ if (surface.paint.kind !== "solid") throw new Error("Tint must paint a solid endpoint");
4617
+ const paint = resolveOpaqueSurfaceHex(surface.paint.token, palette, base);
4618
+ const underlay = resolveOpaqueSurfaceHex(base, palette, "background");
4619
+ if (!paint || !underlay) throw new Error("Tint needs a measurable underlay");
4620
+ const samples = [
4621
+ 0,
4622
+ .25,
4623
+ .5,
4624
+ .75,
4625
+ 1
4626
+ ].map((alpha) => compositeHex(paint, alpha, underlay));
4627
+ Object.entries(surface.foreground).forEach(([role, token]) => {
4628
+ if (!samples.every((sample) => {
4629
+ const ink = resolveOpaqueSurfaceHex(token, palette, sample);
4630
+ return ink !== null && contrastRatio(ink, sample) >= (role === "heading" ? 3 : 4.5);
4631
+ })) throw new RangeError(`No checked tint gradient for ${role} on ${base}`);
4632
+ });
4628
4633
  }
4629
4634
  function hexToRgba(hex, alpha) {
4630
4635
  const { r, g, b } = hexToRgb(hex);
4631
4636
  return `rgba(${r}, ${g}, ${b}, ${alpha})`;
4632
4637
  }
4633
- //#endregion
4634
- //#region ../theme-core/src/site-styles/types.ts
4635
- /**
4636
- * Defines a literal-preserving catalog while rejecting top-level extra keys on
4637
- * each entry: `defineExactCatalog<Entry>()([{ ... }])`.
4638
- */
4639
- function defineExactCatalog() {
4640
- return (entries) => entries;
4638
+ const foregroundInputSchema = z.object({
4639
+ text: z.string().nullable().optional(),
4640
+ heading: z.string().nullable().optional(),
4641
+ link: z.string().nullable().optional(),
4642
+ linkHover: z.string().nullable().optional(),
4643
+ supporting: z.string().nullable().optional()
4644
+ });
4645
+ const paintInputSchema = z.discriminatedUnion("kind", [
4646
+ z.object({
4647
+ kind: z.literal("solid"),
4648
+ token: z.string(),
4649
+ foregroundToken: z.string().optional()
4650
+ }),
4651
+ z.object({
4652
+ kind: z.literal("gradient"),
4653
+ foregroundToken: z.string().optional()
4654
+ }),
4655
+ z.object({ kind: z.literal("transparent") })
4656
+ ]);
4657
+ const buttonInputSchema = z.object({ primary: opaqueButtonColourTokenSchema });
4658
+ const surfaceSpecSchema = z.discriminatedUnion("kind", [
4659
+ z.object({
4660
+ kind: z.literal("recipe"),
4661
+ intent: z.enum([
4662
+ "base",
4663
+ "muted-band",
4664
+ "accent-band",
4665
+ "brand-depth-band"
4666
+ ])
4667
+ }),
4668
+ z.object({
4669
+ kind: z.literal("paint"),
4670
+ paint: paintInputSchema
4671
+ }),
4672
+ z.object({
4673
+ kind: z.literal("token"),
4674
+ token: z.string(),
4675
+ foreground: foregroundInputSchema.optional(),
4676
+ buttonContext: buttonInputSchema.optional()
4677
+ }),
4678
+ z.object({
4679
+ kind: z.literal("tint"),
4680
+ base: z.string(),
4681
+ source: z.enum(["text", "mark"]),
4682
+ opacity: z.number().finite(),
4683
+ gradient: z.literal("radial").optional()
4684
+ })
4685
+ ]);
4686
+ const surfaceTransportSchema = z.object({ $surface: z.object({
4687
+ spec: surfaceSpecSchema,
4688
+ context: z.object({
4689
+ palette: z.record(z.string(), z.string()),
4690
+ buttonSystem: buttonSystemSchema.optional(),
4691
+ foreground: foregroundInputSchema.optional(),
4692
+ linkHoverToken: z.string().optional(),
4693
+ compositeBase: z.string().optional(),
4694
+ buttonContext: buttonInputSchema.optional()
4695
+ })
4696
+ }) });
4697
+ /** Deserialised output is never evidence: parse the inputs and rerun their owner. */
4698
+ function parseResolvedSurface(value) {
4699
+ if (isResolvedSurface(value)) return value;
4700
+ const { spec, context } = surfaceTransportSchema.parse(value).$surface;
4701
+ return resolveSurface(spec, {
4702
+ ...context,
4703
+ buttonSystem: context.buttonSystem
4704
+ });
4641
4705
  }
4642
- function asDesignBlockId(value) {
4643
- return brandNonEmptyString(value, "DesignBlockId");
4706
+ /** Wire only the owner inputs; parsed CSS/results are recomputed, never trusted. */
4707
+ function serializeResolvedSurface(surface) {
4708
+ requireResolvedSurface(surface);
4709
+ const inputs = surfaceTransports.get(surface);
4710
+ if (!inputs) throw new Error("Missing surface inputs");
4711
+ return { $surface: inputs };
4712
+ }
4713
+ function certifySurface(spec, context) {
4714
+ const revision = ownSurfaceRevision(context);
4715
+ const inputs = {
4716
+ spec: ownedThemeSnapshot(spec),
4717
+ context: Object.freeze({
4718
+ ...revision,
4719
+ ...ownedThemeSnapshot({
4720
+ foreground: context.foreground,
4721
+ linkHoverToken: context.linkHoverToken,
4722
+ compositeBase: context.compositeBase,
4723
+ buttonContext: context.buttonContext
4724
+ })
4725
+ })
4726
+ };
4727
+ const decision = resolveSurfaceSpec(inputs.spec, inputs.context);
4728
+ const result = Object.assign(decision, {
4729
+ [resolvedSurfaceBrand]: true,
4730
+ proof: surfaceProof(decision, spec),
4731
+ revision,
4732
+ textPolicy: surfaceTextPolicy,
4733
+ $surface: inputs
4734
+ });
4735
+ Object.defineProperties(result, {
4736
+ proof: { enumerable: false },
4737
+ revision: { enumerable: false },
4738
+ textPolicy: { enumerable: false }
4739
+ });
4740
+ surfaceOwners.add(result);
4741
+ surfaceTransports.set(result, inputs);
4742
+ return freezeOwnedThemeValue(result);
4743
+ }
4744
+ function surfaceProof(decision, spec) {
4745
+ if (decision.kind === "inherit") return "inherit";
4746
+ if (decision.contrast.kind === "unmeasured") return "unproven-media";
4747
+ if (spec.kind === "tint") return spec.gradient === "radial" ? "checked-gradient-or-scrim" : "checked-composited";
4748
+ return decision.paint.kind === "solid" && /\/|rgba\(/.test(decision.paint.token) ? "checked-composited" : "checked-solid";
4749
+ }
4750
+ function sectionProof(background, foreground) {
4751
+ if (background === null) return "inherit";
4752
+ if (foreground.kind !== "known" || foreground.provenance.kind !== "measured") return "unproven-media";
4753
+ return /\/|rgba\(/.test(background.color ?? "") ? "checked-composited" : "checked-solid";
4754
+ }
4755
+ /** One theme revision per JSON envelope, shared by all nested Look slots. */
4756
+ function serializeSurfaceTree(value) {
4757
+ const revisions = [];
4758
+ const indices = /* @__PURE__ */ new Map();
4759
+ const revisionIndex = (revision) => {
4760
+ const index = indices.get(revision) ?? revisions.length;
4761
+ if (!indices.has(revision)) {
4762
+ indices.set(revision, index);
4763
+ revisions.push(revision);
4764
+ }
4765
+ return index;
4766
+ };
4767
+ const encode = (item) => {
4768
+ const revision = isSurfaceTreeRecord(item) ? surfaceRevisionOwners.get(item) : void 0;
4769
+ if (revision) return { $surfaceRevision: revisionIndex(revision) };
4770
+ if (isResolvedSurface(item)) {
4771
+ const input = serializeResolvedSurface(item).$surface;
4772
+ const index = revisionIndex(item.revision);
4773
+ const { palette: _palette, buttonSystem: _buttons, ...context } = input.context;
4774
+ return { $surface: {
4775
+ spec: input.spec,
4776
+ context,
4777
+ revision: index
4778
+ } };
4779
+ }
4780
+ return mapSurfaceTreeChildren(item, encode);
4781
+ };
4782
+ const encoded = encode(value);
4783
+ return revisions.length === 0 ? encoded : { $surfaceTransport: {
4784
+ revisions,
4785
+ value: encoded
4786
+ } };
4644
4787
  }
4645
- function asDesignPageId(value) {
4646
- return brandNonEmptyString(value, "DesignPageId");
4788
+ const surfaceEnvelopeSchema = z.object({ $surfaceTransport: z.object({
4789
+ revisions: z.array(z.object({
4790
+ palette: z.record(z.string(), z.string()),
4791
+ buttonSystem: buttonSystemSchema.optional()
4792
+ })),
4793
+ value: z.unknown()
4794
+ }) });
4795
+ const surfaceReferenceSchema = z.object({ $surface: z.object({
4796
+ spec: surfaceSpecSchema,
4797
+ revision: z.number().int().nonnegative(),
4798
+ context: z.object({
4799
+ foreground: foregroundInputSchema.optional(),
4800
+ linkHoverToken: z.string().optional(),
4801
+ compositeBase: z.string().optional(),
4802
+ buttonContext: buttonInputSchema.optional()
4803
+ })
4804
+ }) });
4805
+ const surfaceRevisionReferenceSchema = z.object({ $surfaceRevision: z.number().int().nonnegative() });
4806
+ /** Recreate owner results before any island's ordinary schema consumes them. */
4807
+ function parseSurfaceTree(value) {
4808
+ if (isSurfaceTransportLeaf(value)) return value;
4809
+ if (!isSurfaceTreeRecord(value) || !("$surfaceTransport" in value)) return mapSurfaceTreeChildren(value, parseSurfaceTree);
4810
+ const envelope = surfaceEnvelopeSchema.parse(value).$surfaceTransport;
4811
+ const revisions = envelope.revisions.map((revision) => {
4812
+ const owned = ownedThemeSnapshot({
4813
+ palette: revision.palette,
4814
+ buttonSystem: revision.buttonSystem
4815
+ });
4816
+ registerOwnedRevisionInputs(owned);
4817
+ return ownSurfaceRevision(owned);
4818
+ });
4819
+ const decode = (item) => {
4820
+ if (isSurfaceTreeRecord(item) && "$surfaceRevision" in item) {
4821
+ const revision = revisions[surfaceRevisionReferenceSchema.parse(item).$surfaceRevision];
4822
+ if (!revision) throw new Error("Unknown surface revision");
4823
+ return revision;
4824
+ }
4825
+ if (isSurfaceTreeRecord(item) && "$surface" in item) {
4826
+ const request = surfaceReferenceSchema.parse(item).$surface;
4827
+ const revision = revisions[request.revision];
4828
+ if (!revision) throw new Error("Unknown surface revision");
4829
+ return resolveSurface(request.spec, {
4830
+ ...revision,
4831
+ ...request.context,
4832
+ buttonSystem: revision.buttonSystem
4833
+ });
4834
+ }
4835
+ return mapSurfaceTreeChildren(item, decode);
4836
+ };
4837
+ return decode(envelope.value);
4647
4838
  }
4648
- function asDesignEntryId(value) {
4649
- return brandNonEmptyString(value, "DesignEntryId");
4839
+ function isSurfaceTreeRecord(value) {
4840
+ return typeof value === "object" && value !== null && !Array.isArray(value);
4650
4841
  }
4651
- function asBlockContentVersionId(value) {
4652
- return brandNonEmptyString(value, "BlockContentVersionId");
4842
+ function mapSurfaceTreeChildren(value, map) {
4843
+ if (Array.isArray(value)) return value.map(map);
4844
+ if (value instanceof Date) return value;
4845
+ return isSurfaceTreeRecord(value) ? Object.fromEntries(Object.entries(value).map(([key, item]) => [key, map(item)])) : value;
4653
4846
  }
4654
- function asDesignBoundaryId(value) {
4655
- const boundaryId = brandNonEmptyString(value, "DesignBoundaryId");
4656
- if (!boundaryId.startsWith("boundary:")) throw new Error(`DesignBoundaryId must start with "boundary:". Received: ${value}`);
4657
- return boundaryId;
4847
+ //#endregion
4848
+ //#region ../theme-core/src/surfaces/opaqueSurface.ts
4849
+ function opaqueSurfaceContextFromTheme(theme) {
4850
+ const palette = expandPalette(theme.palette);
4851
+ return {
4852
+ palette,
4853
+ colourIndex: preparePaletteColourIndex(palette),
4854
+ buttonSystem: theme.buttons,
4855
+ linkHoverToken: theme.typography.proseLinkStyle?.hoverColorToken
4856
+ };
4658
4857
  }
4659
- function asBlockOrderIndex(value) {
4858
+ /**
4859
+ * The declarations that make an element own its surface: `color`, every
4860
+ * `--rb-surface-*` role and every `--rb-action-*` variable. Card roles and
4861
+ * opaque block panels both publish through this, so a nested surface can never
4862
+ * inherit a band's light text or its band-resolved buttons.
4863
+ */
4864
+ function opaqueSurfaceDeclarations(surface, arrangement = false) {
4865
+ requireResolvedSurface(surface);
4866
+ if (surface.kind === "inherit") return inheritedSurfaceDeclarations(arrangement);
4867
+ const foreground = surface.foreground;
4868
+ return [
4869
+ ...surfaceForegroundDeclarations({
4870
+ text: colorValue(foreground.text),
4871
+ heading: colorValue(foreground.heading),
4872
+ link: colorValue(foreground.link),
4873
+ linkHover: colorValue(foreground.linkHover),
4874
+ supporting: colorValue(foreground.supporting),
4875
+ ...arrangement ? { muted: colorValue(foreground.muted) } : {},
4876
+ hoverDecoration: surface.hoverDecoration
4877
+ }),
4878
+ ...arrangement && surface.decorations !== void 0 ? [`${SURFACE_FOREGROUND_CSS_VARS.line}: ${surface.decorations.line};`, `${SURFACE_FOREGROUND_CSS_VARS.mark}: ${surface.decorations.mark};`] : [],
4879
+ ...Object.entries(surface.buttonContext.styles).map(([property, value]) => `${property}: ${value};`)
4880
+ ];
4881
+ }
4882
+ function colorValue(token) {
4883
+ const parsed = parseThemeColorToken(token);
4884
+ return parsed ? rgbColorValue(parsed) : token;
4885
+ }
4886
+ /** Every property a surface publishes, set to `inherit`. */
4887
+ function inheritedSurfaceDeclarations(arrangement) {
4888
+ return [
4889
+ "color",
4890
+ ...Object.entries(SURFACE_FOREGROUND_CSS_VARS).filter(([role]) => arrangement || role !== "line" && role !== "mark" && role !== "muted").map(([, variable]) => variable),
4891
+ "--rb-surface-link-hover-decoration",
4892
+ ...Object.keys(contextualButtonSurfaceResetStyles())
4893
+ ].map((property) => `${property}: inherit;`);
4894
+ }
4895
+ //#endregion
4896
+ //#region ../theme-core/src/surfaces/mapDrawingTokens.ts
4897
+ /**
4898
+ * The one map token contract (issue 1611). Drawings carry semantic classes only;
4899
+ * these variables are the only colours a map receives. Each value is resolved
4900
+ * from the section ground the map sits on, so the same geometry reads on light,
4901
+ * brand and dark grounds without regeneration.
4902
+ */
4903
+ const MAP_DRAWING_COLOUR_VARS = {
4904
+ land: "--map-land",
4905
+ water: "--map-water",
4906
+ park: "--map-park",
4907
+ building: "--map-building",
4908
+ buildingEdge: "--map-building-edge",
4909
+ road: "--map-road",
4910
+ roadCasing: "--map-road-casing",
4911
+ roadMajor: "--map-road-major",
4912
+ roadMajorCasing: "--map-road-major-casing",
4913
+ path: "--map-path",
4914
+ label: "--map-label",
4915
+ labelHalo: "--map-label-halo",
4916
+ pin: "--map-pin",
4917
+ pinEdge: "--map-pin-edge",
4918
+ frame: "--map-frame-color"
4919
+ };
4920
+ const MAP_DRAWING_SHAPE_VARS = {
4921
+ frameRadius: "--map-frame-radius",
4922
+ frameWidth: "--map-frame-width",
4923
+ frameShadow: "--map-frame-shadow",
4924
+ labelFont: "--map-label-font",
4925
+ labelWeight: "--map-label-weight",
4926
+ casingScale: "--map-casing-scale"
4927
+ };
4928
+ const defaultMapDrawingTreatment = {
4929
+ land: .035,
4930
+ water: {
4931
+ roles: [
4932
+ "primary",
4933
+ "accent",
4934
+ "secondary"
4935
+ ],
4936
+ amount: .2
4937
+ },
4938
+ park: {
4939
+ roles: [
4940
+ "success",
4941
+ "secondary",
4942
+ "primary"
4943
+ ],
4944
+ amount: .16
4945
+ },
4946
+ building: .09,
4947
+ buildingEdge: .17,
4948
+ roadLift: .7,
4949
+ casingSink: .2,
4950
+ majorRoad: {
4951
+ roles: ["accent", "primary"],
4952
+ amount: .16
4953
+ },
4954
+ path: .42,
4955
+ labelContrast: 6,
4956
+ pin: [
4957
+ "primary",
4958
+ "accent",
4959
+ "secondary"
4960
+ ],
4961
+ frame: {
4962
+ radius: "var(--rb-block-radius, 8px)",
4963
+ width: "1px",
4964
+ shadow: "none",
4965
+ colour: .16
4966
+ },
4967
+ labelWeight: 500,
4968
+ casingScale: 1
4969
+ };
4970
+ /** Per arrangement style (keyed by its skin). Legacy themes without a skin use the default. */
4971
+ const mapDrawingTreatments = {
4972
+ fulcrum: {
4973
+ ...defaultMapDrawingTreatment,
4974
+ land: .025,
4975
+ water: {
4976
+ roles: ["primary", "secondary"],
4977
+ amount: .2
4978
+ },
4979
+ park: {
4980
+ roles: ["success", "primary"],
4981
+ amount: .12
4982
+ },
4983
+ building: .07,
4984
+ buildingEdge: .14,
4985
+ casingSink: .16,
4986
+ majorRoad: {
4987
+ roles: ["accent"],
4988
+ amount: .12
4989
+ },
4990
+ pin: ["accent", "primary"],
4991
+ frame: {
4992
+ radius: "var(--rb-skin-radius, 3px)",
4993
+ width: "var(--rb-skin-rule, 1px)",
4994
+ shadow: "none",
4995
+ colour: .16
4996
+ }
4997
+ },
4998
+ poster: {
4999
+ ...defaultMapDrawingTreatment,
5000
+ land: 0,
5001
+ water: {
5002
+ roles: ["primary", "secondary"],
5003
+ amount: .32
5004
+ },
5005
+ park: {
5006
+ roles: ["success", "accent"],
5007
+ amount: .26
5008
+ },
5009
+ building: .12,
5010
+ buildingEdge: .3,
5011
+ roadLift: 1,
5012
+ casingSink: .55,
5013
+ majorRoad: {
5014
+ roles: ["accent", "primary"],
5015
+ amount: .55
5016
+ },
5017
+ path: .7,
5018
+ labelContrast: 9,
5019
+ pin: ["primary", "accent"],
5020
+ frame: {
5021
+ radius: "var(--rb-skin-radius, 0px)",
5022
+ width: "var(--rb-skin-rule, 3px)",
5023
+ shadow: "offset",
5024
+ colour: 1
5025
+ },
5026
+ labelWeight: 600,
5027
+ casingScale: 1.15
5028
+ },
5029
+ lantern: {
5030
+ ...defaultMapDrawingTreatment,
5031
+ land: .04,
5032
+ water: {
5033
+ roles: ["secondary", "primary"],
5034
+ amount: .22
5035
+ },
5036
+ park: {
5037
+ roles: ["success", "secondary"],
5038
+ amount: .14
5039
+ },
5040
+ building: .08,
5041
+ buildingEdge: .14,
5042
+ casingSink: .35,
5043
+ majorRoad: {
5044
+ roles: ["accent", "primary"],
5045
+ amount: .24
5046
+ },
5047
+ path: .4,
5048
+ pin: ["accent", "primary"],
5049
+ frame: {
5050
+ radius: "var(--rb-skin-radius, 10px)",
5051
+ width: "var(--rb-skin-rule, 1px)",
5052
+ shadow: "none",
5053
+ colour: .18
5054
+ }
5055
+ },
5056
+ measure: {
5057
+ ...defaultMapDrawingTreatment,
5058
+ land: .03,
5059
+ water: {
5060
+ roles: ["accent", "primary"],
5061
+ amount: .16
5062
+ },
5063
+ park: {
5064
+ roles: ["success"],
5065
+ amount: .12
5066
+ },
5067
+ building: .1,
5068
+ buildingEdge: .2,
5069
+ casingSink: .26,
5070
+ majorRoad: {
5071
+ roles: ["accent"],
5072
+ amount: 0
5073
+ },
5074
+ path: .5,
5075
+ pin: ["accent", "primary"],
5076
+ frame: {
5077
+ radius: "var(--rb-skin-radius, 0px)",
5078
+ width: "var(--rb-skin-rule, 2px)",
5079
+ shadow: "none",
5080
+ colour: .6
5081
+ },
5082
+ labelWeight: 600
5083
+ },
5084
+ folio: {
5085
+ ...defaultMapDrawingTreatment,
5086
+ land: .03,
5087
+ water: {
5088
+ roles: ["secondary", "primary"],
5089
+ amount: .18
5090
+ },
5091
+ park: {
5092
+ roles: ["success", "primary"],
5093
+ amount: .18
5094
+ },
5095
+ building: .08,
5096
+ buildingEdge: .15,
5097
+ casingSink: .18,
5098
+ majorRoad: {
5099
+ roles: ["accent"],
5100
+ amount: .14
5101
+ },
5102
+ pin: ["primary", "accent"],
5103
+ frame: {
5104
+ radius: "var(--rb-skin-radius, 10px)",
5105
+ width: "var(--rb-skin-rule, 1px)",
5106
+ shadow: "none",
5107
+ colour: .18
5108
+ }
5109
+ }
5110
+ };
5111
+ function mapDrawingTreatmentFor(skin) {
5112
+ return (skin === void 0 ? void 0 : mapDrawingTreatments[skin]) ?? defaultMapDrawingTreatment;
5113
+ }
5114
+ const toLab = (hex) => {
5115
+ const { r, g, b } = hexToRgb(hex);
5116
+ return srgbToOklab(r, g, b);
5117
+ };
5118
+ const toHex = ({ L, a, b }) => {
5119
+ const rgb = oklabToSrgb(L, a, b);
5120
+ return rgbToHex(rgb.r, rgb.g, rgb.b);
5121
+ };
5122
+ const blend = (from, to, t) => ({
5123
+ L: from.L + (to.L - from.L) * t,
5124
+ a: from.a + (to.a - from.a) * t,
5125
+ b: from.b + (to.b - from.b) * t
5126
+ });
5127
+ const distance = (x, y) => Math.hypot(x.L - y.L, x.a - y.a, x.b - y.b);
5128
+ /** A nearly neutral pole in the ground's hue, so lifts and sinks stay in the site's temperature. */
5129
+ function pole(ground, L) {
5130
+ const { C, h } = oklabToOklch(ground.L, ground.a, ground.b);
5131
+ return toLab(oklchToHexGamut(L, Math.min(C, .012), h));
5132
+ }
5133
+ /** The first blend from `from` toward `to` that reaches the contrast floor against every backdrop. */
5134
+ function firstContrastBlend(from, to, backdrops, floor) {
5135
+ return Array.from({ length: 41 }, (_, index) => toHex(blend(from, to, index / 40))).find((hex) => backdrops.every((backdrop) => contrastRatio(hex, backdrop) >= floor)) ?? toHex(to);
5136
+ }
5137
+ /** A tint must stand apart from what it is drawn on (a brand river on a brand band would vanish); else a step toward the ink. */
5138
+ function tint(base, spec, palette, ink) {
5139
+ return spec.roles.flatMap((role) => {
5140
+ const hex = resolveConcreteColorHex(role, palette);
5141
+ return hex ? [blend(base, toLab(hex), spec.amount)] : [];
5142
+ }).find((candidate) => distance(candidate, base) >= .025) ?? blend(base, ink, Math.max(spec.amount * .6, .06));
5143
+ }
5144
+ /** Pure: one ground, one ink, one palette and one treatment decide every map colour. */
5145
+ function resolveMapDrawingColours(input) {
5146
+ const { treatment: t, palette } = input;
5147
+ const ground = toLab(input.ground);
5148
+ const ink = toLab(input.ink);
5149
+ const darkGround = ink.L > ground.L;
5150
+ const light = darkGround ? blend(ground, ink, .22) : pole(ground, Math.max(ground.L, .995));
5151
+ const dark = darkGround ? pole(ground, Math.max(ground.L - .22, .04)) : ink;
5152
+ const tinted = blend(ground, ink, t.land);
5153
+ const land = contrastRatio(toHex(tinted), input.ink) >= 4.5 ? tinted : ground;
5154
+ const landHex = toHex(land);
5155
+ const road = blend(land, light, t.roadLift);
5156
+ const casing = blend(land, dark, t.casingSink);
5157
+ const building = blend(land, ink, t.building);
5158
+ const majorTint = t.majorRoad.amount === 0 ? road : tint(road, t.majorRoad, palette, ink);
5159
+ const pinBackdrops = [
5160
+ landHex,
5161
+ toHex(road),
5162
+ toHex(building)
5163
+ ];
5164
+ const pinRoles = t.pin.flatMap((role) => {
5165
+ const hex = resolveConcreteColorHex(role, palette);
5166
+ return hex ? [hex] : [];
5167
+ });
5168
+ const pin = [...pinRoles, input.ink].find((hex) => pinBackdrops.every((backdrop) => contrastRatio(hex, backdrop) >= 3)) ?? firstContrastBlend(toLab(pinRoles[0] ?? input.ink), ink, pinBackdrops, 3);
5169
+ const pinEdge = [
5170
+ toHex(light),
5171
+ toHex(dark),
5172
+ landHex
5173
+ ].reduce((best, hex) => contrastRatio(hex, pin) > contrastRatio(best, pin) ? hex : best);
5174
+ return {
5175
+ land: landHex,
5176
+ water: toHex(tint(land, t.water, palette, ink)),
5177
+ park: toHex(tint(land, t.park, palette, ink)),
5178
+ building: toHex(building),
5179
+ buildingEdge: toHex(blend(land, ink, t.buildingEdge)),
5180
+ road: toHex(road),
5181
+ roadCasing: toHex(casing),
5182
+ roadMajor: toHex(majorTint),
5183
+ roadMajorCasing: toHex(blend(casing, dark, .15)),
5184
+ path: toHex(blend(land, ink, t.path)),
5185
+ label: firstContrastBlend(land, ink, [landHex], Math.max(4.5, t.labelContrast)),
5186
+ labelHalo: landHex,
5187
+ pin,
5188
+ pinEdge,
5189
+ frame: toHex(blend(ground, ink, t.frame.colour))
5190
+ };
5191
+ }
5192
+ function mapDrawingShapeStyle(treatment) {
5193
+ return {
5194
+ [MAP_DRAWING_SHAPE_VARS.frameRadius]: treatment.frame.radius,
5195
+ [MAP_DRAWING_SHAPE_VARS.frameWidth]: treatment.frame.width,
5196
+ [MAP_DRAWING_SHAPE_VARS.frameShadow]: treatment.frame.shadow === "offset" ? `var(--rb-skin-shadow-offset, 6px) var(--rb-skin-shadow-offset, 6px) 0 var(${MAP_DRAWING_COLOUR_VARS.frame})` : "none",
5197
+ [MAP_DRAWING_SHAPE_VARS.labelFont]: "var(--font-body, system-ui, sans-serif)",
5198
+ [MAP_DRAWING_SHAPE_VARS.labelWeight]: String(treatment.labelWeight),
5199
+ [MAP_DRAWING_SHAPE_VARS.casingScale]: String(treatment.casingScale)
5200
+ };
5201
+ }
5202
+ /**
5203
+ * Everything a map needs from the section it sits on. Unmeasured grounds
5204
+ * (photos, gradients) keep the structural fallbacks for colour; the style's
5205
+ * shape still applies.
5206
+ */
5207
+ function mapDrawingStyle(input) {
5208
+ const treatment = mapDrawingTreatmentFor(input.skin);
5209
+ const shape = mapDrawingShapeStyle(treatment);
5210
+ if (input.foreground.kind !== "known" || input.foreground.provenance.kind !== "measured") return shape;
5211
+ const ink = resolveConcreteColorHex(input.foreground.roles.text, input.palette);
5212
+ if (ink === null) return shape;
5213
+ const colours = resolveMapDrawingColours({
5214
+ ground: input.foreground.provenance.backdropHex,
5215
+ ink,
5216
+ palette: input.palette,
5217
+ treatment
5218
+ });
5219
+ return {
5220
+ ...shape,
5221
+ ...Object.fromEntries(Object.entries(colours).map(([role, value]) => [MAP_DRAWING_COLOUR_VARS[role], value]))
5222
+ };
5223
+ }
5224
+ //#endregion
5225
+ //#region ../theme-core/src/site-styles/types.ts
5226
+ /**
5227
+ * Defines a literal-preserving catalog while rejecting top-level extra keys on
5228
+ * each entry: `defineExactCatalog<Entry>()([{ ... }])`.
5229
+ */
5230
+ function defineExactCatalog() {
5231
+ return (entries) => entries;
5232
+ }
5233
+ function asDesignBlockId(value) {
5234
+ return brandNonEmptyString(value, "DesignBlockId");
5235
+ }
5236
+ function asDesignPageId(value) {
5237
+ return brandNonEmptyString(value, "DesignPageId");
5238
+ }
5239
+ function asDesignEntryId(value) {
5240
+ return brandNonEmptyString(value, "DesignEntryId");
5241
+ }
5242
+ function asBlockContentVersionId(value) {
5243
+ return brandNonEmptyString(value, "BlockContentVersionId");
5244
+ }
5245
+ function asDesignBoundaryId(value) {
5246
+ const boundaryId = brandNonEmptyString(value, "DesignBoundaryId");
5247
+ if (!boundaryId.startsWith("boundary:")) throw new Error(`DesignBoundaryId must start with "boundary:". Received: ${value}`);
5248
+ return boundaryId;
5249
+ }
5250
+ function asBlockOrderIndex(value) {
4660
5251
  if (!Number.isInteger(value) || value < 0) throw new Error(`BlockOrderIndex must be a non-negative integer. Received: ${String(value)}`);
4661
5252
  return value;
4662
5253
  }
@@ -4692,7 +5283,7 @@ function requireNonEmptyReadonlyArray(values, message = "Expected a non-empty ar
4692
5283
  function makeBoundaryId(previousBlockId, nextBlockId) {
4693
5284
  return asDesignBoundaryId(`boundary:${encodeURIComponent(previousBlockId)}:${encodeURIComponent(nextBlockId)}`);
4694
5285
  }
4695
- function assertNever$1(value, message = "Unhandled Theme V2 variant") {
5286
+ function assertNever(value, message = "Unhandled Theme V2 variant") {
4696
5287
  throw new Error(`${message}: ${String(value)}`);
4697
5288
  }
4698
5289
  function brandNonEmptyString(value, label) {
@@ -14687,1915 +15278,4 @@ z.object({
14687
15278
  themes: z.array(themeSchema).length(3)
14688
15279
  });
14689
15280
  //#endregion
14690
- //#region ../commerce/src/utils/assertNever.ts
14691
- function assertNever(value, message) {
14692
- if (message) throw new Error(message);
14693
- throw new Error(`Unexpected value: ${String(value)}`);
14694
- }
14695
- //#endregion
14696
- //#region ../commerce/src/purchase/bookingInstalmentSchedule.ts
14697
- function resolveBookingInitialInstalmentAmountCents(input) {
14698
- const totalAmountCents = Math.max(0, input.totalAmountCents);
14699
- switch (input.plan.kind) {
14700
- case "deposit_plus_one_remainder":
14701
- case "deposit_plus_scheduled_instalments": return clampConfiguredAmount(input.plan.depositAmountCents, totalAmountCents);
14702
- case "equal_scheduled_instalments": return splitAmountWithRemainderInFirst(totalAmountCents, input.plan.instalmentCount)[0] ?? 0;
14703
- default: return assertNever(input.plan);
14704
- }
14705
- }
14706
- function buildBookingInstalmentSchedule(input) {
14707
- const totalAmountCents = Math.max(0, input.totalAmountCents);
14708
- switch (input.plan.kind) {
14709
- case "deposit_plus_one_remainder": {
14710
- const depositAmountCents = resolveBookingInitialInstalmentAmountCents(input);
14711
- const remainderAmountCents = Math.max(0, totalAmountCents - depositAmountCents);
14712
- return omitZeroAmountFutureRows([createScheduleRow({
14713
- sequence: 1,
14714
- stateAtBooking: "paid_today",
14715
- dueAt: input.anchorAt,
14716
- amountCents: depositAmountCents
14717
- }), createScheduleRow({
14718
- sequence: 2,
14719
- stateAtBooking: "scheduled",
14720
- dueAt: addIntervalPreservingMonthAnchor(input.anchorAt, input.plan.remainderDueCount, input.plan.intervalUnit),
14721
- amountCents: remainderAmountCents
14722
- })]);
14723
- }
14724
- case "deposit_plus_scheduled_instalments": {
14725
- const plan = input.plan;
14726
- const depositAmountCents = resolveBookingInitialInstalmentAmountCents(input);
14727
- const instalmentAmounts = splitAmountWithRemainderInFirst(Math.max(0, totalAmountCents - depositAmountCents), plan.instalmentCount);
14728
- return omitZeroAmountFutureRows([createScheduleRow({
14729
- sequence: 1,
14730
- stateAtBooking: "paid_today",
14731
- dueAt: input.anchorAt,
14732
- amountCents: depositAmountCents
14733
- }), ...instalmentAmounts.map((amountCents, index) => createScheduleRow({
14734
- sequence: index + 2,
14735
- stateAtBooking: "scheduled",
14736
- dueAt: addIntervalPreservingMonthAnchor(input.anchorAt, plan.intervalCount * (index + 1), plan.intervalUnit),
14737
- amountCents
14738
- }))]);
14739
- }
14740
- case "equal_scheduled_instalments": {
14741
- const plan = input.plan;
14742
- return omitZeroAmountFutureRows(splitAmountWithRemainderInFirst(totalAmountCents, plan.instalmentCount).map((amountCents, index) => createScheduleRow({
14743
- sequence: index + 1,
14744
- stateAtBooking: index === 0 ? "paid_today" : "scheduled",
14745
- dueAt: index === 0 ? input.anchorAt : addIntervalPreservingMonthAnchor(input.anchorAt, plan.intervalCount * index, plan.intervalUnit),
14746
- amountCents
14747
- })));
14748
- }
14749
- default: return assertNever(input.plan);
14750
- }
14751
- }
14752
- function createScheduleRow(input) {
14753
- return {
14754
- id: `payment-${input.sequence}`,
14755
- sequence: input.sequence,
14756
- stateAtBooking: input.stateAtBooking,
14757
- dueAt: input.dueAt,
14758
- amountCents: input.amountCents
14759
- };
14760
- }
14761
- /** Resolve real rows first: zero future payments do not extend the deadline. */
14762
- function canInstalmentPlanCompleteBefore(input) {
14763
- const deadline = Date.parse(input.deadline);
14764
- if (!Number.isFinite(Date.parse(input.now)) || !Number.isFinite(deadline)) return false;
14765
- return input.schedule.every((row) => Date.parse(row.dueAt) < deadline);
14766
- }
14767
- /** Later obligations are identified by their state, never their position. */
14768
- function getBookingLaterInstalments(schedule) {
14769
- return schedule.filter((row) => row.stateAtBooking === "scheduled");
14770
- }
14771
- //#endregion
14772
- //#region ../commerce/src/purchase/bookingPaymentSelection.ts
14773
- /** Identity is decided against the authoritative quote, before display repricing. */
14774
- function resolveAvailableBookingCollectionOptions(input) {
14775
- const configured = input.paymentTerms.allowedOptions;
14776
- if (!validateBookingPaymentOptionKinds(configured.map((option) => option.kind)).ok) return [];
14777
- const available = configured.filter((option) => option.kind !== "instalment_plan" || Number.isFinite(Date.parse(input.now))).map((option) => resolveBookingCollectionOptionFacts({
14778
- option,
14779
- totalCents: input.totalCents,
14780
- anchorAt: input.now,
14781
- bookingStartAt: input.bookingStartAt
14782
- })).filter((option) => option.kind !== "instalment_plan" || input.bookingStartAt !== null && canInstalmentPlanCompleteBefore({
14783
- now: input.now,
14784
- deadline: input.bookingStartAt,
14785
- schedule: option.schedule
14786
- }));
14787
- const upfront = resolveBookingCollectionOptionFacts({
14788
- option: { kind: "upfront" },
14789
- totalCents: input.totalCents,
14790
- anchorAt: input.now,
14791
- bookingStartAt: input.bookingStartAt
14792
- });
14793
- const collapsed = available.map((option) => isBookingCollectionEquivalentToUpfront(option) ? upfront : option);
14794
- const unique = collapsed.filter((option, index) => collapsed.findIndex((other) => other.kind === option.kind) === index);
14795
- return unique.length > 0 ? unique : [upfront];
14796
- }
14797
- function isBookingCollectionEquivalentToUpfront(option) {
14798
- switch (option.kind) {
14799
- case "upfront": return true;
14800
- case "deferred_manual": return false;
14801
- case "flexible_balance": return option.config.depositRefundability === "refundable" && option.dueNowCents === option.totalCents;
14802
- case "instalment_plan": return option.depositRefundability !== "non_refundable" && option.schedule.length === 1;
14803
- default: return assertNever(option);
14804
- }
14805
- }
14806
- function resolveBookingCollectionOptionFacts(input) {
14807
- const money = {
14808
- totalCents: input.totalCents,
14809
- anchorAt: input.anchorAt,
14810
- bookingStartAt: input.bookingStartAt
14811
- };
14812
- switch (input.option.kind) {
14813
- case "upfront": return {
14814
- ...money,
14815
- kind: "upfront",
14816
- dueNowCents: input.totalCents
14817
- };
14818
- case "deferred_manual": return {
14819
- ...money,
14820
- kind: "deferred_manual",
14821
- dueNowCents: 0
14822
- };
14823
- case "instalment_plan": {
14824
- const schedule = buildBookingInstalmentSchedule({
14825
- anchorAt: input.anchorAt,
14826
- totalAmountCents: input.totalCents,
14827
- plan: input.option.plan
14828
- });
14829
- return {
14830
- ...money,
14831
- kind: "instalment_plan",
14832
- plan: input.option.plan,
14833
- schedule,
14834
- dueNowCents: schedule[0]?.amountCents ?? 0,
14835
- depositRefundability: getBookingInstalmentDepositRefundability(input.option.plan)
14836
- };
14837
- }
14838
- case "flexible_balance": {
14839
- const dueNowCents = resolveFlexibleBalanceInitialPaymentCents({
14840
- totalAmountCents: input.totalCents,
14841
- config: input.option.config
14842
- });
14843
- return {
14844
- ...money,
14845
- kind: "flexible_balance",
14846
- config: input.option.config,
14847
- dueNowCents,
14848
- remainingBalanceCents: Math.max(0, input.totalCents - dueNowCents),
14849
- balanceDueAt: resolveFlexibleBalanceDueAt({
14850
- bookingStartAt: input.bookingStartAt ?? input.anchorAt,
14851
- dueDateRule: input.option.config.dueDateRule
14852
- })
14853
- };
14854
- }
14855
- default: return assertNever(input.option);
14856
- }
14857
- }
14858
- /** Discounts change preview money, never an already admitted collection identity. */
14859
- function repriceBookingCollectionOptions(input) {
14860
- return input.options.map((option) => option.totalCents === input.totalCents ? option : resolveBookingCollectionOptionFacts({
14861
- option,
14862
- totalCents: input.totalCents,
14863
- anchorAt: option.anchorAt,
14864
- bookingStartAt: option.bookingStartAt
14865
- }));
14866
- }
14867
- //#endregion
14868
- //#region ../commerce/src/purchase/checkoutPaymentFlow.ts
14869
- function planCheckoutPaymentFlow(options) {
14870
- const amountDueCents = toNonNegativeCents(options.amountDueCents);
14871
- const discountCents = toNonNegativeCents(options.discountCents);
14872
- const availableCreditCents = toNonNegativeCents(options.availableCreditCents);
14873
- const minimumStripeChargeCents = toNonNegativeCents(options.minimumStripeChargeCents ?? 0);
14874
- if (amountDueCents <= 0) return {
14875
- kind: "bypass",
14876
- bypassReason: discountCents > 0 ? "discount_free" : "free",
14877
- reserveCreditCents: 0
14878
- };
14879
- if (!options.creditCurrencyMatches || availableCreditCents <= 0) return {
14880
- kind: "stripe",
14881
- reserveCreditCents: toNonNegativeCents(0)
14882
- };
14883
- if (availableCreditCents >= amountDueCents) return {
14884
- kind: "store_credit_only",
14885
- reserveCreditCents: amountDueCents
14886
- };
14887
- return {
14888
- kind: "stripe",
14889
- reserveCreditCents: planMixedPaymentCreditReservation({
14890
- amountDueCents,
14891
- availableCreditCents,
14892
- minimumStripeChargeCents
14893
- })
14894
- };
14895
- }
14896
- function planMixedPaymentCreditReservation(input) {
14897
- const chargeAfterFullCredit = input.amountDueCents - input.availableCreditCents;
14898
- if (input.minimumStripeChargeCents <= 0 || chargeAfterFullCredit <= 0 || chargeAfterFullCredit >= input.minimumStripeChargeCents) return input.availableCreditCents;
14899
- if (input.amountDueCents < input.minimumStripeChargeCents) return toNonNegativeCents(0);
14900
- return toNonNegativeCents(input.amountDueCents - input.minimumStripeChargeCents);
14901
- }
14902
- /**
14903
- * Apply site credit to a flexible-balance booking before card payment.
14904
- *
14905
- * Credit first reduces the configured payment due now. Once that payment is
14906
- * covered, any remaining credit reduces the later balance. If a partial credit
14907
- * application would leave a positive card charge below Stripe's minimum, less
14908
- * credit is used so the configured payment can still be collected.
14909
- */
14910
- function planFlexibleBalanceCreditFirst(input) {
14911
- const totalCents = toNonNegativeCents(input.totalAfterDiscountCents);
14912
- const configuredDueNowCents = toNonNegativeCents(Math.min(input.configuredPaymentDueNowCents, totalCents));
14913
- const availableCreditCents = toNonNegativeCents(input.creditCurrencyMatches ? input.availableCreditCents : 0);
14914
- const minimumStripeChargeCents = toNonNegativeCents(input.minimumStripeChargeCents ?? 0);
14915
- if (availableCreditCents >= totalCents && totalCents > 0) return {
14916
- kind: "credit_only",
14917
- reserveCreditCents: totalCents,
14918
- cardDueNowCents: toNonNegativeCents(0),
14919
- laterBalanceCents: toNonNegativeCents(0)
14920
- };
14921
- let reserveCreditCents = toNonNegativeCents(Math.min(availableCreditCents, totalCents));
14922
- if (reserveCreditCents >= configuredDueNowCents) return {
14923
- kind: "flexible_balance",
14924
- reserveCreditCents,
14925
- cardDueNowCents: toNonNegativeCents(0),
14926
- laterBalanceCents: toNonNegativeCents(totalCents - reserveCreditCents)
14927
- };
14928
- const plannedCardDueNowCents = toNonNegativeCents(configuredDueNowCents - reserveCreditCents);
14929
- if (plannedCardDueNowCents > 0 && plannedCardDueNowCents < minimumStripeChargeCents) {
14930
- if (configuredDueNowCents < minimumStripeChargeCents) return {
14931
- kind: "card_below_minimum",
14932
- reserveCreditCents: toNonNegativeCents(0),
14933
- cardDueNowCents: configuredDueNowCents,
14934
- laterBalanceCents: toNonNegativeCents(totalCents - configuredDueNowCents)
14935
- };
14936
- reserveCreditCents = toNonNegativeCents(configuredDueNowCents - minimumStripeChargeCents);
14937
- }
14938
- const cardDueNowCents = toNonNegativeCents(configuredDueNowCents - reserveCreditCents);
14939
- return {
14940
- kind: "flexible_balance",
14941
- reserveCreditCents,
14942
- cardDueNowCents,
14943
- laterBalanceCents: toNonNegativeCents(totalCents - reserveCreditCents - cardDueNowCents)
14944
- };
14945
- }
14946
- //#endregion
14947
- //#region ../commerce/src/purchase/settlement.ts
14948
- function normalizeCurrencyCode(raw) {
14949
- const normalized = raw.trim().toUpperCase();
14950
- if (!/^[A-Z]{3}$/.test(normalized)) throw new Error(`Invalid currency code: ${raw}`);
14951
- return normalized;
14952
- }
14953
- //#endregion
14954
- //#region ../commerce/src/purchase/checkoutSessionMetadata.ts
14955
- const datedOfferingSharedEngineMetadataShape = {
14956
- datedOfferingEngineContractVersion: z.literal("shared_v1"),
14957
- datedOfferingEngineRouteKind: z.literal("shared_whole_series_registration"),
14958
- datedOfferingCapacityHoldId: z.string().uuid(),
14959
- datedOfferingCapacityHoldAuditRef: z.string().uuid(),
14960
- customerId: z.string().uuid(),
14961
- eventSeriesId: z.string().uuid()
14962
- };
14963
- z.object(datedOfferingSharedEngineMetadataShape);
14964
- const orderCheckoutSessionMetadataBaseShape = {
14965
- type: z.literal("order"),
14966
- site_id: z.string().uuid(),
14967
- order_id: z.string().uuid().optional(),
14968
- customer_email: z.string().email().optional(),
14969
- customer_name: z.string().optional(),
14970
- product_id: z.string().uuid().optional(),
14971
- attendee_id: z.string().uuid().optional(),
14972
- occurrence_id: z.string().uuid().optional(),
14973
- tickets_count: z.string().optional(),
14974
- notes: z.string().optional(),
14975
- discount_redemption_id: z.string().uuid().optional(),
14976
- discount_code_id: z.string().uuid().optional(),
14977
- discount_code: z.string().optional(),
14978
- discount_public_label: z.string().optional(),
14979
- credit_reservation_id: z.string().uuid().optional(),
14980
- credit_reserved_cents: z.string().optional(),
14981
- discount_code_amount_cents: z.string().optional(),
14982
- order_payment_reason: z.enum([
14983
- "instalment_payoff",
14984
- "flexible_balance_initial",
14985
- "flexible_balance_paydown"
14986
- ]).optional(),
14987
- order_payment_plan_id: z.string().uuid().optional(),
14988
- order_flexible_balance_contract_id: z.string().uuid().optional()
14989
- };
14990
- const absentDatedOfferingSharedEngineMetadataShape = {
14991
- datedOfferingEngineContractVersion: z.never().optional(),
14992
- datedOfferingEngineRouteKind: z.never().optional(),
14993
- datedOfferingCapacityHoldId: z.never().optional(),
14994
- datedOfferingCapacityHoldAuditRef: z.never().optional(),
14995
- customerId: z.never().optional(),
14996
- eventSeriesId: z.never().optional()
14997
- };
14998
- const LegacyOrderCheckoutSessionMetadataSchema = z.object({
14999
- ...orderCheckoutSessionMetadataBaseShape,
15000
- ...absentDatedOfferingSharedEngineMetadataShape
15001
- });
15002
- const SharedDatedOfferingOrderCheckoutSessionMetadataSchema = z.object({
15003
- ...orderCheckoutSessionMetadataBaseShape,
15004
- ...datedOfferingSharedEngineMetadataShape
15005
- });
15006
- z.union([SharedDatedOfferingOrderCheckoutSessionMetadataSchema, LegacyOrderCheckoutSessionMetadataSchema]);
15007
- //#endregion
15008
- //#region ../commerce/src/purchase/confirmationPaymentSchema.ts
15009
- const settledBalanceSchema = z.strictObject({ kind: z.literal("settled") });
15010
- const dueBalanceSchema = z.strictObject({
15011
- kind: z.literal("due"),
15012
- amountCents: z.number().int().positive().transform((value, ctx) => {
15013
- const cents = parsePositiveCents(value);
15014
- if (cents.ok) return cents.value;
15015
- ctx.addIssue({
15016
- code: "custom",
15017
- message: "Expected positive whole cents"
15018
- });
15019
- return z.NEVER;
15020
- }),
15021
- dueAt: z.string().nullable()
15022
- });
15023
- const paymentBalanceSchema = z.discriminatedUnion("kind", [settledBalanceSchema, dueBalanceSchema]);
15024
- const currencySchema = z.string().regex(/^[A-Z]{3}$/).transform(normalizeCurrencyCode);
15025
- const moneyFields = {
15026
- amountPaidCents: z.number().int().nonnegative().transform(toNonNegativeCents),
15027
- currency: currencySchema
15028
- };
15029
- const confirmationPaymentSchema = z.discriminatedUnion("kind", [
15030
- z.strictObject({
15031
- kind: z.literal("free"),
15032
- balance: settledBalanceSchema
15033
- }),
15034
- z.strictObject({
15035
- kind: z.literal("waived"),
15036
- balance: settledBalanceSchema
15037
- }),
15038
- z.strictObject({
15039
- kind: z.literal("pass"),
15040
- passName: z.string().nullable(),
15041
- passCreditsUsed: z.number().int().positive().nullable(),
15042
- balance: settledBalanceSchema
15043
- }),
15044
- z.strictObject({
15045
- kind: z.literal("membership"),
15046
- membershipName: z.string().nullable(),
15047
- balance: settledBalanceSchema
15048
- }),
15049
- z.strictObject({
15050
- kind: z.literal("manual_due"),
15051
- currency: currencySchema,
15052
- balance: dueBalanceSchema
15053
- }),
15054
- z.strictObject({
15055
- kind: z.literal("managed_balance_due"),
15056
- ...moneyFields,
15057
- balance: dueBalanceSchema
15058
- }),
15059
- z.strictObject({
15060
- kind: z.literal("monetary"),
15061
- ...moneyFields,
15062
- paymentMethod: z.enum([
15063
- "stripe",
15064
- "store_credit",
15065
- "mixed",
15066
- "manual"
15067
- ]),
15068
- balance: paymentBalanceSchema
15069
- })
15070
- ]);
15071
- toNonNegativeCents(0);
15072
- //#endregion
15073
- //#region ../commerce/src/purchase/stripeCommissionMetadata.ts
15074
- /** Reasons are payment evidence, not an independent pricing policy. */
15075
- const STRIPE_COMMISSION_FREE_REASONS = [
15076
- "managed_billing",
15077
- "no_commission_plan",
15078
- "billing_evidence_invalid",
15079
- "fee_rounds_to_zero",
15080
- "payment_not_stripe"
15081
- ];
15082
- const historicalContext = {
15083
- currency: z.string().refine((value) => parseCurrencyCode(value) !== null).optional(),
15084
- sourcePlanId: z.string().trim().min(1).optional()
15085
- };
15086
- const percentSchema = z.number().finite().min(0).max(100);
15087
- z.discriminatedUnion("kind", [
15088
- z.object({
15089
- kind: z.literal("commission_free"),
15090
- reason: z.enum(STRIPE_COMMISSION_FREE_REASONS),
15091
- ...historicalContext
15092
- }),
15093
- z.object({
15094
- kind: z.literal("application_fee_amount"),
15095
- amountCents: z.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER),
15096
- percent: percentSchema,
15097
- ...historicalContext
15098
- }),
15099
- z.object({
15100
- kind: z.literal("application_fee_percent"),
15101
- percent: percentSchema,
15102
- ...historicalContext
15103
- })
15104
- ]);
15105
- //#endregion
15106
- //#region ../commerce/src/purchase/stripeMinimumCharge.ts
15107
- const STRIPE_MINIMUM_CHARGE_CENTS_BY_CURRENCY = {
15108
- GBP: 30,
15109
- USD: 50,
15110
- EUR: 50,
15111
- AED: 200,
15112
- AUD: 50,
15113
- BGN: 100,
15114
- BRL: 50,
15115
- CAD: 50,
15116
- CHF: 50,
15117
- CZK: 1500,
15118
- DKK: 250,
15119
- HKD: 400,
15120
- HUF: 17500,
15121
- JPY: 50,
15122
- MXN: 1e3,
15123
- MYR: 200,
15124
- NOK: 300,
15125
- NZD: 50,
15126
- PLN: 200,
15127
- RON: 200,
15128
- SEK: 300,
15129
- SGD: 50,
15130
- THB: 1e3
15131
- };
15132
- function isStripeMinimumChargeCurrency(currency) {
15133
- return currency in STRIPE_MINIMUM_CHARGE_CENTS_BY_CURRENCY;
15134
- }
15135
- function getStripeMinimumChargeRequirement(rawCurrency) {
15136
- let currency;
15137
- try {
15138
- currency = normalizeCurrencyCode(rawCurrency);
15139
- } catch {
15140
- return null;
15141
- }
15142
- const currencyKey = currency;
15143
- if (!isStripeMinimumChargeCurrency(currencyKey)) return null;
15144
- return {
15145
- currency,
15146
- minimumAmountCents: STRIPE_MINIMUM_CHARGE_CENTS_BY_CURRENCY[currencyKey]
15147
- };
15148
- }
15149
- //#endregion
15150
- //#region ../commerce/src/purchase/checkoutCopy.ts
15151
- /**
15152
- * Customer copy shared by checkout surfaces, so one approved wording reaches
15153
- * every place that shows it.
15154
- */
15155
- const checkoutCopy = {
15156
- /** A payment is still being confirmed; checking again is safe. */
15157
- checkoutStillConfirming: "We’re still confirming your payment. This can take a minute – you can check again, and you won’t be charged twice.",
15158
- /** A previous attempt can't be confirmed automatically; the business needs to check it. */
15159
- checkoutAssistanceRequired: "We can’t confirm your last payment attempt yet. Please don’t pay again – contact the business so they can check it."
15160
- };
15161
- //#endregion
15162
- //#region ../commerce/src/purchase/event-registration-errors.ts
15163
- const eventRegistrationErrors = {
15164
- registrationClosed: {
15165
- message: "Booking is currently closed for this event. Please contact the organiser if you’d like to find out more.",
15166
- action: "none"
15167
- },
15168
- paymentInvestigationRequired: {
15169
- message: "We still can’t confirm your payment. Please don’t make another payment. Contact the organiser so they can check your booking.",
15170
- action: "none"
15171
- },
15172
- paymentProviderUnavailable: {
15173
- message: "We couldn’t reach the payment provider. Please try again in a minute.",
15174
- action: "retry"
15175
- },
15176
- paymentHostUnavailable: {
15177
- message: "Card payments aren’t available on this web address yet. Please contact the organiser to book.",
15178
- action: "none"
15179
- },
15180
- paymentPageUnavailable: {
15181
- message: "We couldn’t open the payment page. Please refresh this page and try again. If this keeps happening, contact the organiser for help.",
15182
- action: "retry"
15183
- },
15184
- paymentUnavailable: {
15185
- message: "Online payment is not available for this event right now. Please contact the organiser for help with booking.",
15186
- action: "none"
15187
- },
15188
- capacityChanged: {
15189
- message: "Sorry, there aren’t enough places left for your selection. Please check the available places and choose again.",
15190
- action: "places"
15191
- },
15192
- selectionChanged: {
15193
- message: "The booking options for this event have changed. Please check the latest options and choose your places again.",
15194
- action: "places"
15195
- },
15196
- registrationPreparationChanged: {
15197
- message: "The booking options for this event have changed. Please check the latest options and choose your places again.",
15198
- action: "places"
15199
- },
15200
- registrationAlreadyExists: {
15201
- message: "You already have a booking for this event. Please check your bookings to see its status. If you need help, contact the organiser.",
15202
- action: "portal"
15203
- },
15204
- holdExpired: {
15205
- message: "Your reservation has timed out. Please check availability and choose your places again.",
15206
- action: "start"
15207
- },
15208
- waitlistUnavailable: {
15209
- message: "Sorry, the waiting list place offered in this invitation is no longer available. Please check the event for available places or contact the organiser for help.",
15210
- action: "event"
15211
- },
15212
- paymentContextMismatch: {
15213
- message: "The payment options for this event have changed. Please check the latest options before continuing.",
15214
- action: "payment-options"
15215
- },
15216
- verificationFailed: {
15217
- message: "We couldn’t confirm this request came from a person. Please refresh the page and try again.",
15218
- action: "none"
15219
- },
15220
- idempotencyConflict: {
15221
- message: "You’ve already started booking this event. Please finish in the other tab if it’s still open, or check your booking status before starting again.",
15222
- action: "portal"
15223
- },
15224
- invalidCommitInput: {
15225
- message: "We couldn’t accept your booking details. Please check the information you entered and try again. If this keeps happening, contact the organiser for help.",
15226
- action: "details"
15227
- }
15228
- };
15229
- function parseEventRegistrationErrorReason(value) {
15230
- return typeof value === "string" && Object.prototype.hasOwnProperty.call(eventRegistrationErrors, value) ? value : null;
15231
- }
15232
- //#endregion
15233
- //#region ../commerce/src/purchase/checkoutPresentation.ts
15234
- function publishableKeyMode(publishableKey) {
15235
- if (publishableKey.startsWith("pk_live_")) return "live";
15236
- if (publishableKey.startsWith("pk_test_")) return "test";
15237
- return null;
15238
- }
15239
- function checkBrowserStripeKey(publishableKey, livemode) {
15240
- const key = publishableKey?.trim();
15241
- if (!key) return {
15242
- tag: "unavailable",
15243
- reason: "missing_key"
15244
- };
15245
- const mode = publishableKeyMode(key);
15246
- if (mode === null) return {
15247
- tag: "unavailable",
15248
- reason: "invalid_key"
15249
- };
15250
- return mode === (livemode ? "live" : "test") ? {
15251
- tag: "ready",
15252
- publishableKey: key
15253
- } : {
15254
- tag: "unavailable",
15255
- reason: "mode_mismatch"
15256
- };
15257
- }
15258
- //#endregion
15259
- //#region ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
15260
- function r(e) {
15261
- var t, f, n = "";
15262
- if ("string" == typeof e || "number" == typeof e) n += e;
15263
- else if ("object" == typeof e) if (Array.isArray(e)) {
15264
- var o = e.length;
15265
- for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
15266
- } else for (f in e) e[f] && (n && (n += " "), n += f);
15267
- return n;
15268
- }
15269
- function clsx() {
15270
- for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
15271
- return n;
15272
- }
15273
- //#endregion
15274
- //#region ../blocks/src/system/icons/svg.tsx
15275
- function createIcon(displayName, children) {
15276
- const Icon = ({ size = "1em", strokeWidth = 2, title, className, focusable = false, role, ...props }) => /* @__PURE__ */ jsxs("svg", {
15277
- "aria-hidden": title ? void 0 : true,
15278
- className,
15279
- "data-rb-icon": displayName.replace(/Icon$/, ""),
15280
- fill: "none",
15281
- focusable,
15282
- height: size,
15283
- role: title ? role ?? "img" : role,
15284
- stroke: "currentColor",
15285
- strokeLinecap: "round",
15286
- strokeLinejoin: "round",
15287
- strokeWidth,
15288
- viewBox: "0 0 24 24",
15289
- width: size,
15290
- xmlns: "http://www.w3.org/2000/svg",
15291
- ...props,
15292
- children: [title ? /* @__PURE__ */ jsx("title", { children: title }) : null, children]
15293
- });
15294
- Icon.displayName = displayName;
15295
- return Icon;
15296
- }
15297
- const ArrowDownIcon = createIcon("ArrowDownIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M12 5v14" }), /* @__PURE__ */ jsx("path", { d: "m6 13 6 6 6-6" })] }));
15298
- const ArrowLeftIcon = createIcon("ArrowLeftIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M19 12H5" }), /* @__PURE__ */ jsx("path", { d: "m11 6-6 6 6 6" })] }));
15299
- const ArrowRightIcon = createIcon("ArrowRightIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M5 12h14" }), /* @__PURE__ */ jsx("path", { d: "m13 6 6 6-6 6" })] }));
15300
- const AwardIcon = createIcon("AwardIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("circle", {
15301
- cx: "12",
15302
- cy: "8",
15303
- r: "4"
15304
- }), /* @__PURE__ */ jsx("path", { d: "m8.5 12.5-1.5 7 5-3 5 3-1.5-7" })] }));
15305
- const BadgeCheckIcon = createIcon("BadgeCheckIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "m8 3 4-1 4 1 3 3 1 4-1 4-3 3-4 1-4-1-3-3-1-4 1-4Z" }), /* @__PURE__ */ jsx("path", { d: "m8.5 11.5 2.5 2.5 4.5-5" })] }));
15306
- const BookOpenIcon = createIcon("BookOpenIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
15307
- /* @__PURE__ */ jsx("path", { d: "M4 5.5A3 3 0 0 1 7 4h13v15H7a3 3 0 0 0-3 1.5Z" }),
15308
- /* @__PURE__ */ jsx("path", { d: "M4 5.5V20" }),
15309
- /* @__PURE__ */ jsx("path", { d: "M12 4v15" })
15310
- ] }));
15311
- const BrainIcon = createIcon("BrainIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
15312
- /* @__PURE__ */ jsx("path", { d: "M9 4a4 4 0 0 0-4 4 4 4 0 0 0 0 8 4 4 0 0 0 4 4" }),
15313
- /* @__PURE__ */ jsx("path", { d: "M15 4a4 4 0 0 1 4 4 4 4 0 0 1 0 8 4 4 0 0 1-4 4" }),
15314
- /* @__PURE__ */ jsx("path", { d: "M9 4v16" }),
15315
- /* @__PURE__ */ jsx("path", { d: "M15 4v16" }),
15316
- /* @__PURE__ */ jsx("path", { d: "M9 8h6" }),
15317
- /* @__PURE__ */ jsx("path", { d: "M9 14h6" })
15318
- ] }));
15319
- const BriefcaseBusinessIcon = createIcon("BriefcaseBusinessIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
15320
- /* @__PURE__ */ jsx("path", { d: "M9 7V5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2" }),
15321
- /* @__PURE__ */ jsx("rect", {
15322
- x: "3",
15323
- y: "7",
15324
- width: "18",
15325
- height: "13",
15326
- rx: "2"
15327
- }),
15328
- /* @__PURE__ */ jsx("path", { d: "M3 12h18" }),
15329
- /* @__PURE__ */ jsx("path", { d: "M9 12v2" }),
15330
- /* @__PURE__ */ jsx("path", { d: "M15 12v2" })
15331
- ] }));
15332
- const CalendarIcon = createIcon("CalendarIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
15333
- /* @__PURE__ */ jsx("path", { d: "M8 3v4" }),
15334
- /* @__PURE__ */ jsx("path", { d: "M16 3v4" }),
15335
- /* @__PURE__ */ jsx("rect", {
15336
- x: "4",
15337
- y: "5",
15338
- width: "16",
15339
- height: "16",
15340
- rx: "2"
15341
- }),
15342
- /* @__PURE__ */ jsx("path", { d: "M4 10h16" })
15343
- ] }));
15344
- const CalendarDaysIcon = CalendarIcon;
15345
- const CheckIcon = createIcon("CheckIcon", /* @__PURE__ */ jsx("path", { d: "m5 12 4 4L19 6" }));
15346
- const ChevronDownIcon = createIcon("ChevronDownIcon", /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" }));
15347
- const ChevronLeftIcon = createIcon("ChevronLeftIcon", /* @__PURE__ */ jsx("path", { d: "m15 18-6-6 6-6" }));
15348
- const ChevronRightIcon = createIcon("ChevronRightIcon", /* @__PURE__ */ jsx("path", { d: "m9 18 6-6-6-6" }));
15349
- const ChevronUpIcon = createIcon("ChevronUpIcon", /* @__PURE__ */ jsx("path", { d: "m18 15-6-6-6 6" }));
15350
- const CircleMinusIcon = createIcon("CircleMinusIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("circle", {
15351
- cx: "12",
15352
- cy: "12",
15353
- r: "9"
15354
- }), /* @__PURE__ */ jsx("path", { d: "M8 12h8" })] }));
15355
- const CirclePlusIcon = createIcon("CirclePlusIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
15356
- /* @__PURE__ */ jsx("circle", {
15357
- cx: "12",
15358
- cy: "12",
15359
- r: "9"
15360
- }),
15361
- /* @__PURE__ */ jsx("path", { d: "M8 12h8" }),
15362
- /* @__PURE__ */ jsx("path", { d: "M12 8v8" })
15363
- ] }));
15364
- const ClockIcon = createIcon("ClockIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("circle", {
15365
- cx: "12",
15366
- cy: "12",
15367
- r: "9"
15368
- }), /* @__PURE__ */ jsx("path", { d: "M12 7v5l3 2" })] }));
15369
- const CompassIcon = createIcon("CompassIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("circle", {
15370
- cx: "12",
15371
- cy: "12",
15372
- r: "9"
15373
- }), /* @__PURE__ */ jsx("path", { d: "m15 9-2 6-4 2 2-6Z" })] }));
15374
- const DownloadIcon = createIcon("DownloadIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
15375
- /* @__PURE__ */ jsx("path", { d: "M12 3v12" }),
15376
- /* @__PURE__ */ jsx("path", { d: "m7 10 5 5 5-5" }),
15377
- /* @__PURE__ */ jsx("path", { d: "M5 21h14" })
15378
- ] }));
15379
- const ExternalLinkIcon = createIcon("ExternalLinkIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
15380
- /* @__PURE__ */ jsx("path", { d: "M14 4h6v6" }),
15381
- /* @__PURE__ */ jsx("path", { d: "m10 14 10-10" }),
15382
- /* @__PURE__ */ jsx("path", { d: "M20 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h5" })
15383
- ] }));
15384
- const FileArchiveIcon = createIcon("FileArchiveIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
15385
- /* @__PURE__ */ jsx("path", { d: "M14 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7Z" }),
15386
- /* @__PURE__ */ jsx("path", { d: "M14 2v5h5" }),
15387
- /* @__PURE__ */ jsx("path", { d: "M10 7h2" }),
15388
- /* @__PURE__ */ jsx("path", { d: "M10 11h2" }),
15389
- /* @__PURE__ */ jsx("path", { d: "M10 15h4v4h-4Z" })
15390
- ] }));
15391
- const FileAudioIcon = createIcon("FileAudioIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
15392
- /* @__PURE__ */ jsx("path", { d: "M14 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7Z" }),
15393
- /* @__PURE__ */ jsx("path", { d: "M14 2v5h5" }),
15394
- /* @__PURE__ */ jsx("path", { d: "M10 16V10l5-2v6" }),
15395
- /* @__PURE__ */ jsx("circle", {
15396
- cx: "9",
15397
- cy: "17",
15398
- r: "1.5"
15399
- }),
15400
- /* @__PURE__ */ jsx("circle", {
15401
- cx: "15",
15402
- cy: "15",
15403
- r: "1.5"
15404
- })
15405
- ] }));
15406
- const FileSpreadsheetIcon = createIcon("FileSpreadsheetIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
15407
- /* @__PURE__ */ jsx("path", { d: "M14 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7Z" }),
15408
- /* @__PURE__ */ jsx("path", { d: "M14 2v5h5" }),
15409
- /* @__PURE__ */ jsx("path", { d: "M8 12h8" }),
15410
- /* @__PURE__ */ jsx("path", { d: "M8 16h8" }),
15411
- /* @__PURE__ */ jsx("path", { d: "M12 10v8" })
15412
- ] }));
15413
- const FileTextIcon = createIcon("FileTextIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
15414
- /* @__PURE__ */ jsx("path", { d: "M14 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7Z" }),
15415
- /* @__PURE__ */ jsx("path", { d: "M14 2v5h5" }),
15416
- /* @__PURE__ */ jsx("path", { d: "M9 13h6" }),
15417
- /* @__PURE__ */ jsx("path", { d: "M9 17h6" })
15418
- ] }));
15419
- const Flower2Icon = createIcon("Flower2Icon", /* @__PURE__ */ jsxs(Fragment, { children: [
15420
- /* @__PURE__ */ jsx("circle", {
15421
- cx: "12",
15422
- cy: "12",
15423
- r: "2"
15424
- }),
15425
- /* @__PURE__ */ jsx("path", { d: "M12 10C8 4 16 4 12 10Z" }),
15426
- /* @__PURE__ */ jsx("path", { d: "M14 12c6-4 6 4 0 0Z" }),
15427
- /* @__PURE__ */ jsx("path", { d: "M12 14c4 6-4 6 0 0Z" }),
15428
- /* @__PURE__ */ jsx("path", { d: "M10 12c-6 4-6-4 0 0Z" })
15429
- ] }));
15430
- const GlobeIcon = createIcon("GlobeIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
15431
- /* @__PURE__ */ jsx("circle", {
15432
- cx: "12",
15433
- cy: "12",
15434
- r: "9"
15435
- }),
15436
- /* @__PURE__ */ jsx("path", { d: "M3 12h18" }),
15437
- /* @__PURE__ */ jsx("path", { d: "M12 3a14 14 0 0 1 0 18" }),
15438
- /* @__PURE__ */ jsx("path", { d: "M12 3a14 14 0 0 0 0 18" })
15439
- ] }));
15440
- const GraduationCapIcon = createIcon("GraduationCapIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
15441
- /* @__PURE__ */ jsx("path", { d: "m3 8 9-4 9 4-9 4Z" }),
15442
- /* @__PURE__ */ jsx("path", { d: "M7 10v5c3 3 7 3 10 0v-5" }),
15443
- /* @__PURE__ */ jsx("path", { d: "M21 8v6" })
15444
- ] }));
15445
- const HandHeartIcon = createIcon("HandHeartIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
15446
- /* @__PURE__ */ jsx("path", { d: "M3 15h4l4 4h5l5-5" }),
15447
- /* @__PURE__ */ jsx("path", { d: "M7 15l3-3h4a2 2 0 0 1 2 2" }),
15448
- /* @__PURE__ */ jsx("path", { d: "M12 8c-2-2-5 1-2 4l2 2 2-2c3-3 0-6-2-4Z" })
15449
- ] }));
15450
- const HeartIcon = createIcon("HeartIcon", /* @__PURE__ */ jsx("path", { d: "M12 21s-8-5-8-11a5 5 0 0 1 8-4 5 5 0 0 1 8 4c0 6-8 11-8 11Z" }));
15451
- const HeartHandshakeIcon = createIcon("HeartHandshakeIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M12 21s-8-5-8-11a5 5 0 0 1 8-4 5 5 0 0 1 8 4c0 6-8 11-8 11Z" }), /* @__PURE__ */ jsx("path", { d: "m8 12 2 2 2-2 2 2 2-2" })] }));
15452
- const HomeIcon = createIcon("HomeIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
15453
- /* @__PURE__ */ jsx("path", { d: "m3 11 9-8 9 8" }),
15454
- /* @__PURE__ */ jsx("path", { d: "M5 10v10h14V10" }),
15455
- /* @__PURE__ */ jsx("path", { d: "M9 20v-6h6v6" })
15456
- ] }));
15457
- const InfoIcon = createIcon("InfoIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
15458
- /* @__PURE__ */ jsx("circle", {
15459
- cx: "12",
15460
- cy: "12",
15461
- r: "9"
15462
- }),
15463
- /* @__PURE__ */ jsx("path", { d: "M12 11v6" }),
15464
- /* @__PURE__ */ jsx("path", { d: "M12 7h.01" })
15465
- ] }));
15466
- const LeafIcon = createIcon("LeafIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M5 20C5 10 12 4 21 4c0 9-6 16-16 16Z" }), /* @__PURE__ */ jsx("path", { d: "M5 20c4-5 8-8 13-11" })] }));
15467
- const LightbulbIcon = createIcon("LightbulbIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
15468
- /* @__PURE__ */ jsx("path", { d: "M9 18h6" }),
15469
- /* @__PURE__ */ jsx("path", { d: "M10 22h4" }),
15470
- /* @__PURE__ */ jsx("path", { d: "M8 14a6 6 0 1 1 8 0c-1 1-1 2-1 4H9c0-2 0-3-1-4Z" })
15471
- ] }));
15472
- const LockIcon = createIcon("LockIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("rect", {
15473
- x: "5",
15474
- y: "10",
15475
- width: "14",
15476
- height: "10",
15477
- rx: "2"
15478
- }), /* @__PURE__ */ jsx("path", { d: "M8 10V7a4 4 0 0 1 8 0v3" })] }));
15479
- const MailIcon = createIcon("MailIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("rect", {
15480
- x: "3",
15481
- y: "5",
15482
- width: "18",
15483
- height: "14",
15484
- rx: "2"
15485
- }), /* @__PURE__ */ jsx("path", { d: "m3 7 9 6 9-6" })] }));
15486
- const MapPinIcon = createIcon("MapPinIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M12 21s7-5 7-12a7 7 0 0 0-14 0c0 7 7 12 7 12Z" }), /* @__PURE__ */ jsx("circle", {
15487
- cx: "12",
15488
- cy: "9",
15489
- r: "2.5"
15490
- })] }));
15491
- const MessageCircleIcon = createIcon("MessageCircleIcon", /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "M21 11.5a8.5 8.5 0 0 1-12.6 7.4L3 20l1.1-5.3A8.5 8.5 0 1 1 21 11.5Z" }) }));
15492
- const MinusIcon = createIcon("MinusIcon", /* @__PURE__ */ jsx("path", { d: "M5 12h14" }));
15493
- const PackageIcon = createIcon("PackageIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
15494
- /* @__PURE__ */ jsx("path", { d: "m12 3 8 4.5v9L12 21l-8-4.5v-9Z" }),
15495
- /* @__PURE__ */ jsx("path", { d: "M12 12 4 7.5" }),
15496
- /* @__PURE__ */ jsx("path", { d: "m12 12 8-4.5" }),
15497
- /* @__PURE__ */ jsx("path", { d: "M12 12v9" })
15498
- ] }));
15499
- const PhoneIcon = createIcon("PhoneIcon", /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "M22 16.9v3a2 2 0 0 1-2.2 2A19 19 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7l.4 2.5a2 2 0 0 1-.6 1.8L7.7 9.2a13 13 0 0 0 7.1 7.1l1.2-1.2a2 2 0 0 1 1.8-.6l2.5.4a2 2 0 0 1 1.7 2Z" }) }));
15500
- const PlayIcon = createIcon("PlayIcon", /* @__PURE__ */ jsx("path", { d: "m8 5 11 7-11 7Z" }));
15501
- const PlusIcon = createIcon("PlusIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M12 5v14" }), /* @__PURE__ */ jsx("path", { d: "M5 12h14" })] }));
15502
- const ShieldIcon = createIcon("ShieldIcon", /* @__PURE__ */ jsx("path", { d: "M12 22s8-4 8-11V5l-8-3-8 3v6c0 7 8 11 8 11Z" }));
15503
- const ShoppingBagIcon = createIcon("ShoppingBagIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M6 8h12l1 13H5Z" }), /* @__PURE__ */ jsx("path", { d: "M9 8a3 3 0 0 1 6 0" })] }));
15504
- const ShoppingCartIcon = createIcon("ShoppingCartIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
15505
- /* @__PURE__ */ jsx("circle", {
15506
- cx: "9",
15507
- cy: "20",
15508
- r: "1"
15509
- }),
15510
- /* @__PURE__ */ jsx("circle", {
15511
- cx: "18",
15512
- cy: "20",
15513
- r: "1"
15514
- }),
15515
- /* @__PURE__ */ jsx("path", { d: "M2 3h3l3 12h10l3-8H7" })
15516
- ] }));
15517
- const SmileIcon = createIcon("SmileIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
15518
- /* @__PURE__ */ jsx("circle", {
15519
- cx: "12",
15520
- cy: "12",
15521
- r: "9"
15522
- }),
15523
- /* @__PURE__ */ jsx("path", { d: "M8 14s1.5 2 4 2 4-2 4-2" }),
15524
- /* @__PURE__ */ jsx("path", { d: "M9 9h.01" }),
15525
- /* @__PURE__ */ jsx("path", { d: "M15 9h.01" })
15526
- ] }));
15527
- const SparklesIcon = createIcon("SparklesIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "m12 3 2 5 5 2-5 2-2 5-2-5-5-2 5-2Z" }), /* @__PURE__ */ jsx("path", { d: "m19 15 .8 2.2L22 18l-2.2.8L19 21l-.8-2.2L16 18l2.2-.8Z" })] }));
15528
- const SproutIcon = createIcon("SproutIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
15529
- /* @__PURE__ */ jsx("path", { d: "M12 21V10" }),
15530
- /* @__PURE__ */ jsx("path", { d: "M12 10C8 5 4 6 3 10c4 1 7 0 9 0Z" }),
15531
- /* @__PURE__ */ jsx("path", { d: "M12 11c4-5 8-4 9 0-4 1-7 0-9 0Z" })
15532
- ] }));
15533
- const StarIcon = createIcon("StarIcon", /* @__PURE__ */ jsx("path", { d: "m12 3 2.8 5.7 6.2.9-4.5 4.4 1.1 6.2L12 17.2 6.4 20.2 7.5 14 3 9.6l6.2-.9Z" }));
15534
- const TargetIcon = createIcon("TargetIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
15535
- /* @__PURE__ */ jsx("circle", {
15536
- cx: "12",
15537
- cy: "12",
15538
- r: "9"
15539
- }),
15540
- /* @__PURE__ */ jsx("circle", {
15541
- cx: "12",
15542
- cy: "12",
15543
- r: "5"
15544
- }),
15545
- /* @__PURE__ */ jsx("circle", {
15546
- cx: "12",
15547
- cy: "12",
15548
- r: "1"
15549
- })
15550
- ] }));
15551
- const UploadIcon = createIcon("UploadIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
15552
- /* @__PURE__ */ jsx("path", { d: "M12 21V9" }),
15553
- /* @__PURE__ */ jsx("path", { d: "m7 14 5-5 5 5" }),
15554
- /* @__PURE__ */ jsx("path", { d: "M5 3h14" })
15555
- ] }));
15556
- const UserRoundCheckIcon = createIcon("UserRoundCheckIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
15557
- /* @__PURE__ */ jsx("circle", {
15558
- cx: "10",
15559
- cy: "8",
15560
- r: "4"
15561
- }),
15562
- /* @__PURE__ */ jsx("path", { d: "M3 21a7 7 0 0 1 11.5-5.3" }),
15563
- /* @__PURE__ */ jsx("path", { d: "m15 19 2 2 4-5" })
15564
- ] }));
15565
- const UsersIcon = createIcon("UsersIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
15566
- /* @__PURE__ */ jsx("circle", {
15567
- cx: "9",
15568
- cy: "8",
15569
- r: "4"
15570
- }),
15571
- /* @__PURE__ */ jsx("path", { d: "M2 21a7 7 0 0 1 14 0" }),
15572
- /* @__PURE__ */ jsx("path", { d: "M17 11a4 4 0 0 0 0-7" }),
15573
- /* @__PURE__ */ jsx("path", { d: "M22 21a7 7 0 0 0-5-6.7" })
15574
- ] }));
15575
- const WrenchIcon = createIcon("WrenchIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M14.7 6.3A5 5 0 0 0 7 12.6L3.5 16a2.1 2.1 0 0 0 3 3L10 15.5A5 5 0 0 0 16.7 9Z" }), /* @__PURE__ */ jsx("path", { d: "m15 5 4 4" })] }));
15576
- const XIcon = createIcon("XIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M18 6 6 18" }), /* @__PURE__ */ jsx("path", { d: "m6 6 12 12" })] }));
15577
- //#endregion
15578
- //#region ../blocks/src/system/runtime/nodes/spinner.tsx
15579
- function resolveColorStyle(color) {
15580
- switch (color) {
15581
- case void 0: return;
15582
- case "inherit": return { color: "inherit" };
15583
- case "foreground": return { color: "rgb(var(--tb-foreground))" };
15584
- case "text": return { color: "rgb(var(--tb-text))" };
15585
- default: return;
15586
- }
15587
- }
15588
- function SpinnerNode({ className, size = "md", color, strokeWidth = 3, srLabel, style, ...rest }) {
15589
- const hasExplicitAriaLabel = typeof rest["aria-label"] === "string" && rest["aria-label"].trim().length > 0;
15590
- const accessibilityProps = srLabel ? {
15591
- role: "status",
15592
- "aria-live": "polite"
15593
- } : hasExplicitAriaLabel ? {} : { "aria-hidden": true };
15594
- const trackStroke = color === "inherit" ? "currentColor" : "var(--rb-spinner-track-color)";
15595
- const trackOpacity = color === "inherit" ? .25 : 1;
15596
- return /* @__PURE__ */ jsxs("span", {
15597
- ...accessibilityProps,
15598
- className: clsx("rb-spinner", size ? `rb-spinner--${size}` : null, color === "inherit" ? "rb-spinner--inherit" : null, className),
15599
- style: {
15600
- ...resolveColorStyle(color),
15601
- ...style ?? {}
15602
- },
15603
- ...rest,
15604
- children: [/* @__PURE__ */ jsxs("svg", {
15605
- viewBox: "0 0 24 24",
15606
- fill: "none",
15607
- "aria-hidden": "true",
15608
- children: [/* @__PURE__ */ jsx("circle", {
15609
- cx: "12",
15610
- cy: "12",
15611
- r: "10",
15612
- stroke: trackStroke,
15613
- strokeWidth,
15614
- opacity: trackOpacity
15615
- }), /* @__PURE__ */ jsx("path", {
15616
- d: "M12 2a10 10 0 0 1 10 10",
15617
- stroke: "currentColor",
15618
- strokeWidth,
15619
- strokeLinecap: "round"
15620
- })]
15621
- }), srLabel ? /* @__PURE__ */ jsx("span", {
15622
- className: "rb-sr-only",
15623
- children: srLabel
15624
- }) : null]
15625
- });
15626
- }
15627
- //#endregion
15628
- //#region ../blocks/src/system/runtime/nodes/buttonAffordance.ts
15629
- function normalize(value) {
15630
- const trimmed = typeof value === "string" ? value.trim() : "";
15631
- return trimmed.length > 0 ? trimmed : null;
15632
- }
15633
- /**
15634
- * Resolve the node-authored trailing affordance, or `null` when no icon exists.
15635
- */
15636
- function resolveButtonAffordance(input) {
15637
- const nodeIcon = normalize(input.trailingIcon);
15638
- if (nodeIcon) return { iconId: nodeIcon };
15639
- return null;
15640
- }
15641
- //#endregion
15642
- //#region ../blocks/src/system/icons/cta.ts
15643
- /**
15644
- * Curated icon set for CTA/button icons.
15645
- *
15646
- * Guardrail: keep this list small and action-oriented. This is intentionally not the full Lucide set.
15647
- * Extend by adding to CTA_ICON_NAMES and the mapping below (explicit imports only).
15648
- */
15649
- const CTA_ICON_NAMES = [
15650
- "ArrowRight",
15651
- "ArrowLeft",
15652
- "ChevronRight",
15653
- "ChevronLeft",
15654
- "ChevronUp",
15655
- "ChevronDown",
15656
- "ExternalLink",
15657
- "Download",
15658
- "Upload",
15659
- "Mail",
15660
- "Phone",
15661
- "Play",
15662
- "ShoppingCart",
15663
- "Calendar",
15664
- "MapPin",
15665
- "Info",
15666
- "Plus",
15667
- "Minus",
15668
- "Check",
15669
- "X"
15670
- ];
15671
- const CTA_ICON_COMPONENTS = {
15672
- ArrowRight: ArrowRightIcon,
15673
- ArrowLeft: ArrowLeftIcon,
15674
- ChevronRight: ChevronRightIcon,
15675
- ChevronLeft: ChevronLeftIcon,
15676
- ChevronUp: ChevronUpIcon,
15677
- ChevronDown: ChevronDownIcon,
15678
- ExternalLink: ExternalLinkIcon,
15679
- Download: DownloadIcon,
15680
- Upload: UploadIcon,
15681
- Mail: MailIcon,
15682
- Phone: PhoneIcon,
15683
- Play: PlayIcon,
15684
- ShoppingCart: ShoppingCartIcon,
15685
- Calendar: CalendarIcon,
15686
- MapPin: MapPinIcon,
15687
- Info: InfoIcon,
15688
- Plus: PlusIcon,
15689
- Minus: MinusIcon,
15690
- Check: CheckIcon,
15691
- X: XIcon
15692
- };
15693
- function isCtaIconName(value) {
15694
- return typeof value === "string" && CTA_ICON_NAMES.includes(value);
15695
- }
15696
- function formatLucideName(name) {
15697
- return name.replace(/([a-z0-9])([A-Z])/g, "$1 $2");
15698
- }
15699
- const CTA_ICON_OPTIONS = CTA_ICON_NAMES.map((id) => ({
15700
- id,
15701
- label: formatLucideName(id)
15702
- }));
15703
- function getCtaIconComponent(name) {
15704
- if (!isCtaIconName(name)) return null;
15705
- return CTA_ICON_COMPONENTS[name] ?? null;
15706
- }
15707
- //#endregion
15708
- //#region ../blocks/src/system/icons/semantic.ts
15709
- const SEMANTIC_ICON_IDS = [
15710
- "protection-trust",
15711
- "confidentiality",
15712
- "care-support",
15713
- "partnership",
15714
- "warmth",
15715
- "community",
15716
- "personal-guidance",
15717
- "conversation",
15718
- "friendly-welcome",
15719
- "insight-learning",
15720
- "natural-wellbeing",
15721
- "growth",
15722
- "gentle-care",
15723
- "special-touch",
15724
- "ideas",
15725
- "direction",
15726
- "focus",
15727
- "quality",
15728
- "highlight",
15729
- "verified-quality",
15730
- "learning",
15731
- "training",
15732
- "programmes-dates",
15733
- "place",
15734
- "products",
15735
- "packages",
15736
- "time",
15737
- "practical-service",
15738
- "at-home",
15739
- "worldwide",
15740
- "professional-service"
15741
- ];
15742
- const SEMANTIC_ICON_COMPONENTS = {
15743
- "protection-trust": ShieldIcon,
15744
- confidentiality: LockIcon,
15745
- "care-support": HandHeartIcon,
15746
- partnership: HeartHandshakeIcon,
15747
- warmth: HeartIcon,
15748
- community: UsersIcon,
15749
- "personal-guidance": UserRoundCheckIcon,
15750
- conversation: MessageCircleIcon,
15751
- "friendly-welcome": SmileIcon,
15752
- "insight-learning": BrainIcon,
15753
- "natural-wellbeing": LeafIcon,
15754
- growth: SproutIcon,
15755
- "gentle-care": Flower2Icon,
15756
- "special-touch": SparklesIcon,
15757
- ideas: LightbulbIcon,
15758
- direction: CompassIcon,
15759
- focus: TargetIcon,
15760
- quality: AwardIcon,
15761
- highlight: StarIcon,
15762
- "verified-quality": BadgeCheckIcon,
15763
- learning: BookOpenIcon,
15764
- training: GraduationCapIcon,
15765
- "programmes-dates": CalendarDaysIcon,
15766
- place: MapPinIcon,
15767
- products: ShoppingBagIcon,
15768
- packages: PackageIcon,
15769
- time: ClockIcon,
15770
- "practical-service": WrenchIcon,
15771
- "at-home": HomeIcon,
15772
- worldwide: GlobeIcon,
15773
- "professional-service": BriefcaseBusinessIcon
15774
- };
15775
- const featurePreset = ["feature"];
15776
- const SEMANTIC_ICON_DEFINITIONS = [
15777
- {
15778
- id: "protection-trust",
15779
- label: "Protection and trust",
15780
- tags: [
15781
- "safe",
15782
- "safety",
15783
- "security",
15784
- "trust",
15785
- "privacy",
15786
- "confidence"
15787
- ],
15788
- domains: [
15789
- "wellbeing",
15790
- "services",
15791
- "technology"
15792
- ],
15793
- tone: ["trustworthy", "practical"],
15794
- presets: featurePreset
15795
- },
15796
- {
15797
- id: "confidentiality",
15798
- label: "Confidentiality",
15799
- tags: [
15800
- "confidential",
15801
- "privacy",
15802
- "secure",
15803
- "protected",
15804
- "private"
15805
- ],
15806
- domains: [
15807
- "wellbeing",
15808
- "coaching",
15809
- "services",
15810
- "technology"
15811
- ],
15812
- tone: ["trustworthy", "calm"],
15813
- presets: featurePreset
15814
- },
15815
- {
15816
- id: "care-support",
15817
- label: "Care and support",
15818
- tags: [
15819
- "care",
15820
- "support",
15821
- "therapy",
15822
- "kindness",
15823
- "help",
15824
- "compassion"
15825
- ],
15826
- domains: [
15827
- "wellbeing",
15828
- "coaching",
15829
- "community"
15830
- ],
15831
- tone: ["warm", "human"],
15832
- presets: featurePreset
15833
- },
15834
- {
15835
- id: "partnership",
15836
- label: "Partnership",
15837
- tags: [
15838
- "partnership",
15839
- "together",
15840
- "support",
15841
- "relationship",
15842
- "collaboration"
15843
- ],
15844
- domains: [
15845
- "coaching",
15846
- "community",
15847
- "services"
15848
- ],
15849
- tone: [
15850
- "warm",
15851
- "human",
15852
- "trustworthy"
15853
- ],
15854
- presets: featurePreset
15855
- },
15856
- {
15857
- id: "warmth",
15858
- label: "Warmth",
15859
- tags: [
15860
- "heart",
15861
- "warmth",
15862
- "care",
15863
- "love",
15864
- "wellbeing",
15865
- "personal"
15866
- ],
15867
- domains: [
15868
- "wellbeing",
15869
- "community",
15870
- "hospitality"
15871
- ],
15872
- tone: ["warm", "human"],
15873
- presets: featurePreset
15874
- },
15875
- {
15876
- id: "community",
15877
- label: "Community",
15878
- tags: [
15879
- "community",
15880
- "group",
15881
- "people",
15882
- "team",
15883
- "members",
15884
- "belonging"
15885
- ],
15886
- domains: [
15887
- "community",
15888
- "education",
15889
- "events"
15890
- ],
15891
- tone: ["human", "warm"],
15892
- presets: featurePreset
15893
- },
15894
- {
15895
- id: "personal-guidance",
15896
- label: "Personal guidance",
15897
- tags: [
15898
- "guidance",
15899
- "personal",
15900
- "coach",
15901
- "expert",
15902
- "one to one",
15903
- "trusted"
15904
- ],
15905
- domains: [
15906
- "coaching",
15907
- "services",
15908
- "education"
15909
- ],
15910
- tone: ["trustworthy", "human"],
15911
- presets: featurePreset
15912
- },
15913
- {
15914
- id: "conversation",
15915
- label: "Conversation",
15916
- tags: [
15917
- "conversation",
15918
- "talk",
15919
- "chat",
15920
- "communication",
15921
- "support"
15922
- ],
15923
- domains: [
15924
- "coaching",
15925
- "community",
15926
- "services"
15927
- ],
15928
- tone: ["human", "warm"],
15929
- presets: featurePreset
15930
- },
15931
- {
15932
- id: "friendly-welcome",
15933
- label: "Friendly welcome",
15934
- tags: [
15935
- "friendly",
15936
- "welcome",
15937
- "positive",
15938
- "happy",
15939
- "approachable"
15940
- ],
15941
- domains: [
15942
- "hospitality",
15943
- "community",
15944
- "services"
15945
- ],
15946
- tone: [
15947
- "warm",
15948
- "playful",
15949
- "human"
15950
- ],
15951
- presets: featurePreset
15952
- },
15953
- {
15954
- id: "insight-learning",
15955
- label: "Insight and learning",
15956
- tags: [
15957
- "mind",
15958
- "insight",
15959
- "learning",
15960
- "clarity",
15961
- "thinking",
15962
- "therapy"
15963
- ],
15964
- domains: [
15965
- "wellbeing",
15966
- "coaching",
15967
- "education"
15968
- ],
15969
- tone: ["calm", "practical"],
15970
- presets: featurePreset
15971
- },
15972
- {
15973
- id: "natural-wellbeing",
15974
- label: "Natural wellbeing",
15975
- tags: [
15976
- "natural",
15977
- "wellbeing",
15978
- "growth",
15979
- "eco",
15980
- "calm",
15981
- "organic"
15982
- ],
15983
- domains: [
15984
- "wellbeing",
15985
- "hospitality",
15986
- "creative"
15987
- ],
15988
- tone: ["calm", "warm"],
15989
- presets: featurePreset
15990
- },
15991
- {
15992
- id: "growth",
15993
- label: "Growth",
15994
- tags: [
15995
- "growth",
15996
- "new",
15997
- "progress",
15998
- "development",
15999
- "nurture"
16000
- ],
16001
- domains: [
16002
- "wellbeing",
16003
- "coaching",
16004
- "education",
16005
- "community"
16006
- ],
16007
- tone: ["warm", "calm"],
16008
- presets: featurePreset
16009
- },
16010
- {
16011
- id: "gentle-care",
16012
- label: "Gentle care",
16013
- tags: [
16014
- "gentle",
16015
- "soft",
16016
- "care",
16017
- "wellbeing",
16018
- "beauty",
16019
- "calm"
16020
- ],
16021
- domains: [
16022
- "wellbeing",
16023
- "creative",
16024
- "hospitality"
16025
- ],
16026
- tone: [
16027
- "warm",
16028
- "calm",
16029
- "premium"
16030
- ],
16031
- presets: featurePreset
16032
- },
16033
- {
16034
- id: "special-touch",
16035
- label: "Special touch",
16036
- tags: [
16037
- "special",
16038
- "sparkle",
16039
- "magic",
16040
- "polish",
16041
- "delight",
16042
- "creative"
16043
- ],
16044
- domains: [
16045
- "creative",
16046
- "commerce",
16047
- "hospitality"
16048
- ],
16049
- tone: ["playful", "premium"],
16050
- presets: featurePreset
16051
- },
16052
- {
16053
- id: "ideas",
16054
- label: "Ideas",
16055
- tags: [
16056
- "idea",
16057
- "innovation",
16058
- "clarity",
16059
- "creative",
16060
- "strategy"
16061
- ],
16062
- domains: [
16063
- "coaching",
16064
- "education",
16065
- "creative",
16066
- "technology"
16067
- ],
16068
- tone: ["practical", "playful"],
16069
- presets: featurePreset
16070
- },
16071
- {
16072
- id: "direction",
16073
- label: "Direction",
16074
- tags: [
16075
- "direction",
16076
- "navigation",
16077
- "path",
16078
- "journey",
16079
- "guidance"
16080
- ],
16081
- domains: [
16082
- "coaching",
16083
- "education",
16084
- "services"
16085
- ],
16086
- tone: ["trustworthy", "practical"],
16087
- presets: featurePreset
16088
- },
16089
- {
16090
- id: "focus",
16091
- label: "Focus",
16092
- tags: [
16093
- "focus",
16094
- "goal",
16095
- "outcome",
16096
- "aim",
16097
- "strategy"
16098
- ],
16099
- domains: [
16100
- "coaching",
16101
- "services",
16102
- "technology"
16103
- ],
16104
- tone: ["practical"],
16105
- presets: featurePreset
16106
- },
16107
- {
16108
- id: "quality",
16109
- label: "Quality",
16110
- tags: [
16111
- "quality",
16112
- "award",
16113
- "standard",
16114
- "achievement",
16115
- "premium"
16116
- ],
16117
- domains: [
16118
- "services",
16119
- "education",
16120
- "commerce"
16121
- ],
16122
- tone: ["premium", "trustworthy"],
16123
- presets: featurePreset
16124
- },
16125
- {
16126
- id: "highlight",
16127
- label: "Highlight",
16128
- tags: [
16129
- "highlight",
16130
- "featured",
16131
- "favorite",
16132
- "quality",
16133
- "special"
16134
- ],
16135
- domains: [
16136
- "creative",
16137
- "commerce",
16138
- "services"
16139
- ],
16140
- tone: ["playful", "premium"],
16141
- presets: featurePreset
16142
- },
16143
- {
16144
- id: "verified-quality",
16145
- label: "Verified quality",
16146
- tags: [
16147
- "verified",
16148
- "quality",
16149
- "approved",
16150
- "trusted",
16151
- "check"
16152
- ],
16153
- domains: [
16154
- "services",
16155
- "commerce",
16156
- "education"
16157
- ],
16158
- tone: ["trustworthy", "practical"],
16159
- presets: featurePreset
16160
- },
16161
- {
16162
- id: "learning",
16163
- label: "Learning",
16164
- tags: [
16165
- "learning",
16166
- "book",
16167
- "course",
16168
- "knowledge",
16169
- "education"
16170
- ],
16171
- domains: [
16172
- "education",
16173
- "coaching",
16174
- "community"
16175
- ],
16176
- tone: ["calm", "practical"],
16177
- presets: featurePreset
16178
- },
16179
- {
16180
- id: "training",
16181
- label: "Training",
16182
- tags: [
16183
- "training",
16184
- "course",
16185
- "qualification",
16186
- "school",
16187
- "education"
16188
- ],
16189
- domains: ["education", "coaching"],
16190
- tone: ["trustworthy", "practical"],
16191
- presets: featurePreset
16192
- },
16193
- {
16194
- id: "programmes-dates",
16195
- label: "Programmes and dates",
16196
- tags: [
16197
- "calendar",
16198
- "dates",
16199
- "schedule",
16200
- "events",
16201
- "programme",
16202
- "classes"
16203
- ],
16204
- domains: [
16205
- "events",
16206
- "education",
16207
- "community"
16208
- ],
16209
- tone: ["practical"],
16210
- presets: featurePreset
16211
- },
16212
- {
16213
- id: "place",
16214
- label: "Place",
16215
- tags: [
16216
- "place",
16217
- "location",
16218
- "local",
16219
- "venue",
16220
- "destination"
16221
- ],
16222
- domains: [
16223
- "events",
16224
- "hospitality",
16225
- "services"
16226
- ],
16227
- tone: ["practical"],
16228
- presets: featurePreset
16229
- },
16230
- {
16231
- id: "products",
16232
- label: "Products",
16233
- tags: [
16234
- "products",
16235
- "shop",
16236
- "store",
16237
- "retail",
16238
- "commerce"
16239
- ],
16240
- domains: ["commerce"],
16241
- tone: ["practical", "premium"],
16242
- presets: featurePreset
16243
- },
16244
- {
16245
- id: "packages",
16246
- label: "Packages",
16247
- tags: [
16248
- "package",
16249
- "bundle",
16250
- "delivery",
16251
- "offer",
16252
- "product"
16253
- ],
16254
- domains: ["commerce", "services"],
16255
- tone: ["practical"],
16256
- presets: featurePreset
16257
- },
16258
- {
16259
- id: "time",
16260
- label: "Time",
16261
- tags: [
16262
- "time",
16263
- "duration",
16264
- "schedule",
16265
- "availability",
16266
- "appointment"
16267
- ],
16268
- domains: [
16269
- "events",
16270
- "services",
16271
- "wellbeing"
16272
- ],
16273
- tone: ["practical", "calm"],
16274
- presets: featurePreset
16275
- },
16276
- {
16277
- id: "practical-service",
16278
- label: "Practical service",
16279
- tags: [
16280
- "service",
16281
- "repair",
16282
- "setup",
16283
- "practical",
16284
- "tools",
16285
- "support"
16286
- ],
16287
- domains: ["services", "technology"],
16288
- tone: ["practical"],
16289
- presets: featurePreset
16290
- },
16291
- {
16292
- id: "at-home",
16293
- label: "At home",
16294
- tags: [
16295
- "home",
16296
- "domestic",
16297
- "comfort",
16298
- "local",
16299
- "space"
16300
- ],
16301
- domains: [
16302
- "hospitality",
16303
- "services",
16304
- "community"
16305
- ],
16306
- tone: ["warm", "calm"],
16307
- presets: featurePreset
16308
- },
16309
- {
16310
- id: "worldwide",
16311
- label: "Worldwide",
16312
- tags: [
16313
- "global",
16314
- "online",
16315
- "worldwide",
16316
- "remote",
16317
- "international"
16318
- ],
16319
- domains: [
16320
- "technology",
16321
- "education",
16322
- "services"
16323
- ],
16324
- tone: ["practical"],
16325
- presets: featurePreset
16326
- },
16327
- {
16328
- id: "professional-service",
16329
- label: "Professional service",
16330
- tags: [
16331
- "business",
16332
- "professional",
16333
- "consulting",
16334
- "service",
16335
- "work"
16336
- ],
16337
- domains: [
16338
- "services",
16339
- "technology",
16340
- "coaching"
16341
- ],
16342
- tone: ["practical", "trustworthy"],
16343
- presets: featurePreset
16344
- }
16345
- ];
16346
- SEMANTIC_ICON_DEFINITIONS.map(({ id, label }) => ({
16347
- id,
16348
- label
16349
- }));
16350
- function isSemanticIconId(value) {
16351
- return typeof value === "string" && SEMANTIC_ICON_IDS.includes(value);
16352
- }
16353
- function getSemanticIconComponent(name) {
16354
- if (!isSemanticIconId(name)) return null;
16355
- return SEMANTIC_ICON_COMPONENTS[name] ?? null;
16356
- }
16357
- //#endregion
16358
- //#region ../blocks/src/system/icons/presets.ts
16359
- const ICON_PICKER_PRESETS = ["cta", "feature"];
16360
- //#endregion
16361
- //#region ../blocks/src/system/icons/social.tsx
16362
- const SOCIAL_ICON_NAMES = [
16363
- "SocialFacebook",
16364
- "SocialInstagram",
16365
- "SocialLinkedIn",
16366
- "SocialTikTok",
16367
- "SocialWhatsApp",
16368
- "SocialX",
16369
- "SocialYouTube"
16370
- ];
16371
- const socialIcons = {
16372
- SocialFacebook: createIcon("SocialFacebookIcon", /* @__PURE__ */ jsx("path", { d: "M14 8h3V4h-3c-3 0-5 2-5 5v3H6v4h3v6h4v-6h3l1-4h-4V9c0-.7.3-1 1-1Z" })),
16373
- SocialInstagram: createIcon("SocialInstagramIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
16374
- /* @__PURE__ */ jsx("rect", {
16375
- x: "3",
16376
- y: "3",
16377
- width: "18",
16378
- height: "18",
16379
- rx: "5"
16380
- }),
16381
- /* @__PURE__ */ jsx("circle", {
16382
- cx: "12",
16383
- cy: "12",
16384
- r: "4"
16385
- }),
16386
- /* @__PURE__ */ jsx("circle", {
16387
- cx: "17.5",
16388
- cy: "6.5",
16389
- r: ".75",
16390
- fill: "currentColor",
16391
- stroke: "none"
16392
- })
16393
- ] })),
16394
- SocialLinkedIn: createIcon("SocialLinkedInIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
16395
- /* @__PURE__ */ jsx("path", { d: "M6 9v10" }),
16396
- /* @__PURE__ */ jsx("path", {
16397
- d: "M6 5.5v.01",
16398
- strokeWidth: "3"
16399
- }),
16400
- /* @__PURE__ */ jsx("path", { d: "M10.5 19v-6a4 4 0 0 1 8 0v6" }),
16401
- /* @__PURE__ */ jsx("path", { d: "M10.5 9v10" })
16402
- ] })),
16403
- SocialTikTok: createIcon("SocialTikTokIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M14 4v11.5a4.5 4.5 0 1 1-4-4.47" }), /* @__PURE__ */ jsx("path", { d: "M14 4c.7 3 2.4 4.5 5 4.5" })] })),
16404
- SocialWhatsApp: createIcon("SocialWhatsAppIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M3.5 20.5 4.8 16.4A8.5 8.5 0 1 1 8 19.3Z" }), /* @__PURE__ */ jsx("path", { d: "M9.2 8.2c.2-.5.9-.6 1.2-.1l.8 1.4c.2.3.1.7-.2 1l-.5.5c.5 1.1 1.4 2 2.5 2.5l.5-.5c.3-.3.7-.4 1-.2l1.4.8c.5.3.4 1-.1 1.2-2.9 1.1-7.7-3.7-6.6-6.6Z" })] })),
16405
- SocialX: createIcon("SocialXIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "m5 4 14 16" }), /* @__PURE__ */ jsx("path", { d: "M19 4 5 20" })] })),
16406
- SocialYouTube: createIcon("SocialYouTubeIcon", /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("path", { d: "M21 12c0 3.5-.5 5.5-1.3 6.3S16.5 19.5 12 19.5s-6.9-.4-7.7-1.2S3 15.5 3 12s.5-5.5 1.3-6.3S7.5 4.5 12 4.5s6.9.4 7.7 1.2S21 8.5 21 12Z" }), /* @__PURE__ */ jsx("path", { d: "m10 9 5 3-5 3Z" })] }))
16407
- };
16408
- function isSocialIconName(value) {
16409
- return typeof value === "string" && SOCIAL_ICON_NAMES.includes(value);
16410
- }
16411
- function getSocialIconComponent(value) {
16412
- return isSocialIconName(value) ? socialIcons[value] : null;
16413
- }
16414
- //#endregion
16415
- //#region ../blocks/src/system/icons/registry.ts
16416
- function buildSearchText(parts) {
16417
- return parts.map((part) => part.trim()).filter(Boolean).join(" ");
16418
- }
16419
- function semanticDefinitionToOption(definition, preset) {
16420
- return {
16421
- id: definition.id,
16422
- label: definition.label,
16423
- searchText: buildSearchText([
16424
- definition.label,
16425
- definition.id,
16426
- ...definition.tags,
16427
- ...definition.domains,
16428
- ...definition.tone
16429
- ]),
16430
- preset
16431
- };
16432
- }
16433
- CTA_ICON_OPTIONS.map((option) => ({
16434
- id: option.id,
16435
- label: option.label,
16436
- searchText: buildSearchText([option.label, option.id]),
16437
- preset: "cta"
16438
- }));
16439
- function semanticOptionsForPreset(preset) {
16440
- return SEMANTIC_ICON_DEFINITIONS.filter((definition) => definition.presets.includes(preset)).map((definition) => semanticDefinitionToOption(definition, preset));
16441
- }
16442
- semanticOptionsForPreset("feature");
16443
- function getIconComponent(name) {
16444
- return getCtaIconComponent(name) ?? getSemanticIconComponent(name) ?? getSocialIconComponent(name);
16445
- }
16446
- //#endregion
16447
- //#region ../blocks/src/system/runtime/shared/components/ThemedButton.tsx
16448
- function themedButtonClasses(variant, size, extraClassName) {
16449
- return [
16450
- ...themeButtonVariantClassNames(variant),
16451
- themeButtonSizeClassName(size),
16452
- extraClassName
16453
- ].filter(Boolean).join(" ");
16454
- }
16455
- function ThemedButtonLabel(props) {
16456
- const content = /* @__PURE__ */ jsxs(Fragment, { children: [
16457
- props.pending ? /* @__PURE__ */ jsx(SpinnerNode, {
16458
- size: props.pending.spinnerSize ?? "sm",
16459
- color: "inherit",
16460
- className: props.pending.spinnerClassName ?? "rb-mr-2",
16461
- srLabel: props.pending.srLabel
16462
- }) : null,
16463
- props.labelClassName ? /* @__PURE__ */ jsx("span", {
16464
- className: props.labelClassName,
16465
- children: props.pending?.label ?? props.label
16466
- }) : props.pending?.label ?? props.label,
16467
- props.screenReaderSuffix ? /* @__PURE__ */ jsx("span", {
16468
- className: "rb-sr-only",
16469
- children: props.screenReaderSuffix
16470
- }) : null
16471
- ] });
16472
- return props.pending?.contentClassName ? /* @__PURE__ */ jsx("span", {
16473
- className: props.pending.contentClassName,
16474
- children: content
16475
- }) : content;
16476
- }
16477
- /** A native file chooser with the same structural styling owner as themed buttons. */
16478
- function ThemedFileChooser({ variant, size, extraClassName, label, inputRef, inputProps }) {
16479
- return /* @__PURE__ */ jsxs("label", {
16480
- className: themedButtonClasses(variant, size, extraClassName),
16481
- children: [
16482
- /* @__PURE__ */ jsx("input", {
16483
- ...inputProps,
16484
- ref: inputRef,
16485
- type: "file",
16486
- className: "rb-sr-only"
16487
- }),
16488
- /* @__PURE__ */ jsx("svg", {
16489
- "aria-hidden": "true",
16490
- width: "15",
16491
- height: "15",
16492
- viewBox: "0 0 24 24",
16493
- fill: "none",
16494
- stroke: "currentColor",
16495
- strokeWidth: "2",
16496
- children: /* @__PURE__ */ jsx("path", { d: "M12 16V4M6 10l6-6 6 6M4 20h16" })
16497
- }),
16498
- label
16499
- ]
16500
- });
16501
- }
16502
- function ThemedButton({ variant, size, extraClassName, screenReaderSuffix, labelClassName, pending, label, ...buttonProps }) {
16503
- return /* @__PURE__ */ jsx("button", {
16504
- ...buttonProps,
16505
- className: themedButtonClasses(variant, size, extraClassName),
16506
- children: /* @__PURE__ */ jsx(ThemedButtonLabel, {
16507
- label,
16508
- pending,
16509
- screenReaderSuffix,
16510
- labelClassName
16511
- })
16512
- });
16513
- }
16514
- function ThemedButtonLink({ variant, size, extraClassName, screenReaderSuffix, labelClassName, label, ...anchorProps }) {
16515
- return /* @__PURE__ */ jsx("a", {
16516
- ...anchorProps,
16517
- className: themedButtonClasses(variant, size, extraClassName),
16518
- children: /* @__PURE__ */ jsx(ThemedButtonLabel, {
16519
- label,
16520
- screenReaderSuffix,
16521
- labelClassName
16522
- })
16523
- });
16524
- }
16525
- /** Fixed icon-only actions control; callers cannot supply icon children. */
16526
- function ThemedActionsButton({ variant, size, extraClassName, ...buttonProps }) {
16527
- return /* @__PURE__ */ jsx("button", {
16528
- ...buttonProps,
16529
- "aria-label": "Actions",
16530
- className: themedButtonClasses(variant, size, extraClassName),
16531
- children: /* @__PURE__ */ jsxs("svg", {
16532
- width: "16",
16533
- height: "16",
16534
- viewBox: "0 0 16 16",
16535
- fill: "currentColor",
16536
- "aria-hidden": "true",
16537
- children: [
16538
- /* @__PURE__ */ jsx("circle", {
16539
- cx: "8",
16540
- cy: "3",
16541
- r: "1.5"
16542
- }),
16543
- /* @__PURE__ */ jsx("circle", {
16544
- cx: "8",
16545
- cy: "8",
16546
- r: "1.5"
16547
- }),
16548
- /* @__PURE__ */ jsx("circle", {
16549
- cx: "8",
16550
- cy: "13",
16551
- r: "1.5"
16552
- })
16553
- ]
16554
- })
16555
- });
16556
- }
16557
- /** Fixed semantic download affordance; callers cannot supply arbitrary icon children. */
16558
- function ThemedDownloadLink({ variant, size, extraClassName, label, screenReaderSuffix, labelClassName, ...anchorProps }) {
16559
- return /* @__PURE__ */ jsxs("a", {
16560
- ...anchorProps,
16561
- className: themedButtonClasses(variant, size, extraClassName),
16562
- children: [/* @__PURE__ */ jsx(DownloadIcon, {
16563
- "aria-hidden": "true",
16564
- size: 24
16565
- }), /* @__PURE__ */ jsx(ThemedButtonLabel, {
16566
- label,
16567
- screenReaderSuffix,
16568
- labelClassName
16569
- })]
16570
- });
16571
- }
16572
- /** Boundary for authored button nodes and their registry-backed trailing icon. */
16573
- function ThemedAuthoredButton({ label, href, variant, size, extraClassName, disabled, type = "button", target, rel, ariaLabel, dataTestId, trailingIcon, onClick }) {
16574
- const affordance = resolveButtonAffordance({ trailingIcon });
16575
- const Icon = affordance ? getIconComponent(affordance.iconId) : null;
16576
- const className = variant ? themedButtonClasses(variant, size, Icon ? [extraClassName, themeButtonExtraClassesWithTrailingIcon()].filter(Boolean).join(" ") : extraClassName) : extraClassName ?? void 0;
16577
- const content = /* @__PURE__ */ jsxs(Fragment, { children: [label, Icon ? /* @__PURE__ */ jsx(Icon, {
16578
- "aria-hidden": true,
16579
- className: "rb-ml-2 rb-h-4 rb-w-4 rb-inline-block"
16580
- }) : null] });
16581
- return href ? /* @__PURE__ */ jsx("a", {
16582
- href,
16583
- target,
16584
- rel,
16585
- "aria-label": ariaLabel,
16586
- "data-testid": dataTestId,
16587
- className,
16588
- onClick,
16589
- children: content
16590
- }) : /* @__PURE__ */ jsx("button", {
16591
- type,
16592
- disabled,
16593
- "aria-label": ariaLabel,
16594
- "data-testid": dataTestId,
16595
- className,
16596
- onClick,
16597
- children: content
16598
- });
16599
- }
16600
- //#endregion
16601
- export { parseCustomCssRules as $, backgroundColorStyle as $n, asDesignBoundaryId as $t, planCheckoutPaymentFlow as A, isCssColorLiteral as An, getBookingInstalmentPlanIntervalCount as Ar, navLinkHoverColorCandidate as At, generateHeaderScrollTreatmentStyles as B, safeTokenOr as Bn, themeV2RuntimeStyleFieldNames as Bt, clsx as C, tileTreatmentValues as Cn, surfaceForegroundValueWithOpacity as Cr, generateBaseInteractiveCSS as Ct, checkoutCopy as D, surfaceDecorationColors as Dn, runtimeMediaSchema as Dr, NAV_LINK_PADDING_MAP as Dt, parseEventRegistrationErrorReason as E, resolveSurface as En, persistableMediaSchema as Er, NAV_LINK_LETTER_SPACING_MAP as Et, resolveBookingCollectionOptionFacts as F, PUBLIC_BUTTON_ROLES as Fn, boxBackgroundSchema as Ft, MQ_MD_DOWN as G, resolveOpaqueSurfaceHex as Gn, cardRoleValues as Gt, getHeaderPaintTargets as H, getTextColorForBackground as Hn, renderCssDeclarations as Ht, getBookingLaterInstalments as I, unsafeAsOpaqueButtonColourToken as In, runtimeBoxBackgroundSchema as It, MQ_TABLET_ONLY as J, paletteModeSchema as Jn, asAppearancePresetId as Jt, MQ_SM_DOWN as K, hexColorSchema as Kn, cardVariantRoleValues as Kt, corners as L, selectLogoVariant as Ln, pageDesignEditorBackgroundOverrideOwner as Lt, isBookingCollectionEquivalentToUpfront as M, resolveThemeColorReferenceValue as Mn, parsePositiveMoneyInputToCents as Mr, navLinkOwnsUnderline as Mt, repriceBookingCollectionOptions as N, resolveTokenOrCssColorValue as Nn, formatCurrencyAmount as Nr, navEffectPolicy as Nt, getStripeMinimumChargeRequirement as O, opaqueSurfaceContextFromTheme as On, validateBookingPaymentOptionKinds as Or, NAV_LINK_PADDING_X_MAP as Ot, resolveAvailableBookingCollectionOptions as P, generateShadowValue$1 as Pn, formatGiftCardAmountLabel as Pr, boxBackgroundOverlaySchema as Pt, parseBlockCustomCssRules as Q, TokenResolver as Qn, asDesignBlockId as Qt, headerPositioningValues as R, surfaceToneFromForegroundToken as Rn, siteChromeBackgroundOverrideOwner as Rt, PlusIcon as S, testimonialsCompositionTreatmentValues as Sn, surfaceForegroundValue as Sr, generateEffectsCSS as St, eventRegistrationErrors as T, visibleHeadingDecorationFamilyValues as Tn, mediaSchema as Tr, NAV_LINK_BORDER_RADIUS_MAP as Tt, renderHeaderPaintTargetRules as U, planForegroundHover as Un, generateShadowValue as Ut, generateMobileOverlayBackdropFilterFix as V, expandPalette as Vn, generateCardCss as Vt, MQ_LG_UP as W, resolveConcreteColorHex as Wn, cardRoleSchema as Wt, getComponentBorderWidthPx as X, paletteValueKeySchema as Xn, asBlockOrderIndex as Xt, headerVariantValues as Y, paletteValueKey as Yn, asBlockContentVersionId as Yt, getComponentShadowVar as Z, requirePaletteColorsFromEntries as Zn, asBoundaryOptionId as Zt, FileArchiveIcon as _, noHeadingDecoration as _n, DEFAULT_SURFACE_TEXT_COLOR as _r, headerInteractionQuietPalette as _t, ThemedDownloadLink as a, asSiteStyleId as an, textColorValue as ar, ACCORDION_SPACING_MAP as at, FileTextIcon as b, plainFrame as bn, surfaceForegroundInputFromResolved as br, defaultButtonStyleSelectionFor as bt, ICON_PICKER_PRESETS as c, defineExactCatalog as cn, parseBlockColorToken as cr, ICON_CONFIG as ct, ArrowDownIcon as d, eyebrowTreatmentValues as dn, parseColorTokenParts as dr, generateButtonCss as dt, asDesignEntryId as en, borderColorStyle as er, FONT_WEIGHT_MAP as et, ChevronDownIcon as f, featureCardCompositionTreatmentValues as fn, contrastRatio as fr, generateDefaultButtonSystem as ft, ExternalLinkIcon as g, makeBoundaryId as gn, rgbToHex as gr, headerInteractionPaletteValues as gt, ClockIcon as h, introCompositionTreatmentValues as hn, hexToRgb as hr, skinTokenCssVars as ht, ThemedButtonLink as i, asPageFlowPresetId as in, textColorStyle as ir, ACCORDION_OPEN_ACCENT_THICKNESS as it, planFlexibleBalanceCreditFirst as j, resolveOnColorForThemeToken as jn, resolveFlexibleBalancePaymentEligibility as jr, navLinkOwnsHoverForeground as jt, confirmationPaymentSchema as k, opaqueSurfaceDeclarations as kn, formatOrderInstalmentStatusLabel as kr, NAV_LINK_TEXT_SIZE_MAP as kt, isSemanticIconId as l, defineFrameCapability as ln, buildThemeTokens as lr, ICON_SIZE_PX as lt, CirclePlusIcon as m, headingDecorationColorTokenValues as mn, featuresFromHex as mr, parseThemeForPersistence as mt, ThemedAuthoredButton as n, asDesignSystemTemplateId as nn, mergeStyles as nr, INPUT_SPACING_MAP as nt, ThemedFileChooser as o, assertNever$1 as on, parseThemeColorToken as or, ACCORDION_TRIGGER_FONT_SCALE as ot, CircleMinusIcon as p, flushPanelFrame as pn, relativeLuminance as pr, parseThemeButtonVariantId as pt, MQ_SM_UP as q, paletteColorsSchema as qn, normalizeCardRole as qt, ThemedButton as r, asLayoutVariantKey as rn, rgbColorValue as rr, LABEL_FONT_SIZE_MAP as rt, getIconComponent as s, defineBlockDesignCapability as sn, themeColorShadeSteps as sr, ACCORDION_TRIGGER_LETTER_SPACING as st, ThemedActionsButton as t, asDesignPageId as tn, cssVarValue as tr, INPUT_FONT_SIZE_MAP as tt, SpinnerNode as u, eventListTreatmentValues as un, defaultThemeTokens as ur, generateButtonActionLayoutCss as ut, FileAudioIcon as v, offeringsPreviewCompositionTreatmentValues as vn, SURFACE_FOREGROUND_CSS_VARS as vr, brandDisplayModeValues as vt, checkBrowserStripeKey as w, toNonEmptyReadonlyArray as wn, mediaPosterSchema as wr, generateInteractiveChildInheritanceCSS as wt, MinusIcon as x, requireNonEmptyReadonlyArray as xn, surfaceForegroundStyle as xr, buttonStyleSelectionSchema as xt, FileSpreadsheetIcon as y, panelFrame as yn, surfaceForegroundDeclarations as yr, logoSizePolicyValues as yt, themeSchema as z, resolveSurfaceForeground as zn, stripStaleTransitionStyleGroup as zt };
15281
+ export { navLinkOwnsUnderline as $, indexRenderableMediaAssets as $n, serializeSurfaceTree as $t, generateDefaultButtonSystem as A, rgbColorValue as An, defineFrameCapability as At, logoSizePolicyValues as B, hexToRgb as Bn, panelFrame as Bt, ACCORDION_SPACING_MAP as C, paletteValueKeySchema as Cn, asDesignSystemTemplateId as Ct, ICON_SIZE_PX as D, borderColorStyle as Dn, assertNever as Dt, ICON_CONFIG as E, backgroundColorStyle as En, asSiteStyleId as Et, parseThemeForPersistence as F, parseBlockColorToken as Fn, headingDecorationColorTokenValues as Ft, generateInteractiveChildInheritanceCSS as G, surfaceForegroundStyle as Gn, toNonEmptyReadonlyArray as Gt, buttonStyleSelectionSchema as H, SURFACE_FOREGROUND_CSS_VARS as Hn, requireNonEmptyReadonlyArray as Ht, skinTokenCssVars as I, buildThemeTokens as In, introCompositionTreatmentValues as It, NAV_LINK_PADDING_MAP as J, mediaSchema as Jn, opaqueSurfaceContextFromTheme as Jt, NAV_LINK_BORDER_RADIUS_MAP as K, surfaceForegroundValue as Kn, visibleHeadingDecorationFamilyValues as Kt, headerInteractionPaletteValues as L, defaultThemeTokens as Ln, makeBoundaryId as Lt, themeButtonExtraClassesWithTrailingIcon as M, textColorValue as Mn, eyebrowTreatmentValues as Mt, themeButtonSizeClassName as N, parseThemeColorToken as Nn, featureCardCompositionTreatmentValues as Nt, generateButtonActionLayoutCss as O, cssVarValue as On, defineBlockDesignCapability as Ot, themeButtonVariantClassNames as P, themeColorShadeSteps as Pn, flushPanelFrame as Pt, navLinkOwnsHoverForeground as Q, renderableMediaAssetSchema as Qn, resolveSurface as Qt, headerInteractionQuietPalette as R, parseColorTokenParts as Rn, noHeadingDecoration as Rt, ACCORDION_OPEN_ACCENT_THICKNESS as S, paletteValueKey as Sn, asDesignPageId as St, ACCORDION_TRIGGER_LETTER_SPACING as T, TokenResolver as Tn, asPageFlowPresetId as Tt, generateEffectsCSS as U, surfaceForegroundDeclarations as Un, testimonialsCompositionTreatmentValues as Ut, defaultButtonStyleSelectionFor as V, DEFAULT_SURFACE_TEXT_COLOR as Vn, plainFrame as Vt, generateBaseInteractiveCSS as W, surfaceForegroundInputFromResolved as Wn, tileTreatmentValues as Wt, NAV_LINK_TEXT_SIZE_MAP as X, runtimeMediaSchema as Xn, parseResolvedSurface as Xt, NAV_LINK_PADDING_X_MAP as Y, persistableMediaSchema as Yn, opaqueSurfaceDeclarations as Yt, navLinkHoverColorCandidate as Z, buildRenderableMediaAssetIndex as Zn, parseSurfaceTree as Zt, parseCustomCssRules as _, resolveConcreteColorHex as _n, unsafeAsSiteId as _r, asBlockOrderIndex as _t, generateMobileOverlayBackdropFilterFix as a, resolveThemeColorReferenceValue as an, parseContentVersionId as ar, siteChromeBackgroundOverrideOwner as at, INPUT_SPACING_MAP as b, paletteColorsSchema as bn, err as br, asDesignBoundaryId as bt, MQ_LG_UP as c, PUBLIC_BUTTON_ROLES as cn, parseSiteId as cr, generateCardCss as ct, MQ_SM_UP as d, surfaceToneFromForegroundToken as dn, unsafeAsAppointmentResourceId as dr, cardRoleSchema as dt, surfaceDecorationColors as en, resolveManagedMediaReference as er, navEffectPolicy as et, MQ_TABLET_ONLY as f, resolveSurfaceForeground as fn, unsafeAsAppointmentServiceId as fr, cardRoleValues as ft, parseBlockCustomCssRules as g, planForegroundHover as gn, unsafeAsPassId as gr, asBlockContentVersionId as gt, getComponentShadowVar as h, getTextColorForBackground as hn, unsafeAsMediaAssetId as hr, asAppearancePresetId as ht, generateHeaderScrollTreatmentStyles as i, resolveOnColorForThemeToken as in, parseApiKeyId as ir, pageDesignEditorBackgroundOverrideOwner as it, parseThemeButtonVariantId as j, textColorStyle as jn, eventListTreatmentValues as jt, generateButtonCss as k, mergeStyles as kn, defineExactCatalog as kt, MQ_MD_DOWN as l, unsafeAsOpaqueButtonColourToken as ln, parseSiteTermsVersionId as lr, renderCssDeclarations as lt, getComponentBorderWidthPx as m, expandPalette as mn, unsafeAsFormId as mr, normalizeCardRole as mt, headerPositioningValues as n, scrimTone as nn, parseCanonicalMediaIdentifier as nr, boxBackgroundSchema as nt, getHeaderPaintTargets as o, resolveTokenOrCssColorValue as on, parseEventOfferingId as or, stripStaleTransitionStyleGroup as ot, headerVariantValues as p, safeTokenOr as pn, unsafeAsCustomerPassId as pr, cardVariantRoleValues as pt, NAV_LINK_LETTER_SPACING_MAP as q, surfaceForegroundValueWithOpacity as qn, mapDrawingStyle as qt, themeSchema as r, isCssColorLiteral as rn, parseMediaIdentifier as rr, runtimeBoxBackgroundSchema as rt, renderHeaderPaintTargetRules as s, generateShadowValue$1 as sn, parseEventSeriesId as sr, themeV2RuntimeStyleFieldNames as st, corners as t, gradientScrimSamples as tn, mediaIdentifierSchema as tr, boxBackgroundOverlaySchema as tt, MQ_SM_DOWN as u, selectLogoVariant as un, parseUserId as ur, generateShadowValue as ut, FONT_WEIGHT_MAP as v, resolveOpaqueSurfaceHex as vn, unsafeAsStorageBucketName as vr, asBoundaryOptionId as vt, ACCORDION_TRIGGER_FONT_SCALE as w, requirePaletteColorsFromEntries as wn, asLayoutVariantKey as wt, LABEL_FONT_SIZE_MAP as x, paletteModeSchema as xn, ok as xr, asDesignEntryId as xt, INPUT_FONT_SIZE_MAP as y, hexColorSchema as yn, unsafeAsStoragePath as yr, asDesignBlockId as yt, brandDisplayModeValues as z, featuresFromHex as zn, offeringsPreviewCompositionTreatmentValues as zt };