@riverbankcms/sdk 0.91.0 → 0.92.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 (104) hide show
  1. package/dist/{PreviewEditorSidebar-3TT47WCF.mjs → PreviewEditorSidebar-3CI5MKV3.mjs} +2 -2
  2. package/dist/{PreviewEditorUI-ORCLLUNZ.mjs → PreviewEditorUI-DKEP636I.mjs} +2 -2
  3. package/dist/SdkPreviewModeRuntime-BRGRDQFH.mjs +8 -0
  4. package/dist/_dts/api/src/bookingConfig.d.ts +13 -1
  5. package/dist/_dts/api/src/bookingOperations.d.ts +1 -0
  6. package/dist/_dts/api/src/bookingRefundOutcomes.d.ts +6 -6
  7. package/dist/_dts/api/src/customerMembershipOutcomes.d.ts +4 -4
  8. package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +6 -0
  9. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +32 -0
  10. package/dist/_dts/blocks/src/system/blocks/courses/shared/pricing.d.ts +12 -1
  11. package/dist/_dts/blocks/src/system/blocks/courses/shared/schemas.d.ts +12 -0
  12. package/dist/_dts/blocks/src/system/blocks/courses/shared/types.d.ts +4 -1
  13. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +44 -0
  14. package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +7 -0
  15. package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +8 -1
  16. package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.d.ts +8 -1
  17. package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.state.d.ts +1 -0
  18. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +4 -0
  19. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.interactive.d.ts +40 -0
  20. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.reserved-fields.d.ts +1 -1
  21. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.state.d.ts +29 -0
  22. package/dist/_dts/blocks/src/system/runtime/nodes/booking-runtime-sources.d.ts +1 -0
  23. package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/components.d.ts +6 -0
  24. package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationWizard.d.ts +8 -0
  25. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/TicketSelectionStep.d.ts +8 -0
  26. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +1 -0
  27. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +1 -1
  28. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +1 -0
  29. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +9 -0
  30. package/dist/_dts/content-model/src/entry-slots/types.d.ts +110 -2
  31. package/dist/_dts/core/src/branded.d.ts +3 -0
  32. package/dist/_dts/core/src/event-pricing.d.ts +18 -1
  33. package/dist/_dts/core/src/money-input.d.ts +34 -4
  34. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +70 -0
  35. package/dist/_dts/media-core/src/fileAssetCompatibility.d.ts +1 -1
  36. package/dist/_dts/media-core/src/filePersistence.d.ts +5 -1
  37. package/dist/_dts/media-core/src/fileStorage.d.ts +1 -0
  38. package/dist/_dts/media-core/src/videoPrep.d.ts +15 -6
  39. package/dist/_dts/media-core/src/videoSlotPolicy.d.ts +5 -5
  40. package/dist/_dts/sdk/src/cli/commands/push/execute/diff.d.ts +2 -0
  41. package/dist/_dts/sdk/src/cli/commands/push/execute/localMediaReporting.d.ts +23 -0
  42. package/dist/_dts/sdk/src/cli/commands/push/scopes/commandBackedDatedOfferingScope.d.ts +54 -0
  43. package/dist/_dts/sdk/src/cli/commands/push/scopes/mediaPrep.d.ts +7 -2
  44. package/dist/_dts/sdk/src/cli/commands/push/scopes/types.d.ts +6 -0
  45. package/dist/_dts/sdk/src/cli/media/local-sync.d.ts +35 -0
  46. package/dist/_dts/sdk/src/rendering/islands/types.d.ts +23 -1
  47. package/dist/_dts/sdk/src/version.d.ts +1 -1
  48. package/dist/{chunk-AFPMCLS7.mjs → chunk-6D7PLF4M.mjs} +1 -1
  49. package/dist/{chunk-RQUZYSES.mjs → chunk-I6EOKV6B.mjs} +520 -40
  50. package/dist/{chunk-S3YHJWEU.mjs → chunk-LERKJM3E.mjs} +5 -5
  51. package/dist/{chunk-GDT2QGIL.mjs → chunk-UOMTCHZD.mjs} +1 -1
  52. package/dist/cli/index.mjs +552 -80
  53. package/dist/client/{accordion-AFX37652.mjs → accordion-BUDH2G3S.mjs} +2 -2
  54. package/dist/client/{bookingForm-32V5QCOW.mjs → bookingForm-NQMCELVB.mjs} +89 -14
  55. package/dist/client/bookings.mjs +243 -17
  56. package/dist/client/{carousel-TJGQJ7ER.mjs → carousel-ONCEW6IJ.mjs} +3 -3
  57. package/dist/client/{cart-JUU2JEW4.mjs → cart-V2TCK2GI.mjs} +7 -7
  58. package/dist/client/{checkout-RD6BTFX4.mjs → checkout-ZI7SWNCS.mjs} +7 -7
  59. package/dist/client/{chunk-FMZZHAIR.mjs → chunk-AUMRQ242.mjs} +52 -5
  60. package/dist/client/{chunk-PMNAV6LO.mjs → chunk-B5UC2D6X.mjs} +7 -6
  61. package/dist/client/{chunk-6RN62XBV.mjs → chunk-ERQDHUS2.mjs} +1 -1
  62. package/dist/client/{chunk-RWYFG625.mjs → chunk-GH6IIOOE.mjs} +30 -2
  63. package/dist/client/{chunk-C4LP6BPG.mjs → chunk-HQWIJLYN.mjs} +1 -1
  64. package/dist/client/{chunk-RMOFBBNA.mjs → chunk-JXY6NHG6.mjs} +6 -6
  65. package/dist/client/{chunk-6QZIBNGV.mjs → chunk-KXYEKEV6.mjs} +154 -16
  66. package/dist/client/{chunk-E6VIWZUG.mjs → chunk-N2WJPTF7.mjs} +3 -3
  67. package/dist/client/{chunk-ISAUXU5R.mjs → chunk-QQNVQ62W.mjs} +1 -1
  68. package/dist/client/{chunk-MLBNVN4H.mjs → chunk-R3CZQLXF.mjs} +67 -4
  69. package/dist/client/{chunk-WHZQDPBZ.mjs → chunk-TNGL2WJF.mjs} +1 -0
  70. package/dist/client/{chunk-CKXEUWWA.mjs → chunk-ZJDBOLX7.mjs} +3 -3
  71. package/dist/client/client.mjs +515 -38
  72. package/dist/client/{courseRegistration-X63QAIVV.mjs → courseRegistration-JPWAQ6KM.mjs} +111 -11
  73. package/dist/client/{eventCalendar-5T24GCZL.mjs → eventCalendar-QDOCHBBV.mjs} +9 -9
  74. package/dist/client/{eventCombined-AZVTF22X.mjs → eventCombined-ZS2CXSIE.mjs} +9 -9
  75. package/dist/client/{eventDetails-7GPFNLGF.mjs → eventDetails-5LOBMPLN.mjs} +9 -9
  76. package/dist/client/{eventListing-QEUMTMUM.mjs → eventListing-SBGY4I3L.mjs} +9 -9
  77. package/dist/client/{eventRegistration-P2EDKCQZ.mjs → eventRegistration-XGPIU3Z2.mjs} +9 -9
  78. package/dist/client/{form-NUJ7H4IN.mjs → form-R7D4LZWW.mjs} +3 -3
  79. package/dist/client/{headerSection-JB7LECPL.mjs → headerSection-RRLYUCGC.mjs} +3 -3
  80. package/dist/client/hooks.mjs +22 -2
  81. package/dist/client/{locationMap-UEYWUCSW.mjs → locationMap-35ZJMRBZ.mjs} +3 -3
  82. package/dist/client/{newsletterForm-S2YZQ2X7.mjs → newsletterForm-MJ2VCFUT.mjs} +3 -3
  83. package/dist/client/{productDetail-H5MADGG7.mjs → productDetail-2O7YQNBX.mjs} +7 -7
  84. package/dist/client/{productList-DK7YON7H.mjs → productList-FDP5BH7W.mjs} +7 -7
  85. package/dist/client/rendering/client.mjs +495 -36
  86. package/dist/client/rendering/islands.mjs +19 -19
  87. package/dist/client/rendering.mjs +514 -37
  88. package/dist/client/{shop-6PA7RDRJ.mjs → shop-BGYJ3LDT.mjs} +7 -7
  89. package/dist/preview-next/client/runtime.mjs +3 -3
  90. package/dist/{sdk-runtime-JP5347OB.mjs → sdk-runtime-B3TFXRXZ.mjs} +4 -4
  91. package/dist/server/components.mjs +166 -7
  92. package/dist/server/config-validation.mjs +23 -2
  93. package/dist/server/config.mjs +23 -2
  94. package/dist/server/data.mjs +22 -2
  95. package/dist/server/index.mjs +1 -1
  96. package/dist/server/next.mjs +167 -8
  97. package/dist/server/page-converter.mjs +19 -2
  98. package/dist/server/prebuild.mjs +1 -1
  99. package/dist/server/rendering/server.mjs +166 -7
  100. package/dist/server/rendering.mjs +166 -7
  101. package/dist/server/routing.mjs +29 -5
  102. package/dist/server/server.mjs +23 -3
  103. package/package.json +1 -1
  104. package/dist/SdkPreviewModeRuntime-GMCDQPZZ.mjs +0 -8
@@ -1,15 +1,15 @@
1
1
  "use client";
2
- import { useWaitlistClaim, resolveCoursePricingState, formatCoursePriceDisplay, formatCoursePriceAmount, MagicLinkForm } from './chunk-FMZZHAIR.mjs';
3
- import { SpinnerNode } from './chunk-ISAUXU5R.mjs';
2
+ import { useWaitlistClaim, resolveCoursePricingState, formatCoursePriceDisplay, formatCoursePriceAmount, MagicLinkForm } from './chunk-AUMRQ242.mjs';
3
+ import { SpinnerNode } from './chunk-QQNVQ62W.mjs';
4
4
  import { buildRouteIslandApiConfig } from './chunk-L4J5Y62O.mjs';
5
- import { DiscountCodeDisclosure, useDiscountCodeUi, getStepNumber, logoutPortal, StepIndicator, LoggedInAsUser, CheckIcon, formatPrice, TerminalPanel, StateIcon, ClockIcon, CrossIcon, scrollToBlock, buildCheckoutReturnUrls, MembershipHero, validateFormData } from './chunk-CKXEUWWA.mjs';
5
+ import { DiscountCodeDisclosure, useDiscountCodeUi, getStepNumber, logoutPortal, StepIndicator, LoggedInAsUser, CheckIcon, formatPrice, TerminalPanel, StateIcon, ClockIcon, CrossIcon, scrollToBlock, buildCheckoutReturnUrls, MembershipHero, validateFormData } from './chunk-ZJDBOLX7.mjs';
6
6
  import { getFieldValidationControlProps, FieldValidationMessage } from './chunk-3DCJ45Z2.mjs';
7
7
  import { ModalShell } from './chunk-WBQG7VJA.mjs';
8
8
  import { AltchaWidget, getChallengeUrl, isSpamProtectionEnabled } from './chunk-LJCX6V7Q.mjs';
9
- import { BlockApiProvider, useBlockApi } from './chunk-WHZQDPBZ.mjs';
9
+ import { BlockApiProvider, useBlockApi } from './chunk-TNGL2WJF.mjs';
10
10
  import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
11
- import { defineIslandPropsDecoder, themeButtonClassName } from './chunk-MLBNVN4H.mjs';
12
- import { formatBookingDate, toScheduledBookingDateTime, toBookingTimeZone, formatBookingTime } from './chunk-RWYFG625.mjs';
11
+ import { defineIslandPropsDecoder, themeButtonClassName } from './chunk-R3CZQLXF.mjs';
12
+ import { formatBookingDate, toScheduledBookingDateTime, toBookingTimeZone, formatBookingTime } from './chunk-GH6IIOOE.mjs';
13
13
  import React2, { Component, useMemo, useState, useEffect } from 'react';
14
14
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
15
15
 
@@ -546,6 +546,44 @@ function CoursePricingSelector({
546
546
  )
547
547
  ] });
548
548
  }
549
+ function CourseSlidingScaleInput({
550
+ pricing,
551
+ value,
552
+ onChange
553
+ }) {
554
+ const slidingScale = pricing.slidingScale;
555
+ if (!slidingScale) {
556
+ return null;
557
+ }
558
+ const minLabel = formatCoursePriceAmount(slidingScale.minAmount, pricing.currency);
559
+ const maxLabel = formatCoursePriceAmount(slidingScale.maxAmount, pricing.currency);
560
+ const suggestedLabel = slidingScale.suggestedAmount !== null ? formatCoursePriceAmount(slidingScale.suggestedAmount, pricing.currency) : null;
561
+ return /* @__PURE__ */ jsxs("div", { className: "cr-form__field", children: [
562
+ /* @__PURE__ */ jsx("label", { htmlFor: "cr-sliding-amount", className: "cr-form__label", children: "Amount" }),
563
+ /* @__PURE__ */ jsx(
564
+ "input",
565
+ {
566
+ id: "cr-sliding-amount",
567
+ type: "number",
568
+ min: slidingScale.minAmount / 100,
569
+ max: slidingScale.maxAmount / 100,
570
+ step: "0.01",
571
+ inputMode: "decimal",
572
+ className: "cr-form__input",
573
+ value,
574
+ onChange: (event) => onChange(event.target.value)
575
+ }
576
+ ),
577
+ /* @__PURE__ */ jsxs("p", { className: "cr-text cr-text--muted", children: [
578
+ "Choose between ",
579
+ minLabel,
580
+ " and ",
581
+ maxLabel,
582
+ suggestedLabel ? `; suggested ${suggestedLabel}` : "",
583
+ "."
584
+ ] })
585
+ ] });
586
+ }
549
587
  function EnrollmentForm({ formData, errors, onChange, isEmailLocked, isLoading, onLogout }) {
550
588
  const nameErrorId = "cr-name-error";
551
589
  const emailErrorId = "cr-email-error";
@@ -628,6 +666,17 @@ function EnrollmentForm({ formData, errors, onChange, isEmailLocked, isLoading,
628
666
  ] })
629
667
  ] });
630
668
  }
669
+ function parseCurrencyInputToCents(value) {
670
+ const trimmed = value.trim();
671
+ if (!trimmed) return null;
672
+ const amount = Number(trimmed);
673
+ if (!Number.isFinite(amount) || amount < 0) return null;
674
+ return Math.round(amount * 100);
675
+ }
676
+ function formatCentsAsCurrencyInput(amount) {
677
+ const major = amount / 100;
678
+ return Number.isInteger(major) ? String(major) : major.toFixed(2);
679
+ }
631
680
  function shouldFetchCourseEligibility(course, hasPaidSelection, portalAuthState, hasWaitlistClaimToken) {
632
681
  if (!course || portalAuthState === "checking") return false;
633
682
  if (hasWaitlistClaimToken) return false;
@@ -645,12 +694,27 @@ function getSessionIdFromUrl() {
645
694
  }
646
695
  function getMissingCoursePricingSelectionMessage(pricing) {
647
696
  if (pricing?.requiresSelection && !pricing.selectedOption) {
697
+ if (pricing.slidingScale) {
698
+ return "Choose an amount to continue.";
699
+ }
648
700
  return "Choose a pricing option to continue.";
649
701
  }
702
+ if (pricing?.slidingScale && pricing.selectedSlidingAmount !== null && pricing.selectedSlidingAmount < pricing.slidingScale.minAmount) {
703
+ return "Choose an amount within the sliding scale.";
704
+ }
705
+ if (pricing?.slidingScale && pricing.selectedSlidingAmount !== null && pricing.selectedSlidingAmount > pricing.slidingScale.maxAmount) {
706
+ return "Choose an amount within the sliding scale.";
707
+ }
650
708
  return null;
651
709
  }
652
710
  function buildCoursePricingOptionPayload(pricing) {
653
- return pricing?.selectedOption ? { pricingOptionId: pricing.selectedOption.id } : {};
711
+ if (pricing?.selectedOption) {
712
+ return { pricingOptionId: pricing.selectedOption.id };
713
+ }
714
+ if (pricing?.slidingScale && pricing.selectedSlidingAmount !== null) {
715
+ return { selectedSlidingAmount: pricing.selectedSlidingAmount };
716
+ }
717
+ return {};
654
718
  }
655
719
  function resolveHasCoursePayment(pricing) {
656
720
  if (!pricing) {
@@ -691,6 +755,7 @@ function useCourseRegistrationWizard(props) {
691
755
  scopedCourses.length === 1 ? scopedCourses[0] ?? null : null
692
756
  );
693
757
  const [selectedPricingOptionId, setSelectedPricingOptionId] = useState(null);
758
+ const [selectedSlidingAmountInput, setSelectedSlidingAmountInput] = useState("");
694
759
  const [formData, setFormData] = useState({
695
760
  name: "",
696
761
  email: "",
@@ -712,8 +777,12 @@ function useCourseRegistrationWizard(props) {
712
777
  const [bookingMode, setBookingMode] = useState(null);
713
778
  const waitlistClaim = useWaitlistClaim();
714
779
  const selectedCoursePricing = useMemo(
715
- () => selectedCourse ? resolveCoursePricingState(selectedCourse, selectedPricingOptionId) : null,
716
- [selectedCourse, selectedPricingOptionId]
780
+ () => selectedCourse ? resolveCoursePricingState(
781
+ selectedCourse,
782
+ selectedPricingOptionId,
783
+ parseCurrencyInputToCents(selectedSlidingAmountInput)
784
+ ) : null,
785
+ [selectedCourse, selectedPricingOptionId, selectedSlidingAmountInput]
717
786
  );
718
787
  const missingPricingSelectionMessage = getMissingCoursePricingSelectionMessage(
719
788
  selectedCoursePricing
@@ -786,9 +855,13 @@ function useCourseRegistrationWizard(props) {
786
855
  useEffect(() => {
787
856
  if (!selectedCourse) {
788
857
  setSelectedPricingOptionId(null);
858
+ setSelectedSlidingAmountInput("");
789
859
  return;
790
860
  }
791
861
  const defaultPricing = resolveCoursePricingState(selectedCourse, null);
862
+ setSelectedSlidingAmountInput(
863
+ defaultPricing.slidingScale?.suggestedAmount !== null && defaultPricing.slidingScale?.suggestedAmount !== void 0 ? formatCentsAsCurrencyInput(defaultPricing.slidingScale.suggestedAmount) : ""
864
+ );
792
865
  setSelectedPricingOptionId((previous) => {
793
866
  if (previous && defaultPricing.selectableOptions.some((option) => option.id === previous)) {
794
867
  return previous;
@@ -1163,6 +1236,8 @@ function useCourseRegistrationWizard(props) {
1163
1236
  selectedCourse,
1164
1237
  selectedPricingOptionId,
1165
1238
  setSelectedPricingOptionId,
1239
+ selectedSlidingAmountInput,
1240
+ setSelectedSlidingAmountInput,
1166
1241
  selectedCoursePricing,
1167
1242
  setSelectedCourse,
1168
1243
  formData,
@@ -1210,6 +1285,19 @@ function useCourseRegistrationWizard(props) {
1210
1285
  handleBookingModeChange
1211
1286
  };
1212
1287
  }
1288
+ function getCourseSlidingScaleMessage(pricing) {
1289
+ if (!pricing.slidingScale) {
1290
+ return null;
1291
+ }
1292
+ const selectedAmount = pricing.selectedSlidingAmount;
1293
+ if (selectedAmount === null) {
1294
+ return "Choose an amount to continue.";
1295
+ }
1296
+ if (selectedAmount < pricing.slidingScale.minAmount || selectedAmount > pricing.slidingScale.maxAmount) {
1297
+ return "Choose an amount within the sliding scale.";
1298
+ }
1299
+ return null;
1300
+ }
1213
1301
  function CourseRegistrationWizard(props) {
1214
1302
  const {
1215
1303
  showSessions = true,
@@ -1231,6 +1319,8 @@ function CourseRegistrationWizard(props) {
1231
1319
  selectedCourse,
1232
1320
  selectedPricingOptionId,
1233
1321
  setSelectedPricingOptionId,
1322
+ selectedSlidingAmountInput,
1323
+ setSelectedSlidingAmountInput,
1234
1324
  selectedCoursePricing,
1235
1325
  formData,
1236
1326
  setFormData,
@@ -1301,7 +1391,8 @@ function CourseRegistrationWizard(props) {
1301
1391
  const canShowDiscountUi = !discountsAvailableLoading && paymentChoice === "checkout" && discountsAvailable && manualCodeEntryAllowed;
1302
1392
  const courseSoldOut = waitlistClaim.claim === null && courseEligibility?.isFull === true && courseEligibility.canJoinWaitlist !== true;
1303
1393
  const detailsSubmitLabel = courseEligibility?.canJoinWaitlist ? "Join waitlist" : buttonText;
1304
- const pricingSelectionMissing = selectedCoursePricing?.requiresSelection === true && !selectedCoursePricing.selectedOption;
1394
+ const pricingSelectionMissing = selectedCoursePricing?.requiresSelection === true && !selectedCoursePricing.selectedOption && !selectedCoursePricing.slidingScale;
1395
+ const slidingScaleMessage = selectedCoursePricing ? getCourseSlidingScaleMessage(selectedCoursePricing) : null;
1305
1396
  const pricingUnavailable = selectedCoursePricing?.display.kind === "unavailable";
1306
1397
  const selectedCourseWithPricing = selectedCourse && selectedCoursePricing ? {
1307
1398
  course: selectedCourse,
@@ -1394,6 +1485,14 @@ function CourseRegistrationWizard(props) {
1394
1485
  onSelect: setSelectedPricingOptionId
1395
1486
  }
1396
1487
  ),
1488
+ /* @__PURE__ */ jsx(
1489
+ CourseSlidingScaleInput,
1490
+ {
1491
+ pricing: selectedCourseWithPricing.pricing,
1492
+ value: selectedSlidingAmountInput,
1493
+ onChange: setSelectedSlidingAmountInput
1494
+ }
1495
+ ),
1397
1496
  showSpamProtection && /* @__PURE__ */ jsx("div", { className: "cr-altcha", children: /* @__PURE__ */ jsx(
1398
1497
  AltchaWidget,
1399
1498
  {
@@ -1431,7 +1530,7 @@ function CourseRegistrationWizard(props) {
1431
1530
  {
1432
1531
  type: "submit",
1433
1532
  className: buttonClass,
1434
- disabled: courseSoldOut || eligibilityLoading || pricingSelectionMissing || pricingUnavailable,
1533
+ disabled: courseSoldOut || eligibilityLoading || pricingSelectionMissing || slidingScaleMessage !== null || pricingUnavailable,
1435
1534
  children: eligibilityLoading ? "Checking availability\u2026" : courseSoldOut ? "Sold out" : detailsSubmitLabel
1436
1535
  }
1437
1536
  )
@@ -1441,6 +1540,7 @@ function CourseRegistrationWizard(props) {
1441
1540
  ),
1442
1541
  courseSoldOut && /* @__PURE__ */ jsx("p", { className: "cr-text cr-text--muted", children: "This course is fully booked and there is no waitlist available right now." }),
1443
1542
  pricingSelectionMissing && /* @__PURE__ */ jsx("p", { className: "cr-text cr-text--muted", children: "Choose a pricing option to continue." }),
1543
+ slidingScaleMessage && /* @__PURE__ */ jsx("p", { className: "cr-text cr-text--muted", children: slidingScaleMessage }),
1444
1544
  pricingUnavailable && /* @__PURE__ */ jsx("p", { className: "cr-text cr-text--muted", children: "Pricing is not available for this course right now." }),
1445
1545
  eligibilityError && /* @__PURE__ */ jsx("p", { className: "cr-text cr-text--error", children: eligibilityError })
1446
1546
  ] })
@@ -1,18 +1,18 @@
1
- import { EventCalendarClient } from './chunk-6QZIBNGV.mjs';
2
- import './chunk-C4LP6BPG.mjs';
3
- import './chunk-FMZZHAIR.mjs';
1
+ import { EventCalendarClient } from './chunk-KXYEKEV6.mjs';
2
+ import './chunk-HQWIJLYN.mjs';
3
+ import './chunk-AUMRQ242.mjs';
4
4
  import './chunk-6N7YRNYU.mjs';
5
- import './chunk-E6VIWZUG.mjs';
6
- import './chunk-ISAUXU5R.mjs';
5
+ import './chunk-N2WJPTF7.mjs';
6
+ import './chunk-QQNVQ62W.mjs';
7
7
  import { buildRouteIslandApiConfig } from './chunk-L4J5Y62O.mjs';
8
- import './chunk-CKXEUWWA.mjs';
8
+ import './chunk-ZJDBOLX7.mjs';
9
9
  import './chunk-3DCJ45Z2.mjs';
10
10
  import './chunk-WBQG7VJA.mjs';
11
11
  import './chunk-LJCX6V7Q.mjs';
12
- import { BlockApiProvider } from './chunk-WHZQDPBZ.mjs';
12
+ import { BlockApiProvider } from './chunk-TNGL2WJF.mjs';
13
13
  import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
14
- import { defineIslandPropsDecoder } from './chunk-MLBNVN4H.mjs';
15
- import './chunk-RWYFG625.mjs';
14
+ import { defineIslandPropsDecoder } from './chunk-R3CZQLXF.mjs';
15
+ import './chunk-GH6IIOOE.mjs';
16
16
  import { jsx } from 'react/jsx-runtime';
17
17
 
18
18
  var decode = defineIslandPropsDecoder("event-calendar");
@@ -1,18 +1,18 @@
1
- import { EventCombinedIslandClient } from './chunk-6QZIBNGV.mjs';
2
- import './chunk-C4LP6BPG.mjs';
3
- import './chunk-FMZZHAIR.mjs';
1
+ import { EventCombinedIslandClient } from './chunk-KXYEKEV6.mjs';
2
+ import './chunk-HQWIJLYN.mjs';
3
+ import './chunk-AUMRQ242.mjs';
4
4
  import './chunk-6N7YRNYU.mjs';
5
- import './chunk-E6VIWZUG.mjs';
6
- import './chunk-ISAUXU5R.mjs';
5
+ import './chunk-N2WJPTF7.mjs';
6
+ import './chunk-QQNVQ62W.mjs';
7
7
  import { buildRouteIslandApiConfig } from './chunk-L4J5Y62O.mjs';
8
- import './chunk-CKXEUWWA.mjs';
8
+ import './chunk-ZJDBOLX7.mjs';
9
9
  import './chunk-3DCJ45Z2.mjs';
10
10
  import './chunk-WBQG7VJA.mjs';
11
11
  import './chunk-LJCX6V7Q.mjs';
12
- import { BlockApiProvider } from './chunk-WHZQDPBZ.mjs';
12
+ import { BlockApiProvider } from './chunk-TNGL2WJF.mjs';
13
13
  import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
14
- import { defineIslandPropsDecoder } from './chunk-MLBNVN4H.mjs';
15
- import './chunk-RWYFG625.mjs';
14
+ import { defineIslandPropsDecoder } from './chunk-R3CZQLXF.mjs';
15
+ import './chunk-GH6IIOOE.mjs';
16
16
  import { jsx } from 'react/jsx-runtime';
17
17
 
18
18
  var decode = defineIslandPropsDecoder("event-combined");
@@ -1,17 +1,17 @@
1
- import { EventDetailsIslandClient } from './chunk-6QZIBNGV.mjs';
2
- import './chunk-C4LP6BPG.mjs';
3
- import './chunk-FMZZHAIR.mjs';
1
+ import { EventDetailsIslandClient } from './chunk-KXYEKEV6.mjs';
2
+ import './chunk-HQWIJLYN.mjs';
3
+ import './chunk-AUMRQ242.mjs';
4
4
  import './chunk-6N7YRNYU.mjs';
5
- import './chunk-E6VIWZUG.mjs';
6
- import './chunk-ISAUXU5R.mjs';
7
- import './chunk-CKXEUWWA.mjs';
5
+ import './chunk-N2WJPTF7.mjs';
6
+ import './chunk-QQNVQ62W.mjs';
7
+ import './chunk-ZJDBOLX7.mjs';
8
8
  import './chunk-3DCJ45Z2.mjs';
9
9
  import './chunk-WBQG7VJA.mjs';
10
10
  import './chunk-LJCX6V7Q.mjs';
11
- import './chunk-WHZQDPBZ.mjs';
11
+ import './chunk-TNGL2WJF.mjs';
12
12
  import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
13
- import { defineIslandPropsDecoder } from './chunk-MLBNVN4H.mjs';
14
- import './chunk-RWYFG625.mjs';
13
+ import { defineIslandPropsDecoder } from './chunk-R3CZQLXF.mjs';
14
+ import './chunk-GH6IIOOE.mjs';
15
15
  import { jsx } from 'react/jsx-runtime';
16
16
 
17
17
  var decode = defineIslandPropsDecoder("event-details");
@@ -1,18 +1,18 @@
1
- import { EventListingClient } from './chunk-6QZIBNGV.mjs';
2
- import './chunk-C4LP6BPG.mjs';
3
- import './chunk-FMZZHAIR.mjs';
1
+ import { EventListingClient } from './chunk-KXYEKEV6.mjs';
2
+ import './chunk-HQWIJLYN.mjs';
3
+ import './chunk-AUMRQ242.mjs';
4
4
  import './chunk-6N7YRNYU.mjs';
5
- import './chunk-E6VIWZUG.mjs';
6
- import './chunk-ISAUXU5R.mjs';
5
+ import './chunk-N2WJPTF7.mjs';
6
+ import './chunk-QQNVQ62W.mjs';
7
7
  import { buildRouteIslandApiConfig } from './chunk-L4J5Y62O.mjs';
8
- import './chunk-CKXEUWWA.mjs';
8
+ import './chunk-ZJDBOLX7.mjs';
9
9
  import './chunk-3DCJ45Z2.mjs';
10
10
  import './chunk-WBQG7VJA.mjs';
11
11
  import './chunk-LJCX6V7Q.mjs';
12
- import { BlockApiProvider } from './chunk-WHZQDPBZ.mjs';
12
+ import { BlockApiProvider } from './chunk-TNGL2WJF.mjs';
13
13
  import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
14
- import { defineIslandPropsDecoder } from './chunk-MLBNVN4H.mjs';
15
- import './chunk-RWYFG625.mjs';
14
+ import { defineIslandPropsDecoder } from './chunk-R3CZQLXF.mjs';
15
+ import './chunk-GH6IIOOE.mjs';
16
16
  import { jsx } from 'react/jsx-runtime';
17
17
 
18
18
  var decode = defineIslandPropsDecoder("event-listing");
@@ -1,18 +1,18 @@
1
- import { EventRegistrationIslandClient } from './chunk-6QZIBNGV.mjs';
2
- import './chunk-C4LP6BPG.mjs';
3
- import './chunk-FMZZHAIR.mjs';
1
+ import { EventRegistrationIslandClient } from './chunk-KXYEKEV6.mjs';
2
+ import './chunk-HQWIJLYN.mjs';
3
+ import './chunk-AUMRQ242.mjs';
4
4
  import './chunk-6N7YRNYU.mjs';
5
- import './chunk-E6VIWZUG.mjs';
6
- import './chunk-ISAUXU5R.mjs';
5
+ import './chunk-N2WJPTF7.mjs';
6
+ import './chunk-QQNVQ62W.mjs';
7
7
  import { buildRouteIslandApiConfig } from './chunk-L4J5Y62O.mjs';
8
- import './chunk-CKXEUWWA.mjs';
8
+ import './chunk-ZJDBOLX7.mjs';
9
9
  import './chunk-3DCJ45Z2.mjs';
10
10
  import './chunk-WBQG7VJA.mjs';
11
11
  import './chunk-LJCX6V7Q.mjs';
12
- import { BlockApiProvider } from './chunk-WHZQDPBZ.mjs';
12
+ import { BlockApiProvider } from './chunk-TNGL2WJF.mjs';
13
13
  import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
14
- import { defineIslandPropsDecoder } from './chunk-MLBNVN4H.mjs';
15
- import './chunk-RWYFG625.mjs';
14
+ import { defineIslandPropsDecoder } from './chunk-R3CZQLXF.mjs';
15
+ import './chunk-GH6IIOOE.mjs';
16
16
  import { jsx } from 'react/jsx-runtime';
17
17
 
18
18
  var decode = defineIslandPropsDecoder("event-registration");
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import { isSpamProtectionEnabled, AltchaWidget, getChallengeUrl } from './chunk-LJCX6V7Q.mjs';
3
- import { BlockApiProvider, FeedbackMessage, useBlockApi } from './chunk-WHZQDPBZ.mjs';
3
+ import { BlockApiProvider, FeedbackMessage, useBlockApi } from './chunk-TNGL2WJF.mjs';
4
4
  import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
5
- import { defineIslandPropsDecoder, themeButtonClassName, assertNever, err, ok } from './chunk-MLBNVN4H.mjs';
6
- import { clsx_default } from './chunk-RWYFG625.mjs';
5
+ import { defineIslandPropsDecoder, themeButtonClassName, assertNever, err, ok } from './chunk-R3CZQLXF.mjs';
6
+ import { clsx_default } from './chunk-GH6IIOOE.mjs';
7
7
  import { useState, useReducer, useRef } from 'react';
8
8
  import { jsx, jsxs } from 'react/jsx-runtime';
9
9
 
@@ -1,8 +1,8 @@
1
1
  "use client";
2
- import { useCommerceCart } from './chunk-6RN62XBV.mjs';
2
+ import { useCommerceCart } from './chunk-ERQDHUS2.mjs';
3
3
  import { resolveDedicatedCheckoutPath, ModalShell } from './chunk-WBQG7VJA.mjs';
4
- import { defineIslandPropsDecoder, buildCartDisplay, themeButtonClassName } from './chunk-MLBNVN4H.mjs';
5
- import './chunk-RWYFG625.mjs';
4
+ import { defineIslandPropsDecoder, buildCartDisplay, themeButtonClassName } from './chunk-R3CZQLXF.mjs';
5
+ import './chunk-GH6IIOOE.mjs';
6
6
  import * as React2 from 'react';
7
7
  import { createPortal } from 'react-dom';
8
8
  import { createRoot } from 'react-dom/client';
@@ -6502,6 +6502,7 @@ function publicEventPricingType(pricing) {
6502
6502
  return "free";
6503
6503
  case "single_paid":
6504
6504
  case "ticket_types":
6505
+ case "sliding_scale":
6505
6506
  case "course":
6506
6507
  return isFreePublicEventPriceDisplay(pricing.display) ? "free" : "paid";
6507
6508
  case "external":
@@ -28049,9 +28050,12 @@ var coursePricingOptionSchema = z42.object({
28049
28050
  });
28050
28051
  var coursePricingSchema = z42.object({
28051
28052
  bookingRequirement: z42.enum(["none", "required"]),
28052
- pricingStrategy: z42.enum(["free", "single", "tiered"]),
28053
+ pricingStrategy: z42.enum(["free", "single", "tiered", "sliding_scale"]),
28053
28054
  currency: z42.string(),
28054
28055
  singlePriceAmount: z42.number().nullable(),
28056
+ slidingMinAmount: z42.number().nullable().optional(),
28057
+ slidingMaxAmount: z42.number().nullable().optional(),
28058
+ slidingSuggestedAmount: z42.number().nullable().optional(),
28055
28059
  paymentTerms: blockBookingPaymentTermsSchema,
28056
28060
  options: z42.array(coursePricingOptionSchema)
28057
28061
  });
@@ -28205,6 +28209,19 @@ var publicEventPricingSchema = z43.discriminatedUnion("kind", [
28205
28209
  ticketTypes: z43.array(publicEventTicketTypeSchema),
28206
28210
  display: publicEventTicketTypePriceDisplaySchema
28207
28211
  }),
28212
+ z43.object({
28213
+ kind: z43.literal("sliding_scale"),
28214
+ minAmount: z43.number(),
28215
+ maxAmount: z43.number(),
28216
+ suggestedAmount: z43.number().nullable(),
28217
+ currency: z43.string(),
28218
+ display: z43.object({
28219
+ kind: z43.literal("range"),
28220
+ minAmount: z43.number(),
28221
+ maxAmount: z43.number(),
28222
+ currency: z43.string()
28223
+ })
28224
+ }),
28208
28225
  z43.object({
28209
28226
  kind: z43.literal("course"),
28210
28227
  display: z43.object({ kind: z43.literal("course"), display: publicCoursePriceDisplaySchema })
@@ -28621,7 +28638,7 @@ function isRecord4(value) {
28621
28638
  }
28622
28639
  function isPublicEventPricing(value) {
28623
28640
  if (!isRecord4(value) || typeof value.kind !== "string") return false;
28624
- return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "ticket_types" || value.kind === "course" || value.kind === "external";
28641
+ return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "sliding_scale" || value.kind === "ticket_types" || value.kind === "course" || value.kind === "external";
28625
28642
  }
28626
28643
  function isPublicEventTicketType(value) {
28627
28644
  return isRecord4(value) && typeof value.id === "string";
@@ -38831,6 +38848,7 @@ var CANONICAL_REFUND_CONFLICT_CODES = [
38831
38848
  ];
38832
38849
  var CANONICAL_REFUND_PLANNER_ERROR_CODES = [
38833
38850
  ...CANONICAL_REFUND_CONFLICT_CODES,
38851
+ "invalid_amount",
38834
38852
  "amount_exceeds_remaining",
38835
38853
  "pass_revoke_requires_full_refund",
38836
38854
  "refund_failed"
@@ -38857,6 +38875,7 @@ var CUSTOMER_MEMBERSHIP_PAYMENT_REFUND_FAILED_CODES = [
38857
38875
  // ../api/src/bookingRefundOutcomes.ts
38858
38876
  var STANDARD_LINE_ITEM_REFUND_INVALID_CODES = [
38859
38877
  "missing_amount",
38878
+ "invalid_amount",
38860
38879
  "amount_exceeds_remaining",
38861
38880
  "credit_refunds_disabled",
38862
38881
  "missing_credit_customer",
@@ -38871,6 +38890,7 @@ var EVENT_ATTENDEE_REFUND_INVALID_CODES = [
38871
38890
  var MANAGED_PRODUCT_REFUND_INVALID_CODES = [
38872
38891
  "credit_refunds_disabled",
38873
38892
  "not_refundable",
38893
+ "invalid_amount",
38874
38894
  "amount_exceeds_remaining"
38875
38895
  ];
38876
38896
  var CUSTOMER_PASS_REFUND_INVALID_CODES = [
@@ -1,7 +1,7 @@
1
- import { LeafletStaticMap } from './chunk-C4LP6BPG.mjs';
1
+ import { LeafletStaticMap } from './chunk-HQWIJLYN.mjs';
2
2
  import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
3
- import { defineIslandPropsDecoder } from './chunk-MLBNVN4H.mjs';
4
- import { normalizeLocationAddressText, toLocationCoordinates, textColorStyle, mergeStyles, borderColorStyle, backgroundColorStyle } from './chunk-RWYFG625.mjs';
3
+ import { defineIslandPropsDecoder } from './chunk-R3CZQLXF.mjs';
4
+ import { normalizeLocationAddressText, toLocationCoordinates, textColorStyle, mergeStyles, borderColorStyle, backgroundColorStyle } from './chunk-GH6IIOOE.mjs';
5
5
  import { jsx, jsxs } from 'react/jsx-runtime';
6
6
 
7
7
  // ../blocks/src/system/runtime/nodes/location-map.shared.ts
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import { getFieldValidationControlProps, FieldValidationMessage } from './chunk-3DCJ45Z2.mjs';
3
3
  import { isSpamProtectionEnabled, AltchaWidget, getChallengeUrl } from './chunk-LJCX6V7Q.mjs';
4
- import { BlockApiProvider, useBlockApi, FeedbackMessage } from './chunk-WHZQDPBZ.mjs';
4
+ import { BlockApiProvider, useBlockApi, FeedbackMessage } from './chunk-TNGL2WJF.mjs';
5
5
  import { mountReactIsland } from './chunk-N7PBWBWQ.mjs';
6
- import { defineIslandPropsDecoder, themeButtonClassName, assertNever } from './chunk-MLBNVN4H.mjs';
7
- import { clsx_default } from './chunk-RWYFG625.mjs';
6
+ import { defineIslandPropsDecoder, themeButtonClassName, assertNever } from './chunk-R3CZQLXF.mjs';
7
+ import { clsx_default } from './chunk-GH6IIOOE.mjs';
8
8
  import { useReducer, useState } from 'react';
9
9
  import { jsx, jsxs } from 'react/jsx-runtime';
10
10
 
@@ -1,15 +1,15 @@
1
- import { mountShopBlockIsland, ProductDetailClient } from './chunk-RMOFBBNA.mjs';
2
- import './chunk-6RN62XBV.mjs';
3
- import './chunk-PMNAV6LO.mjs';
1
+ import { mountShopBlockIsland, ProductDetailClient } from './chunk-JXY6NHG6.mjs';
2
+ import './chunk-ERQDHUS2.mjs';
3
+ import './chunk-B5UC2D6X.mjs';
4
4
  import './chunk-6N7YRNYU.mjs';
5
5
  import './chunk-L4J5Y62O.mjs';
6
- import './chunk-CKXEUWWA.mjs';
6
+ import './chunk-ZJDBOLX7.mjs';
7
7
  import './chunk-3DCJ45Z2.mjs';
8
8
  import './chunk-WBQG7VJA.mjs';
9
- import './chunk-WHZQDPBZ.mjs';
9
+ import './chunk-TNGL2WJF.mjs';
10
10
  import './chunk-N7PBWBWQ.mjs';
11
- import { defineIslandPropsDecoder } from './chunk-MLBNVN4H.mjs';
12
- import './chunk-RWYFG625.mjs';
11
+ import { defineIslandPropsDecoder } from './chunk-R3CZQLXF.mjs';
12
+ import './chunk-GH6IIOOE.mjs';
13
13
 
14
14
  // src/rendering/islands/enhancers/productDetail.tsx
15
15
  var decode = defineIslandPropsDecoder("product-detail");
@@ -1,15 +1,15 @@
1
- import { mountShopBlockIsland, ProductListClient } from './chunk-RMOFBBNA.mjs';
2
- import './chunk-6RN62XBV.mjs';
3
- import './chunk-PMNAV6LO.mjs';
1
+ import { mountShopBlockIsland, ProductListClient } from './chunk-JXY6NHG6.mjs';
2
+ import './chunk-ERQDHUS2.mjs';
3
+ import './chunk-B5UC2D6X.mjs';
4
4
  import './chunk-6N7YRNYU.mjs';
5
5
  import './chunk-L4J5Y62O.mjs';
6
- import './chunk-CKXEUWWA.mjs';
6
+ import './chunk-ZJDBOLX7.mjs';
7
7
  import './chunk-3DCJ45Z2.mjs';
8
8
  import './chunk-WBQG7VJA.mjs';
9
- import './chunk-WHZQDPBZ.mjs';
9
+ import './chunk-TNGL2WJF.mjs';
10
10
  import './chunk-N7PBWBWQ.mjs';
11
- import { defineIslandPropsDecoder } from './chunk-MLBNVN4H.mjs';
12
- import './chunk-RWYFG625.mjs';
11
+ import { defineIslandPropsDecoder } from './chunk-R3CZQLXF.mjs';
12
+ import './chunk-GH6IIOOE.mjs';
13
13
 
14
14
  // src/rendering/islands/enhancers/productList.tsx
15
15
  var decode = defineIslandPropsDecoder("product-list");