@riverbankcms/sdk 0.84.2 → 0.88.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.
- package/dist/{PreviewEditorSidebar-4PH35ZIE.mjs → PreviewEditorSidebar-EVRS3C7T.mjs} +3 -3
- package/dist/{PreviewEditorUI-WHMCRJGM.mjs → PreviewEditorUI-54WD4IGE.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-ZALZDJEK.mjs +8 -0
- package/dist/_dts/ai/src/contracts/proposals.d.ts +684 -0
- package/dist/_dts/api/src/endpoints.d.ts +58 -14
- package/dist/_dts/api/src/index.d.ts +4 -1
- package/dist/_dts/api/src/launchReadiness.d.ts +3 -3
- package/dist/_dts/api/src/mailchimpIntegration.d.ts +215 -0
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +35 -15
- package/dist/_dts/api/src/siteInfrastructure.d.ts +0 -14
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +1 -13
- package/dist/_dts/api/src/types.d.ts +6 -3
- package/dist/_dts/blocks/src/PageRenderer.d.ts +1 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +4 -0
- package/dist/_dts/blocks/src/index.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/cart.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/collection.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +42 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +4 -0
- package/dist/_dts/blocks/src/system/blocks/faq.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +42 -42
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup-destination.d.ts +300 -0
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +63 -3
- package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +288 -288
- package/dist/_dts/blocks/src/system/fragments/library/newsletterForm.d.ts +53 -1
- package/dist/_dts/blocks/src/system/manifest/richTextSchema.d.ts +27 -0
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +23 -23
- package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +10 -2
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +12 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +11 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.interactive.d.ts +15 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.submission.d.ts +32 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +5 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/ModalShell.d.ts +5 -1
- package/dist/_dts/blocks/src/system/runtime/shared/utils/formatting.d.ts +1 -1
- package/dist/_dts/content-model/src/referenceFields.d.ts +1 -1
- package/dist/_dts/core/src/currency-format.d.ts +37 -2
- package/dist/_dts/core/src/event-pricing.d.ts +24 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +551 -20
- package/dist/_dts/editor-blocks/src/widgets/reference/loaders.d.ts +3 -1
- package/dist/_dts/sdk/src/cli/canonical-entry-policy.d.ts +53 -0
- package/dist/_dts/sdk/src/cli/commands/migrate.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/commands/pull.d.ts +7 -1
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/migrations/events.d.ts +73 -0
- package/dist/_dts/sdk/src/client/types.d.ts +9 -0
- package/dist/_dts/sdk/src/config/validation.d.ts +3 -0
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +3 -0
- package/dist/_dts/sdk/src/data/prefetchBlockData.d.ts +3 -9
- package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +1 -1
- package/dist/_dts/sdk/src/manifest/three-pass-converter.d.ts +7 -18
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +3 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +7 -3
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +4 -24
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +45 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +57 -0
- package/dist/_dts/surfaces/src/index.d.ts +12 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +9 -9
- package/dist/_dts/theme-core/src/schema.d.ts +11 -11
- package/dist/{chunk-ZR2GQK2A.mjs → chunk-7KOO7RPP.mjs} +953 -315
- package/dist/{chunk-OCGTXHSO.mjs → chunk-ER4UIW4X.mjs} +7 -7
- package/dist/{chunk-WFPYN7KA.mjs → chunk-HVOBXA3Y.mjs} +2 -2
- package/dist/{chunk-NFWGLRZZ.mjs → chunk-K3JWH6HE.mjs} +37 -3
- package/dist/{chunk-4QNLOTES.mjs → chunk-O4LVYUVH.mjs} +58 -14
- package/dist/{chunk-PYDHOMEO.mjs → chunk-YDMBIIS5.mjs} +1 -1
- package/dist/cli/index.mjs +1858 -512
- package/dist/client/{accordion-2UZPBMYM.mjs → accordion-PT5CGW5N.mjs} +2 -2
- package/dist/client/{bookingForm-36CWQUMV.mjs → bookingForm-2HLRTEYS.mjs} +7 -7
- package/dist/client/bookings.mjs +51 -6
- package/dist/client/{carousel-QH77HR6X.mjs → carousel-Z2LKYSWA.mjs} +3 -3
- package/dist/client/cart-ND5IK4A6.mjs +18 -0
- package/dist/client/checkout-EYUSGAY7.mjs +18 -0
- package/dist/client/{chunk-SYIJ5JO2.mjs → chunk-6DVPO44G.mjs} +1 -1
- package/dist/client/{chunk-3C2VTPWI.mjs → chunk-BAWHZ5GM.mjs} +176 -13
- package/dist/client/{chunk-52CGCQ7B.mjs → chunk-BL66UWGD.mjs} +10 -80
- package/dist/client/{chunk-VGDBVNOO.mjs → chunk-DIRW2LNG.mjs} +241 -210
- package/dist/client/{chunk-UDNSI5PY.mjs → chunk-GOFO7HRH.mjs} +1 -2
- package/dist/client/{chunk-ZKUO52W3.mjs → chunk-H4MHEXYS.mjs} +1 -1
- package/dist/client/{chunk-ZE5G642V.mjs → chunk-LI2C6M5O.mjs} +75 -1
- package/dist/client/{chunk-3DTWLTXM.mjs → chunk-MHBEWDT7.mjs} +117 -3
- package/dist/client/{chunk-4OXKTA3D.mjs → chunk-O5JNI3E4.mjs} +2 -2
- package/dist/client/{chunk-XSV6KW4D.mjs → chunk-S4G65LGR.mjs} +1 -1
- package/dist/client/{chunk-DVNUDUVT.mjs → chunk-WBQG7VJA.mjs} +4 -1
- package/dist/client/{chunk-F5VRX5Y6.mjs → chunk-WCVK4MBJ.mjs} +1 -1
- package/dist/client/{chunk-7UCLJ5SP.mjs → chunk-X7GVFB7Y.mjs} +4 -7
- package/dist/client/client.mjs +2125 -1403
- package/dist/client/{courseRegistration-TMKU6ABO.mjs → courseRegistration-H3AZBUEG.mjs} +7 -7
- package/dist/client/{eventCalendar-G6TI32X6.mjs → eventCalendar-FPKJGLGS.mjs} +10 -11
- package/dist/client/{eventCombined-SCKEMNAR.mjs → eventCombined-QCGIZBUY.mjs} +10 -11
- package/dist/client/{eventDetails-XPIFXXPK.mjs → eventDetails-HIT3BJWU.mjs} +10 -11
- package/dist/client/{eventListing-7QFMEMGT.mjs → eventListing-R4HNWJDN.mjs} +10 -11
- package/dist/client/{eventRegistration-TOODSZUI.mjs → eventRegistration-Q7BYY5HF.mjs} +10 -11
- package/dist/client/{form-MTCMVCZT.mjs → form-NI6YOG6S.mjs} +3 -3
- package/dist/client/{headerSection-Y5TMR3TW.mjs → headerSection-SDYGII36.mjs} +4 -4
- package/dist/client/hooks.mjs +1682 -1412
- package/dist/client/{locationMap-RH2LG7FZ.mjs → locationMap-BDETEUQD.mjs} +3 -4
- package/dist/client/{newsletterForm-PCAIPFMA.mjs → newsletterForm-EKYIU67X.mjs} +70 -22
- package/dist/client/{productDetail-OIGDR4YE.mjs → productDetail-5UTGNN76.mjs} +8 -9
- package/dist/client/{productList-4MA5S2CX.mjs → productList-7YA5KXZQ.mjs} +8 -9
- package/dist/client/rendering/client.mjs +753 -329
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +3786 -3034
- package/dist/client/shop-AIMUMZYC.mjs +20 -0
- package/dist/preview-next/before-render.mjs +58 -14
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/preview-next/editor-chrome.css +56 -9
- package/dist/preview-next/middleware.mjs +58 -14
- package/dist/{sdk-runtime-QLOCYKVU.mjs → sdk-runtime-NW472WNT.mjs} +6 -6
- package/dist/server/components.mjs +1518 -1015
- package/dist/server/config-validation.mjs +1719 -1461
- package/dist/server/config.mjs +1719 -1461
- package/dist/server/data.mjs +1683 -1413
- package/dist/server/index.mjs +79 -17
- package/dist/server/next.mjs +1902 -1311
- package/dist/server/page-converter.mjs +2193 -1169
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1709 -1209
- package/dist/server/rendering.mjs +1894 -1347
- package/dist/server/routing.mjs +1872 -1499
- package/dist/server/server.mjs +1571 -1264
- package/dist/server/theme-bridge.mjs +234 -0
- package/dist/styles/index.css +232 -0
- package/package.json +1 -1
- package/dist/SdkPreviewModeRuntime-4FGSVUYI.mjs +0 -8
- package/dist/client/cart-X4YK4FTW.mjs +0 -19
- package/dist/client/checkout-OM2BEPWD.mjs +0 -19
- package/dist/client/chunk-I2MMZO53.mjs +0 -6
- package/dist/client/shop-WXSYV5QO.mjs +0 -21
|
@@ -932,9 +932,8 @@ function createBlockApi(config) {
|
|
|
932
932
|
name: data.name,
|
|
933
933
|
company: data.company,
|
|
934
934
|
phone: data.phone,
|
|
935
|
-
|
|
935
|
+
target: data.target,
|
|
936
936
|
tags: data.tags,
|
|
937
|
-
blockId: data.blockId,
|
|
938
937
|
meta: data.meta
|
|
939
938
|
}
|
|
940
939
|
});
|
|
@@ -3052,6 +3051,59 @@ var init_collections = __esm({
|
|
|
3052
3051
|
}
|
|
3053
3052
|
});
|
|
3054
3053
|
|
|
3054
|
+
// ../core/src/assert-never.ts
|
|
3055
|
+
function assertNever2(value, message = "Unexpected variant") {
|
|
3056
|
+
throw new Error(`${message}: ${String(value)}`);
|
|
3057
|
+
}
|
|
3058
|
+
var init_assert_never = __esm({
|
|
3059
|
+
"../core/src/assert-never.ts"() {
|
|
3060
|
+
"use strict";
|
|
3061
|
+
}
|
|
3062
|
+
});
|
|
3063
|
+
|
|
3064
|
+
// ../core/src/currency-format.ts
|
|
3065
|
+
function resolveCurrencyLocale(currencyCode, override) {
|
|
3066
|
+
return override ?? CURRENCY_LOCALE_BY_CODE[currencyCode] ?? "en";
|
|
3067
|
+
}
|
|
3068
|
+
function formatCurrencyAmount(amountCents, currency, options) {
|
|
3069
|
+
const currencyCode = currency.toUpperCase();
|
|
3070
|
+
const locale = resolveCurrencyLocale(currencyCode, options?.locale);
|
|
3071
|
+
try {
|
|
3072
|
+
const exactFormatter = new Intl.NumberFormat(locale, {
|
|
3073
|
+
style: "currency",
|
|
3074
|
+
currency: currencyCode
|
|
3075
|
+
});
|
|
3076
|
+
const fractionDigits = options?.decimals === "auto" ? {
|
|
3077
|
+
minimumFractionDigits: 0,
|
|
3078
|
+
maximumFractionDigits: exactFormatter.resolvedOptions().maximumFractionDigits
|
|
3079
|
+
} : {};
|
|
3080
|
+
return new Intl.NumberFormat(locale, {
|
|
3081
|
+
style: "currency",
|
|
3082
|
+
currency: currencyCode,
|
|
3083
|
+
...fractionDigits
|
|
3084
|
+
}).format(amountCents / 100);
|
|
3085
|
+
} catch {
|
|
3086
|
+
return `${(amountCents / 100).toFixed(2)} ${currencyCode}`;
|
|
3087
|
+
}
|
|
3088
|
+
}
|
|
3089
|
+
var CURRENCY_LOCALE_BY_CODE;
|
|
3090
|
+
var init_currency_format = __esm({
|
|
3091
|
+
"../core/src/currency-format.ts"() {
|
|
3092
|
+
"use strict";
|
|
3093
|
+
CURRENCY_LOCALE_BY_CODE = {
|
|
3094
|
+
USD: "en-US",
|
|
3095
|
+
GBP: "en-GB",
|
|
3096
|
+
EUR: "de-DE",
|
|
3097
|
+
AUD: "en-AU",
|
|
3098
|
+
CAD: "en-CA",
|
|
3099
|
+
NZD: "en-NZ",
|
|
3100
|
+
JPY: "ja-JP",
|
|
3101
|
+
CNY: "zh-CN",
|
|
3102
|
+
CHF: "de-CH"
|
|
3103
|
+
};
|
|
3104
|
+
}
|
|
3105
|
+
});
|
|
3106
|
+
|
|
3055
3107
|
// ../core/src/event-pricing.ts
|
|
3056
3108
|
function publicEventPricingDisplay(pricing) {
|
|
3057
3109
|
return pricing.display;
|
|
@@ -3104,14 +3156,53 @@ function isFreePublicEventPriceDisplay(display) {
|
|
|
3104
3156
|
return display.display.kind === "free";
|
|
3105
3157
|
case "exact":
|
|
3106
3158
|
case "from":
|
|
3159
|
+
case "range":
|
|
3107
3160
|
case "mixed":
|
|
3108
3161
|
case "unavailable":
|
|
3109
3162
|
return false;
|
|
3110
3163
|
}
|
|
3111
3164
|
}
|
|
3165
|
+
function formatCoursePriceDisplayLabel(display, options) {
|
|
3166
|
+
switch (display.kind) {
|
|
3167
|
+
case "free":
|
|
3168
|
+
case "unavailable":
|
|
3169
|
+
return "Course";
|
|
3170
|
+
case "exact":
|
|
3171
|
+
return `Course (${formatCurrencyAmount(display.amount, display.currency, options)})`;
|
|
3172
|
+
case "from":
|
|
3173
|
+
return `Course (From ${formatCurrencyAmount(display.amount, display.currency, options)})`;
|
|
3174
|
+
default:
|
|
3175
|
+
return assertNever2(display);
|
|
3176
|
+
}
|
|
3177
|
+
}
|
|
3178
|
+
function formatBookingPriceDisplay(display, options = {}) {
|
|
3179
|
+
switch (display.kind) {
|
|
3180
|
+
case "free":
|
|
3181
|
+
return "Free";
|
|
3182
|
+
case "exact":
|
|
3183
|
+
return formatCurrencyAmount(display.amount, display.currency, options);
|
|
3184
|
+
case "from":
|
|
3185
|
+
return `From ${formatCurrencyAmount(display.amount, display.currency, options)}`;
|
|
3186
|
+
case "range":
|
|
3187
|
+
return `${formatCurrencyAmount(display.minAmount, display.currency, options)} - ${formatCurrencyAmount(display.maxAmount, display.currency, options)}`;
|
|
3188
|
+
case "mixed":
|
|
3189
|
+
return display.paidToAmount > display.paidFromAmount ? `Free / ${formatCurrencyAmount(display.paidFromAmount, display.currency, options)} - ${formatCurrencyAmount(display.paidToAmount, display.currency, options)}` : `Free / ${formatCurrencyAmount(display.paidFromAmount, display.currency, options)}`;
|
|
3190
|
+
case "unavailable":
|
|
3191
|
+
return "Pricing unavailable";
|
|
3192
|
+
case "course":
|
|
3193
|
+
return formatCoursePriceDisplayLabel(display.display, options);
|
|
3194
|
+
default:
|
|
3195
|
+
return assertNever2(display);
|
|
3196
|
+
}
|
|
3197
|
+
}
|
|
3198
|
+
function formatEventPricing(pricing, options = {}) {
|
|
3199
|
+
return formatBookingPriceDisplay(publicEventPricingDisplay(pricing), options);
|
|
3200
|
+
}
|
|
3112
3201
|
var init_event_pricing = __esm({
|
|
3113
3202
|
"../core/src/event-pricing.ts"() {
|
|
3114
3203
|
"use strict";
|
|
3204
|
+
init_assert_never();
|
|
3205
|
+
init_currency_format();
|
|
3115
3206
|
}
|
|
3116
3207
|
});
|
|
3117
3208
|
|
|
@@ -3142,10 +3233,10 @@ function resolveFlexibleBalanceDueAt(input) {
|
|
|
3142
3233
|
case "fixed_calendar_date":
|
|
3143
3234
|
return input.dueDateRule.dueAt;
|
|
3144
3235
|
default:
|
|
3145
|
-
return
|
|
3236
|
+
return assertNever3(input.dueDateRule);
|
|
3146
3237
|
}
|
|
3147
3238
|
}
|
|
3148
|
-
function
|
|
3239
|
+
function assertNever3(value) {
|
|
3149
3240
|
throw new Error(`Unexpected value: ${String(value)}`);
|
|
3150
3241
|
}
|
|
3151
3242
|
var init_booking_flexible_balance = __esm({
|
|
@@ -3171,7 +3262,7 @@ function isDepositBearingBookingInstalmentPlan(plan) {
|
|
|
3171
3262
|
case "equal_scheduled_instalments":
|
|
3172
3263
|
return false;
|
|
3173
3264
|
default:
|
|
3174
|
-
return
|
|
3265
|
+
return assertNever4(plan);
|
|
3175
3266
|
}
|
|
3176
3267
|
}
|
|
3177
3268
|
function getBookingInstalmentDepositRefundability(plan) {
|
|
@@ -3203,7 +3294,7 @@ function addIntervalPreservingMonthAnchor(isoString, intervalCount, intervalUnit
|
|
|
3203
3294
|
case "month":
|
|
3204
3295
|
return addMonthsPreservingAnchorDay(date, intervalCount).toISOString();
|
|
3205
3296
|
default:
|
|
3206
|
-
return
|
|
3297
|
+
return assertNever4(intervalUnit);
|
|
3207
3298
|
}
|
|
3208
3299
|
}
|
|
3209
3300
|
function getBookingInstalmentPlanIntervalCount(plan) {
|
|
@@ -3214,7 +3305,7 @@ function getBookingInstalmentPlanIntervalCount(plan) {
|
|
|
3214
3305
|
case "equal_scheduled_instalments":
|
|
3215
3306
|
return plan.intervalCount;
|
|
3216
3307
|
default:
|
|
3217
|
-
return
|
|
3308
|
+
return assertNever4(plan);
|
|
3218
3309
|
}
|
|
3219
3310
|
}
|
|
3220
3311
|
function omitZeroAmountFutureRows(rows) {
|
|
@@ -3249,7 +3340,7 @@ function addMonthsPreservingAnchorDay(date, intervalCount) {
|
|
|
3249
3340
|
nextMonth.setUTCDate(Math.min(anchorDay, lastDayOfTargetMonth));
|
|
3250
3341
|
return nextMonth;
|
|
3251
3342
|
}
|
|
3252
|
-
function
|
|
3343
|
+
function assertNever4(value) {
|
|
3253
3344
|
throw new Error(`Unexpected value: ${String(value)}`);
|
|
3254
3345
|
}
|
|
3255
3346
|
var init_booking_instalments = __esm({
|
|
@@ -3584,16 +3675,6 @@ var init_business_address = __esm({
|
|
|
3584
3675
|
}
|
|
3585
3676
|
});
|
|
3586
3677
|
|
|
3587
|
-
// ../core/src/assert-never.ts
|
|
3588
|
-
function assertNever4(value, message = "Unexpected variant") {
|
|
3589
|
-
throw new Error(`${message}: ${String(value)}`);
|
|
3590
|
-
}
|
|
3591
|
-
var init_assert_never = __esm({
|
|
3592
|
-
"../core/src/assert-never.ts"() {
|
|
3593
|
-
"use strict";
|
|
3594
|
-
}
|
|
3595
|
-
});
|
|
3596
|
-
|
|
3597
3678
|
// ../core/src/narrow-result.ts
|
|
3598
3679
|
var init_narrow_result = __esm({
|
|
3599
3680
|
"../core/src/narrow-result.ts"() {
|
|
@@ -3713,13 +3794,6 @@ var init_csv_types = __esm({
|
|
|
3713
3794
|
}
|
|
3714
3795
|
});
|
|
3715
3796
|
|
|
3716
|
-
// ../core/src/currency-format.ts
|
|
3717
|
-
var init_currency_format = __esm({
|
|
3718
|
-
"../core/src/currency-format.ts"() {
|
|
3719
|
-
"use strict";
|
|
3720
|
-
}
|
|
3721
|
-
});
|
|
3722
|
-
|
|
3723
3797
|
// ../core/src/email-format.ts
|
|
3724
3798
|
var init_email_format = __esm({
|
|
3725
3799
|
"../core/src/email-format.ts"() {
|
|
@@ -5831,6 +5905,8 @@ function renderDoc(node, key, imageResolveContext) {
|
|
|
5831
5905
|
return /* @__PURE__ */ jsx8("blockquote", { children }, key);
|
|
5832
5906
|
case "horizontalRule":
|
|
5833
5907
|
return /* @__PURE__ */ jsx8("hr", {}, key);
|
|
5908
|
+
case "hardBreak":
|
|
5909
|
+
return /* @__PURE__ */ jsx8("br", {}, key);
|
|
5834
5910
|
case "image": {
|
|
5835
5911
|
const attrs = node.attrs ?? {};
|
|
5836
5912
|
const src = typeof attrs.src === "string" ? attrs.src.trim() : "";
|
|
@@ -5901,6 +5977,53 @@ function unwrapRichTextRoot(value) {
|
|
|
5901
5977
|
if (isRecord3(inner) && inner.type === "doc") return inner;
|
|
5902
5978
|
return value;
|
|
5903
5979
|
}
|
|
5980
|
+
function createHardBreakNode() {
|
|
5981
|
+
return { type: "hardBreak" };
|
|
5982
|
+
}
|
|
5983
|
+
function parseRichTextInlineMarkdown(text2) {
|
|
5984
|
+
const out = [];
|
|
5985
|
+
const pushText = (value, marks) => {
|
|
5986
|
+
if (!value) return;
|
|
5987
|
+
out.push(
|
|
5988
|
+
marks && marks.length > 0 ? { type: "text", text: value, marks } : { type: "text", text: value }
|
|
5989
|
+
);
|
|
5990
|
+
};
|
|
5991
|
+
let rest = text2;
|
|
5992
|
+
while (rest.length > 0) {
|
|
5993
|
+
const start = rest.indexOf("**");
|
|
5994
|
+
if (start === -1) {
|
|
5995
|
+
pushText(rest);
|
|
5996
|
+
break;
|
|
5997
|
+
}
|
|
5998
|
+
const end = rest.indexOf("**", start + 2);
|
|
5999
|
+
if (end === -1) {
|
|
6000
|
+
pushText(rest);
|
|
6001
|
+
break;
|
|
6002
|
+
}
|
|
6003
|
+
pushText(rest.slice(0, start));
|
|
6004
|
+
pushText(rest.slice(start + 2, end), [{ type: "bold" }]);
|
|
6005
|
+
rest = rest.slice(end + 2);
|
|
6006
|
+
}
|
|
6007
|
+
return out;
|
|
6008
|
+
}
|
|
6009
|
+
function parseRichTextParagraphInlineMarkdown(text2) {
|
|
6010
|
+
return text2.split("\n").flatMap((line, index) => {
|
|
6011
|
+
const lineNodes = parseRichTextInlineMarkdown(line.trim());
|
|
6012
|
+
return index === 0 ? lineNodes : [createHardBreakNode(), ...lineNodes];
|
|
6013
|
+
});
|
|
6014
|
+
}
|
|
6015
|
+
function createRichTextDocFromMarkdown(markdown) {
|
|
6016
|
+
const normalized = markdown.replace(/\r\n/g, "\n").trim();
|
|
6017
|
+
if (!normalized) return { type: "doc", content: [] };
|
|
6018
|
+
const paragraphs = normalized.split(/\n{2,}/).map((paragraph) => paragraph.trim()).filter(Boolean);
|
|
6019
|
+
return {
|
|
6020
|
+
type: "doc",
|
|
6021
|
+
content: paragraphs.map((paragraph) => {
|
|
6022
|
+
const inline2 = parseRichTextParagraphInlineMarkdown(paragraph);
|
|
6023
|
+
return inline2.length > 0 ? { type: "paragraph", content: inline2 } : { type: "paragraph" };
|
|
6024
|
+
})
|
|
6025
|
+
};
|
|
6026
|
+
}
|
|
5904
6027
|
var TipTapMarkSchema, TipTapNodeSchema, RichTextValueSchema, RichTextDocSchema;
|
|
5905
6028
|
var init_richTextSchema = __esm({
|
|
5906
6029
|
"../blocks/src/system/manifest/richTextSchema.ts"() {
|
|
@@ -5935,48 +6058,10 @@ var init_richTextSchema = __esm({
|
|
|
5935
6058
|
});
|
|
5936
6059
|
|
|
5937
6060
|
// ../blocks/src/system/runtime/nodes/richText-coerce.ts
|
|
5938
|
-
function parseInlineMarkdown(text2) {
|
|
5939
|
-
const out = [];
|
|
5940
|
-
const pushText = (value, marks) => {
|
|
5941
|
-
if (!value) return;
|
|
5942
|
-
out.push(
|
|
5943
|
-
marks && marks.length > 0 ? { type: "text", text: value, marks } : { type: "text", text: value }
|
|
5944
|
-
);
|
|
5945
|
-
};
|
|
5946
|
-
let rest = text2;
|
|
5947
|
-
while (rest.length > 0) {
|
|
5948
|
-
const start = rest.indexOf("**");
|
|
5949
|
-
if (start === -1) {
|
|
5950
|
-
pushText(rest);
|
|
5951
|
-
break;
|
|
5952
|
-
}
|
|
5953
|
-
const end = rest.indexOf("**", start + 2);
|
|
5954
|
-
if (end === -1) {
|
|
5955
|
-
pushText(rest);
|
|
5956
|
-
break;
|
|
5957
|
-
}
|
|
5958
|
-
pushText(rest.slice(0, start));
|
|
5959
|
-
pushText(rest.slice(start + 2, end), [{ type: "bold" }]);
|
|
5960
|
-
rest = rest.slice(end + 2);
|
|
5961
|
-
}
|
|
5962
|
-
return out;
|
|
5963
|
-
}
|
|
5964
|
-
function markdownToTipTapDoc(markdown) {
|
|
5965
|
-
const normalized = markdown.replace(/\r\n/g, "\n").trim();
|
|
5966
|
-
if (!normalized) return { type: "doc", content: [] };
|
|
5967
|
-
const paragraphs = normalized.split(/\n{2,}/).map((p) => p.trim()).filter(Boolean);
|
|
5968
|
-
return {
|
|
5969
|
-
type: "doc",
|
|
5970
|
-
content: paragraphs.map((p) => {
|
|
5971
|
-
const inline2 = parseInlineMarkdown(p);
|
|
5972
|
-
return inline2.length > 0 ? { type: "paragraph", content: inline2 } : { type: "paragraph" };
|
|
5973
|
-
})
|
|
5974
|
-
};
|
|
5975
|
-
}
|
|
5976
6061
|
function coerceRichTextDoc(value) {
|
|
5977
6062
|
const raw = unwrapRichTextRoot(value);
|
|
5978
6063
|
if (typeof raw === "string") {
|
|
5979
|
-
return
|
|
6064
|
+
return createRichTextDocFromMarkdown(raw);
|
|
5980
6065
|
}
|
|
5981
6066
|
if (isRecord3(raw) && typeof raw.type === "string") {
|
|
5982
6067
|
return raw;
|
|
@@ -9104,29 +9189,7 @@ function resolveCoursePricingState(course, selectedPricingOptionId, nowInput = {
|
|
|
9104
9189
|
}
|
|
9105
9190
|
}
|
|
9106
9191
|
function formatCoursePriceDisplay(display, locale) {
|
|
9107
|
-
|
|
9108
|
-
case "free":
|
|
9109
|
-
return "Free";
|
|
9110
|
-
case "unavailable":
|
|
9111
|
-
return "Pricing unavailable";
|
|
9112
|
-
case "exact":
|
|
9113
|
-
return formatCourseCurrencyAmount(display.amount, display.currency, { locale });
|
|
9114
|
-
case "from":
|
|
9115
|
-
return `From ${formatCourseCurrencyAmount(display.amount, display.currency, { locale })}`;
|
|
9116
|
-
}
|
|
9117
|
-
}
|
|
9118
|
-
function formatCourseCurrencyAmount(amount, currency, options) {
|
|
9119
|
-
const {
|
|
9120
|
-
locale = "en-US",
|
|
9121
|
-
minimumFractionDigits,
|
|
9122
|
-
maximumFractionDigits
|
|
9123
|
-
} = options ?? {};
|
|
9124
|
-
return new Intl.NumberFormat(locale, {
|
|
9125
|
-
style: "currency",
|
|
9126
|
-
currency: currency.toUpperCase(),
|
|
9127
|
-
...minimumFractionDigits === void 0 ? {} : { minimumFractionDigits },
|
|
9128
|
-
...maximumFractionDigits === void 0 ? {} : { maximumFractionDigits }
|
|
9129
|
-
}).format(amount / 100);
|
|
9192
|
+
return formatBookingPriceDisplay(display, { decimals: "exact", locale });
|
|
9130
9193
|
}
|
|
9131
9194
|
function formatCoursePriceAmount(amount, currency, locale) {
|
|
9132
9195
|
return formatCoursePriceDisplay(
|
|
@@ -9226,10 +9289,21 @@ function readLegacyPriceDisplay(value, currency) {
|
|
|
9226
9289
|
amount: readAmount(value.amount) ?? 0,
|
|
9227
9290
|
currency: displayCurrency
|
|
9228
9291
|
} : { kind: "unavailable", currency };
|
|
9292
|
+
case "range": {
|
|
9293
|
+
const minAmount = readAmount(value.minAmount);
|
|
9294
|
+
const maxAmount = readAmount(value.maxAmount);
|
|
9295
|
+
return minAmount !== null && maxAmount !== null ? {
|
|
9296
|
+
kind: "range",
|
|
9297
|
+
minAmount,
|
|
9298
|
+
maxAmount,
|
|
9299
|
+
currency: displayCurrency
|
|
9300
|
+
} : { kind: "unavailable", currency };
|
|
9301
|
+
}
|
|
9229
9302
|
case "mixed":
|
|
9230
9303
|
return readAmount(value.paidFromAmount) !== null ? {
|
|
9231
9304
|
kind: "mixed",
|
|
9232
9305
|
paidFromAmount: readAmount(value.paidFromAmount) ?? 0,
|
|
9306
|
+
paidToAmount: readAmount(value.paidToAmount) ?? readAmount(value.paidFromAmount) ?? 0,
|
|
9233
9307
|
currency: displayCurrency
|
|
9234
9308
|
} : { kind: "unavailable", currency };
|
|
9235
9309
|
case "unavailable":
|
|
@@ -9485,15 +9559,15 @@ function getLocalMinuteOfDay(isoTimestamp, timeZone) {
|
|
|
9485
9559
|
const date = new Date(isoTimestamp);
|
|
9486
9560
|
if (Number.isNaN(date.getTime())) return NaN;
|
|
9487
9561
|
if (!isValidTimeZone2(timeZone)) return NaN;
|
|
9488
|
-
const parts = new Intl.DateTimeFormat("en-
|
|
9562
|
+
const parts = new Intl.DateTimeFormat("en-GB", {
|
|
9489
9563
|
timeZone,
|
|
9490
9564
|
hour: "2-digit",
|
|
9491
9565
|
minute: "2-digit",
|
|
9492
|
-
hour12: false,
|
|
9493
9566
|
hourCycle: "h23"
|
|
9494
9567
|
}).formatToParts(date);
|
|
9495
|
-
const
|
|
9568
|
+
const hourPart = Number(parts.find((part) => part.type === "hour")?.value);
|
|
9496
9569
|
const minute = Number(parts.find((part) => part.type === "minute")?.value);
|
|
9570
|
+
const hour = hourPart === 24 ? 0 : hourPart;
|
|
9497
9571
|
if (Number.isNaN(hour) || Number.isNaN(minute)) return NaN;
|
|
9498
9572
|
return hour * MINUTES_PER_HOUR + minute;
|
|
9499
9573
|
}
|
|
@@ -9957,45 +10031,11 @@ function groupEventsByDate(events) {
|
|
|
9957
10031
|
}
|
|
9958
10032
|
return map;
|
|
9959
10033
|
}
|
|
9960
|
-
function formatCompactCurrencyAmount(amount, currency) {
|
|
9961
|
-
return formatCourseCurrencyAmount(amount, currency, {
|
|
9962
|
-
minimumFractionDigits: 0,
|
|
9963
|
-
maximumFractionDigits: 2
|
|
9964
|
-
});
|
|
9965
|
-
}
|
|
9966
|
-
function formatCourseEventPriceDisplay(display) {
|
|
9967
|
-
if (display.kind !== "course") {
|
|
9968
|
-
return "Course";
|
|
9969
|
-
}
|
|
9970
|
-
if (display.display.kind === "exact" || display.display.kind === "from") {
|
|
9971
|
-
const amountLabel = formatCompactCurrencyAmount(
|
|
9972
|
-
display.display.amount,
|
|
9973
|
-
display.display.currency
|
|
9974
|
-
);
|
|
9975
|
-
return display.display.kind === "from" ? `Course (From ${amountLabel})` : `Course (${amountLabel})`;
|
|
9976
|
-
}
|
|
9977
|
-
return "Course";
|
|
9978
|
-
}
|
|
9979
|
-
function formatPublicEventPriceDisplay(display) {
|
|
9980
|
-
switch (display.kind) {
|
|
9981
|
-
case "free":
|
|
9982
|
-
return "Free";
|
|
9983
|
-
case "exact":
|
|
9984
|
-
return formatCompactCurrencyAmount(display.amount, display.currency);
|
|
9985
|
-
case "from":
|
|
9986
|
-
return `From ${formatCompactCurrencyAmount(display.amount, display.currency)}`;
|
|
9987
|
-
case "mixed":
|
|
9988
|
-
return `Free / From ${formatCompactCurrencyAmount(display.paidFromAmount, display.currency)}`;
|
|
9989
|
-
case "unavailable":
|
|
9990
|
-
return "Pricing unavailable";
|
|
9991
|
-
case "course":
|
|
9992
|
-
return formatCourseEventPriceDisplay(display);
|
|
9993
|
-
}
|
|
9994
|
-
}
|
|
9995
10034
|
function formatEventPrice(event) {
|
|
9996
|
-
return
|
|
9997
|
-
|
|
9998
|
-
|
|
10035
|
+
return formatEventPricing(resolveRuntimeEventPricing(event), { decimals: "auto" });
|
|
10036
|
+
}
|
|
10037
|
+
function formatEventPriceDisplay(pricing) {
|
|
10038
|
+
return formatEventPricing(pricing, { decimals: "auto" });
|
|
9999
10039
|
}
|
|
10000
10040
|
function resolveEventCta(event, buttonText) {
|
|
10001
10041
|
const { isFull: isSoldOut } = getEventAvailability(event);
|
|
@@ -10014,7 +10054,6 @@ var init_utils = __esm({
|
|
|
10014
10054
|
"use strict";
|
|
10015
10055
|
init_src();
|
|
10016
10056
|
init_src3();
|
|
10017
|
-
init_shared();
|
|
10018
10057
|
init_eventCapacity();
|
|
10019
10058
|
init_pricing2();
|
|
10020
10059
|
init_src3();
|
|
@@ -10085,6 +10124,32 @@ function TeamMemberName({
|
|
|
10085
10124
|
}) {
|
|
10086
10125
|
return profilePath ? /* @__PURE__ */ jsx24("a", { href: profilePath, className: "rb-hover-opacity-80", children: /* @__PURE__ */ jsx24("strong", { children: name }) }) : /* @__PURE__ */ jsx24("strong", { children: name });
|
|
10087
10126
|
}
|
|
10127
|
+
function formatTicketTypePrice(ticketType, currency) {
|
|
10128
|
+
return formatCurrencyAmount(ticketType.priceAmount, currency, { decimals: "auto" });
|
|
10129
|
+
}
|
|
10130
|
+
function getActiveTicketTypes(event) {
|
|
10131
|
+
return event.pricing.kind === "ticket_types" ? event.pricing.ticketTypes.filter((ticketType) => ticketType.isActive).sort((left, right) => left.sortOrder - right.sortOrder) : [];
|
|
10132
|
+
}
|
|
10133
|
+
function TicketTypePriceList({
|
|
10134
|
+
ticketTypes,
|
|
10135
|
+
currency
|
|
10136
|
+
}) {
|
|
10137
|
+
if (ticketTypes.length === 0) return null;
|
|
10138
|
+
return /* @__PURE__ */ jsx24("div", { className: "rb-mt-3 rb-flex rb-flex-col rb-gap-2", children: ticketTypes.map((ticketType) => /* @__PURE__ */ jsxs10(
|
|
10139
|
+
"div",
|
|
10140
|
+
{
|
|
10141
|
+
className: "rb-flex rb-items-start rb-justify-between rb-gap-4",
|
|
10142
|
+
children: [
|
|
10143
|
+
/* @__PURE__ */ jsxs10("div", { children: [
|
|
10144
|
+
/* @__PURE__ */ jsx24("p", { children: ticketType.name }),
|
|
10145
|
+
ticketType.description ? /* @__PURE__ */ jsx24("p", { className: "rb-caption status-muted", children: ticketType.description }) : null
|
|
10146
|
+
] }),
|
|
10147
|
+
/* @__PURE__ */ jsx24("p", { children: /* @__PURE__ */ jsx24("strong", { children: formatTicketTypePrice(ticketType, currency) }) })
|
|
10148
|
+
]
|
|
10149
|
+
},
|
|
10150
|
+
ticketType.id
|
|
10151
|
+
)) });
|
|
10152
|
+
}
|
|
10088
10153
|
function EventDetailsView({
|
|
10089
10154
|
selection,
|
|
10090
10155
|
showVenue,
|
|
@@ -10119,6 +10184,7 @@ function EventDetailsView({
|
|
|
10119
10184
|
const shouldShowCoursePricing = showCost && !isDropIn && coursePricing !== null;
|
|
10120
10185
|
const shouldShowEventCost = showCost && isPaid && !isDropIn && coursePricing === null;
|
|
10121
10186
|
const eventCostLabel = shouldShowEventCost ? formatEventPrice(selected) : null;
|
|
10187
|
+
const ticketTypes = shouldShowEventCost ? getActiveTicketTypes(selected) : [];
|
|
10122
10188
|
const acceptedItems = [];
|
|
10123
10189
|
if (showAcceptedPasses) {
|
|
10124
10190
|
acceptedItems.push(...applicablePasses.map((p) => p.name));
|
|
@@ -10175,6 +10241,7 @@ function EventDetailsView({
|
|
|
10175
10241
|
/* @__PURE__ */ jsx24("div", { className: "rb-label rb-mb-2", children: "Cost" }),
|
|
10176
10242
|
/* @__PURE__ */ jsx24("p", { children: /* @__PURE__ */ jsx24("strong", { children: eventCostLabel }) }),
|
|
10177
10243
|
autoApplyDiscount ? /* @__PURE__ */ jsx24("p", { className: "rb-caption rb-mt-1", children: formatAutoApplyDiscountLine(autoApplyDiscount, eventPricingCurrency) }) : null,
|
|
10244
|
+
/* @__PURE__ */ jsx24(TicketTypePriceList, { ticketTypes, currency: eventPricingCurrency }),
|
|
10178
10245
|
hasAcceptedItems ? /* @__PURE__ */ jsxs10("p", { className: "rb-caption rb-mt-1", children: [
|
|
10179
10246
|
"You can also attend with: ",
|
|
10180
10247
|
acceptedItems.join(", ")
|
|
@@ -11068,6 +11135,7 @@ var init_schemas2 = __esm({
|
|
|
11068
11135
|
"../blocks/src/system/blocks/events/shared/schemas.ts"() {
|
|
11069
11136
|
"use strict";
|
|
11070
11137
|
init_media2();
|
|
11138
|
+
init_richTextSchema();
|
|
11071
11139
|
init_bookingPaymentTerms();
|
|
11072
11140
|
init_schemas();
|
|
11073
11141
|
eventPresetSchema = z14.enum(["event", "class", "workshop", "retreat", "performance"]);
|
|
@@ -11100,7 +11168,13 @@ var init_schemas2 = __esm({
|
|
|
11100
11168
|
z14.object({ kind: z14.literal("free"), currency: z14.string() }),
|
|
11101
11169
|
z14.object({ kind: z14.literal("exact"), amount: z14.number(), currency: z14.string() }),
|
|
11102
11170
|
z14.object({ kind: z14.literal("from"), amount: z14.number(), currency: z14.string() }),
|
|
11103
|
-
z14.object({ kind: z14.literal("
|
|
11171
|
+
z14.object({ kind: z14.literal("range"), minAmount: z14.number(), maxAmount: z14.number(), currency: z14.string() }),
|
|
11172
|
+
z14.object({
|
|
11173
|
+
kind: z14.literal("mixed"),
|
|
11174
|
+
paidFromAmount: z14.number(),
|
|
11175
|
+
paidToAmount: z14.number(),
|
|
11176
|
+
currency: z14.string()
|
|
11177
|
+
}),
|
|
11104
11178
|
z14.object({ kind: z14.literal("unavailable"), currency: z14.string() }),
|
|
11105
11179
|
z14.object({ kind: z14.literal("course"), display: publicCoursePriceDisplaySchema })
|
|
11106
11180
|
]);
|
|
@@ -11108,7 +11182,13 @@ var init_schemas2 = __esm({
|
|
|
11108
11182
|
z14.object({ kind: z14.literal("free"), currency: z14.string() }),
|
|
11109
11183
|
z14.object({ kind: z14.literal("exact"), amount: z14.number(), currency: z14.string() }),
|
|
11110
11184
|
z14.object({ kind: z14.literal("from"), amount: z14.number(), currency: z14.string() }),
|
|
11111
|
-
z14.object({ kind: z14.literal("
|
|
11185
|
+
z14.object({ kind: z14.literal("range"), minAmount: z14.number(), maxAmount: z14.number(), currency: z14.string() }),
|
|
11186
|
+
z14.object({
|
|
11187
|
+
kind: z14.literal("mixed"),
|
|
11188
|
+
paidFromAmount: z14.number(),
|
|
11189
|
+
paidToAmount: z14.number(),
|
|
11190
|
+
currency: z14.string()
|
|
11191
|
+
}),
|
|
11112
11192
|
z14.object({ kind: z14.literal("unavailable"), currency: z14.string() })
|
|
11113
11193
|
]);
|
|
11114
11194
|
publicEventAttendanceModeSchema = z14.enum(["in_person", "online"]);
|
|
@@ -11193,6 +11273,9 @@ var init_schemas2 = __esm({
|
|
|
11193
11273
|
seriesId: z14.string(),
|
|
11194
11274
|
title: z14.string(),
|
|
11195
11275
|
description: z14.string().nullable(),
|
|
11276
|
+
content: z14.object({
|
|
11277
|
+
body: RichTextDocSchema.nullable().optional()
|
|
11278
|
+
}).optional(),
|
|
11196
11279
|
presentation: z14.object({
|
|
11197
11280
|
cardTitleOverride: z14.string().nullable().optional(),
|
|
11198
11281
|
summary: z14.string().nullable().optional(),
|
|
@@ -22325,15 +22408,53 @@ var init_newsletterForm = __esm({
|
|
|
22325
22408
|
title: "Newsletter Form",
|
|
22326
22409
|
description: "Newsletter subscription form with preset field configurations.",
|
|
22327
22410
|
fields: [
|
|
22411
|
+
{
|
|
22412
|
+
id: "destinationProvider",
|
|
22413
|
+
type: "select",
|
|
22414
|
+
label: "Send signups to",
|
|
22415
|
+
description: "Choose where new subscribers from this form should go.",
|
|
22416
|
+
defaultValue: "riverbank",
|
|
22417
|
+
required: true,
|
|
22418
|
+
ui: { intent: "behavior" },
|
|
22419
|
+
options: [
|
|
22420
|
+
{ value: "riverbank", label: "Riverbank newsletter" }
|
|
22421
|
+
]
|
|
22422
|
+
},
|
|
22328
22423
|
{
|
|
22329
22424
|
id: "listId",
|
|
22330
22425
|
type: "reference",
|
|
22331
22426
|
label: "Newsletter list",
|
|
22332
22427
|
description: "Select the list new subscribers should be added to.",
|
|
22333
|
-
required:
|
|
22428
|
+
required: false,
|
|
22334
22429
|
referenceKind: "newsletterList",
|
|
22335
22430
|
allowManualEntry: false,
|
|
22336
|
-
ui: {
|
|
22431
|
+
ui: {
|
|
22432
|
+
intent: "behavior",
|
|
22433
|
+
visibleWhen: { field: "destinationProvider", equals: "riverbank" }
|
|
22434
|
+
}
|
|
22435
|
+
},
|
|
22436
|
+
{
|
|
22437
|
+
id: "mailchimpAudienceId",
|
|
22438
|
+
type: "reference",
|
|
22439
|
+
label: "Mailchimp audience",
|
|
22440
|
+
description: "Choose the Mailchimp audience for new subscribers.",
|
|
22441
|
+
required: false,
|
|
22442
|
+
referenceKind: "mailchimpAudience",
|
|
22443
|
+
allowManualEntry: false,
|
|
22444
|
+
ui: {
|
|
22445
|
+
intent: "behavior",
|
|
22446
|
+
visibleWhen: { field: "destinationProvider", equals: "mailchimp" }
|
|
22447
|
+
}
|
|
22448
|
+
},
|
|
22449
|
+
{
|
|
22450
|
+
id: "mailchimpTags",
|
|
22451
|
+
type: "text",
|
|
22452
|
+
label: "Mailchimp tags",
|
|
22453
|
+
description: "Optional tags to apply in Mailchimp, separated by commas or semicolons.",
|
|
22454
|
+
ui: {
|
|
22455
|
+
intent: "behavior",
|
|
22456
|
+
visibleWhen: { field: "destinationProvider", equals: "mailchimp" }
|
|
22457
|
+
}
|
|
22337
22458
|
},
|
|
22338
22459
|
{
|
|
22339
22460
|
id: "preset",
|
|
@@ -22380,13 +22501,18 @@ var init_newsletterForm = __esm({
|
|
|
22380
22501
|
id: "tags",
|
|
22381
22502
|
type: "text",
|
|
22382
22503
|
label: "Tags (optional)",
|
|
22383
|
-
description: "Optional tags to apply on subscribe (comma or semicolon separated)."
|
|
22504
|
+
description: "Optional tags to apply on subscribe (comma or semicolon separated).",
|
|
22505
|
+
ui: {
|
|
22506
|
+
intent: "behavior",
|
|
22507
|
+
visibleWhen: { field: "destinationProvider", equals: "riverbank" }
|
|
22508
|
+
}
|
|
22384
22509
|
}
|
|
22385
22510
|
],
|
|
22386
22511
|
layout: [
|
|
22387
22512
|
el(
|
|
22388
22513
|
"newsletter-form",
|
|
22389
22514
|
withApiBindings({
|
|
22515
|
+
destinationProvider: { $bind: { from: "destinationProvider" } },
|
|
22390
22516
|
listId: { $bind: { from: "listId" } },
|
|
22391
22517
|
preset: { $bind: { from: "preset" } },
|
|
22392
22518
|
includePhone: { $bind: { from: "includePhone" } },
|
|
@@ -22931,10 +23057,7 @@ var init_shop_commerce_shared = __esm({
|
|
|
22931
23057
|
|
|
22932
23058
|
// ../blocks/src/system/runtime/nodes/commerce/shared/display.ts
|
|
22933
23059
|
function formatCommercePrice(cents, currency) {
|
|
22934
|
-
return
|
|
22935
|
-
style: "currency",
|
|
22936
|
-
currency: currency.toUpperCase()
|
|
22937
|
-
}).format(cents / 100);
|
|
23060
|
+
return formatCurrencyAmount(cents, currency);
|
|
22938
23061
|
}
|
|
22939
23062
|
function getPassesHeading(passes, explicitHeading) {
|
|
22940
23063
|
if (explicitHeading) return explicitHeading;
|
|
@@ -23130,6 +23253,7 @@ function formatValidity(days) {
|
|
|
23130
23253
|
var init_display = __esm({
|
|
23131
23254
|
"../blocks/src/system/runtime/nodes/commerce/shared/display.ts"() {
|
|
23132
23255
|
"use strict";
|
|
23256
|
+
init_src();
|
|
23133
23257
|
init_creditProducts();
|
|
23134
23258
|
init_shop_commerce_shared();
|
|
23135
23259
|
}
|
|
@@ -24188,6 +24312,7 @@ var init_event_registration_interactive = __esm({
|
|
|
24188
24312
|
successMessage: z40.string().optional(),
|
|
24189
24313
|
waitlistMessage: z40.string().optional(),
|
|
24190
24314
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
24315
|
+
overlayEnabled: z40.boolean().optional(),
|
|
24191
24316
|
spamProtectionEnabled: z40.boolean().optional(),
|
|
24192
24317
|
stage: previewStageSchema.optional(),
|
|
24193
24318
|
supportEmail: z40.string().optional()
|
|
@@ -24211,6 +24336,7 @@ var init_event_registration_interactive = __esm({
|
|
|
24211
24336
|
successMessage: z40.string().optional(),
|
|
24212
24337
|
waitlistMessage: z40.string().optional(),
|
|
24213
24338
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
24339
|
+
overlayEnabled: z40.boolean().optional(),
|
|
24214
24340
|
spamProtectionEnabled: z40.boolean().optional(),
|
|
24215
24341
|
supportEmail: z40.string().optional()
|
|
24216
24342
|
});
|
|
@@ -24250,6 +24376,7 @@ var init_event_registration_interactive = __esm({
|
|
|
24250
24376
|
successMessage: source.successMessage,
|
|
24251
24377
|
waitlistMessage: source.waitlistMessage,
|
|
24252
24378
|
buttonVariant: source.buttonVariant,
|
|
24379
|
+
overlayEnabled: source.overlayEnabled,
|
|
24253
24380
|
spamProtectionEnabled: source.spamProtectionEnabled,
|
|
24254
24381
|
supportEmail: source.supportEmail
|
|
24255
24382
|
}
|
|
@@ -24874,6 +25001,66 @@ var init_EventListing_interactive = __esm({
|
|
|
24874
25001
|
}
|
|
24875
25002
|
});
|
|
24876
25003
|
|
|
25004
|
+
// ../blocks/src/system/blocks/newsletter-signup-destination.ts
|
|
25005
|
+
function parseNewsletterSignupBlockId(value) {
|
|
25006
|
+
const trimmed = parseTrimmedString(value);
|
|
25007
|
+
return trimmed && BLOCK_ID_PATTERN.test(trimmed) ? trimmed : null;
|
|
25008
|
+
}
|
|
25009
|
+
function parseSignedNewsletterDestinationRef(value) {
|
|
25010
|
+
const trimmed = parseTrimmedString(value);
|
|
25011
|
+
return trimmed && SIGNED_DESTINATION_REF_PATTERN.test(trimmed) ? trimmed : null;
|
|
25012
|
+
}
|
|
25013
|
+
function parseNewsletterSignupDestinationProvider(value) {
|
|
25014
|
+
return value === "riverbank" || value === "mailchimp" ? value : null;
|
|
25015
|
+
}
|
|
25016
|
+
function buildNewsletterSignupBlockRef(blockId) {
|
|
25017
|
+
const parsed = parseNewsletterSignupBlockId(blockId);
|
|
25018
|
+
return parsed ? { tag: "block_ref", blockId: parsed } : null;
|
|
25019
|
+
}
|
|
25020
|
+
function normalizeNewsletterSignupEditorValuesForDestination(values) {
|
|
25021
|
+
const destinationProvider = parseNewsletterSignupDestinationProvider(values.destinationProvider) ?? "riverbank";
|
|
25022
|
+
if (destinationProvider === "mailchimp") {
|
|
25023
|
+
return {
|
|
25024
|
+
destinationProvider,
|
|
25025
|
+
mailchimpAudienceId: values.mailchimpAudienceId,
|
|
25026
|
+
mailchimpTags: values.mailchimpTags
|
|
25027
|
+
};
|
|
25028
|
+
}
|
|
25029
|
+
return {
|
|
25030
|
+
destinationProvider,
|
|
25031
|
+
listId: values.listId,
|
|
25032
|
+
tags: values.tags
|
|
25033
|
+
};
|
|
25034
|
+
}
|
|
25035
|
+
function deriveNewsletterSignupRuntimeSource(values) {
|
|
25036
|
+
const normalized = normalizeNewsletterSignupEditorValuesForDestination(values);
|
|
25037
|
+
if (normalized.destinationProvider === "mailchimp") {
|
|
25038
|
+
return {
|
|
25039
|
+
destinationProvider: "mailchimp",
|
|
25040
|
+
listId: null,
|
|
25041
|
+
tags: null
|
|
25042
|
+
};
|
|
25043
|
+
}
|
|
25044
|
+
return {
|
|
25045
|
+
destinationProvider: "riverbank",
|
|
25046
|
+
listId: parseTrimmedString(normalized.listId),
|
|
25047
|
+
tags: parseTrimmedString(normalized.tags)
|
|
25048
|
+
};
|
|
25049
|
+
}
|
|
25050
|
+
function parseTrimmedString(value) {
|
|
25051
|
+
if (typeof value !== "string") return null;
|
|
25052
|
+
const trimmed = value.trim();
|
|
25053
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
25054
|
+
}
|
|
25055
|
+
var BLOCK_ID_PATTERN, SIGNED_DESTINATION_REF_PATTERN;
|
|
25056
|
+
var init_newsletter_signup_destination = __esm({
|
|
25057
|
+
"../blocks/src/system/blocks/newsletter-signup-destination.ts"() {
|
|
25058
|
+
"use strict";
|
|
25059
|
+
BLOCK_ID_PATTERN = /^[A-Za-z0-9._:-]{1,200}$/;
|
|
25060
|
+
SIGNED_DESTINATION_REF_PATTERN = /^[A-Za-z0-9._~-]{16,1000}$/;
|
|
25061
|
+
}
|
|
25062
|
+
});
|
|
25063
|
+
|
|
24877
25064
|
// ../blocks/src/system/runtime/nodes/newsletter-form.types.ts
|
|
24878
25065
|
function getPresetFields(preset, options) {
|
|
24879
25066
|
const includePhone = Boolean(options?.includePhone);
|
|
@@ -24954,14 +25141,30 @@ function buildNewsletterFormInteractiveIslandProps(props2) {
|
|
|
24954
25141
|
source: props2
|
|
24955
25142
|
});
|
|
24956
25143
|
}
|
|
24957
|
-
|
|
25144
|
+
function parseRequiredNewsletterSignupBlockId(value) {
|
|
25145
|
+
const parsed = parseNewsletterSignupBlockId(value);
|
|
25146
|
+
if (!parsed) {
|
|
25147
|
+
throw new Error("Newsletter signup block destination ref requires blockId");
|
|
25148
|
+
}
|
|
25149
|
+
return parsed;
|
|
25150
|
+
}
|
|
25151
|
+
function parseRequiredSignedNewsletterDestinationRef(value) {
|
|
25152
|
+
const parsed = parseSignedNewsletterDestinationRef(value);
|
|
25153
|
+
if (!parsed) {
|
|
25154
|
+
throw new Error("Newsletter signup signed destination ref requires token");
|
|
25155
|
+
}
|
|
25156
|
+
return parsed;
|
|
25157
|
+
}
|
|
25158
|
+
var newsletterPresetSchema, newsletterDestinationProviderSchema, newsletterFieldSchema, newsletterSignupBlockIdSchema, signedNewsletterDestinationRefSchema, newsletterPublicDestinationRefSchema, newsletterSourceSchema, newsletterDisplaySchema, newsletterHydrationSchema, newsletterRenderSchema, newsletterIslandMetaCodec, newsletterIslandMetaKeys, newsletterFormBlockRuntime, newsletterFormInteractiveIslandPropsCodec;
|
|
24958
25159
|
var init_newsletter_form_interactive = __esm({
|
|
24959
25160
|
"../blocks/src/system/runtime/nodes/newsletter-form.interactive.ts"() {
|
|
24960
25161
|
"use strict";
|
|
24961
25162
|
init_islands();
|
|
24962
25163
|
init_runtime();
|
|
25164
|
+
init_newsletter_signup_destination();
|
|
24963
25165
|
init_newsletter_form_types();
|
|
24964
25166
|
newsletterPresetSchema = z46.enum(["emailOnly", "emailName", "emailFirstLast", "emailNameCompany"]);
|
|
25167
|
+
newsletterDestinationProviderSchema = z46.enum(["riverbank", "mailchimp"]);
|
|
24965
25168
|
newsletterFieldSchema = z46.object({
|
|
24966
25169
|
id: z46.string(),
|
|
24967
25170
|
type: z46.enum(["email", "text"]),
|
|
@@ -24969,10 +25172,24 @@ var init_newsletter_form_interactive = __esm({
|
|
|
24969
25172
|
required: z46.boolean(),
|
|
24970
25173
|
placeholder: z46.string().optional()
|
|
24971
25174
|
});
|
|
25175
|
+
newsletterSignupBlockIdSchema = z46.string().trim().min(1).transform(parseRequiredNewsletterSignupBlockId);
|
|
25176
|
+
signedNewsletterDestinationRefSchema = z46.string().trim().min(1).transform(parseRequiredSignedNewsletterDestinationRef);
|
|
25177
|
+
newsletterPublicDestinationRefSchema = z46.discriminatedUnion("tag", [
|
|
25178
|
+
z46.object({
|
|
25179
|
+
tag: z46.literal("block_ref"),
|
|
25180
|
+
blockId: newsletterSignupBlockIdSchema
|
|
25181
|
+
}),
|
|
25182
|
+
z46.object({
|
|
25183
|
+
tag: z46.literal("signed_destination_ref"),
|
|
25184
|
+
token: signedNewsletterDestinationRefSchema
|
|
25185
|
+
})
|
|
25186
|
+
]);
|
|
24972
25187
|
newsletterSourceSchema = z46.object({
|
|
25188
|
+
blockId: z46.string().nullable().optional(),
|
|
24973
25189
|
siteId: z46.string().optional(),
|
|
24974
25190
|
apiBaseUrl: z46.string().optional(),
|
|
24975
25191
|
listId: z46.string().nullable().optional(),
|
|
25192
|
+
destinationProvider: newsletterDestinationProviderSchema.nullable().optional(),
|
|
24976
25193
|
preset: newsletterPresetSchema.optional(),
|
|
24977
25194
|
includePhone: z46.boolean().optional(),
|
|
24978
25195
|
buttonLabel: z46.string().nullable().optional(),
|
|
@@ -24991,6 +25208,7 @@ var init_newsletter_form_interactive = __esm({
|
|
|
24991
25208
|
fields: z46.array(newsletterFieldSchema)
|
|
24992
25209
|
});
|
|
24993
25210
|
newsletterHydrationSchema = z46.object({
|
|
25211
|
+
destinationRef: newsletterPublicDestinationRefSchema.nullable().optional(),
|
|
24994
25212
|
listId: z46.string().nullable().optional(),
|
|
24995
25213
|
preset: newsletterPresetSchema,
|
|
24996
25214
|
includePhone: z46.boolean(),
|
|
@@ -25012,16 +25230,20 @@ var init_newsletter_form_interactive = __esm({
|
|
|
25012
25230
|
source: createZodCodec(newsletterSourceSchema),
|
|
25013
25231
|
render: createZodCodec(newsletterRenderSchema)
|
|
25014
25232
|
},
|
|
25015
|
-
buildRender: (source) =>
|
|
25016
|
-
|
|
25017
|
-
|
|
25018
|
-
|
|
25019
|
-
|
|
25020
|
-
|
|
25021
|
-
|
|
25022
|
-
|
|
25023
|
-
|
|
25024
|
-
|
|
25233
|
+
buildRender: (source) => {
|
|
25234
|
+
const runtimeSource = deriveNewsletterSignupRuntimeSource(source);
|
|
25235
|
+
return {
|
|
25236
|
+
display: buildNewsletterDisplay(source),
|
|
25237
|
+
hydration: {
|
|
25238
|
+
destinationRef: buildNewsletterSignupBlockRef(source.blockId),
|
|
25239
|
+
listId: runtimeSource.listId,
|
|
25240
|
+
preset: source.preset ?? "emailOnly",
|
|
25241
|
+
includePhone: source.includePhone ?? false,
|
|
25242
|
+
tags: runtimeSource.tags,
|
|
25243
|
+
spamProtectionEnabled: source.spamProtectionEnabled
|
|
25244
|
+
}
|
|
25245
|
+
};
|
|
25246
|
+
}
|
|
25025
25247
|
});
|
|
25026
25248
|
newsletterFormInteractiveIslandPropsCodec = createInteractiveIslandCodec({
|
|
25027
25249
|
runtime: newsletterFormBlockRuntime,
|
|
@@ -28850,14 +29072,12 @@ var init_types16 = __esm({
|
|
|
28850
29072
|
|
|
28851
29073
|
// ../blocks/src/system/runtime/shared/utils/formatting.ts
|
|
28852
29074
|
function formatPrice(cents, currency = DEFAULT_CURRENCY, locale) {
|
|
28853
|
-
return
|
|
28854
|
-
style: "currency",
|
|
28855
|
-
currency: currency.toUpperCase()
|
|
28856
|
-
}).format(cents / 100);
|
|
29075
|
+
return formatCurrencyAmount(cents, currency, { locale });
|
|
28857
29076
|
}
|
|
28858
29077
|
var init_formatting = __esm({
|
|
28859
29078
|
"../blocks/src/system/runtime/shared/utils/formatting.ts"() {
|
|
28860
29079
|
"use strict";
|
|
29080
|
+
init_src();
|
|
28861
29081
|
init_types16();
|
|
28862
29082
|
}
|
|
28863
29083
|
});
|
|
@@ -32076,6 +32296,8 @@ function ModalShell({
|
|
|
32076
32296
|
children,
|
|
32077
32297
|
portalRoot,
|
|
32078
32298
|
portal = false,
|
|
32299
|
+
portalWrapperClassName,
|
|
32300
|
+
portalWrapperProps,
|
|
32079
32301
|
overlayClassName,
|
|
32080
32302
|
modalClassName,
|
|
32081
32303
|
renderSrOnlyTitle = false,
|
|
@@ -32158,7 +32380,8 @@ function ModalShell({
|
|
|
32158
32380
|
if (!portalRoot) {
|
|
32159
32381
|
return null;
|
|
32160
32382
|
}
|
|
32161
|
-
|
|
32383
|
+
const modalNode = portalWrapperClassName || portalWrapperProps ? /* @__PURE__ */ jsx68("div", { ...portalWrapperProps, className: portalWrapperClassName, children: modal }) : modal;
|
|
32384
|
+
return createPortal(modalNode, portalRoot);
|
|
32162
32385
|
}
|
|
32163
32386
|
var modalBodyScrollLockCount, modalBodyOriginalOverflow;
|
|
32164
32387
|
var init_ModalShell = __esm({
|
|
@@ -35833,8 +36056,9 @@ var init_MagicLinkForm = __esm({
|
|
|
35833
36056
|
});
|
|
35834
36057
|
|
|
35835
36058
|
// ../blocks/src/system/runtime/nodes/event-registration/EventRegistrationWizard.tsx
|
|
35836
|
-
import { useMemo as useMemo8 } from "react";
|
|
35837
|
-
import {
|
|
36059
|
+
import React12, { useEffect as useEffect15, useMemo as useMemo8, useState as useState10 } from "react";
|
|
36060
|
+
import { createPortal as createPortal2 } from "react-dom";
|
|
36061
|
+
import { Fragment as Fragment15, jsx as jsx90, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
35838
36062
|
function EventPortalAuthPrompt(props2) {
|
|
35839
36063
|
return /* @__PURE__ */ jsxs64("div", { className: "er-portal-auth", children: [
|
|
35840
36064
|
/* @__PURE__ */ jsx90("p", { className: "er-portal-auth-title", children: props2.copy.title }),
|
|
@@ -35842,6 +36066,12 @@ function EventPortalAuthPrompt(props2) {
|
|
|
35842
36066
|
/* @__PURE__ */ jsx90("button", { type: "button", className: "er-portal-auth-link", onClick: props2.onRequestLogin, children: props2.copy.buttonText })
|
|
35843
36067
|
] });
|
|
35844
36068
|
}
|
|
36069
|
+
function getActiveTicketTypes2(event) {
|
|
36070
|
+
return event?.pricing.kind === "ticket_types" ? event.pricing.ticketTypes.filter((ticketType) => ticketType.isActive).sort((left, right) => left.sortOrder - right.sortOrder) : [];
|
|
36071
|
+
}
|
|
36072
|
+
function formatTicketTypePrice2(ticketType, currency) {
|
|
36073
|
+
return formatCurrencyAmount(ticketType.priceAmount, currency, { decimals: "auto" });
|
|
36074
|
+
}
|
|
35845
36075
|
function EventRegistrationWizard(props2) {
|
|
35846
36076
|
const {
|
|
35847
36077
|
occurrenceContext,
|
|
@@ -35861,6 +36091,8 @@ function EventRegistrationWizard(props2) {
|
|
|
35861
36091
|
const maxTicketsNum = normalizeEventRegistrationMaxTickets(maxTickets);
|
|
35862
36092
|
const showSpamProtection = spamProtectionEnabled ?? isSpamProtectionEnabled();
|
|
35863
36093
|
const buttonClass = themeButtonClassName({ variant: buttonVariant, size: "md" });
|
|
36094
|
+
const registrationRootClassName = `event-registration ${className || ""}`;
|
|
36095
|
+
const registrationRootRef = React12.useRef(null);
|
|
35864
36096
|
const wizard = useEventRegistrationWizard({
|
|
35865
36097
|
anchorId: EVENT_REGISTRATION_ANCHOR_ID,
|
|
35866
36098
|
occurrenceContext: occurrenceContext ?? null,
|
|
@@ -35868,13 +36100,44 @@ function EventRegistrationWizard(props2) {
|
|
|
35868
36100
|
events: events ?? [],
|
|
35869
36101
|
maxTicketsNum
|
|
35870
36102
|
});
|
|
36103
|
+
const [bookingOverlayOpen, setBookingOverlayOpen] = useState10(false);
|
|
36104
|
+
const [floatingPortalRoot, setFloatingPortalRoot] = useState10(null);
|
|
36105
|
+
useEffect15(() => {
|
|
36106
|
+
const sourceEl = registrationRootRef.current;
|
|
36107
|
+
if (!sourceEl) return;
|
|
36108
|
+
const portal = createBodyThemePortalRoot(sourceEl);
|
|
36109
|
+
if (!portal) return;
|
|
36110
|
+
setFloatingPortalRoot(portal.root);
|
|
36111
|
+
return () => {
|
|
36112
|
+
setFloatingPortalRoot(null);
|
|
36113
|
+
portal.cleanup();
|
|
36114
|
+
};
|
|
36115
|
+
}, []);
|
|
35871
36116
|
if (wizard.scopedEvents.length === 0 && !wizard.occurrenceContext) {
|
|
35872
|
-
return /* @__PURE__ */ jsx90(
|
|
36117
|
+
return /* @__PURE__ */ jsx90(
|
|
36118
|
+
"div",
|
|
36119
|
+
{
|
|
36120
|
+
ref: registrationRootRef,
|
|
36121
|
+
id: EVENT_REGISTRATION_ANCHOR_ID,
|
|
36122
|
+
className: registrationRootClassName,
|
|
36123
|
+
"data-block": "event-registration",
|
|
36124
|
+
children: /* @__PURE__ */ jsx90("div", { className: "er-empty", children: /* @__PURE__ */ jsx90("p", { className: "er-empty__text", children: "No events available for registration." }) })
|
|
36125
|
+
}
|
|
36126
|
+
);
|
|
35873
36127
|
}
|
|
35874
36128
|
const allowedStatuses = getRegistrableStatuses(wizard.api.config.isPreview);
|
|
35875
36129
|
const hasRegistrableEvents = wizard.scopedEvents.some((event) => !event.status || allowedStatuses.includes(event.status));
|
|
35876
36130
|
if (!hasRegistrableEvents && !wizard.occurrenceContext) {
|
|
35877
|
-
return /* @__PURE__ */ jsx90(
|
|
36131
|
+
return /* @__PURE__ */ jsx90(
|
|
36132
|
+
"div",
|
|
36133
|
+
{
|
|
36134
|
+
ref: registrationRootRef,
|
|
36135
|
+
id: EVENT_REGISTRATION_ANCHOR_ID,
|
|
36136
|
+
className: registrationRootClassName,
|
|
36137
|
+
"data-block": "event-registration",
|
|
36138
|
+
children: /* @__PURE__ */ jsx90("div", { className: "er-empty", children: /* @__PURE__ */ jsx90("p", { className: "er-empty__text", children: "Registration is not currently available for this event." }) })
|
|
36139
|
+
}
|
|
36140
|
+
);
|
|
35878
36141
|
}
|
|
35879
36142
|
const isWizardStep = WIZARD_STEPS.includes(wizard.step);
|
|
35880
36143
|
const activeWizardSteps = useMemo8(
|
|
@@ -35916,13 +36179,15 @@ function EventRegistrationWizard(props2) {
|
|
|
35916
36179
|
const currentStepNumber = getStepNumber(wizard.step, activeWizardSteps);
|
|
35917
36180
|
const summaryEvent = wizard.selectedEvent ?? wizard.preSelectedEvent;
|
|
35918
36181
|
const summaryEventPricingType = summaryEvent ? publicEventPricingType(summaryEvent.pricing) : "free";
|
|
36182
|
+
const summaryPriceLabel = summaryEvent ? formatEventPriceDisplay(summaryEvent.pricing) : null;
|
|
36183
|
+
const summaryAvailabilityLabel = summaryEvent?.availableSpots === null || summaryEvent?.availableSpots === void 0 ? null : summaryEvent.availableSpots > 0 ? `${summaryEvent.availableSpots} spots left` : summaryEvent.waitlistEnabled ? "Waitlist available" : "Fully booked";
|
|
35919
36184
|
const waitlistClaimRequiresPortalLogin = wizard.waitlistClaim.requiresPortalLogin && wizard.portalAuthState !== "authenticated" && wizard.portalAuthState !== "checking";
|
|
35920
36185
|
const portalAuthCopy = waitlistClaimRequiresPortalLogin ? {
|
|
35921
36186
|
...EVENT_PORTAL_AUTH_COPY["waitlist-claim"],
|
|
35922
36187
|
description: wizard.waitlistClaim.loginMessage ?? "Log in to continue with your waitlist claim."
|
|
35923
36188
|
} : EVENT_PORTAL_AUTH_COPY.membership;
|
|
35924
36189
|
const showPortalAuthPrompt = waitlistClaimRequiresPortalLogin || wizard.step === "select-tickets" && wizard.portalAuthState !== "authenticated" && wizard.portalAuthState !== "checking" && summaryEventPricingType !== "free";
|
|
35925
|
-
|
|
36190
|
+
const renderRegistrationSurface = (variant) => /* @__PURE__ */ jsxs64("div", { className: `er-container${variant === "overlay" ? " er-container--overlay" : ""}`, children: [
|
|
35926
36191
|
isWizardStep && /* @__PURE__ */ jsxs64("div", { className: "er-payment-layout er-payment-layout--no-sidebar", children: [
|
|
35927
36192
|
/* @__PURE__ */ jsxs64("div", { className: "er-payment-layout-main", children: [
|
|
35928
36193
|
totalSteps > 1 && /* @__PURE__ */ jsx90(StepIndicator2, { currentStep: currentStepNumber, totalSteps, stepLabels }),
|
|
@@ -35990,7 +36255,100 @@ function EventRegistrationWizard(props2) {
|
|
|
35990
36255
|
}
|
|
35991
36256
|
),
|
|
35992
36257
|
wizard.step === "error" && /* @__PURE__ */ jsx90(ErrorStep, { message: wizard.errorMessage, onRetry: wizard.handleRetry })
|
|
35993
|
-
] })
|
|
36258
|
+
] });
|
|
36259
|
+
const isEmbedded = (className ?? "").includes("event-registration--embedded");
|
|
36260
|
+
const overlayEnabled = props2.overlayEnabled === true;
|
|
36261
|
+
if (isEmbedded || !overlayEnabled) {
|
|
36262
|
+
return /* @__PURE__ */ jsx90(
|
|
36263
|
+
"div",
|
|
36264
|
+
{
|
|
36265
|
+
ref: registrationRootRef,
|
|
36266
|
+
id: EVENT_REGISTRATION_ANCHOR_ID,
|
|
36267
|
+
className: registrationRootClassName,
|
|
36268
|
+
"data-block": "event-registration",
|
|
36269
|
+
children: renderRegistrationSurface("inline")
|
|
36270
|
+
}
|
|
36271
|
+
);
|
|
36272
|
+
}
|
|
36273
|
+
const bookingSummaryMeta = [summaryPriceLabel, summaryAvailabilityLabel].filter(Boolean).join(" \xB7 ");
|
|
36274
|
+
const bookingTicketTypes = getActiveTicketTypes2(summaryEvent);
|
|
36275
|
+
const bookingTicketTypesCurrency = summaryEvent?.pricing.kind === "ticket_types" ? summaryEvent.pricing.currency : null;
|
|
36276
|
+
const renderBookingEntry = (base) => /* @__PURE__ */ jsxs64(Fragment15, { children: [
|
|
36277
|
+
/* @__PURE__ */ jsxs64("div", { className: `${base}__info`, children: [
|
|
36278
|
+
/* @__PURE__ */ jsx90("span", { className: `${base}__title`, children: "Book this event" }),
|
|
36279
|
+
bookingSummaryMeta && /* @__PURE__ */ jsx90("span", { className: `${base}__meta`, children: bookingSummaryMeta }),
|
|
36280
|
+
base === "er-booking-teaser" && bookingTicketTypesCurrency && bookingTicketTypes.length > 0 ? /* @__PURE__ */ jsx90("div", { className: "er-booking-teaser__tickets", children: bookingTicketTypes.map((ticketType) => /* @__PURE__ */ jsxs64("div", { className: "er-booking-teaser__ticket", children: [
|
|
36281
|
+
/* @__PURE__ */ jsx90("span", { className: "er-booking-teaser__ticket-name", children: ticketType.name }),
|
|
36282
|
+
/* @__PURE__ */ jsx90("strong", { children: formatTicketTypePrice2(ticketType, bookingTicketTypesCurrency) })
|
|
36283
|
+
] }, ticketType.id)) }) : null
|
|
36284
|
+
] }),
|
|
36285
|
+
/* @__PURE__ */ jsx90(
|
|
36286
|
+
"button",
|
|
36287
|
+
{
|
|
36288
|
+
type: "button",
|
|
36289
|
+
className: `${base}__cta ${buttonClass}`,
|
|
36290
|
+
onClick: () => setBookingOverlayOpen(true),
|
|
36291
|
+
children: "Book now"
|
|
36292
|
+
}
|
|
36293
|
+
)
|
|
36294
|
+
] });
|
|
36295
|
+
const floatingBookingUi = !bookingOverlayOpen && isWizardStep ? /* @__PURE__ */ jsx90("div", { className: "er-booking-bar", children: /* @__PURE__ */ jsx90("div", { className: "er-booking-bar__inner", children: renderBookingEntry("er-booking-bar") }) }) : null;
|
|
36296
|
+
const floatingBookingLayer = floatingPortalRoot ? createPortal2(
|
|
36297
|
+
/* @__PURE__ */ jsx90("div", { className: registrationRootClassName, "data-block": "event-registration", children: floatingBookingUi }),
|
|
36298
|
+
floatingPortalRoot
|
|
36299
|
+
) : floatingBookingUi;
|
|
36300
|
+
const bookingOverlayLayer = bookingOverlayOpen ? /* @__PURE__ */ jsx90(
|
|
36301
|
+
ModalShell,
|
|
36302
|
+
{
|
|
36303
|
+
title: "Book this event",
|
|
36304
|
+
titleId: "event-registration-booking-title",
|
|
36305
|
+
onClose: () => setBookingOverlayOpen(false),
|
|
36306
|
+
portal: floatingPortalRoot != null,
|
|
36307
|
+
portalRoot: floatingPortalRoot,
|
|
36308
|
+
portalWrapperClassName: registrationRootClassName,
|
|
36309
|
+
portalWrapperProps: { "data-block": "event-registration" },
|
|
36310
|
+
overlayClassName: "er-booking-overlay",
|
|
36311
|
+
modalClassName: "er-booking-overlay__panel",
|
|
36312
|
+
renderHeader: ({ closeButtonRef, onClose, title, titleId }) => /* @__PURE__ */ jsxs64("div", { className: "er-booking-overlay__header", children: [
|
|
36313
|
+
/* @__PURE__ */ jsx90("h2", { className: "er-booking-overlay__title", id: titleId, children: title }),
|
|
36314
|
+
/* @__PURE__ */ jsx90(
|
|
36315
|
+
"button",
|
|
36316
|
+
{
|
|
36317
|
+
ref: closeButtonRef,
|
|
36318
|
+
type: "button",
|
|
36319
|
+
className: "er-booking-overlay__close",
|
|
36320
|
+
onClick: onClose,
|
|
36321
|
+
"aria-label": "Close booking",
|
|
36322
|
+
children: "\xD7"
|
|
36323
|
+
}
|
|
36324
|
+
)
|
|
36325
|
+
] }),
|
|
36326
|
+
children: renderRegistrationSurface("overlay")
|
|
36327
|
+
}
|
|
36328
|
+
) : null;
|
|
36329
|
+
return /* @__PURE__ */ jsxs64(
|
|
36330
|
+
"div",
|
|
36331
|
+
{
|
|
36332
|
+
ref: registrationRootRef,
|
|
36333
|
+
id: EVENT_REGISTRATION_ANCHOR_ID,
|
|
36334
|
+
className: registrationRootClassName,
|
|
36335
|
+
"data-block": "event-registration",
|
|
36336
|
+
children: [
|
|
36337
|
+
isWizardStep ? (
|
|
36338
|
+
// In-flow: a lightweight teaser at the block's position. The full wizard
|
|
36339
|
+
// lives in the sheet, so there is only ever one form surface mounted.
|
|
36340
|
+
/* @__PURE__ */ jsx90("div", { className: "er-booking-teaser", children: renderBookingEntry("er-booking-teaser") })
|
|
36341
|
+
) : (
|
|
36342
|
+
// Terminal states (success, error, payment verification on redirect
|
|
36343
|
+
// return) render in the page where the visitor lands, unless the sheet is
|
|
36344
|
+
// open and already showing them.
|
|
36345
|
+
!bookingOverlayOpen && renderRegistrationSurface("inline")
|
|
36346
|
+
),
|
|
36347
|
+
floatingBookingLayer,
|
|
36348
|
+
bookingOverlayLayer
|
|
36349
|
+
]
|
|
36350
|
+
}
|
|
36351
|
+
);
|
|
35994
36352
|
}
|
|
35995
36353
|
var EVENT_PORTAL_AUTH_COPY;
|
|
35996
36354
|
var init_EventRegistrationWizard = __esm({
|
|
@@ -36008,6 +36366,9 @@ var init_EventRegistrationWizard = __esm({
|
|
|
36008
36366
|
init_EventRegistrationSummaryBar();
|
|
36009
36367
|
init_EventSelectionStep();
|
|
36010
36368
|
init_useEventRegistrationWizard();
|
|
36369
|
+
init_utils();
|
|
36370
|
+
init_themePortalRoot();
|
|
36371
|
+
init_ModalShell();
|
|
36011
36372
|
init_MagicLinkForm();
|
|
36012
36373
|
init_spinner();
|
|
36013
36374
|
init_buttons();
|
|
@@ -36028,7 +36389,7 @@ var init_EventRegistrationWizard = __esm({
|
|
|
36028
36389
|
});
|
|
36029
36390
|
|
|
36030
36391
|
// ../blocks/src/system/runtime/nodes/event-registration/PastOccurrenceNotice.tsx
|
|
36031
|
-
import { useEffect as
|
|
36392
|
+
import { useEffect as useEffect16, useState as useState11 } from "react";
|
|
36032
36393
|
import { jsx as jsx91, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
36033
36394
|
function isPastOccurrence(startsAt) {
|
|
36034
36395
|
if (!startsAt) return false;
|
|
@@ -36042,8 +36403,8 @@ function getParentPathname(pathname) {
|
|
|
36042
36403
|
return `/${segments.slice(0, -1).join("/")}`;
|
|
36043
36404
|
}
|
|
36044
36405
|
function PastOccurrenceNotice(props2) {
|
|
36045
|
-
const [parentPathname, setParentPathname] =
|
|
36046
|
-
|
|
36406
|
+
const [parentPathname, setParentPathname] = useState11(null);
|
|
36407
|
+
useEffect16(() => {
|
|
36047
36408
|
setParentPathname(getParentPathname(window.location.pathname));
|
|
36048
36409
|
}, []);
|
|
36049
36410
|
return /* @__PURE__ */ jsx91(
|
|
@@ -36319,22 +36680,22 @@ var init_BookingModeStep = __esm({
|
|
|
36319
36680
|
});
|
|
36320
36681
|
|
|
36321
36682
|
// ../blocks/src/system/runtime/nodes/course-registration/PortalAuthSidebar.tsx
|
|
36322
|
-
import { useEffect as
|
|
36323
|
-
import { Fragment as
|
|
36683
|
+
import { useEffect as useEffect17, useState as useState12 } from "react";
|
|
36684
|
+
import { Fragment as Fragment16, jsx as jsx96, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
36324
36685
|
function PortalAuthSidebar({
|
|
36325
36686
|
onMagicLinkSent,
|
|
36326
36687
|
autoOpen = false,
|
|
36327
36688
|
variant = "membership",
|
|
36328
36689
|
loginMessage
|
|
36329
36690
|
}) {
|
|
36330
|
-
const [showModal, setShowModal] =
|
|
36691
|
+
const [showModal, setShowModal] = useState12(false);
|
|
36331
36692
|
const copy = PORTAL_AUTH_COPY[variant];
|
|
36332
36693
|
const description = variant === "waitlist-claim" ? loginMessage ?? "Log in to continue with your waitlist claim." : copy.description;
|
|
36333
|
-
|
|
36694
|
+
useEffect17(() => {
|
|
36334
36695
|
if (!autoOpen) return;
|
|
36335
36696
|
setShowModal(true);
|
|
36336
36697
|
}, [autoOpen]);
|
|
36337
|
-
return /* @__PURE__ */ jsxs67(
|
|
36698
|
+
return /* @__PURE__ */ jsxs67(Fragment16, { children: [
|
|
36338
36699
|
/* @__PURE__ */ jsxs67("div", { className: "cr-portal-sidebar", children: [
|
|
36339
36700
|
/* @__PURE__ */ jsx96("div", { className: "cr-portal-sidebar__icon", "aria-hidden": "true", children: "\u{1F464}" }),
|
|
36340
36701
|
/* @__PURE__ */ jsx96("h3", { className: "cr-portal-sidebar__title", children: copy.title }),
|
|
@@ -36429,7 +36790,7 @@ var init_PortalAuthSidebar = __esm({
|
|
|
36429
36790
|
});
|
|
36430
36791
|
|
|
36431
36792
|
// ../blocks/src/system/runtime/nodes/course-registration/SuccessStep.tsx
|
|
36432
|
-
import { Fragment as
|
|
36793
|
+
import { Fragment as Fragment17, jsx as jsx97, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
36433
36794
|
function SuccessStep2({
|
|
36434
36795
|
usedMembership,
|
|
36435
36796
|
successMessage,
|
|
@@ -36443,7 +36804,7 @@ function SuccessStep2({
|
|
|
36443
36804
|
titleClassName: "cr-success__title",
|
|
36444
36805
|
icon: /* @__PURE__ */ jsx97(StateIcon, { variant: "success", children: /* @__PURE__ */ jsx97(CheckIcon, { strokeWidth: 2 }) }),
|
|
36445
36806
|
title: "Enrollment Complete!",
|
|
36446
|
-
body: /* @__PURE__ */ jsxs68(
|
|
36807
|
+
body: /* @__PURE__ */ jsxs68(Fragment17, { children: [
|
|
36447
36808
|
/* @__PURE__ */ jsx97("p", { className: "cr-success__message", children: usedMembership ? membershipMessage : successMessage }),
|
|
36448
36809
|
usedMembership && /* @__PURE__ */ jsx97("p", { className: "cr-success__membership", children: "Enrolled using your membership" })
|
|
36449
36810
|
] })
|
|
@@ -36489,7 +36850,7 @@ var init_ErrorStep2 = __esm({
|
|
|
36489
36850
|
});
|
|
36490
36851
|
|
|
36491
36852
|
// ../blocks/src/system/runtime/nodes/course-registration/VerifyingTimeoutStep.tsx
|
|
36492
|
-
import { Fragment as
|
|
36853
|
+
import { Fragment as Fragment18, jsx as jsx99, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
36493
36854
|
function VerifyingTimeoutStep2({
|
|
36494
36855
|
buttonText = "Check Again",
|
|
36495
36856
|
buttonVariant = "primary",
|
|
@@ -36505,7 +36866,7 @@ function VerifyingTimeoutStep2({
|
|
|
36505
36866
|
titleClassName: "cr-error__title",
|
|
36506
36867
|
icon: /* @__PURE__ */ jsx99(StateIcon, { variant: "warning", children: /* @__PURE__ */ jsx99(ClockIcon, {}) }),
|
|
36507
36868
|
title: "Payment Verification Taking Longer",
|
|
36508
|
-
body: /* @__PURE__ */ jsxs69(
|
|
36869
|
+
body: /* @__PURE__ */ jsxs69(Fragment18, { children: [
|
|
36509
36870
|
/* @__PURE__ */ jsx99("p", { className: "cr-error__message", children: "Your payment may still be processing. Please check your email for confirmation." }),
|
|
36510
36871
|
supportEmail && /* @__PURE__ */ jsxs69("p", { className: "cr-error__message", children: [
|
|
36511
36872
|
"If you need help, contact us at",
|
|
@@ -36558,7 +36919,7 @@ var init_PaymentFailedStep2 = __esm({
|
|
|
36558
36919
|
});
|
|
36559
36920
|
|
|
36560
36921
|
// ../blocks/src/system/runtime/nodes/course-registration/WaitlistStep.tsx
|
|
36561
|
-
import { Fragment as
|
|
36922
|
+
import { Fragment as Fragment19, jsx as jsx101, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
36562
36923
|
function WaitlistStep({ message, position }) {
|
|
36563
36924
|
return /* @__PURE__ */ jsx101(
|
|
36564
36925
|
TerminalPanel,
|
|
@@ -36568,7 +36929,7 @@ function WaitlistStep({ message, position }) {
|
|
|
36568
36929
|
titleClassName: "cr-waitlist__title",
|
|
36569
36930
|
icon: /* @__PURE__ */ jsx101(StateIcon, { variant: "waitlist", children: /* @__PURE__ */ jsx101(ClockIcon, {}) }),
|
|
36570
36931
|
title: "Added to Waitlist",
|
|
36571
|
-
body: /* @__PURE__ */ jsxs70(
|
|
36932
|
+
body: /* @__PURE__ */ jsxs70(Fragment19, { children: [
|
|
36572
36933
|
/* @__PURE__ */ jsx101("p", { className: "cr-waitlist__message", children: message }),
|
|
36573
36934
|
typeof position === "number" && /* @__PURE__ */ jsxs70("p", { className: "cr-waitlist__position", children: [
|
|
36574
36935
|
"Your position: #",
|
|
@@ -36636,11 +36997,11 @@ var init_CourseRegistrationErrorBoundary = __esm({
|
|
|
36636
36997
|
|
|
36637
36998
|
// ../blocks/src/system/runtime/nodes/course-registration/components.tsx
|
|
36638
36999
|
import React15 from "react";
|
|
36639
|
-
import { Fragment as
|
|
37000
|
+
import { Fragment as Fragment20, jsx as jsx103, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
36640
37001
|
function TeamMemberInlineList({
|
|
36641
37002
|
teamMembers
|
|
36642
37003
|
}) {
|
|
36643
|
-
return /* @__PURE__ */ jsx103(
|
|
37004
|
+
return /* @__PURE__ */ jsx103(Fragment20, { children: teamMembers.map((teamMember, index) => /* @__PURE__ */ jsxs72(React15.Fragment, { children: [
|
|
36644
37005
|
index > 0 ? ", " : "",
|
|
36645
37006
|
teamMember.profilePath ? /* @__PURE__ */ jsx103("a", { href: teamMember.profilePath, children: teamMember.name }) : teamMember.name
|
|
36646
37007
|
] }, teamMember.id)) });
|
|
@@ -36790,7 +37151,7 @@ function EnrollmentForm({ formData, errors, onChange, isEmailLocked, isLoading,
|
|
|
36790
37151
|
message: errors.email,
|
|
36791
37152
|
messageId: emailErrorId
|
|
36792
37153
|
});
|
|
36793
|
-
return /* @__PURE__ */ jsxs72(
|
|
37154
|
+
return /* @__PURE__ */ jsxs72(Fragment20, { children: [
|
|
36794
37155
|
/* @__PURE__ */ jsxs72("div", { className: "cr-form__field", children: [
|
|
36795
37156
|
/* @__PURE__ */ jsx103("label", { htmlFor: "cr-name", className: "cr-form__label", children: "Name *" }),
|
|
36796
37157
|
/* @__PURE__ */ jsx103(
|
|
@@ -36873,7 +37234,7 @@ var init_components2 = __esm({
|
|
|
36873
37234
|
});
|
|
36874
37235
|
|
|
36875
37236
|
// ../blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationWizard.ts
|
|
36876
|
-
import { useEffect as
|
|
37237
|
+
import { useEffect as useEffect18, useMemo as useMemo9, useState as useState13 } from "react";
|
|
36877
37238
|
function shouldFetchCourseEligibility(course, hasPaidSelection, portalAuthState, hasWaitlistClaimToken) {
|
|
36878
37239
|
if (!course || portalAuthState === "checking") return false;
|
|
36879
37240
|
if (hasWaitlistClaimToken) return false;
|
|
@@ -36926,41 +37287,41 @@ function useCourseRegistrationWizard(props2) {
|
|
|
36926
37287
|
}
|
|
36927
37288
|
return allCourses;
|
|
36928
37289
|
}, [courses, contentEntry?.id, contentEntry?.slug, entrySubrouteContext]);
|
|
36929
|
-
const [step, setStep] =
|
|
37290
|
+
const [step, setStep] = useState13(() => {
|
|
36930
37291
|
const params = new URLSearchParams(window.location.search);
|
|
36931
37292
|
const enrollment = params.get("enrollment");
|
|
36932
37293
|
const sessionId = getSessionIdFromUrl();
|
|
36933
37294
|
if (enrollment === "success" && sessionId) return "verifying-payment";
|
|
36934
37295
|
return scopedCourses.length === 1 ? "enter-details" : "select-course";
|
|
36935
37296
|
});
|
|
36936
|
-
const [selectedCourse, setSelectedCourse] =
|
|
37297
|
+
const [selectedCourse, setSelectedCourse] = useState13(
|
|
36937
37298
|
scopedCourses.length === 1 ? scopedCourses[0] ?? null : null
|
|
36938
37299
|
);
|
|
36939
|
-
const [selectedPricingOptionId, setSelectedPricingOptionId] =
|
|
36940
|
-
const [formData, setFormData] =
|
|
37300
|
+
const [selectedPricingOptionId, setSelectedPricingOptionId] = useState13(null);
|
|
37301
|
+
const [formData, setFormData] = useState13({
|
|
36941
37302
|
name: "",
|
|
36942
37303
|
email: "",
|
|
36943
37304
|
phone: "",
|
|
36944
37305
|
notes: ""
|
|
36945
37306
|
});
|
|
36946
|
-
const [errors, setErrors] =
|
|
36947
|
-
const [enrollmentResult, setEnrollmentResult] =
|
|
36948
|
-
const [errorMessage, setErrorMessage] =
|
|
36949
|
-
const [portalAuthState, setPortalAuthState] =
|
|
36950
|
-
const [altchaSolution, setAltchaSolution] =
|
|
37307
|
+
const [errors, setErrors] = useState13({});
|
|
37308
|
+
const [enrollmentResult, setEnrollmentResult] = useState13(null);
|
|
37309
|
+
const [errorMessage, setErrorMessage] = useState13("");
|
|
37310
|
+
const [portalAuthState, setPortalAuthState] = useState13("checking");
|
|
37311
|
+
const [altchaSolution, setAltchaSolution] = useState13(null);
|
|
36951
37312
|
const showSpamProtection = isSpamProtectionEnabled();
|
|
36952
|
-
const [eligibilityLoading, setEligibilityLoading] =
|
|
36953
|
-
const [eligibilityError, setEligibilityError] =
|
|
36954
|
-
const [courseEligibility, setCourseEligibility] =
|
|
36955
|
-
const [eligibleMemberships, setEligibleMemberships] =
|
|
36956
|
-
const [paymentChoice, setPaymentChoice] =
|
|
36957
|
-
const [selectedMembershipId, setSelectedMembershipId] =
|
|
36958
|
-
const [discountUiOpen, setDiscountUiOpen] =
|
|
36959
|
-
const [discountCode, setDiscountCode] =
|
|
36960
|
-
const [discountsAvailable, setDiscountsAvailable] =
|
|
36961
|
-
const [manualCodeEntryAllowed, setManualCodeEntryAllowed] =
|
|
36962
|
-
const [discountsAvailableLoading, setDiscountsAvailableLoading] =
|
|
36963
|
-
const [bookingMode, setBookingMode] =
|
|
37313
|
+
const [eligibilityLoading, setEligibilityLoading] = useState13(false);
|
|
37314
|
+
const [eligibilityError, setEligibilityError] = useState13(null);
|
|
37315
|
+
const [courseEligibility, setCourseEligibility] = useState13(null);
|
|
37316
|
+
const [eligibleMemberships, setEligibleMemberships] = useState13([]);
|
|
37317
|
+
const [paymentChoice, setPaymentChoice] = useState13("checkout");
|
|
37318
|
+
const [selectedMembershipId, setSelectedMembershipId] = useState13(null);
|
|
37319
|
+
const [discountUiOpen, setDiscountUiOpen] = useState13(false);
|
|
37320
|
+
const [discountCode, setDiscountCode] = useState13("");
|
|
37321
|
+
const [discountsAvailable, setDiscountsAvailable] = useState13(false);
|
|
37322
|
+
const [manualCodeEntryAllowed, setManualCodeEntryAllowed] = useState13(false);
|
|
37323
|
+
const [discountsAvailableLoading, setDiscountsAvailableLoading] = useState13(false);
|
|
37324
|
+
const [bookingMode, setBookingMode] = useState13(null);
|
|
36964
37325
|
const waitlistClaim = useWaitlistClaim();
|
|
36965
37326
|
const selectedCoursePricing = useMemo9(
|
|
36966
37327
|
() => selectedCourse ? resolveCoursePricingState(selectedCourse, selectedPricingOptionId) : null,
|
|
@@ -36977,7 +37338,7 @@ function useCourseRegistrationWizard(props2) {
|
|
|
36977
37338
|
setStep("error");
|
|
36978
37339
|
return true;
|
|
36979
37340
|
};
|
|
36980
|
-
|
|
37341
|
+
useEffect18(() => {
|
|
36981
37342
|
let cancelled = false;
|
|
36982
37343
|
async function checkPortalAuth() {
|
|
36983
37344
|
const hasPortalAuth = api.config.auth.type === "bearer" || api.config.authOverrides?.portal?.type === "bearer";
|
|
@@ -37006,7 +37367,7 @@ function useCourseRegistrationWizard(props2) {
|
|
|
37006
37367
|
cancelled = true;
|
|
37007
37368
|
};
|
|
37008
37369
|
}, [api]);
|
|
37009
|
-
|
|
37370
|
+
useEffect18(() => {
|
|
37010
37371
|
const claim = waitlistClaim.claim;
|
|
37011
37372
|
if (!claim || claim.subject.kind !== "course") return;
|
|
37012
37373
|
const courseId = claim.subject.courseId;
|
|
@@ -37028,13 +37389,13 @@ function useCourseRegistrationWizard(props2) {
|
|
|
37028
37389
|
setStep("enter-details");
|
|
37029
37390
|
}
|
|
37030
37391
|
}, [waitlistClaim.claim, scopedCourses, step]);
|
|
37031
|
-
|
|
37392
|
+
useEffect18(() => {
|
|
37032
37393
|
if (waitlistClaim.requiresPortalLogin) return;
|
|
37033
37394
|
if (!waitlistClaim.error) return;
|
|
37034
37395
|
setErrorMessage(waitlistClaim.error);
|
|
37035
37396
|
setStep("error");
|
|
37036
37397
|
}, [waitlistClaim.error, waitlistClaim.requiresPortalLogin]);
|
|
37037
|
-
|
|
37398
|
+
useEffect18(() => {
|
|
37038
37399
|
if (!selectedCourse) {
|
|
37039
37400
|
setSelectedPricingOptionId(null);
|
|
37040
37401
|
return;
|
|
@@ -37047,7 +37408,7 @@ function useCourseRegistrationWizard(props2) {
|
|
|
37047
37408
|
return defaultPricing.selectedOption?.id ?? null;
|
|
37048
37409
|
});
|
|
37049
37410
|
}, [selectedCourse]);
|
|
37050
|
-
|
|
37411
|
+
useEffect18(() => {
|
|
37051
37412
|
let cancelled = false;
|
|
37052
37413
|
async function fetchEligibility() {
|
|
37053
37414
|
setCourseEligibility(null);
|
|
@@ -37097,7 +37458,7 @@ function useCourseRegistrationWizard(props2) {
|
|
|
37097
37458
|
portalAuthState,
|
|
37098
37459
|
waitlistClaim.token
|
|
37099
37460
|
]);
|
|
37100
|
-
|
|
37461
|
+
useEffect18(() => {
|
|
37101
37462
|
let cancelled = false;
|
|
37102
37463
|
async function verifyAfterCheckout() {
|
|
37103
37464
|
const params = new URLSearchParams(window.location.search);
|
|
@@ -37380,7 +37741,7 @@ function useCourseRegistrationWizard(props2) {
|
|
|
37380
37741
|
if (paymentChoice !== "checkout") return null;
|
|
37381
37742
|
return { type: "course", courseId: selectedCourse.id };
|
|
37382
37743
|
}, [selectedCourse, selectedCoursePricing?.selectedRequiresPayment, paymentChoice]);
|
|
37383
|
-
|
|
37744
|
+
useEffect18(() => {
|
|
37384
37745
|
let cancelled = false;
|
|
37385
37746
|
async function checkDiscountAvailability() {
|
|
37386
37747
|
if (!courseDiscountContext) {
|
|
@@ -37510,7 +37871,7 @@ var init_useCourseRegistrationWizard = __esm({
|
|
|
37510
37871
|
});
|
|
37511
37872
|
|
|
37512
37873
|
// ../blocks/src/system/runtime/nodes/course-registration/CourseRegistrationWizard.tsx
|
|
37513
|
-
import { Fragment as
|
|
37874
|
+
import { Fragment as Fragment21, jsx as jsx104, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
37514
37875
|
function CourseRegistrationWizard(props2) {
|
|
37515
37876
|
const {
|
|
37516
37877
|
showSessions = true,
|
|
@@ -37670,7 +38031,7 @@ function CourseRegistrationWizard(props2) {
|
|
|
37670
38031
|
}
|
|
37671
38032
|
) }),
|
|
37672
38033
|
/* @__PURE__ */ jsx104("p", { className: "cr-text cr-text--muted", children: "Registration closed." })
|
|
37673
|
-
] }) : /* @__PURE__ */ jsxs73(
|
|
38034
|
+
] }) : /* @__PURE__ */ jsxs73(Fragment21, { children: [
|
|
37674
38035
|
/* @__PURE__ */ jsxs73(
|
|
37675
38036
|
"form",
|
|
37676
38037
|
{
|
|
@@ -38019,7 +38380,7 @@ var init_course_registration_client = __esm({
|
|
|
38019
38380
|
});
|
|
38020
38381
|
|
|
38021
38382
|
// ../blocks/src/system/runtime/nodes/shared/LeafletStaticMap.tsx
|
|
38022
|
-
import { useEffect as
|
|
38383
|
+
import { useEffect as useEffect19, useRef as useRef11, useState as useState14 } from "react";
|
|
38023
38384
|
import { jsx as jsx106 } from "react/jsx-runtime";
|
|
38024
38385
|
function isLeafletApi(value) {
|
|
38025
38386
|
if (!isRecord3(value)) return false;
|
|
@@ -38079,9 +38440,9 @@ var init_LeafletStaticMap = __esm({
|
|
|
38079
38440
|
const mapContainerRef = useRef11(null);
|
|
38080
38441
|
const mapRef = useRef11(null);
|
|
38081
38442
|
const markerRef = useRef11(null);
|
|
38082
|
-
const [loading, setLoading] =
|
|
38083
|
-
const [error, setError] =
|
|
38084
|
-
|
|
38443
|
+
const [loading, setLoading] = useState14(true);
|
|
38444
|
+
const [error, setError] = useState14(null);
|
|
38445
|
+
useEffect19(() => {
|
|
38085
38446
|
let mounted = true;
|
|
38086
38447
|
async function initMap() {
|
|
38087
38448
|
try {
|
|
@@ -38137,7 +38498,7 @@ var init_LeafletStaticMap = __esm({
|
|
|
38137
38498
|
}
|
|
38138
38499
|
};
|
|
38139
38500
|
}, []);
|
|
38140
|
-
|
|
38501
|
+
useEffect19(() => {
|
|
38141
38502
|
if (!mapRef.current || !markerRef.current) {
|
|
38142
38503
|
return;
|
|
38143
38504
|
}
|
|
@@ -38900,8 +39261,8 @@ var init_useDiscountApply = __esm({
|
|
|
38900
39261
|
});
|
|
38901
39262
|
|
|
38902
39263
|
// ../blocks/src/system/runtime/nodes/shop.client.tsx
|
|
38903
|
-
import React19, { useCallback as useCallback9, useEffect as
|
|
38904
|
-
import { Fragment as
|
|
39264
|
+
import React19, { useCallback as useCallback9, useEffect as useEffect21, useRef as useRef12, useState as useState16 } from "react";
|
|
39265
|
+
import { Fragment as Fragment22, jsx as jsx110, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
38905
39266
|
function ShopClient(props2) {
|
|
38906
39267
|
return /* @__PURE__ */ jsx110(PassesMembershipsController, { render: props2.render });
|
|
38907
39268
|
}
|
|
@@ -38934,7 +39295,7 @@ function PassesMembershipsController({ render }) {
|
|
|
38934
39295
|
initialDiscountApplyState
|
|
38935
39296
|
);
|
|
38936
39297
|
const passAddFeedback = useTransientShopAddFeedback();
|
|
38937
|
-
const [modalPortalRoot, setModalPortalRoot] =
|
|
39298
|
+
const [modalPortalRoot, setModalPortalRoot] = useState16(null);
|
|
38938
39299
|
const shopRootRef = useRef12(null);
|
|
38939
39300
|
const emailInputRef = useRef12(null);
|
|
38940
39301
|
const focusedCheckoutKeyRef = useRef12(null);
|
|
@@ -38974,7 +39335,7 @@ function PassesMembershipsController({ render }) {
|
|
|
38974
39335
|
const closeCheckout = useCallback9(() => {
|
|
38975
39336
|
dispatch({ type: "closeCheckout" });
|
|
38976
39337
|
}, []);
|
|
38977
|
-
|
|
39338
|
+
useEffect21(() => {
|
|
38978
39339
|
const checkoutKey = checkout2 ? `${checkout2.item.productType}:${checkout2.item.product.id}` : null;
|
|
38979
39340
|
if (!checkoutKey) {
|
|
38980
39341
|
focusedCheckoutKeyRef.current = null;
|
|
@@ -38985,14 +39346,14 @@ function PassesMembershipsController({ render }) {
|
|
|
38985
39346
|
focusedCheckoutKeyRef.current = checkoutKey;
|
|
38986
39347
|
}
|
|
38987
39348
|
}, [checkout2]);
|
|
38988
|
-
|
|
39349
|
+
useEffect21(() => {
|
|
38989
39350
|
dispatchDiscountApply({ type: "resetApplied" });
|
|
38990
39351
|
}, [checkout2?.form.email, checkout2?.item.product.id, checkout2?.item.productType]);
|
|
38991
|
-
|
|
39352
|
+
useEffect21(() => {
|
|
38992
39353
|
if (checkout2 && discountUi.manualCodeEntryAllowed) return;
|
|
38993
39354
|
dispatchDiscountApply({ type: "remove" });
|
|
38994
39355
|
}, [checkout2, discountUi.manualCodeEntryAllowed]);
|
|
38995
|
-
|
|
39356
|
+
useEffect21(() => {
|
|
38996
39357
|
const sourceEl = shopRootRef.current;
|
|
38997
39358
|
if (!sourceEl) return;
|
|
38998
39359
|
const portal = createBodyThemePortalRoot(sourceEl);
|
|
@@ -39004,7 +39365,7 @@ function PassesMembershipsController({ render }) {
|
|
|
39004
39365
|
portal.cleanup();
|
|
39005
39366
|
};
|
|
39006
39367
|
}, []);
|
|
39007
|
-
|
|
39368
|
+
useEffect21(() => {
|
|
39008
39369
|
const { checkout: checkoutStatus } = consumeSearchParams(["checkout", "product", "session_id"]);
|
|
39009
39370
|
if (!checkoutStatus) return;
|
|
39010
39371
|
scrollToBlock(SHOP_ANCHOR_ID);
|
|
@@ -39057,7 +39418,7 @@ function PassesMembershipsController({ render }) {
|
|
|
39057
39418
|
window.location.href = result.checkoutUrl;
|
|
39058
39419
|
return;
|
|
39059
39420
|
default:
|
|
39060
|
-
return
|
|
39421
|
+
return assertNever2(result);
|
|
39061
39422
|
}
|
|
39062
39423
|
} catch (submitError) {
|
|
39063
39424
|
dispatch({
|
|
@@ -39080,12 +39441,12 @@ function PassesMembershipsController({ render }) {
|
|
|
39080
39441
|
const handleConfirmDuplicate = useCallback9(() => {
|
|
39081
39442
|
void submitCheckout(true);
|
|
39082
39443
|
}, [submitCheckout]);
|
|
39083
|
-
return /* @__PURE__ */ jsxs77(
|
|
39444
|
+
return /* @__PURE__ */ jsxs77(Fragment22, { children: [
|
|
39084
39445
|
/* @__PURE__ */ jsx110("div", { ref: shopRootRef, children: /* @__PURE__ */ jsx110(
|
|
39085
39446
|
PassesMembershipsSectionView,
|
|
39086
39447
|
{
|
|
39087
39448
|
display,
|
|
39088
|
-
beforeContent: /* @__PURE__ */ jsx110(
|
|
39449
|
+
beforeContent: /* @__PURE__ */ jsx110(Fragment22, { children: state.returnNotice ? /* @__PURE__ */ jsx110(
|
|
39089
39450
|
TerminalPanel,
|
|
39090
39451
|
{
|
|
39091
39452
|
tone: state.returnNotice.kind === "success" ? "success" : "warning",
|
|
@@ -39199,7 +39560,7 @@ function PassesMembershipsController({ render }) {
|
|
|
39199
39560
|
/* @__PURE__ */ jsxs77("p", { className: "shop__modal-warning-text", children: [
|
|
39200
39561
|
"Your current membership: ",
|
|
39201
39562
|
/* @__PURE__ */ jsx110("strong", { children: checkout2.duplicateWarning.existingMembership.name }),
|
|
39202
|
-
checkout2.duplicateWarning.existingMembership.expiresAt ? /* @__PURE__ */ jsxs77(
|
|
39563
|
+
checkout2.duplicateWarning.existingMembership.expiresAt ? /* @__PURE__ */ jsxs77(Fragment22, { children: [
|
|
39203
39564
|
" (expires ",
|
|
39204
39565
|
new Date(checkout2.duplicateWarning.existingMembership.expiresAt).toLocaleDateString(),
|
|
39205
39566
|
")"
|
|
@@ -41226,26 +41587,26 @@ var init_embla_carousel_esm = __esm({
|
|
|
41226
41587
|
});
|
|
41227
41588
|
|
|
41228
41589
|
// ../../node_modules/.pnpm/embla-carousel-react@8.6.0_react@19.2.7/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js
|
|
41229
|
-
import { useRef as useRef13, useState as
|
|
41590
|
+
import { useRef as useRef13, useState as useState17, useCallback as useCallback10, useEffect as useEffect22 } from "react";
|
|
41230
41591
|
function useEmblaCarousel(options = {}, plugins = []) {
|
|
41231
41592
|
const storedOptions = useRef13(options);
|
|
41232
41593
|
const storedPlugins = useRef13(plugins);
|
|
41233
|
-
const [emblaApi, setEmblaApi] =
|
|
41234
|
-
const [viewport, setViewport] =
|
|
41594
|
+
const [emblaApi, setEmblaApi] = useState17();
|
|
41595
|
+
const [viewport, setViewport] = useState17();
|
|
41235
41596
|
const reInit = useCallback10(() => {
|
|
41236
41597
|
if (emblaApi) emblaApi.reInit(storedOptions.current, storedPlugins.current);
|
|
41237
41598
|
}, [emblaApi]);
|
|
41238
|
-
|
|
41599
|
+
useEffect22(() => {
|
|
41239
41600
|
if (areOptionsEqual(storedOptions.current, options)) return;
|
|
41240
41601
|
storedOptions.current = options;
|
|
41241
41602
|
reInit();
|
|
41242
41603
|
}, [options, reInit]);
|
|
41243
|
-
|
|
41604
|
+
useEffect22(() => {
|
|
41244
41605
|
if (arePluginsEqual(storedPlugins.current, plugins)) return;
|
|
41245
41606
|
storedPlugins.current = plugins;
|
|
41246
41607
|
reInit();
|
|
41247
41608
|
}, [plugins, reInit]);
|
|
41248
|
-
|
|
41609
|
+
useEffect22(() => {
|
|
41249
41610
|
if (canUseDOM() && viewport) {
|
|
41250
41611
|
EmblaCarousel.globalOptions = useEmblaCarousel.globalOptions;
|
|
41251
41612
|
const newEmblaApi = EmblaCarousel(viewport, storedOptions.current, storedPlugins.current);
|
|
@@ -41268,7 +41629,7 @@ var init_embla_carousel_react_esm = __esm({
|
|
|
41268
41629
|
|
|
41269
41630
|
// ../blocks/src/system/runtime/nodes/carousel.client.tsx
|
|
41270
41631
|
import React20 from "react";
|
|
41271
|
-
import { Fragment as
|
|
41632
|
+
import { Fragment as Fragment23, jsx as jsx111, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
41272
41633
|
function normalizeCarouselProps(input) {
|
|
41273
41634
|
const transition = input.transition === "fade" ? "fade" : "slide";
|
|
41274
41635
|
const arrowVisibility = input.arrowVisibility === "never" ? "never" : input.arrowVisibility === "hover" ? "hover" : "always";
|
|
@@ -41410,7 +41771,7 @@ var init_carousel_client = __esm({
|
|
|
41410
41771
|
document.addEventListener("visibilitychange", handleVisibility);
|
|
41411
41772
|
return () => document.removeEventListener("visibilitychange", handleVisibility);
|
|
41412
41773
|
}, [api, normalized.autoplay]);
|
|
41413
|
-
const inner = /* @__PURE__ */ jsxs78(
|
|
41774
|
+
const inner = /* @__PURE__ */ jsxs78(Fragment23, { children: [
|
|
41414
41775
|
/* @__PURE__ */ jsx111("div", { className: "carousel-frame rb-overflow-hidden rb-w-full", children: /* @__PURE__ */ jsx111(
|
|
41415
41776
|
"div",
|
|
41416
41777
|
{
|
|
@@ -41474,7 +41835,7 @@ var init_carousel_client = __esm({
|
|
|
41474
41835
|
canScrollNext
|
|
41475
41836
|
}) => {
|
|
41476
41837
|
if (slidesCount <= resolvedSlides) return null;
|
|
41477
|
-
return /* @__PURE__ */ jsxs78(
|
|
41838
|
+
return /* @__PURE__ */ jsxs78(Fragment23, { children: [
|
|
41478
41839
|
/* @__PURE__ */ jsx111(
|
|
41479
41840
|
"button",
|
|
41480
41841
|
{
|
|
@@ -41608,12 +41969,12 @@ var init_shop_checkout_state = __esm({
|
|
|
41608
41969
|
});
|
|
41609
41970
|
|
|
41610
41971
|
// ../blocks/src/system/runtime/nodes/shop-cart-discount-ui.ts
|
|
41611
|
-
import { useEffect as
|
|
41972
|
+
import { useEffect as useEffect23, useState as useState18 } from "react";
|
|
41612
41973
|
function useCartDiscountUiState(api, plan) {
|
|
41613
|
-
const [discountUiState, setDiscountUiState] =
|
|
41974
|
+
const [discountUiState, setDiscountUiState] = useState18(
|
|
41614
41975
|
CART_DISCOUNT_UNAVAILABLE
|
|
41615
41976
|
);
|
|
41616
|
-
|
|
41977
|
+
useEffect23(() => {
|
|
41617
41978
|
let cancelled = false;
|
|
41618
41979
|
async function loadCartDiscountAvailability() {
|
|
41619
41980
|
if (!plan.ok || plan.value.length === 0) {
|
|
@@ -41651,7 +42012,7 @@ var init_shop_cart_discount_ui = __esm({
|
|
|
41651
42012
|
|
|
41652
42013
|
// ../blocks/src/system/runtime/nodes/shop-commerce.tsx
|
|
41653
42014
|
import * as React21 from "react";
|
|
41654
|
-
import { Fragment as
|
|
42015
|
+
import { Fragment as Fragment24, jsx as jsx112, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
41655
42016
|
function ProductListController(props2) {
|
|
41656
42017
|
const api = useBlockApi();
|
|
41657
42018
|
const cart2 = useCommerceCart(api.config.siteId);
|
|
@@ -41697,7 +42058,7 @@ function ProductListController(props2) {
|
|
|
41697
42058
|
}))
|
|
41698
42059
|
}
|
|
41699
42060
|
),
|
|
41700
|
-
actions: /* @__PURE__ */ jsxs79(
|
|
42061
|
+
actions: /* @__PURE__ */ jsxs79(Fragment24, { children: [
|
|
41701
42062
|
/* @__PURE__ */ jsx112(
|
|
41702
42063
|
"button",
|
|
41703
42064
|
{
|
|
@@ -41827,7 +42188,7 @@ function CartController(props2) {
|
|
|
41827
42188
|
CartShellView,
|
|
41828
42189
|
{
|
|
41829
42190
|
display,
|
|
41830
|
-
renderControls: (item) => /* @__PURE__ */ jsxs79(
|
|
42191
|
+
renderControls: (item) => /* @__PURE__ */ jsxs79(Fragment24, { children: [
|
|
41831
42192
|
/* @__PURE__ */ jsx112(
|
|
41832
42193
|
"input",
|
|
41833
42194
|
{
|
|
@@ -41850,7 +42211,7 @@ function CartController(props2) {
|
|
|
41850
42211
|
}
|
|
41851
42212
|
)
|
|
41852
42213
|
] }),
|
|
41853
|
-
footerActions: /* @__PURE__ */ jsxs79(
|
|
42214
|
+
footerActions: /* @__PURE__ */ jsxs79(Fragment24, { children: [
|
|
41854
42215
|
/* @__PURE__ */ jsx112(
|
|
41855
42216
|
"button",
|
|
41856
42217
|
{
|
|
@@ -42424,9 +42785,9 @@ var init_HeaderCartTrigger = __esm({
|
|
|
42424
42785
|
|
|
42425
42786
|
// ../blocks/src/system/runtime/header/headerCartRuntime.tsx
|
|
42426
42787
|
import * as React39 from "react";
|
|
42427
|
-
import { createPortal as
|
|
42788
|
+
import { createPortal as createPortal3 } from "react-dom";
|
|
42428
42789
|
import { createRoot } from "react-dom/client";
|
|
42429
|
-
import { Fragment as
|
|
42790
|
+
import { Fragment as Fragment26, jsx as jsx128, jsxs as jsxs84 } from "react/jsx-runtime";
|
|
42430
42791
|
function HeaderCartRuntime(props2) {
|
|
42431
42792
|
const cart2 = useCommerceCart(props2.siteId);
|
|
42432
42793
|
const itemCount = React39.useMemo(() => getCartItemCount(cart2.items), [cart2.items]);
|
|
@@ -42438,9 +42799,9 @@ function HeaderCartRuntime(props2) {
|
|
|
42438
42799
|
),
|
|
42439
42800
|
[props2.mounts]
|
|
42440
42801
|
);
|
|
42441
|
-
return /* @__PURE__ */ jsxs84(
|
|
42802
|
+
return /* @__PURE__ */ jsxs84(Fragment26, { children: [
|
|
42442
42803
|
props2.mounts.map(
|
|
42443
|
-
(mount) =>
|
|
42804
|
+
(mount) => createPortal3(
|
|
42444
42805
|
/* @__PURE__ */ jsx128(
|
|
42445
42806
|
HeaderCartTrigger,
|
|
42446
42807
|
{
|
|
@@ -43161,7 +43522,7 @@ var init_EventCard_client = __esm({
|
|
|
43161
43522
|
});
|
|
43162
43523
|
|
|
43163
43524
|
// ../blocks/src/system/runtime/nodes/events/shared/EventPaginatedListView.client.tsx
|
|
43164
|
-
import { Fragment as
|
|
43525
|
+
import { Fragment as Fragment27, jsx as jsx132, jsxs as jsxs86 } from "react/jsx-runtime";
|
|
43165
43526
|
var EventPaginatedListView;
|
|
43166
43527
|
var init_EventPaginatedListView_client = __esm({
|
|
43167
43528
|
"../blocks/src/system/runtime/nodes/events/shared/EventPaginatedListView.client.tsx"() {
|
|
@@ -43204,7 +43565,7 @@ var init_EventPaginatedListView_client = __esm({
|
|
|
43204
43565
|
resetFiltersText
|
|
43205
43566
|
}
|
|
43206
43567
|
),
|
|
43207
|
-
footer: /* @__PURE__ */ jsxs86(
|
|
43568
|
+
footer: /* @__PURE__ */ jsxs86(Fragment27, { children: [
|
|
43208
43569
|
error ? /* @__PURE__ */ jsxs86("div", { className: "rb-mt-6 rb-text-center", children: [
|
|
43209
43570
|
/* @__PURE__ */ jsx132("p", { className: "status-error rb-caption rb-mb-2", children: "Failed to load more events" }),
|
|
43210
43571
|
/* @__PURE__ */ jsx132(
|
|
@@ -43276,7 +43637,7 @@ var init_EventPaginatedListView_client = __esm({
|
|
|
43276
43637
|
});
|
|
43277
43638
|
|
|
43278
43639
|
// ../blocks/src/system/runtime/hooks/useEventPagination.ts
|
|
43279
|
-
import { useState as
|
|
43640
|
+
import { useState as useState26, useCallback as useCallback17, useEffect as useEffect33, useMemo as useMemo18, useRef as useRef22 } from "react";
|
|
43280
43641
|
function getEventIdentity(event) {
|
|
43281
43642
|
return event.occurrenceId || event.id;
|
|
43282
43643
|
}
|
|
@@ -43299,13 +43660,13 @@ function useEventPagination({
|
|
|
43299
43660
|
const filtersMatchInitial = filtersKey === initialFiltersKey;
|
|
43300
43661
|
const initialEventsKey = useMemo18(() => getEventsKey(initialEvents), [initialEvents]);
|
|
43301
43662
|
const initialEventsRef = useRef22(initialEvents);
|
|
43302
|
-
|
|
43663
|
+
useEffect33(() => {
|
|
43303
43664
|
initialEventsRef.current = initialEvents;
|
|
43304
43665
|
}, [initialEventsKey]);
|
|
43305
|
-
const [events, setEvents] =
|
|
43306
|
-
const [loading, setLoading] =
|
|
43307
|
-
const [error, setError] =
|
|
43308
|
-
const [hasMore, setHasMore] =
|
|
43666
|
+
const [events, setEvents] = useState26(initialEvents);
|
|
43667
|
+
const [loading, setLoading] = useState26(false);
|
|
43668
|
+
const [error, setError] = useState26(null);
|
|
43669
|
+
const [hasMore, setHasMore] = useState26(initialEvents.length >= pageSize);
|
|
43309
43670
|
const normalizedCategoryIds = normalizeCsvString(filters?.categoryIds);
|
|
43310
43671
|
const normalizedStaffMemberId = normalizeOptionalId(filters?.staffMemberId);
|
|
43311
43672
|
const normalizedVenueId = normalizeOptionalId(filters?.venueId);
|
|
@@ -43316,13 +43677,13 @@ function useEventPagination({
|
|
|
43316
43677
|
const eventsRef = useRef22(events);
|
|
43317
43678
|
const loadingRef = useRef22(loading);
|
|
43318
43679
|
const hasMoreRef = useRef22(hasMore);
|
|
43319
|
-
|
|
43680
|
+
useEffect33(() => {
|
|
43320
43681
|
eventsRef.current = events;
|
|
43321
43682
|
}, [events]);
|
|
43322
|
-
|
|
43683
|
+
useEffect33(() => {
|
|
43323
43684
|
loadingRef.current = loading;
|
|
43324
43685
|
}, [loading]);
|
|
43325
|
-
|
|
43686
|
+
useEffect33(() => {
|
|
43326
43687
|
hasMoreRef.current = hasMore;
|
|
43327
43688
|
}, [hasMore]);
|
|
43328
43689
|
const requestIdRef = useRef22(0);
|
|
@@ -43395,7 +43756,7 @@ function useEventPagination({
|
|
|
43395
43756
|
void fetchPage({ reset: false });
|
|
43396
43757
|
}, [fetchPage]);
|
|
43397
43758
|
const initialFetchAttemptKeyRef = useRef22(null);
|
|
43398
|
-
|
|
43759
|
+
useEffect33(() => {
|
|
43399
43760
|
if (!fetchInitialOnMount) return;
|
|
43400
43761
|
if (!filtersMatchInitial) return;
|
|
43401
43762
|
if (initialEventsRef.current.length > 0) return;
|
|
@@ -43409,7 +43770,7 @@ function useEventPagination({
|
|
|
43409
43770
|
const prevFiltersMatchInitialRef = useRef22(filtersMatchInitial);
|
|
43410
43771
|
const prevInitialEventsKeyRef = useRef22(initialEventsKey);
|
|
43411
43772
|
const prevFiltersKeyRef = useRef22(filtersKey);
|
|
43412
|
-
|
|
43773
|
+
useEffect33(() => {
|
|
43413
43774
|
const latestInitialEvents = initialEventsRef.current;
|
|
43414
43775
|
const prevFiltersMatchInitial = prevFiltersMatchInitialRef.current;
|
|
43415
43776
|
const prevInitialEventsKey = prevInitialEventsKeyRef.current;
|
|
@@ -43458,7 +43819,7 @@ var init_useEventPagination = __esm({
|
|
|
43458
43819
|
});
|
|
43459
43820
|
|
|
43460
43821
|
// ../blocks/src/system/runtime/hooks/useEventFilters.ts
|
|
43461
|
-
import { useState as
|
|
43822
|
+
import { useState as useState27, useCallback as useCallback18, useEffect as useEffect34, useMemo as useMemo19, useRef as useRef23 } from "react";
|
|
43462
43823
|
function useEventFilters({
|
|
43463
43824
|
showCategoryFilter = "auto",
|
|
43464
43825
|
showVenueFilter = false,
|
|
@@ -43472,18 +43833,18 @@ function useEventFilters({
|
|
|
43472
43833
|
preFilterScheduleScope
|
|
43473
43834
|
} = {}) {
|
|
43474
43835
|
const api = useBlockApi();
|
|
43475
|
-
const [filters, setFilters] =
|
|
43836
|
+
const [filters, setFilters] = useState27({
|
|
43476
43837
|
categories: [],
|
|
43477
43838
|
venues: [],
|
|
43478
43839
|
staffMembers: [],
|
|
43479
43840
|
labels: { courseOption: "Course" }
|
|
43480
43841
|
});
|
|
43481
|
-
const [loading, setLoading] =
|
|
43482
|
-
const [error, setError] =
|
|
43483
|
-
const [selectedKind, setSelectedKindState] =
|
|
43484
|
-
const [selectedCategoryId, setSelectedCategoryId] =
|
|
43485
|
-
const [selectedStaffMemberId, setSelectedStaffMemberId] =
|
|
43486
|
-
const [selectedVenueId, setSelectedVenueId] =
|
|
43842
|
+
const [loading, setLoading] = useState27(false);
|
|
43843
|
+
const [error, setError] = useState27(null);
|
|
43844
|
+
const [selectedKind, setSelectedKindState] = useState27("all");
|
|
43845
|
+
const [selectedCategoryId, setSelectedCategoryId] = useState27("all");
|
|
43846
|
+
const [selectedStaffMemberId, setSelectedStaffMemberId] = useState27("all");
|
|
43847
|
+
const [selectedVenueId, setSelectedVenueId] = useState27("all");
|
|
43487
43848
|
const allowedCategoryIds = useMemo19(
|
|
43488
43849
|
() => normalizeCsvIds(preFilterCategoryIds),
|
|
43489
43850
|
[preFilterCategoryIds]
|
|
@@ -43509,7 +43870,7 @@ function useEventFilters({
|
|
|
43509
43870
|
const fixedEventPresets = preFilterEventPresets?.trim() || void 0;
|
|
43510
43871
|
const fixedScheduleScope = preFilterScheduleScope && preFilterScheduleScope !== "any" ? preFilterScheduleScope : void 0;
|
|
43511
43872
|
const hasFetchedRef = useRef23(false);
|
|
43512
|
-
|
|
43873
|
+
useEffect34(() => {
|
|
43513
43874
|
if (hasFetchedRef.current) return;
|
|
43514
43875
|
const needFilters = showCategoryFilter !== "never" && fixedKind !== "courses" || showVenueFilter || showStaffFilter;
|
|
43515
43876
|
if (!needFilters) return;
|
|
@@ -43559,7 +43920,7 @@ function useEventFilters({
|
|
|
43559
43920
|
if (!fixedStaffMemberId) return available;
|
|
43560
43921
|
return available.filter((staffMember) => staffMember.id === fixedStaffMemberId);
|
|
43561
43922
|
}, [filters.staffMembers, fixedStaffMemberId]);
|
|
43562
|
-
|
|
43923
|
+
useEffect34(() => {
|
|
43563
43924
|
if ((fixedKind === "courses" || selectedKind === "courses") && selectedCategoryId !== "all") {
|
|
43564
43925
|
setSelectedCategoryId("all");
|
|
43565
43926
|
return;
|
|
@@ -43573,7 +43934,7 @@ function useEventFilters({
|
|
|
43573
43934
|
if (!stillValid) setSelectedCategoryId("all");
|
|
43574
43935
|
}
|
|
43575
43936
|
}, [categoriesForSelect, fixedKind, selectedCategoryId, selectedKind]);
|
|
43576
|
-
|
|
43937
|
+
useEffect34(() => {
|
|
43577
43938
|
if (fixedVenueId) {
|
|
43578
43939
|
setSelectedVenueId("all");
|
|
43579
43940
|
return;
|
|
@@ -43583,7 +43944,7 @@ function useEventFilters({
|
|
|
43583
43944
|
if (!stillValid) setSelectedVenueId("all");
|
|
43584
43945
|
}
|
|
43585
43946
|
}, [fixedVenueId, venuesForSelect, selectedVenueId]);
|
|
43586
|
-
|
|
43947
|
+
useEffect34(() => {
|
|
43587
43948
|
if (fixedStaffMemberId) {
|
|
43588
43949
|
setSelectedStaffMemberId("all");
|
|
43589
43950
|
return;
|
|
@@ -43899,7 +44260,7 @@ var init_TabBar = __esm({
|
|
|
43899
44260
|
});
|
|
43900
44261
|
|
|
43901
44262
|
// ../blocks/src/system/runtime/hooks/useCalendarEvents.ts
|
|
43902
|
-
import { useState as
|
|
44263
|
+
import { useState as useState28, useCallback as useCallback19, useRef as useRef24, useMemo as useMemo21, useEffect as useEffect35 } from "react";
|
|
43903
44264
|
function getMonthKey(date) {
|
|
43904
44265
|
return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}`;
|
|
43905
44266
|
}
|
|
@@ -43908,7 +44269,7 @@ function useCalendarViewport({
|
|
|
43908
44269
|
startOfWeek = "monday",
|
|
43909
44270
|
initialDate
|
|
43910
44271
|
} = {}) {
|
|
43911
|
-
const [viewDate, setViewDate] =
|
|
44272
|
+
const [viewDate, setViewDate] = useState28(() => initialDate ?? /* @__PURE__ */ new Date());
|
|
43912
44273
|
const viewport = useMemo21(
|
|
43913
44274
|
() => buildCalendarViewport({ view, anchorDate: viewDate, startOfWeek }),
|
|
43914
44275
|
[startOfWeek, view, viewDate]
|
|
@@ -43942,9 +44303,9 @@ function useCalendarEventCache({
|
|
|
43942
44303
|
stage
|
|
43943
44304
|
}) {
|
|
43944
44305
|
const { getPublicEvents } = useBlockApi();
|
|
43945
|
-
const [loading, setLoading] =
|
|
43946
|
-
const [error, setError] =
|
|
43947
|
-
const [cacheVersion, setCacheVersion] =
|
|
44306
|
+
const [loading, setLoading] = useState28(false);
|
|
44307
|
+
const [error, setError] = useState28(null);
|
|
44308
|
+
const [cacheVersion, setCacheVersion] = useState28(0);
|
|
43948
44309
|
const filtersKey = useMemo21(
|
|
43949
44310
|
() => getEventRuntimeFiltersKey(filters),
|
|
43950
44311
|
[
|
|
@@ -43962,7 +44323,7 @@ function useCalendarEventCache({
|
|
|
43962
44323
|
const fetchingRef = useRef24(/* @__PURE__ */ new Set());
|
|
43963
44324
|
const requestIdRef = useRef24(0);
|
|
43964
44325
|
const initializedFiltersKeyRef = useRef24(null);
|
|
43965
|
-
|
|
44326
|
+
useEffect35(() => {
|
|
43966
44327
|
if (initializedFiltersKeyRef.current === filtersKey) return;
|
|
43967
44328
|
initializedFiltersKeyRef.current = filtersKey;
|
|
43968
44329
|
cacheRef.current = /* @__PURE__ */ new Map();
|
|
@@ -44057,7 +44418,7 @@ function useCalendarEventCache({
|
|
|
44057
44418
|
void fetchEventsForRange(range.from, range.to, unloadedMonths);
|
|
44058
44419
|
}
|
|
44059
44420
|
}, [preloadMonths, fetchEventsForRange]);
|
|
44060
|
-
|
|
44421
|
+
useEffect35(() => {
|
|
44061
44422
|
ensureEventsLoaded(viewDate);
|
|
44062
44423
|
}, [viewDate, ensureEventsLoaded]);
|
|
44063
44424
|
const events = useMemo21(() => {
|
|
@@ -44137,10 +44498,10 @@ var init_useCalendarEvents = __esm({
|
|
|
44137
44498
|
});
|
|
44138
44499
|
|
|
44139
44500
|
// ../blocks/src/system/runtime/nodes/events/shared/EventModalContext.tsx
|
|
44140
|
-
import { createContext as createContext5, useContext as useContext5, useState as
|
|
44501
|
+
import { createContext as createContext5, useContext as useContext5, useState as useState29, useCallback as useCallback20 } from "react";
|
|
44141
44502
|
import { jsx as jsx135 } from "react/jsx-runtime";
|
|
44142
44503
|
function EventModalProvider({ children }) {
|
|
44143
|
-
const [modalState, setModalState] =
|
|
44504
|
+
const [modalState, setModalState] = useState29({ type: "closed" });
|
|
44144
44505
|
const openEventModal = useCallback20((event) => {
|
|
44145
44506
|
setModalState({ type: "event", event });
|
|
44146
44507
|
}, []);
|
|
@@ -44236,7 +44597,7 @@ var init_CalendarDayCell = __esm({
|
|
|
44236
44597
|
});
|
|
44237
44598
|
|
|
44238
44599
|
// ../blocks/src/system/runtime/nodes/events/shared/AgendaEventCard.tsx
|
|
44239
|
-
import { Fragment as
|
|
44600
|
+
import { Fragment as Fragment28, jsx as jsx137, jsxs as jsxs88 } from "react/jsx-runtime";
|
|
44240
44601
|
var AgendaEventCard;
|
|
44241
44602
|
var init_AgendaEventCard = __esm({
|
|
44242
44603
|
"../blocks/src/system/runtime/nodes/events/shared/AgendaEventCard.tsx"() {
|
|
@@ -44256,7 +44617,7 @@ var init_AgendaEventCard = __esm({
|
|
|
44256
44617
|
const title = event.title;
|
|
44257
44618
|
const timeZone = event.timeZone ?? null;
|
|
44258
44619
|
const teacherLine = formatEventTeacherLine(event);
|
|
44259
|
-
const cardContent = /* @__PURE__ */ jsxs88(
|
|
44620
|
+
const cardContent = /* @__PURE__ */ jsxs88(Fragment28, { children: [
|
|
44260
44621
|
/* @__PURE__ */ jsx137(
|
|
44261
44622
|
"div",
|
|
44262
44623
|
{
|
|
@@ -44494,7 +44855,7 @@ var init_DayEventsModal = __esm({
|
|
|
44494
44855
|
|
|
44495
44856
|
// ../blocks/src/system/runtime/nodes/events/shared/EventModals.tsx
|
|
44496
44857
|
import React44 from "react";
|
|
44497
|
-
import { Fragment as
|
|
44858
|
+
import { Fragment as Fragment29, jsx as jsx141, jsxs as jsxs91 } from "react/jsx-runtime";
|
|
44498
44859
|
function EventModals({
|
|
44499
44860
|
showCapacity,
|
|
44500
44861
|
cardVariant,
|
|
@@ -44523,7 +44884,7 @@ function EventModals({
|
|
|
44523
44884
|
return marker;
|
|
44524
44885
|
}
|
|
44525
44886
|
if (modalState.type === "event") {
|
|
44526
|
-
return /* @__PURE__ */ jsxs91(
|
|
44887
|
+
return /* @__PURE__ */ jsxs91(Fragment29, { children: [
|
|
44527
44888
|
marker,
|
|
44528
44889
|
/* @__PURE__ */ jsx141(
|
|
44529
44890
|
EventDetailModal,
|
|
@@ -44540,7 +44901,7 @@ function EventModals({
|
|
|
44540
44901
|
] });
|
|
44541
44902
|
}
|
|
44542
44903
|
if (modalState.type === "day") {
|
|
44543
|
-
return /* @__PURE__ */ jsxs91(
|
|
44904
|
+
return /* @__PURE__ */ jsxs91(Fragment29, { children: [
|
|
44544
44905
|
marker,
|
|
44545
44906
|
/* @__PURE__ */ jsx141(
|
|
44546
44907
|
DayEventsModal,
|
|
@@ -44571,7 +44932,7 @@ var init_EventModals = __esm({
|
|
|
44571
44932
|
});
|
|
44572
44933
|
|
|
44573
44934
|
// ../blocks/src/system/runtime/nodes/events/EventCombined.client.tsx
|
|
44574
|
-
import { useId as useId7, useMemo as useMemo22, useState as
|
|
44935
|
+
import { useId as useId7, useMemo as useMemo22, useState as useState30 } from "react";
|
|
44575
44936
|
import { jsx as jsx142, jsxs as jsxs92 } from "react/jsx-runtime";
|
|
44576
44937
|
function toEventCombinedControllerProps(props2) {
|
|
44577
44938
|
return {
|
|
@@ -44666,8 +45027,8 @@ var init_EventCombined_client = __esm({
|
|
|
44666
45027
|
const resolvedShowCapacity = showCapacity ?? true;
|
|
44667
45028
|
const resolvedEventSurface = eventSurface ?? "all";
|
|
44668
45029
|
const resolvedScheduleScope = scheduleScope ?? "any";
|
|
44669
|
-
const [activeTab, setActiveTab] =
|
|
44670
|
-
const [calendarView, setCalendarView] =
|
|
45030
|
+
const [activeTab, setActiveTab] = useState30("list");
|
|
45031
|
+
const [calendarView, setCalendarView] = useState30(
|
|
44671
45032
|
calendarTabViews === "week" ? "week" : "month"
|
|
44672
45033
|
);
|
|
44673
45034
|
const filtersIdBase = useId7();
|
|
@@ -44988,7 +45349,7 @@ var init_EventCombined_client = __esm({
|
|
|
44988
45349
|
});
|
|
44989
45350
|
|
|
44990
45351
|
// ../blocks/src/system/runtime/nodes/events/shared/WeekTimetableView.tsx
|
|
44991
|
-
import { useEffect as
|
|
45352
|
+
import { useEffect as useEffect36, useMemo as useMemo23, useState as useState31 } from "react";
|
|
44992
45353
|
import { jsx as jsx143, jsxs as jsxs93 } from "react/jsx-runtime";
|
|
44993
45354
|
function formatHourLabel2(hour) {
|
|
44994
45355
|
if (hour === 0) return "12 AM";
|
|
@@ -45020,8 +45381,8 @@ var init_WeekTimetableView = __esm({
|
|
|
45020
45381
|
() => buildTimetableModel2({ events, viewDate, startOfWeek }),
|
|
45021
45382
|
[events, startOfWeek, viewDate]
|
|
45022
45383
|
);
|
|
45023
|
-
const [selectedDayKey, setSelectedDayKey] =
|
|
45024
|
-
|
|
45384
|
+
const [selectedDayKey, setSelectedDayKey] = useState31(() => model.days.find((day) => day.isToday)?.dateKey ?? model.days[0]?.dateKey ?? "");
|
|
45385
|
+
useEffect36(() => {
|
|
45025
45386
|
if (model.days.some((day) => day.dateKey === selectedDayKey)) return;
|
|
45026
45387
|
setSelectedDayKey(model.days.find((day) => day.isToday)?.dateKey ?? model.days[0]?.dateKey ?? "");
|
|
45027
45388
|
}, [model.days, selectedDayKey]);
|
|
@@ -45599,7 +45960,7 @@ var init_useFormSubmission = __esm({
|
|
|
45599
45960
|
});
|
|
45600
45961
|
|
|
45601
45962
|
// ../blocks/src/system/runtime/nodes/form.client.tsx
|
|
45602
|
-
import { useState as
|
|
45963
|
+
import { useState as useState32 } from "react";
|
|
45603
45964
|
import { jsx as jsx145, jsxs as jsxs95 } from "react/jsx-runtime";
|
|
45604
45965
|
function isUnknownArray(value) {
|
|
45605
45966
|
return Array.isArray(value);
|
|
@@ -45620,7 +45981,7 @@ var init_form_client = __esm({
|
|
|
45620
45981
|
}) => {
|
|
45621
45982
|
const form2 = render.display.form;
|
|
45622
45983
|
const { submit, state } = useFormSubmission();
|
|
45623
|
-
const [altchaSolution, setAltchaSolution] =
|
|
45984
|
+
const [altchaSolution, setAltchaSolution] = useState32(null);
|
|
45624
45985
|
const showSpamProtection = render.hydration.spamProtectionEnabled ?? isSpamProtectionEnabled();
|
|
45625
45986
|
if (!form2) {
|
|
45626
45987
|
return /* @__PURE__ */ jsx145(
|
|
@@ -45805,17 +46166,65 @@ var init_newsletter_form_client_state = __esm({
|
|
|
45805
46166
|
}
|
|
45806
46167
|
});
|
|
45807
46168
|
|
|
46169
|
+
// ../blocks/src/system/runtime/nodes/newsletter-form.submission.ts
|
|
46170
|
+
function mapNewsletterFormFieldsToSubscriberInput(fields) {
|
|
46171
|
+
return {
|
|
46172
|
+
email: readSubmittedText(fields.email),
|
|
46173
|
+
firstName: readOptionalSubmittedText(fields.firstName),
|
|
46174
|
+
lastName: readOptionalSubmittedText(fields.lastName),
|
|
46175
|
+
name: readOptionalSubmittedText(fields.name),
|
|
46176
|
+
company: readOptionalSubmittedText(fields.company),
|
|
46177
|
+
phone: readOptionalSubmittedText(fields.phone),
|
|
46178
|
+
honeypot: readSubmittedText(fields.website)
|
|
46179
|
+
};
|
|
46180
|
+
}
|
|
46181
|
+
function resolveNewsletterSubmitTarget(input) {
|
|
46182
|
+
const listId = input.listId?.trim();
|
|
46183
|
+
if (input.destinationRef) {
|
|
46184
|
+
return {
|
|
46185
|
+
tag: "ready",
|
|
46186
|
+
target: {
|
|
46187
|
+
tag: "published_block_ref",
|
|
46188
|
+
destinationRef: input.destinationRef
|
|
46189
|
+
}
|
|
46190
|
+
};
|
|
46191
|
+
}
|
|
46192
|
+
if (!listId) {
|
|
46193
|
+
return { tag: "unavailable", reason: "missing_legacy_list" };
|
|
46194
|
+
}
|
|
46195
|
+
return {
|
|
46196
|
+
tag: "ready",
|
|
46197
|
+
target: {
|
|
46198
|
+
tag: "legacy_riverbank_list",
|
|
46199
|
+
listId,
|
|
46200
|
+
destinationRef: input.destinationRef ?? void 0
|
|
46201
|
+
}
|
|
46202
|
+
};
|
|
46203
|
+
}
|
|
46204
|
+
function readOptionalSubmittedText(value) {
|
|
46205
|
+
const text2 = readSubmittedText(value);
|
|
46206
|
+
return text2.length > 0 ? text2 : void 0;
|
|
46207
|
+
}
|
|
46208
|
+
function readSubmittedText(value) {
|
|
46209
|
+
return typeof value === "string" ? value.trim() : "";
|
|
46210
|
+
}
|
|
46211
|
+
var init_newsletter_form_submission = __esm({
|
|
46212
|
+
"../blocks/src/system/runtime/nodes/newsletter-form.submission.ts"() {
|
|
46213
|
+
"use strict";
|
|
46214
|
+
}
|
|
46215
|
+
});
|
|
46216
|
+
|
|
45808
46217
|
// ../blocks/src/system/runtime/nodes/newsletter-form.client.tsx
|
|
45809
|
-
import { useState as
|
|
46218
|
+
import { useState as useState33 } from "react";
|
|
45810
46219
|
import { jsx as jsx148, jsxs as jsxs96 } from "react/jsx-runtime";
|
|
45811
46220
|
function NewsletterFormClient({
|
|
45812
46221
|
render
|
|
45813
46222
|
}) {
|
|
45814
46223
|
const api = useBlockApi();
|
|
45815
|
-
const [isSubmitting, setIsSubmitting] =
|
|
45816
|
-
const [error, setError] =
|
|
45817
|
-
const [isSuccess, setIsSuccess] =
|
|
45818
|
-
const [altchaSolution, setAltchaSolution] =
|
|
46224
|
+
const [isSubmitting, setIsSubmitting] = useState33(false);
|
|
46225
|
+
const [error, setError] = useState33(null);
|
|
46226
|
+
const [isSuccess, setIsSuccess] = useState33(false);
|
|
46227
|
+
const [altchaSolution, setAltchaSolution] = useState33(null);
|
|
45819
46228
|
const showSpamProtection = render.hydration.spamProtectionEnabled ?? isSpamProtectionEnabled();
|
|
45820
46229
|
const fields = render.display.fields;
|
|
45821
46230
|
const parsedTags = typeof render.hydration.tags === "string" ? render.hydration.tags.split(/[;,]/g).map((t) => t.trim()).filter(Boolean) : [];
|
|
@@ -45823,39 +46232,44 @@ function NewsletterFormClient({
|
|
|
45823
46232
|
e.preventDefault();
|
|
45824
46233
|
setError(null);
|
|
45825
46234
|
const formData = new FormData(e.currentTarget);
|
|
45826
|
-
const
|
|
45827
|
-
|
|
46235
|
+
const submittedFields = mapNewsletterFormFieldsToSubscriberInput({
|
|
46236
|
+
email: formData.get("email"),
|
|
46237
|
+
firstName: formData.get("firstName"),
|
|
46238
|
+
lastName: formData.get("lastName"),
|
|
46239
|
+
name: formData.get("name"),
|
|
46240
|
+
company: formData.get("company"),
|
|
46241
|
+
phone: formData.get("phone"),
|
|
46242
|
+
website: formData.get("website")
|
|
46243
|
+
});
|
|
46244
|
+
if (submittedFields.honeypot) {
|
|
45828
46245
|
setIsSuccess(true);
|
|
45829
46246
|
return;
|
|
45830
46247
|
}
|
|
45831
|
-
|
|
45832
|
-
const firstName = formData.get("firstName")?.trim() || void 0;
|
|
45833
|
-
const lastName = formData.get("lastName")?.trim() || void 0;
|
|
45834
|
-
const name = formData.get("name")?.trim() || void 0;
|
|
45835
|
-
const company = formData.get("company")?.trim() || void 0;
|
|
45836
|
-
const phone = formData.get("phone")?.trim() || void 0;
|
|
45837
|
-
if (!email) {
|
|
46248
|
+
if (!submittedFields.email) {
|
|
45838
46249
|
setError(newsletterFieldError("email", "Email is required"));
|
|
45839
46250
|
return;
|
|
45840
46251
|
}
|
|
45841
|
-
|
|
46252
|
+
const submitTarget = resolveNewsletterSubmitTarget({
|
|
46253
|
+
listId: render.hydration.listId,
|
|
46254
|
+
destinationRef: render.hydration.destinationRef
|
|
46255
|
+
});
|
|
46256
|
+
if (submitTarget.tag === "unavailable") {
|
|
45842
46257
|
setError(newsletterFormError("Newsletter list is not configured"));
|
|
45843
46258
|
return;
|
|
45844
46259
|
}
|
|
45845
46260
|
setIsSubmitting(true);
|
|
45846
46261
|
try {
|
|
45847
46262
|
await api.subscribeNewsletter({
|
|
45848
|
-
email,
|
|
45849
|
-
firstName,
|
|
45850
|
-
lastName,
|
|
45851
|
-
name,
|
|
45852
|
-
company,
|
|
45853
|
-
phone,
|
|
45854
|
-
|
|
46263
|
+
email: submittedFields.email,
|
|
46264
|
+
firstName: submittedFields.firstName,
|
|
46265
|
+
lastName: submittedFields.lastName,
|
|
46266
|
+
name: submittedFields.name,
|
|
46267
|
+
company: submittedFields.company,
|
|
46268
|
+
phone: submittedFields.phone,
|
|
46269
|
+
target: submitTarget.target,
|
|
45855
46270
|
tags: parsedTags.length > 0 ? parsedTags : void 0,
|
|
45856
|
-
blockId: void 0,
|
|
45857
46271
|
meta: {
|
|
45858
|
-
honeypot,
|
|
46272
|
+
honeypot: submittedFields.honeypot,
|
|
45859
46273
|
altchaSolution
|
|
45860
46274
|
}
|
|
45861
46275
|
});
|
|
@@ -45952,6 +46366,7 @@ var init_newsletter_form_client = __esm({
|
|
|
45952
46366
|
init_FeedbackMessage();
|
|
45953
46367
|
init_FieldValidationMessage();
|
|
45954
46368
|
init_newsletter_form_client_state();
|
|
46369
|
+
init_newsletter_form_submission();
|
|
45955
46370
|
newsletter_form_client_default = NewsletterFormClient;
|
|
45956
46371
|
}
|
|
45957
46372
|
});
|
|
@@ -49966,12 +50381,12 @@ function preferredPathsForSource(source) {
|
|
|
49966
50381
|
case "performance":
|
|
49967
50382
|
return ["/performances", "/performance"];
|
|
49968
50383
|
default:
|
|
49969
|
-
return
|
|
50384
|
+
return assertNever2(source.preset, "Unhandled offerings preview event preset");
|
|
49970
50385
|
}
|
|
49971
50386
|
case "course":
|
|
49972
50387
|
return ["/courses", "/course"];
|
|
49973
50388
|
default:
|
|
49974
|
-
return
|
|
50389
|
+
return assertNever2(source, "Unhandled offerings preview source");
|
|
49975
50390
|
}
|
|
49976
50391
|
}
|
|
49977
50392
|
function normalizeRoutePath(value) {
|
|
@@ -51007,6 +51422,12 @@ var eventRegistrationManifest = createBlockManifest({
|
|
|
51007
51422
|
buttonVariant: {
|
|
51008
51423
|
$bind: { from: "content.buttonVariant", fallback: "primary" }
|
|
51009
51424
|
},
|
|
51425
|
+
overlayEnabled: {
|
|
51426
|
+
$bind: {
|
|
51427
|
+
from: "$root.eventRegistrationOverlayEnabled",
|
|
51428
|
+
fallback: false
|
|
51429
|
+
}
|
|
51430
|
+
},
|
|
51010
51431
|
// Event data from loader
|
|
51011
51432
|
events: { $bind: { from: "data.events" } },
|
|
51012
51433
|
// Stage for preview mode (allows registering for draft events)
|
|
@@ -53346,6 +53767,7 @@ function EventRegistrationSSR({
|
|
|
53346
53767
|
successMessage,
|
|
53347
53768
|
waitlistMessage,
|
|
53348
53769
|
buttonVariant,
|
|
53770
|
+
overlayEnabled,
|
|
53349
53771
|
spamProtectionEnabled,
|
|
53350
53772
|
stage,
|
|
53351
53773
|
supportEmail,
|
|
@@ -53367,6 +53789,7 @@ function EventRegistrationSSR({
|
|
|
53367
53789
|
successMessage,
|
|
53368
53790
|
waitlistMessage,
|
|
53369
53791
|
buttonVariant,
|
|
53792
|
+
overlayEnabled,
|
|
53370
53793
|
spamProtectionEnabled,
|
|
53371
53794
|
stage,
|
|
53372
53795
|
supportEmail
|
|
@@ -53606,6 +54029,7 @@ function NewsletterFormSSR({
|
|
|
53606
54029
|
siteId,
|
|
53607
54030
|
apiBaseUrl,
|
|
53608
54031
|
listId,
|
|
54032
|
+
destinationProvider,
|
|
53609
54033
|
preset = "emailOnly",
|
|
53610
54034
|
includePhone,
|
|
53611
54035
|
buttonLabel = "Subscribe",
|
|
@@ -53616,9 +54040,11 @@ function NewsletterFormSSR({
|
|
|
53616
54040
|
className
|
|
53617
54041
|
}) {
|
|
53618
54042
|
const islandProps = buildNewsletterFormInteractiveIslandProps({
|
|
54043
|
+
blockId,
|
|
53619
54044
|
siteId,
|
|
53620
54045
|
apiBaseUrl,
|
|
53621
54046
|
listId,
|
|
54047
|
+
destinationProvider,
|
|
53622
54048
|
preset,
|
|
53623
54049
|
includePhone,
|
|
53624
54050
|
buttonLabel,
|
|
@@ -53975,9 +54401,10 @@ init_cart_client();
|
|
|
53975
54401
|
init_checkout_client();
|
|
53976
54402
|
|
|
53977
54403
|
// ../blocks/src/system/runtime/nodes/gifting.client.tsx
|
|
54404
|
+
init_src();
|
|
53978
54405
|
init_api();
|
|
53979
54406
|
init_FeedbackMessage();
|
|
53980
|
-
import { startTransition, useEffect as
|
|
54407
|
+
import { startTransition, useEffect as useEffect25, useReducer as useReducer7 } from "react";
|
|
53981
54408
|
|
|
53982
54409
|
// ../blocks/src/system/runtime/nodes/gifting.client.state.ts
|
|
53983
54410
|
init_dist();
|
|
@@ -54082,10 +54509,7 @@ function buildGiftingCheckoutInput(formData, input) {
|
|
|
54082
54509
|
// ../blocks/src/system/runtime/nodes/gifting.client.tsx
|
|
54083
54510
|
import { jsx as jsx117, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
54084
54511
|
function formatCurrency(amountCents, currency) {
|
|
54085
|
-
return
|
|
54086
|
-
style: "currency",
|
|
54087
|
-
currency
|
|
54088
|
-
}).format(amountCents / 100);
|
|
54512
|
+
return formatCurrencyAmount(amountCents, currency);
|
|
54089
54513
|
}
|
|
54090
54514
|
var sectionCardStyle = {
|
|
54091
54515
|
gap: "0.875rem",
|
|
@@ -54102,7 +54526,7 @@ function GiftingClient(props2) {
|
|
|
54102
54526
|
props2.render.hydration.offers,
|
|
54103
54527
|
createInitialGiftingClientState
|
|
54104
54528
|
);
|
|
54105
|
-
|
|
54529
|
+
useEffect25(() => {
|
|
54106
54530
|
dispatch({
|
|
54107
54531
|
type: "purchaseNoticeResolved",
|
|
54108
54532
|
notice: resolveGiftingPurchaseNotice(
|
|
@@ -54111,7 +54535,7 @@ function GiftingClient(props2) {
|
|
|
54111
54535
|
)
|
|
54112
54536
|
});
|
|
54113
54537
|
}, [props2.render.hydration.successMessage]);
|
|
54114
|
-
|
|
54538
|
+
useEffect25(() => {
|
|
54115
54539
|
if (state.offers) {
|
|
54116
54540
|
return;
|
|
54117
54541
|
}
|
|
@@ -55521,7 +55945,7 @@ var AccordionItemNode = ({
|
|
|
55521
55945
|
};
|
|
55522
55946
|
|
|
55523
55947
|
// ../blocks/src/system/runtime/nodes/header-section.client.tsx
|
|
55524
|
-
import { useEffect as
|
|
55948
|
+
import { useEffect as useEffect32, useMemo as useMemo17, useRef as useRef21 } from "react";
|
|
55525
55949
|
init_enhanceHeaderSection();
|
|
55526
55950
|
import { jsx as jsx129 } from "react/jsx-runtime";
|
|
55527
55951
|
var HeaderSectionNode2 = ({
|
|
@@ -55548,7 +55972,7 @@ var HeaderSectionNode2 = ({
|
|
|
55548
55972
|
() => Boolean(sectionClasses?.includes("rb-header-shrink")),
|
|
55549
55973
|
[sectionClasses]
|
|
55550
55974
|
);
|
|
55551
|
-
|
|
55975
|
+
useEffect32(() => {
|
|
55552
55976
|
const root = rootRef.current;
|
|
55553
55977
|
if (!root) return;
|
|
55554
55978
|
const mount = mountHeaderChromeRuntime(root, {
|
|
@@ -56626,7 +57050,7 @@ import { jsx as jsx149, jsxs as jsxs97 } from "react/jsx-runtime";
|
|
|
56626
57050
|
import { jsx as jsx150 } from "react/jsx-runtime";
|
|
56627
57051
|
|
|
56628
57052
|
// src/rendering/islands/BlocksIslandsHydrator.tsx
|
|
56629
|
-
import { useEffect as
|
|
57053
|
+
import { useEffect as useEffect37 } from "react";
|
|
56630
57054
|
|
|
56631
57055
|
// src/rendering/islands/deferredVideoEmbeds.ts
|
|
56632
57056
|
var DEFERRED_IFRAME_SELECTOR = 'iframe[data-rb-video-embed-deferred="true"]';
|
|
@@ -56928,7 +57352,7 @@ function BlocksIslandsHydrator(props2 = {}) {
|
|
|
56928
57352
|
if (props2.siteId || props2.supabaseUrl || props2.mediaAssets?.length) {
|
|
56929
57353
|
setContextResolveImageUrlContext(imageResolveContext);
|
|
56930
57354
|
}
|
|
56931
|
-
|
|
57355
|
+
useEffect37(() => {
|
|
56932
57356
|
startGlobalHydration();
|
|
56933
57357
|
return () => {
|
|
56934
57358
|
};
|