riverbankcms 0.12.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/acceptance/matrix.mjs +3 -3
- package/dist/cli/index.mjs +1080 -867
- package/dist/cli/init-docs/content/cli-reference.md +7 -1
- package/dist/cli/init-docs/content/content-management.md +7 -1
- package/dist/cli/init-docs/content/workflow-add-block.md +6 -0
- package/dist/cli/init-docs/content/workflow-create-page.md +6 -0
- package/dist/cli/init-docs/content/workflow-editor-workflows.md +2 -2
- package/dist/{eventUpsertInputSchema-BpS5YBiA.mjs → eventUpsertInputSchema-CmkfzGW0.mjs} +37 -85
- package/dist/load-config-BfEYgU02.mjs +4 -0
- package/dist/{load-config-BhUqNoQL.mjs → load-config-D0Qfqh2m.mjs} +2 -2
- package/dist/{local-sync-CCfQzCgJ.mjs → local-sync-C-FEofmj.mjs} +68 -26
- package/dist/{plan-DzYyb_iu.mjs → plan-mb_YslEh.mjs} +1 -1
- package/dist/scaffold/index.mjs +2 -2
- package/dist/{sdk-event-upsert-CuDl9Gk1.mjs → sdk-event-upsert-CqCQwcwu.mjs} +18 -44
- package/dist/{src-9YtMip19.mjs → src-CxEAuQpf.mjs} +242 -14
- package/dist/testing.mjs +3 -3
- package/package.json +1 -1
- package/dist/load-config-BmF4zLjw.mjs +0 -4
package/dist/cli/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as getCuratedSiteStyle, $n as rgbColorValue, $t as themeButtonVariantClassNames, A as createBlockRef, An as stripStaleTransitionStyleGroup, Ar as offeringsPreviewCompositionTreatmentValues, At as INPUT_SPACING_MAP, B as createSiteCommandSiteRef, Bn as getTextColorForBackground, Br as oklchToHexGamut, Bt as resolvedButtonColourDeclarations, C as pagePathForCommand, Cn as boxBackgroundSchema, Cr as defineNoBlockDesignCapability, Ct as NAV_LINK_TEXT_SIZE_MAP, D as require_react, Dn as resolveTokenOrCssColorValue, Dr as headingDecorationColorTokenValues, Dt as navEffectPolicy, E as require_jsx_runtime, En as resolveThemeColorReferenceValue, Er as featureCardCompositionTreatmentValues, Et as navLinkOwnsUnderline, F as createEventSeriesRef, Fn as generateCardCoreCss, Fr as onColorTokenName, Ft as ACCORDION_TRIGGER_LETTER_SPACING, G as headerForegroundCandidates, Gn as backgroundAppearanceColorTokenNames, Gt as resolveContextualButtonRole, H as refSlug, Hn as cardRoleSchema, Ht as contextualButtonSurfaceResetStyles, I as createFooterRef, In as getDefaultCardVariants, Ir as ORDINARY_TEXT_MIN_CONTRAST_RATIO, It as ICON_CONFIG, J as readOpeningForegroundProjection, Jn as TokenResolver, Jt as generateBaseInteractiveCSS, K as headerLeafTextColor, Kn as backgroundAppearanceQuickColorTokenNames, Kt as generateDefaultButtonSystem, L as createFormRef, Ln as generateCardCss, Lr as contrastRatio, Lt as ICON_SIZE_PX, M as createCommandRef, Mn as mediaSchema, Mr as tileTreatmentValues, Mt as ACCORDION_OPEN_ACCENT_THICKNESS, N as createContentEntryRef, Nn as mediaTypeDiscriminants, Nr as visibleHeadingDecorationFamilyValues, Nt as ACCORDION_SPACING_MAP, O as pickShadeTowardBackground, On as pageDesignEditorBackgroundOverrideOwner, Or as introCompositionTreatmentValues, Ot as FONT_WEIGHT_MAP, P as createEventCategoryRef, Pn as persistableMediaSchema, Pr as isOnColorBackgroundCandidateToken, Pt as ACCORDION_TRIGGER_FONT_SCALE, Q as headerRootPaint, Qn as mergeStyles, Qt as themeButtonSizeClassName, R as createNavigationRef, Rn as renderCssDeclarations, Rr as featuresFromHex, Rt as generateButtonCss, S as pageIdentifierForCommand, Sn as boxBackgroundOverlaySchema, Sr as defineFrameCapability, St as NAV_LINK_PADDING_X_MAP, Tn as resolveOnColorForThemeToken, Tr as eyebrowTreatmentValues, Tt as navLinkOwnsHoverForeground, U as slugPart, Un as cardVariantRoleValues, Ut as contextualButtonSurfaceStyles, V as createVenueRef, Vn as generateShadowValue$1, Vr as __toESM, Vt as resolvedButtonFocusDeclarations, W as effectiveHeaderNavLinkStyle, Wn as normalizeCardRole, Wt as deriveButtonSurfaceContext, X as mergeHeaderNavTypographyPreference, Xn as borderColorStyle, Xt as parseThemeButtonVariantId, Y as getNavLinkPreset, Yn as backgroundColorStyle, Yt as generateInteractiveChildInheritanceCSS, Z as readHeaderNavFontSizePreference, Zn as cssVarValue, Zt as themeButtonExtraClassesWithTrailingIcon, _ as getSiteCommandMetadata, _n as composeBoundary, _r as asDesignBlockId, _t as parseBlockCustomCssRules, an as gradientToCss, ar as DEFAULT_SURFACE_TEXT_COLOR, at as BREAKPOINT_LG, b as entryIdentifierForCommand, bn as anglePolygonCss, br as assertNever$4, bt as NAV_LINK_LETTER_SPACING_MAP, c as isEventVisibility, cn as parseGradientPresetId, cr as surfaceForegroundStyle, ct as BREAKPOINT_XL, d as stableStringify, dn as VARIANT_ROLES, dr as parseBlockColorToken, dt as MQ_SM_DOWN, en as parseThemeForPersistence, er as textColorStyle, et as themeSchema, f as createDryRunReport, fn as buttonVariantIdSchema, fr as parseColorTokenParts, ft as MQ_SM_UP, g as evaluateSiteCommandExposure, gn as boundaryLayout, gt as getComponentShadowVar, h as evaluateSiteCommandBatchExposure, hr as defineBlockDesignMetadata, ht as getComponentBorderWidthPx, in as footerModeSchema, ir as resolveSurfaceForeground, it as renderHeaderPaintTargetRules, j as createBlocksRef, jn as mediaIdentifierSchema, jr as testimonialsCompositionTreatmentValues, jt as LABEL_FONT_SIZE_MAP, k as generateCssVars, kn as siteChromeBackgroundOverrideOwner, kr as makeBoundaryId, kt as INPUT_FONT_SIZE_MAP, l as venueManagementFields, lr as surfaceForegroundValue, lt as MQ_LG_UP, m as mapEventCommandContent, mr as defaultThemeTokens, mt as headerVariantValues, nn as formatButtonColourContractError, nr as selectLogoVariant, nt as generateMobileOverlayBackdropFilterFix, o as classifySdkEventBookingOffer, on as GRADIENT_PRESET_IDS, or as surfaceForegroundDeclarations, ot as BREAKPOINT_MD, p as parseAndPlanCommandBatchForTypes, pn as unsafeAsOpaqueButtonColourToken, pr as buildThemeTokens, pt as MQ_TABLET_ONLY, q as transparentHeaderForegroundInput, qn as parseBackgroundAppearanceColorToken, qt as generateEffectsCSS, rn as generateShadowValue, rr as surfaceToneFromForegroundToken, rt as getHeaderPaintTargets, sn as getGradientPreset, sr as surfaceForegroundInputFromResolved, st as BREAKPOINT_SM, t as classifySdkEventTiming, tn as compileButtonColourStates, tr as textColorValue, tt as generateHeaderScrollTreatmentStyles, u as sortRecord, un as PUBLIC_BUTTON_ROLES, ur as parseThemeColorToken, ut as MQ_MD_DOWN, v as blockIdentifierForCommand, vn as sectionFactsForContent, vt as parseCustomCssRules, w as hasConfiguredBookingVertical, wn as isCssColorLiteral, wr as eventListTreatmentValues, wt as navLinkHoverColorCandidate, x as pageIdentifierForBlockCommand, xn as transitionCatalogueEntries, xr as defineBlockDesignCapability, xt as NAV_LINK_PADDING_MAP, y as blockOrderIdentifiersForCommand, yn as boundaryRuntimeMetricsForDecorativeTransition, yt as NAV_LINK_BORDER_RADIUS_MAP, z as createPageRef, zn as expandPalette, zr as hexToRgb, zt as RESOLVED_BUTTON_DISABLED_DECLARATIONS } from "../sdk-event-upsert-
|
|
3
|
-
import { $ as parseEventPageSurfaceSubject, B as formatBookingDate, C as parseMailingListContentVersionId, D as sameMailingListPlacementTargeting, E as planMailingListChoicePresentation, G as getBookingLocalDateKey, H as formatBookingTime, I as normalizeLocationAddressText, K as getLocalScheduleDate, L as toLocationCoordinates, M as parseMailingListPlacementTargeting, O as DEFAULT_MAILING_LIST_SUCCESS_MESSAGE, Ot as unsafeAsMediaAssetId, P as assertAllowedPublicUrl, R as selectCategoryView, Rt as unsafeAsStaffMemberId, S as parseMailingListBlockId, St as unsafeAsDemoCapability, T as parseMailingListRuntimeContext, U as formatLocalScheduleDate, Ut as err, V as formatBookingDateParts, W as formatLocalScheduleTime, Wt as ok, X as toScheduledBookingDateRange, Y as toBookingTimeZone, Z as toScheduledBookingDateTime, _ as createSecret, _t as parseUserId, at as publicEventPricingType, c as DEFAULT_EVENT_TYPE_PRESETS, d as SURFACE_EVENT_PRESET_VALUES, dt as assertNever, et as formatBookingPriceDisplay, f as WHOLE_SERIES_EVENT_PRESET_VALUES, ft as parseApiKeyId, g as resolveWholeSeriesBookingPhase, gt as parseSiteId, h as orderedLiveRunSessions, ht as parsePageId, it as publicEventPricingDisplay, j as parseFooterCompositionV1, jt as unsafeAsPositiveByteCount, k as parseMailingListProviderScope, l as EVENT_PRESET_VALUES, m as CANCELLED_SESSION_STATUS, mt as parseMediaAssetId, n as NAVIGATION_LOCATIONS, nt as isPublicEventPricingOptionDisplayable, ot as resolveExactOrFreePriceDisplay, p as publicReadFreshnessSeconds, pt as parseEventSeriesId, q as getLocalScheduleTime, r as areConfiguredBookingVerticalConfigsEqual, rt as publicEventPricingCurrency, s as resolveSiteVerticalBookingConfig, st as resolvePricingOptionsPriceDisplay, t as resolveEventCatalogue, tt as formatEventPricing, ut as formatCurrencyAmount, v as exposeSecret, vt as unsafeAsAppointmentResourceId, w as parseMailingListSignedSourceToken, x as buildMailingListSignupBlockSourceRef, y as parseManagementKey, z as buildBookingUtcDateWindow } from "../src-
|
|
4
|
-
import { $ as sdkListEventsResponseSchema, A as resolveMediaTransformForAspect, B as asRecord$1, C as walkAndCollectImageAttrs, D as normalizeWidthCandidates, E as rotateNormalizedPoint, F as buildMediaIdentifierFromFilename, G as parseSafeDownloadFilename, H as FILE_SIZE_LIMITS, I as parseMediaIdentifier, J as createHttpClient, K as ManagementApiError, L as deriveVideoSlotPolicy, M as getDirectImageUrlForSiteScopedPath, N as getImageUrl, O as isExplicitRectCrop, P as isSiteScopedDirectImageStoragePath, Q as sdkGetEventResponseSchema, R as resolveVideoSelectionIntentForMediaField, S as buildRenderableMediaAssetIndex, St as sdkConfiguredBookingVerticalConfigSchema, T as looksLikeUuid$1, U as classifyKnownMimeType, V as parseRelativeStoragePath, W as managementMediaLibraryUploadLimitForMimeType, X as managementTransportError, Y as is404Error, Z as sdkConfigureBookingVerticalResponseSchema, _ as buildSettingsUpdateInput, _t as sdkSavePageDesignResponseSchema, a as prepareLocalMediaForPush, at as customLinkSchema$1, b as isMediaValue, bt as sdkListEventOccurrencesResponseSchema, c as writeBinaryFileAtomic, ct as internalLinkSchema, d as normalizeMediaValueToIdentifierOnly, dt as isInternalResolvedLinkValue, et as sdkTakeEventOfflineResponseSchema, f as walkLocalContentMedia, ft as isResolvedInternalLinkEntityType, g as SETTINGS_FILE_FIELDS, gt as sdkGetPageDesignResponseSchema, h as extractMediaIdentifiers, ht as portablePageDesignSchema, i as applyLocalMediaPush, it as RESOLVED_INTERNAL_LINK_ENTITY_TYPES, j as getDirectImageUrlForRelativePath, k as parseAspectRatioValue, l as sha256, lt as internalResolvedLinkSchema, m as downloadMedia, mt as pageLinkSchema$1, nt as sdkSettingsUpdateSchema, o as admitBinaryWriteDestination, ot as entryLinkSchema$1, p as buildStorageUrl, pt as linkSchema, q as buildRequestInfo, r as syncLocalMediaForPull, rt as linkPayloadSchema, s as readStableBinaryFile, st as externalLinkSchema$1, t as revalidateLocalMediaPushPlan, tt as sdkUpsertEventResponseSchema, u as normalizeMediaIdentifierInput, ut as internalRouteOnlyLinkSchema, v as hasOwnSettingsField, vt as sdkDeleteEventOccurrenceResponseSchema, w as deleteEnvSpecificKeys, x as attachRenderableMediaAssetFields, xt as sdkReorderResponseSchema, y as writeMediaManifest, yt as sdkEventOccurrenceResponseSchema, z as getMimeType } from "../local-sync-
|
|
5
|
-
import { n as CliSdkPeerError, r as CLI_VERSION, t as loadConfigFile } from "../load-config-
|
|
6
|
-
import { a as RichTextDocSchema, c as isRecord$
|
|
7
|
-
import { a as prepareScaffoldExecution, c as LOCAL_PACKAGE_VENDOR_DIR, d as loadGeneratedPackageRanges, i as preflightScaffoldTargets, n as createScaffoldCompletion, s as deriveScaffoldLocalManifest, t as deriveScaffoldPlan } from "../plan-
|
|
2
|
+
import { $ as getCuratedSiteStyle, $n as rgbColorValue, $t as themeButtonVariantClassNames, A as createBlockRef, An as stripStaleTransitionStyleGroup, Ar as offeringsPreviewCompositionTreatmentValues, At as INPUT_SPACING_MAP, B as createSiteCommandSiteRef, Bn as getTextColorForBackground, Br as oklchToHexGamut, Bt as resolvedButtonColourDeclarations, C as pagePathForCommand, Cn as boxBackgroundSchema, Cr as defineNoBlockDesignCapability, Ct as NAV_LINK_TEXT_SIZE_MAP, D as require_react, Dn as resolveTokenOrCssColorValue, Dr as headingDecorationColorTokenValues, Dt as navEffectPolicy, E as require_jsx_runtime, En as resolveThemeColorReferenceValue, Er as featureCardCompositionTreatmentValues, Et as navLinkOwnsUnderline, F as createEventSeriesRef, Fn as generateCardCoreCss, Fr as onColorTokenName, Ft as ACCORDION_TRIGGER_LETTER_SPACING, G as headerForegroundCandidates, Gn as backgroundAppearanceColorTokenNames, Gt as resolveContextualButtonRole, H as refSlug, Hn as cardRoleSchema, Ht as contextualButtonSurfaceResetStyles, I as createFooterRef, In as getDefaultCardVariants, Ir as ORDINARY_TEXT_MIN_CONTRAST_RATIO, It as ICON_CONFIG, J as readOpeningForegroundProjection, Jn as TokenResolver, Jt as generateBaseInteractiveCSS, K as headerLeafTextColor, Kn as backgroundAppearanceQuickColorTokenNames, Kt as generateDefaultButtonSystem, L as createFormRef, Ln as generateCardCss, Lr as contrastRatio, Lt as ICON_SIZE_PX, M as createCommandRef, Mn as mediaSchema, Mr as tileTreatmentValues, Mt as ACCORDION_OPEN_ACCENT_THICKNESS, N as createContentEntryRef, Nn as mediaTypeDiscriminants, Nr as visibleHeadingDecorationFamilyValues, Nt as ACCORDION_SPACING_MAP, O as pickShadeTowardBackground, On as pageDesignEditorBackgroundOverrideOwner, Or as introCompositionTreatmentValues, Ot as FONT_WEIGHT_MAP, P as createEventCategoryRef, Pn as persistableMediaSchema, Pr as isOnColorBackgroundCandidateToken, Pt as ACCORDION_TRIGGER_FONT_SCALE, Q as headerRootPaint, Qn as mergeStyles, Qt as themeButtonSizeClassName, R as createNavigationRef, Rn as renderCssDeclarations, Rr as featuresFromHex, Rt as generateButtonCss, S as pageIdentifierForCommand, Sn as boxBackgroundOverlaySchema, Sr as defineFrameCapability, St as NAV_LINK_PADDING_X_MAP, Tn as resolveOnColorForThemeToken, Tr as eyebrowTreatmentValues, Tt as navLinkOwnsHoverForeground, U as slugPart, Un as cardVariantRoleValues, Ut as contextualButtonSurfaceStyles, V as createVenueRef, Vn as generateShadowValue$1, Vr as __toESM, Vt as resolvedButtonFocusDeclarations, W as effectiveHeaderNavLinkStyle, Wn as normalizeCardRole, Wt as deriveButtonSurfaceContext, X as mergeHeaderNavTypographyPreference, Xn as borderColorStyle, Xt as parseThemeButtonVariantId, Y as getNavLinkPreset, Yn as backgroundColorStyle, Yt as generateInteractiveChildInheritanceCSS, Z as readHeaderNavFontSizePreference, Zn as cssVarValue, Zt as themeButtonExtraClassesWithTrailingIcon, _ as getSiteCommandMetadata, _n as composeBoundary, _r as asDesignBlockId, _t as parseBlockCustomCssRules, an as gradientToCss, ar as DEFAULT_SURFACE_TEXT_COLOR, at as BREAKPOINT_LG, b as entryIdentifierForCommand, bn as anglePolygonCss, br as assertNever$4, bt as NAV_LINK_LETTER_SPACING_MAP, c as isEventVisibility, cn as parseGradientPresetId, cr as surfaceForegroundStyle, ct as BREAKPOINT_XL, d as stableStringify, dn as VARIANT_ROLES, dr as parseBlockColorToken, dt as MQ_SM_DOWN, en as parseThemeForPersistence, er as textColorStyle, et as themeSchema, f as createDryRunReport, fn as buttonVariantIdSchema, fr as parseColorTokenParts, ft as MQ_SM_UP, g as evaluateSiteCommandExposure, gn as boundaryLayout, gt as getComponentShadowVar, h as evaluateSiteCommandBatchExposure, hr as defineBlockDesignMetadata, ht as getComponentBorderWidthPx, in as footerModeSchema, ir as resolveSurfaceForeground, it as renderHeaderPaintTargetRules, j as createBlocksRef, jn as mediaIdentifierSchema, jr as testimonialsCompositionTreatmentValues, jt as LABEL_FONT_SIZE_MAP, k as generateCssVars, kn as siteChromeBackgroundOverrideOwner, kr as makeBoundaryId, kt as INPUT_FONT_SIZE_MAP, l as venueManagementFields, lr as surfaceForegroundValue, lt as MQ_LG_UP, m as mapEventCommandContent, mr as defaultThemeTokens, mt as headerVariantValues, nn as formatButtonColourContractError, nr as selectLogoVariant, nt as generateMobileOverlayBackdropFilterFix, o as classifySdkEventBookingOffer, on as GRADIENT_PRESET_IDS, or as surfaceForegroundDeclarations, ot as BREAKPOINT_MD, p as parseAndPlanCommandBatchForTypes, pn as unsafeAsOpaqueButtonColourToken, pr as buildThemeTokens, pt as MQ_TABLET_ONLY, q as transparentHeaderForegroundInput, qn as parseBackgroundAppearanceColorToken, qt as generateEffectsCSS, rn as generateShadowValue, rr as surfaceToneFromForegroundToken, rt as getHeaderPaintTargets, sn as getGradientPreset, sr as surfaceForegroundInputFromResolved, st as BREAKPOINT_SM, t as classifySdkEventTiming, tn as compileButtonColourStates, tr as textColorValue, tt as generateHeaderScrollTreatmentStyles, u as sortRecord, un as PUBLIC_BUTTON_ROLES, ur as parseThemeColorToken, ut as MQ_MD_DOWN, v as blockIdentifierForCommand, vn as sectionFactsForContent, vt as parseCustomCssRules, w as hasConfiguredBookingVertical, wn as isCssColorLiteral, wr as eventListTreatmentValues, wt as navLinkHoverColorCandidate, x as pageIdentifierForBlockCommand, xn as transitionCatalogueEntries, xr as defineBlockDesignCapability, xt as NAV_LINK_PADDING_MAP, y as blockOrderIdentifiersForCommand, yn as boundaryRuntimeMetricsForDecorativeTransition, yt as NAV_LINK_BORDER_RADIUS_MAP, z as createPageRef, zn as expandPalette, zr as hexToRgb, zt as RESOLVED_BUTTON_DISABLED_DECLARATIONS } from "../sdk-event-upsert-CqCQwcwu.mjs";
|
|
3
|
+
import { $ as parseEventPageSurfaceSubject, B as formatBookingDate, C as parseMailingListContentVersionId, D as sameMailingListPlacementTargeting, E as planMailingListChoicePresentation, G as getBookingLocalDateKey, H as formatBookingTime, I as normalizeLocationAddressText, K as getLocalScheduleDate, L as toLocationCoordinates, M as parseMailingListPlacementTargeting, O as DEFAULT_MAILING_LIST_SUCCESS_MESSAGE, Ot as unsafeAsMediaAssetId, P as assertAllowedPublicUrl, R as selectCategoryView, Rt as unsafeAsStaffMemberId, S as parseMailingListBlockId, St as unsafeAsDemoCapability, T as parseMailingListRuntimeContext, U as formatLocalScheduleDate, Ut as err, V as formatBookingDateParts, W as formatLocalScheduleTime, Wt as ok, X as toScheduledBookingDateRange, Y as toBookingTimeZone, Z as toScheduledBookingDateTime, _ as createSecret, _t as parseUserId, at as publicEventPricingType, c as DEFAULT_EVENT_TYPE_PRESETS, d as SURFACE_EVENT_PRESET_VALUES, dt as assertNever, et as formatBookingPriceDisplay, f as WHOLE_SERIES_EVENT_PRESET_VALUES, ft as parseApiKeyId, g as resolveWholeSeriesBookingPhase, gt as parseSiteId, h as orderedLiveRunSessions, ht as parsePageId, it as publicEventPricingDisplay, j as parseFooterCompositionV1, jt as unsafeAsPositiveByteCount, k as parseMailingListProviderScope, l as EVENT_PRESET_VALUES, m as CANCELLED_SESSION_STATUS, mt as parseMediaAssetId, n as NAVIGATION_LOCATIONS, nt as isPublicEventPricingOptionDisplayable, ot as resolveExactOrFreePriceDisplay, p as publicReadFreshnessSeconds, pt as parseEventSeriesId, q as getLocalScheduleTime, r as areConfiguredBookingVerticalConfigsEqual, rt as publicEventPricingCurrency, s as resolveSiteVerticalBookingConfig, st as resolvePricingOptionsPriceDisplay, t as resolveEventCatalogue, tt as formatEventPricing, ut as formatCurrencyAmount, v as exposeSecret, vt as unsafeAsAppointmentResourceId, w as parseMailingListSignedSourceToken, x as buildMailingListSignupBlockSourceRef, y as parseManagementKey, z as buildBookingUtcDateWindow } from "../src-CxEAuQpf.mjs";
|
|
4
|
+
import { $ as sdkListEventsResponseSchema, A as resolveMediaTransformForAspect, B as asRecord$1, C as walkAndCollectImageAttrs, D as normalizeWidthCandidates, E as rotateNormalizedPoint, F as buildMediaIdentifierFromFilename, G as parseSafeDownloadFilename, H as FILE_SIZE_LIMITS, I as parseMediaIdentifier, J as createHttpClient, K as ManagementApiError, L as deriveVideoSlotPolicy, M as getDirectImageUrlForSiteScopedPath, N as getImageUrl, O as isExplicitRectCrop, P as isSiteScopedDirectImageStoragePath, Q as sdkGetEventResponseSchema, R as resolveVideoSelectionIntentForMediaField, S as buildRenderableMediaAssetIndex, St as sdkConfiguredBookingVerticalConfigSchema, T as looksLikeUuid$1, U as classifyKnownMimeType, V as parseRelativeStoragePath, W as managementMediaLibraryUploadLimitForMimeType, X as managementTransportError, Y as is404Error, Z as sdkConfigureBookingVerticalResponseSchema, _ as buildSettingsUpdateInput, _t as sdkSavePageDesignResponseSchema, a as prepareLocalMediaForPush, at as customLinkSchema$1, b as isMediaValue, bt as sdkListEventOccurrencesResponseSchema, c as writeBinaryFileAtomic, ct as internalLinkSchema, d as normalizeMediaValueToIdentifierOnly, dt as isInternalResolvedLinkValue, et as sdkTakeEventOfflineResponseSchema, f as walkLocalContentMedia, ft as isResolvedInternalLinkEntityType, g as SETTINGS_FILE_FIELDS, gt as sdkGetPageDesignResponseSchema, h as extractMediaIdentifiers, ht as portablePageDesignSchema, i as applyLocalMediaPush, it as RESOLVED_INTERNAL_LINK_ENTITY_TYPES, j as getDirectImageUrlForRelativePath, k as parseAspectRatioValue, l as sha256, lt as internalResolvedLinkSchema, m as downloadMedia, mt as pageLinkSchema$1, nt as sdkSettingsUpdateSchema, o as admitBinaryWriteDestination, ot as entryLinkSchema$1, p as buildStorageUrl, pt as linkSchema, q as buildRequestInfo, r as syncLocalMediaForPull, rt as linkPayloadSchema, s as readStableBinaryFile, st as externalLinkSchema$1, t as revalidateLocalMediaPushPlan, tt as sdkUpsertEventResponseSchema, u as normalizeMediaIdentifierInput, ut as internalRouteOnlyLinkSchema, v as hasOwnSettingsField, vt as sdkDeleteEventOccurrenceResponseSchema, w as deleteEnvSpecificKeys, x as attachRenderableMediaAssetFields, xt as sdkReorderResponseSchema, y as writeMediaManifest, yt as sdkEventOccurrenceResponseSchema, z as getMimeType } from "../local-sync-C-FEofmj.mjs";
|
|
5
|
+
import { n as CliSdkPeerError, r as CLI_VERSION, t as loadConfigFile } from "../load-config-D0Qfqh2m.mjs";
|
|
6
|
+
import { a as RichTextDocSchema, c as isRecord$16, i as findUnfilledSentinels, n as buildEntryScaffold, o as isRichTextDoc, r as validateEntryInstance, s as isObjectRecord, t as eventUpsertInputSchema } from "../eventUpsertInputSchema-CmkfzGW0.mjs";
|
|
7
|
+
import { a as prepareScaffoldExecution, c as LOCAL_PACKAGE_VENDOR_DIR, d as loadGeneratedPackageRanges, i as preflightScaffoldTargets, n as createScaffoldCompletion, s as deriveScaffoldLocalManifest, t as deriveScaffoldPlan } from "../plan-mb_YslEh.mjs";
|
|
8
8
|
import { config } from "dotenv";
|
|
9
9
|
import { Command, CommanderError } from "commander";
|
|
10
10
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
@@ -189,16 +189,16 @@ var BlockPatchStaleContentError = class extends ManagementApiError {
|
|
|
189
189
|
function isBlockPatchStaleContentError(error$1) {
|
|
190
190
|
return error$1 instanceof BlockPatchStaleContentError;
|
|
191
191
|
}
|
|
192
|
-
function isRecord$
|
|
192
|
+
function isRecord$36(value) {
|
|
193
193
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
194
194
|
}
|
|
195
195
|
function extractStaleContentCurrentHash(error$1) {
|
|
196
196
|
if (error$1.statusCode !== 409) return null;
|
|
197
|
-
if (!isRecord$
|
|
197
|
+
if (!isRecord$36(error$1.details)) return null;
|
|
198
198
|
const fieldErrors = error$1.details.fieldErrors;
|
|
199
199
|
if (!Array.isArray(fieldErrors)) return null;
|
|
200
200
|
for (const fieldError of fieldErrors) {
|
|
201
|
-
if (isRecord$
|
|
201
|
+
if (isRecord$36(fieldError) && fieldError.field === SDK_PATCH_STALE_CONTENT_FIELD && fieldError.code === SDK_PATCH_STALE_CONTENT_CODE && typeof fieldError.message === "string") {
|
|
202
202
|
return fieldError.message;
|
|
203
203
|
}
|
|
204
204
|
}
|
|
@@ -251,7 +251,7 @@ function createBlockOperations(http) {
|
|
|
251
251
|
}
|
|
252
252
|
},
|
|
253
253
|
async reorder(pageIdentifier, blockIdentifiers) {
|
|
254
|
-
|
|
254
|
+
return http.postValidated(`/pages/${encodeURIComponent(pageIdentifier)}/blocks/reorder`, sdkReorderResponseSchema, { identifiers: blockIdentifiers }, "write");
|
|
255
255
|
},
|
|
256
256
|
async delete(pageIdentifier, blockIdentifier$1) {
|
|
257
257
|
return http.delete(blockPath(pageIdentifier, blockIdentifier$1));
|
|
@@ -464,8 +464,8 @@ function createEventOccurrenceOperations(http) {
|
|
|
464
464
|
const result = await http.patchValidated(occurrencePath(eventIdentifier, runIdentifier, occurrenceId), sdkEventOccurrenceResponseSchema, input);
|
|
465
465
|
return result.occurrence;
|
|
466
466
|
},
|
|
467
|
-
async cancel(eventIdentifier, runIdentifier, occurrenceId) {
|
|
468
|
-
const result = await http.postValidated(`${occurrencePath(eventIdentifier, runIdentifier, occurrenceId)}/cancel`, sdkEventOccurrenceResponseSchema, undefined, "write");
|
|
467
|
+
async cancel(eventIdentifier, runIdentifier, occurrenceId, options) {
|
|
468
|
+
const result = await http.postValidated(`${occurrencePath(eventIdentifier, runIdentifier, occurrenceId)}/cancel`, sdkEventOccurrenceResponseSchema, options?.notifyAttendees === undefined ? undefined : { notifyAttendees: options.notifyAttendees }, "write");
|
|
469
469
|
return result.occurrence;
|
|
470
470
|
},
|
|
471
471
|
async delete(eventIdentifier, runIdentifier, occurrenceId) {
|
|
@@ -617,12 +617,12 @@ const productionMediaOperationsDeps = {
|
|
|
617
617
|
fetch
|
|
618
618
|
};
|
|
619
619
|
const DEFAULT_TRANSFER_TIMEOUT_MS = 10 * 60 * 1e3;
|
|
620
|
-
function transferRequestInfo(context, method, intent, path$
|
|
620
|
+
function transferRequestInfo(context, method, intent, path$4) {
|
|
621
621
|
return buildRequestInfo({
|
|
622
622
|
method,
|
|
623
623
|
intent,
|
|
624
|
-
path: path$
|
|
625
|
-
url: `${context.baseUrl}${path$
|
|
624
|
+
path: path$4,
|
|
625
|
+
url: `${context.baseUrl}${path$4}`,
|
|
626
626
|
baseUrl: context.baseUrl,
|
|
627
627
|
dashboardUrl: context.config.dashboardUrl,
|
|
628
628
|
siteId: context.config.siteId
|
|
@@ -679,9 +679,9 @@ function createMediaOperations(config$1, deps = productionMediaOperationsDeps) {
|
|
|
679
679
|
};
|
|
680
680
|
}
|
|
681
681
|
async function downloadMedia$1(context, identifier, maxBytes) {
|
|
682
|
-
const path$
|
|
683
|
-
const transfer = await context.http.get(path$
|
|
684
|
-
const requestInfo = transferRequestInfo(context, "GET", "read", path$
|
|
682
|
+
const path$4 = `/media/${encodeURIComponent(identifier)}/download`;
|
|
683
|
+
const transfer = await context.http.get(path$4);
|
|
684
|
+
const requestInfo = transferRequestInfo(context, "GET", "read", path$4);
|
|
685
685
|
const response = await getMediaFile(transfer.transferUrl, context.timeoutMs, requestInfo, context.fetch);
|
|
686
686
|
return {
|
|
687
687
|
data: await readBoundedResponseBody(response, maxBytes, {
|
|
@@ -4442,6 +4442,7 @@ const SDK_EVENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
4442
4442
|
responseKind: "json",
|
|
4443
4443
|
errors: [
|
|
4444
4444
|
"resource:not_found",
|
|
4445
|
+
"validation:invalid_input",
|
|
4445
4446
|
"resource:conflict",
|
|
4446
4447
|
"server:internal_error"
|
|
4447
4448
|
]
|
|
@@ -4899,24 +4900,6 @@ const EVENT_MANAGEMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
4899
4900
|
"resource:conflict",
|
|
4900
4901
|
"server:internal_error"
|
|
4901
4902
|
]
|
|
4902
|
-
},
|
|
4903
|
-
saveEventPageWords: {
|
|
4904
|
-
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/words",
|
|
4905
|
-
method: "PUT",
|
|
4906
|
-
tags: [
|
|
4907
|
-
TAG_TEMPLATES.siteCollection,
|
|
4908
|
-
TAG_TEMPLATES.siteRoutableContent,
|
|
4909
|
-
TAG_TEMPLATES.pageSurfaceById
|
|
4910
|
-
],
|
|
4911
|
-
auth: "user",
|
|
4912
|
-
responseKind: "json",
|
|
4913
|
-
errors: [
|
|
4914
|
-
"auth:forbidden",
|
|
4915
|
-
"validation:invalid_input",
|
|
4916
|
-
"resource:not_found",
|
|
4917
|
-
"resource:conflict",
|
|
4918
|
-
"server:internal_error"
|
|
4919
|
-
]
|
|
4920
4903
|
}
|
|
4921
4904
|
});
|
|
4922
4905
|
|
|
@@ -5347,6 +5330,14 @@ const BILLING_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
5347
5330
|
auth: "user",
|
|
5348
5331
|
responseKind: "json"
|
|
5349
5332
|
},
|
|
5333
|
+
continueOnboardingOnFree: {
|
|
5334
|
+
path: "/onboarding/attempts/{attemptToken}/plan/free",
|
|
5335
|
+
method: "POST",
|
|
5336
|
+
tags: ["billing"],
|
|
5337
|
+
auth: "user",
|
|
5338
|
+
errors: [],
|
|
5339
|
+
responseKind: "json"
|
|
5340
|
+
},
|
|
5350
5341
|
createBillingPortalSession: {
|
|
5351
5342
|
path: "/billing/portal/session",
|
|
5352
5343
|
method: "POST",
|
|
@@ -5356,6 +5347,163 @@ const BILLING_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
5356
5347
|
}
|
|
5357
5348
|
});
|
|
5358
5349
|
|
|
5350
|
+
//#endregion
|
|
5351
|
+
//#region ../api/src/editLeaseEndpoints.ts
|
|
5352
|
+
const path$3 = "/sites/{siteId}/edit-leases/{nodeType}/{nodeId}";
|
|
5353
|
+
const lifecycleErrors = [
|
|
5354
|
+
"auth:lease_required",
|
|
5355
|
+
"auth:forbidden",
|
|
5356
|
+
"resource:not_found",
|
|
5357
|
+
"validation:invalid_input",
|
|
5358
|
+
"server:internal_error"
|
|
5359
|
+
];
|
|
5360
|
+
const EDIT_LEASE_ENDPOINT_DEFINITIONS = {
|
|
5361
|
+
readEditLease: {
|
|
5362
|
+
path: path$3,
|
|
5363
|
+
method: "GET",
|
|
5364
|
+
editLease: "lifecycle",
|
|
5365
|
+
errors: lifecycleErrors,
|
|
5366
|
+
auth: "user",
|
|
5367
|
+
responseKind: "json"
|
|
5368
|
+
},
|
|
5369
|
+
acquireEditLease: {
|
|
5370
|
+
path: path$3,
|
|
5371
|
+
method: "POST",
|
|
5372
|
+
editLease: "lifecycle",
|
|
5373
|
+
errors: lifecycleErrors,
|
|
5374
|
+
auth: "user",
|
|
5375
|
+
responseKind: "json"
|
|
5376
|
+
},
|
|
5377
|
+
takeOverEditLease: {
|
|
5378
|
+
path: path$3,
|
|
5379
|
+
method: "PUT",
|
|
5380
|
+
editLease: "lifecycle",
|
|
5381
|
+
errors: lifecycleErrors,
|
|
5382
|
+
auth: "user",
|
|
5383
|
+
responseKind: "json"
|
|
5384
|
+
},
|
|
5385
|
+
heartbeatEditLease: {
|
|
5386
|
+
path: path$3,
|
|
5387
|
+
method: "PATCH",
|
|
5388
|
+
editLease: "lifecycle",
|
|
5389
|
+
errors: [...lifecycleErrors, "auth:lease_lost"],
|
|
5390
|
+
auth: "user",
|
|
5391
|
+
responseKind: "json"
|
|
5392
|
+
},
|
|
5393
|
+
releaseEditLease: {
|
|
5394
|
+
path: path$3,
|
|
5395
|
+
method: "DELETE",
|
|
5396
|
+
editLease: "lifecycle",
|
|
5397
|
+
errors: lifecycleErrors,
|
|
5398
|
+
auth: "user",
|
|
5399
|
+
responseKind: "json"
|
|
5400
|
+
}
|
|
5401
|
+
};
|
|
5402
|
+
|
|
5403
|
+
//#endregion
|
|
5404
|
+
//#region ../api/src/pageSurfaceEditorEndpoints.ts
|
|
5405
|
+
const surfaceTags = [TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById];
|
|
5406
|
+
const PAGE_SURFACE_EDITOR_ENDPOINT_DEFINITIONS = {
|
|
5407
|
+
getPageSurfaceEditorDocument: {
|
|
5408
|
+
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/content",
|
|
5409
|
+
method: "GET",
|
|
5410
|
+
errors: [
|
|
5411
|
+
"auth:forbidden",
|
|
5412
|
+
"validation:invalid_input",
|
|
5413
|
+
"resource:not_found",
|
|
5414
|
+
"resource:conflict",
|
|
5415
|
+
"server:internal_error"
|
|
5416
|
+
],
|
|
5417
|
+
tags: surfaceTags,
|
|
5418
|
+
auth: "user",
|
|
5419
|
+
responseKind: "json"
|
|
5420
|
+
},
|
|
5421
|
+
updatePageSurfaceDraftContent: {
|
|
5422
|
+
editLease: "managed",
|
|
5423
|
+
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/content",
|
|
5424
|
+
method: "PUT",
|
|
5425
|
+
errors: [
|
|
5426
|
+
"validation:invalid_input",
|
|
5427
|
+
"resource:not_found",
|
|
5428
|
+
"resource:conflict",
|
|
5429
|
+
"server:internal_error"
|
|
5430
|
+
],
|
|
5431
|
+
tags: surfaceTags,
|
|
5432
|
+
auth: "user",
|
|
5433
|
+
responseKind: "json"
|
|
5434
|
+
},
|
|
5435
|
+
discardPageSurfaceDraftContent: {
|
|
5436
|
+
editLease: "managed",
|
|
5437
|
+
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/content/draft",
|
|
5438
|
+
method: "DELETE",
|
|
5439
|
+
errors: [
|
|
5440
|
+
"validation:invalid_input",
|
|
5441
|
+
"resource:not_found",
|
|
5442
|
+
"resource:conflict",
|
|
5443
|
+
"server:internal_error"
|
|
5444
|
+
],
|
|
5445
|
+
tags: surfaceTags,
|
|
5446
|
+
auth: "user",
|
|
5447
|
+
responseKind: "json"
|
|
5448
|
+
},
|
|
5449
|
+
updatePageSurfaceRouteMetadata: {
|
|
5450
|
+
editLease: "managed",
|
|
5451
|
+
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/metadata",
|
|
5452
|
+
method: "PATCH",
|
|
5453
|
+
errors: [
|
|
5454
|
+
"validation:invalid_input",
|
|
5455
|
+
"resource:not_found",
|
|
5456
|
+
"resource:conflict",
|
|
5457
|
+
"server:internal_error"
|
|
5458
|
+
],
|
|
5459
|
+
tags: [
|
|
5460
|
+
TAG_TEMPLATES.siteCollection,
|
|
5461
|
+
TAG_TEMPLATES.siteRoutableContent,
|
|
5462
|
+
TAG_TEMPLATES.pageSurfaceById
|
|
5463
|
+
],
|
|
5464
|
+
auth: "user",
|
|
5465
|
+
responseKind: "json"
|
|
5466
|
+
},
|
|
5467
|
+
publishPageSurface: {
|
|
5468
|
+
editLease: "managed",
|
|
5469
|
+
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/publication",
|
|
5470
|
+
method: "POST",
|
|
5471
|
+
errors: [
|
|
5472
|
+
"auth:forbidden",
|
|
5473
|
+
"validation:invalid_input",
|
|
5474
|
+
"resource:not_found",
|
|
5475
|
+
"resource:conflict",
|
|
5476
|
+
"server:internal_error"
|
|
5477
|
+
],
|
|
5478
|
+
tags: [
|
|
5479
|
+
TAG_TEMPLATES.siteCollection,
|
|
5480
|
+
TAG_TEMPLATES.siteRoutableContent,
|
|
5481
|
+
TAG_TEMPLATES.pageSurfaceById
|
|
5482
|
+
],
|
|
5483
|
+
auth: "user",
|
|
5484
|
+
responseKind: "json"
|
|
5485
|
+
},
|
|
5486
|
+
saveEventContentTab: {
|
|
5487
|
+
editLease: "managed",
|
|
5488
|
+
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/event-content",
|
|
5489
|
+
method: "PUT",
|
|
5490
|
+
errors: [
|
|
5491
|
+
"auth:forbidden",
|
|
5492
|
+
"validation:invalid_input",
|
|
5493
|
+
"resource:not_found",
|
|
5494
|
+
"resource:conflict",
|
|
5495
|
+
"server:internal_error"
|
|
5496
|
+
],
|
|
5497
|
+
tags: [
|
|
5498
|
+
TAG_TEMPLATES.siteCollection,
|
|
5499
|
+
TAG_TEMPLATES.siteRoutableContent,
|
|
5500
|
+
TAG_TEMPLATES.pageSurfaceById
|
|
5501
|
+
],
|
|
5502
|
+
auth: "user",
|
|
5503
|
+
responseKind: "json"
|
|
5504
|
+
}
|
|
5505
|
+
};
|
|
5506
|
+
|
|
5359
5507
|
//#endregion
|
|
5360
5508
|
//#region ../api/src/bookingPeopleEndpointDefinitions.ts
|
|
5361
5509
|
/**
|
|
@@ -5421,7 +5569,8 @@ const CLIENT_ERROR_REPORT_LIMITS = {
|
|
|
5421
5569
|
stack: 8e3,
|
|
5422
5570
|
digest: 128,
|
|
5423
5571
|
componentStack: 8e3,
|
|
5424
|
-
sourceLocation: 1024
|
|
5572
|
+
sourceLocation: 1024,
|
|
5573
|
+
navigationAgeMs: 6e4
|
|
5425
5574
|
};
|
|
5426
5575
|
const clientErrorEventSchema = z.enum([
|
|
5427
5576
|
"dashboard:route-error",
|
|
@@ -5438,7 +5587,17 @@ const clientErrorReportSchema = z.object({
|
|
|
5438
5587
|
stack: z.string().max(CLIENT_ERROR_REPORT_LIMITS.stack).nullable(),
|
|
5439
5588
|
digest: z.string().max(CLIENT_ERROR_REPORT_LIMITS.digest).nullable(),
|
|
5440
5589
|
componentStack: z.string().max(CLIENT_ERROR_REPORT_LIMITS.componentStack).nullable(),
|
|
5441
|
-
sourceLocation: z.string().max(CLIENT_ERROR_REPORT_LIMITS.sourceLocation).nullable()
|
|
5590
|
+
sourceLocation: z.string().max(CLIENT_ERROR_REPORT_LIMITS.sourceLocation).nullable(),
|
|
5591
|
+
navigation: z.object({
|
|
5592
|
+
fromPathname: z.string().regex(/^\/[^?#]*$/).max(CLIENT_ERROR_REPORT_LIMITS.pathname),
|
|
5593
|
+
toPathname: z.string().regex(/^\/[^?#]*$/).max(CLIENT_ERROR_REPORT_LIMITS.pathname),
|
|
5594
|
+
type: z.enum([
|
|
5595
|
+
"push",
|
|
5596
|
+
"replace",
|
|
5597
|
+
"traverse"
|
|
5598
|
+
]),
|
|
5599
|
+
ageMs: z.number().int().min(0).max(CLIENT_ERROR_REPORT_LIMITS.navigationAgeMs)
|
|
5600
|
+
}).strict().nullable().optional()
|
|
5442
5601
|
}).strict();
|
|
5443
5602
|
|
|
5444
5603
|
//#endregion
|
|
@@ -5453,6 +5612,8 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
5453
5612
|
...GIFTING_ENDPOINT_DEFINITIONS,
|
|
5454
5613
|
...PUBLIC_READ_ENDPOINT_DEFINITIONS,
|
|
5455
5614
|
...BILLING_ENDPOINT_DEFINITIONS,
|
|
5615
|
+
...EDIT_LEASE_ENDPOINT_DEFINITIONS,
|
|
5616
|
+
...PAGE_SURFACE_EDITOR_ENDPOINT_DEFINITIONS,
|
|
5456
5617
|
...SITE_MANAGEMENT_ENDPOINT_DEFINITIONS,
|
|
5457
5618
|
aiContentUpdateChat: {
|
|
5458
5619
|
path: "/ai/content-update-chat",
|
|
@@ -5474,6 +5635,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
5474
5635
|
responseKind: "json"
|
|
5475
5636
|
},
|
|
5476
5637
|
aiDesignerPageOpsApply: {
|
|
5638
|
+
editLease: "managed",
|
|
5477
5639
|
path: "/sites/{siteId}/ai/designer/page/apply",
|
|
5478
5640
|
method: "POST",
|
|
5479
5641
|
tags: [TAG_TEMPLATES.siteCollection],
|
|
@@ -6308,6 +6470,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
6308
6470
|
responseKind: "json"
|
|
6309
6471
|
},
|
|
6310
6472
|
restoreContentEntryVersion: {
|
|
6473
|
+
editLease: "managed",
|
|
6311
6474
|
path: "/sites/{siteId}/content/{type}/{entryId}/versions/{versionId}/restore",
|
|
6312
6475
|
method: "POST",
|
|
6313
6476
|
errors: [
|
|
@@ -6325,6 +6488,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
6325
6488
|
responseKind: "json"
|
|
6326
6489
|
},
|
|
6327
6490
|
updateContentEntryContent: {
|
|
6491
|
+
editLease: "managed",
|
|
6328
6492
|
path: "/sites/{siteId}/content/{type}/{entryId}/content",
|
|
6329
6493
|
method: "PUT",
|
|
6330
6494
|
tags: [
|
|
@@ -6341,67 +6505,6 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
6341
6505
|
],
|
|
6342
6506
|
responseKind: "json"
|
|
6343
6507
|
},
|
|
6344
|
-
updatePageSurfaceDraftContent: {
|
|
6345
|
-
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/content",
|
|
6346
|
-
method: "PUT",
|
|
6347
|
-
errors: [
|
|
6348
|
-
"validation:invalid_input",
|
|
6349
|
-
"resource:not_found",
|
|
6350
|
-
"resource:conflict",
|
|
6351
|
-
"server:internal_error"
|
|
6352
|
-
],
|
|
6353
|
-
tags: [TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById],
|
|
6354
|
-
auth: "user",
|
|
6355
|
-
responseKind: "json"
|
|
6356
|
-
},
|
|
6357
|
-
discardPageSurfaceDraftContent: {
|
|
6358
|
-
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/content/draft",
|
|
6359
|
-
method: "DELETE",
|
|
6360
|
-
errors: [
|
|
6361
|
-
"validation:invalid_input",
|
|
6362
|
-
"resource:not_found",
|
|
6363
|
-
"resource:conflict",
|
|
6364
|
-
"server:internal_error"
|
|
6365
|
-
],
|
|
6366
|
-
tags: [TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.pageSurfaceById],
|
|
6367
|
-
auth: "user",
|
|
6368
|
-
responseKind: "json"
|
|
6369
|
-
},
|
|
6370
|
-
updatePageSurfaceRouteMetadata: {
|
|
6371
|
-
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/metadata",
|
|
6372
|
-
method: "PATCH",
|
|
6373
|
-
errors: [
|
|
6374
|
-
"validation:invalid_input",
|
|
6375
|
-
"resource:not_found",
|
|
6376
|
-
"resource:conflict",
|
|
6377
|
-
"server:internal_error"
|
|
6378
|
-
],
|
|
6379
|
-
tags: [
|
|
6380
|
-
TAG_TEMPLATES.siteCollection,
|
|
6381
|
-
TAG_TEMPLATES.siteRoutableContent,
|
|
6382
|
-
TAG_TEMPLATES.pageSurfaceById
|
|
6383
|
-
],
|
|
6384
|
-
auth: "user",
|
|
6385
|
-
responseKind: "json"
|
|
6386
|
-
},
|
|
6387
|
-
publishPageSurface: {
|
|
6388
|
-
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/publication",
|
|
6389
|
-
method: "POST",
|
|
6390
|
-
errors: [
|
|
6391
|
-
"auth:forbidden",
|
|
6392
|
-
"validation:invalid_input",
|
|
6393
|
-
"resource:not_found",
|
|
6394
|
-
"resource:conflict",
|
|
6395
|
-
"server:internal_error"
|
|
6396
|
-
],
|
|
6397
|
-
tags: [
|
|
6398
|
-
TAG_TEMPLATES.siteCollection,
|
|
6399
|
-
TAG_TEMPLATES.siteRoutableContent,
|
|
6400
|
-
TAG_TEMPLATES.pageSurfaceById
|
|
6401
|
-
],
|
|
6402
|
-
auth: "user",
|
|
6403
|
-
responseKind: "json"
|
|
6404
|
-
},
|
|
6405
6508
|
runSdkWorkflow: {
|
|
6406
6509
|
path: "/sites/{siteId}/content/{type}/{entryId}/workflows/{workflowId}/run",
|
|
6407
6510
|
method: "POST",
|
|
@@ -6438,6 +6541,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
6438
6541
|
responseKind: "json"
|
|
6439
6542
|
},
|
|
6440
6543
|
updateRouteMetadata: {
|
|
6544
|
+
editLease: "managed",
|
|
6441
6545
|
path: "/sites/{siteId}/routes/{routeId}/metadata",
|
|
6442
6546
|
method: "PATCH",
|
|
6443
6547
|
tags: [
|
|
@@ -6455,6 +6559,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
6455
6559
|
responseKind: "json"
|
|
6456
6560
|
},
|
|
6457
6561
|
publishContentEntry: {
|
|
6562
|
+
editLease: "managed",
|
|
6458
6563
|
path: "/sites/{siteId}/content/{type}/{entryId}/publish",
|
|
6459
6564
|
method: "POST",
|
|
6460
6565
|
tags: [
|
|
@@ -6466,6 +6571,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
6466
6571
|
responseKind: "json"
|
|
6467
6572
|
},
|
|
6468
6573
|
scheduleContentEntry: {
|
|
6574
|
+
editLease: "managed",
|
|
6469
6575
|
path: "/sites/{siteId}/content/{type}/{entryId}/schedule",
|
|
6470
6576
|
method: "POST",
|
|
6471
6577
|
tags: [
|
|
@@ -6483,6 +6589,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
6483
6589
|
responseKind: "json"
|
|
6484
6590
|
},
|
|
6485
6591
|
cancelScheduledContentEntry: {
|
|
6592
|
+
editLease: "managed",
|
|
6486
6593
|
path: "/sites/{siteId}/content/{type}/{entryId}/schedule",
|
|
6487
6594
|
method: "DELETE",
|
|
6488
6595
|
tags: [
|
|
@@ -6500,6 +6607,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
6500
6607
|
responseKind: "json"
|
|
6501
6608
|
},
|
|
6502
6609
|
discardContentEntry: {
|
|
6610
|
+
editLease: "managed",
|
|
6503
6611
|
path: "/sites/{siteId}/content/{type}/{entryId}/discard",
|
|
6504
6612
|
method: "POST",
|
|
6505
6613
|
tags: [
|
|
@@ -6518,6 +6626,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
6518
6626
|
responseKind: "json"
|
|
6519
6627
|
},
|
|
6520
6628
|
unpublishContentEntry: {
|
|
6629
|
+
editLease: "managed",
|
|
6521
6630
|
path: "/sites/{siteId}/content/{type}/{entryId}/unpublish",
|
|
6522
6631
|
method: "POST",
|
|
6523
6632
|
tags: [
|
|
@@ -6559,6 +6668,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
6559
6668
|
responseKind: "json"
|
|
6560
6669
|
},
|
|
6561
6670
|
deleteContentEntry: {
|
|
6671
|
+
editLease: "managed",
|
|
6562
6672
|
path: "/sites/{siteId}/content/{type}/{entryId}",
|
|
6563
6673
|
method: "DELETE",
|
|
6564
6674
|
tags: [
|
|
@@ -7768,6 +7878,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
7768
7878
|
responseKind: "json"
|
|
7769
7879
|
},
|
|
7770
7880
|
saveBlockContent: {
|
|
7881
|
+
editLease: "owner-derived",
|
|
7771
7882
|
path: "/blocks/{blockId}/content",
|
|
7772
7883
|
method: "POST",
|
|
7773
7884
|
tags: [
|
|
@@ -7805,6 +7916,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
7805
7916
|
errors: ["resource:not_found", "resource:conflict"]
|
|
7806
7917
|
},
|
|
7807
7918
|
createEntrySlotBlock: {
|
|
7919
|
+
editLease: "managed",
|
|
7808
7920
|
path: "/sites/{siteId}/content/{type}/{entryId}/slots/{slotKey}/blocks",
|
|
7809
7921
|
method: "POST",
|
|
7810
7922
|
tags: [
|
|
@@ -7822,6 +7934,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
7822
7934
|
]
|
|
7823
7935
|
},
|
|
7824
7936
|
reorderEntrySlotBlocks: {
|
|
7937
|
+
editLease: "managed",
|
|
7825
7938
|
path: "/sites/{siteId}/content/{type}/{entryId}/slots/{slotKey}/blocks/reorder",
|
|
7826
7939
|
method: "POST",
|
|
7827
7940
|
tags: [
|
|
@@ -7839,6 +7952,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
7839
7952
|
]
|
|
7840
7953
|
},
|
|
7841
7954
|
deleteEntrySlotBlock: {
|
|
7955
|
+
editLease: "managed",
|
|
7842
7956
|
path: "/sites/{siteId}/content/{type}/{entryId}/slots/{slotKey}/blocks/{blockId}",
|
|
7843
7957
|
method: "DELETE",
|
|
7844
7958
|
tags: [
|
|
@@ -7869,6 +7983,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
7869
7983
|
]
|
|
7870
7984
|
},
|
|
7871
7985
|
createPageSurfaceSlotBlock: {
|
|
7986
|
+
editLease: "managed",
|
|
7872
7987
|
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/slots/{slotKey}/blocks",
|
|
7873
7988
|
method: "POST",
|
|
7874
7989
|
tags: [
|
|
@@ -7887,6 +8002,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
7887
8002
|
]
|
|
7888
8003
|
},
|
|
7889
8004
|
reorderPageSurfaceSlotBlocks: {
|
|
8005
|
+
editLease: "managed",
|
|
7890
8006
|
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/slots/{slotKey}/blocks/reorder",
|
|
7891
8007
|
method: "POST",
|
|
7892
8008
|
tags: [
|
|
@@ -7905,6 +8021,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
7905
8021
|
]
|
|
7906
8022
|
},
|
|
7907
8023
|
deletePageSurfaceSlotBlock: {
|
|
8024
|
+
editLease: "managed",
|
|
7908
8025
|
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/slots/{slotKey}/blocks/{blockId}",
|
|
7909
8026
|
method: "DELETE",
|
|
7910
8027
|
tags: [
|
|
@@ -7922,6 +8039,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
7922
8039
|
]
|
|
7923
8040
|
},
|
|
7924
8041
|
createBlock: {
|
|
8042
|
+
editLease: "managed",
|
|
7925
8043
|
path: "/sites/{siteId}/pages/{pageId}/blocks",
|
|
7926
8044
|
method: "POST",
|
|
7927
8045
|
tags: [
|
|
@@ -7933,6 +8051,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
7933
8051
|
responseKind: "json"
|
|
7934
8052
|
},
|
|
7935
8053
|
reorderBlocks: {
|
|
8054
|
+
editLease: "managed",
|
|
7936
8055
|
path: "/sites/{siteId}/pages/{pageId}/blocks/reorder",
|
|
7937
8056
|
method: "POST",
|
|
7938
8057
|
tags: [
|
|
@@ -7944,6 +8063,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
7944
8063
|
responseKind: "json"
|
|
7945
8064
|
},
|
|
7946
8065
|
deleteBlock: {
|
|
8066
|
+
editLease: "managed",
|
|
7947
8067
|
path: "/sites/{siteId}/pages/{pageId}/blocks/{blockId}",
|
|
7948
8068
|
method: "DELETE",
|
|
7949
8069
|
tags: [
|
|
@@ -7989,6 +8109,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
7989
8109
|
responseKind: "json"
|
|
7990
8110
|
},
|
|
7991
8111
|
publishPageDraft: {
|
|
8112
|
+
editLease: "managed",
|
|
7992
8113
|
path: "/sites/{siteId}/pages/{pageId}/publish",
|
|
7993
8114
|
method: "POST",
|
|
7994
8115
|
tags: [TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById],
|
|
@@ -7996,6 +8117,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
7996
8117
|
responseKind: "json"
|
|
7997
8118
|
},
|
|
7998
8119
|
discardPageDraft: {
|
|
8120
|
+
editLease: "managed",
|
|
7999
8121
|
path: "/sites/{siteId}/pages/{pageId}/discard",
|
|
8000
8122
|
method: "POST",
|
|
8001
8123
|
tags: [TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById],
|
|
@@ -8011,6 +8133,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
8011
8133
|
errors: ["resource:not_found", "server:internal_error"]
|
|
8012
8134
|
},
|
|
8013
8135
|
savePageDesignState: {
|
|
8136
|
+
editLease: "managed",
|
|
8014
8137
|
path: "/sites/{siteId}/pages/{pageId}/design-state",
|
|
8015
8138
|
method: "POST",
|
|
8016
8139
|
tags: [TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById],
|
|
@@ -8040,6 +8163,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
8040
8163
|
responseKind: "json"
|
|
8041
8164
|
},
|
|
8042
8165
|
restorePageVersion: {
|
|
8166
|
+
editLease: "managed",
|
|
8043
8167
|
path: "/sites/{siteId}/pages/{pageId}/versions/{versionId}/restore",
|
|
8044
8168
|
method: "POST",
|
|
8045
8169
|
errors: [
|
|
@@ -8053,6 +8177,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
8053
8177
|
responseKind: "json"
|
|
8054
8178
|
},
|
|
8055
8179
|
applyPageDesignEditorAction: {
|
|
8180
|
+
editLease: "managed",
|
|
8056
8181
|
path: "/sites/{siteId}/pages/{pageId}/design/actions",
|
|
8057
8182
|
method: "POST",
|
|
8058
8183
|
tags: [TAG_TEMPLATES.siteRoutableContent, TAG_TEMPLATES.pageById],
|
|
@@ -11139,9 +11264,9 @@ function getCmsApiUrl() {
|
|
|
11139
11264
|
}
|
|
11140
11265
|
throw new Error("CMS_API_URL or NEXT_PUBLIC_DASHBOARD_URL is not configured. " + "Set NEXT_PUBLIC_DASHBOARD_URL to your dashboard URL (e.g., http://localhost:4000)");
|
|
11141
11266
|
}
|
|
11142
|
-
function getAbsoluteDashboardUrl(path$
|
|
11267
|
+
function getAbsoluteDashboardUrl(path$4, options) {
|
|
11143
11268
|
const base = getDashboardBaseUrl();
|
|
11144
|
-
const raw = (path$
|
|
11269
|
+
const raw = (path$4 ?? "").trim();
|
|
11145
11270
|
const cleaned = raw ? raw.replace(/^\/+/, "").replace(/^dashboard\/+/, "") : "";
|
|
11146
11271
|
const surfaceAwareBase = applySurfaceToBase(base, options);
|
|
11147
11272
|
return cleaned ? `${surfaceAwareBase}/dashboard/${cleaned}` : `${surfaceAwareBase}/dashboard`;
|
|
@@ -11191,6 +11316,8 @@ const API_ERROR_CODES = [
|
|
|
11191
11316
|
"auth:sudo_required",
|
|
11192
11317
|
"auth:insufficient_permissions",
|
|
11193
11318
|
"auth:impersonation_restricted",
|
|
11319
|
+
"auth:lease_required",
|
|
11320
|
+
"auth:lease_lost",
|
|
11194
11321
|
"validation:invalid_input",
|
|
11195
11322
|
"validation:missing_field",
|
|
11196
11323
|
"validation:invalid_format",
|
|
@@ -11221,20 +11348,20 @@ function isApiError(result) {
|
|
|
11221
11348
|
function isApiSuccess(result) {
|
|
11222
11349
|
return result.success === true;
|
|
11223
11350
|
}
|
|
11224
|
-
function isRecord$
|
|
11351
|
+
function isRecord$35(value) {
|
|
11225
11352
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
11226
11353
|
}
|
|
11227
11354
|
function isFieldError(value) {
|
|
11228
|
-
return isRecord$
|
|
11355
|
+
return isRecord$35(value) && typeof value.field === "string" && typeof value.code === "string" && typeof value.message === "string";
|
|
11229
11356
|
}
|
|
11230
11357
|
function fieldErrorsFromUnknown(value) {
|
|
11231
11358
|
if (!Array.isArray(value)) return null;
|
|
11232
11359
|
return value.every(isFieldError) ? value : null;
|
|
11233
11360
|
}
|
|
11234
11361
|
function extractEnvelopeErrorObject(body) {
|
|
11235
|
-
if (!isRecord$
|
|
11362
|
+
if (!isRecord$35(body)) return null;
|
|
11236
11363
|
const error$1 = body.error;
|
|
11237
|
-
if (!isRecord$
|
|
11364
|
+
if (!isRecord$35(error$1)) return null;
|
|
11238
11365
|
if ("success" in body && body.success !== false) {
|
|
11239
11366
|
return null;
|
|
11240
11367
|
}
|
|
@@ -11844,7 +11971,7 @@ const DEFAULT_CONFIG_PATH = "./riverbank.config.ts";
|
|
|
11844
11971
|
function formatPushConfigActionFailure() {
|
|
11845
11972
|
return "push-config failed";
|
|
11846
11973
|
}
|
|
11847
|
-
function isRecord$
|
|
11974
|
+
function isRecord$34(value) {
|
|
11848
11975
|
return typeof value === "object" && value !== null;
|
|
11849
11976
|
}
|
|
11850
11977
|
function parseErrorDetails(value) {
|
|
@@ -11852,10 +11979,10 @@ function parseErrorDetails(value) {
|
|
|
11852
11979
|
if (typeof value === "string") {
|
|
11853
11980
|
return { message: value };
|
|
11854
11981
|
}
|
|
11855
|
-
if (!isRecord$
|
|
11982
|
+
if (!isRecord$34(value)) return {};
|
|
11856
11983
|
const message = typeof value.message === "string" ? value.message : undefined;
|
|
11857
11984
|
const fieldErrorsRaw = value.fieldErrors;
|
|
11858
|
-
const fieldErrors = Array.isArray(fieldErrorsRaw) ? fieldErrorsRaw.filter(isRecord$
|
|
11985
|
+
const fieldErrors = Array.isArray(fieldErrorsRaw) ? fieldErrorsRaw.filter(isRecord$34).map((d) => ({
|
|
11859
11986
|
field: typeof d.field === "string" ? d.field : "",
|
|
11860
11987
|
message: typeof d.message === "string" ? d.message : ""
|
|
11861
11988
|
})).filter((d) => d.field.length > 0 && d.message.length > 0) : undefined;
|
|
@@ -11870,7 +11997,7 @@ function formatFieldErrors(fieldErrors) {
|
|
|
11870
11997
|
}
|
|
11871
11998
|
function getDashboardErrorMessage(responseJson, fallback) {
|
|
11872
11999
|
if (!responseJson) return fallback;
|
|
11873
|
-
if (isRecord$
|
|
12000
|
+
if (isRecord$34(responseJson) && "error" in responseJson) {
|
|
11874
12001
|
const parsed = parseErrorDetails(responseJson.error);
|
|
11875
12002
|
const msg = parsed.message ?? fallback;
|
|
11876
12003
|
return msg + formatFieldErrors(parsed.fieldErrors);
|
|
@@ -11883,12 +12010,12 @@ function getDashboardErrorMessage(responseJson, fallback) {
|
|
|
11883
12010
|
async function pushToDashboard(dashboardUrl, siteId, apiKey, config$1, options) {
|
|
11884
12011
|
const normalizedDashboardUrl = dashboardUrl.replace(/\/+$/, "");
|
|
11885
12012
|
const baseUrl = `${normalizedDashboardUrl}/api`;
|
|
11886
|
-
const path$
|
|
11887
|
-
const pushUrl = `${baseUrl}${path$
|
|
12013
|
+
const path$4 = `/sites/${siteId}/sdk-config`;
|
|
12014
|
+
const pushUrl = `${baseUrl}${path$4}`;
|
|
11888
12015
|
const requestInfo = {
|
|
11889
12016
|
method: "POST",
|
|
11890
12017
|
intent: "write",
|
|
11891
|
-
path: path$
|
|
12018
|
+
path: path$4,
|
|
11892
12019
|
url: pushUrl,
|
|
11893
12020
|
baseUrl,
|
|
11894
12021
|
dashboardUrl: normalizedDashboardUrl,
|
|
@@ -14130,14 +14257,14 @@ function buildDashboardTeamMemberNavPlan(ctx) {
|
|
|
14130
14257
|
}
|
|
14131
14258
|
return items;
|
|
14132
14259
|
}
|
|
14133
|
-
function isTeamMemberAccessiblePath(path$
|
|
14134
|
-
if (path$
|
|
14260
|
+
function isTeamMemberAccessiblePath(path$4, ownAppointmentResourceId) {
|
|
14261
|
+
if (path$4 === "bookings" || path$4 === "bookings/resources") {
|
|
14135
14262
|
return true;
|
|
14136
14263
|
}
|
|
14137
|
-
if (path$
|
|
14264
|
+
if (path$4 === "bookings/appointments" || path$4.startsWith("bookings/appointments/")) {
|
|
14138
14265
|
return true;
|
|
14139
14266
|
}
|
|
14140
|
-
if (ownAppointmentResourceId && path$
|
|
14267
|
+
if (ownAppointmentResourceId && path$4.startsWith(`bookings/resources/${ownAppointmentResourceId}`)) {
|
|
14141
14268
|
return true;
|
|
14142
14269
|
}
|
|
14143
14270
|
return false;
|
|
@@ -16117,27 +16244,27 @@ function scopePropValue(value, scope) {
|
|
|
16117
16244
|
}
|
|
16118
16245
|
return value;
|
|
16119
16246
|
}
|
|
16120
|
-
function scopeContentPath(path$
|
|
16247
|
+
function scopeContentPath(path$4, scope) {
|
|
16121
16248
|
if (!scope || scope.length === 0) {
|
|
16122
|
-
return path$
|
|
16249
|
+
return path$4;
|
|
16123
16250
|
}
|
|
16124
|
-
if (path$
|
|
16251
|
+
if (path$4 === "content") {
|
|
16125
16252
|
return `content.${scope}`;
|
|
16126
16253
|
}
|
|
16127
|
-
if (path$
|
|
16128
|
-
const remainder = path$
|
|
16254
|
+
if (path$4.startsWith("content.")) {
|
|
16255
|
+
const remainder = path$4.slice("content.".length);
|
|
16129
16256
|
return remainder.length > 0 ? `content.${scope}.${remainder}` : `content.${scope}`;
|
|
16130
16257
|
}
|
|
16131
|
-
if (path$
|
|
16132
|
-
return path$
|
|
16258
|
+
if (path$4.startsWith("content[")) {
|
|
16259
|
+
return path$4.replace(/^content/, `content.${scope}`);
|
|
16133
16260
|
}
|
|
16134
|
-
if (path$
|
|
16135
|
-
return path$
|
|
16261
|
+
if (path$4.startsWith("$root.")) {
|
|
16262
|
+
return path$4;
|
|
16136
16263
|
}
|
|
16137
|
-
if (path$
|
|
16138
|
-
return path$
|
|
16264
|
+
if (path$4.includes(".")) {
|
|
16265
|
+
return path$4;
|
|
16139
16266
|
}
|
|
16140
|
-
return `content.${scope}.${path$
|
|
16267
|
+
return `content.${scope}.${path$4}`;
|
|
16141
16268
|
}
|
|
16142
16269
|
|
|
16143
16270
|
//#endregion
|
|
@@ -16383,11 +16510,11 @@ function bind(from, options) {
|
|
|
16383
16510
|
}
|
|
16384
16511
|
});
|
|
16385
16512
|
}
|
|
16386
|
-
function when(path$
|
|
16513
|
+
function when(path$4, options) {
|
|
16387
16514
|
return (node) => ({
|
|
16388
16515
|
...node,
|
|
16389
16516
|
$when: {
|
|
16390
|
-
when: { from: path$
|
|
16517
|
+
when: { from: path$4 },
|
|
16391
16518
|
...options?.equals !== undefined ? { equals: options.equals } : {},
|
|
16392
16519
|
...options?.not ? { not: true } : {},
|
|
16393
16520
|
...options?.authoringPresence ? { authoringPresence: options.authoringPresence } : {}
|
|
@@ -16572,23 +16699,23 @@ const BACKGROUND_FRAME_BASE_CLASS = "rb-background-frame rb-absolute rb-inset-0
|
|
|
16572
16699
|
* ]
|
|
16573
16700
|
* )
|
|
16574
16701
|
*/
|
|
16575
|
-
function backgroundLayer(path$
|
|
16702
|
+
function backgroundLayer(path$4, options = {}) {
|
|
16576
16703
|
const { styleClassName = "background-style rb-absolute rb-inset-0 rb-z-neg-10 rb-h-full rb-w-full rb-pointer-events-none", imageClassName, overlayClassName = "background-overlay rb-absolute rb-inset-0 rb-z-neg-10 rb-h-full rb-w-full rb-pointer-events-none", fallbackToken, omitImageLayer = false, imageLoading, imageFetchPriority } = options;
|
|
16577
16704
|
const styleLayer = el("div", {
|
|
16578
16705
|
className: styleClassName,
|
|
16579
16706
|
style: { $bind: {
|
|
16580
|
-
from: path$
|
|
16707
|
+
from: path$4,
|
|
16581
16708
|
transforms: [{
|
|
16582
16709
|
id: "background.resolveStyle",
|
|
16583
16710
|
...typeof fallbackToken === "string" && fallbackToken.trim().length > 0 ? { options: { fallbackToken: fallbackToken.trim() } } : {}
|
|
16584
16711
|
}]
|
|
16585
16712
|
} }
|
|
16586
16713
|
});
|
|
16587
|
-
const imageLayer = createBackgroundImageNode(path$
|
|
16714
|
+
const imageLayer = createBackgroundImageNode(path$4, imageClassName, {
|
|
16588
16715
|
loading: imageLoading,
|
|
16589
16716
|
fetchPriority: imageFetchPriority
|
|
16590
16717
|
});
|
|
16591
|
-
const overlayLayer = createBackgroundOverlayNode(path$
|
|
16718
|
+
const overlayLayer = createBackgroundOverlayNode(path$4, overlayClassName);
|
|
16592
16719
|
return omitImageLayer ? [styleLayer, overlayLayer] : [
|
|
16593
16720
|
styleLayer,
|
|
16594
16721
|
imageLayer,
|
|
@@ -16603,7 +16730,7 @@ function backgroundLayer(path$3, options = {}) {
|
|
|
16603
16730
|
* Backgrounds that explicitly opt into overflow keep that behavior within
|
|
16604
16731
|
* the decorative layer rather than changing the content root.
|
|
16605
16732
|
*/
|
|
16606
|
-
function backgroundFrame(path$
|
|
16733
|
+
function backgroundFrame(path$4, options = {}) {
|
|
16607
16734
|
const { leadingNodes = [], ...layerOptions } = options;
|
|
16608
16735
|
const framedLayerOptions = {
|
|
16609
16736
|
...layerOptions,
|
|
@@ -16613,7 +16740,7 @@ function backgroundFrame(path$3, options = {}) {
|
|
|
16613
16740
|
};
|
|
16614
16741
|
return el("div", {
|
|
16615
16742
|
className: { $bind: {
|
|
16616
|
-
from: path$
|
|
16743
|
+
from: path$4,
|
|
16617
16744
|
transforms: [{
|
|
16618
16745
|
id: "background.resolveFrameClassName",
|
|
16619
16746
|
options: { baseClass: BACKGROUND_FRAME_BASE_CLASS }
|
|
@@ -16621,7 +16748,7 @@ function backgroundFrame(path$3, options = {}) {
|
|
|
16621
16748
|
fallback: `${BACKGROUND_FRAME_BASE_CLASS} rb-overflow-hidden`
|
|
16622
16749
|
} },
|
|
16623
16750
|
style: { borderRadius: "inherit" }
|
|
16624
|
-
}, [...leadingNodes, ...backgroundLayer(path$
|
|
16751
|
+
}, [...leadingNodes, ...backgroundLayer(path$4, framedLayerOptions)]);
|
|
16625
16752
|
}
|
|
16626
16753
|
/**
|
|
16627
16754
|
* Creates a media node for rendering background image/video media with conditional rendering.
|
|
@@ -16649,24 +16776,24 @@ function backgroundFrame(path$3, options = {}) {
|
|
|
16649
16776
|
* 'rb-absolute rb-inset-0 rb-h-full rb-w-full'
|
|
16650
16777
|
* )
|
|
16651
16778
|
*/
|
|
16652
|
-
function createBackgroundImageNode(path$
|
|
16653
|
-
const imagePath = `${path$
|
|
16779
|
+
function createBackgroundImageNode(path$4, baseClassName = "rb-absolute rb-z-neg-10", options = {}) {
|
|
16780
|
+
const imagePath = `${path$4}.image`;
|
|
16654
16781
|
return media({
|
|
16655
16782
|
className: { $bind: {
|
|
16656
|
-
from: path$
|
|
16783
|
+
from: path$4,
|
|
16657
16784
|
transforms: [{
|
|
16658
16785
|
id: "background.resolveImageClassName",
|
|
16659
16786
|
options: { baseClass: `background-image ${baseClassName}` }
|
|
16660
16787
|
}]
|
|
16661
16788
|
} },
|
|
16662
16789
|
style: { $bind: {
|
|
16663
|
-
from: path$
|
|
16790
|
+
from: path$4,
|
|
16664
16791
|
transforms: [{ id: "background.resolveImageStyle" }]
|
|
16665
16792
|
} },
|
|
16666
16793
|
videoPlayback: "background",
|
|
16667
16794
|
...options.loading ? { loading: options.loading } : {},
|
|
16668
16795
|
...options.fetchPriority ? { fetchPriority: options.fetchPriority } : {}
|
|
16669
|
-
}, when(imagePath), bind(path$
|
|
16796
|
+
}, when(imagePath), bind(path$4, { transforms: [{ id: "background.resolveMedia" }] }));
|
|
16670
16797
|
}
|
|
16671
16798
|
/**
|
|
16672
16799
|
* Creates a div node for rendering color/gradient overlays on background images.
|
|
@@ -16689,8 +16816,8 @@ function createBackgroundImageNode(path$3, baseClassName = "rb-absolute rb-z-neg
|
|
|
16689
16816
|
* // Standalone usage
|
|
16690
16817
|
* const overlayNode = createBackgroundOverlayNode('_sectionStyles.background')
|
|
16691
16818
|
*/
|
|
16692
|
-
function createBackgroundOverlayNode(path$
|
|
16693
|
-
const overlayPath = `${path$
|
|
16819
|
+
function createBackgroundOverlayNode(path$4, className = "background-overlay rb-absolute rb-inset-0 rb-z-neg-10 rb-h-full rb-w-full rb-pointer-events-none") {
|
|
16820
|
+
const overlayPath = `${path$4}.overlay`;
|
|
16694
16821
|
return el("div", {
|
|
16695
16822
|
className,
|
|
16696
16823
|
style: { $bind: {
|
|
@@ -16734,9 +16861,9 @@ function headingGroup(opts) {
|
|
|
16734
16861
|
|
|
16735
16862
|
//#endregion
|
|
16736
16863
|
//#region ../blocks/src/system/node/fragments/richCopy.ts
|
|
16737
|
-
function richCopy(path$
|
|
16864
|
+
function richCopy(path$4, className, ...mods) {
|
|
16738
16865
|
const props$1 = className ? { className } : {};
|
|
16739
|
-
return richText(props$1, when(path$
|
|
16866
|
+
return richText(props$1, when(path$4), bind(path$4), ...mods);
|
|
16740
16867
|
}
|
|
16741
16868
|
|
|
16742
16869
|
//#endregion
|
|
@@ -18876,10 +19003,10 @@ const boxStylesBorderColorTransform = {
|
|
|
18876
19003
|
return rgbColorValue(parsedFallback ?? "border");
|
|
18877
19004
|
}
|
|
18878
19005
|
};
|
|
18879
|
-
function readPath(source, path$
|
|
18880
|
-
if (!source || !path$
|
|
18881
|
-
if (!path$
|
|
18882
|
-
return path$
|
|
19006
|
+
function readPath(source, path$4) {
|
|
19007
|
+
if (!source || !path$4) return undefined;
|
|
19008
|
+
if (!path$4.includes(".")) return source[path$4];
|
|
19009
|
+
return path$4.split(".").reduce((acc, segment) => {
|
|
18883
19010
|
if (acc && typeof acc === "object" && segment in acc) {
|
|
18884
19011
|
return acc[segment];
|
|
18885
19012
|
}
|
|
@@ -21952,7 +22079,7 @@ const teamMemberFragment = defineFragment({
|
|
|
21952
22079
|
//#region ../blocks/src/system/data/linkedContentEntries.ts
|
|
21953
22080
|
const LINKED_CONTENT_ENTRY_META_KEY = "__rbLinkedContentEntry";
|
|
21954
22081
|
function coerceLinkedContentEntriesPayload(payload) {
|
|
21955
|
-
if (!isRecord$
|
|
22082
|
+
if (!isRecord$33(payload)) return payload;
|
|
21956
22083
|
const response = payload;
|
|
21957
22084
|
if (!Array.isArray(response.entries)) return payload;
|
|
21958
22085
|
const contentType = parsePublicContentTypeMeta(response.contentType);
|
|
@@ -21960,16 +22087,16 @@ function coerceLinkedContentEntriesPayload(payload) {
|
|
|
21960
22087
|
return response.entries.map((entry) => enrichLinkedContentEntry(entry, contentType));
|
|
21961
22088
|
}
|
|
21962
22089
|
function getLinkedContentEntryMeta(value) {
|
|
21963
|
-
if (!isRecord$
|
|
22090
|
+
if (!isRecord$33(value)) return null;
|
|
21964
22091
|
const candidate = value[LINKED_CONTENT_ENTRY_META_KEY];
|
|
21965
22092
|
return isLinkedContentEntryMeta(candidate) ? candidate : null;
|
|
21966
22093
|
}
|
|
21967
22094
|
function buildLinkedContentEditTarget(input) {
|
|
21968
22095
|
const { entry, sourceBlockId, sourceBlockKind, itemIndex } = input;
|
|
21969
|
-
if (!isRecord$
|
|
22096
|
+
if (!isRecord$33(entry)) return null;
|
|
21970
22097
|
const meta = getLinkedContentEntryMeta(entry);
|
|
21971
22098
|
if (!meta || meta.support.kind !== "supported") return null;
|
|
21972
|
-
const content = isRecord$
|
|
22099
|
+
const content = isRecord$33(entry.content) ? entry.content : {};
|
|
21973
22100
|
return {
|
|
21974
22101
|
kind: "linked-content-entry",
|
|
21975
22102
|
entryId: meta.entryId,
|
|
@@ -22043,12 +22170,12 @@ function resolveLinkedEntryInlineFieldEligibility(input) {
|
|
|
22043
22170
|
};
|
|
22044
22171
|
}
|
|
22045
22172
|
function enrichLinkedContentEntry(entry, contentType) {
|
|
22046
|
-
if (!isRecord$
|
|
22173
|
+
if (!isRecord$33(entry)) return entry;
|
|
22047
22174
|
const entryId = typeof entry.id === "string" ? entry.id : null;
|
|
22048
22175
|
if (!entryId) return entry;
|
|
22049
22176
|
const title = typeof entry.title === "string" && entry.title.trim().length > 0 ? entry.title : entryId;
|
|
22050
22177
|
const optimisticHash = typeof entry.optimisticHash === "string" && entry.optimisticHash.length > 0 ? entry.optimisticHash : null;
|
|
22051
|
-
const content = isRecord$
|
|
22178
|
+
const content = isRecord$33(entry.content) ? entry.content : {};
|
|
22052
22179
|
const meta = {
|
|
22053
22180
|
kind: "linked-content-entry",
|
|
22054
22181
|
entryId,
|
|
@@ -22157,7 +22284,7 @@ function capitalize(value) {
|
|
|
22157
22284
|
return value.charAt(0).toUpperCase() + value.slice(1).toLowerCase();
|
|
22158
22285
|
}
|
|
22159
22286
|
function parsePublicContentTypeMeta(value) {
|
|
22160
|
-
if (!isRecord$
|
|
22287
|
+
if (!isRecord$33(value)) return null;
|
|
22161
22288
|
if (typeof value.key !== "string" || value.key.trim().length === 0) return null;
|
|
22162
22289
|
return {
|
|
22163
22290
|
key: value.key,
|
|
@@ -22167,7 +22294,7 @@ function parsePublicContentTypeMeta(value) {
|
|
|
22167
22294
|
};
|
|
22168
22295
|
}
|
|
22169
22296
|
function parsePublicContentTypeLinkedEntryEditing(value) {
|
|
22170
|
-
if (!isRecord$
|
|
22297
|
+
if (!isRecord$33(value) || typeof value.kind !== "string") return null;
|
|
22171
22298
|
switch (value.kind) {
|
|
22172
22299
|
case "generic": return { kind: "generic" };
|
|
22173
22300
|
case "unsupported-domain-backed": return {
|
|
@@ -22178,7 +22305,7 @@ function parsePublicContentTypeLinkedEntryEditing(value) {
|
|
|
22178
22305
|
}
|
|
22179
22306
|
}
|
|
22180
22307
|
function parsePublicContentTypeFieldMeta(value) {
|
|
22181
|
-
if (!isRecord$
|
|
22308
|
+
if (!isRecord$33(value)) return [];
|
|
22182
22309
|
if (typeof value.id !== "string" || typeof value.type !== "string") return [];
|
|
22183
22310
|
return [{
|
|
22184
22311
|
id: value.id,
|
|
@@ -22193,14 +22320,14 @@ function parseStringArray(value) {
|
|
|
22193
22320
|
return value.filter((item) => typeof item === "string");
|
|
22194
22321
|
}
|
|
22195
22322
|
function isLinkedContentEntryMeta(value) {
|
|
22196
|
-
if (!isRecord$
|
|
22323
|
+
if (!isRecord$33(value)) return false;
|
|
22197
22324
|
if (value.kind !== "linked-content-entry") return false;
|
|
22198
22325
|
if (typeof value.entryId !== "string") return false;
|
|
22199
22326
|
if (typeof value.contentTypeKey !== "string") return false;
|
|
22200
22327
|
if (typeof value.contentTypeLabel !== "string") return false;
|
|
22201
22328
|
if (typeof value.title !== "string") return false;
|
|
22202
22329
|
if (!(value.optimisticHash === null || typeof value.optimisticHash === "string")) return false;
|
|
22203
|
-
if (!isRecord$
|
|
22330
|
+
if (!isRecord$33(value.contentType)) return false;
|
|
22204
22331
|
if (!isLinkedEntryFieldSourceArray(value.fieldSources)) return false;
|
|
22205
22332
|
return isLinkedContentEditSupport(value.support);
|
|
22206
22333
|
}
|
|
@@ -22208,7 +22335,7 @@ function isLinkedEntryFieldSourceArray(value) {
|
|
|
22208
22335
|
return Array.isArray(value) && value.every(isLinkedEntryFieldSource);
|
|
22209
22336
|
}
|
|
22210
22337
|
function isLinkedEntryFieldSource(value) {
|
|
22211
|
-
if (!isRecord$
|
|
22338
|
+
if (!isRecord$33(value)) return false;
|
|
22212
22339
|
if (typeof value.displayPath !== "string") return false;
|
|
22213
22340
|
switch (value.kind) {
|
|
22214
22341
|
case "content-field": return typeof value.fieldPath === "string" && (value.fieldType === "text" || value.fieldType === "richText");
|
|
@@ -22229,7 +22356,7 @@ function isLinkedEntryInlineFieldReadOnlyReason(value) {
|
|
|
22229
22356
|
}
|
|
22230
22357
|
}
|
|
22231
22358
|
function isLinkedContentEditSupport(value) {
|
|
22232
|
-
if (!isRecord$
|
|
22359
|
+
if (!isRecord$33(value) || typeof value.kind !== "string") return false;
|
|
22233
22360
|
switch (value.kind) {
|
|
22234
22361
|
case "supported": return true;
|
|
22235
22362
|
case "unsupported-domain-backed":
|
|
@@ -22238,7 +22365,7 @@ function isLinkedContentEditSupport(value) {
|
|
|
22238
22365
|
default: return false;
|
|
22239
22366
|
}
|
|
22240
22367
|
}
|
|
22241
|
-
function isRecord$
|
|
22368
|
+
function isRecord$33(value) {
|
|
22242
22369
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
22243
22370
|
}
|
|
22244
22371
|
function describeLinkedContentEditSupport(support) {
|
|
@@ -23806,9 +23933,9 @@ function maybeBuildSupabaseTransformUrl(inputUrl, options) {
|
|
|
23806
23933
|
const remainder = url.pathname.slice(idx + marker.length);
|
|
23807
23934
|
const parts = remainder.split("/").filter(Boolean);
|
|
23808
23935
|
const bucket = parts[0];
|
|
23809
|
-
const path$
|
|
23810
|
-
if (!bucket || !path$
|
|
23811
|
-
url.pathname = `/storage/v1/render/image/public/${bucket}/${path$
|
|
23936
|
+
const path$4 = parts.slice(1).join("/");
|
|
23937
|
+
if (!bucket || !path$4) return inputUrl;
|
|
23938
|
+
url.pathname = `/storage/v1/render/image/public/${bucket}/${path$4}`;
|
|
23812
23939
|
url.search = "";
|
|
23813
23940
|
if (width) url.searchParams.set("width", String(width));
|
|
23814
23941
|
if (height) url.searchParams.set("height", String(height));
|
|
@@ -24021,8 +24148,8 @@ const SECTION_BACKGROUND_MIN_SOURCE_HEIGHT = 900;
|
|
|
24021
24148
|
const TEAM_MEMBER_MIN_SOURCE_WIDTH = 1e3;
|
|
24022
24149
|
const DEFAULT_DELIVERY_MAX_WIDTH = 2560;
|
|
24023
24150
|
const DEFAULT_MARQUEE_IMAGE_PX = 256;
|
|
24024
|
-
function normalizeSlotPath(path$
|
|
24025
|
-
return path$
|
|
24151
|
+
function normalizeSlotPath(path$4) {
|
|
24152
|
+
return path$4.split(".").map((segment) => /^\d+$/.test(segment) ? "[]" : segment).join(".");
|
|
24026
24153
|
}
|
|
24027
24154
|
function asString(value) {
|
|
24028
24155
|
return typeof value === "string" && value.trim().length > 0 ? value.trim() : undefined;
|
|
@@ -24036,8 +24163,8 @@ function asPositiveIntArray(value) {
|
|
|
24036
24163
|
const numbers = value.map((entry) => asFiniteNumber(entry)).filter((entry) => entry !== undefined && entry > 0).map((entry) => Math.round(entry));
|
|
24037
24164
|
return numbers.length > 0 ? numbers : undefined;
|
|
24038
24165
|
}
|
|
24039
|
-
function getValueAtPath(values, path$
|
|
24040
|
-
const segments = path$
|
|
24166
|
+
function getValueAtPath(values, path$4) {
|
|
24167
|
+
const segments = path$4.split(".").filter((segment) => segment.length > 0);
|
|
24041
24168
|
let current = values;
|
|
24042
24169
|
for (const segment of segments) {
|
|
24043
24170
|
if (Array.isArray(current)) {
|
|
@@ -25772,7 +25899,7 @@ function resolveFallbackHref(link$2) {
|
|
|
25772
25899
|
return href.length > 0 ? href : null;
|
|
25773
25900
|
}
|
|
25774
25901
|
function isPlainRecord$1(value) {
|
|
25775
|
-
return isRecord$
|
|
25902
|
+
return isRecord$16(value);
|
|
25776
25903
|
}
|
|
25777
25904
|
|
|
25778
25905
|
//#endregion
|
|
@@ -25859,16 +25986,16 @@ const interpolateRichTextTokensOptionsSchema = z.object({ tokens: z.array(suppor
|
|
|
25859
25986
|
const richTextTokenPattern = /\{\{\s*([a-zA-Z0-9_]+)\s*\}\}/g;
|
|
25860
25987
|
function getSiteName(context) {
|
|
25861
25988
|
const viewModel = context.viewModel;
|
|
25862
|
-
if (!isRecord$
|
|
25989
|
+
if (!isRecord$16(viewModel)) return null;
|
|
25863
25990
|
const site = viewModel.site;
|
|
25864
|
-
if (isRecord$
|
|
25991
|
+
if (isRecord$16(site) && typeof site.title === "string") {
|
|
25865
25992
|
const title = site.title.trim();
|
|
25866
25993
|
return title.length > 0 ? title : null;
|
|
25867
25994
|
}
|
|
25868
25995
|
const root = viewModel.$root;
|
|
25869
|
-
if (isRecord$
|
|
25996
|
+
if (isRecord$16(root)) {
|
|
25870
25997
|
const rootSite = root.site;
|
|
25871
|
-
if (isRecord$
|
|
25998
|
+
if (isRecord$16(rootSite) && typeof rootSite.title === "string") {
|
|
25872
25999
|
const title = rootSite.title.trim();
|
|
25873
26000
|
if (title.length > 0) return title;
|
|
25874
26001
|
}
|
|
@@ -25890,7 +26017,7 @@ function replaceTokenText(input, allowedTokens, tokenValues) {
|
|
|
25890
26017
|
});
|
|
25891
26018
|
}
|
|
25892
26019
|
function visitRichTextNode(node, allowedTokens, tokenValues) {
|
|
25893
|
-
if (!isRecord$
|
|
26020
|
+
if (!isRecord$16(node)) return node;
|
|
25894
26021
|
let changed = false;
|
|
25895
26022
|
const nextNode = { ...node };
|
|
25896
26023
|
if (nextNode.type === "text" && typeof nextNode.text === "string") {
|
|
@@ -25912,7 +26039,7 @@ function visitRichTextNode(node, allowedTokens, tokenValues) {
|
|
|
25912
26039
|
return changed ? nextNode : node;
|
|
25913
26040
|
}
|
|
25914
26041
|
function interpolateRichTextTokens(value, options, context) {
|
|
25915
|
-
if (!isRecord$
|
|
26042
|
+
if (!isRecord$16(value)) return value;
|
|
25916
26043
|
const allowedTokens = new Set(options.tokens);
|
|
25917
26044
|
const tokenValues = {
|
|
25918
26045
|
year: String(new Date().getFullYear()),
|
|
@@ -27010,7 +27137,6 @@ const publicEventBaseSchema = z.object({
|
|
|
27010
27137
|
description: z.string().nullable(),
|
|
27011
27138
|
content: z.object({ body: RichTextDocSchema.nullable().optional() }).optional(),
|
|
27012
27139
|
presentation: z.object({
|
|
27013
|
-
cardTitleOverride: z.string().nullable().optional(),
|
|
27014
27140
|
summary: z.string().nullable().optional(),
|
|
27015
27141
|
image: mediaSchema.nullable().optional()
|
|
27016
27142
|
}).optional(),
|
|
@@ -27043,6 +27169,7 @@ const publicEventBaseSchema = z.object({
|
|
|
27043
27169
|
"archived"
|
|
27044
27170
|
]).optional(),
|
|
27045
27171
|
timeZone: z.string(),
|
|
27172
|
+
siteTimeZone: z.string().optional(),
|
|
27046
27173
|
pricing: publicEventPricingSchema,
|
|
27047
27174
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
27048
27175
|
cancellationPolicy: z.object({ refunds: z.object({
|
|
@@ -27716,10 +27843,10 @@ function safeAppPathOrFallback(value, fallback) {
|
|
|
27716
27843
|
const result = parseSafeAppPath(value);
|
|
27717
27844
|
return result.ok ? result.value : fallback;
|
|
27718
27845
|
}
|
|
27719
|
-
function buildSafeRedirectUrl(path$
|
|
27846
|
+
function buildSafeRedirectUrl(path$4, baseUrl) {
|
|
27720
27847
|
const base = baseUrl instanceof URL ? baseUrl : new URL(baseUrl);
|
|
27721
27848
|
const expectedOrigin = base.origin;
|
|
27722
|
-
const resolved = new URL(path$
|
|
27849
|
+
const resolved = new URL(path$4, expectedOrigin);
|
|
27723
27850
|
if (resolved.origin !== expectedOrigin) {
|
|
27724
27851
|
throw new Error("Safe app path resolved to an unexpected origin");
|
|
27725
27852
|
}
|
|
@@ -27759,11 +27886,11 @@ function assertSafePathSegments(segments) {
|
|
|
27759
27886
|
}
|
|
27760
27887
|
}
|
|
27761
27888
|
}
|
|
27762
|
-
function isRecord$
|
|
27889
|
+
function isRecord$32(value) {
|
|
27763
27890
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
27764
27891
|
}
|
|
27765
27892
|
function isPathContainer(value) {
|
|
27766
|
-
return Array.isArray(value) || isRecord$
|
|
27893
|
+
return Array.isArray(value) || isRecord$32(value);
|
|
27767
27894
|
}
|
|
27768
27895
|
function createPathContainer(nextIsIndex) {
|
|
27769
27896
|
return nextIsIndex ? [] : {};
|
|
@@ -27786,13 +27913,13 @@ function ensureContainerProperty(container, key, nextIsIndex) {
|
|
|
27786
27913
|
Reflect.set(container, key, nextContainer);
|
|
27787
27914
|
return nextContainer;
|
|
27788
27915
|
}
|
|
27789
|
-
function parsePath(path$
|
|
27790
|
-
if (Array.isArray(path$
|
|
27791
|
-
assertSafePathSegments(path$
|
|
27792
|
-
return path$
|
|
27916
|
+
function parsePath(path$4) {
|
|
27917
|
+
if (Array.isArray(path$4)) {
|
|
27918
|
+
assertSafePathSegments(path$4);
|
|
27919
|
+
return path$4;
|
|
27793
27920
|
}
|
|
27794
27921
|
const segments = [];
|
|
27795
|
-
const parts = path$
|
|
27922
|
+
const parts = path$4.split(PATH_SEPARATOR_REGEX$1);
|
|
27796
27923
|
for (const raw of parts) {
|
|
27797
27924
|
if (!raw) continue;
|
|
27798
27925
|
const baseMatch = raw.match(/^[^\[]+/);
|
|
@@ -27826,22 +27953,22 @@ function segmentsToPath$1(segments) {
|
|
|
27826
27953
|
if (!segments.length) return undefined;
|
|
27827
27954
|
return segments.map((s) => String(s)).join(".");
|
|
27828
27955
|
}
|
|
27829
|
-
function siblingPath(path$
|
|
27830
|
-
const segments = parsePath(path$
|
|
27956
|
+
function siblingPath(path$4, siblingFieldPath) {
|
|
27957
|
+
const segments = parsePath(path$4);
|
|
27831
27958
|
const siblingSegments = parsePath(siblingFieldPath);
|
|
27832
27959
|
const parentSegments = segments.slice(0, -1);
|
|
27833
27960
|
return segmentsToPath$1([...parentSegments, ...siblingSegments]) ?? siblingFieldPath;
|
|
27834
27961
|
}
|
|
27835
|
-
function getAtPath(source, path$
|
|
27836
|
-
const segments = parsePath(path$
|
|
27962
|
+
function getAtPath(source, path$4) {
|
|
27963
|
+
const segments = parsePath(path$4);
|
|
27837
27964
|
return segments.reduce((current, segment) => {
|
|
27838
27965
|
if (current === undefined || current === null) return undefined;
|
|
27839
27966
|
if (!isPathContainer(current)) return undefined;
|
|
27840
27967
|
return getContainerValue(current, segment);
|
|
27841
27968
|
}, source);
|
|
27842
27969
|
}
|
|
27843
|
-
function setAtPath(target, path$
|
|
27844
|
-
const segments = parsePath(path$
|
|
27970
|
+
function setAtPath(target, path$4, value) {
|
|
27971
|
+
const segments = parsePath(path$4);
|
|
27845
27972
|
let current = target;
|
|
27846
27973
|
for (let index = 0; index < segments.length; index += 1) {
|
|
27847
27974
|
const segment = segments[index];
|
|
@@ -27876,8 +28003,8 @@ function setAtPath(target, path$3, value) {
|
|
|
27876
28003
|
current = ensureContainerProperty(current, segment, nextIsIndex);
|
|
27877
28004
|
}
|
|
27878
28005
|
}
|
|
27879
|
-
function toAbsolutePath(base, path$
|
|
27880
|
-
const trimmed = path$
|
|
28006
|
+
function toAbsolutePath(base, path$4) {
|
|
28007
|
+
const trimmed = path$4.trim();
|
|
27881
28008
|
if (base == null || base.length === 0 || trimmed.startsWith("$root") || trimmed.startsWith("content.") || trimmed === "content") {
|
|
27882
28009
|
return trimmed;
|
|
27883
28010
|
}
|
|
@@ -28045,10 +28172,10 @@ function renderDoc(node, key, imageResolveContext, linkTarget) {
|
|
|
28045
28172
|
}
|
|
28046
28173
|
}
|
|
28047
28174
|
const DEFAULT_RICH_TEXT_CLASS = "rb-prose rb-max-w-none";
|
|
28048
|
-
function RichText$1({ as: Comp = "div", className, doc, path: path$
|
|
28175
|
+
function RichText$1({ as: Comp = "div", className, doc, path: path$4, linkTarget = "stored" }) {
|
|
28049
28176
|
const imageResolveContext = getCurrentResolveImageUrlContext() ?? null;
|
|
28050
28177
|
const content = doc ? renderDoc(doc, "doc", imageResolveContext, linkTarget) : null;
|
|
28051
|
-
const dataAttributes = path$
|
|
28178
|
+
const dataAttributes = path$4 ? { "data-builder-richtext": path$4 } : undefined;
|
|
28052
28179
|
const resolvedClassName = className?.trim() || DEFAULT_RICH_TEXT_CLASS;
|
|
28053
28180
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp, {
|
|
28054
28181
|
className: resolvedClassName,
|
|
@@ -28059,8 +28186,8 @@ function RichText$1({ as: Comp = "div", className, doc, path: path$3, linkTarget
|
|
|
28059
28186
|
|
|
28060
28187
|
//#endregion
|
|
28061
28188
|
//#region ../blocks/src/primitives/content/components/Text.tsx
|
|
28062
|
-
function Text$1({ as: Comp = "span", children, className = "", path: path$
|
|
28063
|
-
const dataAttributes = path$
|
|
28189
|
+
function Text$1({ as: Comp = "span", children, className = "", path: path$4, maxLength: _maxLength }) {
|
|
28190
|
+
const dataAttributes = path$4 ? { "data-builder-text": path$4 } : undefined;
|
|
28064
28191
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp, {
|
|
28065
28192
|
className,
|
|
28066
28193
|
...dataAttributes,
|
|
@@ -29504,8 +29631,8 @@ function textNodeContent(value) {
|
|
|
29504
29631
|
if (typeof value === "string" || typeof value === "number") return value;
|
|
29505
29632
|
return null;
|
|
29506
29633
|
}
|
|
29507
|
-
function readStringPath(source, path$
|
|
29508
|
-
const value = getAtPath(source, path$
|
|
29634
|
+
function readStringPath(source, path$4) {
|
|
29635
|
+
const value = getAtPath(source, path$4);
|
|
29509
29636
|
return typeof value === "string" ? value : null;
|
|
29510
29637
|
}
|
|
29511
29638
|
const RichTextNode = ({ value, blockKind, ...rest }) => {
|
|
@@ -29625,7 +29752,7 @@ function parseApprovedIconExampleSetId(value) {
|
|
|
29625
29752
|
//#endregion
|
|
29626
29753
|
//#region ../blocks/src/system/icons/value.ts
|
|
29627
29754
|
const NO_BLOCK_ICON_VALUE = { kind: "none" };
|
|
29628
|
-
function isRecord$
|
|
29755
|
+
function isRecord$31(value) {
|
|
29629
29756
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
29630
29757
|
}
|
|
29631
29758
|
function parseBlockIconValue(value) {
|
|
@@ -29635,7 +29762,7 @@ function parseBlockIconValue(value) {
|
|
|
29635
29762
|
iconId: value
|
|
29636
29763
|
};
|
|
29637
29764
|
}
|
|
29638
|
-
if (!isRecord$
|
|
29765
|
+
if (!isRecord$31(value)) {
|
|
29639
29766
|
return NO_BLOCK_ICON_VALUE;
|
|
29640
29767
|
}
|
|
29641
29768
|
switch (value.kind) {
|
|
@@ -29728,7 +29855,7 @@ function buildGeneratedBlockIconRenderAssetLookupFromUnknown(value) {
|
|
|
29728
29855
|
}
|
|
29729
29856
|
const inputs = [];
|
|
29730
29857
|
for (const [index, item] of value.entries()) {
|
|
29731
|
-
if (!isRecord$
|
|
29858
|
+
if (!isRecord$31(item)) {
|
|
29732
29859
|
return {
|
|
29733
29860
|
kind: "invalid_asset_entry",
|
|
29734
29861
|
index,
|
|
@@ -29796,7 +29923,7 @@ function resolveBlockIconRenderValue(value, generatedAssets = new Map()) {
|
|
|
29796
29923
|
}
|
|
29797
29924
|
}
|
|
29798
29925
|
function getGeneratedBlockIconStyleState(value, currentStyleGuideVersionId) {
|
|
29799
|
-
if (isRecord$
|
|
29926
|
+
if (isRecord$31(value) && value.kind === "generated" && parseBlockIconValue(value).kind !== "generated") {
|
|
29800
29927
|
return { kind: "invalid_generated" };
|
|
29801
29928
|
}
|
|
29802
29929
|
const parsed = parseBlockIconValue(value);
|
|
@@ -29882,11 +30009,11 @@ function resolveFeatureCardGeneratedIconSizePx(value) {
|
|
|
29882
30009
|
const parsed = parseFeatureCardGeneratedIconSizePx(value);
|
|
29883
30010
|
return parsed.ok ? parsed.value : unsafeAsFeatureCardGeneratedIconSizePx(FEATURE_CARD_GENERATED_ICON_SIZE_PX.default);
|
|
29884
30011
|
}
|
|
29885
|
-
function isRecord$
|
|
30012
|
+
function isRecord$30(value) {
|
|
29886
30013
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
29887
30014
|
}
|
|
29888
30015
|
function toPlainTextFromTipTap(value) {
|
|
29889
|
-
if (!isRecord$
|
|
30016
|
+
if (!isRecord$30(value)) return "";
|
|
29890
30017
|
if (typeof value.text === "string") return value.text;
|
|
29891
30018
|
const content = value.content;
|
|
29892
30019
|
if (!Array.isArray(content)) return "";
|
|
@@ -29943,7 +30070,7 @@ function suggestSemanticIconForFeatureCard(card) {
|
|
|
29943
30070
|
|
|
29944
30071
|
//#endregion
|
|
29945
30072
|
//#region ../blocks/src/system/icons/generatedAssets.ts
|
|
29946
|
-
function isRecord$
|
|
30073
|
+
function isRecord$29(value) {
|
|
29947
30074
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
29948
30075
|
}
|
|
29949
30076
|
function generatedIconAssetRefKey(ref) {
|
|
@@ -29953,11 +30080,11 @@ function collectGeneratedIconAssetRefs(page) {
|
|
|
29953
30080
|
const blocks = [];
|
|
29954
30081
|
for (const block of page.blocks) {
|
|
29955
30082
|
if (block.kind !== "block.feature-cards" || typeof block.id !== "string") continue;
|
|
29956
|
-
const content = isRecord$
|
|
30083
|
+
const content = isRecord$29(block.draftContent) ? block.draftContent : isRecord$29(block.content) ? block.content : null;
|
|
29957
30084
|
const cards = Array.isArray(content?.cards) ? content.cards : [];
|
|
29958
30085
|
const refs = new Map();
|
|
29959
30086
|
for (const card of cards) {
|
|
29960
|
-
if (!isRecord$
|
|
30087
|
+
if (!isRecord$29(card)) continue;
|
|
29961
30088
|
const icon$1 = parseBlockIconValue(card.icon);
|
|
29962
30089
|
if (icon$1.kind !== "generated") continue;
|
|
29963
30090
|
const ref = {
|
|
@@ -31362,8 +31489,8 @@ function decodeFailure(issues) {
|
|
|
31362
31489
|
function isDecodeSuccess(result) {
|
|
31363
31490
|
return result.ok;
|
|
31364
31491
|
}
|
|
31365
|
-
function zodIssuePath(path$
|
|
31366
|
-
return path$
|
|
31492
|
+
function zodIssuePath(path$4) {
|
|
31493
|
+
return path$4.flatMap((segment) => {
|
|
31367
31494
|
if (typeof segment === "string" || typeof segment === "number") {
|
|
31368
31495
|
return [segment];
|
|
31369
31496
|
}
|
|
@@ -33262,7 +33389,7 @@ function getWizardLocalStorage() {
|
|
|
33262
33389
|
}
|
|
33263
33390
|
}
|
|
33264
33391
|
function parseEnvelope(raw, config$1) {
|
|
33265
|
-
if (!isRecord$
|
|
33392
|
+
if (!isRecord$28(raw)) return {
|
|
33266
33393
|
kind: "removed_invalid",
|
|
33267
33394
|
reason: "invalid_envelope"
|
|
33268
33395
|
};
|
|
@@ -33351,7 +33478,7 @@ function createWizardDraftStorage(config$1) {
|
|
|
33351
33478
|
}
|
|
33352
33479
|
};
|
|
33353
33480
|
}
|
|
33354
|
-
function isRecord$
|
|
33481
|
+
function isRecord$28(value) {
|
|
33355
33482
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
33356
33483
|
}
|
|
33357
33484
|
function deepEqualJsonValue(left, right) {
|
|
@@ -33361,8 +33488,8 @@ function deepEqualJsonValue(left, right) {
|
|
|
33361
33488
|
if (left.length !== right.length) return false;
|
|
33362
33489
|
return left.every((item, index) => deepEqualJsonValue(item, right[index]));
|
|
33363
33490
|
}
|
|
33364
|
-
if (isRecord$
|
|
33365
|
-
if (!isRecord$
|
|
33491
|
+
if (isRecord$28(left) || isRecord$28(right)) {
|
|
33492
|
+
if (!isRecord$28(left) || !isRecord$28(right)) return false;
|
|
33366
33493
|
const leftKeys = Object.keys(left).sort();
|
|
33367
33494
|
if (!deepEqualJsonValue(leftKeys, Object.keys(right).sort())) return false;
|
|
33368
33495
|
return leftKeys.every((key) => deepEqualJsonValue(left[key], right[key]));
|
|
@@ -33408,18 +33535,6 @@ function isNavActionVisible(action) {
|
|
|
33408
33535
|
function assertNever$2$1(value) {
|
|
33409
33536
|
throw new Error(`Unexpected wizard navigation action: ${String(value)}`);
|
|
33410
33537
|
}
|
|
33411
|
-
function clampStepValue(value, total) {
|
|
33412
|
-
if (!Number.isFinite(value)) return 0;
|
|
33413
|
-
if (total <= 0) return 0;
|
|
33414
|
-
return Math.min(Math.max(Math.trunc(value), 0), total);
|
|
33415
|
-
}
|
|
33416
|
-
function resolveWizardProgressState(current, total) {
|
|
33417
|
-
const currentValue = clampStepValue(current, total);
|
|
33418
|
-
return {
|
|
33419
|
-
currentValue,
|
|
33420
|
-
percent: total <= 0 ? 0 : Math.round(currentValue / total * 100)
|
|
33421
|
-
};
|
|
33422
|
-
}
|
|
33423
33538
|
const DEFAULT_VISIBLE = { kind: "visible" };
|
|
33424
33539
|
const DEFAULT_REQUIRED = { kind: "required" };
|
|
33425
33540
|
const DEFAULT_VALID = { kind: "valid" };
|
|
@@ -33734,7 +33849,7 @@ function resolveAppointmentCheckoutVerificationState(input) {
|
|
|
33734
33849
|
tag: "timeout",
|
|
33735
33850
|
sessionId: input.config.sessionId,
|
|
33736
33851
|
appointmentId,
|
|
33737
|
-
message: "
|
|
33852
|
+
message: "We’re still confirming your payment. This can take a minute – you can check again, and you won’t be charged twice."
|
|
33738
33853
|
};
|
|
33739
33854
|
}
|
|
33740
33855
|
if (input.pollingStatus === "failed") {
|
|
@@ -33811,7 +33926,7 @@ function deriveBookingFormViewState(input) {
|
|
|
33811
33926
|
message: input.verificationState.message
|
|
33812
33927
|
};
|
|
33813
33928
|
case "timeout": return {
|
|
33814
|
-
kind: "
|
|
33929
|
+
kind: "timeout",
|
|
33815
33930
|
message: input.verificationState.message
|
|
33816
33931
|
};
|
|
33817
33932
|
case "confirmed": return {
|
|
@@ -33825,12 +33940,12 @@ function resolveBookingSiteId(siteId, form$1) {
|
|
|
33825
33940
|
return siteId || form$1?.siteId || "";
|
|
33826
33941
|
}
|
|
33827
33942
|
function normalizeBookingFormConfig(form$1) {
|
|
33828
|
-
if (!isRecord$
|
|
33943
|
+
if (!isRecord$27(form$1)) return null;
|
|
33829
33944
|
const id = readNonEmptyString(form$1.id);
|
|
33830
33945
|
const name = readNonEmptyString(form$1.name);
|
|
33831
33946
|
if (!id || !name) return null;
|
|
33832
|
-
const schemaSource = isRecord$
|
|
33833
|
-
const settingsSource = isRecord$
|
|
33947
|
+
const schemaSource = isRecord$27(form$1.schema) ? form$1.schema : isRecord$27(form$1.schemaJson) ? form$1.schemaJson : null;
|
|
33948
|
+
const settingsSource = isRecord$27(form$1.settings) ? form$1.settings : isRecord$27(form$1.settingsJson) ? form$1.settingsJson : null;
|
|
33834
33949
|
return {
|
|
33835
33950
|
id,
|
|
33836
33951
|
name,
|
|
@@ -33854,10 +33969,10 @@ function normalizeBookingServices(services) {
|
|
|
33854
33969
|
if (Array.isArray(services)) {
|
|
33855
33970
|
return services.filter(isBookingFormService).map(normalizeService);
|
|
33856
33971
|
}
|
|
33857
|
-
if (isRecord$
|
|
33972
|
+
if (isRecord$27(services) && "services" in services) {
|
|
33858
33973
|
return Array.isArray(services.services) ? services.services.filter(isBookingFormService).map(normalizeService) : [];
|
|
33859
33974
|
}
|
|
33860
|
-
return isRecord$
|
|
33975
|
+
return isRecord$27(services) ? Object.values(services).filter(isBookingFormService).map(normalizeService) : [];
|
|
33861
33976
|
}
|
|
33862
33977
|
function normalizeBookingSchema(value) {
|
|
33863
33978
|
if (!value) return undefined;
|
|
@@ -33869,7 +33984,7 @@ function normalizeBookingSchema(value) {
|
|
|
33869
33984
|
};
|
|
33870
33985
|
}
|
|
33871
33986
|
function readBookingFormField(value) {
|
|
33872
|
-
if (!isRecord$
|
|
33987
|
+
if (!isRecord$27(value)) return null;
|
|
33873
33988
|
const id = readNonEmptyString(value.id);
|
|
33874
33989
|
const label = readNonEmptyString(value.label);
|
|
33875
33990
|
const type = readBookingFieldType(value.type);
|
|
@@ -33912,7 +34027,7 @@ function readBookingFieldOptions(value) {
|
|
|
33912
34027
|
return options.length > 0 ? options : undefined;
|
|
33913
34028
|
}
|
|
33914
34029
|
function readBookingFieldOption(value) {
|
|
33915
|
-
if (!isRecord$
|
|
34030
|
+
if (!isRecord$27(value)) return null;
|
|
33916
34031
|
const optionValue = readNonEmptyString(value.value);
|
|
33917
34032
|
const label = readNonEmptyString(value.label);
|
|
33918
34033
|
return optionValue && label ? {
|
|
@@ -33932,7 +34047,7 @@ function normalizeBookingSettings(value) {
|
|
|
33932
34047
|
};
|
|
33933
34048
|
}
|
|
33934
34049
|
function isBookingFormService(value) {
|
|
33935
|
-
return isRecord$
|
|
34050
|
+
return isRecord$27(value) && typeof value.id === "string" && typeof value.siteId === "string" && typeof value.title === "string" && (value.consent === undefined || blockBookingConsentSchema.safeParse(value.consent).success);
|
|
33936
34051
|
}
|
|
33937
34052
|
function collectBookingCustomFields(data) {
|
|
33938
34053
|
const customFields = {};
|
|
@@ -33988,7 +34103,7 @@ function readStringArray(value) {
|
|
|
33988
34103
|
const strings = value.filter((item) => typeof item === "string");
|
|
33989
34104
|
return strings.length > 0 ? strings : undefined;
|
|
33990
34105
|
}
|
|
33991
|
-
function isRecord$
|
|
34106
|
+
function isRecord$27(value) {
|
|
33992
34107
|
return typeof value === "object" && value !== null;
|
|
33993
34108
|
}
|
|
33994
34109
|
function getBookingServicePaymentSelectionMode(service) {
|
|
@@ -34217,17 +34332,69 @@ function formatBookingSubmissionPreparationError(error$1) {
|
|
|
34217
34332
|
default: return assertNever$7(error$1);
|
|
34218
34333
|
}
|
|
34219
34334
|
}
|
|
34220
|
-
|
|
34221
|
-
|
|
34335
|
+
const DEFAULT_BOOKING_SUCCESS_COPY = {
|
|
34336
|
+
message: "Your booking has been confirmed.",
|
|
34337
|
+
defaultEmailSentence: "Check your email for details."
|
|
34338
|
+
};
|
|
34339
|
+
const DEFAULT_BOOKING_SUCCESS_MESSAGE = "Your booking has been confirmed. Check your email for details.";
|
|
34340
|
+
const DEFAULT_REGISTRATION_SUCCESS_COPY = {
|
|
34341
|
+
message: "Thank you for registering!",
|
|
34342
|
+
defaultEmailSentence: "Check your email for confirmation details."
|
|
34343
|
+
};
|
|
34344
|
+
const DEFAULT_REGISTRATION_SUCCESS_MESSAGE = "Thank you for registering! Check your email for confirmation details.";
|
|
34345
|
+
const DEFAULT_REGISTRATION_EMAIL_SENTENCE = "Check your email for confirmation details.";
|
|
34346
|
+
function getBookingSuccessCopy(successMessage) {
|
|
34347
|
+
const customMessage = successMessage?.trim();
|
|
34348
|
+
return customMessage && customMessage !== DEFAULT_BOOKING_SUCCESS_MESSAGE ? { message: customMessage } : DEFAULT_BOOKING_SUCCESS_COPY;
|
|
34349
|
+
}
|
|
34350
|
+
function getRegistrationSuccessCopy(result, fallback) {
|
|
34351
|
+
const isWaitlist = result?.status === "waitlist";
|
|
34352
|
+
const isInfo = result?.variant === "info";
|
|
34353
|
+
const includesEmailSentence = !isWaitlist && !isInfo;
|
|
34354
|
+
const responseMessage = result?.message;
|
|
34355
|
+
const trimmedResponseMessage = responseMessage?.trim();
|
|
34356
|
+
if ((isWaitlist || isInfo) && trimmedResponseMessage) {
|
|
34357
|
+
const emailFollowupMessage = result?.emailFollowupMessage;
|
|
34358
|
+
return {
|
|
34359
|
+
message: responseMessage ?? "",
|
|
34360
|
+
...emailFollowupMessage?.trim() ? { defaultEmailSentence: emailFollowupMessage } : {}
|
|
34361
|
+
};
|
|
34362
|
+
}
|
|
34363
|
+
if (trimmedResponseMessage === DEFAULT_REGISTRATION_SUCCESS_MESSAGE) {
|
|
34364
|
+
return includesEmailSentence ? DEFAULT_REGISTRATION_SUCCESS_COPY : { message: DEFAULT_REGISTRATION_SUCCESS_COPY.message };
|
|
34365
|
+
}
|
|
34366
|
+
if (trimmedResponseMessage) {
|
|
34367
|
+
return includesEmailSentence ? registrationCopyWithEmail(trimmedResponseMessage) : { message: trimmedResponseMessage };
|
|
34368
|
+
}
|
|
34369
|
+
const fallbackMessage = fallback?.trim();
|
|
34370
|
+
if (fallbackMessage && fallbackMessage !== DEFAULT_REGISTRATION_SUCCESS_MESSAGE) {
|
|
34371
|
+
return { message: fallbackMessage };
|
|
34372
|
+
}
|
|
34373
|
+
return includesEmailSentence ? DEFAULT_REGISTRATION_SUCCESS_COPY : { message: DEFAULT_REGISTRATION_SUCCESS_COPY.message };
|
|
34374
|
+
}
|
|
34375
|
+
function registrationCopyWithEmail(message) {
|
|
34376
|
+
return {
|
|
34377
|
+
message,
|
|
34378
|
+
defaultEmailSentence: DEFAULT_REGISTRATION_EMAIL_SENTENCE
|
|
34379
|
+
};
|
|
34380
|
+
}
|
|
34381
|
+
function getShopSuccessCopy(outcome) {
|
|
34382
|
+
switch (outcome) {
|
|
34383
|
+
case "success": return {
|
|
34384
|
+
message: "",
|
|
34385
|
+
defaultEmailSentence: "Check your email for confirmation."
|
|
34386
|
+
};
|
|
34387
|
+
case "cancelled": return { message: "You can try again whenever you’re ready." };
|
|
34388
|
+
}
|
|
34222
34389
|
}
|
|
34223
34390
|
|
|
34224
34391
|
//#endregion
|
|
34225
34392
|
//#region ../blocks/src/system/runtime/nodes/booking-form.service-categories.ts
|
|
34226
|
-
function isRecord$
|
|
34393
|
+
function isRecord$26(value) {
|
|
34227
34394
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
34228
34395
|
}
|
|
34229
34396
|
function readCategory(value) {
|
|
34230
|
-
if (!isRecord$
|
|
34397
|
+
if (!isRecord$26(value)) return [];
|
|
34231
34398
|
const { id, name, description } = value;
|
|
34232
34399
|
if (typeof id !== "string" || id.trim() === "" || typeof name !== "string") {
|
|
34233
34400
|
return [];
|
|
@@ -34245,7 +34412,7 @@ function readCategory(value) {
|
|
|
34245
34412
|
* it.
|
|
34246
34413
|
*/
|
|
34247
34414
|
function normalizeBookingServiceCategories(services) {
|
|
34248
|
-
if (!isRecord$
|
|
34415
|
+
if (!isRecord$26(services) || !Array.isArray(services.categories)) return [];
|
|
34249
34416
|
return services.categories.flatMap(readCategory);
|
|
34250
34417
|
}
|
|
34251
34418
|
/**
|
|
@@ -34253,7 +34420,7 @@ function normalizeBookingServiceCategories(services) {
|
|
|
34253
34420
|
* its loader data (`data.services`).
|
|
34254
34421
|
*/
|
|
34255
34422
|
function readOverrideServiceCategories(data) {
|
|
34256
|
-
return isRecord$
|
|
34423
|
+
return isRecord$26(data) ? normalizeBookingServiceCategories(data.services) : [];
|
|
34257
34424
|
}
|
|
34258
34425
|
|
|
34259
34426
|
//#endregion
|
|
@@ -34365,8 +34532,8 @@ function validateAppointmentBookingFormSource(input) {
|
|
|
34365
34532
|
return {
|
|
34366
34533
|
ok: false,
|
|
34367
34534
|
issues: parsedForm.error.issues.map((issue$1) => {
|
|
34368
|
-
const path$
|
|
34369
|
-
return `${path$
|
|
34535
|
+
const path$4 = issue$1.path.length > 0 ? `${issue$1.path.join(".")}: ` : "";
|
|
34536
|
+
return `${path$4}${issue$1.message}`;
|
|
34370
34537
|
})
|
|
34371
34538
|
};
|
|
34372
34539
|
}
|
|
@@ -34500,6 +34667,7 @@ const bookingMailingListContextSchema = z.unknown().transform((value) => {
|
|
|
34500
34667
|
return parsed.ok ? parsed.value : undefined;
|
|
34501
34668
|
});
|
|
34502
34669
|
const bookingSourceSchema = z.object({
|
|
34670
|
+
demoEmailSuppressed: z.boolean().optional(),
|
|
34503
34671
|
mailingList: bookingMailingListContextSchema.optional(),
|
|
34504
34672
|
siteName: z.string().optional(),
|
|
34505
34673
|
siteId: z.string().optional(),
|
|
@@ -34530,6 +34698,7 @@ const bookingDisplaySchema = z.object({
|
|
|
34530
34698
|
message: z.string().nullable()
|
|
34531
34699
|
});
|
|
34532
34700
|
const bookingHydrationSchema = z.object({
|
|
34701
|
+
demoEmailSuppressed: z.boolean().optional(),
|
|
34533
34702
|
mailingList: bookingMailingListContextSchema.optional(),
|
|
34534
34703
|
siteName: z.string().optional(),
|
|
34535
34704
|
formId: z.string().nullable(),
|
|
@@ -34578,6 +34747,7 @@ const bookingFormBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
34578
34747
|
return {
|
|
34579
34748
|
display: buildBookingFormDisplay(source, form$1),
|
|
34580
34749
|
hydration: {
|
|
34750
|
+
demoEmailSuppressed: source.demoEmailSuppressed,
|
|
34581
34751
|
mailingList: source.mailingList,
|
|
34582
34752
|
siteName: source.siteName,
|
|
34583
34753
|
formId: form$1?.id ?? source.formId ?? null,
|
|
@@ -35388,11 +35558,11 @@ function isBookableEvent(event) {
|
|
|
35388
35558
|
|
|
35389
35559
|
//#endregion
|
|
35390
35560
|
//#region ../blocks/src/system/runtime/nodes/events/domain/destination.ts
|
|
35391
|
-
function isRecord$
|
|
35561
|
+
function isRecord$25(value) {
|
|
35392
35562
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
35393
35563
|
}
|
|
35394
35564
|
function isRuntimeEventDestination(value) {
|
|
35395
|
-
if (!isRecord$
|
|
35565
|
+
if (!isRecord$25(value) || typeof value.kind !== "string") return false;
|
|
35396
35566
|
if (value.kind === "native") {
|
|
35397
35567
|
return (value.mode === "cms-managed" || value.mode === "system-managed") && typeof value.path === "string";
|
|
35398
35568
|
}
|
|
@@ -35496,6 +35666,46 @@ function resolveEventCta(event, buttonText) {
|
|
|
35496
35666
|
* timestamps become strings or date buckets. Calendar-grid primitives are
|
|
35497
35667
|
* re-exported from @riverbankcms/calendar so block code has one import.
|
|
35498
35668
|
*/
|
|
35669
|
+
/**
|
|
35670
|
+
* The English locale a site's public dates are written in, read from the
|
|
35671
|
+
* site's own time zone (Will, 2026-09-26: "date style from site time zone").
|
|
35672
|
+
*
|
|
35673
|
+
* Sites don't store a locale, and every public word around a date is English,
|
|
35674
|
+
* so the only open question is which English conventions to follow: day or
|
|
35675
|
+
* month first, and a 24 or 12-hour clock. The site's time zone is the one
|
|
35676
|
+
* fact every site carries about where it is. It is the site's, never an
|
|
35677
|
+
* event's: a venue left at UTC must not turn a UK site's dates American.
|
|
35678
|
+
* Anywhere this can't place (UTC, the Americas, Asia) keeps US English, which
|
|
35679
|
+
* is what these helpers wrote before sites were placed at all.
|
|
35680
|
+
*/
|
|
35681
|
+
function eventDateLocale(siteTimeZone) {
|
|
35682
|
+
if (!siteTimeZone) return "en-US";
|
|
35683
|
+
if (siteTimeZone === "Europe/Dublin") return "en-IE";
|
|
35684
|
+
if (siteTimeZone.startsWith("Europe/")) return "en-GB";
|
|
35685
|
+
if (siteTimeZone.startsWith("Australia/")) return "en-AU";
|
|
35686
|
+
if (siteTimeZone === "Pacific/Auckland" || siteTimeZone === "Pacific/Chatham") {
|
|
35687
|
+
return "en-NZ";
|
|
35688
|
+
}
|
|
35689
|
+
return "en-US";
|
|
35690
|
+
}
|
|
35691
|
+
/**
|
|
35692
|
+
* Formatting options for an event's dates: the times in the event's own zone,
|
|
35693
|
+
* written in its site's locale. A record from an older server that doesn't
|
|
35694
|
+
* name the site's zone falls back to the event's.
|
|
35695
|
+
*/
|
|
35696
|
+
function eventDateOptions(place) {
|
|
35697
|
+
return {
|
|
35698
|
+
timeZone: place.timeZone ?? null,
|
|
35699
|
+
locale: eventDateLocale(place.siteTimeZone ?? place.timeZone)
|
|
35700
|
+
};
|
|
35701
|
+
}
|
|
35702
|
+
/**
|
|
35703
|
+
* Start and end times as cards write them, in the site's locale:
|
|
35704
|
+
* "10:00 to 16:00" in the UK, "10:00 AM to 4:00 PM" in the US.
|
|
35705
|
+
*/
|
|
35706
|
+
function formatEventTimeRange$1(times, options) {
|
|
35707
|
+
return `${formatTime(times.startsAt, options)} to ${formatTime(times.endsAt, options)}`;
|
|
35708
|
+
}
|
|
35499
35709
|
/** Use the event timezone when present, otherwise the calendar/site timezone. */
|
|
35500
35710
|
function resolveEventTimeZone(event, calendarTimeZone) {
|
|
35501
35711
|
return event.timeZone || calendarTimeZone;
|
|
@@ -35517,18 +35727,25 @@ function formatDate(isoTimestamp, options) {
|
|
|
35517
35727
|
});
|
|
35518
35728
|
}
|
|
35519
35729
|
/**
|
|
35520
|
-
*
|
|
35521
|
-
*
|
|
35730
|
+
* Whether the locale reads a 24-hour clock, where hours are written with two
|
|
35731
|
+
* digits ("09:00"), as the dashboard writes them.
|
|
35732
|
+
*/
|
|
35733
|
+
function usesTwentyFourHourClock(locale) {
|
|
35734
|
+
return new Intl.DateTimeFormat(locale, { hour: "numeric" }).resolvedOptions().hour12 === false;
|
|
35735
|
+
}
|
|
35736
|
+
/**
|
|
35737
|
+
* Format time for display, on the locale's own clock.
|
|
35738
|
+
* Returns: "9:00 AM" (en-US) or "09:00" (en-GB)
|
|
35522
35739
|
*/
|
|
35523
35740
|
function formatTime(isoTimestamp, options) {
|
|
35741
|
+
const locale = options?.locale ?? "en-US";
|
|
35524
35742
|
return formatBookingTime(toScheduledBookingDateTime({
|
|
35525
35743
|
startsAt: isoTimestamp,
|
|
35526
35744
|
timeZone: toBookingTimeZone(options?.timeZone ?? "UTC"),
|
|
35527
|
-
locale
|
|
35745
|
+
locale
|
|
35528
35746
|
}), {
|
|
35529
|
-
hour: "numeric",
|
|
35530
|
-
minute: "2-digit"
|
|
35531
|
-
hour12: true
|
|
35747
|
+
hour: usesTwentyFourHourClock(locale) ? "2-digit" : "numeric",
|
|
35748
|
+
minute: "2-digit"
|
|
35532
35749
|
});
|
|
35533
35750
|
}
|
|
35534
35751
|
function formatEventDateParts(args) {
|
|
@@ -35561,7 +35778,7 @@ function formatEventCompactDateRail(isoTimestamp, options) {
|
|
|
35561
35778
|
locale: options?.locale ?? "en-US"
|
|
35562
35779
|
});
|
|
35563
35780
|
const weekday = formatBookingDate(dateTime, { weekday: "short" }).toLocaleUpperCase(options?.locale ?? "en-US");
|
|
35564
|
-
const month = formatBookingDate(dateTime, { month: "short" }).toLocaleUpperCase(options?.locale ?? "en-US");
|
|
35781
|
+
const month = formatBookingDate(dateTime, { month: "short" }).slice(0, 3).toLocaleUpperCase(options?.locale ?? "en-US");
|
|
35565
35782
|
const day = formatBookingDate(dateTime, { day: "numeric" });
|
|
35566
35783
|
const label = formatBookingDate(dateTime, {
|
|
35567
35784
|
weekday: "long",
|
|
@@ -35583,7 +35800,7 @@ function formatEventCompactDateRail(isoTimestamp, options) {
|
|
|
35583
35800
|
* keep the fact panel on the same date and timezone rules as event rows.
|
|
35584
35801
|
*/
|
|
35585
35802
|
function formatEventNextDateFact(event) {
|
|
35586
|
-
const rail = formatEventCompactDateRail(event.startsAt,
|
|
35803
|
+
const rail = formatEventCompactDateRail(event.startsAt, eventDateOptions(event));
|
|
35587
35804
|
return {
|
|
35588
35805
|
dateTime: event.startsAt,
|
|
35589
35806
|
value: `${rail.weekday} ${rail.day} ${rail.month}`,
|
|
@@ -36494,6 +36711,13 @@ function CalendarIcon({ className, size = 16, strokeWidth = 2 }) {
|
|
|
36494
36711
|
|
|
36495
36712
|
//#endregion
|
|
36496
36713
|
//#region ../blocks/src/system/runtime/nodes/events/shared/EventCard.tsx
|
|
36714
|
+
/** The category's badge, when the event has a category. */
|
|
36715
|
+
function eventCardCategoryBadge(category) {
|
|
36716
|
+
return category ? {
|
|
36717
|
+
label: category.name,
|
|
36718
|
+
style: getCategoryBadgeStyle(category.color ?? null)
|
|
36719
|
+
} : null;
|
|
36720
|
+
}
|
|
36497
36721
|
/**
|
|
36498
36722
|
* EventCard Component
|
|
36499
36723
|
*
|
|
@@ -36502,24 +36726,19 @@ function CalendarIcon({ className, size = 16, strokeWidth = 2 }) {
|
|
|
36502
36726
|
*
|
|
36503
36727
|
* This component is server-safe (uses no client APIs like Intl).
|
|
36504
36728
|
*/
|
|
36505
|
-
const EventCard = ({ event, cardRole = "default", buttonVariant = "primary", buttonText, showVenue = true, showMap = true, mapSlot, allowMap = true, showCapacity = true, showImage = true, showCategory = true, showSummary = true, orientation = "vertical", presentation, headingLevel }) => {
|
|
36729
|
+
const EventCard = ({ event, cardRole = "default", buttonVariant = "primary", buttonText, showVenue = true, showMap = true, mapSlot, allowMap = true, showCapacity = true, showImage = true, showCategory = true, showSummary = true, orientation = "vertical", presentation, headingLevel, imageResolveContext }) => {
|
|
36506
36730
|
const { presentation: cardPresentation, presentationClass, headingLevel: cardHeadingLevel } = resolveEventCardOptions({
|
|
36507
36731
|
presentation,
|
|
36508
36732
|
headingLevel
|
|
36509
36733
|
});
|
|
36510
|
-
const
|
|
36511
|
-
const formattedDate = formatDate(event.startsAt, { timeZone });
|
|
36512
|
-
const formattedTime = `${formatTime(event.startsAt, { timeZone })} - ${formatTime(event.endsAt, { timeZone })}`;
|
|
36734
|
+
const { formattedDate, formattedTime } = formatEventCardWhen(event);
|
|
36513
36735
|
const cta = resolveEventCta(event, buttonText);
|
|
36514
36736
|
const cardClass = boxStyleClassNames({ role: cardRole }, { baseClass: "event-card" });
|
|
36515
36737
|
const title = event.title;
|
|
36516
36738
|
const summary = event.presentation?.summary ?? event.description;
|
|
36517
36739
|
const image = event.presentation?.image ?? null;
|
|
36518
36740
|
const category = event.eventCategory;
|
|
36519
|
-
const categoryBadge =
|
|
36520
|
-
label: category.name,
|
|
36521
|
-
style: getCategoryBadgeStyle(category.color ?? null)
|
|
36522
|
-
} : null;
|
|
36741
|
+
const categoryBadge = showCategory ? eventCardCategoryBadge(category) : null;
|
|
36523
36742
|
const hasImage = Boolean(showImage && image);
|
|
36524
36743
|
const dateFact = resolveEventCardDateFact({
|
|
36525
36744
|
event,
|
|
@@ -36539,7 +36758,8 @@ const EventCard = ({ event, cardRole = "default", buttonVariant = "primary", but
|
|
|
36539
36758
|
categoryId: category?.id,
|
|
36540
36759
|
dateFact,
|
|
36541
36760
|
hasImage,
|
|
36542
|
-
image
|
|
36761
|
+
image,
|
|
36762
|
+
imageResolveContext
|
|
36543
36763
|
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EventCardContent, {
|
|
36544
36764
|
allowMap,
|
|
36545
36765
|
buttonVariant,
|
|
@@ -36589,7 +36809,8 @@ function EventCardMedia(props$1) {
|
|
|
36589
36809
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(MediaNodeServer, {
|
|
36590
36810
|
value: props$1.image,
|
|
36591
36811
|
className: "event-card-image",
|
|
36592
|
-
size: ImagePresets.card
|
|
36812
|
+
size: ImagePresets.card,
|
|
36813
|
+
imageResolveContext: props$1.imageResolveContext
|
|
36593
36814
|
}),
|
|
36594
36815
|
props$1.categoryBadge && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
36595
36816
|
className: "event-category-badge event-category-badge--overlay",
|
|
@@ -36704,6 +36925,17 @@ function resolveEventCardOptions(props$1) {
|
|
|
36704
36925
|
headingLevel: props$1.headingLevel ?? 3
|
|
36705
36926
|
};
|
|
36706
36927
|
}
|
|
36928
|
+
/**
|
|
36929
|
+
* The card's date and times, written the way the event's place writes them
|
|
36930
|
+
* ("Friday, 16 October 2026" and "10:00 to 16:00" in the UK).
|
|
36931
|
+
*/
|
|
36932
|
+
function formatEventCardWhen(event) {
|
|
36933
|
+
const options = eventDateOptions(event);
|
|
36934
|
+
return {
|
|
36935
|
+
formattedDate: formatDate(event.startsAt, options),
|
|
36936
|
+
formattedTime: formatEventTimeRange$1(event, options)
|
|
36937
|
+
};
|
|
36938
|
+
}
|
|
36707
36939
|
function resolveEventCardDateFact(props$1) {
|
|
36708
36940
|
if (!props$1.showImage || props$1.image || props$1.presentation !== "catalogue") {
|
|
36709
36941
|
return null;
|
|
@@ -36966,12 +37198,12 @@ function CalendarDayHeaders({ dayNames }) {
|
|
|
36966
37198
|
* exists so a sold-out or closed offering stays reachable (issue 1372); the
|
|
36967
37199
|
* `.event-title-link` rule lives in theme-core's event-list.css.
|
|
36968
37200
|
*/
|
|
36969
|
-
function OfferingTitle({ className, path: path$
|
|
37201
|
+
function OfferingTitle({ className, path: path$4, title }) {
|
|
36970
37202
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", {
|
|
36971
37203
|
className,
|
|
36972
|
-
children: path$
|
|
37204
|
+
children: path$4 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", {
|
|
36973
37205
|
className: "event-title-link",
|
|
36974
|
-
href: path$
|
|
37206
|
+
href: path$4,
|
|
36975
37207
|
children: title
|
|
36976
37208
|
}) : title
|
|
36977
37209
|
});
|
|
@@ -38282,6 +38514,35 @@ function buildEventCombinedInteractiveIslandProps(props$1) {
|
|
|
38282
38514
|
});
|
|
38283
38515
|
}
|
|
38284
38516
|
|
|
38517
|
+
//#endregion
|
|
38518
|
+
//#region ../blocks/src/system/runtime/nodes/events/shared/eventCardPresentations.ts
|
|
38519
|
+
/** A booking page's catalogue card: one per series, "See dates" for dated events. */
|
|
38520
|
+
function catalogueEventCardProps(event, buttonVariant = "primary") {
|
|
38521
|
+
return {
|
|
38522
|
+
presentation: "catalogue",
|
|
38523
|
+
headingLevel: 4,
|
|
38524
|
+
buttonVariant,
|
|
38525
|
+
buttonText: event.bookingScope === "single_occurrence" ? "See dates" : undefined,
|
|
38526
|
+
showMap: false,
|
|
38527
|
+
allowMap: false,
|
|
38528
|
+
showCategory: false,
|
|
38529
|
+
orientation: "vertical"
|
|
38530
|
+
};
|
|
38531
|
+
}
|
|
38532
|
+
/** An events listing's card, from the listing's display settings. */
|
|
38533
|
+
function listingEventCardProps(display) {
|
|
38534
|
+
return {
|
|
38535
|
+
cardRole: display.cardRole,
|
|
38536
|
+
buttonVariant: display.buttonVariant,
|
|
38537
|
+
buttonText: display.buttonText,
|
|
38538
|
+
showVenue: display.showVenue,
|
|
38539
|
+
showMap: display.showMap,
|
|
38540
|
+
allowMap: false,
|
|
38541
|
+
showCapacity: display.showCapacity,
|
|
38542
|
+
orientation: display.orientation
|
|
38543
|
+
};
|
|
38544
|
+
}
|
|
38545
|
+
|
|
38285
38546
|
//#endregion
|
|
38286
38547
|
//#region ../blocks/src/system/runtime/nodes/events/shared/renderEventListItem.tsx
|
|
38287
38548
|
/**
|
|
@@ -38301,14 +38562,7 @@ function renderEventListItem(event, display) {
|
|
|
38301
38562
|
}
|
|
38302
38563
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EventCard, {
|
|
38303
38564
|
event,
|
|
38304
|
-
|
|
38305
|
-
buttonVariant: display.buttonVariant,
|
|
38306
|
-
buttonText: display.buttonText,
|
|
38307
|
-
showVenue: display.showVenue,
|
|
38308
|
-
showMap: display.showMap,
|
|
38309
|
-
allowMap: false,
|
|
38310
|
-
showCapacity: display.showCapacity,
|
|
38311
|
-
orientation: display.orientation
|
|
38565
|
+
...listingEventCardProps(display)
|
|
38312
38566
|
}, event.occurrenceId || event.id);
|
|
38313
38567
|
}
|
|
38314
38568
|
|
|
@@ -38510,7 +38764,7 @@ function inferLegacyOfferingsPreviewGroupOrder(overrides) {
|
|
|
38510
38764
|
return keys.length >= 2 ? keys : [];
|
|
38511
38765
|
}
|
|
38512
38766
|
function normalizeOfferingsPreviewContentForWrite(value) {
|
|
38513
|
-
if (!isRecord$
|
|
38767
|
+
if (!isRecord$24(value)) return null;
|
|
38514
38768
|
const groupOrderValue = value.groupOrder;
|
|
38515
38769
|
if (Array.isArray(groupOrderValue)) {
|
|
38516
38770
|
const normalized = normalizeOfferingsPreviewGroupOrder(groupOrderValue);
|
|
@@ -38525,7 +38779,7 @@ function normalizeOfferingsPreviewContentForWrite(value) {
|
|
|
38525
38779
|
groupOrder: []
|
|
38526
38780
|
};
|
|
38527
38781
|
}
|
|
38528
|
-
const legacyOrder = inferLegacyOfferingsPreviewGroupOrder(Array.isArray(value.groupOverrides) ? value.groupOverrides.filter(isRecord$
|
|
38782
|
+
const legacyOrder = inferLegacyOfferingsPreviewGroupOrder(Array.isArray(value.groupOverrides) ? value.groupOverrides.filter(isRecord$24) : []);
|
|
38529
38783
|
return legacyOrder.length > 0 ? {
|
|
38530
38784
|
...value,
|
|
38531
38785
|
groupOrder: legacyOrder
|
|
@@ -38596,7 +38850,7 @@ function uniqueOfferingsPreviewSourceKeys(values) {
|
|
|
38596
38850
|
}
|
|
38597
38851
|
return keys;
|
|
38598
38852
|
}
|
|
38599
|
-
function isRecord$
|
|
38853
|
+
function isRecord$24(value) {
|
|
38600
38854
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
38601
38855
|
}
|
|
38602
38856
|
function mergeOrderedKeysWithDefaults(orderedKeys, defaultKeys) {
|
|
@@ -38640,8 +38894,8 @@ function resolveAutoCtaPath(source, routes) {
|
|
|
38640
38894
|
routeByNormalizedPath.set(normalized, route.path);
|
|
38641
38895
|
}
|
|
38642
38896
|
}
|
|
38643
|
-
for (const path$
|
|
38644
|
-
const match = routeByNormalizedPath.get(path$
|
|
38897
|
+
for (const path$4 of preferredPathsForSource(source)) {
|
|
38898
|
+
const match = routeByNormalizedPath.get(path$4);
|
|
38645
38899
|
if (match) return match;
|
|
38646
38900
|
}
|
|
38647
38901
|
return routeByNormalizedPath.get("/offerings") ?? null;
|
|
@@ -38650,8 +38904,8 @@ function resolveOfferingsPreviewRunPath(run, routes) {
|
|
|
38650
38904
|
const routeIds = [run.eventSeriesId, run.eventOfferingId];
|
|
38651
38905
|
for (const entityId of routeIds) {
|
|
38652
38906
|
const route = (routes ?? []).find((candidate) => candidate.entityId === entityId);
|
|
38653
|
-
const path$
|
|
38654
|
-
if (path$
|
|
38907
|
+
const path$4 = normalizeRoutePath(route?.path);
|
|
38908
|
+
if (path$4) return path$4;
|
|
38655
38909
|
}
|
|
38656
38910
|
return null;
|
|
38657
38911
|
}
|
|
@@ -38671,8 +38925,8 @@ function preferredPathsForSource(source) {
|
|
|
38671
38925
|
function normalizeRoutePath(value) {
|
|
38672
38926
|
const text$1 = normalizeTextOverride(value);
|
|
38673
38927
|
if (!text$1) return null;
|
|
38674
|
-
const path$
|
|
38675
|
-
return path$
|
|
38928
|
+
const path$4 = text$1.startsWith("/") ? text$1 : `/${text$1}`;
|
|
38929
|
+
return path$4.length > 1 ? path$4.replace(/\/+$/, "") : path$4;
|
|
38676
38930
|
}
|
|
38677
38931
|
function isOfferingsPreviewEventPreset(value) {
|
|
38678
38932
|
return typeof value === "string" && OFFERINGS_PREVIEW_EVENT_PRESETS.includes(value);
|
|
@@ -38751,14 +39005,7 @@ function OfferingsCatalogue(props$1) {
|
|
|
38751
39005
|
style: { gridTemplateColumns: "repeat(auto-fill, minmax(min(100%, 18rem), 1fr))" },
|
|
38752
39006
|
children: events.map((event) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EventCard, {
|
|
38753
39007
|
event,
|
|
38754
|
-
|
|
38755
|
-
headingLevel: 4,
|
|
38756
|
-
buttonVariant: props$1.buttonVariant ?? "primary",
|
|
38757
|
-
buttonText: event.bookingScope === "single_occurrence" ? "See dates" : undefined,
|
|
38758
|
-
showMap: false,
|
|
38759
|
-
allowMap: false,
|
|
38760
|
-
showCategory: false,
|
|
38761
|
-
orientation: "vertical"
|
|
39008
|
+
...catalogueEventCardProps(event, props$1.buttonVariant ?? "primary")
|
|
38762
39009
|
}, event.seriesId))
|
|
38763
39010
|
})]
|
|
38764
39011
|
}, group.sourceKey))
|
|
@@ -39060,45 +39307,73 @@ function FeaturedOfferingSummary({ item }) {
|
|
|
39060
39307
|
}
|
|
39061
39308
|
function featuredSummaryDetails(item) {
|
|
39062
39309
|
switch (item.kind) {
|
|
39063
|
-
case "event": return formatFeaturedSummary(deriveEventScheduleSummary(item.event),
|
|
39310
|
+
case "event": return formatFeaturedSummary(deriveEventScheduleSummary(item.event), {
|
|
39311
|
+
venue: item.event.venue?.name ?? null,
|
|
39312
|
+
siteTimeZone: item.event.siteTimeZone
|
|
39313
|
+
});
|
|
39064
39314
|
case "run": {
|
|
39065
39315
|
const schedule = derivePreviewRunSchedule(item.run.run.sessions);
|
|
39066
|
-
return schedule.kind === "scheduled" ? formatFeaturedSummary(schedule.summary,
|
|
39316
|
+
return schedule.kind === "scheduled" ? formatFeaturedSummary(schedule.summary, {
|
|
39317
|
+
venue: item.run.representative.venue?.name ?? null,
|
|
39318
|
+
siteTimeZone: item.run.representative.siteTimeZone
|
|
39319
|
+
}) : null;
|
|
39067
39320
|
}
|
|
39068
39321
|
default: return assertNever(item, "Unhandled offerings preview item");
|
|
39069
39322
|
}
|
|
39070
39323
|
}
|
|
39071
|
-
function formatFeaturedSummary(summary,
|
|
39324
|
+
function formatFeaturedSummary(summary, place) {
|
|
39072
39325
|
switch (summary.kind) {
|
|
39073
|
-
case "single-occurrence": return detailsFromOccurrences(
|
|
39074
|
-
|
|
39075
|
-
|
|
39076
|
-
|
|
39326
|
+
case "single-occurrence": return detailsFromOccurrences({
|
|
39327
|
+
first: summary.occurrence,
|
|
39328
|
+
last: null,
|
|
39329
|
+
place
|
|
39330
|
+
});
|
|
39331
|
+
case "multi-day-span": return detailsFromOccurrences({
|
|
39332
|
+
first: summary.occurrence,
|
|
39333
|
+
last: summary.occurrence,
|
|
39334
|
+
place,
|
|
39335
|
+
spanUsesEndDate: true
|
|
39336
|
+
});
|
|
39337
|
+
case "fixed-recurring-run": return detailsFromOccurrences({
|
|
39338
|
+
first: summary.first,
|
|
39339
|
+
last: summary.last,
|
|
39340
|
+
place,
|
|
39341
|
+
recurrence: summary.recurrenceLabel
|
|
39342
|
+
});
|
|
39343
|
+
case "irregular-multi-session-run": return detailsFromOccurrences({
|
|
39344
|
+
first: summary.first,
|
|
39345
|
+
last: summary.last,
|
|
39346
|
+
place,
|
|
39347
|
+
sessionCount: `${summary.sessionCount} dates`
|
|
39348
|
+
});
|
|
39077
39349
|
default: return assertNever(summary, "Unhandled offerings preview schedule summary");
|
|
39078
39350
|
}
|
|
39079
39351
|
}
|
|
39080
|
-
function detailsFromOccurrences(
|
|
39081
|
-
const
|
|
39352
|
+
function detailsFromOccurrences(input) {
|
|
39353
|
+
const { first, last, place } = input;
|
|
39354
|
+
const endDateTime = input.spanUsesEndDate ? first.endsAt : last?.startsAt ?? first.startsAt;
|
|
39355
|
+
const options = eventDateOptions({
|
|
39356
|
+
timeZone: first.timeZone,
|
|
39357
|
+
siteTimeZone: place.siteTimeZone
|
|
39358
|
+
});
|
|
39359
|
+
const summaryDate = (isoTimestamp, timeZone) => formatSummaryDate(isoTimestamp, {
|
|
39360
|
+
timeZone,
|
|
39361
|
+
locale: options.locale
|
|
39362
|
+
});
|
|
39082
39363
|
return {
|
|
39083
|
-
startDate:
|
|
39364
|
+
startDate: summaryDate(first.startsAt, first.timeZone),
|
|
39084
39365
|
startDateTime: first.startsAt,
|
|
39085
|
-
endDate: last ?
|
|
39366
|
+
endDate: last ? summaryDate(endDateTime, last.timeZone) : null,
|
|
39086
39367
|
endDateTime,
|
|
39087
|
-
timeRange:
|
|
39088
|
-
|
|
39089
|
-
|
|
39090
|
-
|
|
39091
|
-
|
|
39092
|
-
|
|
39093
|
-
|
|
39094
|
-
|
|
39095
|
-
|
|
39096
|
-
venue
|
|
39097
|
-
};
|
|
39098
|
-
}
|
|
39099
|
-
function formatSummaryDate(isoTimestamp, timeZone) {
|
|
39100
|
-
return new Intl.DateTimeFormat("en-GB", {
|
|
39101
|
-
timeZone,
|
|
39368
|
+
timeRange: formatEventTimeRange$1(first, options),
|
|
39369
|
+
recurrence: input.recurrence ?? null,
|
|
39370
|
+
sessionCount: input.sessionCount ?? null,
|
|
39371
|
+
venue: place.venue
|
|
39372
|
+
};
|
|
39373
|
+
}
|
|
39374
|
+
function formatSummaryDate(isoTimestamp, options) {
|
|
39375
|
+
return new Intl.DateTimeFormat(options.locale, {
|
|
39376
|
+
timeZone: options.timeZone,
|
|
39102
39377
|
weekday: "long",
|
|
39103
39378
|
day: "numeric",
|
|
39104
39379
|
month: "long",
|
|
@@ -39138,16 +39413,19 @@ function renderSingleOfferingCard(item, options) {
|
|
|
39138
39413
|
}, item.run.eventSeriesId);
|
|
39139
39414
|
}
|
|
39140
39415
|
}
|
|
39141
|
-
function WholeSeriesRunCompactRow({ group, path: path$
|
|
39416
|
+
function WholeSeriesRunCompactRow({ group, path: path$4, now }) {
|
|
39142
39417
|
const schedule = derivePreviewRunSchedule(group.run.sessions);
|
|
39143
39418
|
if (schedule.kind === "no-live-sessions") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RunWithoutLiveDates, {
|
|
39144
39419
|
group,
|
|
39145
|
-
path: path$
|
|
39420
|
+
path: path$4
|
|
39146
39421
|
});
|
|
39147
39422
|
const { sessionCount: sessionsCount, firstSession } = schedule;
|
|
39148
|
-
const
|
|
39149
|
-
|
|
39150
|
-
|
|
39423
|
+
const options = eventDateOptions({
|
|
39424
|
+
timeZone: firstSession.timeZone,
|
|
39425
|
+
siteTimeZone: group.representative.siteTimeZone
|
|
39426
|
+
});
|
|
39427
|
+
const dateRail = formatEventCompactDateRail(firstSession.startsAt, options);
|
|
39428
|
+
const timeRange = formatEventTimeRange$1(firstSession, options);
|
|
39151
39429
|
const price = formatEventPriceDisplay(group.representative.pricing);
|
|
39152
39430
|
const statusLabel = resolveWholeSeriesBookingPhase(group.run, now).kind === "open" ? null : "Registration closed";
|
|
39153
39431
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("article", {
|
|
@@ -39176,7 +39454,7 @@ function WholeSeriesRunCompactRow({ group, path: path$3, now }) {
|
|
|
39176
39454
|
className: "event-compact-row-content",
|
|
39177
39455
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(OfferingTitle, {
|
|
39178
39456
|
className: "event-compact-row-title",
|
|
39179
|
-
path: path$
|
|
39457
|
+
path: path$4,
|
|
39180
39458
|
title: group.representative.title
|
|
39181
39459
|
}), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
39182
39460
|
className: "event-compact-row-meta",
|
|
@@ -39205,11 +39483,11 @@ function WholeSeriesRunCompactRow({ group, path: path$3, now }) {
|
|
|
39205
39483
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
39206
39484
|
className: "event-compact-row-datetime",
|
|
39207
39485
|
children: timeRange
|
|
39208
|
-
}), statusLabel || !path$
|
|
39486
|
+
}), statusLabel || !path$4 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
39209
39487
|
className: "event-compact-row-status",
|
|
39210
39488
|
children: statusLabel ?? "Details coming soon"
|
|
39211
39489
|
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThemedButtonLink, {
|
|
39212
|
-
href: path$
|
|
39490
|
+
href: path$4,
|
|
39213
39491
|
variant: "primary",
|
|
39214
39492
|
size: "sm",
|
|
39215
39493
|
extraClassName: "event-compact-row-cta",
|
|
@@ -39220,16 +39498,19 @@ function WholeSeriesRunCompactRow({ group, path: path$3, now }) {
|
|
|
39220
39498
|
]
|
|
39221
39499
|
});
|
|
39222
39500
|
}
|
|
39223
|
-
function WholeSeriesRunFeatureCard({ group, now, path: path$
|
|
39501
|
+
function WholeSeriesRunFeatureCard({ group, now, path: path$4, buttonVariant, buttonText }) {
|
|
39224
39502
|
const schedule = derivePreviewRunSchedule(group.run.sessions);
|
|
39225
39503
|
if (schedule.kind === "no-live-sessions") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RunWithoutLiveDates, {
|
|
39226
39504
|
group,
|
|
39227
|
-
path: path$
|
|
39505
|
+
path: path$4
|
|
39228
39506
|
});
|
|
39229
39507
|
const { firstSession } = schedule;
|
|
39230
|
-
const
|
|
39231
|
-
|
|
39232
|
-
|
|
39508
|
+
const options = eventDateOptions({
|
|
39509
|
+
timeZone: firstSession.timeZone,
|
|
39510
|
+
siteTimeZone: group.representative.siteTimeZone
|
|
39511
|
+
});
|
|
39512
|
+
const formattedDate = formatEventCompactDateRail(firstSession.startsAt, options).label;
|
|
39513
|
+
const timeRange = formatEventTimeRange$1(firstSession, options);
|
|
39233
39514
|
const price = formatEventPriceDisplay(group.representative.pricing);
|
|
39234
39515
|
const statusLabel = resolveWholeSeriesBookingPhase(group.run, now).kind === "open" ? null : "Registration closed";
|
|
39235
39516
|
const description = group.representative.description;
|
|
@@ -39240,7 +39521,7 @@ function WholeSeriesRunFeatureCard({ group, now, path: path$3, buttonVariant, bu
|
|
|
39240
39521
|
children: [
|
|
39241
39522
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(OfferingTitle, {
|
|
39242
39523
|
className: "card-title rb-mb-3",
|
|
39243
|
-
path: path$
|
|
39524
|
+
path: path$4,
|
|
39244
39525
|
title: group.representative.title
|
|
39245
39526
|
}),
|
|
39246
39527
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
@@ -39260,11 +39541,11 @@ function WholeSeriesRunFeatureCard({ group, now, path: path$3, buttonVariant, bu
|
|
|
39260
39541
|
children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
|
39261
39542
|
className: "event-card-capacity rb-caption status-muted rb-text-center",
|
|
39262
39543
|
children: price
|
|
39263
|
-
}), statusLabel || !path$
|
|
39544
|
+
}), statusLabel || !path$4 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
39264
39545
|
className: "event-compact-row-status",
|
|
39265
39546
|
children: statusLabel ?? "Details coming soon"
|
|
39266
39547
|
}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThemedButtonLink, {
|
|
39267
|
-
href: path$
|
|
39548
|
+
href: path$4,
|
|
39268
39549
|
variant: buttonVariant,
|
|
39269
39550
|
size: "md",
|
|
39270
39551
|
extraClassName: "event-card-cta",
|
|
@@ -39335,13 +39616,13 @@ function resolveGroupFrameStyle(cardStyles) {
|
|
|
39335
39616
|
return backgroundColor ? { backgroundColor } : undefined;
|
|
39336
39617
|
}
|
|
39337
39618
|
var offerings_preview_default = OfferingsPreviewNode;
|
|
39338
|
-
function RunWithoutLiveDates({ group, path: path$
|
|
39619
|
+
function RunWithoutLiveDates({ group, path: path$4 }) {
|
|
39339
39620
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("article", {
|
|
39340
39621
|
className: "offerings-preview-whole-series-card",
|
|
39341
39622
|
children: [
|
|
39342
39623
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(OfferingTitle, {
|
|
39343
39624
|
className: "rb-heading-xs",
|
|
39344
|
-
path: path$
|
|
39625
|
+
path: path$4,
|
|
39345
39626
|
title: group.representative.title
|
|
39346
39627
|
}),
|
|
39347
39628
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "No dates available." }),
|
|
@@ -40391,6 +40672,7 @@ const shopSourceSchema = z.object({
|
|
|
40391
40672
|
memberships: z.array(publicMembershipProductSchema).nullable().optional(),
|
|
40392
40673
|
products: z.array(publicProductSchema).nullable().optional(),
|
|
40393
40674
|
siteId: z.string().optional(),
|
|
40675
|
+
demoEmailSuppressed: z.boolean().optional(),
|
|
40394
40676
|
apiBaseUrl: z.string().optional(),
|
|
40395
40677
|
readAuthority: browserReadAuthoritySchema.optional(),
|
|
40396
40678
|
stage: previewStageSchema.optional()
|
|
@@ -40510,7 +40792,8 @@ const checkoutDisplaySchema = z.object({
|
|
|
40510
40792
|
const passesMembershipsHydrationSchema = z.object({
|
|
40511
40793
|
memberships: z.array(publicMembershipProductSchema),
|
|
40512
40794
|
passPurchaseMode: z.enum(["add_to_cart", "buy_now"]),
|
|
40513
|
-
buttonVariant: blockButtonRoleSchema
|
|
40795
|
+
buttonVariant: blockButtonRoleSchema,
|
|
40796
|
+
demoEmailSuppressed: z.boolean().optional()
|
|
40514
40797
|
});
|
|
40515
40798
|
const productListHydrationSchema = z.object({
|
|
40516
40799
|
products: z.array(publicProductSchema),
|
|
@@ -40532,7 +40815,8 @@ const cartHydrationSchema = z.object({
|
|
|
40532
40815
|
});
|
|
40533
40816
|
const checkoutHydrationSchema = z.object({
|
|
40534
40817
|
emptyStateText: z.string(),
|
|
40535
|
-
submitButtonText: z.string()
|
|
40818
|
+
submitButtonText: z.string(),
|
|
40819
|
+
demoEmailSuppressed: z.boolean().optional()
|
|
40536
40820
|
});
|
|
40537
40821
|
const passesMembershipsRenderSchema = z.object({
|
|
40538
40822
|
display: passesMembershipsDisplaySchema,
|
|
@@ -40600,7 +40884,8 @@ const shopBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
40600
40884
|
hydration: {
|
|
40601
40885
|
memberships: source.showMemberships === false ? [] : source.memberships ?? [],
|
|
40602
40886
|
passPurchaseMode,
|
|
40603
|
-
buttonVariant: source.buttonVariant ?? "primary"
|
|
40887
|
+
buttonVariant: source.buttonVariant ?? "primary",
|
|
40888
|
+
demoEmailSuppressed: source.demoEmailSuppressed
|
|
40604
40889
|
}
|
|
40605
40890
|
};
|
|
40606
40891
|
}
|
|
@@ -40693,7 +40978,8 @@ const checkoutBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
40693
40978
|
}),
|
|
40694
40979
|
hydration: {
|
|
40695
40980
|
emptyStateText: source.emptyStateText ?? "Add something to your cart to continue.",
|
|
40696
|
-
submitButtonText: source.submitButtonText ?? "Checkout"
|
|
40981
|
+
submitButtonText: source.submitButtonText ?? "Checkout",
|
|
40982
|
+
demoEmailSuppressed: source.demoEmailSuppressed
|
|
40697
40983
|
}
|
|
40698
40984
|
})
|
|
40699
40985
|
});
|
|
@@ -40994,6 +41280,10 @@ const checkoutManifest = createBlockManifest({
|
|
|
40994
41280
|
baseClass: "",
|
|
40995
41281
|
spacing: "spacious",
|
|
40996
41282
|
children: sectionContainer([checkout(withApiBindings({
|
|
41283
|
+
demoEmailSuppressed: { $bind: {
|
|
41284
|
+
from: "$root.demoEmailSuppressed",
|
|
41285
|
+
fallback: false
|
|
41286
|
+
} },
|
|
40997
41287
|
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
40998
41288
|
mode: "checkout",
|
|
40999
41289
|
heading: { $bind: {
|
|
@@ -41523,6 +41813,7 @@ const EVENT_REGISTRATION_SHELL_STEP_LABELS = [
|
|
|
41523
41813
|
];
|
|
41524
41814
|
const eventRegistrationPublicEventSchema = z.preprocess(normalizeEventRegistrationEventInput, publicEventSchema);
|
|
41525
41815
|
const eventRegistrationHydrationSchemaShape = {
|
|
41816
|
+
demoEmailSuppressed: z.boolean().optional(),
|
|
41526
41817
|
occurrenceContext: occurrenceContextSchema.optional(),
|
|
41527
41818
|
subject: eventRegistrationPageSurfaceSubjectSchema.nullable().optional(),
|
|
41528
41819
|
maxTickets: z.string().optional(),
|
|
@@ -41715,6 +42006,7 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
41715
42006
|
...eventSource,
|
|
41716
42007
|
events: [...scopedSourceEvents]
|
|
41717
42008
|
} : eventSource,
|
|
42009
|
+
demoEmailSuppressed: source.demoEmailSuppressed,
|
|
41718
42010
|
maxTickets: source.maxTickets ?? undefined,
|
|
41719
42011
|
showVenue: source.showVenue,
|
|
41720
42012
|
showCapacity: source.showCapacity,
|
|
@@ -41732,7 +42024,7 @@ const eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
41732
42024
|
}
|
|
41733
42025
|
});
|
|
41734
42026
|
function normalizeEventRegistrationEventInput(value) {
|
|
41735
|
-
if (!isRecord$
|
|
42027
|
+
if (!isRecord$23(value)) {
|
|
41736
42028
|
return value;
|
|
41737
42029
|
}
|
|
41738
42030
|
return {
|
|
@@ -41740,7 +42032,7 @@ function normalizeEventRegistrationEventInput(value) {
|
|
|
41740
42032
|
destination: resolveRuntimeEventDestination(value)
|
|
41741
42033
|
};
|
|
41742
42034
|
}
|
|
41743
|
-
function isRecord$
|
|
42035
|
+
function isRecord$23(value) {
|
|
41744
42036
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
41745
42037
|
}
|
|
41746
42038
|
const eventRegistrationInteractiveIslandPropsCodec = createInteractiveIslandCodec({
|
|
@@ -41894,8 +42186,8 @@ const eventRegistrationManifest = createBlockManifest({
|
|
|
41894
42186
|
description: "Message shown after successful registration",
|
|
41895
42187
|
required: false,
|
|
41896
42188
|
multiline: true,
|
|
41897
|
-
|
|
41898
|
-
|
|
42189
|
+
maxLength: 500,
|
|
42190
|
+
ui: { placeholder: "Thank you for registering! Check your email for confirmation details." }
|
|
41899
42191
|
},
|
|
41900
42192
|
{
|
|
41901
42193
|
id: "buttonText",
|
|
@@ -41916,6 +42208,10 @@ const eventRegistrationManifest = createBlockManifest({
|
|
|
41916
42208
|
text({ as: "h2" }, bind("content.heading"), when("content.heading")),
|
|
41917
42209
|
richText({ className: "rb-prose rb-max-w-none" }, bind("content.description"), when("content.description")),
|
|
41918
42210
|
eventRegistration(withApiBindings({
|
|
42211
|
+
demoEmailSuppressed: { $bind: {
|
|
42212
|
+
from: "$root.demoEmailSuppressed",
|
|
42213
|
+
fallback: false
|
|
42214
|
+
} },
|
|
41919
42215
|
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
41920
42216
|
occurrenceContext: { $bind: { from: "$root.occurrenceContext" } },
|
|
41921
42217
|
subject: { $bind: { from: "$root.subject" } },
|
|
@@ -43664,6 +43960,13 @@ function buildEventListingInteractiveIslandProps(props$1) {
|
|
|
43664
43960
|
source: props$1
|
|
43665
43961
|
});
|
|
43666
43962
|
}
|
|
43963
|
+
/**
|
|
43964
|
+
* The card an events listing draws when nothing on the block changes it: the
|
|
43965
|
+
* block's own defaults, read through its render.
|
|
43966
|
+
*/
|
|
43967
|
+
function defaultEventListingCardProps() {
|
|
43968
|
+
return listingEventCardProps(eventListingBlockRuntime.buildRender({ siteId: "" }).display);
|
|
43969
|
+
}
|
|
43667
43970
|
|
|
43668
43971
|
//#endregion
|
|
43669
43972
|
//#region ../blocks/src/system/blocks/events/event-listing.ts
|
|
@@ -45106,6 +45409,10 @@ const shopManifest = createBlockManifest({
|
|
|
45106
45409
|
spacing: "spacious",
|
|
45107
45410
|
children: sectionContainer([shop(withApiBindings({
|
|
45108
45411
|
readAuthority: { $bind: { from: "$root.readAuthority" } },
|
|
45412
|
+
demoEmailSuppressed: { $bind: {
|
|
45413
|
+
from: "$root.demoEmailSuppressed",
|
|
45414
|
+
fallback: false
|
|
45415
|
+
} },
|
|
45109
45416
|
mode: "passes-memberships",
|
|
45110
45417
|
showPasses: { $bind: {
|
|
45111
45418
|
from: "content.showPasses",
|
|
@@ -45607,11 +45914,12 @@ var cart_server_default = CartSSR;
|
|
|
45607
45914
|
|
|
45608
45915
|
//#endregion
|
|
45609
45916
|
//#region ../blocks/src/system/runtime/nodes/checkout.server.tsx
|
|
45610
|
-
function CheckoutSSR({ blockId, siteId, apiBaseUrl, stage, children, ...rest }) {
|
|
45917
|
+
function CheckoutSSR({ blockId, siteId, apiBaseUrl, stage, demoEmailSuppressed, children, ...rest }) {
|
|
45611
45918
|
const islandProps = buildCheckoutInteractiveIslandProps({
|
|
45612
45919
|
siteId,
|
|
45613
45920
|
apiBaseUrl,
|
|
45614
45921
|
stage,
|
|
45922
|
+
demoEmailSuppressed,
|
|
45615
45923
|
...rest
|
|
45616
45924
|
});
|
|
45617
45925
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
@@ -47633,14 +47941,14 @@ function isDecoratedHeadingBlockKind(blockKind) {
|
|
|
47633
47941
|
return blockKind === "block.intro" || blockKind === "block.feature-cards" || blockKind === "block.testimonials" || blockKind === "block.faq";
|
|
47634
47942
|
}
|
|
47635
47943
|
function readVariant(blockContent) {
|
|
47636
|
-
if (!isRecord$
|
|
47944
|
+
if (!isRecord$22(blockContent)) return undefined;
|
|
47637
47945
|
const variant = blockContent.variant;
|
|
47638
47946
|
return typeof variant === "string" ? variant : undefined;
|
|
47639
47947
|
}
|
|
47640
47948
|
function isFaqDecoratedVariant(variant) {
|
|
47641
47949
|
return variant === "default" || variant === "question-columns";
|
|
47642
47950
|
}
|
|
47643
|
-
function isRecord$
|
|
47951
|
+
function isRecord$22(value) {
|
|
47644
47952
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
47645
47953
|
}
|
|
47646
47954
|
function buildHeadingDecorationWrapperClassName(className) {
|
|
@@ -47668,8 +47976,8 @@ const META_PATH_TO_STORE_KEY = {
|
|
|
47668
47976
|
metaTitle: "draftMetaTitle",
|
|
47669
47977
|
metaDescription: "draftMetaDescription"
|
|
47670
47978
|
};
|
|
47671
|
-
function mapMetaPathToStoreKey(path$
|
|
47672
|
-
return META_PATH_TO_STORE_KEY[path$
|
|
47979
|
+
function mapMetaPathToStoreKey(path$4) {
|
|
47980
|
+
return META_PATH_TO_STORE_KEY[path$4] ?? path$4;
|
|
47673
47981
|
}
|
|
47674
47982
|
const PATH_SEPARATOR_REGEX = /\./g;
|
|
47675
47983
|
const BRACKET_ACCESS_REGEX = /\[([^\]]+)\]/g;
|
|
@@ -47709,8 +48017,8 @@ function extractSegmentsFromPart(part) {
|
|
|
47709
48017
|
* Splits a path string into an array of segments.
|
|
47710
48018
|
* Supports dot notation (a.b.c), bracket notation (a[0]), and mixed (a.b[0].c).
|
|
47711
48019
|
*/
|
|
47712
|
-
function splitPath$1(path$
|
|
47713
|
-
return path$
|
|
48020
|
+
function splitPath$1(path$4) {
|
|
48021
|
+
return path$4.split(PATH_SEPARATOR_REGEX).flatMap(extractSegmentsFromPart).filter((segment) => segment !== "");
|
|
47714
48022
|
}
|
|
47715
48023
|
/**
|
|
47716
48024
|
* Converts path segments back to a dot-notation string.
|
|
@@ -47736,8 +48044,8 @@ function previewEditableTargetToFieldKey(target) {
|
|
|
47736
48044
|
fieldPath: target.fieldPath
|
|
47737
48045
|
};
|
|
47738
48046
|
}
|
|
47739
|
-
function blockIdFromEditorPath(path$
|
|
47740
|
-
const match = /^blocks\.([^.]+)\./.exec(path$
|
|
48047
|
+
function blockIdFromEditorPath(path$4) {
|
|
48048
|
+
const match = /^blocks\.([^.]+)\./.exec(path$4);
|
|
47741
48049
|
return match?.[1] ?? "";
|
|
47742
48050
|
}
|
|
47743
48051
|
function previewEditableTargetFieldConstraints(target, context) {
|
|
@@ -47789,8 +48097,8 @@ function derivePreviewLinkedEntryFieldBinding(node, parsedBinding, context) {
|
|
|
47789
48097
|
displayPath: eligibility.displayPath
|
|
47790
48098
|
};
|
|
47791
48099
|
}
|
|
47792
|
-
function stripNumericPathSegments(path$
|
|
47793
|
-
return path$
|
|
48100
|
+
function stripNumericPathSegments(path$4) {
|
|
48101
|
+
return path$4.split(".").filter((segment) => !/^\d+$/.test(segment)).join(".");
|
|
47794
48102
|
}
|
|
47795
48103
|
/**
|
|
47796
48104
|
* Resolves a binding path to absolute segments for editor/media metadata injection.
|
|
@@ -48286,8 +48594,8 @@ function resolveRepeater(node, context) {
|
|
|
48286
48594
|
* Helper to walk a nested path through a bindings object.
|
|
48287
48595
|
* Example: getNestedBinding({ ctas: { primary: { label: 'text' } } }, 'ctas.primary.label') → 'text'
|
|
48288
48596
|
*/
|
|
48289
|
-
function getNestedBinding(bindings, path$
|
|
48290
|
-
const segments = path$
|
|
48597
|
+
function getNestedBinding(bindings, path$4) {
|
|
48598
|
+
const segments = path$4.split(".");
|
|
48291
48599
|
let current = bindings;
|
|
48292
48600
|
for (const segment of segments) {
|
|
48293
48601
|
if (!isPlainObject$5(current)) return undefined;
|
|
@@ -48316,13 +48624,13 @@ function resolveBindingToEditorPath(fieldName, bindings, editableRouteMetadataFi
|
|
|
48316
48624
|
if (isPlainObject$5(binding) && "source" in binding) {
|
|
48317
48625
|
const source = binding.source;
|
|
48318
48626
|
if (source === "field" && "path" in binding) {
|
|
48319
|
-
const path$
|
|
48320
|
-
return typeof path$
|
|
48627
|
+
const path$4 = binding.path;
|
|
48628
|
+
return typeof path$4 === "string" ? `content.${path$4}` : null;
|
|
48321
48629
|
}
|
|
48322
48630
|
if (source === "meta" && "path" in binding) {
|
|
48323
|
-
const path$
|
|
48324
|
-
if (typeof path$
|
|
48325
|
-
const mappedPath = mapMetaPathToStoreKey(path$
|
|
48631
|
+
const path$4 = binding.path;
|
|
48632
|
+
if (typeof path$4 !== "string") return null;
|
|
48633
|
+
const mappedPath = mapMetaPathToStoreKey(path$4);
|
|
48326
48634
|
return isMetadataFieldEditable(mappedPath) ? "metadata." + mappedPath : null;
|
|
48327
48635
|
}
|
|
48328
48636
|
if (source === "fallback" && "options" in binding) {
|
|
@@ -48335,13 +48643,13 @@ function resolveBindingToEditorPath(fieldName, bindings, editableRouteMetadataFi
|
|
|
48335
48643
|
if (isPlainObject$5(option) && "source" in option) {
|
|
48336
48644
|
const optSource = option.source;
|
|
48337
48645
|
if (optSource === "field" && "path" in option) {
|
|
48338
|
-
const path$
|
|
48339
|
-
return typeof path$
|
|
48646
|
+
const path$4 = option.path;
|
|
48647
|
+
return typeof path$4 === "string" ? `content.${path$4}` : null;
|
|
48340
48648
|
}
|
|
48341
48649
|
if (optSource === "meta" && "path" in option) {
|
|
48342
|
-
const path$
|
|
48343
|
-
if (typeof path$
|
|
48344
|
-
const mappedPath = mapMetaPathToStoreKey(path$
|
|
48650
|
+
const path$4 = option.path;
|
|
48651
|
+
if (typeof path$4 !== "string") return null;
|
|
48652
|
+
const mappedPath = mapMetaPathToStoreKey(path$4);
|
|
48345
48653
|
return isMetadataFieldEditable(mappedPath) ? "metadata." + mappedPath : null;
|
|
48346
48654
|
}
|
|
48347
48655
|
}
|
|
@@ -48417,22 +48725,22 @@ function injectEditorPath(props$1, node, parsedBinding, context) {
|
|
|
48417
48725
|
};
|
|
48418
48726
|
}
|
|
48419
48727
|
const editableTarget = derivePreviewTextEditableTarget(parsedBinding, context);
|
|
48420
|
-
const path$
|
|
48421
|
-
if (!path$
|
|
48728
|
+
const path$4 = previewEditableTargetToPath(editableTarget);
|
|
48729
|
+
if (!path$4) return propsWithPlaceholder;
|
|
48422
48730
|
if (node.type === "text") {
|
|
48423
48731
|
const constraints = previewEditableTargetFieldConstraints(editableTarget, context);
|
|
48424
48732
|
return constraints ? {
|
|
48425
48733
|
...propsWithPlaceholder,
|
|
48426
|
-
path: path$
|
|
48734
|
+
path: path$4,
|
|
48427
48735
|
...constraints
|
|
48428
48736
|
} : {
|
|
48429
48737
|
...propsWithPlaceholder,
|
|
48430
|
-
path: path$
|
|
48738
|
+
path: path$4
|
|
48431
48739
|
};
|
|
48432
48740
|
}
|
|
48433
48741
|
return {
|
|
48434
48742
|
...propsWithPlaceholder,
|
|
48435
|
-
path: path$
|
|
48743
|
+
path: path$4
|
|
48436
48744
|
};
|
|
48437
48745
|
}
|
|
48438
48746
|
/**
|
|
@@ -48762,11 +49070,11 @@ function readTreatment(kind, value) {
|
|
|
48762
49070
|
};
|
|
48763
49071
|
}
|
|
48764
49072
|
function readBlockComposition(value) {
|
|
48765
|
-
if (!isRecord$
|
|
49073
|
+
if (!isRecord$21(value) || typeof value.kind !== "string") return null;
|
|
48766
49074
|
if (!isCompositionKind(value.kind)) return null;
|
|
48767
49075
|
return readTreatment(value.kind, value.treatment);
|
|
48768
49076
|
}
|
|
48769
|
-
function isRecord$
|
|
49077
|
+
function isRecord$21(value) {
|
|
48770
49078
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
48771
49079
|
}
|
|
48772
49080
|
|
|
@@ -52424,6 +52732,7 @@ function buildPageRendererRootRuntime(dataContext) {
|
|
|
52424
52732
|
const { siteId = null, siteName, pageId = null, pathname = null, bookingTimeZone, previewStage = "published", apiBaseUrl = null, portalToken = null, readAuthority, bookingOfferingPresets = [], appointmentServicePathPrefix = null, mailingList = { tag: "not_configured" }, eventRegistrationOverlayEnabled = false, loaderFailures = {} } = dataContext ?? {};
|
|
52425
52733
|
return {
|
|
52426
52734
|
siteId,
|
|
52735
|
+
demoEmailSuppressed: resolveDemoEmailSuppression(dataContext),
|
|
52427
52736
|
siteName,
|
|
52428
52737
|
pageId,
|
|
52429
52738
|
pathname,
|
|
@@ -52439,6 +52748,9 @@ function buildPageRendererRootRuntime(dataContext) {
|
|
|
52439
52748
|
loaderFailures
|
|
52440
52749
|
};
|
|
52441
52750
|
}
|
|
52751
|
+
function resolveDemoEmailSuppression(dataContext) {
|
|
52752
|
+
return dataContext?.demoEmailSuppressed === true;
|
|
52753
|
+
}
|
|
52442
52754
|
|
|
52443
52755
|
//#endregion
|
|
52444
52756
|
//#region ../blocks/src/pageRenderAudience.tsx
|
|
@@ -52584,11 +52896,11 @@ function shouldDebugCustomBlocks() {
|
|
|
52584
52896
|
* @param path - Dot notation path (e.g., "headline" or "nested.field")
|
|
52585
52897
|
* @returns The resolved value or undefined if not found
|
|
52586
52898
|
*/
|
|
52587
|
-
function resolveFieldPath(obj, path$
|
|
52899
|
+
function resolveFieldPath(obj, path$4) {
|
|
52588
52900
|
if (!obj || typeof obj !== "object") {
|
|
52589
52901
|
return undefined;
|
|
52590
52902
|
}
|
|
52591
|
-
const keys = path$
|
|
52903
|
+
const keys = path$4.split(".");
|
|
52592
52904
|
let current = obj;
|
|
52593
52905
|
for (const key of keys) {
|
|
52594
52906
|
if (current == null || typeof current !== "object") {
|
|
@@ -52604,8 +52916,8 @@ function resolveFieldPath(obj, path$3) {
|
|
|
52604
52916
|
* @param path - Dot notation path
|
|
52605
52917
|
* @returns String representation of the value, or empty string if not found
|
|
52606
52918
|
*/
|
|
52607
|
-
function resolveFieldPathAsString(obj, path$
|
|
52608
|
-
const value = resolveFieldPath(obj, path$
|
|
52919
|
+
function resolveFieldPathAsString(obj, path$4) {
|
|
52920
|
+
const value = resolveFieldPath(obj, path$4);
|
|
52609
52921
|
if (value == null) {
|
|
52610
52922
|
return "";
|
|
52611
52923
|
}
|
|
@@ -52818,11 +53130,11 @@ function strictValidationContext(options = {}) {
|
|
|
52818
53130
|
allowNull: options.allowNull ?? false
|
|
52819
53131
|
};
|
|
52820
53132
|
}
|
|
52821
|
-
function formatFieldPath$1(path$
|
|
52822
|
-
return path$
|
|
53133
|
+
function formatFieldPath$1(path$4) {
|
|
53134
|
+
return path$4.map((segment) => String(segment)).join(".");
|
|
52823
53135
|
}
|
|
52824
|
-
function toZodIssuePath(path$
|
|
52825
|
-
return [...path$
|
|
53136
|
+
function toZodIssuePath(path$4) {
|
|
53137
|
+
return [...path$4];
|
|
52826
53138
|
}
|
|
52827
53139
|
function parseFieldPathKey(key) {
|
|
52828
53140
|
if (!key) return [];
|
|
@@ -52866,24 +53178,24 @@ function pluralize(label, count) {
|
|
|
52866
53178
|
function valueContractForField(field) {
|
|
52867
53179
|
return field.ui?.valueContract === "boxBackground" ? { valueContract: "boxBackground" } : {};
|
|
52868
53180
|
}
|
|
52869
|
-
function deriveTabGroupValidationPlan(field, path$
|
|
53181
|
+
function deriveTabGroupValidationPlan(field, path$4, required) {
|
|
52870
53182
|
return {
|
|
52871
|
-
...makePlan("group", "object", field, path$
|
|
53183
|
+
...makePlan("group", "object", field, path$4, required, requiredConstraints(required)),
|
|
52872
53184
|
...valueContractForField(field),
|
|
52873
53185
|
childSelection: field.activeTabField ? {
|
|
52874
53186
|
kind: "discriminatedTabs",
|
|
52875
53187
|
activeTabField: field.activeTabField,
|
|
52876
53188
|
tabs: field.tabs.map((tab) => ({
|
|
52877
53189
|
typeId: tab.id,
|
|
52878
|
-
fields: deriveNestedFieldPlans(tab.fields, path$
|
|
53190
|
+
fields: deriveNestedFieldPlans(tab.fields, path$4)
|
|
52879
53191
|
}))
|
|
52880
53192
|
} : {
|
|
52881
53193
|
kind: "all",
|
|
52882
|
-
fields: field.tabs.flatMap((tab) => deriveNestedFieldPlans(tab.fields, path$
|
|
53194
|
+
fields: field.tabs.flatMap((tab) => deriveNestedFieldPlans(tab.fields, path$4))
|
|
52883
53195
|
}
|
|
52884
53196
|
};
|
|
52885
53197
|
}
|
|
52886
|
-
function deriveFieldValidationPlan(field, path$
|
|
53198
|
+
function deriveFieldValidationPlan(field, path$4 = [field.id]) {
|
|
52887
53199
|
const required = Boolean(field.required);
|
|
52888
53200
|
switch (field.type) {
|
|
52889
53201
|
case "text": {
|
|
@@ -52898,7 +53210,7 @@ function deriveFieldValidationPlan(field, path$3 = [field.id]) {
|
|
|
52898
53210
|
kind: "numberMax",
|
|
52899
53211
|
maximum: field.ui.max
|
|
52900
53212
|
});
|
|
52901
|
-
return makePlan("number", "number", field, path$
|
|
53213
|
+
return makePlan("number", "number", field, path$4, required, constraints$1);
|
|
52902
53214
|
}
|
|
52903
53215
|
const constraints = commonConstraints(required, { kind: field.ui?.widget === "iconPicker" ? "blockIconValue" : "textType" });
|
|
52904
53216
|
if (inputType === "email") constraints.push({ kind: "emailFormat" });
|
|
@@ -52911,7 +53223,7 @@ function deriveFieldValidationPlan(field, path$3 = [field.id]) {
|
|
|
52911
53223
|
kind: "maxLength",
|
|
52912
53224
|
maximum: field.maxLength
|
|
52913
53225
|
});
|
|
52914
|
-
return makePlan("string", "string", field, path$
|
|
53226
|
+
return makePlan("string", "string", field, path$4, required, constraints);
|
|
52915
53227
|
}
|
|
52916
53228
|
case "number": {
|
|
52917
53229
|
const constraints = commonConstraints(required, { kind: "numberType" });
|
|
@@ -52923,7 +53235,7 @@ function deriveFieldValidationPlan(field, path$3 = [field.id]) {
|
|
|
52923
53235
|
kind: "numberMax",
|
|
52924
53236
|
maximum: field.max
|
|
52925
53237
|
});
|
|
52926
|
-
return makePlan("number", "number", field, path$
|
|
53238
|
+
return makePlan("number", "number", field, path$4, required, constraints);
|
|
52927
53239
|
}
|
|
52928
53240
|
case "slug": {
|
|
52929
53241
|
const constraints = commonConstraints(required, { kind: "textType" }, { kind: "slugFormat" });
|
|
@@ -52931,22 +53243,22 @@ function deriveFieldValidationPlan(field, path$3 = [field.id]) {
|
|
|
52931
53243
|
kind: "maxLength",
|
|
52932
53244
|
maximum: field.maxLength
|
|
52933
53245
|
});
|
|
52934
|
-
return makePlan("string", "string", field, path$
|
|
53246
|
+
return makePlan("string", "string", field, path$4, required, constraints);
|
|
52935
53247
|
}
|
|
52936
|
-
case "url": return makePlan("string", "string", field, path$
|
|
53248
|
+
case "url": return makePlan("string", "string", field, path$4, required, commonConstraints(required, { kind: "textType" }, {
|
|
52937
53249
|
kind: "urlFormat",
|
|
52938
53250
|
allowRelative: Boolean(field.allowRelative)
|
|
52939
53251
|
}));
|
|
52940
|
-
case "reference": return makePlan("string", "string", field, path$
|
|
52941
|
-
case "date": return makePlan("string", "string", field, path$
|
|
52942
|
-
case "time": return makePlan("string", "string", field, path$
|
|
52943
|
-
case "datetime": return makePlan("string", "string", field, path$
|
|
52944
|
-
case "select": return makePlan("select", "select", field, path$
|
|
53252
|
+
case "reference": return makePlan("string", "string", field, path$4, required, commonConstraints(required, { kind: "referenceText" }));
|
|
53253
|
+
case "date": return makePlan("string", "string", field, path$4, required, commonConstraints(required, { kind: "textType" }, { kind: "dateFormat" }));
|
|
53254
|
+
case "time": return makePlan("string", "string", field, path$4, required, commonConstraints(required, { kind: "textType" }, { kind: "timeFormat" }));
|
|
53255
|
+
case "datetime": return makePlan("string", "string", field, path$4, required, commonConstraints(required, { kind: "textType" }, { kind: "datetimeFormat" }));
|
|
53256
|
+
case "select": return makePlan("select", "select", field, path$4, required, commonConstraints(required, {
|
|
52945
53257
|
kind: "selectOption",
|
|
52946
53258
|
source: resolveSelectConstraintSource(field),
|
|
52947
53259
|
multiple: Boolean(field.multiple)
|
|
52948
53260
|
}));
|
|
52949
|
-
case "richText": return makePlan("richText", "object", field, path$
|
|
53261
|
+
case "richText": return makePlan("richText", "object", field, path$4, required, commonConstraints(required, { kind: "richTextDoc" }));
|
|
52950
53262
|
case "inlineText": {
|
|
52951
53263
|
const constraints = commonConstraints(required, { kind: "inlineText" });
|
|
52952
53264
|
if (typeof field.maxLength === "number") {
|
|
@@ -52956,38 +53268,38 @@ function deriveFieldValidationPlan(field, path$3 = [field.id]) {
|
|
|
52956
53268
|
});
|
|
52957
53269
|
}
|
|
52958
53270
|
return {
|
|
52959
|
-
...makePlan("inlineText", "array", field, path$
|
|
53271
|
+
...makePlan("inlineText", "array", field, path$4, required, constraints),
|
|
52960
53272
|
...field.plainTextField ? { plainTextFallbackPath: parseFieldPathKey(field.plainTextField) } : {}
|
|
52961
53273
|
};
|
|
52962
53274
|
}
|
|
52963
53275
|
case "media":
|
|
52964
53276
|
case "file": {
|
|
52965
|
-
const plan = makePlan("media", "object", field, path$
|
|
53277
|
+
const plan = makePlan("media", "object", field, path$4, required, commonConstraints(required, { kind: "mediaObject" }));
|
|
52966
53278
|
return {
|
|
52967
53279
|
...plan,
|
|
52968
53280
|
allowedMediaTypes: field.type === "media" ? field.mediaKinds ?? DEFAULT_MEDIA_FIELD_KINDS : field.fileKinds ?? PUBLIC_FILE_FIELD_KINDS
|
|
52969
53281
|
};
|
|
52970
53282
|
}
|
|
52971
|
-
case "link": return makePlan("link", "object", field, path$
|
|
52972
|
-
case "boolean": return makePlan("boolean", "boolean", field, path$
|
|
53283
|
+
case "link": return makePlan("link", "object", field, path$4, required, commonConstraints(required, { kind: "linkObject" }));
|
|
53284
|
+
case "boolean": return makePlan("boolean", "boolean", field, path$4, required, requiredConstraints(required));
|
|
52973
53285
|
case "repeater": return {
|
|
52974
|
-
...makePlan("repeater", "array", field, path$
|
|
52975
|
-
...field.polymorphic && field.itemTypes ? { repeatedItemVariants: deriveRepeatedItemVariants(field, [...path$
|
|
53286
|
+
...makePlan("repeater", "array", field, path$4, required, commonConstraints(required, { kind: "arrayType" })),
|
|
53287
|
+
...field.polymorphic && field.itemTypes ? { repeatedItemVariants: deriveRepeatedItemVariants(field, [...path$4, 0]) } : { repeatedItemPlan: deriveNestedFieldPlans(getRepeaterFields(field), [...path$4, 0]) },
|
|
52976
53288
|
constraints: withRepeaterItemConstraints(field, commonConstraints(required, { kind: "arrayType" }))
|
|
52977
53289
|
};
|
|
52978
53290
|
case "group":
|
|
52979
53291
|
case "modal": return {
|
|
52980
|
-
...makePlan("group", "object", field, path$
|
|
53292
|
+
...makePlan("group", "object", field, path$4, required, requiredConstraints(required)),
|
|
52981
53293
|
childSelection: {
|
|
52982
53294
|
kind: "all",
|
|
52983
|
-
fields: deriveNestedFieldPlans(field.schema?.fields ?? [], path$
|
|
53295
|
+
fields: deriveNestedFieldPlans(field.schema?.fields ?? [], path$4)
|
|
52984
53296
|
},
|
|
52985
53297
|
allowNullChildren: field.type === "group" && field.ui?.widget === "locationPicker"
|
|
52986
53298
|
};
|
|
52987
|
-
case "tabGroup": return deriveTabGroupValidationPlan(field, path$
|
|
53299
|
+
case "tabGroup": return deriveTabGroupValidationPlan(field, path$4, required);
|
|
52988
53300
|
case "presetOrCustom":
|
|
52989
53301
|
case "contentTypeSelect":
|
|
52990
|
-
case "entryPicker": return makePlan("passthrough", "unknown", field, path$
|
|
53302
|
+
case "entryPicker": return makePlan("passthrough", "unknown", field, path$4, false, []);
|
|
52991
53303
|
default: return assertNever$5(field);
|
|
52992
53304
|
}
|
|
52993
53305
|
}
|
|
@@ -53000,14 +53312,14 @@ function commonConstraints(required, ...specific) {
|
|
|
53000
53312
|
function requiredConstraints(required) {
|
|
53001
53313
|
return required ? [{ kind: "required" }] : [];
|
|
53002
53314
|
}
|
|
53003
|
-
function makePlan(kind, valueKind, field, path$
|
|
53315
|
+
function makePlan(kind, valueKind, field, path$4, required, constraints) {
|
|
53004
53316
|
return {
|
|
53005
53317
|
kind,
|
|
53006
53318
|
valueKind,
|
|
53007
53319
|
fieldId: field.id,
|
|
53008
53320
|
label: field.label,
|
|
53009
53321
|
fieldType: field.type,
|
|
53010
|
-
path: path$
|
|
53322
|
+
path: path$4,
|
|
53011
53323
|
required,
|
|
53012
53324
|
visibility: fieldVisibility(field),
|
|
53013
53325
|
constraints
|
|
@@ -53238,8 +53550,8 @@ function normalizeInlineTextFallbacks(plans, values, ctx) {
|
|
|
53238
53550
|
values[plan.fieldId] = normalizeFieldValue(plan, plainTextToInlineText(fallback), ctx);
|
|
53239
53551
|
}
|
|
53240
53552
|
}
|
|
53241
|
-
function getAtFieldPath(source, path$
|
|
53242
|
-
return path$
|
|
53553
|
+
function getAtFieldPath(source, path$4) {
|
|
53554
|
+
return path$4.reduce((current, segment) => {
|
|
53243
53555
|
if (!current || typeof current !== "object" || Array.isArray(current)) return undefined;
|
|
53244
53556
|
return current[String(segment)];
|
|
53245
53557
|
}, source);
|
|
@@ -53432,11 +53744,11 @@ function materializeRepeaterItemPlan(plan, parentPath, index) {
|
|
|
53432
53744
|
return rebaseFieldPlanPath(plan, [...parentPath, 0], [...parentPath, index]);
|
|
53433
53745
|
}
|
|
53434
53746
|
function rebaseFieldPlanPath(plan, fromPrefix, toPrefix) {
|
|
53435
|
-
const path$
|
|
53747
|
+
const path$4 = rebaseFieldPath(plan.path, fromPrefix, toPrefix);
|
|
53436
53748
|
switch (plan.kind) {
|
|
53437
53749
|
case "group": return {
|
|
53438
53750
|
...plan,
|
|
53439
|
-
path: path$
|
|
53751
|
+
path: path$4,
|
|
53440
53752
|
childSelection: plan.childSelection.kind === "all" ? {
|
|
53441
53753
|
kind: "all",
|
|
53442
53754
|
fields: plan.childSelection.fields.map((childPlan) => rebaseFieldPlanPath(childPlan, fromPrefix, toPrefix))
|
|
@@ -53450,7 +53762,7 @@ function rebaseFieldPlanPath(plan, fromPrefix, toPrefix) {
|
|
|
53450
53762
|
};
|
|
53451
53763
|
case "repeater": return {
|
|
53452
53764
|
...plan,
|
|
53453
|
-
path: path$
|
|
53765
|
+
path: path$4,
|
|
53454
53766
|
...plan.repeatedItemVariants ? { repeatedItemVariants: plan.repeatedItemVariants.map((variant) => ({
|
|
53455
53767
|
...variant,
|
|
53456
53768
|
fields: variant.fields.map((fieldPlan) => rebaseFieldPlanPath(fieldPlan, fromPrefix, toPrefix))
|
|
@@ -53467,7 +53779,7 @@ function rebaseFieldPlanPath(plan, fromPrefix, toPrefix) {
|
|
|
53467
53779
|
case "select":
|
|
53468
53780
|
case "passthrough": return {
|
|
53469
53781
|
...plan,
|
|
53470
|
-
path: path$
|
|
53782
|
+
path: path$4
|
|
53471
53783
|
};
|
|
53472
53784
|
default: return assertNever$5(plan);
|
|
53473
53785
|
}
|
|
@@ -53482,14 +53794,14 @@ function validateInlineTextPlan(plan, value) {
|
|
|
53482
53794
|
}
|
|
53483
53795
|
return [];
|
|
53484
53796
|
}
|
|
53485
|
-
function rebaseFieldPath(path$
|
|
53486
|
-
if (!startsWithFieldPath(path$
|
|
53487
|
-
throw new Error(`Cannot rebase field path ${formatFieldPath$1(path$
|
|
53797
|
+
function rebaseFieldPath(path$4, fromPrefix, toPrefix) {
|
|
53798
|
+
if (!startsWithFieldPath(path$4, fromPrefix)) {
|
|
53799
|
+
throw new Error(`Cannot rebase field path ${formatFieldPath$1(path$4)} from ${formatFieldPath$1(fromPrefix)}`);
|
|
53488
53800
|
}
|
|
53489
|
-
return [...toPrefix, ...path$
|
|
53801
|
+
return [...toPrefix, ...path$4.slice(fromPrefix.length)];
|
|
53490
53802
|
}
|
|
53491
|
-
function startsWithFieldPath(path$
|
|
53492
|
-
return prefix.every((segment, index) => path$
|
|
53803
|
+
function startsWithFieldPath(path$4, prefix) {
|
|
53804
|
+
return prefix.every((segment, index) => path$4[index] === segment);
|
|
53493
53805
|
}
|
|
53494
53806
|
function issue(plan, kind, extra) {
|
|
53495
53807
|
return {
|
|
@@ -53537,8 +53849,8 @@ function fieldPlanToStoredObjectPropertyZod(plan) {
|
|
|
53537
53849
|
}
|
|
53538
53850
|
function addFieldIssueToZodContext(zodCtx, validationIssue, rootPath) {
|
|
53539
53851
|
const message = fieldIssueToMessage(validationIssue);
|
|
53540
|
-
const path$
|
|
53541
|
-
const issuePath = path$
|
|
53852
|
+
const path$4 = relativeZodIssuePath(validationIssue.path, rootPath);
|
|
53853
|
+
const issuePath = path$4.length > 0 ? { path: toZodIssuePath(path$4) } : {};
|
|
53542
53854
|
switch (validationIssue.kind) {
|
|
53543
53855
|
case "required":
|
|
53544
53856
|
if (validationIssue.emptyOrigin) {
|
|
@@ -53606,36 +53918,36 @@ function addFieldIssueToZodContext(zodCtx, validationIssue, rootPath) {
|
|
|
53606
53918
|
default: assertNever$5(validationIssue);
|
|
53607
53919
|
}
|
|
53608
53920
|
}
|
|
53609
|
-
function relativeZodIssuePath(path$
|
|
53610
|
-
return startsWithFieldPath(path$
|
|
53921
|
+
function relativeZodIssuePath(path$4, rootPath) {
|
|
53922
|
+
return startsWithFieldPath(path$4, rootPath) ? path$4.slice(rootPath.length) : path$4;
|
|
53611
53923
|
}
|
|
53612
|
-
function resolveFieldValidationDescriptor(plans, path$
|
|
53613
|
-
const plan = findFieldValidationPlan(plans, path$
|
|
53924
|
+
function resolveFieldValidationDescriptor(plans, path$4) {
|
|
53925
|
+
const plan = findFieldValidationPlan(plans, path$4);
|
|
53614
53926
|
return plan ? fieldValidationDescriptor(plan) : null;
|
|
53615
53927
|
}
|
|
53616
|
-
function findFieldValidationPlan(plans, path$
|
|
53928
|
+
function findFieldValidationPlan(plans, path$4) {
|
|
53617
53929
|
for (const plan of plans) {
|
|
53618
|
-
if (sameFieldPath(plan.path, path$
|
|
53930
|
+
if (sameFieldPath(plan.path, path$4)) {
|
|
53619
53931
|
return plan;
|
|
53620
53932
|
}
|
|
53621
|
-
const nested = findNestedFieldValidationPlan(plan, path$
|
|
53933
|
+
const nested = findNestedFieldValidationPlan(plan, path$4);
|
|
53622
53934
|
if (nested) {
|
|
53623
53935
|
return nested;
|
|
53624
53936
|
}
|
|
53625
53937
|
}
|
|
53626
53938
|
return null;
|
|
53627
53939
|
}
|
|
53628
|
-
function findNestedFieldValidationPlan(plan, path$
|
|
53940
|
+
function findNestedFieldValidationPlan(plan, path$4) {
|
|
53629
53941
|
switch (plan.kind) {
|
|
53630
|
-
case "group": return findFieldValidationPlan(allGroupChildPlans(plan), path$
|
|
53942
|
+
case "group": return findFieldValidationPlan(allGroupChildPlans(plan), path$4);
|
|
53631
53943
|
case "repeater": {
|
|
53632
|
-
const index = path$
|
|
53944
|
+
const index = path$4[plan.path.length];
|
|
53633
53945
|
if (typeof index !== "number") {
|
|
53634
53946
|
return null;
|
|
53635
53947
|
}
|
|
53636
53948
|
const childPlans = plan.repeatedItemVariants ? plan.repeatedItemVariants.flatMap((variant) => variant.fields) : plan.repeatedItemPlan ?? [];
|
|
53637
53949
|
const materialized = childPlans.map((childPlan) => materializeRepeaterItemPlan(childPlan, plan.path, index));
|
|
53638
|
-
return findFieldValidationPlan(materialized, path$
|
|
53950
|
+
return findFieldValidationPlan(materialized, path$4);
|
|
53639
53951
|
}
|
|
53640
53952
|
case "string":
|
|
53641
53953
|
case "number":
|
|
@@ -53836,8 +54148,8 @@ function compileManifestContentContract(manifestOrFields) {
|
|
|
53836
54148
|
findNonPortableMediaPaths: (content) => findNonPortableMediaPaths(plans, content)
|
|
53837
54149
|
}) });
|
|
53838
54150
|
}
|
|
53839
|
-
function resolveManifestContentFieldDescriptor(contract, path$
|
|
53840
|
-
return resolveFieldValidationDescriptor(contract[compiledManifestContentContract].plans, path$
|
|
54151
|
+
function resolveManifestContentFieldDescriptor(contract, path$4) {
|
|
54152
|
+
return resolveFieldValidationDescriptor(contract[compiledManifestContentContract].plans, path$4);
|
|
53841
54153
|
}
|
|
53842
54154
|
/**
|
|
53843
54155
|
* Reports declared media fields carrying environment-specific keys.
|
|
@@ -54014,21 +54326,21 @@ function collectNonPortablePlannedMedia(plans, content, parentPath, paths) {
|
|
|
54014
54326
|
for (const plan of plans) {
|
|
54015
54327
|
if (!(plan.fieldId in content)) continue;
|
|
54016
54328
|
const value = content[plan.fieldId];
|
|
54017
|
-
const path$
|
|
54329
|
+
const path$4 = [...parentPath, plan.fieldId];
|
|
54018
54330
|
switch (plan.kind) {
|
|
54019
54331
|
case "media":
|
|
54020
54332
|
if (isPlainRecord(value) && hasEnvironmentSpecificMediaField(value)) {
|
|
54021
|
-
paths.add(formatFieldPath$1(path$
|
|
54333
|
+
paths.add(formatFieldPath$1(path$4));
|
|
54022
54334
|
}
|
|
54023
54335
|
break;
|
|
54024
54336
|
case "richText":
|
|
54025
|
-
collectNonPortableRichTextImages(value, path$
|
|
54337
|
+
collectNonPortableRichTextImages(value, path$4, paths);
|
|
54026
54338
|
break;
|
|
54027
54339
|
case "group":
|
|
54028
|
-
collectNonPortablePlannedMedia(selectedGroupChildPlans(plan, value), value, path$
|
|
54340
|
+
collectNonPortablePlannedMedia(selectedGroupChildPlans(plan, value), value, path$4, paths);
|
|
54029
54341
|
break;
|
|
54030
54342
|
case "repeater":
|
|
54031
|
-
collectNonPortableRepeaterMedia(plan, value, path$
|
|
54343
|
+
collectNonPortableRepeaterMedia(plan, value, path$4, paths);
|
|
54032
54344
|
break;
|
|
54033
54345
|
case "string":
|
|
54034
54346
|
case "number":
|
|
@@ -54040,20 +54352,20 @@ function collectNonPortablePlannedMedia(plans, content, parentPath, paths) {
|
|
|
54040
54352
|
}
|
|
54041
54353
|
}
|
|
54042
54354
|
}
|
|
54043
|
-
function collectNonPortableRepeaterMedia(plan, value, path$
|
|
54355
|
+
function collectNonPortableRepeaterMedia(plan, value, path$4, paths) {
|
|
54044
54356
|
if (!Array.isArray(value)) return;
|
|
54045
54357
|
value.forEach((item, index) => {
|
|
54046
54358
|
if (!isPlainRecord(item)) return;
|
|
54047
54359
|
const childPlans = plan.repeatedItemVariants ? plan.repeatedItemVariants.find((variant) => variant.typeId === item._type)?.fields : plan.repeatedItemPlan;
|
|
54048
54360
|
if (childPlans) {
|
|
54049
|
-
collectNonPortablePlannedMedia(childPlans, item, [...path$
|
|
54361
|
+
collectNonPortablePlannedMedia(childPlans, item, [...path$4, index], paths);
|
|
54050
54362
|
}
|
|
54051
54363
|
});
|
|
54052
54364
|
}
|
|
54053
|
-
function collectNonPortableRichTextImages(value, path$
|
|
54365
|
+
function collectNonPortableRichTextImages(value, path$4, paths) {
|
|
54054
54366
|
const images = [];
|
|
54055
54367
|
walkAndCollectImageAttrs(value, images);
|
|
54056
|
-
const prefix = formatFieldPath$1(path$
|
|
54368
|
+
const prefix = formatFieldPath$1(path$4);
|
|
54057
54369
|
for (const reference of images) {
|
|
54058
54370
|
if (hasEnvironmentSpecificMediaField(reference.attrs)) {
|
|
54059
54371
|
paths.add(reference.location ? `${prefix}.${reference.location}` : prefix);
|
|
@@ -57587,6 +57899,10 @@ const bookingDescription = richText({}, bind("content.description"), when("conte
|
|
|
57587
57899
|
* that hydration never rewrites.
|
|
57588
57900
|
*/
|
|
57589
57901
|
const bookingWizard = bookingForm(withApiBindings({
|
|
57902
|
+
demoEmailSuppressed: { $bind: {
|
|
57903
|
+
from: "$root.demoEmailSuppressed",
|
|
57904
|
+
fallback: false
|
|
57905
|
+
} },
|
|
57590
57906
|
portalToken: { $bind: {
|
|
57591
57907
|
from: "$root.portalToken",
|
|
57592
57908
|
fallback: null
|
|
@@ -58450,14 +58766,14 @@ const eventSpotlightBlockDefinition = {
|
|
|
58450
58766
|
|
|
58451
58767
|
//#endregion
|
|
58452
58768
|
//#region ../blocks/src/system/blocks/events/migrations.ts
|
|
58453
|
-
function isRecord$
|
|
58769
|
+
function isRecord$20(value) {
|
|
58454
58770
|
return typeof value === "object" && value !== null;
|
|
58455
58771
|
}
|
|
58456
58772
|
function readString(value) {
|
|
58457
58773
|
return typeof value === "string" && value.trim().length > 0 ? value : null;
|
|
58458
58774
|
}
|
|
58459
58775
|
function isLinkValue(value) {
|
|
58460
|
-
if (!isRecord$
|
|
58776
|
+
if (!isRecord$20(value) || typeof value.kind !== "string") {
|
|
58461
58777
|
return false;
|
|
58462
58778
|
}
|
|
58463
58779
|
switch (value.kind) {
|
|
@@ -58473,7 +58789,7 @@ function readLinkValue(value) {
|
|
|
58473
58789
|
return isLinkValue(value) ? value : null;
|
|
58474
58790
|
}
|
|
58475
58791
|
function mapEventListingToEventSpotlightContent(content) {
|
|
58476
|
-
const record = isRecord$
|
|
58792
|
+
const record = isRecord$20(content) ? content : {};
|
|
58477
58793
|
const source = record;
|
|
58478
58794
|
return {
|
|
58479
58795
|
heading: source.heading ?? null,
|
|
@@ -59462,7 +59778,7 @@ function isOfferingsPreviewItemLimit(value) {
|
|
|
59462
59778
|
return value === "1" || value === "2" || value === "3" || value === "4" || value === "5" || value === "6" || value === null;
|
|
59463
59779
|
}
|
|
59464
59780
|
function normalizeOfferingsPreviewGroupOverride(value) {
|
|
59465
|
-
if (!isRecord$
|
|
59781
|
+
if (!isRecord$19(value)) return [];
|
|
59466
59782
|
const override = {};
|
|
59467
59783
|
if (isOfferingsPreviewSourceKey(value.sourceKey) || value.sourceKey === null) {
|
|
59468
59784
|
override.sourceKey = value.sourceKey;
|
|
@@ -59501,7 +59817,7 @@ function normalizeSectionStylesContent(value) {
|
|
|
59501
59817
|
}
|
|
59502
59818
|
function normalizeBoxStylesContent(value) {
|
|
59503
59819
|
if (value === null) return null;
|
|
59504
|
-
if (!isRecord$
|
|
59820
|
+
if (!isRecord$19(value)) return undefined;
|
|
59505
59821
|
const { background: _background, ...rest } = value;
|
|
59506
59822
|
const background = parseBackgroundContent(value.background);
|
|
59507
59823
|
return {
|
|
@@ -59509,7 +59825,7 @@ function normalizeBoxStylesContent(value) {
|
|
|
59509
59825
|
...background ? { background } : {}
|
|
59510
59826
|
};
|
|
59511
59827
|
}
|
|
59512
|
-
function isRecord$
|
|
59828
|
+
function isRecord$19(value) {
|
|
59513
59829
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
59514
59830
|
}
|
|
59515
59831
|
|
|
@@ -62550,21 +62866,21 @@ function buildPreviewFieldConstraints(manifest) {
|
|
|
62550
62866
|
}
|
|
62551
62867
|
function collectPreviewFieldConstraintEntries(fields$2, prefix = "") {
|
|
62552
62868
|
return fields$2.flatMap((field) => {
|
|
62553
|
-
const path$
|
|
62554
|
-
const own = field.type === "text" && typeof field.maxLength === "number" ? [[path$
|
|
62555
|
-
return [...own, ...collectNestedPreviewFieldConstraintEntries(field, path$
|
|
62869
|
+
const path$4 = prefix ? `${prefix}.${field.id}` : field.id;
|
|
62870
|
+
const own = field.type === "text" && typeof field.maxLength === "number" ? [[path$4, { maxLength: field.maxLength }]] : [];
|
|
62871
|
+
return [...own, ...collectNestedPreviewFieldConstraintEntries(field, path$4)];
|
|
62556
62872
|
});
|
|
62557
62873
|
}
|
|
62558
|
-
function collectNestedPreviewFieldConstraintEntries(field, path$
|
|
62874
|
+
function collectNestedPreviewFieldConstraintEntries(field, path$4) {
|
|
62559
62875
|
switch (field.type) {
|
|
62560
62876
|
case "group":
|
|
62561
|
-
case "modal": return collectPreviewFieldConstraintEntries(field.schema.fields, path$
|
|
62877
|
+
case "modal": return collectPreviewFieldConstraintEntries(field.schema.fields, path$4);
|
|
62562
62878
|
case "repeater": {
|
|
62563
|
-
const schemaEntries = field.schema ? collectPreviewFieldConstraintEntries(field.schema.fields, path$
|
|
62564
|
-
const itemTypeEntries = Object.values(field.itemTypes ?? {}).flatMap((itemType) => collectPreviewFieldConstraintEntries(itemType.fields, path$
|
|
62879
|
+
const schemaEntries = field.schema ? collectPreviewFieldConstraintEntries(field.schema.fields, path$4) : [];
|
|
62880
|
+
const itemTypeEntries = Object.values(field.itemTypes ?? {}).flatMap((itemType) => collectPreviewFieldConstraintEntries(itemType.fields, path$4));
|
|
62565
62881
|
return [...schemaEntries, ...itemTypeEntries];
|
|
62566
62882
|
}
|
|
62567
|
-
case "tabGroup": return field.tabs.flatMap((tab) => collectPreviewFieldConstraintEntries(tab.fields, path$
|
|
62883
|
+
case "tabGroup": return field.tabs.flatMap((tab) => collectPreviewFieldConstraintEntries(tab.fields, path$4));
|
|
62568
62884
|
case "boolean":
|
|
62569
62885
|
case "contentTypeSelect":
|
|
62570
62886
|
case "date":
|
|
@@ -62722,7 +63038,7 @@ function assertThemeConfigCanGenerateAccordionSystem(themeConfig) {
|
|
|
62722
63038
|
["shadow.elevation", themeConfig.shadow?.elevation],
|
|
62723
63039
|
["shadow.position", themeConfig.shadow?.position]
|
|
62724
63040
|
];
|
|
62725
|
-
const missingPaths = requiredPaths.flatMap(([path$
|
|
63041
|
+
const missingPaths = requiredPaths.flatMap(([path$4, value]) => value == null ? [path$4] : []);
|
|
62726
63042
|
if (missingPaths.length > 0) {
|
|
62727
63043
|
throw new Error(`Cannot generate accordion defaults from incomplete themeConfig; missing ${missingPaths.join(", ")}`);
|
|
62728
63044
|
}
|
|
@@ -63152,11 +63468,11 @@ function resolveAiFieldHint(input) {
|
|
|
63152
63468
|
|
|
63153
63469
|
//#endregion
|
|
63154
63470
|
//#region ../blocks/src/system/media/constrainedVideoMedia.ts
|
|
63155
|
-
function isRecord$
|
|
63471
|
+
function isRecord$18(value) {
|
|
63156
63472
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
63157
63473
|
}
|
|
63158
63474
|
function valueAtField(current, fieldId) {
|
|
63159
|
-
return isRecord$
|
|
63475
|
+
return isRecord$18(current) ? current[fieldId] : undefined;
|
|
63160
63476
|
}
|
|
63161
63477
|
function collectConstrainedVideoMediaValues(options) {
|
|
63162
63478
|
const { blockKind, fields: fields$2, currentValue, parentPath = [] } = options;
|
|
@@ -63167,7 +63483,7 @@ function collectConstrainedVideoMediaValues(options) {
|
|
|
63167
63483
|
const fieldValue = valueAtField(currentValue, field.id);
|
|
63168
63484
|
switch (field.type) {
|
|
63169
63485
|
case "media": {
|
|
63170
|
-
if (!isRecord$
|
|
63486
|
+
if (!isRecord$18(fieldValue) || fieldValue.type !== "video") break;
|
|
63171
63487
|
const policy = deriveVideoSlotPolicy(resolveVideoSelectionIntentForMediaField({
|
|
63172
63488
|
fieldPath,
|
|
63173
63489
|
mediaKinds: field.mediaKinds
|
|
@@ -63598,7 +63914,7 @@ function hydrateResolvedBookingConsentValue(value, context) {
|
|
|
63598
63914
|
const hydratedItems = value.map((item) => hydrateResolvedBookingConsentValue(item, context));
|
|
63599
63915
|
return hydratedItems.every((item, index) => item === value[index]) ? value : hydratedItems;
|
|
63600
63916
|
}
|
|
63601
|
-
if (!isRecord$
|
|
63917
|
+
if (!isRecord$16(value)) {
|
|
63602
63918
|
return value;
|
|
63603
63919
|
}
|
|
63604
63920
|
if (isBookingConsentCarrier(value)) {
|
|
@@ -63621,7 +63937,7 @@ function hydrateValue(value, context) {
|
|
|
63621
63937
|
const isUnchanged = resolvedItems.every((item, index) => item === value[index]);
|
|
63622
63938
|
return isUnchanged ? value : resolvedItems;
|
|
63623
63939
|
}
|
|
63624
|
-
if (isRecord$
|
|
63940
|
+
if (isRecord$16(value)) {
|
|
63625
63941
|
if (isInternalLink$1(value)) {
|
|
63626
63942
|
return hydrateInternalLink(value, context.routes);
|
|
63627
63943
|
}
|
|
@@ -63718,7 +64034,7 @@ function hydrateEntryLink(link$2, context) {
|
|
|
63718
64034
|
//#region ../blocks/src/system/manifest/resolveBlockData.ts
|
|
63719
64035
|
function resolveBlockData(blockId, dataLoaders$2, dataContext, routes) {
|
|
63720
64036
|
const raw = blockId ? dataContext?.resolvedData?.[blockId] : undefined;
|
|
63721
|
-
if (isRecord$
|
|
64037
|
+
if (isRecord$16(raw)) {
|
|
63722
64038
|
return routes ? hydrateResolvedBookingConsentLinks(raw, routes, dataContext?.pagesByIdentifier, dataContext?.entriesByIdentifier) : raw;
|
|
63723
64039
|
}
|
|
63724
64040
|
return dataLoaders$2 && typeof dataLoaders$2 === "object" && Object.keys(dataLoaders$2).length > 0 ? {} : undefined;
|
|
@@ -63735,19 +64051,19 @@ function planNewsletterBlockSubmission(placement) {
|
|
|
63735
64051
|
sourceRef
|
|
63736
64052
|
} : { tag: "unavailable" };
|
|
63737
64053
|
}
|
|
63738
|
-
|
|
63739
|
-
|
|
64054
|
+
const published = placement.publishedPlacement;
|
|
64055
|
+
if (published === null) {
|
|
64056
|
+
return placement.stage === "preview" ? { tag: "unpublished-form" } : { tag: "unavailable" };
|
|
63740
64057
|
}
|
|
63741
|
-
|
|
63742
|
-
return
|
|
64058
|
+
switch (published.kind) {
|
|
64059
|
+
case "incomplete": return { tag: "unpublished-settings" };
|
|
64060
|
+
case "published": return planNewsletterPreviewSubmission({
|
|
63743
64061
|
blockId: placement.blockId,
|
|
63744
|
-
publishedContentId:
|
|
64062
|
+
publishedContentId: published.id,
|
|
63745
64063
|
renderedContent: placement.renderedContent,
|
|
63746
|
-
publishedContent:
|
|
64064
|
+
publishedContent: published.content
|
|
63747
64065
|
});
|
|
63748
64066
|
}
|
|
63749
|
-
if (placement.stage === "preview") return { tag: "unpublished-form" };
|
|
63750
|
-
return { tag: "unavailable" };
|
|
63751
64067
|
}
|
|
63752
64068
|
/** Decide whether the visible draft can safely cite the published placement. */
|
|
63753
64069
|
function planNewsletterPreviewSubmission(placement) {
|
|
@@ -64006,21 +64322,6 @@ const BlockErrorBoundary = createBlockErrorBoundary();
|
|
|
64006
64322
|
|
|
64007
64323
|
//#endregion
|
|
64008
64324
|
//#region ../blocks/src/pageRenderAdmission.ts
|
|
64009
|
-
/** Pair a published version with the content it authorises at the render boundary. */
|
|
64010
|
-
function readPublishedBlockPlacement(id, content) {
|
|
64011
|
-
if (id == null && content == null) return null;
|
|
64012
|
-
if (id == null || content == null) {
|
|
64013
|
-
return {
|
|
64014
|
-
kind: "incomplete",
|
|
64015
|
-
id: id ?? null,
|
|
64016
|
-
content: content ?? null
|
|
64017
|
-
};
|
|
64018
|
-
}
|
|
64019
|
-
return {
|
|
64020
|
-
id,
|
|
64021
|
-
content
|
|
64022
|
-
};
|
|
64023
|
-
}
|
|
64024
64325
|
function toPresentationPage(page) {
|
|
64025
64326
|
if (!page) return null;
|
|
64026
64327
|
return {
|
|
@@ -82255,8 +82556,8 @@ function resolveParamsBindings(input, vm, meta) {
|
|
|
82255
82556
|
}
|
|
82256
82557
|
return out;
|
|
82257
82558
|
}
|
|
82258
|
-
function resolveBinding(path$
|
|
82259
|
-
const segments = splitPath(path$
|
|
82559
|
+
function resolveBinding(path$4, vm) {
|
|
82560
|
+
const segments = splitPath(path$4);
|
|
82260
82561
|
if (!segments.length) return undefined;
|
|
82261
82562
|
const [first, ...rest] = segments;
|
|
82262
82563
|
let source = vm;
|
|
@@ -82274,11 +82575,11 @@ function resolveBinding(path$3, vm) {
|
|
|
82274
82575
|
}
|
|
82275
82576
|
return readFromSource(vm, segments);
|
|
82276
82577
|
}
|
|
82277
|
-
function splitPath(path$
|
|
82578
|
+
function splitPath(path$4) {
|
|
82278
82579
|
const PATH_SEPARATOR_REGEX$2 = /\./g;
|
|
82279
82580
|
const BRACKET_ACCESS_REGEX$2 = /\[(?<token>[^\]]+)\]/g;
|
|
82280
82581
|
const segments = [];
|
|
82281
|
-
const parts = path$
|
|
82582
|
+
const parts = path$4.split(PATH_SEPARATOR_REGEX$2);
|
|
82282
82583
|
for (const raw of parts) {
|
|
82283
82584
|
if (!raw) continue;
|
|
82284
82585
|
const baseMatch = raw.match(/^([^\[]+)/);
|
|
@@ -83571,7 +83872,7 @@ function parseBackgroundOverrideFromContent(content) {
|
|
|
83571
83872
|
* Only the explicit owner marker can make a background a page-design override.
|
|
83572
83873
|
*/
|
|
83573
83874
|
function parseCanonicalSectionBackground(content) {
|
|
83574
|
-
const sectionStyles = isRecord$
|
|
83875
|
+
const sectionStyles = isRecord$17(content._sectionStyles) ? content._sectionStyles : null;
|
|
83575
83876
|
const background = sectionStyles?.background;
|
|
83576
83877
|
if (background === null || background === undefined) {
|
|
83577
83878
|
return { kind: "none" };
|
|
@@ -83596,7 +83897,7 @@ function parseBackgroundOverride(value) {
|
|
|
83596
83897
|
override: DEFAULT_BACKGROUND_OVERRIDE
|
|
83597
83898
|
};
|
|
83598
83899
|
}
|
|
83599
|
-
if (!isRecord$
|
|
83900
|
+
if (!isRecord$17(value)) {
|
|
83600
83901
|
return {
|
|
83601
83902
|
kind: "unsupported",
|
|
83602
83903
|
reason: "unsupported-shape",
|
|
@@ -83701,7 +84002,7 @@ function parseBackgroundOverride(value) {
|
|
|
83701
84002
|
}
|
|
83702
84003
|
}
|
|
83703
84004
|
function applyBackgroundOverrideContentPatch(content, override) {
|
|
83704
|
-
const sectionStyles = isRecord$
|
|
84005
|
+
const sectionStyles = isRecord$17(content._sectionStyles) ? content._sectionStyles : {};
|
|
83705
84006
|
const serialized = serializeBackgroundOverride(override);
|
|
83706
84007
|
if (serialized === null) {
|
|
83707
84008
|
const nextSectionStyles = omitRecordKey(sectionStyles, "background");
|
|
@@ -83942,7 +84243,7 @@ function imageAllowed(mediaId, pool) {
|
|
|
83942
84243
|
return pool?.some((item) => item.mediaId === mediaId) ?? false;
|
|
83943
84244
|
}
|
|
83944
84245
|
function parseImageMediaAssetId(value) {
|
|
83945
|
-
if (!isRecord$
|
|
84246
|
+
if (!isRecord$17(value)) return { kind: "missing" };
|
|
83946
84247
|
if (value.type !== undefined && value.type !== "image") return { kind: "missing" };
|
|
83947
84248
|
const parsed = parseMediaAssetId(value.assetId);
|
|
83948
84249
|
if (!parsed.ok) {
|
|
@@ -83987,7 +84288,7 @@ function withSectionStyles(content, sectionStyles) {
|
|
|
83987
84288
|
function omitRecordKey(content, key) {
|
|
83988
84289
|
return Object.fromEntries(Object.entries(content).filter(([entryKey]) => entryKey !== key));
|
|
83989
84290
|
}
|
|
83990
|
-
function isRecord$
|
|
84291
|
+
function isRecord$17(value) {
|
|
83991
84292
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
83992
84293
|
}
|
|
83993
84294
|
|
|
@@ -84419,7 +84720,7 @@ const ENV_SPECIFIC_MEDIA_KEYS = [
|
|
|
84419
84720
|
"storagePath",
|
|
84420
84721
|
"storageBucket"
|
|
84421
84722
|
];
|
|
84422
|
-
const isRecord$
|
|
84723
|
+
const isRecord$15 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
84423
84724
|
const looksLikeUuid = (value) => typeof value === "string" && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(value);
|
|
84424
84725
|
const hasCmsReference = (value) => typeof value.identifier === "string" || typeof value.assetId === "string" || looksLikeUuid(value.id) || typeof value.storagePath === "string" || typeof value.storageBucket === "string";
|
|
84425
84726
|
const stripMediaFields = (value) => {
|
|
@@ -84433,7 +84734,7 @@ const stripMediaFields = (value) => {
|
|
|
84433
84734
|
delete value.mimeType;
|
|
84434
84735
|
};
|
|
84435
84736
|
const stripRichTextImageSource = (value) => {
|
|
84436
|
-
if (value.type !== "image" || !isRecord$
|
|
84737
|
+
if (value.type !== "image" || !isRecord$15(value.attrs)) return;
|
|
84437
84738
|
const attrs = value.attrs;
|
|
84438
84739
|
const hasIdentifier = typeof attrs.identifier === "string" && attrs.identifier.trim().length > 0;
|
|
84439
84740
|
if (hasIdentifier) delete attrs.src;
|
|
@@ -84455,7 +84756,7 @@ function stripEnvSpecificMediaFieldsInPlace(value) {
|
|
|
84455
84756
|
}
|
|
84456
84757
|
return;
|
|
84457
84758
|
}
|
|
84458
|
-
if (!isRecord$
|
|
84759
|
+
if (!isRecord$15(value)) return;
|
|
84459
84760
|
stripMediaFields(value);
|
|
84460
84761
|
stripRichTextImageSource(value);
|
|
84461
84762
|
for (const entry of Object.values(value)) {
|
|
@@ -84690,65 +84991,8 @@ function pageSnapshotFileName(identifier) {
|
|
|
84690
84991
|
return `${encodeSnapshotPathPart(identifier)}.json`;
|
|
84691
84992
|
}
|
|
84692
84993
|
|
|
84693
|
-
//#endregion
|
|
84694
|
-
//#region ../api/src/event-presentation.ts
|
|
84695
|
-
const MAX_CARD_TITLE_LENGTH = 120;
|
|
84696
|
-
var InvalidEventPresentationImageError = class extends Error {
|
|
84697
|
-
constructor() {
|
|
84698
|
-
super("Event presentation image must be null or an object with a non-empty identifier");
|
|
84699
|
-
this.name = "InvalidEventPresentationImageError";
|
|
84700
|
-
}
|
|
84701
|
-
};
|
|
84702
|
-
function isRecord$15(value) {
|
|
84703
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
84704
|
-
}
|
|
84705
|
-
function normalizeTitle(value) {
|
|
84706
|
-
if (typeof value !== "string") return null;
|
|
84707
|
-
const trimmed = value.trim();
|
|
84708
|
-
if (!trimmed) return null;
|
|
84709
|
-
return trimmed.length > MAX_CARD_TITLE_LENGTH ? trimmed.slice(0, MAX_CARD_TITLE_LENGTH) : trimmed;
|
|
84710
|
-
}
|
|
84711
|
-
function normalizeImage(value) {
|
|
84712
|
-
if (value == null) return null;
|
|
84713
|
-
if (isRecord$15(value) && typeof value.identifier === "string" && value.identifier.trim().length > 0) return value;
|
|
84714
|
-
throw new InvalidEventPresentationImageError();
|
|
84715
|
-
}
|
|
84716
|
-
function hasOwnKey(value, key) {
|
|
84717
|
-
return Object.prototype.hasOwnProperty.call(value, key);
|
|
84718
|
-
}
|
|
84719
|
-
/**
|
|
84720
|
-
* Normalizes event card/list presentation without deriving it from page
|
|
84721
|
-
* content. Native page surfaces and presentation are separate authorities.
|
|
84722
|
-
*/
|
|
84723
|
-
function deriveEventPresentation(input) {
|
|
84724
|
-
const base = isRecord$15(input.storedPresentation) ? { ...input.storedPresentation } : {};
|
|
84725
|
-
const legacyTitle = base.title;
|
|
84726
|
-
delete base.title;
|
|
84727
|
-
if (!normalizeTitle(base.cardTitleOverride) && input.allowLegacyTitleInput) {
|
|
84728
|
-
const cardTitleOverride = normalizeTitle(legacyTitle);
|
|
84729
|
-
if (cardTitleOverride) {
|
|
84730
|
-
base.cardTitleOverride = cardTitleOverride;
|
|
84731
|
-
} else {
|
|
84732
|
-
delete base.cardTitleOverride;
|
|
84733
|
-
}
|
|
84734
|
-
}
|
|
84735
|
-
if (hasOwnKey(base, "image")) {
|
|
84736
|
-
base.image = normalizeImage(base.image);
|
|
84737
|
-
}
|
|
84738
|
-
return Object.keys(base).length > 0 ? base : null;
|
|
84739
|
-
}
|
|
84740
|
-
|
|
84741
84994
|
//#endregion
|
|
84742
84995
|
//#region src/content/eventLocalProjection.ts
|
|
84743
|
-
/**
|
|
84744
|
-
* The single definition of "what a pulled event looks like on disk".
|
|
84745
|
-
*
|
|
84746
|
-
* `writeEvents` uses these projections to write `content/events/*.json` and
|
|
84747
|
-
* `content/event-runs/*.json`, and the scoped push uses them to ask the reverse
|
|
84748
|
-
* question: are the local files still exactly what a pull of the current remote
|
|
84749
|
-
* would write? Both sides must stay on the same projection, so it lives here
|
|
84750
|
-
* rather than in either caller.
|
|
84751
|
-
*/
|
|
84752
84996
|
function toWritableLocalEvent(event) {
|
|
84753
84997
|
return {
|
|
84754
84998
|
identifier: event.identifier,
|
|
@@ -84764,14 +85008,8 @@ function toWritableLocalEvent(event) {
|
|
|
84764
85008
|
};
|
|
84765
85009
|
}
|
|
84766
85010
|
function toWritableLocalEventRun(run) {
|
|
84767
|
-
const { createdAt: _createdAt, updatedAt: _updatedAt, presentation, ...localRun } = structuredClone(run);
|
|
84768
|
-
return
|
|
84769
|
-
...localRun,
|
|
84770
|
-
presentation: deriveEventPresentation({
|
|
84771
|
-
storedPresentation: presentation ?? null,
|
|
84772
|
-
allowLegacyTitleInput: false
|
|
84773
|
-
})
|
|
84774
|
-
};
|
|
85011
|
+
const { createdAt: _createdAt, updatedAt: _updatedAt, presentation: _presentation, ...localRun } = structuredClone(run);
|
|
85012
|
+
return localRun;
|
|
84775
85013
|
}
|
|
84776
85014
|
/**
|
|
84777
85015
|
* The event file a pull would write for this remote event, as the reader would
|
|
@@ -86163,8 +86401,9 @@ function parseLocalEventRun(raw, filePath) {
|
|
|
86163
86401
|
const fields$2 = raw;
|
|
86164
86402
|
assertLocalEventRunRefs(fields$2, filePath);
|
|
86165
86403
|
assertLocalEventRunVisibility(fields$2, filePath);
|
|
86404
|
+
const { presentation: _retiredPresentation, ...run } = raw;
|
|
86166
86405
|
return {
|
|
86167
|
-
...
|
|
86406
|
+
...run,
|
|
86168
86407
|
...identity
|
|
86169
86408
|
};
|
|
86170
86409
|
}
|
|
@@ -86917,11 +87156,11 @@ function itemSegment(key) {
|
|
|
86917
87156
|
function collectSortedKeys(local, remote) {
|
|
86918
87157
|
return Array.from(new Set([...Object.keys(remote), ...Object.keys(local)])).sort((a, b) => a.localeCompare(b));
|
|
86919
87158
|
}
|
|
86920
|
-
function arrayIdentityMap(items, path$
|
|
87159
|
+
function arrayIdentityMap(items, path$4, identifyArrayItem) {
|
|
86921
87160
|
const result = new Map();
|
|
86922
87161
|
for (let index = 0; index < items.length; index++) {
|
|
86923
87162
|
const key = identifyArrayItem({
|
|
86924
|
-
path: path$
|
|
87163
|
+
path: path$4,
|
|
86925
87164
|
item: items[index],
|
|
86926
87165
|
index
|
|
86927
87166
|
});
|
|
@@ -86948,8 +87187,8 @@ function isSensitivePropertyKey(key) {
|
|
|
86948
87187
|
const normalized = key.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase();
|
|
86949
87188
|
return /(^|[_-])(secret|token|password|credential|api_key|webhook_secret|mgmt_api_key|management_api_key)s?($|[_-])/.test(normalized);
|
|
86950
87189
|
}
|
|
86951
|
-
function hasSensitivePropertyPath(path$
|
|
86952
|
-
return path$
|
|
87190
|
+
function hasSensitivePropertyPath(path$4) {
|
|
87191
|
+
return path$4.some((segment) => segment.type === "property" && isSensitivePropertyKey(segment.key));
|
|
86953
87192
|
}
|
|
86954
87193
|
function sameMultiset(left, right) {
|
|
86955
87194
|
if (left.length !== right.length) return false;
|
|
@@ -86970,25 +87209,25 @@ function sameMultiset(left, right) {
|
|
|
86970
87209
|
function collectSortedIdentityKeys(localOrder, remoteOrder) {
|
|
86971
87210
|
return Array.from(new Set([...remoteOrder, ...localOrder])).sort((a, b) => a.localeCompare(b));
|
|
86972
87211
|
}
|
|
86973
|
-
function buildReorderDiff(localOrder, remoteOrder, remoteById, path$
|
|
87212
|
+
function buildReorderDiff(localOrder, remoteOrder, remoteById, path$4) {
|
|
86974
87213
|
const sameItems = localOrder.length === remoteOrder.length && localOrder.every((key) => remoteById.has(key));
|
|
86975
87214
|
if (!sameItems || equal(localOrder, remoteOrder)) return null;
|
|
86976
87215
|
return {
|
|
86977
87216
|
kind: "list_reordered",
|
|
86978
|
-
path: path$
|
|
87217
|
+
path: path$4,
|
|
86979
87218
|
before: remoteOrder,
|
|
86980
87219
|
after: localOrder
|
|
86981
87220
|
};
|
|
86982
87221
|
}
|
|
86983
|
-
function diffIdentifiedArrays(localById, remoteById, path$
|
|
87222
|
+
function diffIdentifiedArrays(localById, remoteById, path$4, options) {
|
|
86984
87223
|
const localOrder = Array.from(localById.keys());
|
|
86985
87224
|
const remoteOrder = Array.from(remoteById.keys());
|
|
86986
|
-
const reorderDiff = buildReorderDiff(localOrder, remoteOrder, remoteById, path$
|
|
87225
|
+
const reorderDiff = buildReorderDiff(localOrder, remoteOrder, remoteById, path$4);
|
|
86987
87226
|
const itemDiffs = [];
|
|
86988
87227
|
for (const id of collectSortedIdentityKeys(localOrder, remoteOrder)) {
|
|
86989
87228
|
const local = localById.get(id);
|
|
86990
87229
|
const remote = remoteById.get(id);
|
|
86991
|
-
const nextPath = [...path$
|
|
87230
|
+
const nextPath = [...path$4, itemSegment(id)];
|
|
86992
87231
|
if (local && !remote) {
|
|
86993
87232
|
itemDiffs.push({
|
|
86994
87233
|
kind: "added",
|
|
@@ -87009,56 +87248,56 @@ function diffIdentifiedArrays(localById, remoteById, path$3, options) {
|
|
|
87009
87248
|
}
|
|
87010
87249
|
return reorderDiff ? [reorderDiff, ...itemDiffs] : itemDiffs;
|
|
87011
87250
|
}
|
|
87012
|
-
function diffArraysByIdentity(local, remote, path$
|
|
87251
|
+
function diffArraysByIdentity(local, remote, path$4, options) {
|
|
87013
87252
|
const identifyArrayItem = options.identifyArrayItem;
|
|
87014
87253
|
if (!identifyArrayItem) return null;
|
|
87015
|
-
const localById = arrayIdentityMap(local, path$
|
|
87016
|
-
const remoteById = arrayIdentityMap(remote, path$
|
|
87254
|
+
const localById = arrayIdentityMap(local, path$4, identifyArrayItem);
|
|
87255
|
+
const remoteById = arrayIdentityMap(remote, path$4, identifyArrayItem);
|
|
87017
87256
|
if (!localById || !remoteById) return null;
|
|
87018
|
-
return diffIdentifiedArrays(localById, remoteById, path$
|
|
87257
|
+
return diffIdentifiedArrays(localById, remoteById, path$4, options);
|
|
87019
87258
|
}
|
|
87020
|
-
function diffSameLengthArrays(local, remote, path$
|
|
87259
|
+
function diffSameLengthArrays(local, remote, path$4, options) {
|
|
87021
87260
|
const diffs = [];
|
|
87022
87261
|
for (let index = 0; index < local.length; index++) {
|
|
87023
|
-
diffs.push(...diffValues(local[index], remote[index], [...path$
|
|
87262
|
+
diffs.push(...diffValues(local[index], remote[index], [...path$4, indexSegment(index)], options));
|
|
87024
87263
|
}
|
|
87025
87264
|
return diffs.length > 0 ? diffs : [{
|
|
87026
87265
|
kind: "changed",
|
|
87027
|
-
path: path$
|
|
87266
|
+
path: path$4,
|
|
87028
87267
|
before: remote,
|
|
87029
87268
|
after: local
|
|
87030
87269
|
}];
|
|
87031
87270
|
}
|
|
87032
|
-
function diffArraysByPosition(local, remote, path$
|
|
87271
|
+
function diffArraysByPosition(local, remote, path$4, options) {
|
|
87033
87272
|
if (sameMultiset(local, remote)) {
|
|
87034
87273
|
return [{
|
|
87035
87274
|
kind: "list_reordered",
|
|
87036
|
-
path: path$
|
|
87275
|
+
path: path$4,
|
|
87037
87276
|
before: remote,
|
|
87038
87277
|
after: local
|
|
87039
87278
|
}];
|
|
87040
87279
|
}
|
|
87041
|
-
if (local.length === remote.length) return diffSameLengthArrays(local, remote, path$
|
|
87280
|
+
if (local.length === remote.length) return diffSameLengthArrays(local, remote, path$4, options);
|
|
87042
87281
|
return [{
|
|
87043
87282
|
kind: "changed",
|
|
87044
|
-
path: path$
|
|
87283
|
+
path: path$4,
|
|
87045
87284
|
before: remote,
|
|
87046
87285
|
after: local
|
|
87047
87286
|
}];
|
|
87048
87287
|
}
|
|
87049
|
-
function diffValues(local, remote, path$
|
|
87288
|
+
function diffValues(local, remote, path$4, options) {
|
|
87050
87289
|
const normalizedLocal = normalizeComparable(local);
|
|
87051
87290
|
const normalizedRemote = normalizeComparable(remote);
|
|
87052
87291
|
if (equal(normalizedLocal, normalizedRemote)) return [];
|
|
87053
87292
|
if (Array.isArray(normalizedLocal) && Array.isArray(normalizedRemote)) {
|
|
87054
|
-
return diffArrays(normalizedLocal, normalizedRemote, path$
|
|
87293
|
+
return diffArrays(normalizedLocal, normalizedRemote, path$4, options);
|
|
87055
87294
|
}
|
|
87056
87295
|
if (isRecord$12(normalizedLocal) && isRecord$12(normalizedRemote)) {
|
|
87057
87296
|
const diffs = [];
|
|
87058
87297
|
for (const key of collectSortedKeys(normalizedLocal, normalizedRemote)) {
|
|
87059
87298
|
const localHasKey = Object.prototype.hasOwnProperty.call(normalizedLocal, key);
|
|
87060
87299
|
const remoteHasKey = Object.prototype.hasOwnProperty.call(normalizedRemote, key);
|
|
87061
|
-
const nextPath = [...path$
|
|
87300
|
+
const nextPath = [...path$4, propertySegment(key)];
|
|
87062
87301
|
if (!remoteHasKey && localHasKey) {
|
|
87063
87302
|
diffs.push({
|
|
87064
87303
|
kind: "added",
|
|
@@ -87083,21 +87322,21 @@ function diffValues(local, remote, path$3, options) {
|
|
|
87083
87322
|
}
|
|
87084
87323
|
return [{
|
|
87085
87324
|
kind: "changed",
|
|
87086
|
-
path: path$
|
|
87325
|
+
path: path$4,
|
|
87087
87326
|
before: normalizedRemote,
|
|
87088
87327
|
after: normalizedLocal
|
|
87089
87328
|
}];
|
|
87090
87329
|
}
|
|
87091
|
-
function diffArrays(local, remote, path$
|
|
87092
|
-
return diffArraysByIdentity(local, remote, path$
|
|
87330
|
+
function diffArrays(local, remote, path$4, options) {
|
|
87331
|
+
return diffArraysByIdentity(local, remote, path$4, options) ?? diffArraysByPosition(local, remote, path$4, options);
|
|
87093
87332
|
}
|
|
87094
87333
|
function buildFieldDiffs(local, remote, options = {}) {
|
|
87095
87334
|
return diffValues(local, remote, [], options);
|
|
87096
87335
|
}
|
|
87097
|
-
function formatFieldPath(path$
|
|
87098
|
-
if (path$
|
|
87336
|
+
function formatFieldPath(path$4) {
|
|
87337
|
+
if (path$4.length === 0) return "(root)";
|
|
87099
87338
|
let result = "";
|
|
87100
|
-
for (const segment of path$
|
|
87339
|
+
for (const segment of path$4) {
|
|
87101
87340
|
switch (segment.type) {
|
|
87102
87341
|
case "property":
|
|
87103
87342
|
result += result ? `.${segment.key}` : segment.key;
|
|
@@ -87134,8 +87373,8 @@ function findChangedFieldPaths(local, remote, prefix = "") {
|
|
|
87134
87373
|
const changes = [];
|
|
87135
87374
|
const allKeys = new Set([...Object.keys(local), ...Object.keys(remote)]);
|
|
87136
87375
|
for (const key of allKeys) {
|
|
87137
|
-
const path$
|
|
87138
|
-
if (!equal(local[key], remote[key])) changes.push(path$
|
|
87376
|
+
const path$4 = prefix ? `${prefix}.${key}` : key;
|
|
87377
|
+
if (!equal(local[key], remote[key])) changes.push(path$4);
|
|
87139
87378
|
}
|
|
87140
87379
|
return changes;
|
|
87141
87380
|
}
|
|
@@ -87458,6 +87697,7 @@ function classifyPage(localPage, remotePage, options, blockSummary) {
|
|
|
87458
87697
|
type: "create",
|
|
87459
87698
|
identifier: localPage.identifier,
|
|
87460
87699
|
blocks: blockDiffs$1,
|
|
87700
|
+
remoteBlockIdentifiers: [],
|
|
87461
87701
|
statusChange: determineStatusChange(localPage.status, undefined)
|
|
87462
87702
|
};
|
|
87463
87703
|
}
|
|
@@ -87478,6 +87718,7 @@ function classifyPage(localPage, remotePage, options, blockSummary) {
|
|
|
87478
87718
|
identifier: localPage.identifier,
|
|
87479
87719
|
changes: changes.length > 0 ? changes : undefined,
|
|
87480
87720
|
blocks: blockDiffs,
|
|
87721
|
+
remoteBlockIdentifiers: (remotePage.blocks ?? []).map((block) => block.identifier),
|
|
87481
87722
|
statusChange: statusChange$1
|
|
87482
87723
|
};
|
|
87483
87724
|
}
|
|
@@ -89207,7 +89448,6 @@ function mapEventRunToComparable(run) {
|
|
|
89207
89448
|
categoryRef: run.categoryRef,
|
|
89208
89449
|
formRef: run.formRef,
|
|
89209
89450
|
settings: run.settings,
|
|
89210
|
-
presentation: run.presentation,
|
|
89211
89451
|
tags: run.tags
|
|
89212
89452
|
};
|
|
89213
89453
|
}
|
|
@@ -91105,7 +91345,6 @@ function normalizeRemoteRun(run) {
|
|
|
91105
91345
|
categoryRef: run.categoryRef,
|
|
91106
91346
|
formRef: run.formRef,
|
|
91107
91347
|
settings: run.settings,
|
|
91108
|
-
presentation: run.presentation,
|
|
91109
91348
|
tags: [...run.tags]
|
|
91110
91349
|
};
|
|
91111
91350
|
}
|
|
@@ -91126,7 +91365,6 @@ function normalizeLocalRun(local, remote) {
|
|
|
91126
91365
|
categoryRef: overrideWhenDefined(local.categoryRef, base.categoryRef, normalizeNullableString),
|
|
91127
91366
|
formRef: overrideWhenDefined(local.formRef, base.formRef, normalizeNullableString),
|
|
91128
91367
|
settings: overrideWhenDefined(local.settings, base.settings, (value) => isRecord$11(value) ? value : {}),
|
|
91129
|
-
presentation: overrideWhenDefined(local.presentation, base.presentation, (value) => isRecord$11(value) ? value : null),
|
|
91130
91368
|
tags: overrideWhenDefined(local.tags, base.tags, (value) => Array.isArray(value) ? value : [])
|
|
91131
91369
|
};
|
|
91132
91370
|
}
|
|
@@ -91175,7 +91413,6 @@ function normalizeLocalEventGraph(graph, remote) {
|
|
|
91175
91413
|
categoryRef: run.categoryRef ?? null,
|
|
91176
91414
|
formRef: run.formRef ?? null,
|
|
91177
91415
|
settings: run.settings ?? {},
|
|
91178
|
-
presentation: run.presentation ?? null,
|
|
91179
91416
|
tags: run.tags ?? [],
|
|
91180
91417
|
createdAt: "",
|
|
91181
91418
|
updatedAt: ""
|
|
@@ -92221,10 +92458,6 @@ function buildEventSeriesCommand(event, run, schedule, offer) {
|
|
|
92221
92458
|
occurrences: schedule.occurrences,
|
|
92222
92459
|
content: eventContent(event.content),
|
|
92223
92460
|
settings: run.settings,
|
|
92224
|
-
presentation: deriveEventPresentation({
|
|
92225
|
-
storedPresentation: run.presentation ?? null,
|
|
92226
|
-
allowLegacyTitleInput: true
|
|
92227
|
-
}),
|
|
92228
92461
|
tags: run.tags,
|
|
92229
92462
|
blocks: event.blocks
|
|
92230
92463
|
}
|
|
@@ -92473,7 +92706,6 @@ function eventRunUpsertInput(command, eventIdentifier) {
|
|
|
92473
92706
|
categoryRef: preferredRef(input.categoryIdentifier, input.categoryRef),
|
|
92474
92707
|
formRef: preferredRef(input.formIdentifier, input.formRef),
|
|
92475
92708
|
settings: input.settings,
|
|
92476
|
-
presentation: input.presentation,
|
|
92477
92709
|
tags: input.tags ? [...input.tags] : undefined
|
|
92478
92710
|
};
|
|
92479
92711
|
}
|
|
@@ -93503,10 +93735,10 @@ function validateBlockContent(data, manifest, customFields) {
|
|
|
93503
93735
|
const admission = admitManifestContentForWrite(compileManifestContentContract(normalizedFields), data);
|
|
93504
93736
|
if (admission.ok) return [];
|
|
93505
93737
|
if (admission.error.kind === "non_portable_media") {
|
|
93506
|
-
return admission.error.paths.map((path$
|
|
93738
|
+
return admission.error.paths.map((path$4) => ({
|
|
93507
93739
|
type: "invalid_content",
|
|
93508
|
-
field: path$
|
|
93509
|
-
message: `Invalid content in "${path$
|
|
93740
|
+
field: path$4 || "(root)",
|
|
93741
|
+
message: `Invalid content in "${path$4 || "(root)"}": Media content contains environment-specific fields`
|
|
93510
93742
|
}));
|
|
93511
93743
|
}
|
|
93512
93744
|
const requiredIds = extractRequiredFieldIds(normalizedFields);
|
|
@@ -93628,6 +93860,8 @@ function sdkCustomBlockManifest(block) {
|
|
|
93628
93860
|
function compilePageBlockCommands(input) {
|
|
93629
93861
|
const changedBlockDiffs = (input.pageDiff.blocks ?? []).filter((blockDiff) => blockDiff.type !== "unchanged");
|
|
93630
93862
|
if (changedBlockDiffs.length === 0) return ok(emptyPageBlockCommandCompileFragment());
|
|
93863
|
+
const membership = validateReorderMembership(input.pageDiff, input.localPage);
|
|
93864
|
+
if (!membership.ok) return membership;
|
|
93631
93865
|
const localBlocks = input.localPage.blocks ?? [];
|
|
93632
93866
|
const blockLookup = new Map(localBlocks.map((block) => [unsafeAsCliBlockIdentifier(block.identifier), block]));
|
|
93633
93867
|
const commandBindings = [];
|
|
@@ -93806,41 +94040,72 @@ function emptyPageBlockCommandCompileFragment() {
|
|
|
93806
94040
|
warnings: []
|
|
93807
94041
|
};
|
|
93808
94042
|
}
|
|
94043
|
+
/** Validate the selected writes before any page mutation executes. */
|
|
94044
|
+
function validateReorderMembership(diff, page) {
|
|
94045
|
+
if (!diff.blocks?.some((block) => block.type === "reorder")) return ok(undefined);
|
|
94046
|
+
const remote = diff.remoteBlockIdentifiers;
|
|
94047
|
+
if (!remote) return ok(undefined);
|
|
94048
|
+
const deleted = new Set(diff.blocks.filter((block) => block.type === "delete").map((block) => block.identifier));
|
|
94049
|
+
const created = diff.blocks.filter((block) => block.type === "create").map((block) => block.identifier);
|
|
94050
|
+
const finalIds = new Set([...remote.filter((id) => !deleted.has(id)), ...created]);
|
|
94051
|
+
const requested = new Set((page.blocks ?? []).map((block) => block.identifier));
|
|
94052
|
+
const missing = [...finalIds].filter((id) => !requested.has(id));
|
|
94053
|
+
const unavailable = [...requested].filter((id) => !finalIds.has(id));
|
|
94054
|
+
if (missing.length === 0 && unavailable.length === 0) return ok(undefined);
|
|
94055
|
+
return err({
|
|
94056
|
+
code: "incomplete_block_order",
|
|
94057
|
+
identifier: unsafeAsCliPageIdentifier(page.identifier),
|
|
94058
|
+
message: `Cannot reorder ${page.identifier}: ${[...missing.length ? [`include or select deletion of blocks: ${missing.join(", ")}`] : [], ...unavailable.length ? [`select creation of blocks: ${unavailable.join(", ")}`] : []].join("; ")}. No changes were applied.`
|
|
94059
|
+
});
|
|
94060
|
+
}
|
|
93809
94061
|
|
|
93810
94062
|
//#endregion
|
|
93811
94063
|
//#region src/site-commands/pageCommandExecution.ts
|
|
93812
94064
|
async function executePageCommandPlan(input) {
|
|
93813
94065
|
return executeCliCommandPlan({
|
|
93814
94066
|
commands: input.plan.commands,
|
|
93815
|
-
applyCommand:
|
|
93816
|
-
switch (command.type) {
|
|
93817
|
-
case "upsertPage": return (await input.client.pages.upsert({
|
|
93818
|
-
identifier: pageIdentifierForCommand(command),
|
|
93819
|
-
title: command.input.title,
|
|
93820
|
-
path: pagePathForCommand(command),
|
|
93821
|
-
seoTitle: command.input.seoTitle,
|
|
93822
|
-
seoDescription: command.input.seoDescription
|
|
93823
|
-
})).effect;
|
|
93824
|
-
case "upsertPageBlock": {
|
|
93825
|
-
const result = await input.client.blocks.upsert(pageIdentifierForBlockCommand(command), {
|
|
93826
|
-
identifier: blockIdentifierForCommand(command),
|
|
93827
|
-
kind: command.input.type,
|
|
93828
|
-
data: command.input.props ?? {}
|
|
93829
|
-
});
|
|
93830
|
-
input.onWarnings?.((result.warnings ?? []).map((warning) => `${warning.field}: ${warning.message}`));
|
|
93831
|
-
return result.effect;
|
|
93832
|
-
}
|
|
93833
|
-
case "deletePageBlock": return (await input.client.blocks.delete(pageIdentifierForBlockCommand(command), blockIdentifierForCommand(command))).effect;
|
|
93834
|
-
case "reorderPageBlocks":
|
|
93835
|
-
await input.client.blocks.reorder(pageIdentifierForBlockCommand(command), [...blockOrderIdentifiersForCommand(command)]);
|
|
93836
|
-
return null;
|
|
93837
|
-
case "publishPage": return (await input.client.pages.publish(pageIdentifierForCommand(command))).effect;
|
|
93838
|
-
case "unpublishPage": return (await input.client.pages.unpublish(pageIdentifierForCommand(command))).effect;
|
|
93839
|
-
default: assertNever(command);
|
|
93840
|
-
}
|
|
93841
|
-
}
|
|
94067
|
+
applyCommand: (command) => applyPageCommand(input, command)
|
|
93842
94068
|
});
|
|
93843
94069
|
}
|
|
94070
|
+
async function applyPageCommand(input, command) {
|
|
94071
|
+
switch (command.type) {
|
|
94072
|
+
case "upsertPage": return (await input.client.pages.upsert({
|
|
94073
|
+
identifier: pageIdentifierForCommand(command),
|
|
94074
|
+
title: command.input.title,
|
|
94075
|
+
path: pagePathForCommand(command),
|
|
94076
|
+
seoTitle: command.input.seoTitle,
|
|
94077
|
+
seoDescription: command.input.seoDescription
|
|
94078
|
+
})).effect;
|
|
94079
|
+
case "publishPage": return (await input.client.pages.publish(pageIdentifierForCommand(command))).effect;
|
|
94080
|
+
case "unpublishPage": return (await input.client.pages.unpublish(pageIdentifierForCommand(command))).effect;
|
|
94081
|
+
case "upsertPageBlock":
|
|
94082
|
+
case "deletePageBlock":
|
|
94083
|
+
case "reorderPageBlocks": return applyPageBlockCommand(input, command);
|
|
94084
|
+
default: return assertNever(command);
|
|
94085
|
+
}
|
|
94086
|
+
}
|
|
94087
|
+
async function applyPageBlockCommand(input, command) {
|
|
94088
|
+
const result = await mutatePageBlock(input, command);
|
|
94089
|
+
if (result.designSyncWarning) input.onWarnings?.([result.designSyncWarning.message]);
|
|
94090
|
+
return result.effect;
|
|
94091
|
+
}
|
|
94092
|
+
async function mutatePageBlock(input, command) {
|
|
94093
|
+
const pageIdentifier = pageIdentifierForBlockCommand(command);
|
|
94094
|
+
switch (command.type) {
|
|
94095
|
+
case "upsertPageBlock": {
|
|
94096
|
+
const result = await input.client.blocks.upsert(pageIdentifier, {
|
|
94097
|
+
identifier: blockIdentifierForCommand(command),
|
|
94098
|
+
kind: command.input.type,
|
|
94099
|
+
data: command.input.props ?? {}
|
|
94100
|
+
});
|
|
94101
|
+
input.onWarnings?.((result.warnings ?? []).map((warning) => `${warning.field}: ${warning.message}`));
|
|
94102
|
+
return result;
|
|
94103
|
+
}
|
|
94104
|
+
case "deletePageBlock": return input.client.blocks.delete(pageIdentifier, blockIdentifierForCommand(command));
|
|
94105
|
+
case "reorderPageBlocks": return input.client.blocks.reorder(pageIdentifier, [...blockOrderIdentifiersForCommand(command)]);
|
|
94106
|
+
default: return assertNever(command);
|
|
94107
|
+
}
|
|
94108
|
+
}
|
|
93844
94109
|
async function executePageCommandPlanAsReport(input) {
|
|
93845
94110
|
const runtimeWarnings = [];
|
|
93846
94111
|
const report = await executeCompiledCliCommandPlanAsReport({
|
|
@@ -93974,6 +94239,7 @@ function preflightPageCommandPlanAsReport(input) {
|
|
|
93974
94239
|
}
|
|
93975
94240
|
function preflightFailureFromPageCompileError(input) {
|
|
93976
94241
|
switch (input.error.code) {
|
|
94242
|
+
case "incomplete_block_order":
|
|
93977
94243
|
case "missing_local_page": return {
|
|
93978
94244
|
outcome: {
|
|
93979
94245
|
status: "preflight_failed",
|
|
@@ -94104,7 +94370,6 @@ function emptyPageCommandCompileFragment() {
|
|
|
94104
94370
|
}
|
|
94105
94371
|
function incrementPageSuccess(result, subject, effect) {
|
|
94106
94372
|
if (!effect) {
|
|
94107
|
-
if (subject.resource === "block" && subject.counter === "reordered") return;
|
|
94108
94373
|
throw new Error(`Missing command effect for ${subject.resource} ${subject.identifier}.`);
|
|
94109
94374
|
}
|
|
94110
94375
|
switch (subject.resource) {
|
|
@@ -94133,6 +94398,7 @@ function incrementPageSuccess(result, subject, effect) {
|
|
|
94133
94398
|
}
|
|
94134
94399
|
return;
|
|
94135
94400
|
case "block":
|
|
94401
|
+
if (subject.counter === "reordered") return;
|
|
94136
94402
|
switch (effect.kind) {
|
|
94137
94403
|
case "created":
|
|
94138
94404
|
result.blocks.created++;
|
|
@@ -95346,6 +95612,18 @@ async function findCommonStaleItems(localSource, remote, force) {
|
|
|
95346
95612
|
}
|
|
95347
95613
|
async function prepareCommonPushOperations(input, source) {
|
|
95348
95614
|
const preparedLocal = applyStaleContentSnapshot(source.filteredLocal, source.remote, source.staleItems);
|
|
95615
|
+
const kindChange = findPageBlockKindChange(input.scope, preparedLocal.pages, source.remote.pages);
|
|
95616
|
+
if (kindChange) return preparationError("preflight-failed", kindChange);
|
|
95617
|
+
const content = await prepareCommonPushContent(input, source, preparedLocal);
|
|
95618
|
+
if (!("media" in content)) return content;
|
|
95619
|
+
const bookingPlan = findCompiledBookingSettingsPlan(content.compiled);
|
|
95620
|
+
const bookingPreview = bookingPlan ? await executeBookingSettingsPreview(input.client, bookingPlan, source.remote.meta.settingsUpdatedAt) : undefined;
|
|
95621
|
+
return {
|
|
95622
|
+
...content,
|
|
95623
|
+
...bookingPreview ? { bookingPreview } : {}
|
|
95624
|
+
};
|
|
95625
|
+
}
|
|
95626
|
+
async function prepareCommonPushContent(input, source, preparedLocal) {
|
|
95349
95627
|
const media$1 = await prepareLocalMediaForPush({
|
|
95350
95628
|
contentDir: source.contentDir,
|
|
95351
95629
|
content: preparedLocal,
|
|
@@ -95370,17 +95648,25 @@ async function prepareCommonPushOperations(input, source) {
|
|
|
95370
95648
|
if (!preflight.ok || contentPushExecutionReportHasFailures(preflight.report)) {
|
|
95371
95649
|
return preparationError("preflight-failed", "Content push command preflight failed.", preflight.report);
|
|
95372
95650
|
}
|
|
95373
|
-
const bookingPlan = findCompiledBookingSettingsPlan(preflight.compiled);
|
|
95374
|
-
const bookingPreview = bookingPlan ? await executeBookingSettingsPreview(input.client, bookingPlan, source.remote.meta.settingsUpdatedAt) : undefined;
|
|
95375
95651
|
return {
|
|
95376
95652
|
media: media$1,
|
|
95377
95653
|
filteredLocal: media$1.content,
|
|
95378
95654
|
diff,
|
|
95379
95655
|
preflight: preflight.report,
|
|
95380
|
-
compiled: preflight.compiled
|
|
95381
|
-
...bookingPreview ? { bookingPreview } : {}
|
|
95656
|
+
compiled: preflight.compiled
|
|
95382
95657
|
};
|
|
95383
95658
|
}
|
|
95659
|
+
function findPageBlockKindChange(scope, localPages, remotePages) {
|
|
95660
|
+
if (scope !== "all" && scope !== "pages") return undefined;
|
|
95661
|
+
const remoteByPage = new Map(remotePages.map((page) => [page.identifier, page]));
|
|
95662
|
+
return localPages.flatMap((page) => {
|
|
95663
|
+
const remoteBlocks = new Map(remoteByPage.get(page.identifier)?.blocks.map((block) => [block.identifier, block.kind]) ?? []);
|
|
95664
|
+
return (page.blocks ?? []).flatMap((block) => {
|
|
95665
|
+
const currentKind = remoteBlocks.get(block.identifier);
|
|
95666
|
+
return currentKind && currentKind !== block.kind ? [`${page.identifier}/${block.identifier}: This block already uses ${currentKind}. To use ${block.kind}, create a block with a new identifier, then remove this one.`] : [];
|
|
95667
|
+
});
|
|
95668
|
+
})[0];
|
|
95669
|
+
}
|
|
95384
95670
|
async function executeBookingSettingsPreview(client, compiled, expectedRevision) {
|
|
95385
95671
|
const command = requireSingleBookingCommand(compiled);
|
|
95386
95672
|
if (!command.ok) throw command.error;
|
|
@@ -95831,7 +96117,7 @@ function firstNestedContainerChange(localChanges, remoteChanges) {
|
|
|
95831
96117
|
}
|
|
95832
96118
|
function firstSameFieldConflictPath(localChanges, remoteChanges) {
|
|
95833
96119
|
const remotePaths = new Set(remoteChanges.keys());
|
|
95834
|
-
return [...localChanges.keys()].filter((path$
|
|
96120
|
+
return [...localChanges.keys()].filter((path$4) => remotePaths.has(path$4)).sort()[0] ?? null;
|
|
95835
96121
|
}
|
|
95836
96122
|
function scalarMergeChanges(changes, label) {
|
|
95837
96123
|
return [...changes.values()].map((change) => {
|
|
@@ -95847,11 +96133,11 @@ function mergeValueKind(value) {
|
|
|
95847
96133
|
if (typeof value === "object") return "object";
|
|
95848
96134
|
return "scalar";
|
|
95849
96135
|
}
|
|
95850
|
-
function mergeChange(path$
|
|
96136
|
+
function mergeChange(path$4, value, containerKind) {
|
|
95851
96137
|
switch (containerKind) {
|
|
95852
96138
|
case "array":
|
|
95853
96139
|
if (Array.isArray(value)) return {
|
|
95854
|
-
path: path$
|
|
96140
|
+
path: path$4,
|
|
95855
96141
|
value,
|
|
95856
96142
|
containerKind
|
|
95857
96143
|
};
|
|
@@ -95859,7 +96145,7 @@ function mergeChange(path$3, value, containerKind) {
|
|
|
95859
96145
|
case "object":
|
|
95860
96146
|
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
95861
96147
|
return {
|
|
95862
|
-
path: path$
|
|
96148
|
+
path: path$4,
|
|
95863
96149
|
value,
|
|
95864
96150
|
containerKind
|
|
95865
96151
|
};
|
|
@@ -95867,20 +96153,20 @@ function mergeChange(path$3, value, containerKind) {
|
|
|
95867
96153
|
break;
|
|
95868
96154
|
case "null":
|
|
95869
96155
|
if (value === null || value === undefined) return {
|
|
95870
|
-
path: path$
|
|
96156
|
+
path: path$4,
|
|
95871
96157
|
value,
|
|
95872
96158
|
containerKind
|
|
95873
96159
|
};
|
|
95874
96160
|
break;
|
|
95875
96161
|
case "scalar":
|
|
95876
96162
|
if (isScalarMergeChangeValue(value)) return {
|
|
95877
|
-
path: path$
|
|
96163
|
+
path: path$4,
|
|
95878
96164
|
value,
|
|
95879
96165
|
containerKind
|
|
95880
96166
|
};
|
|
95881
96167
|
break;
|
|
95882
96168
|
}
|
|
95883
|
-
throw new Error(`Invalid merge change at ${path$
|
|
96169
|
+
throw new Error(`Invalid merge change at ${path$4}.`);
|
|
95884
96170
|
}
|
|
95885
96171
|
function isScalarMergeChangeValue(value) {
|
|
95886
96172
|
return value === undefined || value === null || [
|
|
@@ -96230,13 +96516,13 @@ function setPath(target, pathParts, value) {
|
|
|
96230
96516
|
}
|
|
96231
96517
|
setPath(target[head], rest, value);
|
|
96232
96518
|
}
|
|
96233
|
-
function expectStringValue$1(path$
|
|
96519
|
+
function expectStringValue$1(path$4, value) {
|
|
96234
96520
|
if (typeof value === "string") return value;
|
|
96235
|
-
throw new Error(`Entry merge expected ${path$
|
|
96521
|
+
throw new Error(`Entry merge expected ${path$4} to be a string.`);
|
|
96236
96522
|
}
|
|
96237
|
-
function expectBooleanValue$1(path$
|
|
96523
|
+
function expectBooleanValue$1(path$4, value) {
|
|
96238
96524
|
if (typeof value === "boolean") return value;
|
|
96239
|
-
throw new Error(`Entry merge expected ${path$
|
|
96525
|
+
throw new Error(`Entry merge expected ${path$4} to be a boolean.`);
|
|
96240
96526
|
}
|
|
96241
96527
|
function expectStatusValue$1(value) {
|
|
96242
96528
|
if (value === "draft" || value === "published") return value;
|
|
@@ -96988,13 +97274,13 @@ function setPagePath(page, pathParts, value) {
|
|
|
96988
97274
|
default: throw new Error(`Unsupported page merge path: ${pathParts.join(".")}`);
|
|
96989
97275
|
}
|
|
96990
97276
|
}
|
|
96991
|
-
function expectStringValue(path$
|
|
97277
|
+
function expectStringValue(path$4, value) {
|
|
96992
97278
|
if (typeof value === "string") return value;
|
|
96993
|
-
throw new Error(`Page merge expected ${path$
|
|
97279
|
+
throw new Error(`Page merge expected ${path$4} to be a string.`);
|
|
96994
97280
|
}
|
|
96995
|
-
function expectBooleanValue(path$
|
|
97281
|
+
function expectBooleanValue(path$4, value) {
|
|
96996
97282
|
if (typeof value === "boolean") return value;
|
|
96997
|
-
throw new Error(`Page merge expected ${path$
|
|
97283
|
+
throw new Error(`Page merge expected ${path$4} to be a boolean.`);
|
|
96998
97284
|
}
|
|
96999
97285
|
function expectStatusValue(value) {
|
|
97000
97286
|
if (value === "draft" || value === "published") return value;
|
|
@@ -103424,7 +103710,7 @@ async function loadConfig(configPath, output) {
|
|
|
103424
103710
|
return { errorMessage: "No config path provided." };
|
|
103425
103711
|
}
|
|
103426
103712
|
try {
|
|
103427
|
-
const { loadConfigFile: loadConfigFile$1 } = await import("../load-config-
|
|
103713
|
+
const { loadConfigFile: loadConfigFile$1 } = await import("../load-config-BfEYgU02.mjs");
|
|
103428
103714
|
const rawConfig = await loadConfigFile$1(configPath);
|
|
103429
103715
|
const parsed = riverbankSiteConfigSchema.safeParse(rawConfig);
|
|
103430
103716
|
if (!parsed.success) {
|
|
@@ -103610,7 +103896,7 @@ async function loadDeployConfig() {
|
|
|
103610
103896
|
}
|
|
103611
103897
|
async function checkWorkingDirectoryClean(git, prebuildOutput) {
|
|
103612
103898
|
const status = await git.status();
|
|
103613
|
-
const dirtyFiles = status.files.map((file) => file.path).filter((path$
|
|
103899
|
+
const dirtyFiles = status.files.map((file) => file.path).filter((path$4) => !isPathInside(path$4, prebuildOutput));
|
|
103614
103900
|
return {
|
|
103615
103901
|
clean: dirtyFiles.length === 0,
|
|
103616
103902
|
dirtyFiles
|
|
@@ -104638,25 +104924,25 @@ function mapMediaGuardDiagnosticsToAuditIssues(diagnostics) {
|
|
|
104638
104924
|
* Extract all embed block references from content data recursively.
|
|
104639
104925
|
* Exported for testing.
|
|
104640
104926
|
*/
|
|
104641
|
-
function extractEmbedReferences(data, path$
|
|
104927
|
+
function extractEmbedReferences(data, path$4 = []) {
|
|
104642
104928
|
const refs = [];
|
|
104643
104929
|
if (!data || typeof data !== "object") return refs;
|
|
104644
104930
|
if (Array.isArray(data)) {
|
|
104645
104931
|
data.forEach((item, index) => {
|
|
104646
|
-
refs.push(...extractEmbedReferences(item, [...path$
|
|
104932
|
+
refs.push(...extractEmbedReferences(item, [...path$4, String(index)]));
|
|
104647
104933
|
});
|
|
104648
104934
|
return refs;
|
|
104649
104935
|
}
|
|
104650
104936
|
const obj = data;
|
|
104651
104937
|
if (obj.kind === "embed" && typeof obj.contentType === "string" && typeof obj.identifier === "string") {
|
|
104652
104938
|
refs.push({
|
|
104653
|
-
path: path$
|
|
104939
|
+
path: path$4.join("."),
|
|
104654
104940
|
contentType: obj.contentType,
|
|
104655
104941
|
identifier: obj.identifier
|
|
104656
104942
|
});
|
|
104657
104943
|
}
|
|
104658
104944
|
for (const [key, value] of Object.entries(obj)) {
|
|
104659
|
-
refs.push(...extractEmbedReferences(value, [...path$
|
|
104945
|
+
refs.push(...extractEmbedReferences(value, [...path$4, key]));
|
|
104660
104946
|
}
|
|
104661
104947
|
return refs;
|
|
104662
104948
|
}
|
|
@@ -107057,8 +107343,8 @@ function parseContentFieldPath(value) {
|
|
|
107057
107343
|
path: segments
|
|
107058
107344
|
};
|
|
107059
107345
|
}
|
|
107060
|
-
function formatContentFieldPath(path$
|
|
107061
|
-
return formatFieldPath(path$
|
|
107346
|
+
function formatContentFieldPath(path$4) {
|
|
107347
|
+
return formatFieldPath(path$4);
|
|
107062
107348
|
}
|
|
107063
107349
|
|
|
107064
107350
|
//#endregion
|
|
@@ -107121,8 +107407,8 @@ function changedPlan(operation, before, after) {
|
|
|
107121
107407
|
operation,
|
|
107122
107408
|
before,
|
|
107123
107409
|
after,
|
|
107124
|
-
changes: buildFieldChanges(pageDiffRecord(after), pageDiffRecord(before), { identifyArrayItem: ({ path: path$
|
|
107125
|
-
const last = path$
|
|
107410
|
+
changes: buildFieldChanges(pageDiffRecord(after), pageDiffRecord(before), { identifyArrayItem: ({ path: path$4, item }) => {
|
|
107411
|
+
const last = path$4[path$4.length - 1];
|
|
107126
107412
|
if (last?.type !== "property" || last.key !== "blocks") return null;
|
|
107127
107413
|
return blockIdentifier(item);
|
|
107128
107414
|
} })
|
|
@@ -107208,11 +107494,11 @@ function normalizeBlockPositions(blocks) {
|
|
|
107208
107494
|
block.position = index;
|
|
107209
107495
|
});
|
|
107210
107496
|
}
|
|
107211
|
-
function setFieldPath(target, path$
|
|
107497
|
+
function setFieldPath(target, path$4, value) {
|
|
107212
107498
|
let current = target;
|
|
107213
|
-
for (let index = 0; index < path$
|
|
107214
|
-
const segment = path$
|
|
107215
|
-
const isLast = index === path$
|
|
107499
|
+
for (let index = 0; index < path$4.length; index++) {
|
|
107500
|
+
const segment = path$4[index];
|
|
107501
|
+
const isLast = index === path$4.length - 1;
|
|
107216
107502
|
if (!segment) return {
|
|
107217
107503
|
ok: false,
|
|
107218
107504
|
error: "Invalid empty path segment."
|
|
@@ -107221,7 +107507,7 @@ function setFieldPath(target, path$3, value) {
|
|
|
107221
107507
|
if (!isRecord$7(current)) {
|
|
107222
107508
|
return {
|
|
107223
107509
|
ok: false,
|
|
107224
|
-
error: `Cannot set ${formatContentFieldPath(path$
|
|
107510
|
+
error: `Cannot set ${formatContentFieldPath(path$4)} because ${segment.key} is not inside an object.`
|
|
107225
107511
|
};
|
|
107226
107512
|
}
|
|
107227
107513
|
if (isLast) {
|
|
@@ -110075,8 +110361,8 @@ async function reclaimExpiredClaim(claimPath, at, staleLockMs, probeProcess, own
|
|
|
110075
110361
|
if (!isMissing$2(error$1)) throw error$1;
|
|
110076
110362
|
});
|
|
110077
110363
|
}
|
|
110078
|
-
async function reclaimStale(path$
|
|
110079
|
-
const claimPath = `${path$
|
|
110364
|
+
async function reclaimStale(path$4, at, staleLockMs, probeProcess, ownerIdentity, randomNonce) {
|
|
110365
|
+
const claimPath = `${path$4}.reclaim`;
|
|
110080
110366
|
let claim;
|
|
110081
110367
|
let claimOwned = false;
|
|
110082
110368
|
try {
|
|
@@ -110093,17 +110379,17 @@ async function reclaimStale(path$3, at, staleLockMs, probeProcess, ownerIdentity
|
|
|
110093
110379
|
claim = undefined;
|
|
110094
110380
|
let stats;
|
|
110095
110381
|
try {
|
|
110096
|
-
stats = await lstat(path$
|
|
110382
|
+
stats = await lstat(path$4);
|
|
110097
110383
|
} catch (error$1) {
|
|
110098
110384
|
return isMissing$2(error$1);
|
|
110099
110385
|
}
|
|
110100
|
-
const raw = await readFile(path$
|
|
110386
|
+
const raw = await readFile(path$4, "utf8").catch(() => null);
|
|
110101
110387
|
const metadata = raw === null ? null : parseMetadata(raw);
|
|
110102
110388
|
const createdAt = metadata?.createdAt ?? stats.mtimeMs;
|
|
110103
110389
|
if (at - createdAt < staleLockMs || !metadata || isUnknownIdentity(metadata)) return false;
|
|
110104
110390
|
const probe = await probeProcess(metadata);
|
|
110105
110391
|
if (probe !== "dead" && probe !== "different_instance") return false;
|
|
110106
|
-
await unlink$1(path$
|
|
110392
|
+
await unlink$1(path$4).catch((error$1) => {
|
|
110107
110393
|
if (!isMissing$2(error$1)) throw error$1;
|
|
110108
110394
|
});
|
|
110109
110395
|
return true;
|
|
@@ -110140,7 +110426,7 @@ function createFilesystemOwnerLock(options) {
|
|
|
110140
110426
|
return ownerIdentityPromise;
|
|
110141
110427
|
};
|
|
110142
110428
|
return { async acquire(key, timeoutMs) {
|
|
110143
|
-
const path$
|
|
110429
|
+
const path$4 = options.keyToPath(key);
|
|
110144
110430
|
const boundedTimeout = Math.max(0, timeoutMs);
|
|
110145
110431
|
const deadline = now() + boundedTimeout;
|
|
110146
110432
|
try {
|
|
@@ -110155,7 +110441,7 @@ function createFilesystemOwnerLock(options) {
|
|
|
110155
110441
|
...identity
|
|
110156
110442
|
};
|
|
110157
110443
|
try {
|
|
110158
|
-
handle = await open(path$
|
|
110444
|
+
handle = await open(path$4, "wx", LOCK_FILE_MODE);
|
|
110159
110445
|
await handle.writeFile(JSON.stringify(metadata), "utf8");
|
|
110160
110446
|
await handle.sync();
|
|
110161
110447
|
await handle.close();
|
|
@@ -110164,10 +110450,10 @@ function createFilesystemOwnerLock(options) {
|
|
|
110164
110450
|
const lockHandle = { release: async () => {
|
|
110165
110451
|
if (released) return;
|
|
110166
110452
|
released = true;
|
|
110167
|
-
const current = await readFile(path$
|
|
110453
|
+
const current = await readFile(path$4, "utf8").catch(() => null);
|
|
110168
110454
|
const parsed = current === null ? null : parseMetadata(current);
|
|
110169
110455
|
if (!parsed || parsed.pid !== metadata.pid || parsed.host !== metadata.host || parsed.instance !== metadata.instance || parsed.nonce !== metadata.nonce) return;
|
|
110170
|
-
await unlink$1(path$
|
|
110456
|
+
await unlink$1(path$4).catch((error$1) => {
|
|
110171
110457
|
if (!isMissing$2(error$1)) throw error$1;
|
|
110172
110458
|
});
|
|
110173
110459
|
} };
|
|
@@ -110179,7 +110465,7 @@ function createFilesystemOwnerLock(options) {
|
|
|
110179
110465
|
if (handle) await handle.close().catch(() => undefined);
|
|
110180
110466
|
if (!isAlreadyExists(error$1)) return { tag: "failed" };
|
|
110181
110467
|
const at = now();
|
|
110182
|
-
if (await reclaimStale(path$
|
|
110468
|
+
if (await reclaimStale(path$4, at, staleLockMs, probeProcess, identity, randomNonce)) continue;
|
|
110183
110469
|
if (at >= deadline) return { tag: "busy" };
|
|
110184
110470
|
await sleep(Math.min(50, Math.max(1, deadline - at)));
|
|
110185
110471
|
}
|
|
@@ -110316,9 +110602,9 @@ function isMissing$1(error$1) {
|
|
|
110316
110602
|
function hasOwnerOnlyMode(stats, expected) {
|
|
110317
110603
|
return (stats.mode & 511) === expected && (stats.mode & 63) === 0;
|
|
110318
110604
|
}
|
|
110319
|
-
async function provePermissions(platform, getUid, permissionProbe, path$
|
|
110605
|
+
async function provePermissions(platform, getUid, permissionProbe, path$4, kind, stats) {
|
|
110320
110606
|
if (platform === "windows") {
|
|
110321
|
-
if (!permissionProbe || !await permissionProbe(path$
|
|
110607
|
+
if (!permissionProbe || !await permissionProbe(path$4, kind)) {
|
|
110322
110608
|
throw new PermissionError("current-user ACL proof unavailable");
|
|
110323
110609
|
}
|
|
110324
110610
|
return;
|
|
@@ -110347,16 +110633,16 @@ async function secureDirectory(options, platform, getUid) {
|
|
|
110347
110633
|
function credentialPath(rootDir, key) {
|
|
110348
110634
|
return join(rootDir, `${credentialStoreIdentity(key)}.json`);
|
|
110349
110635
|
}
|
|
110350
|
-
async function secureFile(path$
|
|
110351
|
-
const stats = await lstat(path$
|
|
110636
|
+
async function secureFile(path$4, platform, getUid, permissionProbe) {
|
|
110637
|
+
const stats = await lstat(path$4);
|
|
110352
110638
|
if (!stats.isFile()) throw new PermissionError("credential path is not a regular file");
|
|
110353
|
-
await provePermissions(platform, getUid, permissionProbe, path$
|
|
110639
|
+
await provePermissions(platform, getUid, permissionProbe, path$4, "file", stats);
|
|
110354
110640
|
}
|
|
110355
|
-
async function proveRemovableFile(path$
|
|
110356
|
-
const stats = await lstat(path$
|
|
110641
|
+
async function proveRemovableFile(path$4, platform, getUid, permissionProbe) {
|
|
110642
|
+
const stats = await lstat(path$4);
|
|
110357
110643
|
if (!stats.isFile()) throw new PermissionError("credential path is not a regular file");
|
|
110358
110644
|
if (platform === "windows") {
|
|
110359
|
-
if (!permissionProbe || !await permissionProbe(path$
|
|
110645
|
+
if (!permissionProbe || !await permissionProbe(path$4, "file")) {
|
|
110360
110646
|
throw new PermissionError("current-user ACL proof unavailable");
|
|
110361
110647
|
}
|
|
110362
110648
|
return;
|
|
@@ -110376,14 +110662,14 @@ function createPermissionLockedCredentialStore(options) {
|
|
|
110376
110662
|
async load(key) {
|
|
110377
110663
|
try {
|
|
110378
110664
|
await secureDirectory(options, platform, getUid);
|
|
110379
|
-
const path$
|
|
110665
|
+
const path$4 = options.pathFor?.(key) ?? credentialPath(options.rootDir, key);
|
|
110380
110666
|
try {
|
|
110381
|
-
await secureFile(path$
|
|
110667
|
+
await secureFile(path$4, platform, getUid, options.permissionProbe);
|
|
110382
110668
|
} catch (error$1) {
|
|
110383
110669
|
if (isMissing$1(error$1)) return { tag: "missing" };
|
|
110384
110670
|
throw error$1;
|
|
110385
110671
|
}
|
|
110386
|
-
const raw = await readFile(path$
|
|
110672
|
+
const raw = await readFile(path$4, "utf8");
|
|
110387
110673
|
const parsed = parseStoredAccountCredential(raw);
|
|
110388
110674
|
return parsed.ok ? {
|
|
110389
110675
|
tag: "found",
|
|
@@ -110455,14 +110741,14 @@ function createPermissionLockedCredentialStore(options) {
|
|
|
110455
110741
|
async remove(key) {
|
|
110456
110742
|
try {
|
|
110457
110743
|
await secureDirectory(options, platform, getUid);
|
|
110458
|
-
const path$
|
|
110744
|
+
const path$4 = options.pathFor?.(key) ?? credentialPath(options.rootDir, key);
|
|
110459
110745
|
try {
|
|
110460
|
-
await proveRemovableFile(path$
|
|
110746
|
+
await proveRemovableFile(path$4, platform, getUid, options.permissionProbe);
|
|
110461
110747
|
} catch (error$1) {
|
|
110462
110748
|
if (isMissing$1(error$1)) return { tag: "missing" };
|
|
110463
110749
|
throw error$1;
|
|
110464
110750
|
}
|
|
110465
|
-
await unlink$1(path$
|
|
110751
|
+
await unlink$1(path$4);
|
|
110466
110752
|
return { tag: "removed" };
|
|
110467
110753
|
} catch (error$1) {
|
|
110468
110754
|
if (error$1 instanceof PermissionError) {
|
|
@@ -111459,9 +111745,9 @@ async function requestIdentity(state, access$1) {
|
|
|
111459
111745
|
...parsed.data.email ? { email: parsed.data.email } : {}
|
|
111460
111746
|
});
|
|
111461
111747
|
}
|
|
111462
|
-
async function requestNoContent(state, path$
|
|
111748
|
+
async function requestNoContent(state, path$4, access$1, init, operation) {
|
|
111463
111749
|
try {
|
|
111464
|
-
const response = await state.fetcher(endpoint(state, path$
|
|
111750
|
+
const response = await state.fetcher(endpoint(state, path$4), {
|
|
111465
111751
|
...init,
|
|
111466
111752
|
headers: {
|
|
111467
111753
|
...authHeaders(state, access$1),
|
|
@@ -111509,8 +111795,8 @@ function providerErrorCode(payload) {
|
|
|
111509
111795
|
parsed.data.code
|
|
111510
111796
|
].filter((value) => typeof value === "string").join(" ").toLowerCase();
|
|
111511
111797
|
}
|
|
111512
|
-
function endpoint(state, path$
|
|
111513
|
-
return `${state.baseUrl}${path$
|
|
111798
|
+
function endpoint(state, path$4) {
|
|
111799
|
+
return `${state.baseUrl}${path$4}`;
|
|
111514
111800
|
}
|
|
111515
111801
|
function parseBaseUrl(value, environment) {
|
|
111516
111802
|
if (value.length === 0 || value.length > MAX_ISSUER_LENGTH) return null;
|
|
@@ -113067,16 +113353,16 @@ function projectNameFromPath(projectPath) {
|
|
|
113067
113353
|
return value.length > 0 ? value.slice(0, 120) : "Riverbank project";
|
|
113068
113354
|
}
|
|
113069
113355
|
function parseProjectConfigPath(value, projectPath) {
|
|
113070
|
-
return parseTarget(value, projectPath, CONFIG_FILENAME, (path$
|
|
113356
|
+
return parseTarget(value, projectPath, CONFIG_FILENAME, (path$4) => path$4);
|
|
113071
113357
|
}
|
|
113072
113358
|
function parseProjectEnvPath(value, projectPath) {
|
|
113073
|
-
return parseTarget(value, projectPath, ENV_FILENAME, (path$
|
|
113359
|
+
return parseTarget(value, projectPath, ENV_FILENAME, (path$4) => path$4);
|
|
113074
113360
|
}
|
|
113075
113361
|
function parseProjectGitignorePath(value, projectPath) {
|
|
113076
|
-
return parseTarget(value, projectPath, GITIGNORE_FILENAME, (path$
|
|
113362
|
+
return parseTarget(value, projectPath, GITIGNORE_FILENAME, (path$4) => path$4);
|
|
113077
113363
|
}
|
|
113078
113364
|
function parseProjectLinkagePath(value, projectPath) {
|
|
113079
|
-
return parseTarget(value, projectPath, LINKAGE_FILENAME, (path$
|
|
113365
|
+
return parseTarget(value, projectPath, LINKAGE_FILENAME, (path$4) => path$4);
|
|
113080
113366
|
}
|
|
113081
113367
|
function isRecord$6(value) {
|
|
113082
113368
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
@@ -114897,6 +115183,7 @@ const allowedPathPrefixes = [
|
|
|
114897
115183
|
"/sites/{siteId}/bookings/person-records",
|
|
114898
115184
|
"/sites/{siteId}/bookings/waitlist-entries",
|
|
114899
115185
|
"/sites/{siteId}/content",
|
|
115186
|
+
"/sites/{siteId}/edit-leases",
|
|
114900
115187
|
"/sites/{siteId}/content-types",
|
|
114901
115188
|
"/sites/{siteId}/routes",
|
|
114902
115189
|
"/sites/{siteId}/settings/general",
|
|
@@ -115041,11 +115328,11 @@ function matchesClassificationRule(descriptor, rule$2) {
|
|
|
115041
115328
|
function isDashboardSiteMutation(descriptor) {
|
|
115042
115329
|
return descriptor.auth === "user" && mutatingMethods.includes(descriptor.method) && descriptor.path.includes("{siteId}");
|
|
115043
115330
|
}
|
|
115044
|
-
function pathContainsAnySegmentSequence(path$
|
|
115045
|
-
return fragments.some((fragment) => pathContainsSegmentSequence(path$
|
|
115331
|
+
function pathContainsAnySegmentSequence(path$4, fragments) {
|
|
115332
|
+
return fragments.some((fragment) => pathContainsSegmentSequence(path$4, fragment));
|
|
115046
115333
|
}
|
|
115047
|
-
function pathContainsSegmentSequence(path$
|
|
115048
|
-
const pathSegments = path$
|
|
115334
|
+
function pathContainsSegmentSequence(path$4, fragment) {
|
|
115335
|
+
const pathSegments = path$4.split("/").filter(Boolean);
|
|
115049
115336
|
const fragmentSegments = fragment.split("/").filter(Boolean);
|
|
115050
115337
|
if (fragmentSegments.length === 0) {
|
|
115051
115338
|
return false;
|
|
@@ -115742,11 +116029,11 @@ const DEFAULT_LAUNCH_READINESS_INPUT = {
|
|
|
115742
116029
|
publicContact: { kind: "missing" },
|
|
115743
116030
|
overrides: []
|
|
115744
116031
|
};
|
|
115745
|
-
function makeDashboardPath(siteId, path$
|
|
116032
|
+
function makeDashboardPath(siteId, path$4) {
|
|
115746
116033
|
if (!siteId) {
|
|
115747
116034
|
return null;
|
|
115748
116035
|
}
|
|
115749
|
-
return `/dashboard/sites/${siteId}${path$
|
|
116036
|
+
return `/dashboard/sites/${siteId}${path$4}`;
|
|
115750
116037
|
}
|
|
115751
116038
|
function informationalAction(label) {
|
|
115752
116039
|
return {
|
|
@@ -115754,8 +116041,8 @@ function informationalAction(label) {
|
|
|
115754
116041
|
label
|
|
115755
116042
|
};
|
|
115756
116043
|
}
|
|
115757
|
-
function openDashboardPathAction(siteId, path$
|
|
115758
|
-
const dashboardPath = makeDashboardPath(siteId, path$
|
|
116044
|
+
function openDashboardPathAction(siteId, path$4, label) {
|
|
116045
|
+
const dashboardPath = makeDashboardPath(siteId, path$4);
|
|
115759
116046
|
if (!dashboardPath) {
|
|
115760
116047
|
return informationalAction(label);
|
|
115761
116048
|
}
|
|
@@ -115765,7 +116052,7 @@ function openDashboardPathAction(siteId, path$3, label) {
|
|
|
115765
116052
|
path: dashboardPath
|
|
115766
116053
|
};
|
|
115767
116054
|
}
|
|
115768
|
-
function appendQueryString(path$
|
|
116055
|
+
function appendQueryString(path$4, query) {
|
|
115769
116056
|
const params = new URLSearchParams();
|
|
115770
116057
|
for (const [key, value] of Object.entries(query)) {
|
|
115771
116058
|
if (value) {
|
|
@@ -115773,7 +116060,7 @@ function appendQueryString(path$3, query) {
|
|
|
115773
116060
|
}
|
|
115774
116061
|
}
|
|
115775
116062
|
const queryString = params.toString();
|
|
115776
|
-
return queryString ? `${path$
|
|
116063
|
+
return queryString ? `${path$4}?${queryString}` : path$4;
|
|
115777
116064
|
}
|
|
115778
116065
|
function evidenceFromDerivedState(state) {
|
|
115779
116066
|
return state === "complete" ? { kind: "derived" } : {
|
|
@@ -115901,7 +116188,7 @@ function appointmentsRequirements(context, input) {
|
|
|
115901
116188
|
if (appointments.kind === "disabled") return [];
|
|
115902
116189
|
const override = appointmentsOverrideFor(context, input);
|
|
115903
116190
|
const state = appointments.kind === "ready" ? "complete" : "pending";
|
|
115904
|
-
const path$
|
|
116191
|
+
const path$4 = appointments.kind === "pending_setup" ? appendQueryString("/bookings/appointments/setup", {
|
|
115905
116192
|
step: appointments.targetStep,
|
|
115906
116193
|
returnTo: "launch"
|
|
115907
116194
|
}) : "/bookings/services";
|
|
@@ -115916,7 +116203,7 @@ function appointmentsRequirements(context, input) {
|
|
|
115916
116203
|
owner: "admin",
|
|
115917
116204
|
title: "Configure appointments",
|
|
115918
116205
|
description: appointmentsDescription(appointments, override),
|
|
115919
|
-
action: openDashboardPathAction(context.siteId, path$
|
|
116206
|
+
action: openDashboardPathAction(context.siteId, path$4, "Set up appointments"),
|
|
115920
116207
|
secondaryAction: appointmentsSecondaryAction(context, appointments, override),
|
|
115921
116208
|
evidence
|
|
115922
116209
|
};
|
|
@@ -116976,8 +117263,8 @@ function serializeSiteBannerDraft(value) {
|
|
|
116976
117263
|
}
|
|
116977
117264
|
};
|
|
116978
117265
|
}
|
|
116979
|
-
function toDraftIssuePath(path$
|
|
116980
|
-
const sanitized = path$
|
|
117266
|
+
function toDraftIssuePath(path$4) {
|
|
117267
|
+
const sanitized = path$4.flatMap((segment) => typeof segment === "string" || typeof segment === "number" ? [segment] : []);
|
|
116981
117268
|
return sanitized.length > 0 ? sanitized : ["body"];
|
|
116982
117269
|
}
|
|
116983
117270
|
function paragraphTextLength(paragraph) {
|
|
@@ -117391,92 +117678,6 @@ async function updateContentEntryContent(apiClient, { siteId, type, entryId, bod
|
|
|
117391
117678
|
return normalizeApiError(error$1, "Failed to update content entry content");
|
|
117392
117679
|
}
|
|
117393
117680
|
}
|
|
117394
|
-
async function mutateContentEntryUnified(apiClient, { siteId, type, entryId, metadata, content, options }) {
|
|
117395
|
-
let entryDetail;
|
|
117396
|
-
try {
|
|
117397
|
-
entryDetail = unwrapResponse(await apiClient({
|
|
117398
|
-
endpoint: "getContentEntry",
|
|
117399
|
-
params: {
|
|
117400
|
-
siteId,
|
|
117401
|
-
type,
|
|
117402
|
-
entryId
|
|
117403
|
-
},
|
|
117404
|
-
options
|
|
117405
|
-
}));
|
|
117406
|
-
} catch (error$1) {
|
|
117407
|
-
return normalizeApiError(error$1, "Failed to load content entry");
|
|
117408
|
-
}
|
|
117409
|
-
const routeId = entryDetail.entry.route?.id;
|
|
117410
|
-
if (metadata && routeId) {
|
|
117411
|
-
const routePayload = {};
|
|
117412
|
-
if (metadata.title !== undefined) routePayload.draftTitle = metadata.title;
|
|
117413
|
-
if (metadata.slug !== undefined) routePayload.draftSlug = metadata.slug;
|
|
117414
|
-
if (metadata.metaTitle !== undefined) routePayload.draftMetaTitle = metadata.metaTitle;
|
|
117415
|
-
if (metadata.metaDescription !== undefined) routePayload.draftMetaDescription = metadata.metaDescription;
|
|
117416
|
-
if (metadata.status !== undefined) routePayload.draftStatus = metadata.status;
|
|
117417
|
-
if (metadata.publishAt !== undefined) routePayload.scheduledPublishAt = metadata.publishAt;
|
|
117418
|
-
if (metadata.ogImageId !== undefined) routePayload.ogImageId = metadata.ogImageId;
|
|
117419
|
-
if (Object.keys(routePayload).length > 0) {
|
|
117420
|
-
try {
|
|
117421
|
-
await unwrapResponse(await apiClient({
|
|
117422
|
-
endpoint: "updateRouteMetadata",
|
|
117423
|
-
params: {
|
|
117424
|
-
siteId,
|
|
117425
|
-
routeId
|
|
117426
|
-
},
|
|
117427
|
-
body: routePayload,
|
|
117428
|
-
options
|
|
117429
|
-
}));
|
|
117430
|
-
} catch (error$1) {
|
|
117431
|
-
return normalizeApiError(error$1, "Failed to update content entry metadata");
|
|
117432
|
-
}
|
|
117433
|
-
}
|
|
117434
|
-
}
|
|
117435
|
-
if (content) {
|
|
117436
|
-
const optimisticHash = content.optimistic_hash ?? undefined;
|
|
117437
|
-
try {
|
|
117438
|
-
if ("data" in content) {
|
|
117439
|
-
await updateContentEntryContent(apiClient, {
|
|
117440
|
-
siteId,
|
|
117441
|
-
type,
|
|
117442
|
-
entryId,
|
|
117443
|
-
body: {
|
|
117444
|
-
data: content.data,
|
|
117445
|
-
optimistic_hash: optimisticHash
|
|
117446
|
-
},
|
|
117447
|
-
options
|
|
117448
|
-
});
|
|
117449
|
-
} else if ("path" in content && "value" in content) {
|
|
117450
|
-
await updateContentEntryContent(apiClient, {
|
|
117451
|
-
siteId,
|
|
117452
|
-
type,
|
|
117453
|
-
entryId,
|
|
117454
|
-
body: {
|
|
117455
|
-
path: content.path,
|
|
117456
|
-
value: content.value,
|
|
117457
|
-
optimistic_hash: optimisticHash
|
|
117458
|
-
},
|
|
117459
|
-
options
|
|
117460
|
-
});
|
|
117461
|
-
}
|
|
117462
|
-
} catch (error$1) {
|
|
117463
|
-
return normalizeApiError(error$1, "Failed to update content entry content");
|
|
117464
|
-
}
|
|
117465
|
-
}
|
|
117466
|
-
try {
|
|
117467
|
-
return unwrapResponse(await apiClient({
|
|
117468
|
-
endpoint: "getContentEntry",
|
|
117469
|
-
params: {
|
|
117470
|
-
siteId,
|
|
117471
|
-
type,
|
|
117472
|
-
entryId
|
|
117473
|
-
},
|
|
117474
|
-
options
|
|
117475
|
-
}));
|
|
117476
|
-
} catch (error$1) {
|
|
117477
|
-
return normalizeApiError(error$1, "Failed to load content entry");
|
|
117478
|
-
}
|
|
117479
|
-
}
|
|
117480
117681
|
async function listPublishedEntries(apiClient, { siteId, type, limit, offset, order, stage, meta, mode, entryIds, options }) {
|
|
117481
117682
|
const params = {
|
|
117482
117683
|
endpoint: "listPublishedEntries",
|
|
@@ -117584,7 +117785,20 @@ const blocksKeys = {
|
|
|
117584
117785
|
siteId,
|
|
117585
117786
|
pageId
|
|
117586
117787
|
],
|
|
117587
|
-
item: (blockId) => ["block", blockId]
|
|
117788
|
+
item: (blockId) => ["block", blockId],
|
|
117789
|
+
entrySlots: (siteId, typeKey, entryId) => [
|
|
117790
|
+
"page-content-slots",
|
|
117791
|
+
siteId,
|
|
117792
|
+
"contentEntry",
|
|
117793
|
+
typeKey,
|
|
117794
|
+
entryId
|
|
117795
|
+
],
|
|
117796
|
+
surfaceSlots: (siteId, pageSurfaceId) => [
|
|
117797
|
+
"page-content-slots",
|
|
117798
|
+
siteId,
|
|
117799
|
+
"pageSurface",
|
|
117800
|
+
pageSurfaceId
|
|
117801
|
+
]
|
|
117588
117802
|
};
|
|
117589
117803
|
|
|
117590
117804
|
//#endregion
|
|
@@ -117861,10 +118075,10 @@ function toPageRecord(response) {
|
|
|
117861
118075
|
}
|
|
117862
118076
|
return entry;
|
|
117863
118077
|
}
|
|
117864
|
-
async function createPage(apiClient, { siteId, name, path: path$
|
|
118078
|
+
async function createPage(apiClient, { siteId, name, path: path$4, purpose, options }) {
|
|
117865
118079
|
const body = {};
|
|
117866
118080
|
if (typeof name === "string") body.name = name;
|
|
117867
|
-
if (typeof path$
|
|
118081
|
+
if (typeof path$4 === "string") body.path = path$4;
|
|
117868
118082
|
if (typeof purpose === "string") body.purpose = purpose;
|
|
117869
118083
|
try {
|
|
117870
118084
|
const data = unwrapResponse(await apiClient({
|
|
@@ -117897,6 +118111,7 @@ async function discardPageDraft(apiClient, { siteId, pageId, options }) {
|
|
|
117897
118111
|
entryId: pageId,
|
|
117898
118112
|
options
|
|
117899
118113
|
});
|
|
118114
|
+
if (!(result.blockState.kind === "page")) throw new Error("Expected a page discard response");
|
|
117900
118115
|
return { page: toPageRecord(result) };
|
|
117901
118116
|
}
|
|
117902
118117
|
async function savePageDesignState(apiClient, { siteId, pageId, body, options }) {
|
|
@@ -118756,19 +118971,17 @@ async function createBillingPortalSession(apiClient, options) {
|
|
|
118756
118971
|
return normalizeApiError(error$1, "Failed to open billing details");
|
|
118757
118972
|
}
|
|
118758
118973
|
}
|
|
118759
|
-
async function billingCheckout(apiClient, { attemptId, planId,
|
|
118974
|
+
async function billingCheckout(apiClient, { attemptId, planId, continuation, options }) {
|
|
118760
118975
|
try {
|
|
118761
118976
|
return unwrapResponse(await apiClient({
|
|
118762
118977
|
endpoint: "billingCheckout",
|
|
118763
118978
|
body: continuation ? {
|
|
118764
118979
|
attemptId,
|
|
118765
118980
|
planId,
|
|
118766
|
-
interval,
|
|
118767
118981
|
continuation
|
|
118768
118982
|
} : {
|
|
118769
118983
|
attemptId,
|
|
118770
|
-
planId
|
|
118771
|
-
interval
|
|
118984
|
+
planId
|
|
118772
118985
|
},
|
|
118773
118986
|
options
|
|
118774
118987
|
}));
|
|
@@ -119693,16 +119906,16 @@ function isUnsafeFileTarget(stats) {
|
|
|
119693
119906
|
return stats.isSymbolicLink() || !stats.isFile();
|
|
119694
119907
|
}
|
|
119695
119908
|
/** Read an optional project-local file without following an unsafe target. */
|
|
119696
|
-
async function readSafeFile(path$
|
|
119909
|
+
async function readSafeFile(path$4) {
|
|
119697
119910
|
try {
|
|
119698
|
-
const stats = await lstat(path$
|
|
119911
|
+
const stats = await lstat(path$4);
|
|
119699
119912
|
if (isUnsafeFileTarget(stats)) return {
|
|
119700
119913
|
ok: false,
|
|
119701
119914
|
error: "unsafe_target"
|
|
119702
119915
|
};
|
|
119703
119916
|
return {
|
|
119704
119917
|
ok: true,
|
|
119705
|
-
value: await readFile(path$
|
|
119918
|
+
value: await readFile(path$4, "utf8")
|
|
119706
119919
|
};
|
|
119707
119920
|
} catch (error$1) {
|
|
119708
119921
|
if (isMissing(error$1)) return {
|
|
@@ -119715,9 +119928,9 @@ async function readSafeFile(path$3) {
|
|
|
119715
119928
|
};
|
|
119716
119929
|
}
|
|
119717
119930
|
}
|
|
119718
|
-
async function targetIsSafe(path$
|
|
119931
|
+
async function targetIsSafe(path$4) {
|
|
119719
119932
|
try {
|
|
119720
|
-
const stats = await lstat(path$
|
|
119933
|
+
const stats = await lstat(path$4);
|
|
119721
119934
|
return !isUnsafeFileTarget(stats);
|
|
119722
119935
|
} catch (error$1) {
|
|
119723
119936
|
if (isMissing(error$1)) return true;
|
|
@@ -119740,30 +119953,30 @@ async function syncDirectory(directory) {
|
|
|
119740
119953
|
* temporary file. Existing symlinks and non-regular files are rejected so a
|
|
119741
119954
|
* project-local write cannot follow an attacker-controlled target.
|
|
119742
119955
|
*/
|
|
119743
|
-
async function writeFileAtomic(path$
|
|
119956
|
+
async function writeFileAtomic(path$4, content, options = {}) {
|
|
119744
119957
|
const mode = options.mode ?? 384;
|
|
119745
119958
|
const randomSuffix = options.randomSuffix ?? (() => `${process.pid}-${Date.now()}-${randomUUID()}`);
|
|
119746
|
-
const parent = dirname$1(path$
|
|
119959
|
+
const parent = dirname$1(path$4);
|
|
119747
119960
|
let handle;
|
|
119748
119961
|
let temporaryPath;
|
|
119749
119962
|
try {
|
|
119750
119963
|
if (options.ensureParent === true) {
|
|
119751
119964
|
await mkdir(parent, { recursive: true });
|
|
119752
119965
|
}
|
|
119753
|
-
if (!await targetIsSafe(path$
|
|
119966
|
+
if (!await targetIsSafe(path$4)) {
|
|
119754
119967
|
return {
|
|
119755
119968
|
ok: false,
|
|
119756
119969
|
error: { tag: "unsafe_target" }
|
|
119757
119970
|
};
|
|
119758
119971
|
}
|
|
119759
|
-
temporaryPath = join(parent, `.${basename(path$
|
|
119972
|
+
temporaryPath = join(parent, `.${basename(path$4)}.${randomSuffix()}.tmp`);
|
|
119760
119973
|
handle = await open(temporaryPath, "wx", mode);
|
|
119761
119974
|
await handle.writeFile(content, "utf8");
|
|
119762
119975
|
await handle.sync();
|
|
119763
119976
|
await handle.close();
|
|
119764
119977
|
handle = undefined;
|
|
119765
119978
|
await chmod(temporaryPath, mode);
|
|
119766
|
-
await rename(temporaryPath, path$
|
|
119979
|
+
await rename(temporaryPath, path$4);
|
|
119767
119980
|
temporaryPath = undefined;
|
|
119768
119981
|
await syncDirectory(parent);
|
|
119769
119982
|
return { ok: true };
|
|
@@ -119820,9 +120033,9 @@ function parseState(value, statePath) {
|
|
|
119820
120033
|
});
|
|
119821
120034
|
}
|
|
119822
120035
|
const receipts = {};
|
|
119823
|
-
for (const [path$
|
|
119824
|
-
const pathResult = canonicalRecoveryProjectPath(path$
|
|
119825
|
-
if (!pathResult.ok || pathResult.value !== path$
|
|
120036
|
+
for (const [path$4, valueForPath] of Object.entries(value.receipts)) {
|
|
120037
|
+
const pathResult = canonicalRecoveryProjectPath(path$4);
|
|
120038
|
+
if (!pathResult.ok || pathResult.value !== path$4) return err({
|
|
119826
120039
|
tag: "state_malformed",
|
|
119827
120040
|
path: statePath
|
|
119828
120041
|
});
|
|
@@ -119831,7 +120044,7 @@ function parseState(value, statePath) {
|
|
|
119831
120044
|
tag: "state_malformed",
|
|
119832
120045
|
path: statePath
|
|
119833
120046
|
});
|
|
119834
|
-
receipts[path$
|
|
120047
|
+
receipts[path$4] = parsed.value;
|
|
119835
120048
|
}
|
|
119836
120049
|
return ok({
|
|
119837
120050
|
version: RECOVERY_RECEIPT_VERSION,
|
|
@@ -119866,7 +120079,7 @@ async function readState(stateDirectory) {
|
|
|
119866
120079
|
async function writeState(stateDirectory, state) {
|
|
119867
120080
|
const raw = `${JSON.stringify({
|
|
119868
120081
|
version: state.version,
|
|
119869
|
-
receipts: Object.fromEntries(Object.entries(state.receipts).map(([path$
|
|
120082
|
+
receipts: Object.fromEntries(Object.entries(state.receipts).map(([path$4, receipt]) => [path$4, serializeRecoveryReceipt(receipt)]))
|
|
119870
120083
|
}, null, 2)}\n`;
|
|
119871
120084
|
const result = await writeFileAtomic(recoveryReceiptStatePath(stateDirectory), raw, {
|
|
119872
120085
|
ensureParent: true,
|
|
@@ -119899,9 +120112,9 @@ async function saveRecoveryReceiptState(stateDirectory, receipt, now) {
|
|
|
119899
120112
|
const prunedReceipts = pruneRecoveryReceipts(Object.values(before), now);
|
|
119900
120113
|
const retained = new Set(prunedReceipts.map((item) => item.projectPath));
|
|
119901
120114
|
const pruned = [];
|
|
119902
|
-
for (const path$
|
|
119903
|
-
if (retained.has(path$
|
|
119904
|
-
const parsedPath = canonicalRecoveryProjectPath(path$
|
|
120115
|
+
for (const path$4 of Object.keys(before)) {
|
|
120116
|
+
if (retained.has(path$4)) continue;
|
|
120117
|
+
const parsedPath = canonicalRecoveryProjectPath(path$4);
|
|
119905
120118
|
if (!parsedPath.ok) return parsedPath;
|
|
119906
120119
|
pruned.push(recoveryReceiptKey(parsedPath.value));
|
|
119907
120120
|
}
|
|
@@ -120135,8 +120348,8 @@ function parseSerializedLinkage(raw) {
|
|
|
120135
120348
|
* parent/target is a normal first-link state; an existing non-directory parent
|
|
120136
120349
|
* or non-regular target is never safe to read or replace.
|
|
120137
120350
|
*/
|
|
120138
|
-
async function readExistingLinkage(path$
|
|
120139
|
-
const parent = dirname$1(path$
|
|
120351
|
+
async function readExistingLinkage(path$4) {
|
|
120352
|
+
const parent = dirname$1(path$4);
|
|
120140
120353
|
try {
|
|
120141
120354
|
const parentStats = await lstat(parent);
|
|
120142
120355
|
if (parentStats.isSymbolicLink() || !parentStats.isDirectory()) {
|
|
@@ -120155,16 +120368,16 @@ async function readExistingLinkage(path$3) {
|
|
|
120155
120368
|
error: { tag: "read_failed" }
|
|
120156
120369
|
};
|
|
120157
120370
|
}
|
|
120158
|
-
const target = await readSafeFile(path$
|
|
120371
|
+
const target = await readSafeFile(path$4);
|
|
120159
120372
|
return target.ok ? target : {
|
|
120160
120373
|
ok: false,
|
|
120161
120374
|
error: { tag: target.error }
|
|
120162
120375
|
};
|
|
120163
120376
|
}
|
|
120164
|
-
async function writeProjectLinkage(path$
|
|
120377
|
+
async function writeProjectLinkage(path$4, linkage) {
|
|
120165
120378
|
const serialized = serializeProjectLinkage(linkage);
|
|
120166
120379
|
if (!serialized.ok) return serialized;
|
|
120167
|
-
const existingResult = await readExistingLinkage(path$
|
|
120380
|
+
const existingResult = await readExistingLinkage(path$4);
|
|
120168
120381
|
if (!existingResult.ok) return existingResult;
|
|
120169
120382
|
const existing = existingResult.value;
|
|
120170
120383
|
if (existing !== null) {
|
|
@@ -120183,12 +120396,12 @@ async function writeProjectLinkage(path$3, linkage) {
|
|
|
120183
120396
|
return {
|
|
120184
120397
|
ok: true,
|
|
120185
120398
|
value: {
|
|
120186
|
-
path: path$
|
|
120399
|
+
path: path$4,
|
|
120187
120400
|
changed: false
|
|
120188
120401
|
}
|
|
120189
120402
|
};
|
|
120190
120403
|
}
|
|
120191
|
-
const written = await writeFileAtomic(path$
|
|
120404
|
+
const written = await writeFileAtomic(path$4, serialized.value, {
|
|
120192
120405
|
ensureParent: true,
|
|
120193
120406
|
mode: 384
|
|
120194
120407
|
});
|
|
@@ -120202,13 +120415,13 @@ async function writeProjectLinkage(path$3, linkage) {
|
|
|
120202
120415
|
return {
|
|
120203
120416
|
ok: true,
|
|
120204
120417
|
value: {
|
|
120205
|
-
path: path$
|
|
120418
|
+
path: path$4,
|
|
120206
120419
|
changed: true
|
|
120207
120420
|
}
|
|
120208
120421
|
};
|
|
120209
120422
|
}
|
|
120210
|
-
async function readProjectLinkage(path$
|
|
120211
|
-
const rawResult = await readExistingLinkage(path$
|
|
120423
|
+
async function readProjectLinkage(path$4) {
|
|
120424
|
+
const rawResult = await readExistingLinkage(path$4);
|
|
120212
120425
|
if (!rawResult.ok) return rawResult;
|
|
120213
120426
|
if (rawResult.value === null) return {
|
|
120214
120427
|
ok: true,
|
|
@@ -120410,8 +120623,8 @@ function renderEnvMergePlan(plan, render) {
|
|
|
120410
120623
|
content
|
|
120411
120624
|
};
|
|
120412
120625
|
}
|
|
120413
|
-
async function readEnvFile(path$
|
|
120414
|
-
return readSafeFile(path$
|
|
120626
|
+
async function readEnvFile(path$4) {
|
|
120627
|
+
return readSafeFile(path$4);
|
|
120415
120628
|
}
|
|
120416
120629
|
/**
|
|
120417
120630
|
* Read, plan, render, and atomically write one project env file. The caller's
|
|
@@ -120536,8 +120749,8 @@ function planGitignoreEnvRule(existingContent) {
|
|
|
120536
120749
|
function renderGitignorePlan(plan) {
|
|
120537
120750
|
return plan.action.tag === "unchanged" ? plan.existingContent ?? "" : appendGitignoreRule(plan.existingContent ?? "", plan.action.rule);
|
|
120538
120751
|
}
|
|
120539
|
-
async function readGitignoreTarget(path$
|
|
120540
|
-
const result = await readSafeFile(path$
|
|
120752
|
+
async function readGitignoreTarget(path$4) {
|
|
120753
|
+
const result = await readSafeFile(path$4);
|
|
120541
120754
|
return result.ok ? result : {
|
|
120542
120755
|
ok: false,
|
|
120543
120756
|
error: { tag: result.error }
|
|
@@ -120548,8 +120761,8 @@ async function readGitignoreTarget(path$3) {
|
|
|
120548
120761
|
* read and again by the atomic writer, so an existing symlink is never
|
|
120549
120762
|
* followed—even when its contents already appear equivalent.
|
|
120550
120763
|
*/
|
|
120551
|
-
async function writeGitignoreEnvRule(path$
|
|
120552
|
-
const existing = await readGitignoreTarget(path$
|
|
120764
|
+
async function writeGitignoreEnvRule(path$4) {
|
|
120765
|
+
const existing = await readGitignoreTarget(path$4);
|
|
120553
120766
|
if (!existing.ok) return existing;
|
|
120554
120767
|
const plan = planGitignoreEnvRule(existing.value);
|
|
120555
120768
|
if (!plan.ok) return plan;
|
|
@@ -120557,13 +120770,13 @@ async function writeGitignoreEnvRule(path$3) {
|
|
|
120557
120770
|
return {
|
|
120558
120771
|
ok: true,
|
|
120559
120772
|
value: {
|
|
120560
|
-
path: path$
|
|
120773
|
+
path: path$4,
|
|
120561
120774
|
changed: false,
|
|
120562
120775
|
action: plan.value.action
|
|
120563
120776
|
}
|
|
120564
120777
|
};
|
|
120565
120778
|
}
|
|
120566
|
-
const written = await writeFileAtomic(path$
|
|
120779
|
+
const written = await writeFileAtomic(path$4, renderGitignorePlan(plan.value), {
|
|
120567
120780
|
ensureParent: true,
|
|
120568
120781
|
mode: 420
|
|
120569
120782
|
});
|
|
@@ -120585,7 +120798,7 @@ async function writeGitignoreEnvRule(path$3) {
|
|
|
120585
120798
|
return {
|
|
120586
120799
|
ok: true,
|
|
120587
120800
|
value: {
|
|
120588
|
-
path: path$
|
|
120801
|
+
path: path$4,
|
|
120589
120802
|
changed: true,
|
|
120590
120803
|
action: plan.value.action
|
|
120591
120804
|
}
|
|
@@ -120857,8 +121070,8 @@ function classifyObservedLink(input, target, linkage, values) {
|
|
|
120857
121070
|
}
|
|
120858
121071
|
return hasCredential ? { tag: "unsafe_overwrite" } : { tag: "empty" };
|
|
120859
121072
|
}
|
|
120860
|
-
async function readObservedEnvironment(path$
|
|
120861
|
-
const content = await readEnvFile(path$
|
|
121073
|
+
async function readObservedEnvironment(path$4) {
|
|
121074
|
+
const content = await readEnvFile(path$4);
|
|
120862
121075
|
if (!content.ok) return err({ tag: "project_inspection_failed" });
|
|
120863
121076
|
const parsed = parseEnvironmentValues(content.value ?? "");
|
|
120864
121077
|
return parsed.ok ? ok({
|
|
@@ -121283,15 +121496,15 @@ async function chooseSite(deps, sites) {
|
|
|
121283
121496
|
return selected.site;
|
|
121284
121497
|
}
|
|
121285
121498
|
function dashboardRevokeGuidance(siteId, dashboardUrl) {
|
|
121286
|
-
const path$
|
|
121287
|
-
if (dashboardUrl === undefined) return { path: path$
|
|
121499
|
+
const path$4 = `/dashboard/sites/${siteId}/settings/api-keys`;
|
|
121500
|
+
if (dashboardUrl === undefined) return { path: path$4 };
|
|
121288
121501
|
try {
|
|
121289
121502
|
return {
|
|
121290
|
-
path: path$
|
|
121291
|
-
url: new URL(path$
|
|
121503
|
+
path: path$4,
|
|
121504
|
+
url: new URL(path$4, dashboardUrl).toString()
|
|
121292
121505
|
};
|
|
121293
121506
|
} catch {
|
|
121294
|
-
return { path: path$
|
|
121507
|
+
return { path: path$4 };
|
|
121295
121508
|
}
|
|
121296
121509
|
}
|
|
121297
121510
|
function recoveryCleanupSuggestion(receipt, guidance, manualCleanupKeyIds = undefined) {
|
|
@@ -121963,9 +122176,9 @@ function acceptanceTarballPath(environment, name) {
|
|
|
121963
122176
|
const value = environment[name]?.trim();
|
|
121964
122177
|
return value && value.length > 0 ? value : undefined;
|
|
121965
122178
|
}
|
|
121966
|
-
function validAcceptanceTarballPath(path$
|
|
122179
|
+
function validAcceptanceTarballPath(path$4) {
|
|
121967
122180
|
try {
|
|
121968
|
-
return isAbsolute$1(path$
|
|
122181
|
+
return isAbsolute$1(path$4) && extname(path$4) === ".tgz" && existsSync(path$4) && statSync(path$4).isFile();
|
|
121969
122182
|
} catch {
|
|
121970
122183
|
return false;
|
|
121971
122184
|
}
|
|
@@ -122106,9 +122319,9 @@ function preflightInitTarget(input, filesystem, resume) {
|
|
|
122106
122319
|
}
|
|
122107
122320
|
function productionFilesystem() {
|
|
122108
122321
|
return {
|
|
122109
|
-
inspect(path$
|
|
122322
|
+
inspect(path$4) {
|
|
122110
122323
|
try {
|
|
122111
|
-
const stat = lstatSync(path$
|
|
122324
|
+
const stat = lstatSync(path$4);
|
|
122112
122325
|
if (stat.isDirectory()) return "directory";
|
|
122113
122326
|
if (stat.isFile()) return "file";
|
|
122114
122327
|
return "other";
|
|
@@ -122117,9 +122330,9 @@ function productionFilesystem() {
|
|
|
122117
122330
|
throw error$1;
|
|
122118
122331
|
}
|
|
122119
122332
|
},
|
|
122120
|
-
listDirectory: (path$
|
|
122121
|
-
mkdir: (path$
|
|
122122
|
-
writeFile: (path$
|
|
122333
|
+
listDirectory: (path$4) => readdirSync(path$4),
|
|
122334
|
+
mkdir: (path$4) => mkdirSync(path$4, { recursive: true }),
|
|
122335
|
+
writeFile: (path$4, content, executable) => writeFileSync(path$4, content, { mode: executable ? 493 : 420 })
|
|
122123
122336
|
};
|
|
122124
122337
|
}
|
|
122125
122338
|
function productionProcess() {
|