@riverbankcms/sdk 0.85.0 → 0.89.1
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-JDR64FEC.mjs} +3 -3
- package/dist/{PreviewEditorUI-WHMCRJGM.mjs → PreviewEditorUI-67TMJMAF.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-ZBEMRV7N.mjs +8 -0
- package/dist/_dts/api/src/accessAdmin.d.ts +7 -0
- package/dist/_dts/api/src/endpoints.d.ts +66 -14
- package/dist/_dts/api/src/index.d.ts +5 -2
- 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/siteManagementEndpoints.d.ts +5 -1
- package/dist/_dts/api/src/siteMembers.d.ts +6 -1
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +1 -13
- package/dist/_dts/api/src/types.d.ts +7 -4
- 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/icons/cta.d.ts +3 -3
- package/dist/_dts/blocks/src/system/icons/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/icons/registry.d.ts +2 -2
- package/dist/_dts/blocks/src/system/icons/semantic.d.ts +3 -3
- package/dist/_dts/blocks/src/system/icons/svg.d.ts +72 -0
- 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 +11 -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/hooks/loadStateError.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableDates.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableDates.state.d.ts +55 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableSlots.state.d.ts +39 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useBookingFormConfig.d.ts +4 -27
- package/dist/_dts/blocks/src/system/runtime/hooks/useBookingFormConfig.state.d.ts +40 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +20 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useEventFilters.state.d.ts +31 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useEventPagination.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/hooks/useEventPagination.state.d.ts +39 -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/EventPaginatedListView.client.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.client.state.d.ts +24 -2
- 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/nodes/shared/MagicLinkForm.state.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/shared/components/ModalShell.d.ts +5 -1
- package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.state.d.ts +35 -0
- package/dist/_dts/blocks/src/system/runtime/shared/utils/formatting.d.ts +1 -1
- package/dist/_dts/content-model/src/entry-slots/types.d.ts +54 -0
- package/dist/_dts/content-model/src/referenceFields.d.ts +1 -1
- package/dist/_dts/core/src/branded.d.ts +7 -0
- 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/core/src/index.d.ts +1 -0
- package/dist/_dts/core/src/site-route-target.d.ts +40 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +705 -17
- package/dist/_dts/editor-blocks/src/widgets/reference/loaders.d.ts +3 -1
- package/dist/_dts/media-core/src/fileDomain.d.ts +4 -0
- package/dist/_dts/sdk/src/client/runtimeCachePolicy.d.ts +160 -0
- package/dist/_dts/sdk/src/client/types.d.ts +35 -1
- 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/index.d.ts +3 -1
- 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/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-PYDHOMEO.mjs → chunk-7N46MZHI.mjs} +1 -1
- package/dist/{chunk-ZR2GQK2A.mjs → chunk-7YUAXONX.mjs} +1880 -588
- package/dist/{chunk-4QNLOTES.mjs → chunk-F645A5UV.mjs} +76 -14
- package/dist/{chunk-OCGTXHSO.mjs → chunk-HKJQERFR.mjs} +7 -7
- package/dist/{chunk-NFWGLRZZ.mjs → chunk-TGBJWKMP.mjs} +37 -3
- package/dist/{chunk-WFPYN7KA.mjs → chunk-ZQRBLCW5.mjs} +2 -2
- package/dist/cli/index.mjs +1075 -126
- package/dist/client/{accordion-2UZPBMYM.mjs → accordion-MUCVNGQ7.mjs} +2 -2
- package/dist/client/{bookingForm-36CWQUMV.mjs → bookingForm-PKD6EFIE.mjs} +193 -77
- package/dist/client/bookings.mjs +487 -197
- package/dist/client/{carousel-QH77HR6X.mjs → carousel-3TKQSNJC.mjs} +4 -3
- package/dist/client/cart-6XHSZK23.mjs +19 -0
- package/dist/client/checkout-FVSPM6FI.mjs +19 -0
- package/dist/client/{chunk-ZE5G642V.mjs → chunk-25W2EQUN.mjs} +75 -1
- package/dist/client/chunk-6N7YRNYU.mjs +183 -0
- package/dist/client/{chunk-4OXKTA3D.mjs → chunk-7DH35FGA.mjs} +2 -2
- package/dist/client/{chunk-3C2VTPWI.mjs → chunk-CQKKFEQD.mjs} +363 -66
- package/dist/client/{chunk-7UCLJ5SP.mjs → chunk-EY42X22F.mjs} +4 -7
- package/dist/client/{chunk-SYIJ5JO2.mjs → chunk-FHU6PFPM.mjs} +1 -1
- package/dist/client/{chunk-ZKUO52W3.mjs → chunk-LQFDYWPJ.mjs} +1 -1
- package/dist/client/chunk-RSQWWUAD.mjs +390 -0
- package/dist/client/{chunk-UDNSI5PY.mjs → chunk-STJ2NCQM.mjs} +2 -3
- package/dist/client/{chunk-VGDBVNOO.mjs → chunk-UQFY4AHX.mjs} +511 -406
- package/dist/client/{chunk-F5VRX5Y6.mjs → chunk-VGLXACVK.mjs} +1 -1
- package/dist/client/{chunk-DVNUDUVT.mjs → chunk-WBQG7VJA.mjs} +4 -1
- package/dist/client/{chunk-52CGCQ7B.mjs → chunk-ZJZZA5EP.mjs} +10 -80
- package/dist/client/{chunk-XSV6KW4D.mjs → chunk-ZT5XE7FK.mjs} +1 -1
- package/dist/client/client.mjs +5820 -4782
- package/dist/client/{courseRegistration-TMKU6ABO.mjs → courseRegistration-ATZSYDHM.mjs} +7 -7
- package/dist/client/{eventCalendar-G6TI32X6.mjs → eventCalendar-6T2UGKKP.mjs} +11 -11
- package/dist/client/{eventCombined-SCKEMNAR.mjs → eventCombined-Q4VANXVF.mjs} +11 -11
- package/dist/client/{eventDetails-XPIFXXPK.mjs → eventDetails-DW37E7VW.mjs} +11 -11
- package/dist/client/{eventListing-7QFMEMGT.mjs → eventListing-XURTSAUW.mjs} +11 -11
- package/dist/client/{eventRegistration-TOODSZUI.mjs → eventRegistration-MRKEVAXW.mjs} +11 -11
- package/dist/client/{form-MTCMVCZT.mjs → form-WZZFFGMU.mjs} +3 -3
- package/dist/client/{headerSection-Y5TMR3TW.mjs → headerSection-EQYVQBLM.mjs} +4 -4
- package/dist/client/hooks.mjs +1700 -1412
- package/dist/client/{locationMap-RH2LG7FZ.mjs → locationMap-MFF5VAZR.mjs} +3 -4
- package/dist/client/{newsletterForm-PCAIPFMA.mjs → newsletterForm-JQ77UYIE.mjs} +127 -43
- package/dist/client/{productDetail-OIGDR4YE.mjs → productDetail-25LMT3IZ.mjs} +9 -9
- package/dist/client/{productList-4MA5S2CX.mjs → productList-5ABEMKUG.mjs} +9 -9
- package/dist/client/rendering/client.mjs +3884 -3722
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +6774 -6331
- package/dist/client/shop-OMMQZ6YO.mjs +21 -0
- package/dist/preview-next/before-render.mjs +76 -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 +76 -14
- package/dist/{sdk-runtime-QLOCYKVU.mjs → sdk-runtime-WNLBZ3ZH.mjs} +6 -6
- package/dist/server/components.mjs +2579 -2548
- package/dist/server/config-validation.mjs +1737 -1461
- package/dist/server/config.mjs +1737 -1461
- package/dist/server/data.mjs +1701 -1413
- package/dist/server/index.mjs +1048 -400
- package/dist/server/next.mjs +3602 -2858
- package/dist/server/page-converter.mjs +2193 -1169
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +2770 -2742
- package/dist/server/rendering.mjs +2961 -2886
- package/dist/server/routing.mjs +2186 -1508
- package/dist/server/server.mjs +2237 -1287
- package/dist/server/theme-bridge.mjs +260 -0
- package/dist/styles/index.css +258 -0
- package/package.json +2 -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-3DTWLTXM.mjs +0 -204
- package/dist/client/chunk-I2MMZO53.mjs +0 -6
- package/dist/client/shop-WXSYV5QO.mjs +0 -21
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { ApiRequestError } from './chunk-
|
|
2
|
+
import { ApiRequestError } from './chunk-F645A5UV.mjs';
|
|
3
3
|
import { __commonJS, __export, __toESM } from './chunk-R7POPVJR.mjs';
|
|
4
4
|
import * as React61 from 'react';
|
|
5
5
|
import React61__default, { createContext, forwardRef, useContext, createElement, useRef, useMemo, useEffect, useState, useCallback, useImperativeHandle, useLayoutEffect, memo, createRef, Component as Component$1, useDebugValue, useId as useId$1, useSyncExternalStore, isValidElement, cloneElement, useReducer, startTransition } from 'react';
|
|
@@ -154,6 +154,48 @@ function subtractDaysFromIso(isoString, dayCount) {
|
|
|
154
154
|
return addDaysToIso(isoString, -dayCount);
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
+
// ../core/src/assert-never.ts
|
|
158
|
+
function assertNever(value, message2 = "Unexpected variant") {
|
|
159
|
+
throw new Error(`${message2}: ${String(value)}`);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// ../core/src/currency-format.ts
|
|
163
|
+
var CURRENCY_LOCALE_BY_CODE = {
|
|
164
|
+
USD: "en-US",
|
|
165
|
+
GBP: "en-GB",
|
|
166
|
+
EUR: "de-DE",
|
|
167
|
+
AUD: "en-AU",
|
|
168
|
+
CAD: "en-CA",
|
|
169
|
+
NZD: "en-NZ",
|
|
170
|
+
JPY: "ja-JP",
|
|
171
|
+
CNY: "zh-CN",
|
|
172
|
+
CHF: "de-CH"
|
|
173
|
+
};
|
|
174
|
+
function resolveCurrencyLocale(currencyCode, override) {
|
|
175
|
+
return override ?? CURRENCY_LOCALE_BY_CODE[currencyCode] ?? "en";
|
|
176
|
+
}
|
|
177
|
+
function formatCurrencyAmount(amountCents, currency, options) {
|
|
178
|
+
const currencyCode = currency.toUpperCase();
|
|
179
|
+
const locale = resolveCurrencyLocale(currencyCode, options?.locale);
|
|
180
|
+
try {
|
|
181
|
+
const exactFormatter = new Intl.NumberFormat(locale, {
|
|
182
|
+
style: "currency",
|
|
183
|
+
currency: currencyCode
|
|
184
|
+
});
|
|
185
|
+
const fractionDigits = options?.decimals === "auto" ? {
|
|
186
|
+
minimumFractionDigits: 0,
|
|
187
|
+
maximumFractionDigits: exactFormatter.resolvedOptions().maximumFractionDigits
|
|
188
|
+
} : {};
|
|
189
|
+
return new Intl.NumberFormat(locale, {
|
|
190
|
+
style: "currency",
|
|
191
|
+
currency: currencyCode,
|
|
192
|
+
...fractionDigits
|
|
193
|
+
}).format(amountCents / 100);
|
|
194
|
+
} catch {
|
|
195
|
+
return `${(amountCents / 100).toFixed(2)} ${currencyCode}`;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
157
199
|
// ../core/src/event-pricing.ts
|
|
158
200
|
function publicEventPricingDisplay(pricing) {
|
|
159
201
|
return pricing.display;
|
|
@@ -206,11 +248,48 @@ function isFreePublicEventPriceDisplay(display) {
|
|
|
206
248
|
return display.display.kind === "free";
|
|
207
249
|
case "exact":
|
|
208
250
|
case "from":
|
|
251
|
+
case "range":
|
|
209
252
|
case "mixed":
|
|
210
253
|
case "unavailable":
|
|
211
254
|
return false;
|
|
212
255
|
}
|
|
213
256
|
}
|
|
257
|
+
function formatCoursePriceDisplayLabel(display, options) {
|
|
258
|
+
switch (display.kind) {
|
|
259
|
+
case "free":
|
|
260
|
+
case "unavailable":
|
|
261
|
+
return "Course";
|
|
262
|
+
case "exact":
|
|
263
|
+
return `Course (${formatCurrencyAmount(display.amount, display.currency, options)})`;
|
|
264
|
+
case "from":
|
|
265
|
+
return `Course (From ${formatCurrencyAmount(display.amount, display.currency, options)})`;
|
|
266
|
+
default:
|
|
267
|
+
return assertNever(display);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
function formatBookingPriceDisplay(display, options = {}) {
|
|
271
|
+
switch (display.kind) {
|
|
272
|
+
case "free":
|
|
273
|
+
return "Free";
|
|
274
|
+
case "exact":
|
|
275
|
+
return formatCurrencyAmount(display.amount, display.currency, options);
|
|
276
|
+
case "from":
|
|
277
|
+
return `From ${formatCurrencyAmount(display.amount, display.currency, options)}`;
|
|
278
|
+
case "range":
|
|
279
|
+
return `${formatCurrencyAmount(display.minAmount, display.currency, options)} - ${formatCurrencyAmount(display.maxAmount, display.currency, options)}`;
|
|
280
|
+
case "mixed":
|
|
281
|
+
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)}`;
|
|
282
|
+
case "unavailable":
|
|
283
|
+
return "Pricing unavailable";
|
|
284
|
+
case "course":
|
|
285
|
+
return formatCoursePriceDisplayLabel(display.display, options);
|
|
286
|
+
default:
|
|
287
|
+
return assertNever(display);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
function formatEventPricing(pricing, options = {}) {
|
|
291
|
+
return formatBookingPriceDisplay(publicEventPricingDisplay(pricing), options);
|
|
292
|
+
}
|
|
214
293
|
|
|
215
294
|
// ../core/src/booking-flexible-balance.ts
|
|
216
295
|
function clampFlexibleBalanceConfiguredAmount(amountCents, totalAmountCents) {
|
|
@@ -232,10 +311,10 @@ function resolveFlexibleBalanceDueAt(input) {
|
|
|
232
311
|
case "fixed_calendar_date":
|
|
233
312
|
return input.dueDateRule.dueAt;
|
|
234
313
|
default:
|
|
235
|
-
return
|
|
314
|
+
return assertNever2(input.dueDateRule);
|
|
236
315
|
}
|
|
237
316
|
}
|
|
238
|
-
function
|
|
317
|
+
function assertNever2(value) {
|
|
239
318
|
throw new Error(`Unexpected value: ${String(value)}`);
|
|
240
319
|
}
|
|
241
320
|
|
|
@@ -248,7 +327,7 @@ function isDepositBearingBookingInstalmentPlan(plan) {
|
|
|
248
327
|
case "equal_scheduled_instalments":
|
|
249
328
|
return false;
|
|
250
329
|
default:
|
|
251
|
-
return
|
|
330
|
+
return assertNever3(plan);
|
|
252
331
|
}
|
|
253
332
|
}
|
|
254
333
|
function getBookingInstalmentDepositRefundability(plan) {
|
|
@@ -280,7 +359,7 @@ function addIntervalPreservingMonthAnchor(isoString, intervalCount, intervalUnit
|
|
|
280
359
|
case "month":
|
|
281
360
|
return addMonthsPreservingAnchorDay(date, intervalCount).toISOString();
|
|
282
361
|
default:
|
|
283
|
-
return
|
|
362
|
+
return assertNever3(intervalUnit);
|
|
284
363
|
}
|
|
285
364
|
}
|
|
286
365
|
function getBookingInstalmentPlanIntervalCount(plan) {
|
|
@@ -291,7 +370,7 @@ function getBookingInstalmentPlanIntervalCount(plan) {
|
|
|
291
370
|
case "equal_scheduled_instalments":
|
|
292
371
|
return plan.intervalCount;
|
|
293
372
|
default:
|
|
294
|
-
return
|
|
373
|
+
return assertNever3(plan);
|
|
295
374
|
}
|
|
296
375
|
}
|
|
297
376
|
function omitZeroAmountFutureRows(rows) {
|
|
@@ -326,7 +405,7 @@ function addMonthsPreservingAnchorDay(date, intervalCount) {
|
|
|
326
405
|
nextMonth.setUTCDate(Math.min(anchorDay, lastDayOfTargetMonth));
|
|
327
406
|
return nextMonth;
|
|
328
407
|
}
|
|
329
|
-
function
|
|
408
|
+
function assertNever3(value) {
|
|
330
409
|
throw new Error(`Unexpected value: ${String(value)}`);
|
|
331
410
|
}
|
|
332
411
|
|
|
@@ -623,11 +702,6 @@ function toLocationCoordinates(value) {
|
|
|
623
702
|
};
|
|
624
703
|
}
|
|
625
704
|
|
|
626
|
-
// ../core/src/assert-never.ts
|
|
627
|
-
function assertNever3(value, message2 = "Unexpected variant") {
|
|
628
|
-
throw new Error(`${message2}: ${String(value)}`);
|
|
629
|
-
}
|
|
630
|
-
|
|
631
705
|
// ../core/src/planner.ts
|
|
632
706
|
var systemPlanningClock = {
|
|
633
707
|
now: () => Date.now()
|
|
@@ -31935,6 +32009,276 @@ function parseSiteIconStyleGuideVersionId(value) {
|
|
|
31935
32009
|
const normalized = value.trim();
|
|
31936
32010
|
return SITE_ICON_STYLE_GUIDE_VERSION_ID_PATTERN.test(normalized) ? unsafeAsSiteIconStyleGuideVersionId(normalized) : null;
|
|
31937
32011
|
}
|
|
32012
|
+
function createIcon(displayName, children) {
|
|
32013
|
+
const Icon2 = ({
|
|
32014
|
+
size: size4 = "1em",
|
|
32015
|
+
strokeWidth = 2,
|
|
32016
|
+
title,
|
|
32017
|
+
className,
|
|
32018
|
+
focusable = false,
|
|
32019
|
+
role,
|
|
32020
|
+
...props2
|
|
32021
|
+
}) => /* @__PURE__ */ jsxs(
|
|
32022
|
+
"svg",
|
|
32023
|
+
{
|
|
32024
|
+
"aria-hidden": title ? void 0 : true,
|
|
32025
|
+
className,
|
|
32026
|
+
"data-rb-icon": displayName.replace(/Icon$/, ""),
|
|
32027
|
+
fill: "none",
|
|
32028
|
+
focusable,
|
|
32029
|
+
height: size4,
|
|
32030
|
+
role: title ? role ?? "img" : role,
|
|
32031
|
+
stroke: "currentColor",
|
|
32032
|
+
strokeLinecap: "round",
|
|
32033
|
+
strokeLinejoin: "round",
|
|
32034
|
+
strokeWidth,
|
|
32035
|
+
viewBox: "0 0 24 24",
|
|
32036
|
+
width: size4,
|
|
32037
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
32038
|
+
...props2,
|
|
32039
|
+
children: [
|
|
32040
|
+
title ? /* @__PURE__ */ jsx("title", { children: title }) : null,
|
|
32041
|
+
children
|
|
32042
|
+
]
|
|
32043
|
+
}
|
|
32044
|
+
);
|
|
32045
|
+
Icon2.displayName = displayName;
|
|
32046
|
+
return Icon2;
|
|
32047
|
+
}
|
|
32048
|
+
var ArrowDownIcon = createIcon("ArrowDownIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32049
|
+
/* @__PURE__ */ jsx("path", { d: "M12 5v14" }),
|
|
32050
|
+
/* @__PURE__ */ jsx("path", { d: "m6 13 6 6 6-6" })
|
|
32051
|
+
] }));
|
|
32052
|
+
var ArrowLeftIcon = createIcon("ArrowLeftIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32053
|
+
/* @__PURE__ */ jsx("path", { d: "M19 12H5" }),
|
|
32054
|
+
/* @__PURE__ */ jsx("path", { d: "m11 6-6 6 6 6" })
|
|
32055
|
+
] }));
|
|
32056
|
+
var ArrowRightIcon = createIcon("ArrowRightIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32057
|
+
/* @__PURE__ */ jsx("path", { d: "M5 12h14" }),
|
|
32058
|
+
/* @__PURE__ */ jsx("path", { d: "m13 6 6 6-6 6" })
|
|
32059
|
+
] }));
|
|
32060
|
+
var AwardIcon = createIcon("AwardIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32061
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "8", r: "4" }),
|
|
32062
|
+
/* @__PURE__ */ jsx("path", { d: "m8.5 12.5-1.5 7 5-3 5 3-1.5-7" })
|
|
32063
|
+
] }));
|
|
32064
|
+
var BadgeCheckIcon = createIcon("BadgeCheckIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32065
|
+
/* @__PURE__ */ jsx("path", { d: "m8 3 4-1 4 1 3 3 1 4-1 4-3 3-4 1-4-1-3-3-1-4 1-4Z" }),
|
|
32066
|
+
/* @__PURE__ */ jsx("path", { d: "m8.5 11.5 2.5 2.5 4.5-5" })
|
|
32067
|
+
] }));
|
|
32068
|
+
var BookOpenIcon = createIcon("BookOpenIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32069
|
+
/* @__PURE__ */ jsx("path", { d: "M4 5.5A3 3 0 0 1 7 4h13v15H7a3 3 0 0 0-3 1.5Z" }),
|
|
32070
|
+
/* @__PURE__ */ jsx("path", { d: "M4 5.5V20" }),
|
|
32071
|
+
/* @__PURE__ */ jsx("path", { d: "M12 4v15" })
|
|
32072
|
+
] }));
|
|
32073
|
+
var BrainIcon = createIcon("BrainIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32074
|
+
/* @__PURE__ */ jsx("path", { d: "M9 4a4 4 0 0 0-4 4 4 4 0 0 0 0 8 4 4 0 0 0 4 4" }),
|
|
32075
|
+
/* @__PURE__ */ jsx("path", { d: "M15 4a4 4 0 0 1 4 4 4 4 0 0 1 0 8 4 4 0 0 1-4 4" }),
|
|
32076
|
+
/* @__PURE__ */ jsx("path", { d: "M9 4v16" }),
|
|
32077
|
+
/* @__PURE__ */ jsx("path", { d: "M15 4v16" }),
|
|
32078
|
+
/* @__PURE__ */ jsx("path", { d: "M9 8h6" }),
|
|
32079
|
+
/* @__PURE__ */ jsx("path", { d: "M9 14h6" })
|
|
32080
|
+
] }));
|
|
32081
|
+
var BriefcaseBusinessIcon = createIcon("BriefcaseBusinessIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32082
|
+
/* @__PURE__ */ jsx("path", { d: "M9 7V5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2" }),
|
|
32083
|
+
/* @__PURE__ */ jsx("rect", { x: "3", y: "7", width: "18", height: "13", rx: "2" }),
|
|
32084
|
+
/* @__PURE__ */ jsx("path", { d: "M3 12h18" }),
|
|
32085
|
+
/* @__PURE__ */ jsx("path", { d: "M9 12v2" }),
|
|
32086
|
+
/* @__PURE__ */ jsx("path", { d: "M15 12v2" })
|
|
32087
|
+
] }));
|
|
32088
|
+
var CalendarIcon = createIcon("CalendarIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32089
|
+
/* @__PURE__ */ jsx("path", { d: "M8 3v4" }),
|
|
32090
|
+
/* @__PURE__ */ jsx("path", { d: "M16 3v4" }),
|
|
32091
|
+
/* @__PURE__ */ jsx("rect", { x: "4", y: "5", width: "16", height: "16", rx: "2" }),
|
|
32092
|
+
/* @__PURE__ */ jsx("path", { d: "M4 10h16" })
|
|
32093
|
+
] }));
|
|
32094
|
+
var CalendarDaysIcon = CalendarIcon;
|
|
32095
|
+
var CheckIcon = createIcon("CheckIcon", /* @__PURE__ */ jsx("path", { d: "m5 12 4 4L19 6" }));
|
|
32096
|
+
var ChevronDownIcon = createIcon("ChevronDownIcon", /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" }));
|
|
32097
|
+
var ChevronLeftIcon = createIcon("ChevronLeftIcon", /* @__PURE__ */ jsx("path", { d: "m15 18-6-6 6-6" }));
|
|
32098
|
+
var ChevronRightIcon = createIcon("ChevronRightIcon", /* @__PURE__ */ jsx("path", { d: "m9 18 6-6-6-6" }));
|
|
32099
|
+
var ChevronUpIcon = createIcon("ChevronUpIcon", /* @__PURE__ */ jsx("path", { d: "m18 15-6-6-6 6" }));
|
|
32100
|
+
var CircleMinusIcon = createIcon("CircleMinusIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32101
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9" }),
|
|
32102
|
+
/* @__PURE__ */ jsx("path", { d: "M8 12h8" })
|
|
32103
|
+
] }));
|
|
32104
|
+
var CirclePlusIcon = createIcon("CirclePlusIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32105
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9" }),
|
|
32106
|
+
/* @__PURE__ */ jsx("path", { d: "M8 12h8" }),
|
|
32107
|
+
/* @__PURE__ */ jsx("path", { d: "M12 8v8" })
|
|
32108
|
+
] }));
|
|
32109
|
+
var ClockIcon = createIcon("ClockIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32110
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9" }),
|
|
32111
|
+
/* @__PURE__ */ jsx("path", { d: "M12 7v5l3 2" })
|
|
32112
|
+
] }));
|
|
32113
|
+
var CompassIcon = createIcon("CompassIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32114
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9" }),
|
|
32115
|
+
/* @__PURE__ */ jsx("path", { d: "m15 9-2 6-4 2 2-6Z" })
|
|
32116
|
+
] }));
|
|
32117
|
+
var DownloadIcon = createIcon("DownloadIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32118
|
+
/* @__PURE__ */ jsx("path", { d: "M12 3v12" }),
|
|
32119
|
+
/* @__PURE__ */ jsx("path", { d: "m7 10 5 5 5-5" }),
|
|
32120
|
+
/* @__PURE__ */ jsx("path", { d: "M5 21h14" })
|
|
32121
|
+
] }));
|
|
32122
|
+
var ExternalLinkIcon = createIcon("ExternalLinkIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32123
|
+
/* @__PURE__ */ jsx("path", { d: "M14 4h6v6" }),
|
|
32124
|
+
/* @__PURE__ */ jsx("path", { d: "m10 14 10-10" }),
|
|
32125
|
+
/* @__PURE__ */ jsx("path", { d: "M20 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h5" })
|
|
32126
|
+
] }));
|
|
32127
|
+
var FileArchiveIcon = createIcon("FileArchiveIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32128
|
+
/* @__PURE__ */ jsx("path", { d: "M14 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7Z" }),
|
|
32129
|
+
/* @__PURE__ */ jsx("path", { d: "M14 2v5h5" }),
|
|
32130
|
+
/* @__PURE__ */ jsx("path", { d: "M10 7h2" }),
|
|
32131
|
+
/* @__PURE__ */ jsx("path", { d: "M10 11h2" }),
|
|
32132
|
+
/* @__PURE__ */ jsx("path", { d: "M10 15h4v4h-4Z" })
|
|
32133
|
+
] }));
|
|
32134
|
+
var FileAudioIcon = createIcon("FileAudioIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32135
|
+
/* @__PURE__ */ jsx("path", { d: "M14 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7Z" }),
|
|
32136
|
+
/* @__PURE__ */ jsx("path", { d: "M14 2v5h5" }),
|
|
32137
|
+
/* @__PURE__ */ jsx("path", { d: "M10 16V10l5-2v6" }),
|
|
32138
|
+
/* @__PURE__ */ jsx("circle", { cx: "9", cy: "17", r: "1.5" }),
|
|
32139
|
+
/* @__PURE__ */ jsx("circle", { cx: "15", cy: "15", r: "1.5" })
|
|
32140
|
+
] }));
|
|
32141
|
+
var FileSpreadsheetIcon = createIcon("FileSpreadsheetIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32142
|
+
/* @__PURE__ */ jsx("path", { d: "M14 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7Z" }),
|
|
32143
|
+
/* @__PURE__ */ jsx("path", { d: "M14 2v5h5" }),
|
|
32144
|
+
/* @__PURE__ */ jsx("path", { d: "M8 12h8" }),
|
|
32145
|
+
/* @__PURE__ */ jsx("path", { d: "M8 16h8" }),
|
|
32146
|
+
/* @__PURE__ */ jsx("path", { d: "M12 10v8" })
|
|
32147
|
+
] }));
|
|
32148
|
+
var FileTextIcon = createIcon("FileTextIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32149
|
+
/* @__PURE__ */ jsx("path", { d: "M14 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7Z" }),
|
|
32150
|
+
/* @__PURE__ */ jsx("path", { d: "M14 2v5h5" }),
|
|
32151
|
+
/* @__PURE__ */ jsx("path", { d: "M9 13h6" }),
|
|
32152
|
+
/* @__PURE__ */ jsx("path", { d: "M9 17h6" })
|
|
32153
|
+
] }));
|
|
32154
|
+
var Flower2Icon = createIcon("Flower2Icon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32155
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "2" }),
|
|
32156
|
+
/* @__PURE__ */ jsx("path", { d: "M12 10C8 4 16 4 12 10Z" }),
|
|
32157
|
+
/* @__PURE__ */ jsx("path", { d: "M14 12c6-4 6 4 0 0Z" }),
|
|
32158
|
+
/* @__PURE__ */ jsx("path", { d: "M12 14c4 6-4 6 0 0Z" }),
|
|
32159
|
+
/* @__PURE__ */ jsx("path", { d: "M10 12c-6 4-6-4 0 0Z" })
|
|
32160
|
+
] }));
|
|
32161
|
+
var GlobeIcon = createIcon("GlobeIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32162
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9" }),
|
|
32163
|
+
/* @__PURE__ */ jsx("path", { d: "M3 12h18" }),
|
|
32164
|
+
/* @__PURE__ */ jsx("path", { d: "M12 3a14 14 0 0 1 0 18" }),
|
|
32165
|
+
/* @__PURE__ */ jsx("path", { d: "M12 3a14 14 0 0 0 0 18" })
|
|
32166
|
+
] }));
|
|
32167
|
+
var GraduationCapIcon = createIcon("GraduationCapIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32168
|
+
/* @__PURE__ */ jsx("path", { d: "m3 8 9-4 9 4-9 4Z" }),
|
|
32169
|
+
/* @__PURE__ */ jsx("path", { d: "M7 10v5c3 3 7 3 10 0v-5" }),
|
|
32170
|
+
/* @__PURE__ */ jsx("path", { d: "M21 8v6" })
|
|
32171
|
+
] }));
|
|
32172
|
+
var HandHeartIcon = createIcon("HandHeartIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32173
|
+
/* @__PURE__ */ jsx("path", { d: "M3 15h4l4 4h5l5-5" }),
|
|
32174
|
+
/* @__PURE__ */ jsx("path", { d: "M7 15l3-3h4a2 2 0 0 1 2 2" }),
|
|
32175
|
+
/* @__PURE__ */ jsx("path", { d: "M12 8c-2-2-5 1-2 4l2 2 2-2c3-3 0-6-2-4Z" })
|
|
32176
|
+
] }));
|
|
32177
|
+
var HeartIcon = createIcon("HeartIcon", /* @__PURE__ */ jsx("path", { d: "M12 21s-8-5-8-11a5 5 0 0 1 8-4 5 5 0 0 1 8 4c0 6-8 11-8 11Z" }));
|
|
32178
|
+
var HeartHandshakeIcon = createIcon("HeartHandshakeIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32179
|
+
/* @__PURE__ */ jsx("path", { d: "M12 21s-8-5-8-11a5 5 0 0 1 8-4 5 5 0 0 1 8 4c0 6-8 11-8 11Z" }),
|
|
32180
|
+
/* @__PURE__ */ jsx("path", { d: "m8 12 2 2 2-2 2 2 2-2" })
|
|
32181
|
+
] }));
|
|
32182
|
+
var HomeIcon = createIcon("HomeIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32183
|
+
/* @__PURE__ */ jsx("path", { d: "m3 11 9-8 9 8" }),
|
|
32184
|
+
/* @__PURE__ */ jsx("path", { d: "M5 10v10h14V10" }),
|
|
32185
|
+
/* @__PURE__ */ jsx("path", { d: "M9 20v-6h6v6" })
|
|
32186
|
+
] }));
|
|
32187
|
+
var InfoIcon = createIcon("InfoIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32188
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9" }),
|
|
32189
|
+
/* @__PURE__ */ jsx("path", { d: "M12 11v6" }),
|
|
32190
|
+
/* @__PURE__ */ jsx("path", { d: "M12 7h.01" })
|
|
32191
|
+
] }));
|
|
32192
|
+
var LeafIcon = createIcon("LeafIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32193
|
+
/* @__PURE__ */ jsx("path", { d: "M5 20C5 10 12 4 21 4c0 9-6 16-16 16Z" }),
|
|
32194
|
+
/* @__PURE__ */ jsx("path", { d: "M5 20c4-5 8-8 13-11" })
|
|
32195
|
+
] }));
|
|
32196
|
+
var LightbulbIcon = createIcon("LightbulbIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32197
|
+
/* @__PURE__ */ jsx("path", { d: "M9 18h6" }),
|
|
32198
|
+
/* @__PURE__ */ jsx("path", { d: "M10 22h4" }),
|
|
32199
|
+
/* @__PURE__ */ jsx("path", { d: "M8 14a6 6 0 1 1 8 0c-1 1-1 2-1 4H9c0-2 0-3-1-4Z" })
|
|
32200
|
+
] }));
|
|
32201
|
+
var LockIcon = createIcon("LockIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32202
|
+
/* @__PURE__ */ jsx("rect", { x: "5", y: "10", width: "14", height: "10", rx: "2" }),
|
|
32203
|
+
/* @__PURE__ */ jsx("path", { d: "M8 10V7a4 4 0 0 1 8 0v3" })
|
|
32204
|
+
] }));
|
|
32205
|
+
var MailIcon = createIcon("MailIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32206
|
+
/* @__PURE__ */ jsx("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
|
|
32207
|
+
/* @__PURE__ */ jsx("path", { d: "m3 7 9 6 9-6" })
|
|
32208
|
+
] }));
|
|
32209
|
+
var MapPinIcon = createIcon("MapPinIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32210
|
+
/* @__PURE__ */ jsx("path", { d: "M12 21s7-5 7-12a7 7 0 0 0-14 0c0 7 7 12 7 12Z" }),
|
|
32211
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "9", r: "2.5" })
|
|
32212
|
+
] }));
|
|
32213
|
+
var MessageCircleIcon = createIcon("MessageCircleIcon", /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "M21 11.5a8.5 8.5 0 0 1-12.6 7.4L3 20l1.1-5.3A8.5 8.5 0 1 1 21 11.5Z" }) }));
|
|
32214
|
+
var MinusIcon = createIcon("MinusIcon", /* @__PURE__ */ jsx("path", { d: "M5 12h14" }));
|
|
32215
|
+
var PackageIcon = createIcon("PackageIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32216
|
+
/* @__PURE__ */ jsx("path", { d: "m12 3 8 4.5v9L12 21l-8-4.5v-9Z" }),
|
|
32217
|
+
/* @__PURE__ */ jsx("path", { d: "M12 12 4 7.5" }),
|
|
32218
|
+
/* @__PURE__ */ jsx("path", { d: "m12 12 8-4.5" }),
|
|
32219
|
+
/* @__PURE__ */ jsx("path", { d: "M12 12v9" })
|
|
32220
|
+
] }));
|
|
32221
|
+
var PhoneIcon = createIcon("PhoneIcon", /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "M22 16.9v3a2 2 0 0 1-2.2 2A19 19 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7l.4 2.5a2 2 0 0 1-.6 1.8L7.7 9.2a13 13 0 0 0 7.1 7.1l1.2-1.2a2 2 0 0 1 1.8-.6l2.5.4a2 2 0 0 1 1.7 2Z" }) }));
|
|
32222
|
+
var PlayIcon = createIcon("PlayIcon", /* @__PURE__ */ jsx("path", { d: "m8 5 11 7-11 7Z" }));
|
|
32223
|
+
var PlusIcon = createIcon("PlusIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32224
|
+
/* @__PURE__ */ jsx("path", { d: "M12 5v14" }),
|
|
32225
|
+
/* @__PURE__ */ jsx("path", { d: "M5 12h14" })
|
|
32226
|
+
] }));
|
|
32227
|
+
var ShieldIcon = createIcon("ShieldIcon", /* @__PURE__ */ jsx("path", { d: "M12 22s8-4 8-11V5l-8-3-8 3v6c0 7 8 11 8 11Z" }));
|
|
32228
|
+
var ShoppingBagIcon = createIcon("ShoppingBagIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32229
|
+
/* @__PURE__ */ jsx("path", { d: "M6 8h12l1 13H5Z" }),
|
|
32230
|
+
/* @__PURE__ */ jsx("path", { d: "M9 8a3 3 0 0 1 6 0" })
|
|
32231
|
+
] }));
|
|
32232
|
+
var ShoppingCartIcon = createIcon("ShoppingCartIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32233
|
+
/* @__PURE__ */ jsx("circle", { cx: "9", cy: "20", r: "1" }),
|
|
32234
|
+
/* @__PURE__ */ jsx("circle", { cx: "18", cy: "20", r: "1" }),
|
|
32235
|
+
/* @__PURE__ */ jsx("path", { d: "M2 3h3l3 12h10l3-8H7" })
|
|
32236
|
+
] }));
|
|
32237
|
+
var SmileIcon = createIcon("SmileIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32238
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9" }),
|
|
32239
|
+
/* @__PURE__ */ jsx("path", { d: "M8 14s1.5 2 4 2 4-2 4-2" }),
|
|
32240
|
+
/* @__PURE__ */ jsx("path", { d: "M9 9h.01" }),
|
|
32241
|
+
/* @__PURE__ */ jsx("path", { d: "M15 9h.01" })
|
|
32242
|
+
] }));
|
|
32243
|
+
var SparklesIcon = createIcon("SparklesIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32244
|
+
/* @__PURE__ */ jsx("path", { d: "m12 3 2 5 5 2-5 2-2 5-2-5-5-2 5-2Z" }),
|
|
32245
|
+
/* @__PURE__ */ jsx("path", { d: "m19 15 .8 2.2L22 18l-2.2.8L19 21l-.8-2.2L16 18l2.2-.8Z" })
|
|
32246
|
+
] }));
|
|
32247
|
+
var SproutIcon = createIcon("SproutIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32248
|
+
/* @__PURE__ */ jsx("path", { d: "M12 21V10" }),
|
|
32249
|
+
/* @__PURE__ */ jsx("path", { d: "M12 10C8 5 4 6 3 10c4 1 7 0 9 0Z" }),
|
|
32250
|
+
/* @__PURE__ */ jsx("path", { d: "M12 11c4-5 8-4 9 0-4 1-7 0-9 0Z" })
|
|
32251
|
+
] }));
|
|
32252
|
+
var StarIcon = createIcon("StarIcon", /* @__PURE__ */ jsx("path", { d: "m12 3 2.8 5.7 6.2.9-4.5 4.4 1.1 6.2L12 17.2 6.4 20.2 7.5 14 3 9.6l6.2-.9Z" }));
|
|
32253
|
+
var TargetIcon = createIcon("TargetIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32254
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9" }),
|
|
32255
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "5" }),
|
|
32256
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "1" })
|
|
32257
|
+
] }));
|
|
32258
|
+
var UploadIcon = createIcon("UploadIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32259
|
+
/* @__PURE__ */ jsx("path", { d: "M12 21V9" }),
|
|
32260
|
+
/* @__PURE__ */ jsx("path", { d: "m7 14 5-5 5 5" }),
|
|
32261
|
+
/* @__PURE__ */ jsx("path", { d: "M5 3h14" })
|
|
32262
|
+
] }));
|
|
32263
|
+
var UserRoundCheckIcon = createIcon("UserRoundCheckIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32264
|
+
/* @__PURE__ */ jsx("circle", { cx: "10", cy: "8", r: "4" }),
|
|
32265
|
+
/* @__PURE__ */ jsx("path", { d: "M3 21a7 7 0 0 1 11.5-5.3" }),
|
|
32266
|
+
/* @__PURE__ */ jsx("path", { d: "m15 19 2 2 4-5" })
|
|
32267
|
+
] }));
|
|
32268
|
+
var UsersIcon = createIcon("UsersIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32269
|
+
/* @__PURE__ */ jsx("circle", { cx: "9", cy: "8", r: "4" }),
|
|
32270
|
+
/* @__PURE__ */ jsx("path", { d: "M2 21a7 7 0 0 1 14 0" }),
|
|
32271
|
+
/* @__PURE__ */ jsx("path", { d: "M17 11a4 4 0 0 0 0-7" }),
|
|
32272
|
+
/* @__PURE__ */ jsx("path", { d: "M22 21a7 7 0 0 0-5-6.7" })
|
|
32273
|
+
] }));
|
|
32274
|
+
var WrenchIcon = createIcon("WrenchIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32275
|
+
/* @__PURE__ */ jsx("path", { d: "M14.7 6.3A5 5 0 0 0 7 12.6L3.5 16a2.1 2.1 0 0 0 3 3L10 15.5A5 5 0 0 0 16.7 9Z" }),
|
|
32276
|
+
/* @__PURE__ */ jsx("path", { d: "m15 5 4 4" })
|
|
32277
|
+
] }));
|
|
32278
|
+
var XIcon = createIcon("XIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32279
|
+
/* @__PURE__ */ jsx("path", { d: "M18 6 6 18" }),
|
|
32280
|
+
/* @__PURE__ */ jsx("path", { d: "m6 6 12 12" })
|
|
32281
|
+
] }));
|
|
31938
32282
|
|
|
31939
32283
|
// ../blocks/src/system/icons/semantic.ts
|
|
31940
32284
|
var SEMANTIC_ICON_IDS = [
|
|
@@ -31971,37 +32315,37 @@ var SEMANTIC_ICON_IDS = [
|
|
|
31971
32315
|
"professional-service"
|
|
31972
32316
|
];
|
|
31973
32317
|
var SEMANTIC_ICON_COMPONENTS = {
|
|
31974
|
-
"protection-trust":
|
|
31975
|
-
confidentiality:
|
|
31976
|
-
"care-support":
|
|
31977
|
-
partnership:
|
|
31978
|
-
warmth:
|
|
31979
|
-
community:
|
|
31980
|
-
"personal-guidance":
|
|
31981
|
-
conversation:
|
|
31982
|
-
"friendly-welcome":
|
|
31983
|
-
"insight-learning":
|
|
31984
|
-
"natural-wellbeing":
|
|
31985
|
-
growth:
|
|
31986
|
-
"gentle-care":
|
|
31987
|
-
"special-touch":
|
|
31988
|
-
ideas:
|
|
31989
|
-
direction:
|
|
31990
|
-
focus:
|
|
31991
|
-
quality:
|
|
31992
|
-
highlight:
|
|
31993
|
-
"verified-quality":
|
|
31994
|
-
learning:
|
|
31995
|
-
training:
|
|
31996
|
-
"programmes-dates":
|
|
31997
|
-
place:
|
|
31998
|
-
products:
|
|
31999
|
-
packages:
|
|
32000
|
-
time:
|
|
32001
|
-
"practical-service":
|
|
32002
|
-
"at-home":
|
|
32003
|
-
worldwide:
|
|
32004
|
-
"professional-service":
|
|
32318
|
+
"protection-trust": ShieldIcon,
|
|
32319
|
+
confidentiality: LockIcon,
|
|
32320
|
+
"care-support": HandHeartIcon,
|
|
32321
|
+
partnership: HeartHandshakeIcon,
|
|
32322
|
+
warmth: HeartIcon,
|
|
32323
|
+
community: UsersIcon,
|
|
32324
|
+
"personal-guidance": UserRoundCheckIcon,
|
|
32325
|
+
conversation: MessageCircleIcon,
|
|
32326
|
+
"friendly-welcome": SmileIcon,
|
|
32327
|
+
"insight-learning": BrainIcon,
|
|
32328
|
+
"natural-wellbeing": LeafIcon,
|
|
32329
|
+
growth: SproutIcon,
|
|
32330
|
+
"gentle-care": Flower2Icon,
|
|
32331
|
+
"special-touch": SparklesIcon,
|
|
32332
|
+
ideas: LightbulbIcon,
|
|
32333
|
+
direction: CompassIcon,
|
|
32334
|
+
focus: TargetIcon,
|
|
32335
|
+
quality: AwardIcon,
|
|
32336
|
+
highlight: StarIcon,
|
|
32337
|
+
"verified-quality": BadgeCheckIcon,
|
|
32338
|
+
learning: BookOpenIcon,
|
|
32339
|
+
training: GraduationCapIcon,
|
|
32340
|
+
"programmes-dates": CalendarDaysIcon,
|
|
32341
|
+
place: MapPinIcon,
|
|
32342
|
+
products: ShoppingBagIcon,
|
|
32343
|
+
packages: PackageIcon,
|
|
32344
|
+
time: ClockIcon,
|
|
32345
|
+
"practical-service": WrenchIcon,
|
|
32346
|
+
"at-home": HomeIcon,
|
|
32347
|
+
worldwide: GlobeIcon,
|
|
32348
|
+
"professional-service": BriefcaseBusinessIcon
|
|
32005
32349
|
};
|
|
32006
32350
|
var featurePreset = ["feature"];
|
|
32007
32351
|
var SEMANTIC_ICON_DEFINITIONS = [
|
|
@@ -53538,15 +53882,53 @@ var newsletterFormFragment = defineFragment({
|
|
|
53538
53882
|
title: "Newsletter Form",
|
|
53539
53883
|
description: "Newsletter subscription form with preset field configurations.",
|
|
53540
53884
|
fields: [
|
|
53885
|
+
{
|
|
53886
|
+
id: "destinationProvider",
|
|
53887
|
+
type: "select",
|
|
53888
|
+
label: "Send signups to",
|
|
53889
|
+
description: "Choose where new subscribers from this form should go.",
|
|
53890
|
+
defaultValue: "riverbank",
|
|
53891
|
+
required: true,
|
|
53892
|
+
ui: { intent: "behavior" },
|
|
53893
|
+
options: [
|
|
53894
|
+
{ value: "riverbank", label: "Riverbank newsletter" }
|
|
53895
|
+
]
|
|
53896
|
+
},
|
|
53541
53897
|
{
|
|
53542
53898
|
id: "listId",
|
|
53543
53899
|
type: "reference",
|
|
53544
53900
|
label: "Newsletter list",
|
|
53545
53901
|
description: "Select the list new subscribers should be added to.",
|
|
53546
|
-
required:
|
|
53902
|
+
required: false,
|
|
53547
53903
|
referenceKind: "newsletterList",
|
|
53548
53904
|
allowManualEntry: false,
|
|
53549
|
-
ui: {
|
|
53905
|
+
ui: {
|
|
53906
|
+
intent: "behavior",
|
|
53907
|
+
visibleWhen: { field: "destinationProvider", equals: "riverbank" }
|
|
53908
|
+
}
|
|
53909
|
+
},
|
|
53910
|
+
{
|
|
53911
|
+
id: "mailchimpAudienceId",
|
|
53912
|
+
type: "reference",
|
|
53913
|
+
label: "Mailchimp audience",
|
|
53914
|
+
description: "Choose the Mailchimp audience for new subscribers.",
|
|
53915
|
+
required: false,
|
|
53916
|
+
referenceKind: "mailchimpAudience",
|
|
53917
|
+
allowManualEntry: false,
|
|
53918
|
+
ui: {
|
|
53919
|
+
intent: "behavior",
|
|
53920
|
+
visibleWhen: { field: "destinationProvider", equals: "mailchimp" }
|
|
53921
|
+
}
|
|
53922
|
+
},
|
|
53923
|
+
{
|
|
53924
|
+
id: "mailchimpTags",
|
|
53925
|
+
type: "text",
|
|
53926
|
+
label: "Mailchimp tags",
|
|
53927
|
+
description: "Optional tags to apply in Mailchimp, separated by commas or semicolons.",
|
|
53928
|
+
ui: {
|
|
53929
|
+
intent: "behavior",
|
|
53930
|
+
visibleWhen: { field: "destinationProvider", equals: "mailchimp" }
|
|
53931
|
+
}
|
|
53550
53932
|
},
|
|
53551
53933
|
{
|
|
53552
53934
|
id: "preset",
|
|
@@ -53593,13 +53975,18 @@ var newsletterFormFragment = defineFragment({
|
|
|
53593
53975
|
id: "tags",
|
|
53594
53976
|
type: "text",
|
|
53595
53977
|
label: "Tags (optional)",
|
|
53596
|
-
description: "Optional tags to apply on subscribe (comma or semicolon separated)."
|
|
53978
|
+
description: "Optional tags to apply on subscribe (comma or semicolon separated).",
|
|
53979
|
+
ui: {
|
|
53980
|
+
intent: "behavior",
|
|
53981
|
+
visibleWhen: { field: "destinationProvider", equals: "riverbank" }
|
|
53982
|
+
}
|
|
53597
53983
|
}
|
|
53598
53984
|
],
|
|
53599
53985
|
layout: [
|
|
53600
53986
|
el(
|
|
53601
53987
|
"newsletter-form",
|
|
53602
53988
|
withApiBindings({
|
|
53989
|
+
destinationProvider: { $bind: { from: "destinationProvider" } },
|
|
53603
53990
|
listId: { $bind: { from: "listId" } },
|
|
53604
53991
|
preset: { $bind: { from: "preset" } },
|
|
53605
53992
|
includePhone: { $bind: { from: "includePhone" } },
|
|
@@ -59560,6 +59947,107 @@ var mediaSchema2 = z40.discriminatedUnion("type", [
|
|
|
59560
59947
|
spreadsheetMediaSchema,
|
|
59561
59948
|
archiveMediaSchema
|
|
59562
59949
|
]);
|
|
59950
|
+
var TipTapMarkSchema = z.object({
|
|
59951
|
+
type: z.string(),
|
|
59952
|
+
attrs: z.record(z.string(), z.unknown()).optional()
|
|
59953
|
+
});
|
|
59954
|
+
var TipTapNodeSchema = z.lazy(
|
|
59955
|
+
() => z.object({
|
|
59956
|
+
type: z.string(),
|
|
59957
|
+
content: z.array(TipTapNodeSchema).optional(),
|
|
59958
|
+
text: z.string().optional(),
|
|
59959
|
+
attrs: z.record(z.string(), z.unknown()).optional(),
|
|
59960
|
+
marks: z.array(TipTapMarkSchema).optional()
|
|
59961
|
+
})
|
|
59962
|
+
);
|
|
59963
|
+
var RichTextValueSchema = z.union([
|
|
59964
|
+
// Canonical: TipTap document directly
|
|
59965
|
+
TipTapNodeSchema,
|
|
59966
|
+
// Legacy (read-tolerance only): wrapped in { doc: {...} }
|
|
59967
|
+
z.object({
|
|
59968
|
+
doc: TipTapNodeSchema
|
|
59969
|
+
})
|
|
59970
|
+
]);
|
|
59971
|
+
var RichTextDocSchema = z.object({
|
|
59972
|
+
type: z.literal("doc"),
|
|
59973
|
+
content: z.array(TipTapNodeSchema)
|
|
59974
|
+
});
|
|
59975
|
+
function unwrapRichTextRoot(value) {
|
|
59976
|
+
if (!isRecord4(value)) return value;
|
|
59977
|
+
if (!("doc" in value)) return value;
|
|
59978
|
+
const inner = value.doc;
|
|
59979
|
+
if (isRecord4(inner) && inner.type === "doc") return inner;
|
|
59980
|
+
return value;
|
|
59981
|
+
}
|
|
59982
|
+
function createHardBreakNode() {
|
|
59983
|
+
return { type: "hardBreak" };
|
|
59984
|
+
}
|
|
59985
|
+
function parseRichTextInlineMarkdown(text2) {
|
|
59986
|
+
const out = [];
|
|
59987
|
+
const pushText = (value, marks) => {
|
|
59988
|
+
if (!value) return;
|
|
59989
|
+
out.push(
|
|
59990
|
+
marks && marks.length > 0 ? { type: "text", text: value, marks } : { type: "text", text: value }
|
|
59991
|
+
);
|
|
59992
|
+
};
|
|
59993
|
+
let rest = text2;
|
|
59994
|
+
while (rest.length > 0) {
|
|
59995
|
+
const start = rest.indexOf("**");
|
|
59996
|
+
if (start === -1) {
|
|
59997
|
+
pushText(rest);
|
|
59998
|
+
break;
|
|
59999
|
+
}
|
|
60000
|
+
const end = rest.indexOf("**", start + 2);
|
|
60001
|
+
if (end === -1) {
|
|
60002
|
+
pushText(rest);
|
|
60003
|
+
break;
|
|
60004
|
+
}
|
|
60005
|
+
pushText(rest.slice(0, start));
|
|
60006
|
+
pushText(rest.slice(start + 2, end), [{ type: "bold" }]);
|
|
60007
|
+
rest = rest.slice(end + 2);
|
|
60008
|
+
}
|
|
60009
|
+
return out;
|
|
60010
|
+
}
|
|
60011
|
+
function parseRichTextParagraphInlineMarkdown(text2) {
|
|
60012
|
+
return text2.split("\n").flatMap((line, index2) => {
|
|
60013
|
+
const lineNodes = parseRichTextInlineMarkdown(line.trim());
|
|
60014
|
+
return index2 === 0 ? lineNodes : [createHardBreakNode(), ...lineNodes];
|
|
60015
|
+
});
|
|
60016
|
+
}
|
|
60017
|
+
function createRichTextDocFromMarkdown(markdown) {
|
|
60018
|
+
const normalized = markdown.replace(/\r\n/g, "\n").trim();
|
|
60019
|
+
if (!normalized) return { type: "doc", content: [] };
|
|
60020
|
+
const paragraphs = normalized.split(/\n{2,}/).map((paragraph) => paragraph.trim()).filter(Boolean);
|
|
60021
|
+
return {
|
|
60022
|
+
type: "doc",
|
|
60023
|
+
content: paragraphs.map((paragraph) => {
|
|
60024
|
+
const inline4 = parseRichTextParagraphInlineMarkdown(paragraph);
|
|
60025
|
+
return inline4.length > 0 ? { type: "paragraph", content: inline4 } : { type: "paragraph" };
|
|
60026
|
+
})
|
|
60027
|
+
};
|
|
60028
|
+
}
|
|
60029
|
+
function buildRichTextSchema(options) {
|
|
60030
|
+
let schema = RichTextValueSchema;
|
|
60031
|
+
if (options?.required) {
|
|
60032
|
+
const label = options.label ?? "This field";
|
|
60033
|
+
schema = schema.refine(
|
|
60034
|
+
(val) => {
|
|
60035
|
+
const doc3 = isRecord4(val) && "doc" in val ? val.doc : val;
|
|
60036
|
+
const content = isRecord4(doc3) ? doc3.content : void 0;
|
|
60037
|
+
if (!Array.isArray(content) || content.length === 0) return false;
|
|
60038
|
+
const first2 = content[0];
|
|
60039
|
+
if (content.length === 1 && isRecord4(first2) && first2.type === "paragraph" && (!("content" in first2) || first2.content == null)) {
|
|
60040
|
+
return false;
|
|
60041
|
+
}
|
|
60042
|
+
return true;
|
|
60043
|
+
},
|
|
60044
|
+
{
|
|
60045
|
+
message: `${label} is required`
|
|
60046
|
+
}
|
|
60047
|
+
);
|
|
60048
|
+
}
|
|
60049
|
+
return schema;
|
|
60050
|
+
}
|
|
59563
60051
|
var bookingDepositRefundPolicySchema = z.enum([
|
|
59564
60052
|
"refundable",
|
|
59565
60053
|
"non_refundable"
|
|
@@ -59715,7 +60203,13 @@ z.discriminatedUnion("kind", [
|
|
|
59715
60203
|
z.object({ kind: z.literal("free"), currency: z.string() }),
|
|
59716
60204
|
z.object({ kind: z.literal("exact"), amount: z.number(), currency: z.string() }),
|
|
59717
60205
|
z.object({ kind: z.literal("from"), amount: z.number(), currency: z.string() }),
|
|
59718
|
-
z.object({ kind: z.literal("
|
|
60206
|
+
z.object({ kind: z.literal("range"), minAmount: z.number(), maxAmount: z.number(), currency: z.string() }),
|
|
60207
|
+
z.object({
|
|
60208
|
+
kind: z.literal("mixed"),
|
|
60209
|
+
paidFromAmount: z.number(),
|
|
60210
|
+
paidToAmount: z.number(),
|
|
60211
|
+
currency: z.string()
|
|
60212
|
+
}),
|
|
59719
60213
|
z.object({ kind: z.literal("unavailable"), currency: z.string() }),
|
|
59720
60214
|
z.object({ kind: z.literal("course"), display: publicCoursePriceDisplaySchema })
|
|
59721
60215
|
]);
|
|
@@ -59723,7 +60217,13 @@ var publicEventTicketTypePriceDisplaySchema = z.union([
|
|
|
59723
60217
|
z.object({ kind: z.literal("free"), currency: z.string() }),
|
|
59724
60218
|
z.object({ kind: z.literal("exact"), amount: z.number(), currency: z.string() }),
|
|
59725
60219
|
z.object({ kind: z.literal("from"), amount: z.number(), currency: z.string() }),
|
|
59726
|
-
z.object({ kind: z.literal("
|
|
60220
|
+
z.object({ kind: z.literal("range"), minAmount: z.number(), maxAmount: z.number(), currency: z.string() }),
|
|
60221
|
+
z.object({
|
|
60222
|
+
kind: z.literal("mixed"),
|
|
60223
|
+
paidFromAmount: z.number(),
|
|
60224
|
+
paidToAmount: z.number(),
|
|
60225
|
+
currency: z.string()
|
|
60226
|
+
}),
|
|
59727
60227
|
z.object({ kind: z.literal("unavailable"), currency: z.string() })
|
|
59728
60228
|
]);
|
|
59729
60229
|
var publicEventAttendanceModeSchema = z.enum(["in_person", "online"]);
|
|
@@ -59808,6 +60308,9 @@ var publicEventSchema = z.object({
|
|
|
59808
60308
|
seriesId: z.string(),
|
|
59809
60309
|
title: z.string(),
|
|
59810
60310
|
description: z.string().nullable(),
|
|
60311
|
+
content: z.object({
|
|
60312
|
+
body: RichTextDocSchema.nullable().optional()
|
|
60313
|
+
}).optional(),
|
|
59811
60314
|
presentation: z.object({
|
|
59812
60315
|
cardTitleOverride: z.string().nullable().optional(),
|
|
59813
60316
|
summary: z.string().nullable().optional(),
|
|
@@ -60153,10 +60656,21 @@ function readLegacyPriceDisplay(value, currency) {
|
|
|
60153
60656
|
amount: readAmount(value.amount) ?? 0,
|
|
60154
60657
|
currency: displayCurrency
|
|
60155
60658
|
} : { kind: "unavailable", currency };
|
|
60659
|
+
case "range": {
|
|
60660
|
+
const minAmount = readAmount(value.minAmount);
|
|
60661
|
+
const maxAmount = readAmount(value.maxAmount);
|
|
60662
|
+
return minAmount !== null && maxAmount !== null ? {
|
|
60663
|
+
kind: "range",
|
|
60664
|
+
minAmount,
|
|
60665
|
+
maxAmount,
|
|
60666
|
+
currency: displayCurrency
|
|
60667
|
+
} : { kind: "unavailable", currency };
|
|
60668
|
+
}
|
|
60156
60669
|
case "mixed":
|
|
60157
60670
|
return readAmount(value.paidFromAmount) !== null ? {
|
|
60158
60671
|
kind: "mixed",
|
|
60159
60672
|
paidFromAmount: readAmount(value.paidFromAmount) ?? 0,
|
|
60673
|
+
paidToAmount: readAmount(value.paidToAmount) ?? readAmount(value.paidFromAmount) ?? 0,
|
|
60160
60674
|
currency: displayCurrency
|
|
60161
60675
|
} : { kind: "unavailable", currency };
|
|
60162
60676
|
case "unavailable":
|
|
@@ -60336,6 +60850,7 @@ var eventRegistrationSourceSchema = z.object({
|
|
|
60336
60850
|
successMessage: z.string().optional(),
|
|
60337
60851
|
waitlistMessage: z.string().optional(),
|
|
60338
60852
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
60853
|
+
overlayEnabled: z.boolean().optional(),
|
|
60339
60854
|
spamProtectionEnabled: z.boolean().optional(),
|
|
60340
60855
|
stage: previewStageSchema.optional(),
|
|
60341
60856
|
supportEmail: z.string().optional()
|
|
@@ -60359,6 +60874,7 @@ var eventRegistrationHydrationSchema = z.object({
|
|
|
60359
60874
|
successMessage: z.string().optional(),
|
|
60360
60875
|
waitlistMessage: z.string().optional(),
|
|
60361
60876
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
60877
|
+
overlayEnabled: z.boolean().optional(),
|
|
60362
60878
|
spamProtectionEnabled: z.boolean().optional(),
|
|
60363
60879
|
supportEmail: z.string().optional()
|
|
60364
60880
|
});
|
|
@@ -60467,6 +60983,7 @@ var eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
60467
60983
|
successMessage: source.successMessage,
|
|
60468
60984
|
waitlistMessage: source.waitlistMessage,
|
|
60469
60985
|
buttonVariant: source.buttonVariant,
|
|
60986
|
+
overlayEnabled: source.overlayEnabled,
|
|
60470
60987
|
spamProtectionEnabled: source.spamProtectionEnabled,
|
|
60471
60988
|
supportEmail: source.supportEmail
|
|
60472
60989
|
}
|
|
@@ -60643,6 +61160,12 @@ var eventRegistrationManifest = createBlockManifest({
|
|
|
60643
61160
|
buttonVariant: {
|
|
60644
61161
|
$bind: { from: "content.buttonVariant", fallback: "primary" }
|
|
60645
61162
|
},
|
|
61163
|
+
overlayEnabled: {
|
|
61164
|
+
$bind: {
|
|
61165
|
+
from: "$root.eventRegistrationOverlayEnabled",
|
|
61166
|
+
fallback: false
|
|
61167
|
+
}
|
|
61168
|
+
},
|
|
60646
61169
|
// Event data from loader
|
|
60647
61170
|
events: { $bind: { from: "data.events" } },
|
|
60648
61171
|
// Stage for preview mode (allows registering for draft events)
|
|
@@ -60790,29 +61313,7 @@ function resolveCoursePricingState(course, selectedPricingOptionId, nowInput = {
|
|
|
60790
61313
|
}
|
|
60791
61314
|
}
|
|
60792
61315
|
function formatCoursePriceDisplay(display, locale) {
|
|
60793
|
-
|
|
60794
|
-
case "free":
|
|
60795
|
-
return "Free";
|
|
60796
|
-
case "unavailable":
|
|
60797
|
-
return "Pricing unavailable";
|
|
60798
|
-
case "exact":
|
|
60799
|
-
return formatCourseCurrencyAmount(display.amount, display.currency, { locale });
|
|
60800
|
-
case "from":
|
|
60801
|
-
return `From ${formatCourseCurrencyAmount(display.amount, display.currency, { locale })}`;
|
|
60802
|
-
}
|
|
60803
|
-
}
|
|
60804
|
-
function formatCourseCurrencyAmount(amount, currency, options) {
|
|
60805
|
-
const {
|
|
60806
|
-
locale = "en-US",
|
|
60807
|
-
minimumFractionDigits,
|
|
60808
|
-
maximumFractionDigits
|
|
60809
|
-
} = options ?? {};
|
|
60810
|
-
return new Intl.NumberFormat(locale, {
|
|
60811
|
-
style: "currency",
|
|
60812
|
-
currency: currency.toUpperCase(),
|
|
60813
|
-
...minimumFractionDigits === void 0 ? {} : { minimumFractionDigits },
|
|
60814
|
-
...maximumFractionDigits === void 0 ? {} : { maximumFractionDigits }
|
|
60815
|
-
}).format(amount / 100);
|
|
61316
|
+
return formatBookingPriceDisplay(display, { decimals: "exact", locale });
|
|
60816
61317
|
}
|
|
60817
61318
|
function formatCoursePriceAmount(amount, currency, locale) {
|
|
60818
61319
|
return formatCoursePriceDisplay(
|
|
@@ -61848,15 +62349,15 @@ function getLocalMinuteOfDay(isoTimestamp, timeZone) {
|
|
|
61848
62349
|
const date = new Date(isoTimestamp);
|
|
61849
62350
|
if (Number.isNaN(date.getTime())) return NaN;
|
|
61850
62351
|
if (!isValidTimeZone2(timeZone)) return NaN;
|
|
61851
|
-
const parts = new Intl.DateTimeFormat("en-
|
|
62352
|
+
const parts = new Intl.DateTimeFormat("en-GB", {
|
|
61852
62353
|
timeZone,
|
|
61853
62354
|
hour: "2-digit",
|
|
61854
62355
|
minute: "2-digit",
|
|
61855
|
-
hour12: false,
|
|
61856
62356
|
hourCycle: "h23"
|
|
61857
62357
|
}).formatToParts(date);
|
|
61858
|
-
const
|
|
62358
|
+
const hourPart = Number(parts.find((part) => part.type === "hour")?.value);
|
|
61859
62359
|
const minute = Number(parts.find((part) => part.type === "minute")?.value);
|
|
62360
|
+
const hour = hourPart === 24 ? 0 : hourPart;
|
|
61860
62361
|
if (Number.isNaN(hour) || Number.isNaN(minute)) return NaN;
|
|
61861
62362
|
return hour * MINUTES_PER_HOUR + minute;
|
|
61862
62363
|
}
|
|
@@ -62288,45 +62789,11 @@ function groupEventsByDate(events2) {
|
|
|
62288
62789
|
}
|
|
62289
62790
|
return map2;
|
|
62290
62791
|
}
|
|
62291
|
-
function formatCompactCurrencyAmount(amount, currency) {
|
|
62292
|
-
return formatCourseCurrencyAmount(amount, currency, {
|
|
62293
|
-
minimumFractionDigits: 0,
|
|
62294
|
-
maximumFractionDigits: 2
|
|
62295
|
-
});
|
|
62296
|
-
}
|
|
62297
|
-
function formatCourseEventPriceDisplay(display) {
|
|
62298
|
-
if (display.kind !== "course") {
|
|
62299
|
-
return "Course";
|
|
62300
|
-
}
|
|
62301
|
-
if (display.display.kind === "exact" || display.display.kind === "from") {
|
|
62302
|
-
const amountLabel = formatCompactCurrencyAmount(
|
|
62303
|
-
display.display.amount,
|
|
62304
|
-
display.display.currency
|
|
62305
|
-
);
|
|
62306
|
-
return display.display.kind === "from" ? `Course (From ${amountLabel})` : `Course (${amountLabel})`;
|
|
62307
|
-
}
|
|
62308
|
-
return "Course";
|
|
62309
|
-
}
|
|
62310
|
-
function formatPublicEventPriceDisplay(display) {
|
|
62311
|
-
switch (display.kind) {
|
|
62312
|
-
case "free":
|
|
62313
|
-
return "Free";
|
|
62314
|
-
case "exact":
|
|
62315
|
-
return formatCompactCurrencyAmount(display.amount, display.currency);
|
|
62316
|
-
case "from":
|
|
62317
|
-
return `From ${formatCompactCurrencyAmount(display.amount, display.currency)}`;
|
|
62318
|
-
case "mixed":
|
|
62319
|
-
return `Free / From ${formatCompactCurrencyAmount(display.paidFromAmount, display.currency)}`;
|
|
62320
|
-
case "unavailable":
|
|
62321
|
-
return "Pricing unavailable";
|
|
62322
|
-
case "course":
|
|
62323
|
-
return formatCourseEventPriceDisplay(display);
|
|
62324
|
-
}
|
|
62325
|
-
}
|
|
62326
62792
|
function formatEventPrice(event) {
|
|
62327
|
-
return
|
|
62328
|
-
|
|
62329
|
-
|
|
62793
|
+
return formatEventPricing(resolveRuntimeEventPricing(event), { decimals: "auto" });
|
|
62794
|
+
}
|
|
62795
|
+
function formatEventPriceDisplay(pricing) {
|
|
62796
|
+
return formatEventPricing(pricing, { decimals: "auto" });
|
|
62330
62797
|
}
|
|
62331
62798
|
function resolveEventCta(event, buttonText) {
|
|
62332
62799
|
const { isFull: isSoldOut } = getEventAvailability(event);
|
|
@@ -63617,7 +64084,7 @@ var MediaNodeServer = ({
|
|
|
63617
64084
|
}
|
|
63618
64085
|
);
|
|
63619
64086
|
};
|
|
63620
|
-
function
|
|
64087
|
+
function MapPinIcon2({
|
|
63621
64088
|
className,
|
|
63622
64089
|
size: size4 = 16,
|
|
63623
64090
|
strokeWidth = 2
|
|
@@ -63643,7 +64110,7 @@ function MapPinIcon({
|
|
|
63643
64110
|
}
|
|
63644
64111
|
);
|
|
63645
64112
|
}
|
|
63646
|
-
function
|
|
64113
|
+
function CalendarIcon2({
|
|
63647
64114
|
className,
|
|
63648
64115
|
size: size4 = 16,
|
|
63649
64116
|
strokeWidth = 2
|
|
@@ -63732,7 +64199,7 @@ var EventCard = ({
|
|
|
63732
64199
|
),
|
|
63733
64200
|
/* @__PURE__ */ jsx("h3", { className: "card-title rb-mb-3", children: title }),
|
|
63734
64201
|
/* @__PURE__ */ jsx("div", { className: "rb-mb-2 rb-caption", children: /* @__PURE__ */ jsxs("div", { className: "rb-flex rb-items-center rb-gap-2", children: [
|
|
63735
|
-
/* @__PURE__ */ jsx(
|
|
64202
|
+
/* @__PURE__ */ jsx(CalendarIcon2, { className: "rb-shrink-0" }),
|
|
63736
64203
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
63737
64204
|
/* @__PURE__ */ jsx("time", { children: formattedDate }),
|
|
63738
64205
|
/* @__PURE__ */ jsx("p", { className: "rb-pl-6", children: formattedTime })
|
|
@@ -63740,7 +64207,7 @@ var EventCard = ({
|
|
|
63740
64207
|
] }) }),
|
|
63741
64208
|
showVenue && event.venue && /* @__PURE__ */ jsxs("div", { className: "rb-mb-3", children: [
|
|
63742
64209
|
/* @__PURE__ */ jsxs("div", { className: "rb-flex rb-items-center rb-gap-2 rb-caption", children: [
|
|
63743
|
-
/* @__PURE__ */ jsx(
|
|
64210
|
+
/* @__PURE__ */ jsx(MapPinIcon2, { className: "rb-shrink-0" }),
|
|
63744
64211
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
63745
64212
|
/* @__PURE__ */ jsx("strong", { children: event.venue.name }),
|
|
63746
64213
|
event.venue.address ? ` \xB7 ${event.venue.address}` : null
|
|
@@ -63829,7 +64296,7 @@ var EventCompactRow = ({
|
|
|
63829
64296
|
/* @__PURE__ */ jsx("h3", { className: "event-compact-row-title", children: event.title }),
|
|
63830
64297
|
/* @__PURE__ */ jsxs("div", { className: "event-compact-row-meta", children: [
|
|
63831
64298
|
event.venue && /* @__PURE__ */ jsxs("span", { className: "event-compact-row-venue", children: [
|
|
63832
|
-
/* @__PURE__ */ jsx(
|
|
64299
|
+
/* @__PURE__ */ jsx(MapPinIcon2, { className: "rb-shrink-0" }),
|
|
63833
64300
|
event.venue.name
|
|
63834
64301
|
] }),
|
|
63835
64302
|
teacherLine && /* @__PURE__ */ jsx("span", { className: "event-compact-row-teacher", children: teacherLine }),
|
|
@@ -63838,13 +64305,13 @@ var EventCompactRow = ({
|
|
|
63838
64305
|
] }),
|
|
63839
64306
|
/* @__PURE__ */ jsxs("div", { className: "event-compact-row-action", children: [
|
|
63840
64307
|
/* @__PURE__ */ jsxs("span", { className: "event-compact-row-datetime", children: [
|
|
63841
|
-
/* @__PURE__ */ jsx(
|
|
64308
|
+
/* @__PURE__ */ jsx(ClockIcon, { "aria-hidden": "true" }),
|
|
63842
64309
|
formattedTime,
|
|
63843
64310
|
/* @__PURE__ */ jsx("span", { className: "event-compact-row-action-price", children: price })
|
|
63844
64311
|
] }),
|
|
63845
64312
|
cta.hidden ? /* @__PURE__ */ jsx("span", { className: "event-compact-row-status", children: cta.label }) : /* @__PURE__ */ jsxs("a", { href: cta.href, className: `${buttonClass} event-compact-row-cta`, children: [
|
|
63846
64313
|
/* @__PURE__ */ jsx("span", { children: cta.label }),
|
|
63847
|
-
/* @__PURE__ */ jsx(
|
|
64314
|
+
/* @__PURE__ */ jsx(ArrowRightIcon, { "aria-hidden": "true" })
|
|
63848
64315
|
] })
|
|
63849
64316
|
] })
|
|
63850
64317
|
] })
|
|
@@ -65522,12 +65989,12 @@ function preferredPathsForSource(source) {
|
|
|
65522
65989
|
case "performance":
|
|
65523
65990
|
return ["/performances", "/performance"];
|
|
65524
65991
|
default:
|
|
65525
|
-
return
|
|
65992
|
+
return assertNever(source.preset, "Unhandled offerings preview event preset");
|
|
65526
65993
|
}
|
|
65527
65994
|
case "course":
|
|
65528
65995
|
return ["/courses", "/course"];
|
|
65529
65996
|
default:
|
|
65530
|
-
return
|
|
65997
|
+
return assertNever(source, "Unhandled offerings preview source");
|
|
65531
65998
|
}
|
|
65532
65999
|
}
|
|
65533
66000
|
function normalizeRoutePath(value) {
|
|
@@ -67653,10 +68120,7 @@ function resolveSelectedProduct(products, contentEntry, productSlug) {
|
|
|
67653
68120
|
|
|
67654
68121
|
// ../blocks/src/system/runtime/nodes/commerce/shared/display.ts
|
|
67655
68122
|
function formatCommercePrice(cents, currency) {
|
|
67656
|
-
return
|
|
67657
|
-
style: "currency",
|
|
67658
|
-
currency: currency.toUpperCase()
|
|
67659
|
-
}).format(cents / 100);
|
|
68123
|
+
return formatCurrencyAmount(cents, currency);
|
|
67660
68124
|
}
|
|
67661
68125
|
function getPassesHeading(passes, explicitHeading) {
|
|
67662
68126
|
if (explicitHeading) return explicitHeading;
|
|
@@ -69130,6 +69594,60 @@ var giftingBlockDefinition = {
|
|
|
69130
69594
|
}
|
|
69131
69595
|
};
|
|
69132
69596
|
|
|
69597
|
+
// ../blocks/src/system/blocks/newsletter-signup-destination.ts
|
|
69598
|
+
function parseNewsletterSignupBlockId(value) {
|
|
69599
|
+
const trimmed = parseTrimmedString(value);
|
|
69600
|
+
return trimmed && BLOCK_ID_PATTERN.test(trimmed) ? trimmed : null;
|
|
69601
|
+
}
|
|
69602
|
+
function parseSignedNewsletterDestinationRef(value) {
|
|
69603
|
+
const trimmed = parseTrimmedString(value);
|
|
69604
|
+
return trimmed && SIGNED_DESTINATION_REF_PATTERN.test(trimmed) ? trimmed : null;
|
|
69605
|
+
}
|
|
69606
|
+
function parseNewsletterSignupDestinationProvider(value) {
|
|
69607
|
+
return value === "riverbank" || value === "mailchimp" ? value : null;
|
|
69608
|
+
}
|
|
69609
|
+
function buildNewsletterSignupBlockRef(blockId) {
|
|
69610
|
+
const parsed = parseNewsletterSignupBlockId(blockId);
|
|
69611
|
+
return parsed ? { tag: "block_ref", blockId: parsed } : null;
|
|
69612
|
+
}
|
|
69613
|
+
function normalizeNewsletterSignupEditorValuesForDestination(values) {
|
|
69614
|
+
const destinationProvider = parseNewsletterSignupDestinationProvider(values.destinationProvider) ?? "riverbank";
|
|
69615
|
+
if (destinationProvider === "mailchimp") {
|
|
69616
|
+
return {
|
|
69617
|
+
destinationProvider,
|
|
69618
|
+
mailchimpAudienceId: values.mailchimpAudienceId,
|
|
69619
|
+
mailchimpTags: values.mailchimpTags
|
|
69620
|
+
};
|
|
69621
|
+
}
|
|
69622
|
+
return {
|
|
69623
|
+
destinationProvider,
|
|
69624
|
+
listId: values.listId,
|
|
69625
|
+
tags: values.tags
|
|
69626
|
+
};
|
|
69627
|
+
}
|
|
69628
|
+
function deriveNewsletterSignupRuntimeSource(values) {
|
|
69629
|
+
const normalized = normalizeNewsletterSignupEditorValuesForDestination(values);
|
|
69630
|
+
if (normalized.destinationProvider === "mailchimp") {
|
|
69631
|
+
return {
|
|
69632
|
+
destinationProvider: "mailchimp",
|
|
69633
|
+
listId: null,
|
|
69634
|
+
tags: null
|
|
69635
|
+
};
|
|
69636
|
+
}
|
|
69637
|
+
return {
|
|
69638
|
+
destinationProvider: "riverbank",
|
|
69639
|
+
listId: parseTrimmedString(normalized.listId),
|
|
69640
|
+
tags: parseTrimmedString(normalized.tags)
|
|
69641
|
+
};
|
|
69642
|
+
}
|
|
69643
|
+
var BLOCK_ID_PATTERN = /^[A-Za-z0-9._:-]{1,200}$/;
|
|
69644
|
+
var SIGNED_DESTINATION_REF_PATTERN = /^[A-Za-z0-9._~-]{16,1000}$/;
|
|
69645
|
+
function parseTrimmedString(value) {
|
|
69646
|
+
if (typeof value !== "string") return null;
|
|
69647
|
+
const trimmed = value.trim();
|
|
69648
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
69649
|
+
}
|
|
69650
|
+
|
|
69133
69651
|
// ../blocks/src/system/runtime/nodes/newsletter-form.types.ts
|
|
69134
69652
|
function getPresetFields(preset2, options) {
|
|
69135
69653
|
const includePhone = Boolean(options?.includePhone);
|
|
@@ -69182,6 +69700,7 @@ function withOptionalPhone(fields3, includePhone) {
|
|
|
69182
69700
|
|
|
69183
69701
|
// ../blocks/src/system/runtime/nodes/newsletter-form.interactive.ts
|
|
69184
69702
|
var newsletterPresetSchema = z.enum(["emailOnly", "emailName", "emailFirstLast", "emailNameCompany"]);
|
|
69703
|
+
var newsletterDestinationProviderSchema = z.enum(["riverbank", "mailchimp"]);
|
|
69185
69704
|
var newsletterFieldSchema = z.object({
|
|
69186
69705
|
id: z.string(),
|
|
69187
69706
|
type: z.enum(["email", "text"]),
|
|
@@ -69189,10 +69708,24 @@ var newsletterFieldSchema = z.object({
|
|
|
69189
69708
|
required: z.boolean(),
|
|
69190
69709
|
placeholder: z.string().optional()
|
|
69191
69710
|
});
|
|
69711
|
+
var newsletterSignupBlockIdSchema = z.string().trim().min(1).transform(parseRequiredNewsletterSignupBlockId);
|
|
69712
|
+
var signedNewsletterDestinationRefSchema = z.string().trim().min(1).transform(parseRequiredSignedNewsletterDestinationRef);
|
|
69713
|
+
var newsletterPublicDestinationRefSchema = z.discriminatedUnion("tag", [
|
|
69714
|
+
z.object({
|
|
69715
|
+
tag: z.literal("block_ref"),
|
|
69716
|
+
blockId: newsletterSignupBlockIdSchema
|
|
69717
|
+
}),
|
|
69718
|
+
z.object({
|
|
69719
|
+
tag: z.literal("signed_destination_ref"),
|
|
69720
|
+
token: signedNewsletterDestinationRefSchema
|
|
69721
|
+
})
|
|
69722
|
+
]);
|
|
69192
69723
|
var newsletterSourceSchema = z.object({
|
|
69724
|
+
blockId: z.string().nullable().optional(),
|
|
69193
69725
|
siteId: z.string().optional(),
|
|
69194
69726
|
apiBaseUrl: z.string().optional(),
|
|
69195
69727
|
listId: z.string().nullable().optional(),
|
|
69728
|
+
destinationProvider: newsletterDestinationProviderSchema.nullable().optional(),
|
|
69196
69729
|
preset: newsletterPresetSchema.optional(),
|
|
69197
69730
|
includePhone: z.boolean().optional(),
|
|
69198
69731
|
buttonLabel: z.string().nullable().optional(),
|
|
@@ -69211,6 +69744,7 @@ var newsletterDisplaySchema = z.object({
|
|
|
69211
69744
|
fields: z.array(newsletterFieldSchema)
|
|
69212
69745
|
});
|
|
69213
69746
|
var newsletterHydrationSchema = z.object({
|
|
69747
|
+
destinationRef: newsletterPublicDestinationRefSchema.nullable().optional(),
|
|
69214
69748
|
listId: z.string().nullable().optional(),
|
|
69215
69749
|
preset: newsletterPresetSchema,
|
|
69216
69750
|
includePhone: z.boolean(),
|
|
@@ -69243,16 +69777,20 @@ var newsletterFormBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
69243
69777
|
source: createZodCodec(newsletterSourceSchema),
|
|
69244
69778
|
render: createZodCodec(newsletterRenderSchema)
|
|
69245
69779
|
},
|
|
69246
|
-
buildRender: (source) =>
|
|
69247
|
-
|
|
69248
|
-
|
|
69249
|
-
|
|
69250
|
-
|
|
69251
|
-
|
|
69252
|
-
|
|
69253
|
-
|
|
69254
|
-
|
|
69255
|
-
|
|
69780
|
+
buildRender: (source) => {
|
|
69781
|
+
const runtimeSource = deriveNewsletterSignupRuntimeSource(source);
|
|
69782
|
+
return {
|
|
69783
|
+
display: buildNewsletterDisplay(source),
|
|
69784
|
+
hydration: {
|
|
69785
|
+
destinationRef: buildNewsletterSignupBlockRef(source.blockId),
|
|
69786
|
+
listId: runtimeSource.listId,
|
|
69787
|
+
preset: source.preset ?? "emailOnly",
|
|
69788
|
+
includePhone: source.includePhone ?? false,
|
|
69789
|
+
tags: runtimeSource.tags,
|
|
69790
|
+
spamProtectionEnabled: source.spamProtectionEnabled
|
|
69791
|
+
}
|
|
69792
|
+
};
|
|
69793
|
+
}
|
|
69256
69794
|
});
|
|
69257
69795
|
function buildNewsletterFormInteractiveIslandProps(props2) {
|
|
69258
69796
|
return buildInteractiveIslandProps({
|
|
@@ -69265,6 +69803,20 @@ function buildNewsletterFormInteractiveIslandProps(props2) {
|
|
|
69265
69803
|
source: props2
|
|
69266
69804
|
});
|
|
69267
69805
|
}
|
|
69806
|
+
function parseRequiredNewsletterSignupBlockId(value) {
|
|
69807
|
+
const parsed = parseNewsletterSignupBlockId(value);
|
|
69808
|
+
if (!parsed) {
|
|
69809
|
+
throw new Error("Newsletter signup block destination ref requires blockId");
|
|
69810
|
+
}
|
|
69811
|
+
return parsed;
|
|
69812
|
+
}
|
|
69813
|
+
function parseRequiredSignedNewsletterDestinationRef(value) {
|
|
69814
|
+
const parsed = parseSignedNewsletterDestinationRef(value);
|
|
69815
|
+
if (!parsed) {
|
|
69816
|
+
throw new Error("Newsletter signup signed destination ref requires token");
|
|
69817
|
+
}
|
|
69818
|
+
return parsed;
|
|
69819
|
+
}
|
|
69268
69820
|
|
|
69269
69821
|
// ../blocks/src/system/blocks/newsletter-signup.ts
|
|
69270
69822
|
var stackedComposition = composeFragments([
|
|
@@ -71463,7 +72015,7 @@ function resolveLinkedContentEditSupport(contentType) {
|
|
|
71463
72015
|
case "unsupported-domain-backed":
|
|
71464
72016
|
return { kind: "unsupported-domain-backed", reason: metadata.reason };
|
|
71465
72017
|
default:
|
|
71466
|
-
return
|
|
72018
|
+
return assertNever(metadata);
|
|
71467
72019
|
}
|
|
71468
72020
|
}
|
|
71469
72021
|
function contentTypeKeyToLabel(key) {
|
|
@@ -71876,6 +72428,8 @@ function renderDoc(node, key, imageResolveContext) {
|
|
|
71876
72428
|
return /* @__PURE__ */ jsx("blockquote", { children }, key);
|
|
71877
72429
|
case "horizontalRule":
|
|
71878
72430
|
return /* @__PURE__ */ jsx("hr", {}, key);
|
|
72431
|
+
case "hardBreak":
|
|
72432
|
+
return /* @__PURE__ */ jsx("br", {}, key);
|
|
71879
72433
|
case "image": {
|
|
71880
72434
|
const attrs = node.attrs ?? {};
|
|
71881
72435
|
const src = typeof attrs.src === "string" ? attrs.src.trim() : "";
|
|
@@ -71928,104 +72482,12 @@ function Text({
|
|
|
71928
72482
|
const dataAttributes = path ? { "data-builder-text": path } : void 0;
|
|
71929
72483
|
return /* @__PURE__ */ jsx(Comp, { className, ...dataAttributes, children });
|
|
71930
72484
|
}
|
|
71931
|
-
var TipTapMarkSchema = z.object({
|
|
71932
|
-
type: z.string(),
|
|
71933
|
-
attrs: z.record(z.string(), z.unknown()).optional()
|
|
71934
|
-
});
|
|
71935
|
-
var TipTapNodeSchema = z.lazy(
|
|
71936
|
-
() => z.object({
|
|
71937
|
-
type: z.string(),
|
|
71938
|
-
content: z.array(TipTapNodeSchema).optional(),
|
|
71939
|
-
text: z.string().optional(),
|
|
71940
|
-
attrs: z.record(z.string(), z.unknown()).optional(),
|
|
71941
|
-
marks: z.array(TipTapMarkSchema).optional()
|
|
71942
|
-
})
|
|
71943
|
-
);
|
|
71944
|
-
var RichTextValueSchema = z.union([
|
|
71945
|
-
// Canonical: TipTap document directly
|
|
71946
|
-
TipTapNodeSchema,
|
|
71947
|
-
// Legacy (read-tolerance only): wrapped in { doc: {...} }
|
|
71948
|
-
z.object({
|
|
71949
|
-
doc: TipTapNodeSchema
|
|
71950
|
-
})
|
|
71951
|
-
]);
|
|
71952
|
-
z.object({
|
|
71953
|
-
type: z.literal("doc"),
|
|
71954
|
-
content: z.array(TipTapNodeSchema)
|
|
71955
|
-
});
|
|
71956
|
-
function unwrapRichTextRoot(value) {
|
|
71957
|
-
if (!isRecord4(value)) return value;
|
|
71958
|
-
if (!("doc" in value)) return value;
|
|
71959
|
-
const inner = value.doc;
|
|
71960
|
-
if (isRecord4(inner) && inner.type === "doc") return inner;
|
|
71961
|
-
return value;
|
|
71962
|
-
}
|
|
71963
|
-
function buildRichTextSchema(options) {
|
|
71964
|
-
let schema = RichTextValueSchema;
|
|
71965
|
-
if (options?.required) {
|
|
71966
|
-
const label = options.label ?? "This field";
|
|
71967
|
-
schema = schema.refine(
|
|
71968
|
-
(val) => {
|
|
71969
|
-
const doc3 = isRecord4(val) && "doc" in val ? val.doc : val;
|
|
71970
|
-
const content = isRecord4(doc3) ? doc3.content : void 0;
|
|
71971
|
-
if (!Array.isArray(content) || content.length === 0) return false;
|
|
71972
|
-
const first2 = content[0];
|
|
71973
|
-
if (content.length === 1 && isRecord4(first2) && first2.type === "paragraph" && (!("content" in first2) || first2.content == null)) {
|
|
71974
|
-
return false;
|
|
71975
|
-
}
|
|
71976
|
-
return true;
|
|
71977
|
-
},
|
|
71978
|
-
{
|
|
71979
|
-
message: `${label} is required`
|
|
71980
|
-
}
|
|
71981
|
-
);
|
|
71982
|
-
}
|
|
71983
|
-
return schema;
|
|
71984
|
-
}
|
|
71985
72485
|
|
|
71986
72486
|
// ../blocks/src/system/runtime/nodes/richText-coerce.ts
|
|
71987
|
-
function parseInlineMarkdown(text2) {
|
|
71988
|
-
const out = [];
|
|
71989
|
-
const pushText = (value, marks) => {
|
|
71990
|
-
if (!value) return;
|
|
71991
|
-
out.push(
|
|
71992
|
-
marks && marks.length > 0 ? { type: "text", text: value, marks } : { type: "text", text: value }
|
|
71993
|
-
);
|
|
71994
|
-
};
|
|
71995
|
-
let rest = text2;
|
|
71996
|
-
while (rest.length > 0) {
|
|
71997
|
-
const start = rest.indexOf("**");
|
|
71998
|
-
if (start === -1) {
|
|
71999
|
-
pushText(rest);
|
|
72000
|
-
break;
|
|
72001
|
-
}
|
|
72002
|
-
const end = rest.indexOf("**", start + 2);
|
|
72003
|
-
if (end === -1) {
|
|
72004
|
-
pushText(rest);
|
|
72005
|
-
break;
|
|
72006
|
-
}
|
|
72007
|
-
pushText(rest.slice(0, start));
|
|
72008
|
-
pushText(rest.slice(start + 2, end), [{ type: "bold" }]);
|
|
72009
|
-
rest = rest.slice(end + 2);
|
|
72010
|
-
}
|
|
72011
|
-
return out;
|
|
72012
|
-
}
|
|
72013
|
-
function markdownToTipTapDoc(markdown) {
|
|
72014
|
-
const normalized = markdown.replace(/\r\n/g, "\n").trim();
|
|
72015
|
-
if (!normalized) return { type: "doc", content: [] };
|
|
72016
|
-
const paragraphs = normalized.split(/\n{2,}/).map((p2) => p2.trim()).filter(Boolean);
|
|
72017
|
-
return {
|
|
72018
|
-
type: "doc",
|
|
72019
|
-
content: paragraphs.map((p2) => {
|
|
72020
|
-
const inline4 = parseInlineMarkdown(p2);
|
|
72021
|
-
return inline4.length > 0 ? { type: "paragraph", content: inline4 } : { type: "paragraph" };
|
|
72022
|
-
})
|
|
72023
|
-
};
|
|
72024
|
-
}
|
|
72025
72487
|
function coerceRichTextDoc(value) {
|
|
72026
72488
|
const raw = unwrapRichTextRoot(value);
|
|
72027
72489
|
if (typeof raw === "string") {
|
|
72028
|
-
return
|
|
72490
|
+
return createRichTextDocFromMarkdown(raw);
|
|
72029
72491
|
}
|
|
72030
72492
|
if (isRecord4(raw) && typeof raw.type === "string") {
|
|
72031
72493
|
return raw;
|
|
@@ -72150,26 +72612,26 @@ var CTA_ICON_NAMES = [
|
|
|
72150
72612
|
"X"
|
|
72151
72613
|
];
|
|
72152
72614
|
var CTA_ICON_COMPONENTS = {
|
|
72153
|
-
ArrowRight,
|
|
72154
|
-
ArrowLeft,
|
|
72155
|
-
ChevronRight,
|
|
72156
|
-
ChevronLeft,
|
|
72157
|
-
ChevronUp,
|
|
72158
|
-
ChevronDown,
|
|
72159
|
-
ExternalLink,
|
|
72160
|
-
Download,
|
|
72161
|
-
Upload,
|
|
72162
|
-
Mail,
|
|
72163
|
-
Phone,
|
|
72164
|
-
Play,
|
|
72165
|
-
ShoppingCart,
|
|
72166
|
-
Calendar,
|
|
72167
|
-
MapPin,
|
|
72168
|
-
Info,
|
|
72169
|
-
Plus,
|
|
72170
|
-
Minus,
|
|
72171
|
-
Check,
|
|
72172
|
-
X
|
|
72615
|
+
ArrowRight: ArrowRightIcon,
|
|
72616
|
+
ArrowLeft: ArrowLeftIcon,
|
|
72617
|
+
ChevronRight: ChevronRightIcon,
|
|
72618
|
+
ChevronLeft: ChevronLeftIcon,
|
|
72619
|
+
ChevronUp: ChevronUpIcon,
|
|
72620
|
+
ChevronDown: ChevronDownIcon,
|
|
72621
|
+
ExternalLink: ExternalLinkIcon,
|
|
72622
|
+
Download: DownloadIcon,
|
|
72623
|
+
Upload: UploadIcon,
|
|
72624
|
+
Mail: MailIcon,
|
|
72625
|
+
Phone: PhoneIcon,
|
|
72626
|
+
Play: PlayIcon,
|
|
72627
|
+
ShoppingCart: ShoppingCartIcon,
|
|
72628
|
+
Calendar: CalendarIcon,
|
|
72629
|
+
MapPin: MapPinIcon,
|
|
72630
|
+
Info: InfoIcon,
|
|
72631
|
+
Plus: PlusIcon,
|
|
72632
|
+
Minus: MinusIcon,
|
|
72633
|
+
Check: CheckIcon,
|
|
72634
|
+
X: XIcon
|
|
72173
72635
|
};
|
|
72174
72636
|
function isCtaIconName(value) {
|
|
72175
72637
|
return typeof value === "string" && CTA_ICON_NAMES.includes(value);
|
|
@@ -72324,13 +72786,13 @@ function displayFilename(value) {
|
|
|
72324
72786
|
function iconForMediaType(type) {
|
|
72325
72787
|
switch (type) {
|
|
72326
72788
|
case "audio":
|
|
72327
|
-
return /* @__PURE__ */ jsx(
|
|
72789
|
+
return /* @__PURE__ */ jsx(FileAudioIcon, { "aria-hidden": "true", size: 24 });
|
|
72328
72790
|
case "document":
|
|
72329
|
-
return /* @__PURE__ */ jsx(
|
|
72791
|
+
return /* @__PURE__ */ jsx(FileTextIcon, { "aria-hidden": "true", size: 24 });
|
|
72330
72792
|
case "spreadsheet":
|
|
72331
|
-
return /* @__PURE__ */ jsx(
|
|
72793
|
+
return /* @__PURE__ */ jsx(FileSpreadsheetIcon, { "aria-hidden": "true", size: 24 });
|
|
72332
72794
|
case "archive":
|
|
72333
|
-
return /* @__PURE__ */ jsx(
|
|
72795
|
+
return /* @__PURE__ */ jsx(FileArchiveIcon, { "aria-hidden": "true", size: 24 });
|
|
72334
72796
|
}
|
|
72335
72797
|
}
|
|
72336
72798
|
function normalizeButtonVariant(value) {
|
|
@@ -72400,7 +72862,7 @@ function FileDownloadNode({
|
|
|
72400
72862
|
extraClassName: "rb-inline-flex rb-shrink-0 rb-items-center rb-justify-center rb-gap-2"
|
|
72401
72863
|
}),
|
|
72402
72864
|
children: [
|
|
72403
|
-
/* @__PURE__ */ jsx(
|
|
72865
|
+
/* @__PURE__ */ jsx(DownloadIcon, { "aria-hidden": "true", size: 24 }),
|
|
72404
72866
|
label
|
|
72405
72867
|
]
|
|
72406
72868
|
}
|
|
@@ -72836,12 +73298,12 @@ function assertNever7(value) {
|
|
|
72836
73298
|
throw new Error(`Unhandled accordion icon set: ${String(value)}`);
|
|
72837
73299
|
}
|
|
72838
73300
|
var ACCORDION_ICONS = {
|
|
72839
|
-
Plus,
|
|
72840
|
-
Minus,
|
|
72841
|
-
ChevronDown,
|
|
72842
|
-
ArrowDown,
|
|
72843
|
-
CirclePlus,
|
|
72844
|
-
CircleMinus
|
|
73301
|
+
Plus: PlusIcon,
|
|
73302
|
+
Minus: MinusIcon,
|
|
73303
|
+
ChevronDown: ChevronDownIcon,
|
|
73304
|
+
ArrowDown: ArrowDownIcon,
|
|
73305
|
+
CirclePlus: CirclePlusIcon,
|
|
73306
|
+
CircleMinus: CircleMinusIcon
|
|
72845
73307
|
};
|
|
72846
73308
|
var AccordionNodeSSR = ({
|
|
72847
73309
|
blockId,
|
|
@@ -74022,6 +74484,32 @@ function TeamMemberName({
|
|
|
74022
74484
|
}) {
|
|
74023
74485
|
return profilePath ? /* @__PURE__ */ jsx("a", { href: profilePath, className: "rb-hover-opacity-80", children: /* @__PURE__ */ jsx("strong", { children: name }) }) : /* @__PURE__ */ jsx("strong", { children: name });
|
|
74024
74486
|
}
|
|
74487
|
+
function formatTicketTypePrice(ticketType, currency) {
|
|
74488
|
+
return formatCurrencyAmount(ticketType.priceAmount, currency, { decimals: "auto" });
|
|
74489
|
+
}
|
|
74490
|
+
function getActiveTicketTypes(event) {
|
|
74491
|
+
return event.pricing.kind === "ticket_types" ? event.pricing.ticketTypes.filter((ticketType) => ticketType.isActive).sort((left, right) => left.sortOrder - right.sortOrder) : [];
|
|
74492
|
+
}
|
|
74493
|
+
function TicketTypePriceList({
|
|
74494
|
+
ticketTypes,
|
|
74495
|
+
currency
|
|
74496
|
+
}) {
|
|
74497
|
+
if (ticketTypes.length === 0) return null;
|
|
74498
|
+
return /* @__PURE__ */ jsx("div", { className: "rb-mt-3 rb-flex rb-flex-col rb-gap-2", children: ticketTypes.map((ticketType) => /* @__PURE__ */ jsxs(
|
|
74499
|
+
"div",
|
|
74500
|
+
{
|
|
74501
|
+
className: "rb-flex rb-items-start rb-justify-between rb-gap-4",
|
|
74502
|
+
children: [
|
|
74503
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
74504
|
+
/* @__PURE__ */ jsx("p", { children: ticketType.name }),
|
|
74505
|
+
ticketType.description ? /* @__PURE__ */ jsx("p", { className: "rb-caption status-muted", children: ticketType.description }) : null
|
|
74506
|
+
] }),
|
|
74507
|
+
/* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: formatTicketTypePrice(ticketType, currency) }) })
|
|
74508
|
+
]
|
|
74509
|
+
},
|
|
74510
|
+
ticketType.id
|
|
74511
|
+
)) });
|
|
74512
|
+
}
|
|
74025
74513
|
function EventDetailsView({
|
|
74026
74514
|
selection,
|
|
74027
74515
|
showVenue,
|
|
@@ -74056,6 +74544,7 @@ function EventDetailsView({
|
|
|
74056
74544
|
const shouldShowCoursePricing = showCost && !isDropIn && coursePricing !== null;
|
|
74057
74545
|
const shouldShowEventCost = showCost && isPaid && !isDropIn && coursePricing === null;
|
|
74058
74546
|
const eventCostLabel = shouldShowEventCost ? formatEventPrice(selected) : null;
|
|
74547
|
+
const ticketTypes = shouldShowEventCost ? getActiveTicketTypes(selected) : [];
|
|
74059
74548
|
const acceptedItems = [];
|
|
74060
74549
|
if (showAcceptedPasses) {
|
|
74061
74550
|
acceptedItems.push(...applicablePasses.map((p2) => p2.name));
|
|
@@ -74112,6 +74601,7 @@ function EventDetailsView({
|
|
|
74112
74601
|
/* @__PURE__ */ jsx("div", { className: "rb-label rb-mb-2", children: "Cost" }),
|
|
74113
74602
|
/* @__PURE__ */ jsx("p", { children: /* @__PURE__ */ jsx("strong", { children: eventCostLabel }) }),
|
|
74114
74603
|
autoApplyDiscount ? /* @__PURE__ */ jsx("p", { className: "rb-caption rb-mt-1", children: formatAutoApplyDiscountLine(autoApplyDiscount, eventPricingCurrency) }) : null,
|
|
74604
|
+
/* @__PURE__ */ jsx(TicketTypePriceList, { ticketTypes, currency: eventPricingCurrency }),
|
|
74115
74605
|
hasAcceptedItems ? /* @__PURE__ */ jsxs("p", { className: "rb-caption rb-mt-1", children: [
|
|
74116
74606
|
"You can also attend with: ",
|
|
74117
74607
|
acceptedItems.join(", ")
|
|
@@ -74989,7 +75479,7 @@ function OfferingsPreviewNode(props2) {
|
|
|
74989
75479
|
),
|
|
74990
75480
|
blockCta ? /* @__PURE__ */ jsx("footer", { className: "offerings-preview-footer rb-flex rb-justify-center", children: /* @__PURE__ */ jsxs("a", { className: blockLinkClass, href: blockCta.href, children: [
|
|
74991
75481
|
/* @__PURE__ */ jsx("span", { children: blockCta.label }),
|
|
74992
|
-
/* @__PURE__ */ jsx(
|
|
75482
|
+
/* @__PURE__ */ jsx(ArrowRightIcon, { "aria-hidden": "true", className: "offerings-preview-link-icon rb-h-4 rb-w-4" })
|
|
74993
75483
|
] }) }) : null
|
|
74994
75484
|
]
|
|
74995
75485
|
}
|
|
@@ -76166,6 +76656,7 @@ function EventRegistrationSSR({
|
|
|
76166
76656
|
successMessage,
|
|
76167
76657
|
waitlistMessage,
|
|
76168
76658
|
buttonVariant,
|
|
76659
|
+
overlayEnabled,
|
|
76169
76660
|
spamProtectionEnabled,
|
|
76170
76661
|
stage,
|
|
76171
76662
|
supportEmail,
|
|
@@ -76187,6 +76678,7 @@ function EventRegistrationSSR({
|
|
|
76187
76678
|
successMessage,
|
|
76188
76679
|
waitlistMessage,
|
|
76189
76680
|
buttonVariant,
|
|
76681
|
+
overlayEnabled,
|
|
76190
76682
|
spamProtectionEnabled,
|
|
76191
76683
|
stage,
|
|
76192
76684
|
supportEmail
|
|
@@ -76442,6 +76934,7 @@ function NewsletterFormSSR({
|
|
|
76442
76934
|
siteId,
|
|
76443
76935
|
apiBaseUrl,
|
|
76444
76936
|
listId,
|
|
76937
|
+
destinationProvider,
|
|
76445
76938
|
preset: preset2 = "emailOnly",
|
|
76446
76939
|
includePhone,
|
|
76447
76940
|
buttonLabel = "Subscribe",
|
|
@@ -76452,9 +76945,11 @@ function NewsletterFormSSR({
|
|
|
76452
76945
|
className
|
|
76453
76946
|
}) {
|
|
76454
76947
|
const islandProps = buildNewsletterFormInteractiveIslandProps({
|
|
76948
|
+
blockId,
|
|
76455
76949
|
siteId,
|
|
76456
76950
|
apiBaseUrl,
|
|
76457
76951
|
listId,
|
|
76952
|
+
destinationProvider,
|
|
76458
76953
|
preset: preset2,
|
|
76459
76954
|
includePhone,
|
|
76460
76955
|
buttonLabel,
|
|
@@ -76909,7 +77404,7 @@ function previewEditableTargetToPath(target) {
|
|
|
76909
77404
|
case "read-only":
|
|
76910
77405
|
return void 0;
|
|
76911
77406
|
default:
|
|
76912
|
-
return
|
|
77407
|
+
return assertNever(target);
|
|
76913
77408
|
}
|
|
76914
77409
|
}
|
|
76915
77410
|
function previewEditableTargetFieldConstraints(target, context) {
|
|
@@ -77811,7 +78306,7 @@ function collectNestedPreviewFieldConstraintEntries(field, path) {
|
|
|
77811
78306
|
case "url":
|
|
77812
78307
|
return [];
|
|
77813
78308
|
default:
|
|
77814
|
-
return
|
|
78309
|
+
return assertNever(field);
|
|
77815
78310
|
}
|
|
77816
78311
|
}
|
|
77817
78312
|
function makeDefaultBlockComponent(args) {
|
|
@@ -81857,7 +82352,7 @@ function sourceLabel(source) {
|
|
|
81857
82352
|
case "sdk-config":
|
|
81858
82353
|
return "SDK config";
|
|
81859
82354
|
default:
|
|
81860
|
-
return
|
|
82355
|
+
return assertNever(source);
|
|
81861
82356
|
}
|
|
81862
82357
|
}
|
|
81863
82358
|
function mergeBlockDescriptorsWithRegistry(systemBlocks, registry, onConflict) {
|
|
@@ -82242,6 +82737,7 @@ var MemoBlockSection = React61.memo(
|
|
|
82242
82737
|
apiBaseUrl: dataContext?.apiBaseUrl ?? null,
|
|
82243
82738
|
portalToken: dataContext?.portalToken ?? null,
|
|
82244
82739
|
bookingOfferingPresets: dataContext?.bookingOfferingPresets ?? [],
|
|
82740
|
+
eventRegistrationOverlayEnabled: dataContext?.eventRegistrationOverlayEnabled ?? false,
|
|
82245
82741
|
...routes ? { routes } : {},
|
|
82246
82742
|
// Identifier maps for CTA link resolution at render time
|
|
82247
82743
|
...dataContext?.pagesByIdentifier ? { pagesByIdentifier: dataContext.pagesByIdentifier } : {},
|
|
@@ -82382,7 +82878,7 @@ function foldSubroute(ctx, fold) {
|
|
|
82382
82878
|
case "course-run":
|
|
82383
82879
|
return fold["course-run"](ctx.run);
|
|
82384
82880
|
default:
|
|
82385
|
-
return
|
|
82881
|
+
return assertNever(ctx, "Unhandled subroute kind");
|
|
82386
82882
|
}
|
|
82387
82883
|
}
|
|
82388
82884
|
|
|
@@ -85674,6 +86170,7 @@ var containerResponsiveThemeCss = `/*
|
|
|
85674
86170
|
*/
|
|
85675
86171
|
|
|
85676
86172
|
:where(.theme-scope) :where([data-block="event-registration"]) {
|
|
86173
|
+
--rb-modal-overlay-bg: rgb(var(--tb-text, 0 0 0) / 0.6);
|
|
85677
86174
|
--rb-event-tile-bg: var(--er-event-card-bg);
|
|
85678
86175
|
--rb-event-tile-border: var(--er-border);
|
|
85679
86176
|
--rb-event-tile-border-width: var(--er-event-card-border-width);
|
|
@@ -87343,6 +87840,239 @@ var containerResponsiveThemeCss = `/*
|
|
|
87343
87840
|
background: rgba(var(--tb-text), 0.05);
|
|
87344
87841
|
}
|
|
87345
87842
|
|
|
87843
|
+
/* In-flow booking teaser (sits at the block's position in the page) */
|
|
87844
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-teaser {
|
|
87845
|
+
display: flex;
|
|
87846
|
+
flex-wrap: wrap;
|
|
87847
|
+
align-items: center;
|
|
87848
|
+
justify-content: space-between;
|
|
87849
|
+
gap: 1rem 1.5rem;
|
|
87850
|
+
padding: 1.25rem 1.5rem;
|
|
87851
|
+
border: 1px solid var(--er-border);
|
|
87852
|
+
border-radius: var(--rb-block-radius);
|
|
87853
|
+
background: var(--er-event-card-bg);
|
|
87854
|
+
color: var(--er-on-surface);
|
|
87855
|
+
}
|
|
87856
|
+
|
|
87857
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-teaser__info {
|
|
87858
|
+
display: flex;
|
|
87859
|
+
flex-direction: column;
|
|
87860
|
+
gap: 0.25rem;
|
|
87861
|
+
min-width: 0;
|
|
87862
|
+
}
|
|
87863
|
+
|
|
87864
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-teaser__title {
|
|
87865
|
+
font-size: 1.0625rem;
|
|
87866
|
+
font-weight: 700;
|
|
87867
|
+
line-height: 1.2;
|
|
87868
|
+
}
|
|
87869
|
+
|
|
87870
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-teaser__meta {
|
|
87871
|
+
font-size: 0.9375rem;
|
|
87872
|
+
line-height: 1.3;
|
|
87873
|
+
opacity: 0.75;
|
|
87874
|
+
}
|
|
87875
|
+
|
|
87876
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-teaser__tickets {
|
|
87877
|
+
display: flex;
|
|
87878
|
+
flex-direction: column;
|
|
87879
|
+
gap: 0.375rem;
|
|
87880
|
+
margin-top: 0.5rem;
|
|
87881
|
+
padding-top: 0.625rem;
|
|
87882
|
+
border-top: 1px solid var(--er-border);
|
|
87883
|
+
}
|
|
87884
|
+
|
|
87885
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-teaser__ticket {
|
|
87886
|
+
display: flex;
|
|
87887
|
+
align-items: baseline;
|
|
87888
|
+
justify-content: space-between;
|
|
87889
|
+
gap: 1rem;
|
|
87890
|
+
font-size: 0.9375rem;
|
|
87891
|
+
line-height: 1.35;
|
|
87892
|
+
}
|
|
87893
|
+
|
|
87894
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-teaser__ticket-name {
|
|
87895
|
+
min-width: 0;
|
|
87896
|
+
}
|
|
87897
|
+
|
|
87898
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-teaser__cta {
|
|
87899
|
+
flex: 0 0 auto;
|
|
87900
|
+
}
|
|
87901
|
+
|
|
87902
|
+
/* Fixed, full-width sticky booking bar (content-agnostic; sits above page flow) */
|
|
87903
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-bar {
|
|
87904
|
+
position: fixed;
|
|
87905
|
+
left: 0;
|
|
87906
|
+
right: 0;
|
|
87907
|
+
bottom: 0;
|
|
87908
|
+
z-index: 12000;
|
|
87909
|
+
padding: 0.75rem max(1rem, env(safe-area-inset-right)) max(0.75rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
|
|
87910
|
+
background: rgb(var(--tb-background));
|
|
87911
|
+
border-top: 1px solid var(--er-border);
|
|
87912
|
+
box-shadow: 0 -10px 30px rgba(var(--tb-shadow), 0.16);
|
|
87913
|
+
}
|
|
87914
|
+
|
|
87915
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-bar__inner {
|
|
87916
|
+
display: flex;
|
|
87917
|
+
align-items: center;
|
|
87918
|
+
justify-content: space-between;
|
|
87919
|
+
gap: 1rem;
|
|
87920
|
+
width: 100%;
|
|
87921
|
+
max-width: 72rem;
|
|
87922
|
+
margin-inline: auto;
|
|
87923
|
+
}
|
|
87924
|
+
|
|
87925
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-bar__info {
|
|
87926
|
+
display: flex;
|
|
87927
|
+
flex-direction: column;
|
|
87928
|
+
gap: 0.125rem;
|
|
87929
|
+
min-width: 0;
|
|
87930
|
+
}
|
|
87931
|
+
|
|
87932
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-bar__title {
|
|
87933
|
+
font-size: 0.95rem;
|
|
87934
|
+
font-weight: 700;
|
|
87935
|
+
line-height: 1.2;
|
|
87936
|
+
white-space: nowrap;
|
|
87937
|
+
overflow: hidden;
|
|
87938
|
+
text-overflow: ellipsis;
|
|
87939
|
+
}
|
|
87940
|
+
|
|
87941
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-bar__meta {
|
|
87942
|
+
font-size: 0.8125rem;
|
|
87943
|
+
line-height: 1.25;
|
|
87944
|
+
opacity: 0.75;
|
|
87945
|
+
white-space: nowrap;
|
|
87946
|
+
overflow: hidden;
|
|
87947
|
+
text-overflow: ellipsis;
|
|
87948
|
+
}
|
|
87949
|
+
|
|
87950
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-bar__cta {
|
|
87951
|
+
flex: 0 0 auto;
|
|
87952
|
+
}
|
|
87953
|
+
|
|
87954
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-overlay {
|
|
87955
|
+
position: fixed;
|
|
87956
|
+
inset: 0;
|
|
87957
|
+
height: 100dvh;
|
|
87958
|
+
z-index: 14000;
|
|
87959
|
+
display: flex;
|
|
87960
|
+
align-items: stretch;
|
|
87961
|
+
justify-content: stretch;
|
|
87962
|
+
background: var(--rb-modal-overlay-bg);
|
|
87963
|
+
}
|
|
87964
|
+
|
|
87965
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-overlay__panel {
|
|
87966
|
+
position: relative;
|
|
87967
|
+
z-index: 1;
|
|
87968
|
+
display: flex;
|
|
87969
|
+
flex-direction: column;
|
|
87970
|
+
width: 100%;
|
|
87971
|
+
height: 100dvh;
|
|
87972
|
+
min-height: 0;
|
|
87973
|
+
overflow: hidden;
|
|
87974
|
+
background: rgb(var(--tb-background));
|
|
87975
|
+
color: var(--er-on-surface);
|
|
87976
|
+
}
|
|
87977
|
+
|
|
87978
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-overlay__header {
|
|
87979
|
+
flex: 0 0 auto;
|
|
87980
|
+
z-index: 2;
|
|
87981
|
+
display: flex;
|
|
87982
|
+
align-items: center;
|
|
87983
|
+
justify-content: space-between;
|
|
87984
|
+
gap: 1rem;
|
|
87985
|
+
padding: 1rem;
|
|
87986
|
+
background: rgb(var(--tb-background));
|
|
87987
|
+
border-bottom: 1px solid var(--er-border);
|
|
87988
|
+
}
|
|
87989
|
+
|
|
87990
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-overlay__title {
|
|
87991
|
+
margin: 0;
|
|
87992
|
+
font-size: 1rem;
|
|
87993
|
+
line-height: 1.25;
|
|
87994
|
+
font-weight: 700;
|
|
87995
|
+
}
|
|
87996
|
+
|
|
87997
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-overlay__close {
|
|
87998
|
+
width: 2rem;
|
|
87999
|
+
height: 2rem;
|
|
88000
|
+
display: inline-flex;
|
|
88001
|
+
align-items: center;
|
|
88002
|
+
justify-content: center;
|
|
88003
|
+
border: 1px solid var(--er-border);
|
|
88004
|
+
border-radius: 999px;
|
|
88005
|
+
background: transparent;
|
|
88006
|
+
color: rgb(var(--tb-text));
|
|
88007
|
+
font-size: 1.25rem;
|
|
88008
|
+
line-height: 1;
|
|
88009
|
+
cursor: pointer;
|
|
88010
|
+
}
|
|
88011
|
+
|
|
88012
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-container--overlay {
|
|
88013
|
+
max-width: none;
|
|
88014
|
+
border: 0;
|
|
88015
|
+
border-radius: 0;
|
|
88016
|
+
padding: 0;
|
|
88017
|
+
background: transparent;
|
|
88018
|
+
display: flex;
|
|
88019
|
+
flex: 1 1 auto;
|
|
88020
|
+
min-height: 0;
|
|
88021
|
+
overflow: hidden;
|
|
88022
|
+
}
|
|
88023
|
+
|
|
88024
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-container--overlay .er-payment-layout {
|
|
88025
|
+
flex: 1 1 auto;
|
|
88026
|
+
min-height: 0;
|
|
88027
|
+
height: 100%;
|
|
88028
|
+
gap: 0;
|
|
88029
|
+
grid-template-rows: minmax(0, 1fr) auto;
|
|
88030
|
+
grid-template-areas:
|
|
88031
|
+
"main"
|
|
88032
|
+
"footer";
|
|
88033
|
+
}
|
|
88034
|
+
|
|
88035
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-container--overlay .er-payment-layout-main {
|
|
88036
|
+
min-height: 0;
|
|
88037
|
+
overflow: auto;
|
|
88038
|
+
padding: 1rem;
|
|
88039
|
+
}
|
|
88040
|
+
|
|
88041
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-container--overlay .er-payment-layout-footer {
|
|
88042
|
+
position: relative;
|
|
88043
|
+
z-index: 3;
|
|
88044
|
+
padding: 0.875rem 1rem max(0.875rem, env(safe-area-inset-bottom));
|
|
88045
|
+
background: rgb(var(--tb-background));
|
|
88046
|
+
border-top: 1px solid var(--er-border);
|
|
88047
|
+
box-shadow: 0 -12px 26px rgba(var(--tb-shadow), 0.12);
|
|
88048
|
+
}
|
|
88049
|
+
|
|
88050
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-container--overlay .er-actions {
|
|
88051
|
+
margin-top: 0;
|
|
88052
|
+
}
|
|
88053
|
+
|
|
88054
|
+
@container rb-site (min-width: 768px) {
|
|
88055
|
+
@scope ([data-rb-responsive-mode="container"]) to (:scope [data-rb-responsive-mode]) {
|
|
88056
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-overlay {
|
|
88057
|
+
justify-content: flex-end;
|
|
88058
|
+
}
|
|
88059
|
+
|
|
88060
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-overlay__panel {
|
|
88061
|
+
width: min(32rem, 100vw);
|
|
88062
|
+
min-height: 100%;
|
|
88063
|
+
box-shadow: -16px 0 40px rgba(var(--tb-shadow), 0.22);
|
|
88064
|
+
}
|
|
88065
|
+
|
|
88066
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-container--overlay .er-payment-layout-main {
|
|
88067
|
+
padding: 1.25rem;
|
|
88068
|
+
}
|
|
88069
|
+
|
|
88070
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-container--overlay .er-payment-layout-footer {
|
|
88071
|
+
padding: 0.875rem 1.25rem max(0.875rem, env(safe-area-inset-bottom));
|
|
88072
|
+
}
|
|
88073
|
+
}
|
|
88074
|
+
}
|
|
88075
|
+
|
|
87346
88076
|
/* Magic Link Form */
|
|
87347
88077
|
:where(.theme-scope) :where([data-block="event-registration"]) .er-magic-link-form {
|
|
87348
88078
|
display: flex;
|
|
@@ -90527,6 +91257,32 @@ var containerResponsiveThemeCss = `/*
|
|
|
90527
91257
|
/* Split grid: title column + cards. On desktop the title takes one quarter and
|
|
90528
91258
|
* the cards fill the remaining three quarters (so title + 3 cards each read as
|
|
90529
91259
|
* a quarter). Stacks on mobile. */
|
|
91260
|
+
:where(.theme-scope) :where([data-block="testimonials"]) .rb-testimonials-split-grid-heading,
|
|
91261
|
+
:where(.theme-scope) :where([data-block="testimonials"]) .rb-testimonials-split-grid-cards {
|
|
91262
|
+
min-width: 0;
|
|
91263
|
+
}
|
|
91264
|
+
|
|
91265
|
+
:where(.theme-scope) :where([data-block="testimonials"]) .rb-testimonials-split-grid-cards {
|
|
91266
|
+
container-type: inline-size;
|
|
91267
|
+
container-name: rb-testimonials-split-cards;
|
|
91268
|
+
}
|
|
91269
|
+
|
|
91270
|
+
:where(.theme-scope) :where([data-block="testimonials"]) .rb-testimonials-split-grid-card-list > .rb-grid {
|
|
91271
|
+
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
91272
|
+
}
|
|
91273
|
+
|
|
91274
|
+
@container rb-testimonials-split-cards (min-width: 36rem) {
|
|
91275
|
+
:where(.theme-scope) :where([data-block="testimonials"]) .rb-testimonials-split-grid-card-list > .rb-grid.rb-sm-grid-cols-2 {
|
|
91276
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
91277
|
+
}
|
|
91278
|
+
}
|
|
91279
|
+
|
|
91280
|
+
@container rb-testimonials-split-cards (min-width: 54rem) {
|
|
91281
|
+
:where(.theme-scope) :where([data-block="testimonials"]) .rb-testimonials-split-grid-card-list > .rb-grid.rb-lg-grid-cols-3 {
|
|
91282
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
91283
|
+
}
|
|
91284
|
+
}
|
|
91285
|
+
|
|
90530
91286
|
@container rb-site (min-width: 1024px) {
|
|
90531
91287
|
@scope ([data-rb-responsive-mode="container"]) to (:scope [data-rb-responsive-mode]) {
|
|
90532
91288
|
:where(.theme-scope) :where([data-block="testimonials"]) .rb-testimonials-split-grid {
|
|
@@ -125553,9 +126309,8 @@ function createBlockApi(config) {
|
|
|
125553
126309
|
name: data.name,
|
|
125554
126310
|
company: data.company,
|
|
125555
126311
|
phone: data.phone,
|
|
125556
|
-
|
|
126312
|
+
target: data.target,
|
|
125557
126313
|
tags: data.tags,
|
|
125558
|
-
blockId: data.blockId,
|
|
125559
126314
|
meta: data.meta
|
|
125560
126315
|
}
|
|
125561
126316
|
});
|
|
@@ -125998,6 +126753,74 @@ function useVisibleTabPolling({
|
|
|
125998
126753
|
}, [enabled, intervalMs, jitterMs, minVisibleRefreshIntervalMs]);
|
|
125999
126754
|
}
|
|
126000
126755
|
|
|
126756
|
+
// ../blocks/src/system/runtime/hooks/useAvailableDates.state.ts
|
|
126757
|
+
function createEmptyAvailableDatesData() {
|
|
126758
|
+
return {
|
|
126759
|
+
availableDates: /* @__PURE__ */ new Set(),
|
|
126760
|
+
hasMore: false,
|
|
126761
|
+
loadedRange: null,
|
|
126762
|
+
nextStartDate: null
|
|
126763
|
+
};
|
|
126764
|
+
}
|
|
126765
|
+
function createInitialAvailableDatesState() {
|
|
126766
|
+
return {
|
|
126767
|
+
tag: "idle",
|
|
126768
|
+
data: createEmptyAvailableDatesData()
|
|
126769
|
+
};
|
|
126770
|
+
}
|
|
126771
|
+
function getAvailableDates(state) {
|
|
126772
|
+
return state.data.availableDates;
|
|
126773
|
+
}
|
|
126774
|
+
function getAvailableDatesLoadedRange(state) {
|
|
126775
|
+
return state.data.loadedRange;
|
|
126776
|
+
}
|
|
126777
|
+
function getAvailableDatesNextStartDate(state) {
|
|
126778
|
+
return state.data.nextStartDate;
|
|
126779
|
+
}
|
|
126780
|
+
function hasMoreAvailableDates(state) {
|
|
126781
|
+
return state.data.hasMore;
|
|
126782
|
+
}
|
|
126783
|
+
function isLoadingAvailableDates(state) {
|
|
126784
|
+
return state.tag === "loading";
|
|
126785
|
+
}
|
|
126786
|
+
function isRefreshingAvailableDates(state) {
|
|
126787
|
+
return state.tag === "refreshing";
|
|
126788
|
+
}
|
|
126789
|
+
function getAvailableDatesError(state) {
|
|
126790
|
+
return state.tag === "error" ? state.message : null;
|
|
126791
|
+
}
|
|
126792
|
+
function mergeAvailableDates(previous, action) {
|
|
126793
|
+
const availableDates = action.append ? new Set(previous.availableDates) : /* @__PURE__ */ new Set();
|
|
126794
|
+
for (const date of action.dates) {
|
|
126795
|
+
availableDates.add(date);
|
|
126796
|
+
}
|
|
126797
|
+
return {
|
|
126798
|
+
availableDates,
|
|
126799
|
+
hasMore: action.hasMore,
|
|
126800
|
+
loadedRange: {
|
|
126801
|
+
start: action.append && previous.loadedRange ? previous.loadedRange.start : action.startDate,
|
|
126802
|
+
end: action.endDate
|
|
126803
|
+
},
|
|
126804
|
+
nextStartDate: action.nextStartDate
|
|
126805
|
+
};
|
|
126806
|
+
}
|
|
126807
|
+
function availableDatesReducer(state, action) {
|
|
126808
|
+
switch (action.type) {
|
|
126809
|
+
case "query-cleared":
|
|
126810
|
+
return { tag: "idle", data: createEmptyAvailableDatesData() };
|
|
126811
|
+
case "load-started":
|
|
126812
|
+
return { tag: "loading", data: state.data };
|
|
126813
|
+
case "refresh-started":
|
|
126814
|
+
return { tag: "refreshing", data: state.data };
|
|
126815
|
+
case "load-succeeded":
|
|
126816
|
+
return { tag: "loaded", data: mergeAvailableDates(state.data, action) };
|
|
126817
|
+
case "load-failed":
|
|
126818
|
+
return { tag: "error", data: state.data, message: action.message };
|
|
126819
|
+
default:
|
|
126820
|
+
return assertNever11(action);
|
|
126821
|
+
}
|
|
126822
|
+
}
|
|
126823
|
+
|
|
126001
126824
|
// ../blocks/src/system/runtime/hooks/useAvailableDates.ts
|
|
126002
126825
|
var AVAILABILITY_REFRESH_INTERVAL_MS = 3e4;
|
|
126003
126826
|
var AVAILABILITY_REFRESH_JITTER_MS = 5e3;
|
|
@@ -126010,25 +126833,23 @@ function useAvailableDates({
|
|
|
126010
126833
|
initialDays = 30
|
|
126011
126834
|
}) {
|
|
126012
126835
|
const api = useBlockApi();
|
|
126013
|
-
const [
|
|
126014
|
-
|
|
126015
|
-
|
|
126016
|
-
|
|
126017
|
-
const [hasMore, setHasMore] = useState(false);
|
|
126018
|
-
const [loadedRange, setLoadedRange] = useState(null);
|
|
126019
|
-
const nextStartDateRef = useRef(null);
|
|
126836
|
+
const [state, dispatch] = useReducer(
|
|
126837
|
+
availableDatesReducer,
|
|
126838
|
+
createInitialAvailableDatesState()
|
|
126839
|
+
);
|
|
126020
126840
|
const requestIdRef = useRef(0);
|
|
126841
|
+
const loadedRange = getAvailableDatesLoadedRange(state);
|
|
126842
|
+
const isLoading = isLoadingAvailableDates(state);
|
|
126843
|
+
const nextStartDate = getAvailableDatesNextStartDate(state);
|
|
126021
126844
|
const fetchDates = useCallback(
|
|
126022
126845
|
async (startDate, endDate, append2 = false, mode = "load") => {
|
|
126023
126846
|
if (!serviceId) return;
|
|
126024
126847
|
const requestId = ++requestIdRef.current;
|
|
126025
126848
|
if (mode === "refresh") {
|
|
126026
|
-
|
|
126849
|
+
dispatch({ type: "refresh-started" });
|
|
126027
126850
|
} else {
|
|
126028
|
-
|
|
126029
|
-
setIsRefreshing(false);
|
|
126851
|
+
dispatch({ type: "load-started" });
|
|
126030
126852
|
}
|
|
126031
|
-
setError(null);
|
|
126032
126853
|
try {
|
|
126033
126854
|
const data = await api.getAvailableDates({
|
|
126034
126855
|
serviceId,
|
|
@@ -126038,38 +126859,29 @@ function useAvailableDates({
|
|
|
126038
126859
|
resourceId
|
|
126039
126860
|
});
|
|
126040
126861
|
if (requestId !== requestIdRef.current) return;
|
|
126041
|
-
|
|
126042
|
-
|
|
126043
|
-
data.dates
|
|
126044
|
-
|
|
126862
|
+
dispatch({
|
|
126863
|
+
type: "load-succeeded",
|
|
126864
|
+
dates: data.dates,
|
|
126865
|
+
hasMore: data.hasMore,
|
|
126866
|
+
nextStartDate: data.nextStartDate || null,
|
|
126867
|
+
startDate: data.startDate,
|
|
126868
|
+
endDate: data.endDate,
|
|
126869
|
+
append: append2
|
|
126045
126870
|
});
|
|
126046
|
-
setHasMore(data.hasMore);
|
|
126047
|
-
nextStartDateRef.current = data.nextStartDate || null;
|
|
126048
|
-
setLoadedRange((prev) => ({
|
|
126049
|
-
start: append2 && prev ? prev.start : data.startDate,
|
|
126050
|
-
end: data.endDate
|
|
126051
|
-
}));
|
|
126052
126871
|
} catch (err4) {
|
|
126053
126872
|
if (requestId !== requestIdRef.current) return;
|
|
126054
|
-
|
|
126055
|
-
|
|
126056
|
-
|
|
126057
|
-
|
|
126058
|
-
if (mode === "refresh" && requestId === requestIdRef.current) {
|
|
126059
|
-
setIsRefreshing(false);
|
|
126060
|
-
} else if (requestId === requestIdRef.current) {
|
|
126061
|
-
setIsLoading(false);
|
|
126062
|
-
}
|
|
126873
|
+
dispatch({
|
|
126874
|
+
type: "load-failed",
|
|
126875
|
+
message: err4 instanceof Error ? err4.message : "Failed to load available dates"
|
|
126876
|
+
});
|
|
126063
126877
|
}
|
|
126064
126878
|
},
|
|
126065
126879
|
[api, serviceId, resourceId, timezone]
|
|
126066
126880
|
);
|
|
126067
126881
|
useEffect(() => {
|
|
126068
126882
|
if (!serviceId) {
|
|
126069
|
-
|
|
126070
|
-
|
|
126071
|
-
setHasMore(false);
|
|
126072
|
-
setIsRefreshing(false);
|
|
126883
|
+
requestIdRef.current += 1;
|
|
126884
|
+
dispatch({ type: "query-cleared" });
|
|
126073
126885
|
return;
|
|
126074
126886
|
}
|
|
126075
126887
|
const now = /* @__PURE__ */ new Date();
|
|
@@ -126093,8 +126905,8 @@ function useAvailableDates({
|
|
|
126093
126905
|
}
|
|
126094
126906
|
});
|
|
126095
126907
|
const loadMore = useCallback(() => {
|
|
126096
|
-
if (!
|
|
126097
|
-
const start =
|
|
126908
|
+
if (!nextStartDate || isLoading) return;
|
|
126909
|
+
const start = nextStartDate;
|
|
126098
126910
|
const end = formatLocalScheduleDate(
|
|
126099
126911
|
addLocalScheduleDays(
|
|
126100
126912
|
parseBookingLocalDate(start),
|
|
@@ -126102,17 +126914,83 @@ function useAvailableDates({
|
|
|
126102
126914
|
)
|
|
126103
126915
|
);
|
|
126104
126916
|
void fetchDates(start, end, true);
|
|
126105
|
-
}, [fetchDates, isLoading]);
|
|
126917
|
+
}, [fetchDates, isLoading, nextStartDate]);
|
|
126106
126918
|
return {
|
|
126107
|
-
availableDates,
|
|
126919
|
+
availableDates: getAvailableDates(state),
|
|
126108
126920
|
isLoading,
|
|
126109
|
-
isRefreshing,
|
|
126110
|
-
error,
|
|
126111
|
-
hasMore,
|
|
126921
|
+
isRefreshing: isRefreshingAvailableDates(state),
|
|
126922
|
+
error: getAvailableDatesError(state),
|
|
126923
|
+
hasMore: hasMoreAvailableDates(state),
|
|
126112
126924
|
loadMore,
|
|
126113
126925
|
loadedRange
|
|
126114
126926
|
};
|
|
126115
126927
|
}
|
|
126928
|
+
|
|
126929
|
+
// ../blocks/src/system/runtime/hooks/useAvailableSlots.state.ts
|
|
126930
|
+
var initialAvailableSlotsState = { tag: "idle" };
|
|
126931
|
+
function getAvailableSlots(state) {
|
|
126932
|
+
switch (state.tag) {
|
|
126933
|
+
case "idle":
|
|
126934
|
+
case "loading":
|
|
126935
|
+
return [];
|
|
126936
|
+
case "loaded":
|
|
126937
|
+
case "refreshing":
|
|
126938
|
+
case "error":
|
|
126939
|
+
return state.slots;
|
|
126940
|
+
default:
|
|
126941
|
+
return assertNever11(state);
|
|
126942
|
+
}
|
|
126943
|
+
}
|
|
126944
|
+
function hasLoadedAvailableSlots(state) {
|
|
126945
|
+
switch (state.tag) {
|
|
126946
|
+
case "idle":
|
|
126947
|
+
return false;
|
|
126948
|
+
case "loading":
|
|
126949
|
+
case "refreshing":
|
|
126950
|
+
case "error":
|
|
126951
|
+
return state.hasLoaded;
|
|
126952
|
+
case "loaded":
|
|
126953
|
+
return true;
|
|
126954
|
+
default:
|
|
126955
|
+
return assertNever11(state);
|
|
126956
|
+
}
|
|
126957
|
+
}
|
|
126958
|
+
function isLoadingAvailableSlots(state) {
|
|
126959
|
+
return state.tag === "loading";
|
|
126960
|
+
}
|
|
126961
|
+
function isRefreshingAvailableSlots(state) {
|
|
126962
|
+
return state.tag === "refreshing";
|
|
126963
|
+
}
|
|
126964
|
+
function getAvailableSlotsError(state) {
|
|
126965
|
+
return state.tag === "error" ? state.message : null;
|
|
126966
|
+
}
|
|
126967
|
+
function availableSlotsReducer(state, action) {
|
|
126968
|
+
switch (action.type) {
|
|
126969
|
+
case "query-cleared":
|
|
126970
|
+
return { tag: "idle" };
|
|
126971
|
+
case "load-started":
|
|
126972
|
+
return { tag: "loading", hasLoaded: hasLoadedAvailableSlots(state) };
|
|
126973
|
+
case "refresh-started":
|
|
126974
|
+
return {
|
|
126975
|
+
tag: "refreshing",
|
|
126976
|
+
slots: getAvailableSlots(state),
|
|
126977
|
+
hasLoaded: hasLoadedAvailableSlots(state)
|
|
126978
|
+
};
|
|
126979
|
+
case "load-succeeded":
|
|
126980
|
+
return { tag: "loaded", slots: action.slots };
|
|
126981
|
+
case "load-failed":
|
|
126982
|
+
return {
|
|
126983
|
+
tag: "error",
|
|
126984
|
+
slots: getAvailableSlots(state),
|
|
126985
|
+
hasLoaded: hasLoadedAvailableSlots(state),
|
|
126986
|
+
message: action.message
|
|
126987
|
+
};
|
|
126988
|
+
default:
|
|
126989
|
+
return assertNever11(action);
|
|
126990
|
+
}
|
|
126991
|
+
}
|
|
126992
|
+
|
|
126993
|
+
// ../blocks/src/system/runtime/hooks/useAvailableSlots.ts
|
|
126116
126994
|
var AVAILABILITY_REFRESH_INTERVAL_MS2 = 3e4;
|
|
126117
126995
|
var AVAILABILITY_REFRESH_JITTER_MS2 = 5e3;
|
|
126118
126996
|
function useAvailableSlots({
|
|
@@ -126124,31 +127002,23 @@ function useAvailableSlots({
|
|
|
126124
127002
|
timezone
|
|
126125
127003
|
}) {
|
|
126126
127004
|
const api = useBlockApi();
|
|
126127
|
-
const [
|
|
126128
|
-
|
|
126129
|
-
|
|
126130
|
-
|
|
126131
|
-
const [error, setError] = useState(null);
|
|
127005
|
+
const [state, dispatch] = useReducer(
|
|
127006
|
+
availableSlotsReducer,
|
|
127007
|
+
initialAvailableSlotsState
|
|
127008
|
+
);
|
|
126132
127009
|
const requestIdRef = useRef(0);
|
|
126133
127010
|
const fetchSlots = useCallback(
|
|
126134
127011
|
async (mode) => {
|
|
126135
127012
|
const requestId = ++requestIdRef.current;
|
|
126136
127013
|
if (!selectedDate || !serviceId) {
|
|
126137
|
-
|
|
126138
|
-
setIsLoading(false);
|
|
126139
|
-
setIsRefreshing(false);
|
|
126140
|
-
setHasLoaded(false);
|
|
126141
|
-
setError(null);
|
|
127014
|
+
dispatch({ type: "query-cleared" });
|
|
126142
127015
|
return;
|
|
126143
127016
|
}
|
|
126144
127017
|
if (mode === "refresh") {
|
|
126145
|
-
|
|
127018
|
+
dispatch({ type: "refresh-started" });
|
|
126146
127019
|
} else {
|
|
126147
|
-
|
|
126148
|
-
setIsRefreshing(false);
|
|
126149
|
-
setSlots([]);
|
|
127020
|
+
dispatch({ type: "load-started" });
|
|
126150
127021
|
}
|
|
126151
|
-
setError(null);
|
|
126152
127022
|
try {
|
|
126153
127023
|
const result = await api.getAvailableSlots({
|
|
126154
127024
|
serviceId,
|
|
@@ -126158,24 +127028,19 @@ function useAvailableSlots({
|
|
|
126158
127028
|
resourceId
|
|
126159
127029
|
});
|
|
126160
127030
|
if (requestId !== requestIdRef.current) return;
|
|
126161
|
-
|
|
126162
|
-
|
|
127031
|
+
dispatch({
|
|
127032
|
+
type: "load-succeeded",
|
|
127033
|
+
slots: result.slots.map((slot) => ({
|
|
126163
127034
|
...slot,
|
|
126164
127035
|
resourceId: unsafeAsAppointmentResourceId(slot.resourceId)
|
|
126165
127036
|
}))
|
|
126166
|
-
);
|
|
126167
|
-
setHasLoaded(true);
|
|
127037
|
+
});
|
|
126168
127038
|
} catch (err4) {
|
|
126169
127039
|
if (requestId !== requestIdRef.current) return;
|
|
126170
|
-
|
|
126171
|
-
|
|
126172
|
-
|
|
126173
|
-
|
|
126174
|
-
if (mode === "refresh" && requestId === requestIdRef.current) {
|
|
126175
|
-
setIsRefreshing(false);
|
|
126176
|
-
} else if (requestId === requestIdRef.current) {
|
|
126177
|
-
setIsLoading(false);
|
|
126178
|
-
}
|
|
127040
|
+
dispatch({
|
|
127041
|
+
type: "load-failed",
|
|
127042
|
+
message: err4 instanceof Error ? err4.message : "Failed to load available times"
|
|
127043
|
+
});
|
|
126179
127044
|
}
|
|
126180
127045
|
},
|
|
126181
127046
|
[selectedDate, serviceId, resourceId, timezone, api]
|
|
@@ -126192,7 +127057,13 @@ function useAvailableSlots({
|
|
|
126192
127057
|
jitterMs: AVAILABILITY_REFRESH_JITTER_MS2,
|
|
126193
127058
|
onPoll: () => fetchSlots("refresh")
|
|
126194
127059
|
});
|
|
126195
|
-
return {
|
|
127060
|
+
return {
|
|
127061
|
+
slots: getAvailableSlots(state),
|
|
127062
|
+
isLoading: isLoadingAvailableSlots(state),
|
|
127063
|
+
isRefreshing: isRefreshingAvailableSlots(state),
|
|
127064
|
+
hasLoaded: hasLoadedAvailableSlots(state),
|
|
127065
|
+
error: getAvailableSlotsError(state)
|
|
127066
|
+
};
|
|
126196
127067
|
}
|
|
126197
127068
|
|
|
126198
127069
|
// ../blocks/src/system/runtime/hooks/useBookingSubmission.state.ts
|
|
@@ -126399,10 +127270,7 @@ var DEFAULT_CURRENCY = "GBP";
|
|
|
126399
127270
|
|
|
126400
127271
|
// ../blocks/src/system/runtime/shared/utils/formatting.ts
|
|
126401
127272
|
function formatPrice(cents, currency = DEFAULT_CURRENCY, locale) {
|
|
126402
|
-
return
|
|
126403
|
-
style: "currency",
|
|
126404
|
-
currency: currency.toUpperCase()
|
|
126405
|
-
}).format(cents / 100);
|
|
127273
|
+
return formatCurrencyAmount(cents, currency, { locale });
|
|
126406
127274
|
}
|
|
126407
127275
|
|
|
126408
127276
|
// ../blocks/src/system/runtime/shared/bookingPaymentOptions.ts
|
|
@@ -129223,7 +130091,7 @@ function getStepNumber2(step, wizardSteps) {
|
|
|
129223
130091
|
const index2 = wizardSteps.indexOf(step);
|
|
129224
130092
|
return index2 >= 0 ? index2 + 1 : 1;
|
|
129225
130093
|
}
|
|
129226
|
-
function
|
|
130094
|
+
function CheckIcon2({ className, strokeWidth = 2 }) {
|
|
129227
130095
|
return /* @__PURE__ */ jsx(
|
|
129228
130096
|
"svg",
|
|
129229
130097
|
{
|
|
@@ -129241,7 +130109,7 @@ function CheckIcon({ className, strokeWidth = 2 }) {
|
|
|
129241
130109
|
}
|
|
129242
130110
|
);
|
|
129243
130111
|
}
|
|
129244
|
-
function
|
|
130112
|
+
function ClockIcon2({ className, strokeWidth = 2 }) {
|
|
129245
130113
|
return /* @__PURE__ */ jsx(
|
|
129246
130114
|
"svg",
|
|
129247
130115
|
{
|
|
@@ -129364,6 +130232,8 @@ function ModalShell({
|
|
|
129364
130232
|
children,
|
|
129365
130233
|
portalRoot,
|
|
129366
130234
|
portal = false,
|
|
130235
|
+
portalWrapperClassName,
|
|
130236
|
+
portalWrapperProps,
|
|
129367
130237
|
overlayClassName,
|
|
129368
130238
|
modalClassName,
|
|
129369
130239
|
renderSrOnlyTitle = false,
|
|
@@ -129446,7 +130316,8 @@ function ModalShell({
|
|
|
129446
130316
|
if (!portalRoot) {
|
|
129447
130317
|
return null;
|
|
129448
130318
|
}
|
|
129449
|
-
|
|
130319
|
+
const modalNode = portalWrapperClassName || portalWrapperProps ? /* @__PURE__ */ jsx("div", { ...portalWrapperProps, className: portalWrapperClassName, children: modal }) : modal;
|
|
130320
|
+
return createPortal(modalNode, portalRoot);
|
|
129450
130321
|
}
|
|
129451
130322
|
function clampIndex(idx, len) {
|
|
129452
130323
|
if (len <= 0) return 0;
|
|
@@ -129566,7 +130437,7 @@ function StepIndicator({
|
|
|
129566
130437
|
"div",
|
|
129567
130438
|
{
|
|
129568
130439
|
className: `${classPrefix}-step-circle${isActive2 ? ` ${classPrefix}-step-circle--active` : ""}${isComplete ? ` ${classPrefix}-step-circle--completed` : ""}`,
|
|
129569
|
-
children: isComplete ? /* @__PURE__ */ jsx(
|
|
130440
|
+
children: isComplete ? /* @__PURE__ */ jsx(CheckIcon2, { className: `${classPrefix}-step-check`, strokeWidth: 3 }) : stepNum
|
|
129570
130441
|
}
|
|
129571
130442
|
),
|
|
129572
130443
|
stepLabels?.[i2] && /* @__PURE__ */ jsx(
|
|
@@ -131066,7 +131937,7 @@ function SelectableOptionCard(props2) {
|
|
|
131066
131937
|
);
|
|
131067
131938
|
}
|
|
131068
131939
|
function PaymentCheckIcon() {
|
|
131069
|
-
return /* @__PURE__ */ jsx("div", { className: "er-check", children: /* @__PURE__ */ jsx(
|
|
131940
|
+
return /* @__PURE__ */ jsx("div", { className: "er-check", children: /* @__PURE__ */ jsx(CheckIcon2, {}) });
|
|
131070
131941
|
}
|
|
131071
131942
|
function PaymentTile({ icon: icon2, label, detail, selected, disabled, tooltip, upsell, onClick }) {
|
|
131072
131943
|
return /* @__PURE__ */ jsx(
|
|
@@ -131377,7 +132248,7 @@ var VerifyingTimeoutStep = ({
|
|
|
131377
132248
|
tone: "warning",
|
|
131378
132249
|
className: "er-center",
|
|
131379
132250
|
titleClassName: "er-title--lg er-message",
|
|
131380
|
-
icon: /* @__PURE__ */ jsx(StateIcon, { variant: "warning", children: /* @__PURE__ */ jsx(
|
|
132251
|
+
icon: /* @__PURE__ */ jsx(StateIcon, { variant: "warning", children: /* @__PURE__ */ jsx(ClockIcon2, {}) }),
|
|
131381
132252
|
title: "Your registration is saved",
|
|
131382
132253
|
body: /* @__PURE__ */ jsx("p", { className: "er-text--muted er-message", children: "We're still confirming your payment. This usually resolves within a few minutes. You'll receive a confirmation email once everything is verified." }),
|
|
131383
132254
|
actionsClassName: "er-button-group",
|
|
@@ -131709,6 +132580,54 @@ function validateFormData2(formData) {
|
|
|
131709
132580
|
}
|
|
131710
132581
|
return errors;
|
|
131711
132582
|
}
|
|
132583
|
+
|
|
132584
|
+
// ../blocks/src/system/runtime/shared/useWaitlistClaim.state.ts
|
|
132585
|
+
var DEFAULT_WAITLIST_CLAIM_ERROR = "Failed to resolve waitlist claim";
|
|
132586
|
+
function createInitialWaitlistClaimState(hasToken) {
|
|
132587
|
+
return hasToken ? { kind: "resolving" } : { kind: "idle" };
|
|
132588
|
+
}
|
|
132589
|
+
function waitlistClaimReducer(_state, action) {
|
|
132590
|
+
switch (action.type) {
|
|
132591
|
+
case "cleared":
|
|
132592
|
+
return { kind: "idle" };
|
|
132593
|
+
case "started":
|
|
132594
|
+
return { kind: "resolving" };
|
|
132595
|
+
case "resolved":
|
|
132596
|
+
return { kind: "resolved", claim: action.claim };
|
|
132597
|
+
case "failed":
|
|
132598
|
+
return action.failure;
|
|
132599
|
+
}
|
|
132600
|
+
}
|
|
132601
|
+
function toWaitlistClaimResolveFailure(error) {
|
|
132602
|
+
const message2 = error instanceof Error ? error.message : DEFAULT_WAITLIST_CLAIM_ERROR;
|
|
132603
|
+
if (isUnauthorizedBlockApiError(error)) {
|
|
132604
|
+
return { kind: "portal-login-required", message: message2 };
|
|
132605
|
+
}
|
|
132606
|
+
return { kind: "error", message: message2 };
|
|
132607
|
+
}
|
|
132608
|
+
function isUnauthorizedBlockApiError(error) {
|
|
132609
|
+
return error instanceof Error && error.name === "BlockApiError" && hasStatus(error) && error.status === 401;
|
|
132610
|
+
}
|
|
132611
|
+
function hasStatus(value) {
|
|
132612
|
+
return typeof value === "object" && value !== null && "status" in value;
|
|
132613
|
+
}
|
|
132614
|
+
function getWaitlistClaim(state) {
|
|
132615
|
+
return state.kind === "resolved" ? state.claim : null;
|
|
132616
|
+
}
|
|
132617
|
+
function getWaitlistClaimError(state) {
|
|
132618
|
+
return state.kind === "error" ? state.message : null;
|
|
132619
|
+
}
|
|
132620
|
+
function getWaitlistClaimLoginMessage(state) {
|
|
132621
|
+
return state.kind === "portal-login-required" ? state.message : null;
|
|
132622
|
+
}
|
|
132623
|
+
function requiresWaitlistClaimPortalLogin(state) {
|
|
132624
|
+
return state.kind === "portal-login-required";
|
|
132625
|
+
}
|
|
132626
|
+
function isWaitlistClaimLoading(state) {
|
|
132627
|
+
return state.kind === "resolving";
|
|
132628
|
+
}
|
|
132629
|
+
|
|
132630
|
+
// ../blocks/src/system/runtime/shared/useWaitlistClaim.ts
|
|
131712
132631
|
var WAITLIST_CLAIM_LOCATION_EVENT = "riverbank:waitlist-claim-location-change";
|
|
131713
132632
|
var historyPatched = false;
|
|
131714
132633
|
function emitWaitlistClaimLocationChange() {
|
|
@@ -131766,46 +132685,29 @@ function useWaitlistClaim() {
|
|
|
131766
132685
|
getWaitlistClaimTokenSnapshot,
|
|
131767
132686
|
() => null
|
|
131768
132687
|
);
|
|
131769
|
-
const [
|
|
131770
|
-
|
|
131771
|
-
|
|
131772
|
-
|
|
131773
|
-
|
|
132688
|
+
const [state, dispatch] = useReducer(
|
|
132689
|
+
waitlistClaimReducer,
|
|
132690
|
+
Boolean(token),
|
|
132691
|
+
createInitialWaitlistClaimState
|
|
132692
|
+
);
|
|
131774
132693
|
useEffect(() => {
|
|
131775
132694
|
let cancelled = false;
|
|
131776
132695
|
async function resolveClaim() {
|
|
131777
132696
|
if (!token) {
|
|
131778
|
-
|
|
131779
|
-
setError(null);
|
|
131780
|
-
setLoginMessage(null);
|
|
131781
|
-
setRequiresPortalLogin(false);
|
|
131782
|
-
setIsLoading(false);
|
|
132697
|
+
dispatch({ type: "cleared" });
|
|
131783
132698
|
return;
|
|
131784
132699
|
}
|
|
131785
|
-
|
|
131786
|
-
setClaim(null);
|
|
131787
|
-
setError(null);
|
|
131788
|
-
setLoginMessage(null);
|
|
131789
|
-
setRequiresPortalLogin(false);
|
|
132700
|
+
dispatch({ type: "started" });
|
|
131790
132701
|
try {
|
|
131791
132702
|
const result = await api.resolveWaitlistClaim({ claimToken: token });
|
|
131792
132703
|
if (cancelled) return;
|
|
131793
|
-
|
|
132704
|
+
dispatch({ type: "resolved", claim: result });
|
|
131794
132705
|
} catch (claimError) {
|
|
131795
132706
|
if (cancelled) return;
|
|
131796
|
-
|
|
131797
|
-
|
|
131798
|
-
|
|
131799
|
-
|
|
131800
|
-
setLoginMessage(message2);
|
|
131801
|
-
setError(null);
|
|
131802
|
-
} else {
|
|
131803
|
-
setError(message2);
|
|
131804
|
-
}
|
|
131805
|
-
} finally {
|
|
131806
|
-
if (!cancelled) {
|
|
131807
|
-
setIsLoading(false);
|
|
131808
|
-
}
|
|
132707
|
+
dispatch({
|
|
132708
|
+
type: "failed",
|
|
132709
|
+
failure: toWaitlistClaimResolveFailure(claimError)
|
|
132710
|
+
});
|
|
131809
132711
|
}
|
|
131810
132712
|
}
|
|
131811
132713
|
void resolveClaim();
|
|
@@ -131815,11 +132717,11 @@ function useWaitlistClaim() {
|
|
|
131815
132717
|
}, [api, token]);
|
|
131816
132718
|
return {
|
|
131817
132719
|
token,
|
|
131818
|
-
claim,
|
|
131819
|
-
error,
|
|
131820
|
-
loginMessage,
|
|
131821
|
-
requiresPortalLogin,
|
|
131822
|
-
isLoading
|
|
132720
|
+
claim: getWaitlistClaim(state),
|
|
132721
|
+
error: getWaitlistClaimError(state),
|
|
132722
|
+
loginMessage: getWaitlistClaimLoginMessage(state),
|
|
132723
|
+
requiresPortalLogin: requiresWaitlistClaimPortalLogin(state),
|
|
132724
|
+
isLoading: isWaitlistClaimLoading(state)
|
|
131823
132725
|
};
|
|
131824
132726
|
}
|
|
131825
132727
|
function usePaymentVerification(config) {
|
|
@@ -132583,6 +133485,43 @@ function useEventRegistrationWizard(options) {
|
|
|
132583
133485
|
handleRetry
|
|
132584
133486
|
};
|
|
132585
133487
|
}
|
|
133488
|
+
|
|
133489
|
+
// ../blocks/src/system/runtime/nodes/shared/MagicLinkForm.state.ts
|
|
133490
|
+
var initialMagicLinkSubmissionState = Object.freeze({
|
|
133491
|
+
tag: "idle"
|
|
133492
|
+
});
|
|
133493
|
+
function magicLinkSubmissionReducer(state, action) {
|
|
133494
|
+
switch (action.type) {
|
|
133495
|
+
case "submit-started":
|
|
133496
|
+
if (state.tag === "submitting") {
|
|
133497
|
+
return state;
|
|
133498
|
+
}
|
|
133499
|
+
return { tag: "submitting" };
|
|
133500
|
+
case "submit-succeeded":
|
|
133501
|
+
if (state.tag !== "submitting") {
|
|
133502
|
+
return state;
|
|
133503
|
+
}
|
|
133504
|
+
return { tag: "success" };
|
|
133505
|
+
case "submit-failed":
|
|
133506
|
+
if (state.tag !== "submitting") {
|
|
133507
|
+
return state;
|
|
133508
|
+
}
|
|
133509
|
+
return {
|
|
133510
|
+
tag: "error",
|
|
133511
|
+
message: action.message
|
|
133512
|
+
};
|
|
133513
|
+
case "reset":
|
|
133514
|
+
return initialMagicLinkSubmissionState;
|
|
133515
|
+
default:
|
|
133516
|
+
return assertNever11(action);
|
|
133517
|
+
}
|
|
133518
|
+
}
|
|
133519
|
+
function isMagicLinkSubmitting(state) {
|
|
133520
|
+
return state.tag === "submitting";
|
|
133521
|
+
}
|
|
133522
|
+
function getMagicLinkError(state) {
|
|
133523
|
+
return state.tag === "error" ? state.message : null;
|
|
133524
|
+
}
|
|
132586
133525
|
function MagicLinkForm({
|
|
132587
133526
|
initialEmail = "",
|
|
132588
133527
|
title,
|
|
@@ -132595,36 +133534,38 @@ function MagicLinkForm({
|
|
|
132595
133534
|
}) {
|
|
132596
133535
|
const api = useBlockApi();
|
|
132597
133536
|
const [email, setEmail] = useState(initialEmail);
|
|
132598
|
-
const [
|
|
132599
|
-
|
|
132600
|
-
|
|
133537
|
+
const [submissionState, dispatchSubmission] = useReducer(
|
|
133538
|
+
magicLinkSubmissionReducer,
|
|
133539
|
+
initialMagicLinkSubmissionState
|
|
133540
|
+
);
|
|
133541
|
+
const loading = isMagicLinkSubmitting(submissionState);
|
|
133542
|
+
const error = getMagicLinkError(submissionState);
|
|
132601
133543
|
const handleSubmit = async (e3) => {
|
|
132602
133544
|
e3.preventDefault();
|
|
132603
133545
|
const normalizedEmail = email.trim().toLowerCase();
|
|
132604
133546
|
if (!normalizedEmail || loading) return;
|
|
132605
|
-
|
|
132606
|
-
setError(null);
|
|
133547
|
+
dispatchSubmission({ type: "submit-started" });
|
|
132607
133548
|
try {
|
|
132608
133549
|
const redirectTo = `${window.location.pathname}${window.location.search}${window.location.hash}`;
|
|
132609
133550
|
await api.sendMagicLink({
|
|
132610
133551
|
email: normalizedEmail,
|
|
132611
133552
|
redirectUrl: `${window.location.origin}/api/portal/callback?redirect_to=${encodeURIComponent(redirectTo)}`
|
|
132612
133553
|
});
|
|
132613
|
-
|
|
133554
|
+
dispatchSubmission({ type: "submit-succeeded" });
|
|
132614
133555
|
onSuccess?.();
|
|
132615
133556
|
} catch (err4) {
|
|
132616
133557
|
console.error("Magic link error:", err4);
|
|
132617
|
-
|
|
132618
|
-
|
|
132619
|
-
|
|
133558
|
+
dispatchSubmission({
|
|
133559
|
+
type: "submit-failed",
|
|
133560
|
+
message: getMagicLinkErrorMessage(err4)
|
|
133561
|
+
});
|
|
132620
133562
|
}
|
|
132621
133563
|
};
|
|
132622
133564
|
const handleReset = () => {
|
|
132623
|
-
setSuccess(false);
|
|
132624
133565
|
setEmail("");
|
|
132625
|
-
|
|
133566
|
+
dispatchSubmission({ type: "reset" });
|
|
132626
133567
|
};
|
|
132627
|
-
if (success) {
|
|
133568
|
+
if (submissionState.tag === "success") {
|
|
132628
133569
|
return /* @__PURE__ */ jsxs("div", { className: `${classPrefix}-magic-link-success`, children: [
|
|
132629
133570
|
/* @__PURE__ */ jsx("p", { className: `${classPrefix}-portal-auth-text ${classPrefix}-portal-auth-text--success`, children: successMessage }),
|
|
132630
133571
|
!compact2 && /* @__PURE__ */ jsx(
|
|
@@ -132666,6 +133607,9 @@ function MagicLinkForm({
|
|
|
132666
133607
|
)
|
|
132667
133608
|
] });
|
|
132668
133609
|
}
|
|
133610
|
+
function getMagicLinkErrorMessage(error) {
|
|
133611
|
+
return error instanceof Error ? error.message : "Failed to send. Please try again.";
|
|
133612
|
+
}
|
|
132669
133613
|
var EVENT_PORTAL_AUTH_COPY = {
|
|
132670
133614
|
membership: {
|
|
132671
133615
|
title: "Have a pass or membership?",
|
|
@@ -132684,6 +133628,12 @@ function EventPortalAuthPrompt(props2) {
|
|
|
132684
133628
|
/* @__PURE__ */ jsx("button", { type: "button", className: "er-portal-auth-link", onClick: props2.onRequestLogin, children: props2.copy.buttonText })
|
|
132685
133629
|
] });
|
|
132686
133630
|
}
|
|
133631
|
+
function getActiveTicketTypes2(event) {
|
|
133632
|
+
return event?.pricing.kind === "ticket_types" ? event.pricing.ticketTypes.filter((ticketType) => ticketType.isActive).sort((left, right) => left.sortOrder - right.sortOrder) : [];
|
|
133633
|
+
}
|
|
133634
|
+
function formatTicketTypePrice2(ticketType, currency) {
|
|
133635
|
+
return formatCurrencyAmount(ticketType.priceAmount, currency, { decimals: "auto" });
|
|
133636
|
+
}
|
|
132687
133637
|
function EventRegistrationWizard(props2) {
|
|
132688
133638
|
const {
|
|
132689
133639
|
occurrenceContext,
|
|
@@ -132703,6 +133653,8 @@ function EventRegistrationWizard(props2) {
|
|
|
132703
133653
|
const maxTicketsNum = normalizeEventRegistrationMaxTickets(maxTickets);
|
|
132704
133654
|
const showSpamProtection = spamProtectionEnabled ?? isSpamProtectionEnabled();
|
|
132705
133655
|
const buttonClass = themeButtonClassName({ variant: buttonVariant, size: "md" });
|
|
133656
|
+
const registrationRootClassName = `event-registration ${className || ""}`;
|
|
133657
|
+
const registrationRootRef = React61__default.useRef(null);
|
|
132706
133658
|
const wizard = useEventRegistrationWizard({
|
|
132707
133659
|
anchorId: EVENT_REGISTRATION_ANCHOR_ID,
|
|
132708
133660
|
occurrenceContext: occurrenceContext ?? null,
|
|
@@ -132710,13 +133662,44 @@ function EventRegistrationWizard(props2) {
|
|
|
132710
133662
|
events: events2 ?? [],
|
|
132711
133663
|
maxTicketsNum
|
|
132712
133664
|
});
|
|
133665
|
+
const [bookingOverlayOpen, setBookingOverlayOpen] = useState(false);
|
|
133666
|
+
const [floatingPortalRoot, setFloatingPortalRoot] = useState(null);
|
|
133667
|
+
useEffect(() => {
|
|
133668
|
+
const sourceEl = registrationRootRef.current;
|
|
133669
|
+
if (!sourceEl) return;
|
|
133670
|
+
const portal = createBodyThemePortalRoot(sourceEl);
|
|
133671
|
+
if (!portal) return;
|
|
133672
|
+
setFloatingPortalRoot(portal.root);
|
|
133673
|
+
return () => {
|
|
133674
|
+
setFloatingPortalRoot(null);
|
|
133675
|
+
portal.cleanup();
|
|
133676
|
+
};
|
|
133677
|
+
}, []);
|
|
132713
133678
|
if (wizard.scopedEvents.length === 0 && !wizard.occurrenceContext) {
|
|
132714
|
-
return /* @__PURE__ */ jsx(
|
|
133679
|
+
return /* @__PURE__ */ jsx(
|
|
133680
|
+
"div",
|
|
133681
|
+
{
|
|
133682
|
+
ref: registrationRootRef,
|
|
133683
|
+
id: EVENT_REGISTRATION_ANCHOR_ID,
|
|
133684
|
+
className: registrationRootClassName,
|
|
133685
|
+
"data-block": "event-registration",
|
|
133686
|
+
children: /* @__PURE__ */ jsx("div", { className: "er-empty", children: /* @__PURE__ */ jsx("p", { className: "er-empty__text", children: "No events available for registration." }) })
|
|
133687
|
+
}
|
|
133688
|
+
);
|
|
132715
133689
|
}
|
|
132716
133690
|
const allowedStatuses = getRegistrableStatuses(wizard.api.config.isPreview);
|
|
132717
133691
|
const hasRegistrableEvents = wizard.scopedEvents.some((event) => !event.status || allowedStatuses.includes(event.status));
|
|
132718
133692
|
if (!hasRegistrableEvents && !wizard.occurrenceContext) {
|
|
132719
|
-
return /* @__PURE__ */ jsx(
|
|
133693
|
+
return /* @__PURE__ */ jsx(
|
|
133694
|
+
"div",
|
|
133695
|
+
{
|
|
133696
|
+
ref: registrationRootRef,
|
|
133697
|
+
id: EVENT_REGISTRATION_ANCHOR_ID,
|
|
133698
|
+
className: registrationRootClassName,
|
|
133699
|
+
"data-block": "event-registration",
|
|
133700
|
+
children: /* @__PURE__ */ jsx("div", { className: "er-empty", children: /* @__PURE__ */ jsx("p", { className: "er-empty__text", children: "Registration is not currently available for this event." }) })
|
|
133701
|
+
}
|
|
133702
|
+
);
|
|
132720
133703
|
}
|
|
132721
133704
|
const isWizardStep = WIZARD_STEPS.includes(wizard.step);
|
|
132722
133705
|
const activeWizardSteps = useMemo(
|
|
@@ -132758,13 +133741,15 @@ function EventRegistrationWizard(props2) {
|
|
|
132758
133741
|
const currentStepNumber = getStepNumber(wizard.step, activeWizardSteps);
|
|
132759
133742
|
const summaryEvent = wizard.selectedEvent ?? wizard.preSelectedEvent;
|
|
132760
133743
|
const summaryEventPricingType = summaryEvent ? publicEventPricingType(summaryEvent.pricing) : "free";
|
|
133744
|
+
const summaryPriceLabel = summaryEvent ? formatEventPriceDisplay(summaryEvent.pricing) : null;
|
|
133745
|
+
const summaryAvailabilityLabel = summaryEvent?.availableSpots === null || summaryEvent?.availableSpots === void 0 ? null : summaryEvent.availableSpots > 0 ? `${summaryEvent.availableSpots} spots left` : summaryEvent.waitlistEnabled ? "Waitlist available" : "Fully booked";
|
|
132761
133746
|
const waitlistClaimRequiresPortalLogin = wizard.waitlistClaim.requiresPortalLogin && wizard.portalAuthState !== "authenticated" && wizard.portalAuthState !== "checking";
|
|
132762
133747
|
const portalAuthCopy = waitlistClaimRequiresPortalLogin ? {
|
|
132763
133748
|
...EVENT_PORTAL_AUTH_COPY["waitlist-claim"],
|
|
132764
133749
|
description: wizard.waitlistClaim.loginMessage ?? "Log in to continue with your waitlist claim."
|
|
132765
133750
|
} : EVENT_PORTAL_AUTH_COPY.membership;
|
|
132766
133751
|
const showPortalAuthPrompt = waitlistClaimRequiresPortalLogin || wizard.step === "select-tickets" && wizard.portalAuthState !== "authenticated" && wizard.portalAuthState !== "checking" && summaryEventPricingType !== "free";
|
|
132767
|
-
|
|
133752
|
+
const renderRegistrationSurface = (variant) => /* @__PURE__ */ jsxs("div", { className: `er-container${variant === "overlay" ? " er-container--overlay" : ""}`, children: [
|
|
132768
133753
|
isWizardStep && /* @__PURE__ */ jsxs("div", { className: "er-payment-layout er-payment-layout--no-sidebar", children: [
|
|
132769
133754
|
/* @__PURE__ */ jsxs("div", { className: "er-payment-layout-main", children: [
|
|
132770
133755
|
totalSteps > 1 && /* @__PURE__ */ jsx(StepIndicator2, { currentStep: currentStepNumber, totalSteps, stepLabels }),
|
|
@@ -132832,7 +133817,100 @@ function EventRegistrationWizard(props2) {
|
|
|
132832
133817
|
}
|
|
132833
133818
|
),
|
|
132834
133819
|
wizard.step === "error" && /* @__PURE__ */ jsx(ErrorStep, { message: wizard.errorMessage, onRetry: wizard.handleRetry })
|
|
132835
|
-
] })
|
|
133820
|
+
] });
|
|
133821
|
+
const isEmbedded = (className ?? "").includes("event-registration--embedded");
|
|
133822
|
+
const overlayEnabled = props2.overlayEnabled === true;
|
|
133823
|
+
if (isEmbedded || !overlayEnabled) {
|
|
133824
|
+
return /* @__PURE__ */ jsx(
|
|
133825
|
+
"div",
|
|
133826
|
+
{
|
|
133827
|
+
ref: registrationRootRef,
|
|
133828
|
+
id: EVENT_REGISTRATION_ANCHOR_ID,
|
|
133829
|
+
className: registrationRootClassName,
|
|
133830
|
+
"data-block": "event-registration",
|
|
133831
|
+
children: renderRegistrationSurface("inline")
|
|
133832
|
+
}
|
|
133833
|
+
);
|
|
133834
|
+
}
|
|
133835
|
+
const bookingSummaryMeta = [summaryPriceLabel, summaryAvailabilityLabel].filter(Boolean).join(" \xB7 ");
|
|
133836
|
+
const bookingTicketTypes = getActiveTicketTypes2(summaryEvent);
|
|
133837
|
+
const bookingTicketTypesCurrency = summaryEvent?.pricing.kind === "ticket_types" ? summaryEvent.pricing.currency : null;
|
|
133838
|
+
const renderBookingEntry = (base2) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
133839
|
+
/* @__PURE__ */ jsxs("div", { className: `${base2}__info`, children: [
|
|
133840
|
+
/* @__PURE__ */ jsx("span", { className: `${base2}__title`, children: "Book this event" }),
|
|
133841
|
+
bookingSummaryMeta && /* @__PURE__ */ jsx("span", { className: `${base2}__meta`, children: bookingSummaryMeta }),
|
|
133842
|
+
base2 === "er-booking-teaser" && bookingTicketTypesCurrency && bookingTicketTypes.length > 0 ? /* @__PURE__ */ jsx("div", { className: "er-booking-teaser__tickets", children: bookingTicketTypes.map((ticketType) => /* @__PURE__ */ jsxs("div", { className: "er-booking-teaser__ticket", children: [
|
|
133843
|
+
/* @__PURE__ */ jsx("span", { className: "er-booking-teaser__ticket-name", children: ticketType.name }),
|
|
133844
|
+
/* @__PURE__ */ jsx("strong", { children: formatTicketTypePrice2(ticketType, bookingTicketTypesCurrency) })
|
|
133845
|
+
] }, ticketType.id)) }) : null
|
|
133846
|
+
] }),
|
|
133847
|
+
/* @__PURE__ */ jsx(
|
|
133848
|
+
"button",
|
|
133849
|
+
{
|
|
133850
|
+
type: "button",
|
|
133851
|
+
className: `${base2}__cta ${buttonClass}`,
|
|
133852
|
+
onClick: () => setBookingOverlayOpen(true),
|
|
133853
|
+
children: "Book now"
|
|
133854
|
+
}
|
|
133855
|
+
)
|
|
133856
|
+
] });
|
|
133857
|
+
const floatingBookingUi = !bookingOverlayOpen && isWizardStep ? /* @__PURE__ */ jsx("div", { className: "er-booking-bar", children: /* @__PURE__ */ jsx("div", { className: "er-booking-bar__inner", children: renderBookingEntry("er-booking-bar") }) }) : null;
|
|
133858
|
+
const floatingBookingLayer = floatingPortalRoot ? createPortal(
|
|
133859
|
+
/* @__PURE__ */ jsx("div", { className: registrationRootClassName, "data-block": "event-registration", children: floatingBookingUi }),
|
|
133860
|
+
floatingPortalRoot
|
|
133861
|
+
) : floatingBookingUi;
|
|
133862
|
+
const bookingOverlayLayer = bookingOverlayOpen ? /* @__PURE__ */ jsx(
|
|
133863
|
+
ModalShell,
|
|
133864
|
+
{
|
|
133865
|
+
title: "Book this event",
|
|
133866
|
+
titleId: "event-registration-booking-title",
|
|
133867
|
+
onClose: () => setBookingOverlayOpen(false),
|
|
133868
|
+
portal: floatingPortalRoot != null,
|
|
133869
|
+
portalRoot: floatingPortalRoot,
|
|
133870
|
+
portalWrapperClassName: registrationRootClassName,
|
|
133871
|
+
portalWrapperProps: { "data-block": "event-registration" },
|
|
133872
|
+
overlayClassName: "er-booking-overlay",
|
|
133873
|
+
modalClassName: "er-booking-overlay__panel",
|
|
133874
|
+
renderHeader: ({ closeButtonRef, onClose, title, titleId }) => /* @__PURE__ */ jsxs("div", { className: "er-booking-overlay__header", children: [
|
|
133875
|
+
/* @__PURE__ */ jsx("h2", { className: "er-booking-overlay__title", id: titleId, children: title }),
|
|
133876
|
+
/* @__PURE__ */ jsx(
|
|
133877
|
+
"button",
|
|
133878
|
+
{
|
|
133879
|
+
ref: closeButtonRef,
|
|
133880
|
+
type: "button",
|
|
133881
|
+
className: "er-booking-overlay__close",
|
|
133882
|
+
onClick: onClose,
|
|
133883
|
+
"aria-label": "Close booking",
|
|
133884
|
+
children: "\xD7"
|
|
133885
|
+
}
|
|
133886
|
+
)
|
|
133887
|
+
] }),
|
|
133888
|
+
children: renderRegistrationSurface("overlay")
|
|
133889
|
+
}
|
|
133890
|
+
) : null;
|
|
133891
|
+
return /* @__PURE__ */ jsxs(
|
|
133892
|
+
"div",
|
|
133893
|
+
{
|
|
133894
|
+
ref: registrationRootRef,
|
|
133895
|
+
id: EVENT_REGISTRATION_ANCHOR_ID,
|
|
133896
|
+
className: registrationRootClassName,
|
|
133897
|
+
"data-block": "event-registration",
|
|
133898
|
+
children: [
|
|
133899
|
+
isWizardStep ? (
|
|
133900
|
+
// In-flow: a lightweight teaser at the block's position. The full wizard
|
|
133901
|
+
// lives in the sheet, so there is only ever one form surface mounted.
|
|
133902
|
+
/* @__PURE__ */ jsx("div", { className: "er-booking-teaser", children: renderBookingEntry("er-booking-teaser") })
|
|
133903
|
+
) : (
|
|
133904
|
+
// Terminal states (success, error, payment verification on redirect
|
|
133905
|
+
// return) render in the page where the visitor lands, unless the sheet is
|
|
133906
|
+
// open and already showing them.
|
|
133907
|
+
!bookingOverlayOpen && renderRegistrationSurface("inline")
|
|
133908
|
+
),
|
|
133909
|
+
floatingBookingLayer,
|
|
133910
|
+
bookingOverlayLayer
|
|
133911
|
+
]
|
|
133912
|
+
}
|
|
133913
|
+
);
|
|
132836
133914
|
}
|
|
132837
133915
|
function isPastOccurrence(startsAt) {
|
|
132838
133916
|
if (!startsAt) return false;
|
|
@@ -132995,7 +134073,7 @@ function BookingModeStep({
|
|
|
132995
134073
|
},
|
|
132996
134074
|
"aria-pressed": bookingMode === "membership",
|
|
132997
134075
|
children: [
|
|
132998
|
-
/* @__PURE__ */ jsx("div", { className: "cr-payment-tile__check", children: /* @__PURE__ */ jsx(
|
|
134076
|
+
/* @__PURE__ */ jsx("div", { className: "cr-payment-tile__check", children: /* @__PURE__ */ jsx(CheckIcon2, { strokeWidth: 3 }) }),
|
|
132999
134077
|
/* @__PURE__ */ jsxs("div", { className: "cr-payment-tile__header", children: [
|
|
133000
134078
|
/* @__PURE__ */ jsx("h3", { className: "cr-payment-tile__name", children: singleMembership.membershipName }),
|
|
133001
134079
|
/* @__PURE__ */ jsx("span", { className: "cr-payment-tile__price", children: "Free" })
|
|
@@ -133015,7 +134093,7 @@ function BookingModeStep({
|
|
|
133015
134093
|
},
|
|
133016
134094
|
"aria-pressed": bookingMode === "membership" && selectedMembershipId === membership.customerMembershipId,
|
|
133017
134095
|
children: [
|
|
133018
|
-
/* @__PURE__ */ jsx("div", { className: "cr-payment-tile__check", children: /* @__PURE__ */ jsx(
|
|
134096
|
+
/* @__PURE__ */ jsx("div", { className: "cr-payment-tile__check", children: /* @__PURE__ */ jsx(CheckIcon2, { strokeWidth: 3 }) }),
|
|
133019
134097
|
/* @__PURE__ */ jsxs("div", { className: "cr-payment-tile__header", children: [
|
|
133020
134098
|
/* @__PURE__ */ jsx("h3", { className: "cr-payment-tile__name", children: membership.membershipName }),
|
|
133021
134099
|
/* @__PURE__ */ jsx("span", { className: "cr-payment-tile__price", children: "Free" })
|
|
@@ -133036,7 +134114,7 @@ function BookingModeStep({
|
|
|
133036
134114
|
},
|
|
133037
134115
|
"aria-pressed": bookingMode === "card",
|
|
133038
134116
|
children: [
|
|
133039
|
-
/* @__PURE__ */ jsx("div", { className: "cr-payment-tile__check", children: /* @__PURE__ */ jsx(
|
|
134117
|
+
/* @__PURE__ */ jsx("div", { className: "cr-payment-tile__check", children: /* @__PURE__ */ jsx(CheckIcon2, { strokeWidth: 3 }) }),
|
|
133040
134118
|
/* @__PURE__ */ jsxs("div", { className: "cr-payment-tile__header", children: [
|
|
133041
134119
|
/* @__PURE__ */ jsx("h3", { className: "cr-payment-tile__name", children: "Pay by Card" }),
|
|
133042
134120
|
priceCents !== null && /* @__PURE__ */ jsx("span", { className: "cr-payment-tile__price", children: formatPrice(priceCents, currency) })
|
|
@@ -133157,7 +134235,7 @@ function SuccessStep2({
|
|
|
133157
134235
|
tone: "success",
|
|
133158
134236
|
className: "cr-success",
|
|
133159
134237
|
titleClassName: "cr-success__title",
|
|
133160
|
-
icon: /* @__PURE__ */ jsx(StateIcon, { variant: "success", children: /* @__PURE__ */ jsx(
|
|
134238
|
+
icon: /* @__PURE__ */ jsx(StateIcon, { variant: "success", children: /* @__PURE__ */ jsx(CheckIcon2, { strokeWidth: 2 }) }),
|
|
133161
134239
|
title: "Enrollment Complete!",
|
|
133162
134240
|
body: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
133163
134241
|
/* @__PURE__ */ jsx("p", { className: "cr-success__message", children: usedMembership ? membershipMessage : successMessage }),
|
|
@@ -133200,7 +134278,7 @@ function VerifyingTimeoutStep2({
|
|
|
133200
134278
|
tone: "warning",
|
|
133201
134279
|
className: "cr-error",
|
|
133202
134280
|
titleClassName: "cr-error__title",
|
|
133203
|
-
icon: /* @__PURE__ */ jsx(StateIcon, { variant: "warning", children: /* @__PURE__ */ jsx(
|
|
134281
|
+
icon: /* @__PURE__ */ jsx(StateIcon, { variant: "warning", children: /* @__PURE__ */ jsx(ClockIcon2, {}) }),
|
|
133204
134282
|
title: "Payment Verification Taking Longer",
|
|
133205
134283
|
body: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
133206
134284
|
/* @__PURE__ */ jsx("p", { className: "cr-error__message", children: "Your payment may still be processing. Please check your email for confirmation." }),
|
|
@@ -133243,7 +134321,7 @@ function WaitlistStep({ message: message2, position }) {
|
|
|
133243
134321
|
tone: "info",
|
|
133244
134322
|
className: "cr-waitlist",
|
|
133245
134323
|
titleClassName: "cr-waitlist__title",
|
|
133246
|
-
icon: /* @__PURE__ */ jsx(StateIcon, { variant: "waitlist", children: /* @__PURE__ */ jsx(
|
|
134324
|
+
icon: /* @__PURE__ */ jsx(StateIcon, { variant: "waitlist", children: /* @__PURE__ */ jsx(ClockIcon2, {}) }),
|
|
133247
134325
|
title: "Added to Waitlist",
|
|
133248
134326
|
body: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
133249
134327
|
/* @__PURE__ */ jsx("p", { className: "cr-waitlist__message", children: message2 }),
|
|
@@ -135542,7 +136620,7 @@ function PassesMembershipsController({ render }) {
|
|
|
135542
136620
|
window.location.href = result.checkoutUrl;
|
|
135543
136621
|
return;
|
|
135544
136622
|
default:
|
|
135545
|
-
return
|
|
136623
|
+
return assertNever(result);
|
|
135546
136624
|
}
|
|
135547
136625
|
} catch (submitError) {
|
|
135548
136626
|
dispatch({
|
|
@@ -135577,7 +136655,7 @@ function PassesMembershipsController({ render }) {
|
|
|
135577
136655
|
className: "shop__return",
|
|
135578
136656
|
titleClassName: "shop__return-title",
|
|
135579
136657
|
bodyClassName: "shop__return-text",
|
|
135580
|
-
icon: /* @__PURE__ */ jsx(StateIcon, { variant: state.returnNotice.kind === "success" ? "success" : "warning", children: state.returnNotice.kind === "success" ? /* @__PURE__ */ jsx(
|
|
136658
|
+
icon: /* @__PURE__ */ jsx(StateIcon, { variant: state.returnNotice.kind === "success" ? "success" : "warning", children: state.returnNotice.kind === "success" ? /* @__PURE__ */ jsx(CheckIcon2, {}) : /* @__PURE__ */ jsx(CrossIcon, {}) }),
|
|
135581
136659
|
title: state.returnNotice.kind === "success" ? "Payment successful" : "Payment cancelled",
|
|
135582
136660
|
body: state.returnNotice.kind === "success" ? "Check your email for confirmation." : "You can try again whenever you\u2019re ready.",
|
|
135583
136661
|
actions: /* @__PURE__ */ jsx(
|
|
@@ -136860,10 +137938,7 @@ function buildGiftingCheckoutInput(formData, input) {
|
|
|
136860
137938
|
};
|
|
136861
137939
|
}
|
|
136862
137940
|
function formatCurrency(amountCents, currency) {
|
|
136863
|
-
return
|
|
136864
|
-
style: "currency",
|
|
136865
|
-
currency
|
|
136866
|
-
}).format(amountCents / 100);
|
|
137941
|
+
return formatCurrencyAmount(amountCents, currency);
|
|
136867
137942
|
}
|
|
136868
137943
|
var sectionCardStyle = {
|
|
136869
137944
|
gap: "0.875rem",
|
|
@@ -138359,9 +139434,74 @@ var EventPaginatedListView = ({
|
|
|
138359
139434
|
}
|
|
138360
139435
|
);
|
|
138361
139436
|
};
|
|
139437
|
+
|
|
139438
|
+
// ../blocks/src/system/runtime/hooks/loadStateError.ts
|
|
139439
|
+
function toError(error, fallbackMessage) {
|
|
139440
|
+
return error instanceof Error ? error : new Error(fallbackMessage);
|
|
139441
|
+
}
|
|
139442
|
+
|
|
139443
|
+
// ../blocks/src/system/runtime/hooks/useEventPagination.state.ts
|
|
139444
|
+
function createInitialEventPaginationLoadState(events2, pageSize) {
|
|
139445
|
+
return {
|
|
139446
|
+
kind: "ready",
|
|
139447
|
+
events: events2,
|
|
139448
|
+
hasMore: hasMoreEventPages(events2, pageSize)
|
|
139449
|
+
};
|
|
139450
|
+
}
|
|
139451
|
+
function eventPaginationLoadReducer(state, action) {
|
|
139452
|
+
switch (action.type) {
|
|
139453
|
+
case "started":
|
|
139454
|
+
return {
|
|
139455
|
+
kind: "loading",
|
|
139456
|
+
events: state.events,
|
|
139457
|
+
hasMore: action.reset ? true : state.hasMore
|
|
139458
|
+
};
|
|
139459
|
+
case "succeeded":
|
|
139460
|
+
return {
|
|
139461
|
+
kind: "ready",
|
|
139462
|
+
events: action.events,
|
|
139463
|
+
hasMore: action.hasMore
|
|
139464
|
+
};
|
|
139465
|
+
case "failed":
|
|
139466
|
+
return {
|
|
139467
|
+
kind: "error",
|
|
139468
|
+
events: state.events,
|
|
139469
|
+
hasMore: state.hasMore,
|
|
139470
|
+
error: action.error
|
|
139471
|
+
};
|
|
139472
|
+
case "synced":
|
|
139473
|
+
return createInitialEventPaginationLoadState(action.events, action.pageSize);
|
|
139474
|
+
default:
|
|
139475
|
+
return assertNever11(action);
|
|
139476
|
+
}
|
|
139477
|
+
}
|
|
138362
139478
|
function getEventIdentity(event) {
|
|
138363
139479
|
return event.occurrenceId || event.id;
|
|
138364
139480
|
}
|
|
139481
|
+
function mergeEventPaginationEvents(existingEvents, newEvents) {
|
|
139482
|
+
const existingIds = new Set(existingEvents.map(getEventIdentity));
|
|
139483
|
+
const uniqueNew = newEvents.filter(
|
|
139484
|
+
(event) => !existingIds.has(getEventIdentity(event))
|
|
139485
|
+
);
|
|
139486
|
+
return [...existingEvents, ...uniqueNew];
|
|
139487
|
+
}
|
|
139488
|
+
function toEventPaginationLoadError(error) {
|
|
139489
|
+
return toError(error, "Unknown error");
|
|
139490
|
+
}
|
|
139491
|
+
function getEventPaginationEvents(state) {
|
|
139492
|
+
return state.events;
|
|
139493
|
+
}
|
|
139494
|
+
function isEventPaginationLoading(state) {
|
|
139495
|
+
return state.kind === "loading";
|
|
139496
|
+
}
|
|
139497
|
+
function getEventPaginationError(state) {
|
|
139498
|
+
return state.kind === "error" ? state.error : null;
|
|
139499
|
+
}
|
|
139500
|
+
function hasMoreEventPages(events2, pageSize) {
|
|
139501
|
+
return events2.length >= pageSize;
|
|
139502
|
+
}
|
|
139503
|
+
|
|
139504
|
+
// ../blocks/src/system/runtime/hooks/useEventPagination.ts
|
|
138365
139505
|
function getEventsKey(events2) {
|
|
138366
139506
|
return events2.map((e3) => `${getEventIdentity(e3)}:${e3.startsAt}`).join("|");
|
|
138367
139507
|
}
|
|
@@ -138384,10 +139524,15 @@ function useEventPagination({
|
|
|
138384
139524
|
useEffect(() => {
|
|
138385
139525
|
initialEventsRef.current = initialEvents;
|
|
138386
139526
|
}, [initialEventsKey]);
|
|
138387
|
-
const [
|
|
138388
|
-
|
|
138389
|
-
|
|
138390
|
-
|
|
139527
|
+
const [loadState, dispatchLoadState] = useReducer(
|
|
139528
|
+
eventPaginationLoadReducer,
|
|
139529
|
+
{ events: initialEvents, pageSize },
|
|
139530
|
+
({ events: events3, pageSize: initialPageSize }) => createInitialEventPaginationLoadState(events3, initialPageSize)
|
|
139531
|
+
);
|
|
139532
|
+
const events2 = getEventPaginationEvents(loadState);
|
|
139533
|
+
const loading = isEventPaginationLoading(loadState);
|
|
139534
|
+
const error = getEventPaginationError(loadState);
|
|
139535
|
+
const hasMore = loadState.hasMore;
|
|
138391
139536
|
const normalizedCategoryIds = normalizeCsvString(filters?.categoryIds);
|
|
138392
139537
|
const normalizedStaffMemberId = normalizeOptionalId(filters?.staffMemberId);
|
|
138393
139538
|
const normalizedVenueId = normalizeOptionalId(filters?.venueId);
|
|
@@ -138412,9 +139557,11 @@ function useEventPagination({
|
|
|
138412
139557
|
if (loadingRef.current) return;
|
|
138413
139558
|
if (!hasMoreRef.current && !options.reset) return;
|
|
138414
139559
|
const currentRequestId = ++requestIdRef.current;
|
|
138415
|
-
|
|
139560
|
+
dispatchLoadState({ type: "started", reset: options.reset });
|
|
138416
139561
|
loadingRef.current = true;
|
|
138417
|
-
|
|
139562
|
+
if (options.reset) {
|
|
139563
|
+
hasMoreRef.current = true;
|
|
139564
|
+
}
|
|
138418
139565
|
try {
|
|
138419
139566
|
const currentEvents = eventsRef.current;
|
|
138420
139567
|
const lastEvent = options.reset ? void 0 : currentEvents[currentEvents.length - 1];
|
|
@@ -138435,29 +139582,25 @@ function useEventPagination({
|
|
|
138435
139582
|
venueId: normalizedVenueId ?? void 0
|
|
138436
139583
|
});
|
|
138437
139584
|
if (currentRequestId === requestIdRef.current) {
|
|
138438
|
-
|
|
138439
|
-
|
|
138440
|
-
|
|
138441
|
-
|
|
138442
|
-
|
|
138443
|
-
|
|
138444
|
-
|
|
138445
|
-
|
|
138446
|
-
eventsRef.current = updated;
|
|
138447
|
-
return updated;
|
|
138448
|
-
});
|
|
138449
|
-
}
|
|
138450
|
-
const nextHasMore = newEvents.length >= pageSize;
|
|
138451
|
-
setHasMore(nextHasMore);
|
|
139585
|
+
const nextEvents = options.reset ? newEvents : mergeEventPaginationEvents(eventsRef.current, newEvents);
|
|
139586
|
+
const nextHasMore = hasMoreEventPages(newEvents, pageSize);
|
|
139587
|
+
dispatchLoadState({
|
|
139588
|
+
type: "succeeded",
|
|
139589
|
+
events: nextEvents,
|
|
139590
|
+
hasMore: nextHasMore
|
|
139591
|
+
});
|
|
139592
|
+
eventsRef.current = [...nextEvents];
|
|
138452
139593
|
hasMoreRef.current = nextHasMore;
|
|
138453
139594
|
}
|
|
138454
139595
|
} catch (err4) {
|
|
138455
139596
|
if (currentRequestId === requestIdRef.current) {
|
|
138456
|
-
|
|
139597
|
+
dispatchLoadState({
|
|
139598
|
+
type: "failed",
|
|
139599
|
+
error: toEventPaginationLoadError(err4)
|
|
139600
|
+
});
|
|
138457
139601
|
}
|
|
138458
139602
|
} finally {
|
|
138459
139603
|
if (currentRequestId === requestIdRef.current) {
|
|
138460
|
-
setLoading(false);
|
|
138461
139604
|
loadingRef.current = false;
|
|
138462
139605
|
}
|
|
138463
139606
|
}
|
|
@@ -138499,19 +139642,20 @@ function useEventPagination({
|
|
|
138499
139642
|
try {
|
|
138500
139643
|
if (filtersMatchInitial) {
|
|
138501
139644
|
if (!prevFiltersMatchInitial || prevInitialEventsKey !== initialEventsKey) {
|
|
138502
|
-
|
|
139645
|
+
dispatchLoadState({
|
|
139646
|
+
type: "synced",
|
|
139647
|
+
events: latestInitialEvents,
|
|
139648
|
+
pageSize
|
|
139649
|
+
});
|
|
138503
139650
|
eventsRef.current = latestInitialEvents;
|
|
138504
139651
|
}
|
|
138505
|
-
const nextHasMore = latestInitialEvents
|
|
139652
|
+
const nextHasMore = hasMoreEventPages(latestInitialEvents, pageSize);
|
|
138506
139653
|
if (hasMoreRef.current !== nextHasMore) {
|
|
138507
|
-
setHasMore(nextHasMore);
|
|
138508
139654
|
hasMoreRef.current = nextHasMore;
|
|
138509
139655
|
}
|
|
138510
|
-
if (error !== null) setError(null);
|
|
138511
139656
|
return;
|
|
138512
139657
|
}
|
|
138513
139658
|
if (prevFiltersMatchInitial || prevFiltersKey !== filtersKey) {
|
|
138514
|
-
setHasMore(true);
|
|
138515
139659
|
hasMoreRef.current = true;
|
|
138516
139660
|
void fetchPage({ reset: true });
|
|
138517
139661
|
}
|
|
@@ -138520,7 +139664,7 @@ function useEventPagination({
|
|
|
138520
139664
|
prevInitialEventsKeyRef.current = initialEventsKey;
|
|
138521
139665
|
prevFiltersKeyRef.current = filtersKey;
|
|
138522
139666
|
}
|
|
138523
|
-
}, [
|
|
139667
|
+
}, [fetchPage, filtersKey, filtersMatchInitial, initialEventsKey, pageSize]);
|
|
138524
139668
|
return {
|
|
138525
139669
|
events: events2,
|
|
138526
139670
|
loading,
|
|
@@ -138529,6 +139673,43 @@ function useEventPagination({
|
|
|
138529
139673
|
loadMore
|
|
138530
139674
|
};
|
|
138531
139675
|
}
|
|
139676
|
+
|
|
139677
|
+
// ../blocks/src/system/runtime/hooks/useEventFilters.state.ts
|
|
139678
|
+
var EMPTY_EVENT_FILTERS = Object.freeze({
|
|
139679
|
+
categories: [],
|
|
139680
|
+
venues: [],
|
|
139681
|
+
staffMembers: [],
|
|
139682
|
+
labels: Object.freeze({ courseOption: "Course" })
|
|
139683
|
+
});
|
|
139684
|
+
function createInitialEventFiltersLoadState() {
|
|
139685
|
+
return { kind: "idle", filters: EMPTY_EVENT_FILTERS };
|
|
139686
|
+
}
|
|
139687
|
+
function eventFiltersLoadReducer(state, action) {
|
|
139688
|
+
switch (action.type) {
|
|
139689
|
+
case "started":
|
|
139690
|
+
return { kind: "loading", filters: state.filters };
|
|
139691
|
+
case "succeeded":
|
|
139692
|
+
return { kind: "loaded", filters: action.filters };
|
|
139693
|
+
case "failed":
|
|
139694
|
+
return { kind: "error", filters: state.filters, error: action.error };
|
|
139695
|
+
default:
|
|
139696
|
+
return assertNever11(action);
|
|
139697
|
+
}
|
|
139698
|
+
}
|
|
139699
|
+
function toEventFiltersLoadError(error) {
|
|
139700
|
+
return toError(error, "Failed to load filters");
|
|
139701
|
+
}
|
|
139702
|
+
function getEventFiltersData(state) {
|
|
139703
|
+
return state.filters;
|
|
139704
|
+
}
|
|
139705
|
+
function isEventFiltersLoading(state) {
|
|
139706
|
+
return state.kind === "loading";
|
|
139707
|
+
}
|
|
139708
|
+
function getEventFiltersError(state) {
|
|
139709
|
+
return state.kind === "error" ? state.error : null;
|
|
139710
|
+
}
|
|
139711
|
+
|
|
139712
|
+
// ../blocks/src/system/runtime/hooks/useEventFilters.ts
|
|
138532
139713
|
function useEventFilters({
|
|
138533
139714
|
showCategoryFilter = "auto",
|
|
138534
139715
|
showVenueFilter = false,
|
|
@@ -138542,14 +139723,14 @@ function useEventFilters({
|
|
|
138542
139723
|
preFilterScheduleScope
|
|
138543
139724
|
} = {}) {
|
|
138544
139725
|
const api = useBlockApi();
|
|
138545
|
-
const [
|
|
138546
|
-
|
|
138547
|
-
|
|
138548
|
-
|
|
138549
|
-
|
|
138550
|
-
|
|
138551
|
-
const
|
|
138552
|
-
const
|
|
139726
|
+
const [loadState, dispatchLoadState] = useReducer(
|
|
139727
|
+
eventFiltersLoadReducer,
|
|
139728
|
+
void 0,
|
|
139729
|
+
createInitialEventFiltersLoadState
|
|
139730
|
+
);
|
|
139731
|
+
const filters = getEventFiltersData(loadState);
|
|
139732
|
+
const loading = isEventFiltersLoading(loadState);
|
|
139733
|
+
const error = getEventFiltersError(loadState);
|
|
138553
139734
|
const [selectedKind, setSelectedKindState] = useState("all");
|
|
138554
139735
|
const [selectedCategoryId, setSelectedCategoryId] = useState("all");
|
|
138555
139736
|
const [selectedStaffMemberId, setSelectedStaffMemberId] = useState("all");
|
|
@@ -138584,7 +139765,7 @@ function useEventFilters({
|
|
|
138584
139765
|
const needFilters = showCategoryFilter !== "never" && fixedKind !== "courses" || showVenueFilter || showStaffFilter;
|
|
138585
139766
|
if (!needFilters) return;
|
|
138586
139767
|
hasFetchedRef.current = true;
|
|
138587
|
-
|
|
139768
|
+
dispatchLoadState({ type: "started" });
|
|
138588
139769
|
api.getEventFilters({
|
|
138589
139770
|
categoryIds: allowedCategoryIds.length > 0 ? allowedCategoryIds.join(",") : void 0,
|
|
138590
139771
|
venueId: fixedVenueId ?? void 0,
|
|
@@ -138594,12 +139775,12 @@ function useEventFilters({
|
|
|
138594
139775
|
eventPresets: fixedEventPresets,
|
|
138595
139776
|
scheduleScope: fixedScheduleScope
|
|
138596
139777
|
}).then((data) => {
|
|
138597
|
-
|
|
138598
|
-
setError(null);
|
|
139778
|
+
dispatchLoadState({ type: "succeeded", filters: data });
|
|
138599
139779
|
}).catch((err4) => {
|
|
138600
|
-
|
|
138601
|
-
|
|
138602
|
-
|
|
139780
|
+
dispatchLoadState({
|
|
139781
|
+
type: "failed",
|
|
139782
|
+
error: toEventFiltersLoadError(err4)
|
|
139783
|
+
});
|
|
138603
139784
|
});
|
|
138604
139785
|
}, [
|
|
138605
139786
|
allowedCategoryIds,
|
|
@@ -138931,6 +140112,31 @@ var TabBar = ({
|
|
|
138931
140112
|
}
|
|
138932
140113
|
);
|
|
138933
140114
|
};
|
|
140115
|
+
|
|
140116
|
+
// ../blocks/src/system/runtime/hooks/useCalendarEvents.state.ts
|
|
140117
|
+
function calendarEventCacheLoadReducer(_state, action) {
|
|
140118
|
+
switch (action.type) {
|
|
140119
|
+
case "started":
|
|
140120
|
+
return { kind: "loading" };
|
|
140121
|
+
case "succeeded":
|
|
140122
|
+
return { kind: "idle" };
|
|
140123
|
+
case "failed":
|
|
140124
|
+
return { kind: "error", error: action.error };
|
|
140125
|
+
default:
|
|
140126
|
+
return assertNever11(action);
|
|
140127
|
+
}
|
|
140128
|
+
}
|
|
140129
|
+
function toCalendarEventCacheLoadError(error) {
|
|
140130
|
+
return toError(error, "Unknown error");
|
|
140131
|
+
}
|
|
140132
|
+
function isCalendarEventCacheLoading(state) {
|
|
140133
|
+
return state.kind === "loading";
|
|
140134
|
+
}
|
|
140135
|
+
function getCalendarEventCacheError(state) {
|
|
140136
|
+
return state.kind === "error" ? state.error : null;
|
|
140137
|
+
}
|
|
140138
|
+
|
|
140139
|
+
// ../blocks/src/system/runtime/hooks/useCalendarEvents.ts
|
|
138934
140140
|
var CALENDAR_FETCH_LIMIT = 200;
|
|
138935
140141
|
function getMonthKey(date) {
|
|
138936
140142
|
return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}`;
|
|
@@ -138974,8 +140180,10 @@ function useCalendarEventCache({
|
|
|
138974
140180
|
stage
|
|
138975
140181
|
}) {
|
|
138976
140182
|
const { getPublicEvents } = useBlockApi();
|
|
138977
|
-
const [
|
|
138978
|
-
|
|
140183
|
+
const [loadState, dispatchLoadState] = useReducer(
|
|
140184
|
+
calendarEventCacheLoadReducer,
|
|
140185
|
+
{ kind: "idle" }
|
|
140186
|
+
);
|
|
138979
140187
|
const [cacheVersion, setCacheVersion] = useState(0);
|
|
138980
140188
|
const filtersKey = useMemo(
|
|
138981
140189
|
() => getEventRuntimeFiltersKey(filters),
|
|
@@ -139020,8 +140228,7 @@ function useCalendarEventCache({
|
|
|
139020
140228
|
if (monthsToFetch.length === 0) return;
|
|
139021
140229
|
monthsToFetch.forEach((m2) => fetchingRef.current.add(m2));
|
|
139022
140230
|
const currentRequestId = ++requestIdRef.current;
|
|
139023
|
-
|
|
139024
|
-
setError(null);
|
|
140231
|
+
dispatchLoadState({ type: "started" });
|
|
139025
140232
|
try {
|
|
139026
140233
|
const result = await getPublicEvents({
|
|
139027
140234
|
from: from2,
|
|
@@ -139053,16 +140260,17 @@ function useCalendarEventCache({
|
|
|
139053
140260
|
}
|
|
139054
140261
|
}
|
|
139055
140262
|
setCacheVersion((v2) => v2 + 1);
|
|
140263
|
+
dispatchLoadState({ type: "succeeded" });
|
|
139056
140264
|
}
|
|
139057
140265
|
} catch (err4) {
|
|
139058
140266
|
if (currentRequestId === requestIdRef.current) {
|
|
139059
|
-
|
|
140267
|
+
dispatchLoadState({
|
|
140268
|
+
type: "failed",
|
|
140269
|
+
error: toCalendarEventCacheLoadError(err4)
|
|
140270
|
+
});
|
|
139060
140271
|
}
|
|
139061
140272
|
} finally {
|
|
139062
140273
|
monthsToFetch.forEach((m2) => fetchingRef.current.delete(m2));
|
|
139063
|
-
if (currentRequestId === requestIdRef.current) {
|
|
139064
|
-
setLoading(false);
|
|
139065
|
-
}
|
|
139066
140274
|
}
|
|
139067
140275
|
}, [
|
|
139068
140276
|
getPublicEvents,
|
|
@@ -139112,8 +140320,8 @@ function useCalendarEventCache({
|
|
|
139112
140320
|
}, [viewDate, cacheVersion]);
|
|
139113
140321
|
return {
|
|
139114
140322
|
events: events2,
|
|
139115
|
-
loading,
|
|
139116
|
-
error
|
|
140323
|
+
loading: isCalendarEventCacheLoading(loadState),
|
|
140324
|
+
error: getCalendarEventCacheError(loadState)
|
|
139117
140325
|
};
|
|
139118
140326
|
}
|
|
139119
140327
|
function useCalendarEvents({
|
|
@@ -140719,6 +141927,23 @@ var MediaNode = ({
|
|
|
140719
141927
|
};
|
|
140720
141928
|
|
|
140721
141929
|
// ../blocks/src/system/runtime/nodes/newsletter-form.client.state.ts
|
|
141930
|
+
var initialNewsletterFormSubmissionState = {
|
|
141931
|
+
tag: "idle"
|
|
141932
|
+
};
|
|
141933
|
+
function newsletterFormSubmissionReducer(state, action) {
|
|
141934
|
+
switch (action.type) {
|
|
141935
|
+
case "submitted":
|
|
141936
|
+
if (state.tag === "success") return state;
|
|
141937
|
+
return { tag: "submitting" };
|
|
141938
|
+
case "failed":
|
|
141939
|
+
if (state.tag === "success") return state;
|
|
141940
|
+
return { tag: "error", error: action.error };
|
|
141941
|
+
case "succeeded":
|
|
141942
|
+
return { tag: "success" };
|
|
141943
|
+
default:
|
|
141944
|
+
return assertNever11(action);
|
|
141945
|
+
}
|
|
141946
|
+
}
|
|
140722
141947
|
function newsletterFieldError(fieldId, message2) {
|
|
140723
141948
|
return { kind: "field", fieldId, message: message2 };
|
|
140724
141949
|
}
|
|
@@ -140731,69 +141956,136 @@ function getNewsletterFieldError(error, fieldId) {
|
|
|
140731
141956
|
function getNewsletterFormError(error) {
|
|
140732
141957
|
return error?.kind === "form" ? error.message : null;
|
|
140733
141958
|
}
|
|
141959
|
+
function isNewsletterFormSubmitting(state) {
|
|
141960
|
+
return state.tag === "submitting";
|
|
141961
|
+
}
|
|
141962
|
+
function isNewsletterFormSuccess(state) {
|
|
141963
|
+
return state.tag === "success";
|
|
141964
|
+
}
|
|
141965
|
+
function getNewsletterSubmissionFieldError(state, fieldId) {
|
|
141966
|
+
return state.tag === "error" ? getNewsletterFieldError(state.error, fieldId) : null;
|
|
141967
|
+
}
|
|
141968
|
+
function getNewsletterSubmissionFormError(state) {
|
|
141969
|
+
return state.tag === "error" ? getNewsletterFormError(state.error) : null;
|
|
141970
|
+
}
|
|
141971
|
+
|
|
141972
|
+
// ../blocks/src/system/runtime/nodes/newsletter-form.submission.ts
|
|
141973
|
+
function mapNewsletterFormFieldsToSubscriberInput(fields3) {
|
|
141974
|
+
return {
|
|
141975
|
+
email: readSubmittedText(fields3.email),
|
|
141976
|
+
firstName: readOptionalSubmittedText(fields3.firstName),
|
|
141977
|
+
lastName: readOptionalSubmittedText(fields3.lastName),
|
|
141978
|
+
name: readOptionalSubmittedText(fields3.name),
|
|
141979
|
+
company: readOptionalSubmittedText(fields3.company),
|
|
141980
|
+
phone: readOptionalSubmittedText(fields3.phone),
|
|
141981
|
+
honeypot: readSubmittedText(fields3.website)
|
|
141982
|
+
};
|
|
141983
|
+
}
|
|
141984
|
+
function resolveNewsletterSubmitTarget(input) {
|
|
141985
|
+
const listId = input.listId?.trim();
|
|
141986
|
+
if (input.destinationRef) {
|
|
141987
|
+
return {
|
|
141988
|
+
tag: "ready",
|
|
141989
|
+
target: {
|
|
141990
|
+
tag: "published_block_ref",
|
|
141991
|
+
destinationRef: input.destinationRef
|
|
141992
|
+
}
|
|
141993
|
+
};
|
|
141994
|
+
}
|
|
141995
|
+
if (!listId) {
|
|
141996
|
+
return { tag: "unavailable", reason: "missing_legacy_list" };
|
|
141997
|
+
}
|
|
141998
|
+
return {
|
|
141999
|
+
tag: "ready",
|
|
142000
|
+
target: {
|
|
142001
|
+
tag: "legacy_riverbank_list",
|
|
142002
|
+
listId,
|
|
142003
|
+
destinationRef: input.destinationRef ?? void 0
|
|
142004
|
+
}
|
|
142005
|
+
};
|
|
142006
|
+
}
|
|
142007
|
+
function readOptionalSubmittedText(value) {
|
|
142008
|
+
const text2 = readSubmittedText(value);
|
|
142009
|
+
return text2.length > 0 ? text2 : void 0;
|
|
142010
|
+
}
|
|
142011
|
+
function readSubmittedText(value) {
|
|
142012
|
+
return typeof value === "string" ? value.trim() : "";
|
|
142013
|
+
}
|
|
140734
142014
|
function NewsletterFormClient({
|
|
140735
142015
|
render
|
|
140736
142016
|
}) {
|
|
140737
142017
|
const api = useBlockApi();
|
|
140738
|
-
const [
|
|
140739
|
-
|
|
140740
|
-
|
|
142018
|
+
const [submissionState, dispatchSubmission] = useReducer(
|
|
142019
|
+
newsletterFormSubmissionReducer,
|
|
142020
|
+
initialNewsletterFormSubmissionState
|
|
142021
|
+
);
|
|
140741
142022
|
const [altchaSolution, setAltchaSolution] = useState(null);
|
|
140742
142023
|
const showSpamProtection = render.hydration.spamProtectionEnabled ?? isSpamProtectionEnabled();
|
|
140743
142024
|
const fields3 = render.display.fields;
|
|
140744
142025
|
const parsedTags = typeof render.hydration.tags === "string" ? render.hydration.tags.split(/[;,]/g).map((t3) => t3.trim()).filter(Boolean) : [];
|
|
140745
142026
|
const handleSubmit = async (e3) => {
|
|
140746
142027
|
e3.preventDefault();
|
|
140747
|
-
setError(null);
|
|
140748
142028
|
const formData = new FormData(e3.currentTarget);
|
|
140749
|
-
const
|
|
140750
|
-
|
|
140751
|
-
|
|
142029
|
+
const submittedFields = mapNewsletterFormFieldsToSubscriberInput({
|
|
142030
|
+
email: formData.get("email"),
|
|
142031
|
+
firstName: formData.get("firstName"),
|
|
142032
|
+
lastName: formData.get("lastName"),
|
|
142033
|
+
name: formData.get("name"),
|
|
142034
|
+
company: formData.get("company"),
|
|
142035
|
+
phone: formData.get("phone"),
|
|
142036
|
+
website: formData.get("website")
|
|
142037
|
+
});
|
|
142038
|
+
if (submittedFields.honeypot) {
|
|
142039
|
+
dispatchSubmission({ type: "succeeded" });
|
|
140752
142040
|
return;
|
|
140753
142041
|
}
|
|
140754
|
-
|
|
140755
|
-
|
|
140756
|
-
|
|
140757
|
-
|
|
140758
|
-
|
|
140759
|
-
const phone = formData.get("phone")?.trim() || void 0;
|
|
140760
|
-
if (!email) {
|
|
140761
|
-
setError(newsletterFieldError("email", "Email is required"));
|
|
142042
|
+
if (!submittedFields.email) {
|
|
142043
|
+
dispatchSubmission({
|
|
142044
|
+
type: "failed",
|
|
142045
|
+
error: newsletterFieldError("email", "Email is required")
|
|
142046
|
+
});
|
|
140762
142047
|
return;
|
|
140763
142048
|
}
|
|
140764
|
-
|
|
140765
|
-
|
|
142049
|
+
const submitTarget = resolveNewsletterSubmitTarget({
|
|
142050
|
+
listId: render.hydration.listId,
|
|
142051
|
+
destinationRef: render.hydration.destinationRef
|
|
142052
|
+
});
|
|
142053
|
+
if (submitTarget.tag === "unavailable") {
|
|
142054
|
+
dispatchSubmission({
|
|
142055
|
+
type: "failed",
|
|
142056
|
+
error: newsletterFormError("Newsletter list is not configured")
|
|
142057
|
+
});
|
|
140766
142058
|
return;
|
|
140767
142059
|
}
|
|
140768
|
-
|
|
142060
|
+
dispatchSubmission({ type: "submitted" });
|
|
140769
142061
|
try {
|
|
140770
142062
|
await api.subscribeNewsletter({
|
|
140771
|
-
email,
|
|
140772
|
-
firstName,
|
|
140773
|
-
lastName,
|
|
140774
|
-
name,
|
|
140775
|
-
company,
|
|
140776
|
-
phone,
|
|
140777
|
-
|
|
142063
|
+
email: submittedFields.email,
|
|
142064
|
+
firstName: submittedFields.firstName,
|
|
142065
|
+
lastName: submittedFields.lastName,
|
|
142066
|
+
name: submittedFields.name,
|
|
142067
|
+
company: submittedFields.company,
|
|
142068
|
+
phone: submittedFields.phone,
|
|
142069
|
+
target: submitTarget.target,
|
|
140778
142070
|
tags: parsedTags.length > 0 ? parsedTags : void 0,
|
|
140779
|
-
blockId: void 0,
|
|
140780
142071
|
meta: {
|
|
140781
|
-
honeypot,
|
|
142072
|
+
honeypot: submittedFields.honeypot,
|
|
140782
142073
|
altchaSolution
|
|
140783
142074
|
}
|
|
140784
142075
|
});
|
|
140785
|
-
|
|
142076
|
+
dispatchSubmission({ type: "succeeded" });
|
|
140786
142077
|
} catch (err4) {
|
|
140787
|
-
|
|
140788
|
-
|
|
140789
|
-
|
|
140790
|
-
|
|
140791
|
-
|
|
142078
|
+
dispatchSubmission({
|
|
142079
|
+
type: "failed",
|
|
142080
|
+
error: newsletterFormError(
|
|
142081
|
+
err4 instanceof Error ? err4.message : "Subscription failed. Please try again."
|
|
142082
|
+
)
|
|
142083
|
+
});
|
|
140792
142084
|
}
|
|
140793
142085
|
};
|
|
140794
142086
|
const renderField = (field) => {
|
|
140795
142087
|
const inputId = `newsletter_${field.id}`;
|
|
140796
|
-
const fieldError =
|
|
142088
|
+
const fieldError = getNewsletterSubmissionFieldError(submissionState, field.id);
|
|
140797
142089
|
const fieldErrorId = `${inputId}-error`;
|
|
140798
142090
|
const validationProps = getFieldValidationControlProps({
|
|
140799
142091
|
message: fieldError,
|
|
@@ -140814,15 +142106,15 @@ function NewsletterFormClient({
|
|
|
140814
142106
|
placeholder: field.placeholder,
|
|
140815
142107
|
className: "form-input",
|
|
140816
142108
|
autoComplete: field.type === "email" ? "email" : void 0,
|
|
140817
|
-
disabled:
|
|
142109
|
+
disabled: isNewsletterFormSubmitting(submissionState),
|
|
140818
142110
|
...validationProps
|
|
140819
142111
|
}
|
|
140820
142112
|
),
|
|
140821
142113
|
fieldError && /* @__PURE__ */ jsx(FieldValidationMessage, { id: fieldErrorId, className: "fb-error", children: fieldError })
|
|
140822
142114
|
] }, field.id);
|
|
140823
142115
|
};
|
|
140824
|
-
const formError =
|
|
140825
|
-
if (
|
|
142116
|
+
const formError = getNewsletterSubmissionFormError(submissionState);
|
|
142117
|
+
if (isNewsletterFormSuccess(submissionState)) {
|
|
140826
142118
|
return /* @__PURE__ */ jsx("div", { className: clsx_default("newsletter-form", "newsletter-success", render.display.className ?? void 0), children: /* @__PURE__ */ jsx(FeedbackMessage, { tone: "success", className: "fb-success", role: "status", children: render.display.successMessage?.trim() || "Thanks for subscribing!" }) });
|
|
140827
142119
|
}
|
|
140828
142120
|
return /* @__PURE__ */ jsxs("div", { className: clsx_default("newsletter-form", render.display.className ?? void 0), children: [
|
|
@@ -140853,8 +142145,8 @@ function NewsletterFormClient({
|
|
|
140853
142145
|
{
|
|
140854
142146
|
type: "submit",
|
|
140855
142147
|
className: themeButtonClassName({ variant: "primary", size: "md" }),
|
|
140856
|
-
disabled:
|
|
140857
|
-
children:
|
|
142148
|
+
disabled: isNewsletterFormSubmitting(submissionState),
|
|
142149
|
+
children: isNewsletterFormSubmitting(submissionState) ? "Subscribing..." : render.display.buttonLabel
|
|
140858
142150
|
}
|
|
140859
142151
|
) })
|
|
140860
142152
|
] }),
|
|
@@ -146646,8 +147938,8 @@ function deriveLaunchReadiness(input) {
|
|
|
146646
147938
|
priority: "optional",
|
|
146647
147939
|
state: input.customDomain.kind === "connected" ? "complete" : "pending",
|
|
146648
147940
|
owner: "admin",
|
|
146649
|
-
title: "Connect a
|
|
146650
|
-
description: input.customDomain.kind === "connected" ? "A
|
|
147941
|
+
title: "Connect a domain",
|
|
147942
|
+
description: input.customDomain.kind === "connected" ? "A domain is already connected." : "You can connect a domain later when you are ready to launch.",
|
|
146651
147943
|
action: openDashboardPathAction(
|
|
146652
147944
|
siteId,
|
|
146653
147945
|
"/settings/domains?setup=domain",
|
|
@@ -147820,7 +149112,7 @@ function parseAccessPolicyJson(value) {
|
|
|
147820
149112
|
return ok3({ tag: "site-editor-read", siteId: unsafeAsSiteId2(siteId.value) });
|
|
147821
149113
|
}
|
|
147822
149114
|
case "signed-public-render": {
|
|
147823
|
-
const expiresInSeconds =
|
|
149115
|
+
const expiresInSeconds = parsePositiveSeconds2(record.expiresInSeconds);
|
|
147824
149116
|
if (!expiresInSeconds.ok) return expiresInSeconds;
|
|
147825
149117
|
return ok3({ tag: "signed-public-render", expiresInSeconds: expiresInSeconds.value });
|
|
147826
149118
|
}
|
|
@@ -147896,7 +149188,7 @@ function parseStringIn(value, allowed, outOfSetError) {
|
|
|
147896
149188
|
if (!isOneOf(string.value, allowed)) return err3(outOfSetError);
|
|
147897
149189
|
return ok3(string.value);
|
|
147898
149190
|
}
|
|
147899
|
-
function
|
|
149191
|
+
function parsePositiveSeconds2(value) {
|
|
147900
149192
|
if (typeof value !== "number") return err3("invalid-number");
|
|
147901
149193
|
const parsed = asPositiveSeconds(value);
|
|
147902
149194
|
if (!parsed.ok) return err3("invalid-positive-seconds");
|
|
@@ -147904,7 +149196,7 @@ function parsePositiveSeconds(value) {
|
|
|
147904
149196
|
}
|
|
147905
149197
|
function parseOptionalPositiveSeconds(value) {
|
|
147906
149198
|
if (value === void 0 || value === null) return ok3(void 0);
|
|
147907
|
-
return
|
|
149199
|
+
return parsePositiveSeconds2(value);
|
|
147908
149200
|
}
|
|
147909
149201
|
function traverse(items, parse2) {
|
|
147910
149202
|
const values = [];
|
|
@@ -159882,7 +161174,7 @@ function findDiffEnd(a2, b2, posA, posB) {
|
|
|
159882
161174
|
posB -= size4;
|
|
159883
161175
|
}
|
|
159884
161176
|
}
|
|
159885
|
-
var
|
|
161177
|
+
var Fragment54 = class _Fragment {
|
|
159886
161178
|
/**
|
|
159887
161179
|
@internal
|
|
159888
161180
|
*/
|
|
@@ -160174,7 +161466,7 @@ var Fragment52 = class _Fragment {
|
|
|
160174
161466
|
throw new RangeError("Can not convert " + nodes + " to a Fragment" + (nodes.nodesBetween ? " (looks like multiple versions of prosemirror-model were loaded)" : ""));
|
|
160175
161467
|
}
|
|
160176
161468
|
};
|
|
160177
|
-
|
|
161469
|
+
Fragment54.empty = new Fragment54([], 0);
|
|
160178
161470
|
var found = { index: 0, offset: 0 };
|
|
160179
161471
|
function retIndex(index2, offset4) {
|
|
160180
161472
|
found.index = index2;
|
|
@@ -160399,7 +161691,7 @@ var Slice2 = class _Slice {
|
|
|
160399
161691
|
let openStart = json.openStart || 0, openEnd = json.openEnd || 0;
|
|
160400
161692
|
if (typeof openStart != "number" || typeof openEnd != "number")
|
|
160401
161693
|
throw new RangeError("Invalid input for Slice.fromJSON");
|
|
160402
|
-
return new _Slice(
|
|
161694
|
+
return new _Slice(Fragment54.fromJSON(schema, json.content), openStart, openEnd);
|
|
160403
161695
|
}
|
|
160404
161696
|
/**
|
|
160405
161697
|
Create a slice from a fragment by taking the maximum possible
|
|
@@ -160414,7 +161706,7 @@ var Slice2 = class _Slice {
|
|
|
160414
161706
|
return new _Slice(fragment, openStart, openEnd);
|
|
160415
161707
|
}
|
|
160416
161708
|
};
|
|
160417
|
-
Slice2.empty = new Slice2(
|
|
161709
|
+
Slice2.empty = new Slice2(Fragment54.empty, 0, 0);
|
|
160418
161710
|
function removeRange(content, from2, to) {
|
|
160419
161711
|
let { index: index2, offset: offset4 } = content.findIndex(from2), child = content.maybeChild(index2);
|
|
160420
161712
|
let { index: indexTo, offset: offsetTo } = content.findIndex(to);
|
|
@@ -160512,7 +161804,7 @@ function replaceThreeWay($from, $start, $end, $to, depth) {
|
|
|
160512
161804
|
addNode(close(openEnd, replaceTwoWay($end, $to, depth + 1)), content);
|
|
160513
161805
|
}
|
|
160514
161806
|
addRange($to, null, depth, content);
|
|
160515
|
-
return new
|
|
161807
|
+
return new Fragment54(content);
|
|
160516
161808
|
}
|
|
160517
161809
|
function replaceTwoWay($from, $to, depth) {
|
|
160518
161810
|
let content = [];
|
|
@@ -160522,13 +161814,13 @@ function replaceTwoWay($from, $to, depth) {
|
|
|
160522
161814
|
addNode(close(type, replaceTwoWay($from, $to, depth + 1)), content);
|
|
160523
161815
|
}
|
|
160524
161816
|
addRange($to, null, depth, content);
|
|
160525
|
-
return new
|
|
161817
|
+
return new Fragment54(content);
|
|
160526
161818
|
}
|
|
160527
161819
|
function prepareSliceForReplace(slice2, $along) {
|
|
160528
161820
|
let extra = $along.depth - slice2.openStart, parent = $along.node(extra);
|
|
160529
161821
|
let node = parent.copy(slice2.content);
|
|
160530
161822
|
for (let i2 = extra - 1; i2 >= 0; i2--)
|
|
160531
|
-
node = $along.node(i2).copy(
|
|
161823
|
+
node = $along.node(i2).copy(Fragment54.from(node));
|
|
160532
161824
|
return {
|
|
160533
161825
|
start: node.resolveNoCache(slice2.openStart + extra),
|
|
160534
161826
|
end: node.resolveNoCache(node.content.size - slice2.openEnd - extra)
|
|
@@ -160867,7 +162159,7 @@ var Node2 = class _Node {
|
|
|
160867
162159
|
this.type = type;
|
|
160868
162160
|
this.attrs = attrs;
|
|
160869
162161
|
this.marks = marks;
|
|
160870
|
-
this.content = content ||
|
|
162162
|
+
this.content = content || Fragment54.empty;
|
|
160871
162163
|
}
|
|
160872
162164
|
/**
|
|
160873
162165
|
The array of this node's child nodes.
|
|
@@ -161172,7 +162464,7 @@ var Node2 = class _Node {
|
|
|
161172
162464
|
can optionally pass `start` and `end` indices into the
|
|
161173
162465
|
replacement fragment.
|
|
161174
162466
|
*/
|
|
161175
|
-
canReplace(from2, to, replacement =
|
|
162467
|
+
canReplace(from2, to, replacement = Fragment54.empty, start = 0, end = replacement.childCount) {
|
|
161176
162468
|
let one = this.contentMatchAt(from2).matchFragment(replacement, start, end);
|
|
161177
162469
|
let two = one && one.matchFragment(this.content, to);
|
|
161178
162470
|
if (!two || !two.validEnd)
|
|
@@ -161254,7 +162546,7 @@ var Node2 = class _Node {
|
|
|
161254
162546
|
throw new RangeError("Invalid text node in JSON");
|
|
161255
162547
|
return schema.text(json.text, marks);
|
|
161256
162548
|
}
|
|
161257
|
-
let content =
|
|
162549
|
+
let content = Fragment54.fromJSON(schema, json.content);
|
|
161258
162550
|
let node = schema.nodeType(json.type).create(json.attrs, content, marks);
|
|
161259
162551
|
node.type.checkAttrs(node.attrs);
|
|
161260
162552
|
return node;
|
|
@@ -161396,7 +162688,7 @@ var ContentMatch = class _ContentMatch {
|
|
|
161396
162688
|
function search(match2, types) {
|
|
161397
162689
|
let finished = match2.matchFragment(after, startIndex);
|
|
161398
162690
|
if (finished && (!toEnd || finished.validEnd))
|
|
161399
|
-
return
|
|
162691
|
+
return Fragment54.from(types.map((tp) => tp.createAndFill()));
|
|
161400
162692
|
for (let i2 = 0; i2 < match2.next.length; i2++) {
|
|
161401
162693
|
let { type, next } = match2.next[i2];
|
|
161402
162694
|
if (!(type.isText || type.hasRequiredAttrs()) && seen.indexOf(next) == -1) {
|
|
@@ -161848,7 +163140,7 @@ var NodeType = class _NodeType {
|
|
|
161848
163140
|
create(attrs = null, content, marks) {
|
|
161849
163141
|
if (this.isText)
|
|
161850
163142
|
throw new Error("NodeType.create can't construct text nodes");
|
|
161851
|
-
return new Node2(this, this.computeAttrs(attrs),
|
|
163143
|
+
return new Node2(this, this.computeAttrs(attrs), Fragment54.from(content), Mark.setFrom(marks));
|
|
161852
163144
|
}
|
|
161853
163145
|
/**
|
|
161854
163146
|
Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but check the given content
|
|
@@ -161856,7 +163148,7 @@ var NodeType = class _NodeType {
|
|
|
161856
163148
|
if it doesn't match.
|
|
161857
163149
|
*/
|
|
161858
163150
|
createChecked(attrs = null, content, marks) {
|
|
161859
|
-
content =
|
|
163151
|
+
content = Fragment54.from(content);
|
|
161860
163152
|
this.checkContent(content);
|
|
161861
163153
|
return new Node2(this, this.computeAttrs(attrs), content, Mark.setFrom(marks));
|
|
161862
163154
|
}
|
|
@@ -161870,7 +163162,7 @@ var NodeType = class _NodeType {
|
|
|
161870
163162
|
*/
|
|
161871
163163
|
createAndFill(attrs = null, content, marks) {
|
|
161872
163164
|
attrs = this.computeAttrs(attrs);
|
|
161873
|
-
content =
|
|
163165
|
+
content = Fragment54.from(content);
|
|
161874
163166
|
if (content.size) {
|
|
161875
163167
|
let before = this.contentMatch.fillBefore(content);
|
|
161876
163168
|
if (!before)
|
|
@@ -161878,7 +163170,7 @@ var NodeType = class _NodeType {
|
|
|
161878
163170
|
content = before.append(content);
|
|
161879
163171
|
}
|
|
161880
163172
|
let matched = this.contentMatch.matchFragment(content);
|
|
161881
|
-
let after = matched && matched.fillBefore(
|
|
163173
|
+
let after = matched && matched.fillBefore(Fragment54.empty, true);
|
|
161882
163174
|
if (!after)
|
|
161883
163175
|
return null;
|
|
161884
163176
|
return new Node2(this, attrs, content.append(after), Mark.setFrom(marks));
|
|
@@ -162342,7 +163634,7 @@ var NodeContext = class {
|
|
|
162342
163634
|
if (!this.match) {
|
|
162343
163635
|
if (!this.type)
|
|
162344
163636
|
return [];
|
|
162345
|
-
let fill = this.type.contentMatch.fillBefore(
|
|
163637
|
+
let fill = this.type.contentMatch.fillBefore(Fragment54.from(node));
|
|
162346
163638
|
if (fill) {
|
|
162347
163639
|
this.match = this.type.contentMatch.matchFragment(fill);
|
|
162348
163640
|
} else {
|
|
@@ -162368,9 +163660,9 @@ var NodeContext = class {
|
|
|
162368
163660
|
this.content[this.content.length - 1] = text2.withText(text2.text.slice(0, text2.text.length - m2[0].length));
|
|
162369
163661
|
}
|
|
162370
163662
|
}
|
|
162371
|
-
let content =
|
|
163663
|
+
let content = Fragment54.from(this.content);
|
|
162372
163664
|
if (!openEnd && this.match)
|
|
162373
|
-
content = content.append(this.match.fillBefore(
|
|
163665
|
+
content = content.append(this.match.fillBefore(Fragment54.empty, true));
|
|
162374
163666
|
return this.type ? this.type.create(this.attrs, content, this.marks) : content;
|
|
162375
163667
|
}
|
|
162376
163668
|
inlineContext(node) {
|
|
@@ -163386,7 +164678,7 @@ function mapFragment(fragment, f2, parent) {
|
|
|
163386
164678
|
child = f2(child, parent, i2);
|
|
163387
164679
|
mapped.push(child);
|
|
163388
164680
|
}
|
|
163389
|
-
return
|
|
164681
|
+
return Fragment54.fromArray(mapped);
|
|
163390
164682
|
}
|
|
163391
164683
|
var AddMarkStep = class _AddMarkStep extends Step {
|
|
163392
164684
|
/**
|
|
@@ -163503,7 +164795,7 @@ var AddNodeMarkStep = class _AddNodeMarkStep extends Step {
|
|
|
163503
164795
|
if (!node)
|
|
163504
164796
|
return StepResult.fail("No node at mark step's position");
|
|
163505
164797
|
let updated = node.type.create(node.attrs, null, this.mark.addToSet(node.marks));
|
|
163506
|
-
return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice2(
|
|
164798
|
+
return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice2(Fragment54.from(updated), 0, node.isLeaf ? 0 : 1));
|
|
163507
164799
|
}
|
|
163508
164800
|
invert(doc3) {
|
|
163509
164801
|
let node = doc3.nodeAt(this.pos);
|
|
@@ -163549,7 +164841,7 @@ var RemoveNodeMarkStep = class _RemoveNodeMarkStep extends Step {
|
|
|
163549
164841
|
if (!node)
|
|
163550
164842
|
return StepResult.fail("No node at mark step's position");
|
|
163551
164843
|
let updated = node.type.create(node.attrs, null, this.mark.removeFromSet(node.marks));
|
|
163552
|
-
return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice2(
|
|
164844
|
+
return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice2(Fragment54.from(updated), 0, node.isLeaf ? 0 : 1));
|
|
163553
164845
|
}
|
|
163554
164846
|
invert(doc3) {
|
|
163555
164847
|
let node = doc3.nodeAt(this.pos);
|
|
@@ -163814,7 +165106,7 @@ function clearIncompatible(tr2, pos, parentType, match2 = parentType.contentMatc
|
|
|
163814
165106
|
let m2, newline = /\r?\n|\r/g, slice2;
|
|
163815
165107
|
while (m2 = newline.exec(child.text)) {
|
|
163816
165108
|
if (!slice2)
|
|
163817
|
-
slice2 = new Slice2(
|
|
165109
|
+
slice2 = new Slice2(Fragment54.from(parentType.schema.text(" ", parentType.allowedMarks(child.marks))), 0, 0);
|
|
163818
165110
|
replSteps.push(new ReplaceStep(cur + m2.index, cur + m2.index + m2[0].length, slice2));
|
|
163819
165111
|
}
|
|
163820
165112
|
}
|
|
@@ -163822,7 +165114,7 @@ function clearIncompatible(tr2, pos, parentType, match2 = parentType.contentMatc
|
|
|
163822
165114
|
cur = end;
|
|
163823
165115
|
}
|
|
163824
165116
|
if (!match2.validEnd) {
|
|
163825
|
-
let fill = match2.fillBefore(
|
|
165117
|
+
let fill = match2.fillBefore(Fragment54.empty, true);
|
|
163826
165118
|
tr2.replace(cur, cur, new Slice2(fill, 0, 0));
|
|
163827
165119
|
}
|
|
163828
165120
|
for (let i2 = replSteps.length - 1; i2 >= 0; i2--)
|
|
@@ -163848,20 +165140,20 @@ function lift(tr2, range, target) {
|
|
|
163848
165140
|
let { $from, $to, depth } = range;
|
|
163849
165141
|
let gapStart = $from.before(depth + 1), gapEnd = $to.after(depth + 1);
|
|
163850
165142
|
let start = gapStart, end = gapEnd;
|
|
163851
|
-
let before =
|
|
165143
|
+
let before = Fragment54.empty, openStart = 0;
|
|
163852
165144
|
for (let d2 = depth, splitting = false; d2 > target; d2--)
|
|
163853
165145
|
if (splitting || $from.index(d2) > 0) {
|
|
163854
165146
|
splitting = true;
|
|
163855
|
-
before =
|
|
165147
|
+
before = Fragment54.from($from.node(d2).copy(before));
|
|
163856
165148
|
openStart++;
|
|
163857
165149
|
} else {
|
|
163858
165150
|
start--;
|
|
163859
165151
|
}
|
|
163860
|
-
let after =
|
|
165152
|
+
let after = Fragment54.empty, openEnd = 0;
|
|
163861
165153
|
for (let d2 = depth, splitting = false; d2 > target; d2--)
|
|
163862
165154
|
if (splitting || $to.after(d2 + 1) < $to.end(d2)) {
|
|
163863
165155
|
splitting = true;
|
|
163864
|
-
after =
|
|
165156
|
+
after = Fragment54.from($to.node(d2).copy(after));
|
|
163865
165157
|
openEnd++;
|
|
163866
165158
|
} else {
|
|
163867
165159
|
end++;
|
|
@@ -163901,14 +165193,14 @@ function findWrappingInside(range, type) {
|
|
|
163901
165193
|
return inside;
|
|
163902
165194
|
}
|
|
163903
165195
|
function wrap(tr2, range, wrappers) {
|
|
163904
|
-
let content =
|
|
165196
|
+
let content = Fragment54.empty;
|
|
163905
165197
|
for (let i2 = wrappers.length - 1; i2 >= 0; i2--) {
|
|
163906
165198
|
if (content.size) {
|
|
163907
165199
|
let match2 = wrappers[i2].type.contentMatch.matchFragment(content);
|
|
163908
165200
|
if (!match2 || !match2.validEnd)
|
|
163909
165201
|
throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper");
|
|
163910
165202
|
}
|
|
163911
|
-
content =
|
|
165203
|
+
content = Fragment54.from(wrappers[i2].type.create(wrappers[i2].attrs, content));
|
|
163912
165204
|
}
|
|
163913
165205
|
let start = range.start, end = range.end;
|
|
163914
165206
|
tr2.step(new ReplaceAroundStep(start, end, start, end, new Slice2(content, 0, 0), wrappers.length, true));
|
|
@@ -163933,7 +165225,7 @@ function setBlockType(tr2, from2, to, type, attrs) {
|
|
|
163933
165225
|
clearIncompatible(tr2, tr2.mapping.slice(mapFrom).map(pos, 1), type, void 0, convertNewlines === null);
|
|
163934
165226
|
let mapping = tr2.mapping.slice(mapFrom);
|
|
163935
165227
|
let startM = mapping.map(pos, 1), endM = mapping.map(pos + node.nodeSize, 1);
|
|
163936
|
-
tr2.step(new ReplaceAroundStep(startM, endM, startM + 1, endM - 1, new Slice2(
|
|
165228
|
+
tr2.step(new ReplaceAroundStep(startM, endM, startM + 1, endM - 1, new Slice2(Fragment54.from(type.create(attrsHere, null, node.marks)), 0, 0), 1, true));
|
|
163937
165229
|
if (convertNewlines === true)
|
|
163938
165230
|
replaceNewlines(tr2, node, pos, mapFrom);
|
|
163939
165231
|
return false;
|
|
@@ -163974,7 +165266,7 @@ function setNodeMarkup(tr2, pos, type, attrs, marks) {
|
|
|
163974
165266
|
return tr2.replaceWith(pos, pos + node.nodeSize, newNode);
|
|
163975
165267
|
if (!type.validContent(node.content))
|
|
163976
165268
|
throw new RangeError("Invalid content for node type " + type.name);
|
|
163977
|
-
tr2.step(new ReplaceAroundStep(pos, pos + node.nodeSize, pos + 1, pos + node.nodeSize - 1, new Slice2(
|
|
165269
|
+
tr2.step(new ReplaceAroundStep(pos, pos + node.nodeSize, pos + 1, pos + node.nodeSize - 1, new Slice2(Fragment54.from(newNode), 0, 0), 1, true));
|
|
163978
165270
|
}
|
|
163979
165271
|
function canSplit(doc3, pos, depth = 1, typesAfter) {
|
|
163980
165272
|
let $pos = doc3.resolve(pos), base2 = $pos.depth - depth;
|
|
@@ -163998,11 +165290,11 @@ function canSplit(doc3, pos, depth = 1, typesAfter) {
|
|
|
163998
165290
|
return $pos.node(base2).canReplaceWith(index2, index2, baseType ? baseType.type : $pos.node(base2 + 1).type);
|
|
163999
165291
|
}
|
|
164000
165292
|
function split(tr2, pos, depth = 1, typesAfter) {
|
|
164001
|
-
let $pos = tr2.doc.resolve(pos), before =
|
|
165293
|
+
let $pos = tr2.doc.resolve(pos), before = Fragment54.empty, after = Fragment54.empty;
|
|
164002
165294
|
for (let d2 = $pos.depth, e3 = $pos.depth - depth, i2 = depth - 1; d2 > e3; d2--, i2--) {
|
|
164003
|
-
before =
|
|
165295
|
+
before = Fragment54.from($pos.node(d2).copy(before));
|
|
164004
165296
|
let typeAfter = typesAfter && typesAfter[i2];
|
|
164005
|
-
after =
|
|
165297
|
+
after = Fragment54.from(typeAfter ? typeAfter.type.create(typeAfter.attrs, after) : $pos.node(d2).copy(after));
|
|
164006
165298
|
}
|
|
164007
165299
|
tr2.step(new ReplaceStep(pos, pos, new Slice2(before.append(after), depth, depth), true));
|
|
164008
165300
|
}
|
|
@@ -164141,7 +165433,7 @@ var Fitter = class {
|
|
|
164141
165433
|
this.$to = $to;
|
|
164142
165434
|
this.unplaced = unplaced;
|
|
164143
165435
|
this.frontier = [];
|
|
164144
|
-
this.placed =
|
|
165436
|
+
this.placed = Fragment54.empty;
|
|
164145
165437
|
for (let i2 = 0; i2 <= $from.depth; i2++) {
|
|
164146
165438
|
let node = $from.node(i2);
|
|
164147
165439
|
this.frontier.push({
|
|
@@ -164150,7 +165442,7 @@ var Fitter = class {
|
|
|
164150
165442
|
});
|
|
164151
165443
|
}
|
|
164152
165444
|
for (let i2 = $from.depth; i2 > 0; i2--)
|
|
164153
|
-
this.placed =
|
|
165445
|
+
this.placed = Fragment54.from($from.node(i2).copy(this.placed));
|
|
164154
165446
|
}
|
|
164155
165447
|
get depth() {
|
|
164156
165448
|
return this.frontier.length - 1;
|
|
@@ -164207,7 +165499,7 @@ var Fitter = class {
|
|
|
164207
165499
|
let first2 = fragment.firstChild;
|
|
164208
165500
|
for (let frontierDepth = this.depth; frontierDepth >= 0; frontierDepth--) {
|
|
164209
165501
|
let { type, match: match2 } = this.frontier[frontierDepth], wrap2, inject = null;
|
|
164210
|
-
if (pass == 1 && (first2 ? match2.matchType(first2.type) || (inject = match2.fillBefore(
|
|
165502
|
+
if (pass == 1 && (first2 ? match2.matchType(first2.type) || (inject = match2.fillBefore(Fragment54.from(first2), false)) : parent && type.compatibleContent(parent.type)))
|
|
164211
165503
|
return { sliceDepth, frontierDepth, parent, inject };
|
|
164212
165504
|
else if (pass == 2 && first2 && (wrap2 = match2.findWrapping(first2.type)))
|
|
164213
165505
|
return { sliceDepth, frontierDepth, parent, wrap: wrap2 };
|
|
@@ -164267,7 +165559,7 @@ var Fitter = class {
|
|
|
164267
165559
|
let toEnd = taken == fragment.childCount;
|
|
164268
165560
|
if (!toEnd)
|
|
164269
165561
|
openEndCount = -1;
|
|
164270
|
-
this.placed = addToFragment(this.placed, frontierDepth,
|
|
165562
|
+
this.placed = addToFragment(this.placed, frontierDepth, Fragment54.from(add2));
|
|
164271
165563
|
this.frontier[frontierDepth].match = match2;
|
|
164272
165564
|
if (toEnd && openEndCount < 0 && parent && parent.type == this.frontier[this.depth].type && this.frontier.length > 1)
|
|
164273
165565
|
this.closeFrontierNode();
|
|
@@ -164323,12 +165615,12 @@ var Fitter = class {
|
|
|
164323
165615
|
openFrontierNode(type, attrs = null, content) {
|
|
164324
165616
|
let top = this.frontier[this.depth];
|
|
164325
165617
|
top.match = top.match.matchType(type);
|
|
164326
|
-
this.placed = addToFragment(this.placed, this.depth,
|
|
165618
|
+
this.placed = addToFragment(this.placed, this.depth, Fragment54.from(type.create(attrs, content)));
|
|
164327
165619
|
this.frontier.push({ type, match: type.contentMatch });
|
|
164328
165620
|
}
|
|
164329
165621
|
closeFrontierNode() {
|
|
164330
165622
|
let open = this.frontier.pop();
|
|
164331
|
-
let add2 = open.match.fillBefore(
|
|
165623
|
+
let add2 = open.match.fillBefore(Fragment54.empty, true);
|
|
164332
165624
|
if (add2.childCount)
|
|
164333
165625
|
this.placed = addToFragment(this.placed, this.frontier.length, add2);
|
|
164334
165626
|
}
|
|
@@ -164357,7 +165649,7 @@ function closeNodeStart(node, openStart, openEnd) {
|
|
|
164357
165649
|
if (openStart > 0) {
|
|
164358
165650
|
frag = node.type.contentMatch.fillBefore(frag).append(frag);
|
|
164359
165651
|
if (openEnd <= 0)
|
|
164360
|
-
frag = frag.append(node.type.contentMatch.matchFragment(frag).fillBefore(
|
|
165652
|
+
frag = frag.append(node.type.contentMatch.matchFragment(frag).fillBefore(Fragment54.empty, true));
|
|
164361
165653
|
}
|
|
164362
165654
|
return node.copy(frag);
|
|
164363
165655
|
}
|
|
@@ -164449,7 +165741,7 @@ function closeFragment(fragment, depth, oldOpen, newOpen, parent) {
|
|
|
164449
165741
|
if (depth > newOpen) {
|
|
164450
165742
|
let match2 = parent.contentMatchAt(0);
|
|
164451
165743
|
let start = match2.fillBefore(fragment).append(fragment);
|
|
164452
|
-
fragment = start.append(match2.matchFragment(start).fillBefore(
|
|
165744
|
+
fragment = start.append(match2.matchFragment(start).fillBefore(Fragment54.empty, true));
|
|
164453
165745
|
}
|
|
164454
165746
|
return fragment;
|
|
164455
165747
|
}
|
|
@@ -164459,7 +165751,7 @@ function replaceRangeWith(tr2, from2, to, node) {
|
|
|
164459
165751
|
if (point != null)
|
|
164460
165752
|
from2 = to = point;
|
|
164461
165753
|
}
|
|
164462
|
-
tr2.replaceRange(from2, to, new Slice2(
|
|
165754
|
+
tr2.replaceRange(from2, to, new Slice2(Fragment54.from(node), 0, 0));
|
|
164463
165755
|
}
|
|
164464
165756
|
function deleteRange(tr2, from2, to) {
|
|
164465
165757
|
let $from = tr2.doc.resolve(from2), $to = tr2.doc.resolve(to);
|
|
@@ -164507,7 +165799,7 @@ var AttrStep = class _AttrStep extends Step {
|
|
|
164507
165799
|
attrs[name] = node.attrs[name];
|
|
164508
165800
|
attrs[this.attr] = this.value;
|
|
164509
165801
|
let updated = node.type.create(attrs, null, node.marks);
|
|
164510
|
-
return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice2(
|
|
165802
|
+
return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice2(Fragment54.from(updated), 0, node.isLeaf ? 0 : 1));
|
|
164511
165803
|
}
|
|
164512
165804
|
getMap() {
|
|
164513
165805
|
return StepMap.empty;
|
|
@@ -164642,7 +165934,7 @@ var Transform = class {
|
|
|
164642
165934
|
fragment, node, or array of nodes.
|
|
164643
165935
|
*/
|
|
164644
165936
|
replaceWith(from2, to, content) {
|
|
164645
|
-
return this.replace(from2, to, new Slice2(
|
|
165937
|
+
return this.replace(from2, to, new Slice2(Fragment54.from(content), 0, 0));
|
|
164646
165938
|
}
|
|
164647
165939
|
/**
|
|
164648
165940
|
Delete the content between the given positions.
|
|
@@ -165144,7 +166436,7 @@ var NodeSelection = class _NodeSelection extends Selection {
|
|
|
165144
166436
|
return new _NodeSelection($pos);
|
|
165145
166437
|
}
|
|
165146
166438
|
content() {
|
|
165147
|
-
return new Slice2(
|
|
166439
|
+
return new Slice2(Fragment54.from(this.node), 0, 0);
|
|
165148
166440
|
}
|
|
165149
166441
|
eq(other) {
|
|
165150
166442
|
return other instanceof _NodeSelection && other.anchor == this.anchor;
|
|
@@ -166966,7 +168258,7 @@ var NodeViewDesc = class _NodeViewDesc extends ViewDesc {
|
|
|
166966
168258
|
}
|
|
166967
168259
|
}
|
|
166968
168260
|
if (!rule2.contentElement)
|
|
166969
|
-
rule2.getContent = () =>
|
|
168261
|
+
rule2.getContent = () => Fragment54.empty;
|
|
166970
168262
|
}
|
|
166971
168263
|
return rule2;
|
|
166972
168264
|
}
|
|
@@ -168278,7 +169570,7 @@ function parseFromClipboard(view, text2, html, plainText, $context) {
|
|
|
168278
169570
|
text2 = f2(text2, inCode || plainText, view);
|
|
168279
169571
|
});
|
|
168280
169572
|
if (inCode) {
|
|
168281
|
-
slice2 = new Slice2(
|
|
169573
|
+
slice2 = new Slice2(Fragment54.from(view.state.schema.text(text2.replace(/\r\n?/g, "\n"))), 0, 0);
|
|
168282
169574
|
view.someProp("transformPasted", (f2) => {
|
|
168283
169575
|
slice2 = f2(slice2, view, true);
|
|
168284
169576
|
});
|
|
@@ -168372,13 +169664,13 @@ function normalizeSiblings(fragment, $context) {
|
|
|
168372
169664
|
}
|
|
168373
169665
|
});
|
|
168374
169666
|
if (result)
|
|
168375
|
-
return
|
|
169667
|
+
return Fragment54.from(result);
|
|
168376
169668
|
}
|
|
168377
169669
|
return fragment;
|
|
168378
169670
|
}
|
|
168379
169671
|
function withWrappers(node, wrap2, from2 = 0) {
|
|
168380
169672
|
for (let i2 = wrap2.length - 1; i2 >= from2; i2--)
|
|
168381
|
-
node = wrap2[i2].create(null,
|
|
169673
|
+
node = wrap2[i2].create(null, Fragment54.from(node));
|
|
168382
169674
|
return node;
|
|
168383
169675
|
}
|
|
168384
169676
|
function addToSibling(wrap2, lastWrap, node, sibling, depth) {
|
|
@@ -168388,14 +169680,14 @@ function addToSibling(wrap2, lastWrap, node, sibling, depth) {
|
|
|
168388
169680
|
return sibling.copy(sibling.content.replaceChild(sibling.childCount - 1, inner));
|
|
168389
169681
|
let match2 = sibling.contentMatchAt(sibling.childCount);
|
|
168390
169682
|
if (match2.matchType(depth == wrap2.length - 1 ? node.type : wrap2[depth + 1]))
|
|
168391
|
-
return sibling.copy(sibling.content.append(
|
|
169683
|
+
return sibling.copy(sibling.content.append(Fragment54.from(withWrappers(node, wrap2, depth + 1))));
|
|
168392
169684
|
}
|
|
168393
169685
|
}
|
|
168394
169686
|
function closeRight(node, depth) {
|
|
168395
169687
|
if (depth == 0)
|
|
168396
169688
|
return node;
|
|
168397
169689
|
let fragment = node.content.replaceChild(node.childCount - 1, closeRight(node.lastChild, depth - 1));
|
|
168398
|
-
let fill = node.contentMatchAt(node.childCount).fillBefore(
|
|
169690
|
+
let fill = node.contentMatchAt(node.childCount).fillBefore(Fragment54.empty, true);
|
|
168399
169691
|
return node.copy(fragment.append(fill));
|
|
168400
169692
|
}
|
|
168401
169693
|
function closeRange(fragment, side, from2, to, depth, openEnd) {
|
|
@@ -168405,7 +169697,7 @@ function closeRange(fragment, side, from2, to, depth, openEnd) {
|
|
|
168405
169697
|
if (depth < to - 1)
|
|
168406
169698
|
inner = closeRange(inner, side, from2, to, depth + 1, openEnd);
|
|
168407
169699
|
if (depth >= from2)
|
|
168408
|
-
inner = side < 0 ? node.contentMatchAt(0).fillBefore(inner, openEnd <= depth).append(inner) : inner.append(node.contentMatchAt(node.childCount).fillBefore(
|
|
169700
|
+
inner = side < 0 ? node.contentMatchAt(0).fillBefore(inner, openEnd <= depth).append(inner) : inner.append(node.contentMatchAt(node.childCount).fillBefore(Fragment54.empty, true));
|
|
168409
169701
|
return fragment.replaceChild(side < 0 ? 0 : fragment.childCount - 1, node.copy(inner));
|
|
168410
169702
|
}
|
|
168411
169703
|
function closeSlice(slice2, openStart, openEnd) {
|
|
@@ -168475,7 +169767,7 @@ function addContext(slice2, context) {
|
|
|
168475
169767
|
let type = schema.nodes[array[i2]];
|
|
168476
169768
|
if (!type || type.hasRequiredAttrs())
|
|
168477
169769
|
break;
|
|
168478
|
-
content =
|
|
169770
|
+
content = Fragment54.from(type.create(array[i2 + 1], content));
|
|
168479
169771
|
openStart++;
|
|
168480
169772
|
openEnd++;
|
|
168481
169773
|
}
|
|
@@ -170334,7 +171626,7 @@ function isMarkChange(cur, prev) {
|
|
|
170334
171626
|
let updated = [];
|
|
170335
171627
|
for (let i2 = 0; i2 < prev.childCount; i2++)
|
|
170336
171628
|
updated.push(update(prev.child(i2)));
|
|
170337
|
-
if (
|
|
171629
|
+
if (Fragment54.from(updated).eq(cur))
|
|
170338
171630
|
return { mark, type };
|
|
170339
171631
|
}
|
|
170340
171632
|
function looksLikeBackspace(old, start, end, $newStart, $newEnd) {
|
|
@@ -171484,10 +172776,10 @@ function deleteBarrier(state, $cut, dispatch, dir) {
|
|
|
171484
172776
|
let canDelAfter = !isolated && $cut.parent.canReplace($cut.index(), $cut.index() + 1);
|
|
171485
172777
|
if (canDelAfter && (conn = (match2 = before.contentMatchAt(before.childCount)).findWrapping(after.type)) && match2.matchType(conn[0] || after.type).validEnd) {
|
|
171486
172778
|
if (dispatch) {
|
|
171487
|
-
let end = $cut.pos + after.nodeSize, wrap2 =
|
|
172779
|
+
let end = $cut.pos + after.nodeSize, wrap2 = Fragment54.empty;
|
|
171488
172780
|
for (let i2 = conn.length - 1; i2 >= 0; i2--)
|
|
171489
|
-
wrap2 =
|
|
171490
|
-
wrap2 =
|
|
172781
|
+
wrap2 = Fragment54.from(conn[i2].create(null, wrap2));
|
|
172782
|
+
wrap2 = Fragment54.from(before.copy(wrap2));
|
|
171491
172783
|
let tr2 = state.tr.step(new ReplaceAroundStep($cut.pos - 1, end, $cut.pos, end, new Slice2(wrap2, 1, 0), conn.length, true));
|
|
171492
172784
|
let $joinAt = tr2.doc.resolve(end + 2 * conn.length);
|
|
171493
172785
|
if ($joinAt.nodeAfter && $joinAt.nodeAfter.type == before.type && canJoin(tr2.doc, $joinAt.pos))
|
|
@@ -171516,9 +172808,9 @@ function deleteBarrier(state, $cut, dispatch, dir) {
|
|
|
171516
172808
|
afterDepth++;
|
|
171517
172809
|
if (at.canReplace(at.childCount, at.childCount, afterText.content)) {
|
|
171518
172810
|
if (dispatch) {
|
|
171519
|
-
let end =
|
|
172811
|
+
let end = Fragment54.empty;
|
|
171520
172812
|
for (let i2 = wrap2.length - 1; i2 >= 0; i2--)
|
|
171521
|
-
end =
|
|
172813
|
+
end = Fragment54.from(wrap2[i2].copy(end));
|
|
171522
172814
|
let tr2 = state.tr.step(new ReplaceAroundStep($cut.pos - wrap2.length, $cut.pos + after.nodeSize, $cut.pos + afterDepth, $cut.pos + after.nodeSize - afterDepth, new Slice2(end, wrap2.length, 0), 0, true));
|
|
171523
172815
|
dispatch(tr2.scrollIntoView());
|
|
171524
172816
|
}
|
|
@@ -171635,9 +172927,9 @@ function wrapRangeInList(tr2, range, listType, attrs = null) {
|
|
|
171635
172927
|
return true;
|
|
171636
172928
|
}
|
|
171637
172929
|
function doWrapInList(tr2, range, wrappers, joinBefore, listType) {
|
|
171638
|
-
let content =
|
|
172930
|
+
let content = Fragment54.empty;
|
|
171639
172931
|
for (let i2 = wrappers.length - 1; i2 >= 0; i2--)
|
|
171640
|
-
content =
|
|
172932
|
+
content = Fragment54.from(wrappers[i2].type.create(wrappers[i2].attrs, content));
|
|
171641
172933
|
tr2.step(new ReplaceAroundStep(range.start - (joinBefore ? 2 : 0), range.end, range.start, range.end, new Slice2(content, 0, 0), wrappers.length, true));
|
|
171642
172934
|
let found2 = 0;
|
|
171643
172935
|
for (let i2 = 0; i2 < wrappers.length; i2++)
|
|
@@ -171671,7 +172963,7 @@ function liftListItem(itemType) {
|
|
|
171671
172963
|
function liftToOuterList(state, dispatch, itemType, range) {
|
|
171672
172964
|
let tr2 = state.tr, end = range.end, endOfList = range.$to.end(range.depth);
|
|
171673
172965
|
if (end < endOfList) {
|
|
171674
|
-
tr2.step(new ReplaceAroundStep(end - 1, endOfList, end, endOfList, new Slice2(
|
|
172966
|
+
tr2.step(new ReplaceAroundStep(end - 1, endOfList, end, endOfList, new Slice2(Fragment54.from(itemType.create(null, range.parent.copy())), 1, 0), 1, true));
|
|
171675
172967
|
range = new NodeRange(tr2.doc.resolve(range.$from.pos), tr2.doc.resolve(endOfList), range.depth);
|
|
171676
172968
|
}
|
|
171677
172969
|
const target = liftTarget(range);
|
|
@@ -171695,10 +172987,10 @@ function liftOutOfList(state, dispatch, range) {
|
|
|
171695
172987
|
return false;
|
|
171696
172988
|
let atStart = range.startIndex == 0, atEnd = range.endIndex == list.childCount;
|
|
171697
172989
|
let parent = $start.node(-1), indexBefore = $start.index(-1);
|
|
171698
|
-
if (!parent.canReplace(indexBefore + (atStart ? 0 : 1), indexBefore + 1, item.content.append(atEnd ?
|
|
172990
|
+
if (!parent.canReplace(indexBefore + (atStart ? 0 : 1), indexBefore + 1, item.content.append(atEnd ? Fragment54.empty : Fragment54.from(list))))
|
|
171699
172991
|
return false;
|
|
171700
172992
|
let start = $start.pos, end = start + item.nodeSize;
|
|
171701
|
-
tr2.step(new ReplaceAroundStep(start - (atStart ? 1 : 0), end + (atEnd ? 1 : 0), start + 1, end - 1, new Slice2((atStart ?
|
|
172993
|
+
tr2.step(new ReplaceAroundStep(start - (atStart ? 1 : 0), end + (atEnd ? 1 : 0), start + 1, end - 1, new Slice2((atStart ? Fragment54.empty : Fragment54.from(list.copy(Fragment54.empty))).append(atEnd ? Fragment54.empty : Fragment54.from(list.copy(Fragment54.empty))), atStart ? 0 : 1, atEnd ? 0 : 1), atStart ? 0 : 1));
|
|
171702
172994
|
dispatch(tr2.scrollIntoView());
|
|
171703
172995
|
return true;
|
|
171704
172996
|
}
|
|
@@ -171716,8 +173008,8 @@ function sinkListItem(itemType) {
|
|
|
171716
173008
|
return false;
|
|
171717
173009
|
if (dispatch) {
|
|
171718
173010
|
let nestedBefore = nodeBefore.lastChild && nodeBefore.lastChild.type == parent.type;
|
|
171719
|
-
let inner =
|
|
171720
|
-
let slice2 = new Slice2(
|
|
173011
|
+
let inner = Fragment54.from(nestedBefore ? itemType.create() : null);
|
|
173012
|
+
let slice2 = new Slice2(Fragment54.from(itemType.create(null, Fragment54.from(parent.type.create(null, inner)))), nestedBefore ? 3 : 1, 0);
|
|
171721
173013
|
let before = range.start, after = range.end;
|
|
171722
173014
|
dispatch(state.tr.step(new ReplaceAroundStep(before - (nestedBefore ? 3 : 1), after, before, after, slice2, 1, true)).scrollIntoView());
|
|
171723
173015
|
}
|
|
@@ -172348,7 +173640,7 @@ function inputRulesPlugin(props2) {
|
|
|
172348
173640
|
if (typeof text2 === "string") {
|
|
172349
173641
|
text2 = text2;
|
|
172350
173642
|
} else {
|
|
172351
|
-
text2 = getHTMLFromFragment(
|
|
173643
|
+
text2 = getHTMLFromFragment(Fragment54.from(text2), state.schema);
|
|
172352
173644
|
}
|
|
172353
173645
|
const { from: from2 } = simulatedInputMeta;
|
|
172354
173646
|
const to = from2 + text2.length;
|
|
@@ -172707,7 +173999,7 @@ function pasteRulesPlugin(props2) {
|
|
|
172707
173999
|
if (typeof text2 === "string") {
|
|
172708
174000
|
text2 = text2;
|
|
172709
174001
|
} else {
|
|
172710
|
-
text2 = getHTMLFromFragment(
|
|
174002
|
+
text2 = getHTMLFromFragment(Fragment54.from(text2), state.schema);
|
|
172711
174003
|
}
|
|
172712
174004
|
const { from: from3 } = simulatedPasteMeta;
|
|
172713
174005
|
const to2 = from3 + text2.length;
|
|
@@ -173408,7 +174700,7 @@ function elementFromString(value) {
|
|
|
173408
174700
|
return removeWhitespaces(html);
|
|
173409
174701
|
}
|
|
173410
174702
|
function createNodeFromContent(content, schema, options) {
|
|
173411
|
-
if (content instanceof Node2 || content instanceof
|
|
174703
|
+
if (content instanceof Node2 || content instanceof Fragment54) {
|
|
173412
174704
|
return content;
|
|
173413
174705
|
}
|
|
173414
174706
|
options = {
|
|
@@ -173422,7 +174714,7 @@ function createNodeFromContent(content, schema, options) {
|
|
|
173422
174714
|
try {
|
|
173423
174715
|
const isArrayContent = Array.isArray(content) && content.length > 0;
|
|
173424
174716
|
if (isArrayContent) {
|
|
173425
|
-
return
|
|
174717
|
+
return Fragment54.fromArray(content.map((item) => schema.nodeFromJSON(item)));
|
|
173426
174718
|
}
|
|
173427
174719
|
const node = schema.nodeFromJSON(content);
|
|
173428
174720
|
if (options.errorOnInvalidContent) {
|
|
@@ -173567,7 +174859,7 @@ var insertContentAt = (position, value, options) => ({ tr: tr2, dispatch, editor
|
|
|
173567
174859
|
if (isOnlyTextContent) {
|
|
173568
174860
|
if (Array.isArray(value)) {
|
|
173569
174861
|
newContent = value.map((v2) => v2.text || "").join("");
|
|
173570
|
-
} else if (value instanceof
|
|
174862
|
+
} else if (value instanceof Fragment54) {
|
|
173571
174863
|
let text2 = "";
|
|
173572
174864
|
value.forEach((node) => {
|
|
173573
174865
|
if (node.text) {
|
|
@@ -174366,10 +175658,10 @@ var splitListItem = (typeOrName, overrideAttrs = {}) => ({ tr: tr2, state, dispa
|
|
|
174366
175658
|
return false;
|
|
174367
175659
|
}
|
|
174368
175660
|
if (dispatch) {
|
|
174369
|
-
let wrap2 =
|
|
175661
|
+
let wrap2 = Fragment54.empty;
|
|
174370
175662
|
const depthBefore = $from.index(-1) ? 1 : $from.index(-2) ? 2 : 3;
|
|
174371
175663
|
for (let d2 = $from.depth - depthBefore; d2 >= $from.depth - 3; d2 -= 1) {
|
|
174372
|
-
wrap2 =
|
|
175664
|
+
wrap2 = Fragment54.from($from.node(d2).copy(wrap2));
|
|
174373
175665
|
}
|
|
174374
175666
|
const depthAfter = $from.indexAfter(-1) < $from.node(-2).childCount ? 1 : $from.indexAfter(-2) < $from.node(-3).childCount ? 2 : 3;
|
|
174375
175667
|
const newNextTypeAttributes2 = {
|
|
@@ -174377,7 +175669,7 @@ var splitListItem = (typeOrName, overrideAttrs = {}) => ({ tr: tr2, state, dispa
|
|
|
174377
175669
|
...overrideAttrs
|
|
174378
175670
|
};
|
|
174379
175671
|
const nextType2 = ((_a = type.contentMatch.defaultType) === null || _a === void 0 ? void 0 : _a.createAndFill(newNextTypeAttributes2)) || void 0;
|
|
174380
|
-
wrap2 = wrap2.append(
|
|
175672
|
+
wrap2 = wrap2.append(Fragment54.from(type.createAndFill(null, nextType2) || void 0));
|
|
174381
175673
|
const start = $from.before($from.depth - (depthBefore - 1));
|
|
174382
175674
|
tr2.replace(start, $from.after(-depthAfter), new Slice2(wrap2, 4 - depthBefore, 0));
|
|
174383
175675
|
let sel = -1;
|
|
@@ -176678,9 +177970,9 @@ function beforeinput(view, event) {
|
|
|
176678
177970
|
let insert2 = $from.parent.contentMatchAt($from.index()).findWrapping(view.state.schema.nodes.text);
|
|
176679
177971
|
if (!insert2)
|
|
176680
177972
|
return false;
|
|
176681
|
-
let frag =
|
|
177973
|
+
let frag = Fragment54.empty;
|
|
176682
177974
|
for (let i2 = insert2.length - 1; i2 >= 0; i2--)
|
|
176683
|
-
frag =
|
|
177975
|
+
frag = Fragment54.from(insert2[i2].createAndFill(null, frag));
|
|
176684
177976
|
let tr2 = view.state.tr.replace($from.pos, $from.pos, new Slice2(frag, 0, 0));
|
|
176685
177977
|
tr2.setSelection(TextSelection.near(tr2.doc.resolve($from.pos + 1)));
|
|
176686
177978
|
view.dispatch(tr2);
|
|
@@ -180314,7 +181606,7 @@ function requireUseSyncExternalStoreShim_development() {
|
|
|
180314
181606
|
return x === y2 && (x !== 0 || 1 / x === 1 / y2) || x !== x && y2 !== y2;
|
|
180315
181607
|
}
|
|
180316
181608
|
var objectIs = typeof Object.is === "function" ? Object.is : is;
|
|
180317
|
-
var
|
|
181609
|
+
var useState95 = React$1.useState, useEffect100 = React$1.useEffect, useLayoutEffect11 = React$1.useLayoutEffect, useDebugValue2 = React$1.useDebugValue;
|
|
180318
181610
|
var didWarnOld18Alpha = false;
|
|
180319
181611
|
var didWarnUncachedGetSnapshot = false;
|
|
180320
181612
|
function useSyncExternalStore7(subscribe, getSnapshot, getServerSnapshot) {
|
|
@@ -180336,7 +181628,7 @@ function requireUseSyncExternalStoreShim_development() {
|
|
|
180336
181628
|
}
|
|
180337
181629
|
}
|
|
180338
181630
|
}
|
|
180339
|
-
var _useState =
|
|
181631
|
+
var _useState = useState95({
|
|
180340
181632
|
inst: {
|
|
180341
181633
|
value,
|
|
180342
181634
|
getSnapshot
|
|
@@ -180351,7 +181643,7 @@ function requireUseSyncExternalStoreShim_development() {
|
|
|
180351
181643
|
});
|
|
180352
181644
|
}
|
|
180353
181645
|
}, [subscribe, value, getSnapshot]);
|
|
180354
|
-
|
|
181646
|
+
useEffect100(function() {
|
|
180355
181647
|
if (checkIfSnapshotChanged(inst)) {
|
|
180356
181648
|
forceUpdate({
|
|
180357
181649
|
inst
|
|
@@ -180616,7 +181908,7 @@ function requireWithSelector_development() {
|
|
|
180616
181908
|
}
|
|
180617
181909
|
var objectIs = typeof Object.is === "function" ? Object.is : is;
|
|
180618
181910
|
var useSyncExternalStore7 = shim2.useSyncExternalStore;
|
|
180619
|
-
var useRef81 = React$1.useRef,
|
|
181911
|
+
var useRef81 = React$1.useRef, useEffect100 = React$1.useEffect, useMemo92 = React$1.useMemo, useDebugValue2 = React$1.useDebugValue;
|
|
180620
181912
|
function useSyncExternalStoreWithSelector(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
180621
181913
|
var instRef = useRef81(null);
|
|
180622
181914
|
var inst;
|
|
@@ -180673,7 +181965,7 @@ function requireWithSelector_development() {
|
|
|
180673
181965
|
return [getSnapshotWithSelector, getServerSnapshotWithSelector];
|
|
180674
181966
|
}, [getSnapshot, getServerSnapshot, selector, isEqual]), getSelection2 = _useMemo[0], getServerSelection = _useMemo[1];
|
|
180675
181967
|
var value = useSyncExternalStore7(subscribe, getSelection2, getServerSelection);
|
|
180676
|
-
|
|
181968
|
+
useEffect100(function() {
|
|
180677
181969
|
inst.hasValue = true;
|
|
180678
181970
|
inst.value = value;
|
|
180679
181971
|
}, [value]);
|
|
@@ -186543,4 +187835,4 @@ lucide-react/dist/esm/lucide-react.mjs:
|
|
|
186543
187835
|
*)
|
|
186544
187836
|
*/
|
|
186545
187837
|
|
|
186546
|
-
export { AMBIENT_BACKGROUND_ROLES2 as AMBIENT_BACKGROUND_ROLES, ArrowDown, ArrowUp, BackgroundColorField, BackgroundGradientField, Badge2 as Badge, BlockApiProvider, Box, Button, CSS2 as CSS, Callout, CalloutDescription, CalloutTitle, Card, CardContent, CardHeader, CardTitle, Check, ChevronDown, ChevronLeft, ChevronRight, Collapsible2 as Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ColorPicker, Combobox, CommandMultiSelect, Content, ContentFieldsForm, ContentSpinner, Copy, DEFAULT_LAUNCH_READINESS_INPUT, Dialog2 as Dialog, DialogClose2 as DialogClose, DialogContent2 as DialogContent, DialogDescription2 as DialogDescription, DialogFooter, DialogHeader, DialogTitle2 as DialogTitle, DndContext, DropdownMenu2 as DropdownMenu, DropdownMenuContent2 as DropdownMenuContent, DropdownMenuItem2 as DropdownMenuItem, DropdownMenuLabel2 as DropdownMenuLabel, DropdownMenuSeparator2 as DropdownMenuSeparator, DropdownMenuTrigger2 as DropdownMenuTrigger, EDITABLE_SURFACE_FORWARDING_PROP, EMPTY_DOC, EditableBlockProvider, EditorChrome, EditorProvider, EllipsisVertical, EmptyState2 as EmptyState, EntryControllerProvider, EyeOff, FieldFrame, FixedBottomSurface, FormRenderer, GRADIENT_PRESETS, GripVertical, Image, ImagePlus, Input, KeyboardCode, LINKED_CONTENT_ENTRY_META_KEY, Label4 as Label, List2 as List, LoaderCircle, ManifestForm, Maximize2, MediaEditor, MediaEditorProvider, MediaPickerDialog, MediaPickerMini, Monitor, PAGE_DESIGN_EDITOR_STATE_FETCH_ERROR_MESSAGE, PUBLIC_FILE_FIELD_KINDS, PageRenderer, Palette, PaletteProvider, Pencil, Plus, PointerSensor, PreviewDesignCoordinatorProvider, PreviewDesignHistoryOrderProvider, PreviewRichTextEditor, PreviewTextEditor, PreviewThemeOverlayProvider, ResizableSplitPane, RichText2 as RichText, RichTextEditorSurface, Root2, RotateCcw, SECTION_BACKGROUND_MIN_SOURCE_HEIGHT, SECTION_BACKGROUND_MIN_SOURCE_WIDTH, SITE_CHROME_CLASS_NAMES, SITE_CHROME_VISIBLE_HEADER_SELECTOR, SUBROUTE_KINDS, ScrollableDialogContent, SdkConfigProvider, Search, Select2 as Select, SelectContent2 as SelectContent, SelectItem2 as SelectItem, SelectTrigger2 as SelectTrigger, SelectValue2 as SelectValue, Separator2 as Separator, Settings, SiteChromeCustomizeProvider, SiteDocumentLayout, Smartphone, Sparkles, Surface, Tablet, Tabs2 as Tabs, TabsContent2 as TabsContent, TabsList2 as TabsList, TabsTrigger2 as TabsTrigger, Text2 as Text, Textarea, ThemeScope, Trash2, TriangleAlert, Trigger, Upload, X, applyBackgroundOverrideContentPatch, applyCompiledRuntimeFieldsToContent, applyFeatureCardIconSuggestions, applyPageDesignEditorAction, applyResolvedSelections, asDesignBlockId, asRecord,
|
|
187838
|
+
export { AMBIENT_BACKGROUND_ROLES2 as AMBIENT_BACKGROUND_ROLES, ArrowDown, ArrowUp, BackgroundColorField, BackgroundGradientField, Badge2 as Badge, BlockApiProvider, Box, Button, CSS2 as CSS, Callout, CalloutDescription, CalloutTitle, Card, CardContent, CardHeader, CardTitle, Check, ChevronDown, ChevronLeft, ChevronRight, Collapsible2 as Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ColorPicker, Combobox, CommandMultiSelect, Content, ContentFieldsForm, ContentSpinner, Copy, DEFAULT_LAUNCH_READINESS_INPUT, Dialog2 as Dialog, DialogClose2 as DialogClose, DialogContent2 as DialogContent, DialogDescription2 as DialogDescription, DialogFooter, DialogHeader, DialogTitle2 as DialogTitle, DndContext, DropdownMenu2 as DropdownMenu, DropdownMenuContent2 as DropdownMenuContent, DropdownMenuItem2 as DropdownMenuItem, DropdownMenuLabel2 as DropdownMenuLabel, DropdownMenuSeparator2 as DropdownMenuSeparator, DropdownMenuTrigger2 as DropdownMenuTrigger, EDITABLE_SURFACE_FORWARDING_PROP, EMPTY_DOC, EditableBlockProvider, EditorChrome, EditorProvider, EllipsisVertical, EmptyState2 as EmptyState, EntryControllerProvider, EyeOff, FieldFrame, FixedBottomSurface, FormRenderer, GRADIENT_PRESETS, GripVertical, Image, ImagePlus, Input, KeyboardCode, LINKED_CONTENT_ENTRY_META_KEY, Label4 as Label, List2 as List, LoaderCircle, ManifestForm, Maximize2, MediaEditor, MediaEditorProvider, MediaPickerDialog, MediaPickerMini, Monitor, PAGE_DESIGN_EDITOR_STATE_FETCH_ERROR_MESSAGE, PUBLIC_FILE_FIELD_KINDS, PageRenderer, Palette, PaletteProvider, Pencil, Plus, PointerSensor, PreviewDesignCoordinatorProvider, PreviewDesignHistoryOrderProvider, PreviewRichTextEditor, PreviewTextEditor, PreviewThemeOverlayProvider, ResizableSplitPane, RichText2 as RichText, RichTextEditorSurface, Root2, RotateCcw, SECTION_BACKGROUND_MIN_SOURCE_HEIGHT, SECTION_BACKGROUND_MIN_SOURCE_WIDTH, SITE_CHROME_CLASS_NAMES, SITE_CHROME_VISIBLE_HEADER_SELECTOR, SUBROUTE_KINDS, ScrollableDialogContent, SdkConfigProvider, Search, Select2 as Select, SelectContent2 as SelectContent, SelectItem2 as SelectItem, SelectTrigger2 as SelectTrigger, SelectValue2 as SelectValue, Separator2 as Separator, Settings, SiteChromeCustomizeProvider, SiteDocumentLayout, Smartphone, Sparkles, Surface, Tablet, Tabs2 as Tabs, TabsContent2 as TabsContent, TabsList2 as TabsList, TabsTrigger2 as TabsTrigger, Text2 as Text, Textarea, ThemeScope, Trash2, TriangleAlert, Trigger, Upload, X, applyBackgroundOverrideContentPatch, applyCompiledRuntimeFieldsToContent, applyFeatureCardIconSuggestions, applyPageDesignEditorAction, applyResolvedSelections, asDesignBlockId, asRecord, assertNever, assertNever5 as assertNever2, attachRenderableMediaAssetFields, augmentManifestWithStyleGroups, backgroundColorTokens, backgroundOverrideEquals, beginAutosaveBatch, buildApplySiteStyleSelectionBody, buildEditorModelRuntimeFieldsByBlockId, buildSiteChromeLookModels, buildThemeRuntime, buttonPersonalities, canCycleBackgroundOverrideValue, canRedoHistory, canUndoHistory, cancelPreview, classifyHistoryShortcut, classifyKnownMimeType, clearTypographyFontOverrides, clientComponentRegistry, closestCenter, cn, confirmAutosaveBatch, createBlock, createCustomBlockRegistry, createEditorInsertBlockCommand, createEditorRemoveBlockCommand, createEditorReorderBlocksCommand, createEntrySlotBlock, createFeatureCardIconKey, createHistoryState, createManifestFormAdapter, createManifestValidation, createMicrobatcher, createOptimisticActionRunner, createRoutingHelpers, createSnapshotFromPageRecord, createStoreBackend, createStyleConfiguratorState, curatedSiteStyles, cycleSiteChromeLookId, cycleableSiteChromeOptions, decodePublicProductCategorySelectorQuery, defaultBackgroundOverrideForMode, defaultSectionTransitionVariantForFamily, deleteBlock, deleteEntrySlotBlock, deriveLaunchReadiness, deriveRouteMetadataPresentation, deriveStyleConfiguratorCapabilities, deriveTransactionCapabilities, designRuntimeRulesForTheme, dismissNotices, dismissWarnings, emitMediaCropDebug, enabledBackgroundModes, enqueueTransaction, evaluateTypographyFontSlot, evaluateVisibility, expectParsedBrandedId, findButtonPersonality, findFooterLook, findPaletteVariant, findTypographyPreset, foldSubroute, formatSiteChromeBackgroundTokenLabel, getBlockDefinition, getBlockIconSemanticFallbackId, getClientRect, getCuratedSiteStyle, getDirectImageUrlForMediaAsset, getFeatureCardIconCompletion, getFieldIntent, getFooterLayout, getGeneratedBlockIconStyleState, getHeaderLayout, getHeaderStyle, getIconComponent, getIconPickerOptionsForPreset, getLinkedContentEntryMeta, getModalConfig, getPageDesignEditorState, getRichTextImagePositionFromTarget, gradientToCss, idleEditorTransactionQueueState, imagePoolForOverride, inferLegacyOfferingsPreviewGroupOrder, insertOrReplaceRichTextImage, isHeaderField, isIconPickerPreset, isInternalResolvedLinkValue, isKeyboardEvent, isKnownIconName, isNonEmptyValue, isObjectRecord2 as isObjectRecord, isOfferingsPreviewSourceKey, isPreviewingChange, isSupportedLoaderEndpoint, isSvgMimeType, isThemeV2NormalEditorRawStyleFieldName, isThemeV2NormalEditorRawStylePath, listBlockDescriptors, listContentTypes, listEntryPageContentSlots, lucide_react_exports, markApplyFailed, markApplySaved, markApplySaving, mergeBlockDescriptorsWithRegistry, mergeManifestWithSdkOptions, mutateBlockContent, normalEditorCuratedPromotedFieldPaths, normalizeOfferingsPreviewGroupOrder, normalizePickerSearchThreshold, normalizePublicApiLoaderParams, openRow, paletteOverridesSchema, paletteVariants, parseAspectRatioValue, parseBackgroundOverrideFromContent, parseBlockIconValue, parseMediaAssetId, parseSiteIconStyleGuideVersionId, parseSiteId, planBackgroundOverride, planBackgroundTransition, planPageDesignLayoutLookCompatibility, planSiteChromeFooterLayoutSelection, planSiteChromeLookSelection, planSiteDocument, planSiteStylePreviewChange, prefetchBlockData, previewAssistantEnabled, previewButtonPersonality, previewDesignHistoryDomainForCommand, previewFooterLook, previewHeaderLayout, previewHeaderStyle, previewPaletteVariant, previewSiteStyle, previewTypographyPreset, pushHistoryEntry, rankBackgroundImagePoolItems, recoveryConflictCopy, redoHistory, rejectAutosaveBatch, renderBlock, reorderBlocks, reorderEntrySlotBlocks, requireEntriesForCuratedChoices, resolveBackgroundCapability, resolveBlockTitle, resolveContentTitle, resolveIconPickerPreset, resolveImageUrlWithContext, resolveMediaSlotContract, resolveOfferingsPreviewGroupOrderEntries, resolvePageRouteSlug, resolvePickerSelectionLabel, resolvePreviewSidebarTab, resolveStyleConfiguratorInitialSnapshot, resolveVideoSelectionIntentForMediaField, resolveVisiblePromotedFieldPathsForEditorBlock, sectionTransitionFamilies, sectionTransitionFamilyForBoundaryOptionId, sectionTransitionVariantForBoundaryOptionId, selectPreviewDesignHistoryDomain, selectionSnapshotFromApplySiteStyleSelectionResponse, setPaletteOverrides, setTypographyBodyFontOverride, setTypographyHeadingFontOverride, shouldShowPickerSearch, siteFooterManifest, siteHeaderManifest, siteOptionSources, stableSerialize, styleConfiguratorHistoryEntryForPersistedSelection, suggestFeatureCardSemanticIcons, suggestSemanticIconForFeatureCard, surfaceResolutionContextFromTheme, syncStyleConfiguratorState, systemCustomizeFacetAppliesToLayoutVariant, systemCustomizeFacetApplyContentPatch, systemCustomizeFacetCurrentValue, systemCustomizeFacetDefinitionForBlock, systemCustomizeFacetDefinitionsForBlock, systemCustomizeFacetLabelForValue, systemCustomizeFacetNextValue, systemCustomizeFacetRollbackContentPatch, toFeatureCardIconSuggestionInputs, toRoutableLinkPayload, toggleRow, typographyPresets, undoHistory, unfinishedBlockCopy, unsafeAsEditorBlockId, unsafeAsEditorBlockValues, unsafeAsLinkedContentEntryId, unwrapResponse, useAsyncPickerOptions, useBackendWatch, useBlockContext, useCombinedRefs, useDebouncedLatestSave, useDndContext, useDraggable, useDroppable, useEditor, useEditorUiStore, useEditorUiStoreInstance, useEntryController, useEntryEditorController, useField, useIsomorphicLayoutEffect3 as useIsomorphicLayoutEffect, useMediaEditor, useMediaEditorOptional, useMultiAutosave, useOptionalEditorUiStoreInstance, usePreviewDesignCoordinator, usePreviewDesignHistoryOrder, usePreviewThemeOverlay, useRichTextEditor, useSdkConfig, useSensor, useSensors, useSiteChromeCustomizeOptional, useUISelector, useUniqueId, validateBlockManifestIssues, visibleHeaderClearancePx };
|