@riverbankcms/sdk 0.119.0 → 0.123.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/{PreviewEditorSidebar-C7TXFitV.mjs → PreviewEditorSidebar-DvJFmC29.mjs} +6 -6
  2. package/dist/{PreviewEditorUI-_1JIHTXS.mjs → PreviewEditorUI-DVHP4bCo.mjs} +3 -3
  3. package/dist/{PreviewQueryProvider-nKUT4TL-.mjs → PreviewQueryProvider-07EE4uWL.mjs} +1 -1
  4. package/dist/{SdkPreviewModeRuntime-CvJTVgWa.mjs → SdkPreviewModeRuntime-BE5eFayo.mjs} +5 -5
  5. package/dist/{SiteChromeCustomizeContext-66QfCbAS.mjs → SiteChromeCustomizeContext-4hn4A0HX.mjs} +3 -3
  6. package/dist/_dts/ai/src/contracts/proposals.d.ts +0 -72
  7. package/dist/_dts/api/src/bookingConfig.d.ts +32 -6
  8. package/dist/_dts/api/src/contentRuntime.d.ts +1 -1
  9. package/dist/_dts/api/src/courses.d.ts +7 -1
  10. package/dist/_dts/api/src/endpoints.d.ts +3 -3
  11. package/dist/_dts/api/src/index.d.ts +3 -3
  12. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +3 -3
  13. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +3 -3
  14. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +34 -12
  15. package/dist/_dts/sdk/src/version.d.ts +1 -1
  16. package/dist/_dts/site-commands/src/commands.d.ts +1 -7
  17. package/dist/cli/index.mjs +144 -2517
  18. package/dist/client/client.mjs +3 -2
  19. package/dist/preview-next/before-render.mjs +2 -1
  20. package/dist/preview-next/client/runtime.mjs +4 -4
  21. package/dist/preview-next/middleware.mjs +2 -1
  22. package/dist/{previewAuthStore-DN7vcRsv.mjs → previewAuthStore-ShY26RNz.mjs} +2 -1
  23. package/dist/{sdk-runtime-DaOiA7ct.mjs → sdk-runtime-CJxkFq2B.mjs} +2 -2
  24. package/dist/{separator-CqRhcCxD.mjs → separator-CoFmo8uA.mjs} +1 -1
  25. package/dist/server/components.mjs +32 -2401
  26. package/dist/server/index.mjs +3 -2
  27. package/dist/server/next.mjs +35 -2402
  28. package/dist/server/prebuild.mjs +1 -1
  29. package/dist/server/rendering/server.mjs +32 -2404
  30. package/dist/server/rendering.mjs +32 -2401
  31. package/dist/server/server.mjs +3 -2
  32. package/package.json +1 -1
@@ -1019,7 +1019,7 @@ function subtractDaysFromIso(isoString, dayCount) {
1019
1019
  var init_date_math = __esmMin((() => {}));
1020
1020
  var init_duration = __esmMin((() => {}));
1021
1021
  var init_demo_capability_policy = __esmMin((() => {
1022
- init_src$4();
1022
+ init_src$3();
1023
1023
  })), init_demo_claim_access = __esmMin((() => {})), init_demo_lifecycle_status = __esmMin((() => {}));
1024
1024
  var init_demo_runtime = __esmMin((() => {}));
1025
1025
  var init_collections = __esmMin((() => {}));
@@ -1757,7 +1757,7 @@ var init_planner = __esmMin((() => {
1757
1757
  }));
1758
1758
  //#endregion
1759
1759
  //#region ../core/src/index.ts
1760
- var init_src$4 = __esmMin((() => {
1760
+ var init_src$3 = __esmMin((() => {
1761
1761
  init_branded();
1762
1762
  init_date_math();
1763
1763
  init_duration();
@@ -1812,7 +1812,7 @@ var init_src$4 = __esmMin((() => {
1812
1812
  }));
1813
1813
  //#endregion
1814
1814
  //#region src/cli/env.ts
1815
- init_src$4();
1815
+ init_src$3();
1816
1816
  /**
1817
1817
  * Get the environment variable name for a specific key and target.
1818
1818
  *
@@ -1842,7 +1842,7 @@ function requireEnv(name) {
1842
1842
  /**
1843
1843
  * Get an optional environment variable with a fallback
1844
1844
  */
1845
- function getEnv$1(name, fallback) {
1845
+ function getEnv(name, fallback) {
1846
1846
  return process.env[name] ?? fallback;
1847
1847
  }
1848
1848
  /**
@@ -1867,8 +1867,8 @@ function loadEnvironment(remote) {
1867
1867
  if (!siteId.ok) throw new Error(`Invalid site ID for ${prefix}_SITE_ID. Expected a UUID.`);
1868
1868
  const dashboardUrl = requireEnv(`${prefix}_DASHBOARD_URL`);
1869
1869
  const managementApiKey = requireEnv(`${prefix}_MGMT_API_KEY`);
1870
- const apiKey = getEnv$1(`${prefix}_API_KEY`);
1871
- const supabaseUrl = getEnv$1(`${prefix}_SUPABASE_URL`);
1870
+ const apiKey = getEnv(`${prefix}_API_KEY`);
1871
+ const supabaseUrl = getEnv(`${prefix}_SUPABASE_URL`);
1872
1872
  if (!managementApiKey.startsWith("bld_mgmt_sk_")) throw new Error(`Invalid management API key format for ${prefix}_MGMT_API_KEY. Expected key starting with bld_mgmt_sk_`);
1873
1873
  try {
1874
1874
  new URL(dashboardUrl);
@@ -3264,6 +3264,7 @@ const API_ENDPOINTS$1 = {
3264
3264
  errors: [
3265
3265
  "validation:invalid_input",
3266
3266
  "auth:forbidden",
3267
+ "resource:conflict",
3267
3268
  "server:internal_error"
3268
3269
  ]
3269
3270
  },
@@ -5022,7 +5023,7 @@ const API_ENDPOINTS$1 = {
5022
5023
  auth: "user",
5023
5024
  responseKind: "json"
5024
5025
  },
5025
- publishEventOfferingPageSurface: {
5026
+ publishPageSurface: {
5026
5027
  path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/publication",
5027
5028
  method: "POST",
5028
5029
  errors: [
@@ -10102,7 +10103,7 @@ function unwrapResponse(result) {
10102
10103
  }
10103
10104
  //#endregion
10104
10105
  //#region ../api/src/demoDashboardMutationSurfaces.ts
10105
- init_src$4();
10106
+ init_src$3();
10106
10107
  z$1.object({
10107
10108
  formulaVersion: z$1.literal("managed-domain-overage-v1"),
10108
10109
  conversionRule: z$1.literal("usd-to-gbp-1-to-1-v1"),
@@ -10188,7 +10189,7 @@ const navigationLinkInputSchemaOptions = [
10188
10189
  z$1.discriminatedUnion("kind", navigationLinkInputSchemaOptions);
10189
10190
  //#endregion
10190
10191
  //#region ../api/src/navigation/boundaries.ts
10191
- init_src$4();
10192
+ init_src$3();
10192
10193
  function isNavigationDropdownSentinel(link) {
10193
10194
  return link?.kind === "dropdown";
10194
10195
  }
@@ -10396,7 +10397,7 @@ var CONTROL_CHARACTER_PATTERN$1, init_fileSafety = __esmMin((() => {
10396
10397
  CONTROL_CHARACTER_PATTERN$1 = /[\u0000-\u001f\u007f]/u;
10397
10398
  })), AMBIENT_BACKGROUND_ROLES;
10398
10399
  var init_fileDomain = __esmMin((() => {
10399
- init_src$4();
10400
+ init_src$3();
10400
10401
  init_fileSafety();
10401
10402
  AMBIENT_BACKGROUND_ROLES = [
10402
10403
  "light-texture",
@@ -10423,7 +10424,7 @@ function joinStoragePathSegments(segments) {
10423
10424
  }
10424
10425
  var FILE_STORAGE_BUCKETS, PRIVATE_SITE_FILE_BUCKET_MIME_TYPES;
10425
10426
  var init_fileStorage = __esmMin((() => {
10426
- init_src$4();
10427
+ init_src$3();
10427
10428
  init_fileSafety();
10428
10429
  FILE_STORAGE_BUCKETS = {
10429
10430
  publicSite: unsafeAsStorageBucketName("media"),
@@ -10550,34 +10551,34 @@ function isFileJsonValue(value) {
10550
10551
  return isRecord$49(value) && isFileJsonObject(value);
10551
10552
  }
10552
10553
  var init_filePersistence = __esmMin((() => {
10553
- init_src$4();
10554
+ init_src$3();
10554
10555
  init_fileDomain();
10555
10556
  init_fileAssetLegacyProjection();
10556
10557
  init_typeGuards$1();
10557
10558
  init_fileStorage();
10558
10559
  }));
10559
10560
  var init_fileUploadFinalization = __esmMin((() => {
10560
- init_src$4();
10561
+ init_src$3();
10561
10562
  init_fileDomain();
10562
10563
  init_fileStorage();
10563
10564
  }));
10564
10565
  var init_fileUploadSessionCreation = __esmMin((() => {
10565
- init_src$4();
10566
+ init_src$3();
10566
10567
  init_fileDomain();
10567
10568
  init_fileStorage();
10568
10569
  }));
10569
10570
  var init_fileUploadAssetBuilder = __esmMin((() => {
10570
- init_src$4();
10571
+ init_src$3();
10571
10572
  init_fileDomain();
10572
10573
  init_fileStorage();
10573
10574
  }));
10574
10575
  var init_fileUploadCompletion = __esmMin((() => {
10575
- init_src$4();
10576
+ init_src$3();
10576
10577
  init_fileDomain();
10577
10578
  init_fileUploadAssetBuilder();
10578
10579
  }));
10579
10580
  var init_fileUploadDurableFinalization = __esmMin((() => {
10580
- init_src$4();
10581
+ init_src$3();
10581
10582
  init_fileUploadAssetBuilder();
10582
10583
  init_fileUploadCompletion();
10583
10584
  init_fileUploadFinalization();
@@ -10586,13 +10587,13 @@ var init_fileUploadCleanup = __esmMin((() => {
10586
10587
  init_fileDomain();
10587
10588
  }));
10588
10589
  var init_fileDownloadResolution = __esmMin((() => {
10589
- init_src$4();
10590
+ init_src$3();
10590
10591
  init_fileDomain();
10591
10592
  }));
10592
10593
  var init_fileAssetDeletion = __esmMin((() => {
10593
- init_src$4();
10594
+ init_src$3();
10594
10595
  })), init_fileAssetCompatibility = __esmMin((() => {
10595
- init_src$4();
10596
+ init_src$3();
10596
10597
  init_fileDomain();
10597
10598
  init_fileStorage();
10598
10599
  })), init_fileMimeDetection = __esmMin((() => {
@@ -10657,7 +10658,7 @@ function deriveVideoPrepPolicy(intent) {
10657
10658
  }
10658
10659
  var VIDEO_PREP_LIMITS;
10659
10660
  var init_videoPrep = __esmMin((() => {
10660
- init_src$4();
10661
+ init_src$3();
10661
10662
  init_fileDomain();
10662
10663
  VIDEO_PREP_LIMITS = {
10663
10664
  maxRawByteCount: unsafeAsPositiveByteCount(500 * 1024 * 1024),
@@ -10727,7 +10728,7 @@ function resolveMediaIdentifier(base, existing) {
10727
10728
  }
10728
10729
  var FALLBACK_IDENTIFIER, extensionPattern;
10729
10730
  var init_identifiers = __esmMin((() => {
10730
- init_src$4();
10731
+ init_src$3();
10731
10732
  FALLBACK_IDENTIFIER = "media";
10732
10733
  extensionPattern = /\.[^/.]+$/;
10733
10734
  }));
@@ -11260,14 +11261,14 @@ var init_contentMediaAuditFieldAdapter = __esmMin((() => {
11260
11261
  ]);
11261
11262
  }));
11262
11263
  var init_contentMediaSnapshotAudit = __esmMin((() => {
11263
- init_src$4();
11264
+ init_src$3();
11264
11265
  init_contentMediaAudit();
11265
11266
  init_contentMediaAuditFieldAdapter();
11266
11267
  init_identifiers();
11267
11268
  }));
11268
11269
  //#endregion
11269
11270
  //#region ../media-core/src/index.ts
11270
- var init_src$3 = __esmMin((() => {
11271
+ var init_src$2 = __esmMin((() => {
11271
11272
  init_types$16();
11272
11273
  init_fileDomain();
11273
11274
  init_fileStorage();
@@ -11320,7 +11321,7 @@ var init_src$3 = __esmMin((() => {
11320
11321
  }));
11321
11322
  //#endregion
11322
11323
  //#region ../blocks/src/system/types/link.ts
11323
- init_src$3();
11324
+ init_src$2();
11324
11325
  const nullableString = z$1.union([z$1.string().min(1), z$1.null()]);
11325
11326
  const resolvedInternalLinkKeys = [
11326
11327
  "entityId",
@@ -13757,7 +13758,7 @@ var init_richTextSchema = __esmMin((() => {
13757
13758
  }));
13758
13759
  //#endregion
13759
13760
  //#region ../blocks/src/system/manifest/fieldValidation/index.ts
13760
- init_src$3();
13761
+ init_src$2();
13761
13762
  init_richTextSchema();
13762
13763
  const TEL_RE = /^[+()0-9\s-]{3,}$/;
13763
13764
  const SLUG_PATTERN = /^(?:[a-z0-9]+(?:-[a-z0-9]+)*)(?:\/(?:[a-z0-9]+(?:-[a-z0-9]+)*))*$/;
@@ -39855,7 +39856,7 @@ const collectionBlockDefinition = { manifest: createBlockManifest({
39855
39856
  }) };
39856
39857
  //#endregion
39857
39858
  //#region ../blocks/src/system/blocks/feature-card-icons.ts
39858
- init_src$4();
39859
+ init_src$3();
39859
39860
  const FEATURE_CARD_ICON_TREATMENTS = [
39860
39861
  "plain",
39861
39862
  "soft-badge",
@@ -41091,7 +41092,7 @@ const weeklySlotAvailabilityBlockDefinition = {
41091
41092
  //#region ../blocks/src/system/blocks/events/shared/types.ts
41092
41093
  var init_types$4 = __esmMin((() => {})), PUBLIC_DOWNLOAD_MEDIA_TYPES, hotspotSchema, rotationSchema, rectSchema, aspectCropSchema, transformSchema, mediaPosterSchema, mediaBaseSchema, imageMediaSchema, videoMediaSchema, audioMediaSchema, documentMediaSchema, spreadsheetMediaSchema, archiveMediaSchema, mediaSchema;
41093
41094
  var init_media$1 = __esmMin((() => {
41094
- init_src$3();
41095
+ init_src$2();
41095
41096
  PUBLIC_DOWNLOAD_MEDIA_TYPES = [
41096
41097
  "document",
41097
41098
  "spreadsheet",
@@ -42048,7 +42049,7 @@ function resolveEventRegistrationScopedEvents(events, context) {
42048
42049
  }
42049
42050
  var unsupportedEventRegistrationPageSurfaceSubjectReasons, unsupportedEventRegistrationPageSurfaceSubjectSchema, eventRegistrationPageSurfaceSubjectSchema;
42050
42051
  var init_eventScope = __esmMin((() => {
42051
- init_src$4();
42052
+ init_src$3();
42052
42053
  init_events$1();
42053
42054
  unsupportedEventRegistrationPageSurfaceSubjectReasons = [
42054
42055
  "unsupportedSubject",
@@ -42381,7 +42382,7 @@ function resolveDiscountContext(input) {
42381
42382
  };
42382
42383
  }
42383
42384
  var init_registrationDerivations = __esmMin((() => {
42384
- init_src$4();
42385
+ init_src$3();
42385
42386
  init_pricing$1();
42386
42387
  }));
42387
42388
  //#endregion
@@ -43003,7 +43004,7 @@ function formatCoursePriceAmount(amount, currency, locale) {
43003
43004
  }, locale);
43004
43005
  }
43005
43006
  var init_pricing = __esmMin((() => {
43006
- init_src$4();
43007
+ init_src$3();
43007
43008
  }));
43008
43009
  //#endregion
43009
43010
  //#region ../blocks/src/system/blocks/courses/shared/index.ts
@@ -44503,7 +44504,7 @@ var init_group = __esmMin((() => {
44503
44504
  }));
44504
44505
  //#endregion
44505
44506
  //#region ../calendar/src/index.ts
44506
- var init_src$2 = __esmMin((() => {
44507
+ var init_src$1 = __esmMin((() => {
44507
44508
  init_grid();
44508
44509
  init_timetable();
44509
44510
  init_group();
@@ -44752,8 +44753,8 @@ function resolveEventCta(event, buttonText) {
44752
44753
  }
44753
44754
  var COLUMN_CLASSES;
44754
44755
  var init_utils$3 = __esmMin((() => {
44755
- init_src$4();
44756
- init_src$2();
44756
+ init_src$3();
44757
+ init_src$1();
44757
44758
  init_eventCapacity();
44758
44759
  init_destination();
44759
44760
  init_pricing$1();
@@ -45166,7 +45167,7 @@ function resolveMediaSlotContract({ blockKind, fieldPath, values, fieldAspectRat
45166
45167
  }
45167
45168
  var DEFAULT_MIN_SOURCE_WIDTH, LARGE_MIN_SOURCE_WIDTH, SECTION_BACKGROUND_MIN_SOURCE_WIDTH, TEAM_MEMBER_MIN_SOURCE_WIDTH, DEFAULT_DELIVERY_MAX_WIDTH, DEFAULT_MARQUEE_IMAGE_PX;
45168
45169
  var init_slotContracts = __esmMin((() => {
45169
- init_src$3();
45170
+ init_src$2();
45170
45171
  DEFAULT_MIN_SOURCE_WIDTH = 1200;
45171
45172
  LARGE_MIN_SOURCE_WIDTH = 1400;
45172
45173
  SECTION_BACKGROUND_MIN_SOURCE_WIDTH = 1920;
@@ -45823,8 +45824,8 @@ function scaleCssLengthToken(token, factor) {
45823
45824
  var MAX_RENDER_DIMENSION, MAX_SRCSET_WIDTH, RELATIVE_IMG_PROXY_BASE_PATH, ImagePresets, _serverStorage, _serverStorageChecked, RB_MEDIA_CONTEXT_KEY, debugMediaNodeLog;
45824
45825
  var init_media = __esmMin((() => {
45825
45826
  init_clsx();
45826
- init_src$4();
45827
45827
  init_src$3();
45828
+ init_src$2();
45828
45829
  init_slotContracts();
45829
45830
  init_colorStyles();
45830
45831
  MAX_RENDER_DIMENSION = 4096;
@@ -48136,7 +48137,7 @@ const eventCalendarBlockDefinition = {
48136
48137
  init_shared$4();
48137
48138
  //#endregion
48138
48139
  //#region ../blocks/src/system/blocks/events/recurring-schedule-projection.ts
48139
- init_src$4();
48140
+ init_src$3();
48140
48141
  init_schemas();
48141
48142
  const recurringScheduleWeekdaySchema = z$1.enum([
48142
48143
  "Monday",
@@ -48385,7 +48386,7 @@ const recurringScheduleBlockDefinition = {
48385
48386
  };
48386
48387
  //#endregion
48387
48388
  //#region ../blocks/src/system/blocks/offerings-preview/model.ts
48388
- init_src$4();
48389
+ init_src$3();
48389
48390
  const OFFERINGS_PREVIEW_DEFAULT_BUTTON_TEXT = "Book";
48390
48391
  const OFFERINGS_PREVIEW_DEFAULT_EMPTY_MESSAGE = "Nothing scheduled just yet.";
48391
48392
  const OFFERINGS_PREVIEW_EVENT_PRESET_DEFINITIONS = [
@@ -51046,7 +51047,7 @@ function formatValidity(days) {
51046
51047
  return `Valid for ${Math.round(days / 30)} months`;
51047
51048
  }
51048
51049
  var init_display = __esmMin((() => {
51049
- init_src$4();
51050
+ init_src$3();
51050
51051
  init_creditProducts();
51051
51052
  init_shop_commerce_shared();
51052
51053
  }));
@@ -53537,7 +53538,7 @@ function buildGoogleMapsDirectionsUrl(input) {
53537
53538
  }
53538
53539
  var LOCATION_MAP_DEFAULTS, LOCATION_MAP_LIMITS;
53539
53540
  var init_location_map_shared = __esmMin((() => {
53540
- init_src$4();
53541
+ init_src$3();
53541
53542
  LOCATION_MAP_DEFAULTS = {
53542
53543
  zoom: 15,
53543
53544
  heightPx: 320,
@@ -54992,7 +54993,7 @@ const defaultTransforms = createTransformRegistry(builtinTransformDefinitions);
54992
54993
  init_core();
54993
54994
  //#endregion
54994
54995
  //#region ../blocks/src/system/data/linkedContentEntries.ts
54995
- init_src$4();
54996
+ init_src$3();
54996
54997
  const LINKED_CONTENT_ENTRY_META_KEY = "__rbLinkedContentEntry";
54997
54998
  function getLinkedContentEntryMeta(value) {
54998
54999
  if (!isRecord$35(value)) return null;
@@ -55673,2392 +55674,6 @@ function resolveButtonAffordance(input) {
55673
55674
  return null;
55674
55675
  }
55675
55676
  //#endregion
55676
- //#region ../../node_modules/.pnpm/next-axiom@1.10.0_next@16.2.9_@opentelemetry+api@1.9.1_@playwright+test@1.61.0_react-do_4315f05d6e55f50fff8ada7e553b82cf/node_modules/next-axiom/dist/shared.js
55677
- var require_shared = /* @__PURE__ */ __commonJSMin(((exports) => {
55678
- Object.defineProperty(exports, "__esModule", { value: true });
55679
- exports.throttle = exports.EndpointType = exports.isNoPrettyPrint = void 0;
55680
- exports.requestToJSON = requestToJSON;
55681
- exports.isNoPrettyPrint = process.env.AXIOM_NO_PRETTY_PRINT == "true" ? true : false;
55682
- var EndpointType;
55683
- (function(EndpointType) {
55684
- EndpointType["webVitals"] = "web-vitals";
55685
- EndpointType["logs"] = "logs";
55686
- })(EndpointType || (exports.EndpointType = EndpointType = {}));
55687
- /**
55688
- * Transforms a NextRequest or Request object into a JSON-serializable object
55689
- */
55690
- async function requestToJSON(request) {
55691
- const headers = {};
55692
- request.headers.forEach((value, key) => {
55693
- headers[key] = value;
55694
- });
55695
- let cookiesData = {};
55696
- if ("cookies" in request) request.cookies.getAll().forEach((cookie) => {
55697
- cookiesData[cookie.name] = cookie.value;
55698
- });
55699
- else {
55700
- const cookieHeader = headers["cookie"];
55701
- if (cookieHeader) cookiesData = Object.fromEntries(cookieHeader.split(";").map((cookie) => {
55702
- const [key, value] = cookie.trim().split("=");
55703
- return [key, value];
55704
- }));
55705
- }
55706
- let nextUrlData;
55707
- if ("nextUrl" in request) {
55708
- const nextUrl = request.nextUrl;
55709
- nextUrlData = {
55710
- basePath: nextUrl.basePath,
55711
- buildId: nextUrl.buildId,
55712
- hash: nextUrl.hash,
55713
- host: nextUrl.host,
55714
- hostname: nextUrl.hostname,
55715
- href: nextUrl.href,
55716
- origin: nextUrl.origin,
55717
- password: nextUrl.password,
55718
- pathname: nextUrl.pathname,
55719
- port: nextUrl.port,
55720
- protocol: nextUrl.protocol,
55721
- search: nextUrl.search,
55722
- searchParams: Object.fromEntries(nextUrl.searchParams.entries()),
55723
- username: nextUrl.username
55724
- };
55725
- }
55726
- let body;
55727
- if (request.body) try {
55728
- const clonedRequest = request.clone();
55729
- try {
55730
- body = await clonedRequest.json();
55731
- clonedRequest.body?.getReader;
55732
- } catch {
55733
- body = await clonedRequest.text();
55734
- }
55735
- } catch (error) {
55736
- console.warn("Could not parse request body:", error);
55737
- }
55738
- const cache = {
55739
- mode: request.cache,
55740
- credentials: request.credentials,
55741
- redirect: request.redirect,
55742
- referrerPolicy: request.referrerPolicy,
55743
- integrity: request.integrity
55744
- };
55745
- let ip;
55746
- if ("ip" in request) ip = request.ip;
55747
- let geo;
55748
- if ("geo" in request) geo = request.geo;
55749
- return {
55750
- method: request.method,
55751
- url: request.url,
55752
- headers,
55753
- cookies: cookiesData,
55754
- nextUrl: nextUrlData,
55755
- ip,
55756
- geo,
55757
- body,
55758
- cache,
55759
- mode: request.mode,
55760
- destination: request.destination,
55761
- referrer: request.referrer,
55762
- keepalive: request.keepalive,
55763
- signal: {
55764
- aborted: request.signal.aborted,
55765
- reason: request.signal.reason
55766
- }
55767
- };
55768
- }
55769
- const throttle = (fn, wait) => {
55770
- let lastFn, lastTime;
55771
- return function() {
55772
- const context = this, args = arguments;
55773
- if (lastTime == null) lastTime = Date.now();
55774
- clearTimeout(lastFn);
55775
- lastFn = setTimeout(() => {
55776
- if (Date.now() - lastTime >= wait) {
55777
- fn.apply(context, args);
55778
- lastTime = Date.now();
55779
- }
55780
- }, Math.max(wait - (Date.now() - lastTime), 0));
55781
- };
55782
- };
55783
- exports.throttle = throttle;
55784
- }));
55785
- //#endregion
55786
- //#region ../../node_modules/.pnpm/next-axiom@1.10.0_next@16.2.9_@opentelemetry+api@1.9.1_@playwright+test@1.61.0_react-do_4315f05d6e55f50fff8ada7e553b82cf/node_modules/next-axiom/dist/platform/generic.js
55787
- var require_generic = /* @__PURE__ */ __commonJSMin(((exports) => {
55788
- Object.defineProperty(exports, "__esModule", { value: true });
55789
- const shared_1 = require_shared();
55790
- const config_1 = require_config();
55791
- var GenericConfig = class {
55792
- proxyPath = "/_axiom";
55793
- shouldSendEdgeReport = false;
55794
- token = process.env.NEXT_PUBLIC_AXIOM_TOKEN || process.env.AXIOM_TOKEN;
55795
- dataset = process.env.NEXT_PUBLIC_AXIOM_DATASET || process.env.AXIOM_DATASET;
55796
- environment = process.env.NODE_ENV;
55797
- axiomUrl = process.env.NEXT_PUBLIC_AXIOM_URL || process.env.AXIOM_URL || "https://api.axiom.co";
55798
- region = process.env.REGION || void 0;
55799
- customEndpoint = process.env.NEXT_PUBLIC_AXIOM_CUSTOM_ENDPOINT;
55800
- isEnvVarsSet() {
55801
- return !!(this.axiomUrl && this.dataset && this.token) || !!this.customEndpoint;
55802
- }
55803
- getIngestURL(_) {
55804
- return `${this.axiomUrl}/v1/datasets/${this.dataset}/ingest`;
55805
- }
55806
- getLogsEndpoint() {
55807
- if (config_1.isBrowser && this.customEndpoint) return this.customEndpoint;
55808
- return config_1.isBrowser ? `${this.proxyPath}/logs` : this.getIngestURL(shared_1.EndpointType.logs);
55809
- }
55810
- getWebVitalsEndpoint() {
55811
- if (config_1.isBrowser && this.customEndpoint) return this.customEndpoint;
55812
- return config_1.isBrowser ? `${this.proxyPath}/web-vitals` : this.getIngestURL(shared_1.EndpointType.webVitals);
55813
- }
55814
- wrapWebVitalsObject(metrics) {
55815
- return metrics.map((m) => ({
55816
- webVital: m,
55817
- _time: (/* @__PURE__ */ new Date()).getTime(),
55818
- platform: {
55819
- environment: this.environment,
55820
- source: "web-vital"
55821
- },
55822
- source: "web-vital"
55823
- }));
55824
- }
55825
- injectPlatformMetadata(logEvent, source) {
55826
- let key = "platform";
55827
- if (config_1.isVercel) key = "vercel";
55828
- logEvent.source = source;
55829
- logEvent[key] = {
55830
- environment: this.environment,
55831
- region: this.region,
55832
- source
55833
- };
55834
- if (config_1.isVercel) {
55835
- logEvent[key].region = process.env.VERCEL_REGION;
55836
- logEvent[key].deploymentId = process.env.VERCEL_DEPLOYMENT_ID;
55837
- logEvent[key].deploymentUrl = process.env.NEXT_PUBLIC_VERCEL_URL;
55838
- logEvent[key].project = process.env.NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL;
55839
- logEvent.git = {
55840
- commit: process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA,
55841
- repo: process.env.NEXT_PUBLIC_VERCEL_GIT_REPO_SLUG,
55842
- ref: process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_REF
55843
- };
55844
- }
55845
- }
55846
- getHeaderOrDefault(req, headerName, defaultValue) {
55847
- return req.headers[headerName] ? req.headers[headerName] : defaultValue;
55848
- }
55849
- };
55850
- exports.default = GenericConfig;
55851
- }));
55852
- //#endregion
55853
- //#region ../../node_modules/.pnpm/next-axiom@1.10.0_next@16.2.9_@opentelemetry+api@1.9.1_@playwright+test@1.61.0_react-do_4315f05d6e55f50fff8ada7e553b82cf/node_modules/next-axiom/dist/platform/vercel.js
55854
- var require_vercel = /* @__PURE__ */ __commonJSMin(((exports) => {
55855
- var __importDefault = exports && exports.__importDefault || function(mod) {
55856
- return mod && mod.__esModule ? mod : { "default": mod };
55857
- };
55858
- Object.defineProperty(exports, "__esModule", { value: true });
55859
- const config_1 = require_config();
55860
- const shared_1 = require_shared();
55861
- const generic_1 = __importDefault(require_generic());
55862
- const ingestEndpoint = process.env.NEXT_PUBLIC_AXIOM_INGEST_ENDPOINT || process.env.AXIOM_INGEST_ENDPOINT || "";
55863
- var VercelConfig = class extends generic_1.default {
55864
- provider = "vercel";
55865
- shouldSendEdgeReport = true;
55866
- region = process.env.VERCEL_REGION || void 0;
55867
- environment = process.env.NEXT_PUBLIC_VERCEL_ENV || process.env.VERCEL_ENV || process.env.NODE_ENV || "";
55868
- token = void 0;
55869
- axiomUrl = ingestEndpoint;
55870
- isEnvVarsSet() {
55871
- return ingestEndpoint != void 0 && ingestEndpoint != "" || !!this.customEndpoint;
55872
- }
55873
- getIngestURL(t) {
55874
- const url = new URL(this.axiomUrl);
55875
- url.searchParams.set("type", t.toString());
55876
- return url.toString();
55877
- }
55878
- getWebVitalsEndpoint() {
55879
- if (config_1.isBrowser && this.customEndpoint) return this.customEndpoint;
55880
- return `${this.proxyPath}/web-vitals`;
55881
- }
55882
- getLogsEndpoint() {
55883
- if (config_1.isBrowser && this.customEndpoint) return this.customEndpoint;
55884
- return config_1.isBrowser ? `${this.proxyPath}/logs` : this.getIngestURL(shared_1.EndpointType.logs);
55885
- }
55886
- wrapWebVitalsObject(metrics) {
55887
- return {
55888
- webVitals: metrics,
55889
- environment: this.environment
55890
- };
55891
- }
55892
- injectPlatformMetadata(logEvent, source) {
55893
- logEvent.vercel = {
55894
- environment: this.environment,
55895
- region: this.region,
55896
- source
55897
- };
55898
- }
55899
- };
55900
- exports.default = VercelConfig;
55901
- }));
55902
- //#endregion
55903
- //#region ../../node_modules/.pnpm/next-axiom@1.10.0_next@16.2.9_@opentelemetry+api@1.9.1_@playwright+test@1.61.0_react-do_4315f05d6e55f50fff8ada7e553b82cf/node_modules/next-axiom/dist/platform/netlify.js
55904
- var require_netlify = /* @__PURE__ */ __commonJSMin(((exports) => {
55905
- var __importDefault = exports && exports.__importDefault || function(mod) {
55906
- return mod && mod.__esModule ? mod : { "default": mod };
55907
- };
55908
- Object.defineProperty(exports, "__esModule", { value: true });
55909
- const generic_1 = __importDefault(require_generic());
55910
- const netlifySiteId = process.env.SITE_ID;
55911
- const netlifyBuildId = process.env.BUILD_ID;
55912
- const netlifyContext = process.env.CONTEXT;
55913
- const netlifyDeploymentUrl = process.env.DEPLOYMENT_URL;
55914
- const netlifyDeploymentId = process.env.DEPLOYMENT_ID;
55915
- var NetlifyConfig = class extends generic_1.default {
55916
- wrapWebVitalsObject(metrics) {
55917
- return metrics.map((m) => ({
55918
- webVital: m,
55919
- _time: (/* @__PURE__ */ new Date()).getTime(),
55920
- netlify: {
55921
- environment: this.environment,
55922
- source: "web-vital",
55923
- siteId: netlifySiteId,
55924
- buildId: netlifyBuildId,
55925
- context: netlifyContext,
55926
- deploymentUrl: netlifyDeploymentUrl,
55927
- deploymentId: netlifyDeploymentId
55928
- }
55929
- }));
55930
- }
55931
- injectPlatformMetadata(logEvent, source) {
55932
- logEvent.netlify = {
55933
- environment: this.environment,
55934
- region: source === "edge" ? process.env.DENO_REGION : process.env.AWS_REGION,
55935
- source,
55936
- siteId: netlifySiteId,
55937
- buildId: netlifyBuildId,
55938
- context: netlifyContext,
55939
- deploymentUrl: netlifyDeploymentUrl,
55940
- deploymentId: source === "edge" ? process.env.DENO_DEPLOYMENT_ID : netlifyDeploymentId
55941
- };
55942
- }
55943
- };
55944
- exports.default = NetlifyConfig;
55945
- }));
55946
- //#endregion
55947
- //#region ../../node_modules/.pnpm/next-axiom@1.10.0_next@16.2.9_@opentelemetry+api@1.9.1_@playwright+test@1.61.0_react-do_4315f05d6e55f50fff8ada7e553b82cf/node_modules/next-axiom/package.json
55948
- var require_package = /* @__PURE__ */ __commonJSMin(((exports, module) => {
55949
- module.exports = {
55950
- "name": "next-axiom",
55951
- "description": "Send WebVitals from your Next.js project to Axiom.",
55952
- "version": "1.10.0",
55953
- "author": "Axiom, Inc.",
55954
- "license": "MIT",
55955
- "contributors": ["Arne Bahlo <arne@axiom.co>", "Islam Shehata <islam@axiom.co>"],
55956
- "engines": { "node": ">=18" },
55957
- "main": "dist/index.js",
55958
- "types": "dist/index.d.ts",
55959
- "repository": {
55960
- "type": "git",
55961
- "url": "git+https://github.com/axiomhq/next-axiom.git"
55962
- },
55963
- "keywords": [
55964
- "web-vitals",
55965
- "axiom",
55966
- "observability",
55967
- "performance",
55968
- "nextjs"
55969
- ],
55970
- "bugs": { "url": "https://github.com/axiomhq/next-axiom/issues" },
55971
- "homepage": "https://github.com/axiomhq/next-axiom#readme",
55972
- "peerDependencies": {
55973
- "next": ">=14.0",
55974
- "react": ">=18.0.0"
55975
- },
55976
- "devDependencies": {
55977
- "@types/node": "^20.19.26",
55978
- "@types/react": "^18.3.27",
55979
- "@vitest/coverage-v8": "^2.1.9",
55980
- "next": "^14.2.33",
55981
- "prettier": "^3.7.4",
55982
- "react-dom": "^19.2.1",
55983
- "ts-node": "^10.9.2",
55984
- "typescript": "^5.9.3",
55985
- "vitest": "^2.1.9"
55986
- },
55987
- "dependencies": {
55988
- "@vercel/functions": "^2.2.13",
55989
- "use-deep-compare": "^1.3.0",
55990
- "whatwg-fetch": "^3.6.20"
55991
- },
55992
- "scripts": {
55993
- "build": "tsc",
55994
- "format": "prettier --write src/*.ts tests/*.ts",
55995
- "check-format": "prettier -c src/*.ts tests/*.ts",
55996
- "test": "vitest run tests --coverage"
55997
- }
55998
- };
55999
- }));
56000
- //#endregion
56001
- //#region ../../node_modules/.pnpm/next-axiom@1.10.0_next@16.2.9_@opentelemetry+api@1.9.1_@playwright+test@1.61.0_react-do_4315f05d6e55f50fff8ada7e553b82cf/node_modules/next-axiom/dist/config.js
56002
- var require_config = /* @__PURE__ */ __commonJSMin(((exports) => {
56003
- var __importDefault = exports && exports.__importDefault || function(mod) {
56004
- return mod && mod.__esModule ? mod : { "default": mod };
56005
- };
56006
- Object.defineProperty(exports, "__esModule", { value: true });
56007
- exports.config = exports.isEdgeRuntime = exports.isBrowser = exports.isWebWorker = exports.isNetlify = exports.isVercel = exports.isVercelIntegration = exports.Version = void 0;
56008
- const generic_1 = __importDefault(require_generic());
56009
- const vercel_1 = __importDefault(require_vercel());
56010
- const netlify_1 = __importDefault(require_netlify());
56011
- exports.Version = require_package().version;
56012
- exports.isVercelIntegration = process.env.NEXT_PUBLIC_AXIOM_INGEST_ENDPOINT || process.env.AXIOM_INGEST_ENDPOINT;
56013
- exports.isVercel = process.env.NEXT_PUBLIC_VERCEL || process.env.VERCEL;
56014
- exports.isNetlify = process.env.NETLIFY == "true";
56015
- exports.isWebWorker = typeof self !== "undefined" && typeof globalThis.WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope;
56016
- exports.isBrowser = typeof window !== "undefined" || exports.isWebWorker;
56017
- exports.isEdgeRuntime = globalThis.EdgeRuntime ? true : false;
56018
- let config = new generic_1.default();
56019
- exports.config = config;
56020
- if (exports.isVercelIntegration) exports.config = config = new vercel_1.default();
56021
- else if (exports.isNetlify) exports.config = config = new netlify_1.default();
56022
- }));
56023
- //#endregion
56024
- //#region ../../node_modules/.pnpm/whatwg-fetch@3.6.20/node_modules/whatwg-fetch/dist/fetch.umd.js
56025
- var require_fetch_umd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
56026
- (function(global, factory) {
56027
- typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : factory(global.WHATWGFetch = {});
56028
- })(exports, (function(exports$2) {
56029
- "use strict";
56030
- var g = typeof globalThis !== "undefined" && globalThis || typeof self !== "undefined" && self || typeof global !== "undefined" && global || {};
56031
- var support = {
56032
- searchParams: "URLSearchParams" in g,
56033
- iterable: "Symbol" in g && "iterator" in Symbol,
56034
- blob: "FileReader" in g && "Blob" in g && (function() {
56035
- try {
56036
- new Blob();
56037
- return true;
56038
- } catch (e) {
56039
- return false;
56040
- }
56041
- })(),
56042
- formData: "FormData" in g,
56043
- arrayBuffer: "ArrayBuffer" in g
56044
- };
56045
- function isDataView(obj) {
56046
- return obj && DataView.prototype.isPrototypeOf(obj);
56047
- }
56048
- if (support.arrayBuffer) {
56049
- var viewClasses = [
56050
- "[object Int8Array]",
56051
- "[object Uint8Array]",
56052
- "[object Uint8ClampedArray]",
56053
- "[object Int16Array]",
56054
- "[object Uint16Array]",
56055
- "[object Int32Array]",
56056
- "[object Uint32Array]",
56057
- "[object Float32Array]",
56058
- "[object Float64Array]"
56059
- ];
56060
- var isArrayBufferView = ArrayBuffer.isView || function(obj) {
56061
- return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1;
56062
- };
56063
- }
56064
- function normalizeName(name) {
56065
- if (typeof name !== "string") name = String(name);
56066
- if (/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(name) || name === "") throw new TypeError("Invalid character in header field name: \"" + name + "\"");
56067
- return name.toLowerCase();
56068
- }
56069
- function normalizeValue(value) {
56070
- if (typeof value !== "string") value = String(value);
56071
- return value;
56072
- }
56073
- function iteratorFor(items) {
56074
- var iterator = { next: function() {
56075
- var value = items.shift();
56076
- return {
56077
- done: value === void 0,
56078
- value
56079
- };
56080
- } };
56081
- if (support.iterable) iterator[Symbol.iterator] = function() {
56082
- return iterator;
56083
- };
56084
- return iterator;
56085
- }
56086
- function Headers(headers) {
56087
- this.map = {};
56088
- if (headers instanceof Headers) headers.forEach(function(value, name) {
56089
- this.append(name, value);
56090
- }, this);
56091
- else if (Array.isArray(headers)) headers.forEach(function(header) {
56092
- if (header.length != 2) throw new TypeError("Headers constructor: expected name/value pair to be length 2, found" + header.length);
56093
- this.append(header[0], header[1]);
56094
- }, this);
56095
- else if (headers) Object.getOwnPropertyNames(headers).forEach(function(name) {
56096
- this.append(name, headers[name]);
56097
- }, this);
56098
- }
56099
- Headers.prototype.append = function(name, value) {
56100
- name = normalizeName(name);
56101
- value = normalizeValue(value);
56102
- var oldValue = this.map[name];
56103
- this.map[name] = oldValue ? oldValue + ", " + value : value;
56104
- };
56105
- Headers.prototype["delete"] = function(name) {
56106
- delete this.map[normalizeName(name)];
56107
- };
56108
- Headers.prototype.get = function(name) {
56109
- name = normalizeName(name);
56110
- return this.has(name) ? this.map[name] : null;
56111
- };
56112
- Headers.prototype.has = function(name) {
56113
- return this.map.hasOwnProperty(normalizeName(name));
56114
- };
56115
- Headers.prototype.set = function(name, value) {
56116
- this.map[normalizeName(name)] = normalizeValue(value);
56117
- };
56118
- Headers.prototype.forEach = function(callback, thisArg) {
56119
- for (var name in this.map) if (this.map.hasOwnProperty(name)) callback.call(thisArg, this.map[name], name, this);
56120
- };
56121
- Headers.prototype.keys = function() {
56122
- var items = [];
56123
- this.forEach(function(value, name) {
56124
- items.push(name);
56125
- });
56126
- return iteratorFor(items);
56127
- };
56128
- Headers.prototype.values = function() {
56129
- var items = [];
56130
- this.forEach(function(value) {
56131
- items.push(value);
56132
- });
56133
- return iteratorFor(items);
56134
- };
56135
- Headers.prototype.entries = function() {
56136
- var items = [];
56137
- this.forEach(function(value, name) {
56138
- items.push([name, value]);
56139
- });
56140
- return iteratorFor(items);
56141
- };
56142
- if (support.iterable) Headers.prototype[Symbol.iterator] = Headers.prototype.entries;
56143
- function consumed(body) {
56144
- if (body._noBody) return;
56145
- if (body.bodyUsed) return Promise.reject(/* @__PURE__ */ new TypeError("Already read"));
56146
- body.bodyUsed = true;
56147
- }
56148
- function fileReaderReady(reader) {
56149
- return new Promise(function(resolve, reject) {
56150
- reader.onload = function() {
56151
- resolve(reader.result);
56152
- };
56153
- reader.onerror = function() {
56154
- reject(reader.error);
56155
- };
56156
- });
56157
- }
56158
- function readBlobAsArrayBuffer(blob) {
56159
- var reader = new FileReader();
56160
- var promise = fileReaderReady(reader);
56161
- reader.readAsArrayBuffer(blob);
56162
- return promise;
56163
- }
56164
- function readBlobAsText(blob) {
56165
- var reader = new FileReader();
56166
- var promise = fileReaderReady(reader);
56167
- var match = /charset=([A-Za-z0-9_-]+)/.exec(blob.type);
56168
- var encoding = match ? match[1] : "utf-8";
56169
- reader.readAsText(blob, encoding);
56170
- return promise;
56171
- }
56172
- function readArrayBufferAsText(buf) {
56173
- var view = new Uint8Array(buf);
56174
- var chars = new Array(view.length);
56175
- for (var i = 0; i < view.length; i++) chars[i] = String.fromCharCode(view[i]);
56176
- return chars.join("");
56177
- }
56178
- function bufferClone(buf) {
56179
- if (buf.slice) return buf.slice(0);
56180
- else {
56181
- var view = new Uint8Array(buf.byteLength);
56182
- view.set(new Uint8Array(buf));
56183
- return view.buffer;
56184
- }
56185
- }
56186
- function Body() {
56187
- this.bodyUsed = false;
56188
- this._initBody = function(body) {
56189
- this.bodyUsed = this.bodyUsed;
56190
- this._bodyInit = body;
56191
- if (!body) {
56192
- this._noBody = true;
56193
- this._bodyText = "";
56194
- } else if (typeof body === "string") this._bodyText = body;
56195
- else if (support.blob && Blob.prototype.isPrototypeOf(body)) this._bodyBlob = body;
56196
- else if (support.formData && FormData.prototype.isPrototypeOf(body)) this._bodyFormData = body;
56197
- else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) this._bodyText = body.toString();
56198
- else if (support.arrayBuffer && support.blob && isDataView(body)) {
56199
- this._bodyArrayBuffer = bufferClone(body.buffer);
56200
- this._bodyInit = new Blob([this._bodyArrayBuffer]);
56201
- } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) this._bodyArrayBuffer = bufferClone(body);
56202
- else this._bodyText = body = Object.prototype.toString.call(body);
56203
- if (!this.headers.get("content-type")) {
56204
- if (typeof body === "string") this.headers.set("content-type", "text/plain;charset=UTF-8");
56205
- else if (this._bodyBlob && this._bodyBlob.type) this.headers.set("content-type", this._bodyBlob.type);
56206
- else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8");
56207
- }
56208
- };
56209
- if (support.blob) this.blob = function() {
56210
- var rejected = consumed(this);
56211
- if (rejected) return rejected;
56212
- if (this._bodyBlob) return Promise.resolve(this._bodyBlob);
56213
- else if (this._bodyArrayBuffer) return Promise.resolve(new Blob([this._bodyArrayBuffer]));
56214
- else if (this._bodyFormData) throw new Error("could not read FormData body as blob");
56215
- else return Promise.resolve(new Blob([this._bodyText]));
56216
- };
56217
- this.arrayBuffer = function() {
56218
- if (this._bodyArrayBuffer) {
56219
- var isConsumed = consumed(this);
56220
- if (isConsumed) return isConsumed;
56221
- else if (ArrayBuffer.isView(this._bodyArrayBuffer)) return Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset, this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength));
56222
- else return Promise.resolve(this._bodyArrayBuffer);
56223
- } else if (support.blob) return this.blob().then(readBlobAsArrayBuffer);
56224
- else throw new Error("could not read as ArrayBuffer");
56225
- };
56226
- this.text = function() {
56227
- var rejected = consumed(this);
56228
- if (rejected) return rejected;
56229
- if (this._bodyBlob) return readBlobAsText(this._bodyBlob);
56230
- else if (this._bodyArrayBuffer) return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer));
56231
- else if (this._bodyFormData) throw new Error("could not read FormData body as text");
56232
- else return Promise.resolve(this._bodyText);
56233
- };
56234
- if (support.formData) this.formData = function() {
56235
- return this.text().then(decode);
56236
- };
56237
- this.json = function() {
56238
- return this.text().then(JSON.parse);
56239
- };
56240
- return this;
56241
- }
56242
- var methods = [
56243
- "CONNECT",
56244
- "DELETE",
56245
- "GET",
56246
- "HEAD",
56247
- "OPTIONS",
56248
- "PATCH",
56249
- "POST",
56250
- "PUT",
56251
- "TRACE"
56252
- ];
56253
- function normalizeMethod(method) {
56254
- var upcased = method.toUpperCase();
56255
- return methods.indexOf(upcased) > -1 ? upcased : method;
56256
- }
56257
- function Request(input, options) {
56258
- if (!(this instanceof Request)) throw new TypeError("Please use the \"new\" operator, this DOM object constructor cannot be called as a function.");
56259
- options = options || {};
56260
- var body = options.body;
56261
- if (input instanceof Request) {
56262
- if (input.bodyUsed) throw new TypeError("Already read");
56263
- this.url = input.url;
56264
- this.credentials = input.credentials;
56265
- if (!options.headers) this.headers = new Headers(input.headers);
56266
- this.method = input.method;
56267
- this.mode = input.mode;
56268
- this.signal = input.signal;
56269
- if (!body && input._bodyInit != null) {
56270
- body = input._bodyInit;
56271
- input.bodyUsed = true;
56272
- }
56273
- } else this.url = String(input);
56274
- this.credentials = options.credentials || this.credentials || "same-origin";
56275
- if (options.headers || !this.headers) this.headers = new Headers(options.headers);
56276
- this.method = normalizeMethod(options.method || this.method || "GET");
56277
- this.mode = options.mode || this.mode || null;
56278
- this.signal = options.signal || this.signal || function() {
56279
- if ("AbortController" in g) return new AbortController().signal;
56280
- }();
56281
- this.referrer = null;
56282
- if ((this.method === "GET" || this.method === "HEAD") && body) throw new TypeError("Body not allowed for GET or HEAD requests");
56283
- this._initBody(body);
56284
- if (this.method === "GET" || this.method === "HEAD") {
56285
- if (options.cache === "no-store" || options.cache === "no-cache") {
56286
- var reParamSearch = /([?&])_=[^&]*/;
56287
- if (reParamSearch.test(this.url)) this.url = this.url.replace(reParamSearch, "$1_=" + (/* @__PURE__ */ new Date()).getTime());
56288
- else {
56289
- var reQueryString = /\?/;
56290
- this.url += (reQueryString.test(this.url) ? "&" : "?") + "_=" + (/* @__PURE__ */ new Date()).getTime();
56291
- }
56292
- }
56293
- }
56294
- }
56295
- Request.prototype.clone = function() {
56296
- return new Request(this, { body: this._bodyInit });
56297
- };
56298
- function decode(body) {
56299
- var form = new FormData();
56300
- body.trim().split("&").forEach(function(bytes) {
56301
- if (bytes) {
56302
- var split = bytes.split("=");
56303
- var name = split.shift().replace(/\+/g, " ");
56304
- var value = split.join("=").replace(/\+/g, " ");
56305
- form.append(decodeURIComponent(name), decodeURIComponent(value));
56306
- }
56307
- });
56308
- return form;
56309
- }
56310
- function parseHeaders(rawHeaders) {
56311
- var headers = new Headers();
56312
- rawHeaders.replace(/\r?\n[\t ]+/g, " ").split("\r").map(function(header) {
56313
- return header.indexOf("\n") === 0 ? header.substr(1, header.length) : header;
56314
- }).forEach(function(line) {
56315
- var parts = line.split(":");
56316
- var key = parts.shift().trim();
56317
- if (key) {
56318
- var value = parts.join(":").trim();
56319
- try {
56320
- headers.append(key, value);
56321
- } catch (error) {
56322
- console.warn("Response " + error.message);
56323
- }
56324
- }
56325
- });
56326
- return headers;
56327
- }
56328
- Body.call(Request.prototype);
56329
- function Response(bodyInit, options) {
56330
- if (!(this instanceof Response)) throw new TypeError("Please use the \"new\" operator, this DOM object constructor cannot be called as a function.");
56331
- if (!options) options = {};
56332
- this.type = "default";
56333
- this.status = options.status === void 0 ? 200 : options.status;
56334
- if (this.status < 200 || this.status > 599) throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");
56335
- this.ok = this.status >= 200 && this.status < 300;
56336
- this.statusText = options.statusText === void 0 ? "" : "" + options.statusText;
56337
- this.headers = new Headers(options.headers);
56338
- this.url = options.url || "";
56339
- this._initBody(bodyInit);
56340
- }
56341
- Body.call(Response.prototype);
56342
- Response.prototype.clone = function() {
56343
- return new Response(this._bodyInit, {
56344
- status: this.status,
56345
- statusText: this.statusText,
56346
- headers: new Headers(this.headers),
56347
- url: this.url
56348
- });
56349
- };
56350
- Response.error = function() {
56351
- var response = new Response(null, {
56352
- status: 200,
56353
- statusText: ""
56354
- });
56355
- response.ok = false;
56356
- response.status = 0;
56357
- response.type = "error";
56358
- return response;
56359
- };
56360
- var redirectStatuses = [
56361
- 301,
56362
- 302,
56363
- 303,
56364
- 307,
56365
- 308
56366
- ];
56367
- Response.redirect = function(url, status) {
56368
- if (redirectStatuses.indexOf(status) === -1) throw new RangeError("Invalid status code");
56369
- return new Response(null, {
56370
- status,
56371
- headers: { location: url }
56372
- });
56373
- };
56374
- exports$2.DOMException = g.DOMException;
56375
- try {
56376
- new exports$2.DOMException();
56377
- } catch (err) {
56378
- exports$2.DOMException = function(message, name) {
56379
- this.message = message;
56380
- this.name = name;
56381
- var error = Error(message);
56382
- this.stack = error.stack;
56383
- };
56384
- exports$2.DOMException.prototype = Object.create(Error.prototype);
56385
- exports$2.DOMException.prototype.constructor = exports$2.DOMException;
56386
- }
56387
- function fetch(input, init) {
56388
- return new Promise(function(resolve, reject) {
56389
- var request = new Request(input, init);
56390
- if (request.signal && request.signal.aborted) return reject(new exports$2.DOMException("Aborted", "AbortError"));
56391
- var xhr = new XMLHttpRequest();
56392
- function abortXhr() {
56393
- xhr.abort();
56394
- }
56395
- xhr.onload = function() {
56396
- var options = {
56397
- statusText: xhr.statusText,
56398
- headers: parseHeaders(xhr.getAllResponseHeaders() || "")
56399
- };
56400
- if (request.url.indexOf("file://") === 0 && (xhr.status < 200 || xhr.status > 599)) options.status = 200;
56401
- else options.status = xhr.status;
56402
- options.url = "responseURL" in xhr ? xhr.responseURL : options.headers.get("X-Request-URL");
56403
- var body = "response" in xhr ? xhr.response : xhr.responseText;
56404
- setTimeout(function() {
56405
- resolve(new Response(body, options));
56406
- }, 0);
56407
- };
56408
- xhr.onerror = function() {
56409
- setTimeout(function() {
56410
- reject(/* @__PURE__ */ new TypeError("Network request failed"));
56411
- }, 0);
56412
- };
56413
- xhr.ontimeout = function() {
56414
- setTimeout(function() {
56415
- reject(/* @__PURE__ */ new TypeError("Network request timed out"));
56416
- }, 0);
56417
- };
56418
- xhr.onabort = function() {
56419
- setTimeout(function() {
56420
- reject(new exports$2.DOMException("Aborted", "AbortError"));
56421
- }, 0);
56422
- };
56423
- function fixUrl(url) {
56424
- try {
56425
- return url === "" && g.location.href ? g.location.href : url;
56426
- } catch (e) {
56427
- return url;
56428
- }
56429
- }
56430
- xhr.open(request.method, fixUrl(request.url), true);
56431
- if (request.credentials === "include") xhr.withCredentials = true;
56432
- else if (request.credentials === "omit") xhr.withCredentials = false;
56433
- if ("responseType" in xhr) {
56434
- if (support.blob) xhr.responseType = "blob";
56435
- else if (support.arrayBuffer) xhr.responseType = "arraybuffer";
56436
- }
56437
- if (init && typeof init.headers === "object" && !(init.headers instanceof Headers || g.Headers && init.headers instanceof g.Headers)) {
56438
- var names = [];
56439
- Object.getOwnPropertyNames(init.headers).forEach(function(name) {
56440
- names.push(normalizeName(name));
56441
- xhr.setRequestHeader(name, normalizeValue(init.headers[name]));
56442
- });
56443
- request.headers.forEach(function(value, name) {
56444
- if (names.indexOf(name) === -1) xhr.setRequestHeader(name, value);
56445
- });
56446
- } else request.headers.forEach(function(value, name) {
56447
- xhr.setRequestHeader(name, value);
56448
- });
56449
- if (request.signal) {
56450
- request.signal.addEventListener("abort", abortXhr);
56451
- xhr.onreadystatechange = function() {
56452
- if (xhr.readyState === 4) request.signal.removeEventListener("abort", abortXhr);
56453
- };
56454
- }
56455
- xhr.send(typeof request._bodyInit === "undefined" ? null : request._bodyInit);
56456
- });
56457
- }
56458
- fetch.polyfill = true;
56459
- if (!g.fetch) {
56460
- g.fetch = fetch;
56461
- g.Headers = Headers;
56462
- g.Request = Request;
56463
- g.Response = Response;
56464
- }
56465
- exports$2.Headers = Headers;
56466
- exports$2.Request = Request;
56467
- exports$2.Response = Response;
56468
- exports$2.fetch = fetch;
56469
- Object.defineProperty(exports$2, "__esModule", { value: true });
56470
- }));
56471
- }));
56472
- //#endregion
56473
- //#region ../../node_modules/.pnpm/next-axiom@1.10.0_next@16.2.9_@opentelemetry+api@1.9.1_@playwright+test@1.61.0_react-do_4315f05d6e55f50fff8ada7e553b82cf/node_modules/next-axiom/dist/logger.js
56474
- var require_logger = /* @__PURE__ */ __commonJSMin(((exports) => {
56475
- Object.defineProperty(exports, "__esModule", { value: true });
56476
- exports.log = exports.Logger = exports.LogLevel = void 0;
56477
- exports.prettyPrint = prettyPrint;
56478
- const config_1 = require_config();
56479
- const shared_1 = require_shared();
56480
- const url = config_1.config.getLogsEndpoint();
56481
- const LOG_LEVEL = process.env.NEXT_PUBLIC_AXIOM_LOG_LEVEL || "debug";
56482
- var LogLevel;
56483
- (function(LogLevel) {
56484
- LogLevel[LogLevel["debug"] = 0] = "debug";
56485
- LogLevel[LogLevel["info"] = 1] = "info";
56486
- LogLevel[LogLevel["warn"] = 2] = "warn";
56487
- LogLevel[LogLevel["error"] = 3] = "error";
56488
- LogLevel[LogLevel["off"] = 100] = "off";
56489
- })(LogLevel || (exports.LogLevel = LogLevel = {}));
56490
- var Logger = class Logger {
56491
- initConfig;
56492
- logEvents = [];
56493
- throttledSendLogs = (0, shared_1.throttle)(this.sendLogs, 1e3);
56494
- children = [];
56495
- logLevel = LogLevel.debug;
56496
- config = {
56497
- autoFlush: true,
56498
- source: "frontend-log",
56499
- prettyPrint
56500
- };
56501
- constructor(initConfig = {}) {
56502
- this.initConfig = initConfig;
56503
- if (this.initConfig.logLevel != void 0 && this.initConfig.logLevel >= 0) this.logLevel = this.initConfig.logLevel;
56504
- else if (LOG_LEVEL) this.logLevel = LogLevel[LOG_LEVEL];
56505
- this.config = {
56506
- ...this.config,
56507
- ...initConfig
56508
- };
56509
- }
56510
- debug = (message, args = {}) => {
56511
- this.log(LogLevel.debug, message, args);
56512
- };
56513
- info = (message, args = {}) => {
56514
- this.log(LogLevel.info, message, args);
56515
- };
56516
- warn = (message, args = {}) => {
56517
- this.log(LogLevel.warn, message, args);
56518
- };
56519
- error = (message, args = {}) => {
56520
- this.log(LogLevel.error, message, args);
56521
- };
56522
- with = (args) => {
56523
- const child = new Logger({
56524
- ...this.config,
56525
- args: {
56526
- ...this.config.args,
56527
- ...args
56528
- }
56529
- });
56530
- this.children.push(child);
56531
- return child;
56532
- };
56533
- withRequest = (req) => {
56534
- return new Logger({
56535
- ...this.config,
56536
- req: {
56537
- ...this.config.req,
56538
- ...req
56539
- }
56540
- });
56541
- };
56542
- _transformEvent = (level, message, args = {}) => {
56543
- const logEvent = {
56544
- level: LogLevel[level].toString(),
56545
- message,
56546
- _time: new Date(Date.now()).toISOString(),
56547
- source: this.config.source,
56548
- fields: this.config.args || {},
56549
- "@app": { "next-axiom-version": config_1.Version }
56550
- };
56551
- if (args instanceof Error) logEvent.fields = {
56552
- ...logEvent.fields,
56553
- message: args.message,
56554
- stack: args.stack,
56555
- name: args.name,
56556
- cause: args.cause
56557
- };
56558
- else if (typeof args === "object" && args !== null && Object.keys(args).length > 0) {
56559
- const parsedArgs = JSON.parse(JSON.stringify(args, jsonFriendlyErrorReplacer));
56560
- logEvent.fields = {
56561
- ...logEvent.fields,
56562
- ...parsedArgs
56563
- };
56564
- } else if (args && args.length) logEvent.fields = {
56565
- ...logEvent.fields,
56566
- args
56567
- };
56568
- config_1.config.injectPlatformMetadata(logEvent, this.config.source);
56569
- if (this.config.req != null) {
56570
- logEvent.request = this.config.req;
56571
- if (logEvent.platform) logEvent.platform.route = this.config.req.path;
56572
- else if (logEvent.vercel) logEvent.vercel.route = this.config.req.path;
56573
- }
56574
- return logEvent;
56575
- };
56576
- logHttpRequest(level, message, request, args) {
56577
- const logEvent = this._transformEvent(level, message, args);
56578
- logEvent.request = request;
56579
- this.logEvents.push(logEvent);
56580
- if (this.config.autoFlush) this.throttledSendLogs();
56581
- }
56582
- middleware(request, config) {
56583
- const req = {
56584
- ip: request.ip,
56585
- region: request.geo?.region,
56586
- method: request.method,
56587
- host: request.nextUrl.hostname,
56588
- path: request.nextUrl.pathname,
56589
- scheme: request.nextUrl.protocol.split(":")[0],
56590
- referer: request.headers.get("Referer"),
56591
- userAgent: request.headers.get("user-agent")
56592
- };
56593
- const message = `${request.method} ${request.nextUrl.pathname}`;
56594
- if (config?.logRequestDetails) return (0, shared_1.requestToJSON)(request).then((details) => {
56595
- const newReq = {
56596
- ...req,
56597
- details: Array.isArray(config.logRequestDetails) ? Object.fromEntries(Object.entries(details).filter(([key]) => config.logRequestDetails.includes(key))) : details
56598
- };
56599
- return this.logHttpRequest(LogLevel.info, message, newReq, {});
56600
- });
56601
- return this.logHttpRequest(LogLevel.info, message, req, {});
56602
- }
56603
- log = (level, message, args = {}) => {
56604
- if (level < this.logLevel) return;
56605
- const logEvent = this._transformEvent(level, message, args);
56606
- this.logEvents.push(logEvent);
56607
- if (this.config.autoFlush) this.throttledSendLogs();
56608
- };
56609
- attachResponseStatus = (statusCode) => {
56610
- this.logEvents = this.logEvents.map((log) => {
56611
- if (log.request) log.request.statusCode = statusCode;
56612
- return log;
56613
- });
56614
- };
56615
- async sendLogs() {
56616
- if (!this.logEvents.length) return;
56617
- if (!config_1.config.isEnvVarsSet()) {
56618
- this.logEvents.forEach((ev) => this.config.prettyPrint ? this.config.prettyPrint(ev) : prettyPrint(ev));
56619
- this.logEvents = [];
56620
- return;
56621
- }
56622
- const method = "POST";
56623
- const keepalive = true;
56624
- const body = JSON.stringify(this.logEvents);
56625
- this.logEvents = [];
56626
- const headers = {
56627
- "Content-Type": "application/json",
56628
- "User-Agent": "next-axiom/v" + config_1.Version
56629
- };
56630
- if (config_1.config.token) headers["Authorization"] = `Bearer ${config_1.config.token}`;
56631
- const reqOptions = {
56632
- body,
56633
- method,
56634
- keepalive,
56635
- headers
56636
- };
56637
- function sendFallback() {
56638
- return fetch(url, reqOptions).catch(console.error);
56639
- }
56640
- try {
56641
- if (typeof fetch === "undefined") return (await require_fetch_umd())(url, reqOptions).catch(console.error);
56642
- else if (config_1.isBrowser && config_1.isVercelIntegration && navigator.sendBeacon) try {
56643
- if (!navigator.sendBeacon.bind(navigator)(url, body)) return sendFallback();
56644
- } catch (error) {
56645
- return sendFallback();
56646
- }
56647
- else return sendFallback();
56648
- } catch (e) {
56649
- console.warn(`Failed to send logs to Axiom: ${e}`);
56650
- this.logEvents = [...this.logEvents, JSON.parse(body)];
56651
- }
56652
- }
56653
- flush = async () => {
56654
- await Promise.all([this.sendLogs(), ...this.children.map((c) => c.flush())]);
56655
- };
56656
- };
56657
- exports.Logger = Logger;
56658
- exports.log = new Logger({});
56659
- const levelColors = {
56660
- info: {
56661
- terminal: "32",
56662
- browser: "lightgreen"
56663
- },
56664
- debug: {
56665
- terminal: "36",
56666
- browser: "lightblue"
56667
- },
56668
- warn: {
56669
- terminal: "33",
56670
- browser: "yellow"
56671
- },
56672
- error: {
56673
- terminal: "31",
56674
- browser: "red"
56675
- }
56676
- };
56677
- function prettyPrint(ev) {
56678
- const hasFields = Object.keys(ev.fields).length > 0;
56679
- if (shared_1.isNoPrettyPrint) {
56680
- let msg = `${ev.level} - ${ev.message}`;
56681
- if (hasFields) msg += " " + JSON.stringify(ev.fields);
56682
- console.log(msg);
56683
- return;
56684
- }
56685
- let msgString = "";
56686
- let args = [ev.level, ev.message];
56687
- if (config_1.isBrowser) {
56688
- msgString = "%c%s - %s";
56689
- args = [`color: ${levelColors[ev.level].browser};`, ...args];
56690
- } else msgString = `\x1b[${levelColors[ev.level].terminal}m%s\x1b[0m - %s`;
56691
- if (hasFields) {
56692
- msgString += " %o";
56693
- args.push(ev.fields);
56694
- }
56695
- if (ev.request) {
56696
- msgString += " %o";
56697
- args.push(ev.request);
56698
- }
56699
- console.log.apply(console, [msgString, ...args]);
56700
- }
56701
- function jsonFriendlyErrorReplacer(key, value) {
56702
- if (value instanceof Error) return {
56703
- ...value,
56704
- name: value.name,
56705
- message: value.message,
56706
- stack: value.stack,
56707
- cause: jsonFriendlyErrorReplacer("", value.cause)
56708
- };
56709
- return value;
56710
- }
56711
- }));
56712
- //#endregion
56713
- //#region ../../node_modules/.pnpm/next-axiom@1.10.0_next@16.2.9_@opentelemetry+api@1.9.1_@playwright+test@1.61.0_react-do_4315f05d6e55f50fff8ada7e553b82cf/node_modules/next-axiom/dist/platform/base.js
56714
- var require_base = /* @__PURE__ */ __commonJSMin(((exports) => {
56715
- Object.defineProperty(exports, "__esModule", { value: true });
56716
- }));
56717
- //#endregion
56718
- //#region ../../node_modules/.pnpm/@vercel+functions@2.2.13/node_modules/@vercel/functions/headers.js
56719
- var require_headers = /* @__PURE__ */ __commonJSMin(((exports, module) => {
56720
- var __defProp = Object.defineProperty;
56721
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
56722
- var __getOwnPropNames = Object.getOwnPropertyNames;
56723
- var __hasOwnProp = Object.prototype.hasOwnProperty;
56724
- var __export = (target, all) => {
56725
- for (var name in all) __defProp(target, name, {
56726
- get: all[name],
56727
- enumerable: true
56728
- });
56729
- };
56730
- var __copyProps = (to, from, except, desc) => {
56731
- if (from && typeof from === "object" || typeof from === "function") {
56732
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
56733
- get: () => from[key],
56734
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
56735
- });
56736
- }
56737
- return to;
56738
- };
56739
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
56740
- var headers_exports = {};
56741
- __export(headers_exports, {
56742
- CITY_HEADER_NAME: () => CITY_HEADER_NAME,
56743
- COUNTRY_HEADER_NAME: () => COUNTRY_HEADER_NAME,
56744
- EMOJI_FLAG_UNICODE_STARTING_POSITION: () => EMOJI_FLAG_UNICODE_STARTING_POSITION,
56745
- IP_HEADER_NAME: () => IP_HEADER_NAME,
56746
- LATITUDE_HEADER_NAME: () => LATITUDE_HEADER_NAME,
56747
- LONGITUDE_HEADER_NAME: () => LONGITUDE_HEADER_NAME,
56748
- POSTAL_CODE_HEADER_NAME: () => POSTAL_CODE_HEADER_NAME,
56749
- REGION_HEADER_NAME: () => REGION_HEADER_NAME,
56750
- REQUEST_ID_HEADER_NAME: () => REQUEST_ID_HEADER_NAME,
56751
- geolocation: () => geolocation,
56752
- ipAddress: () => ipAddress
56753
- });
56754
- module.exports = __toCommonJS(headers_exports);
56755
- const CITY_HEADER_NAME = "x-vercel-ip-city";
56756
- const COUNTRY_HEADER_NAME = "x-vercel-ip-country";
56757
- const IP_HEADER_NAME = "x-real-ip";
56758
- const LATITUDE_HEADER_NAME = "x-vercel-ip-latitude";
56759
- const LONGITUDE_HEADER_NAME = "x-vercel-ip-longitude";
56760
- const REGION_HEADER_NAME = "x-vercel-ip-country-region";
56761
- const POSTAL_CODE_HEADER_NAME = "x-vercel-ip-postal-code";
56762
- const REQUEST_ID_HEADER_NAME = "x-vercel-id";
56763
- const EMOJI_FLAG_UNICODE_STARTING_POSITION = 127397;
56764
- function getHeader(headers, key) {
56765
- return headers.get(key) ?? void 0;
56766
- }
56767
- function getHeaderWithDecode(request, key) {
56768
- const header = getHeader(request.headers, key);
56769
- return header ? decodeURIComponent(header) : void 0;
56770
- }
56771
- function getFlag(countryCode) {
56772
- const regex = (/* @__PURE__ */ new RegExp("^[A-Z]{2}$")).test(countryCode);
56773
- if (!countryCode || !regex) return void 0;
56774
- return String.fromCodePoint(...countryCode.split("").map((char) => EMOJI_FLAG_UNICODE_STARTING_POSITION + char.charCodeAt(0)));
56775
- }
56776
- function ipAddress(input) {
56777
- return getHeader("headers" in input ? input.headers : input, IP_HEADER_NAME);
56778
- }
56779
- function getRegionFromRequestId(requestId) {
56780
- if (!requestId) return "dev1";
56781
- return requestId.split(":")[0];
56782
- }
56783
- function geolocation(request) {
56784
- return {
56785
- city: getHeaderWithDecode(request, CITY_HEADER_NAME),
56786
- country: getHeader(request.headers, COUNTRY_HEADER_NAME),
56787
- flag: getFlag(getHeader(request.headers, COUNTRY_HEADER_NAME)),
56788
- countryRegion: getHeader(request.headers, REGION_HEADER_NAME),
56789
- region: getRegionFromRequestId(getHeader(request.headers, REQUEST_ID_HEADER_NAME)),
56790
- latitude: getHeader(request.headers, LATITUDE_HEADER_NAME),
56791
- longitude: getHeader(request.headers, LONGITUDE_HEADER_NAME),
56792
- postalCode: getHeader(request.headers, POSTAL_CODE_HEADER_NAME)
56793
- };
56794
- }
56795
- 0 && (module.exports = {
56796
- CITY_HEADER_NAME,
56797
- COUNTRY_HEADER_NAME,
56798
- EMOJI_FLAG_UNICODE_STARTING_POSITION,
56799
- IP_HEADER_NAME,
56800
- LATITUDE_HEADER_NAME,
56801
- LONGITUDE_HEADER_NAME,
56802
- POSTAL_CODE_HEADER_NAME,
56803
- REGION_HEADER_NAME,
56804
- REQUEST_ID_HEADER_NAME,
56805
- geolocation,
56806
- ipAddress
56807
- });
56808
- }));
56809
- //#endregion
56810
- //#region ../../node_modules/.pnpm/@vercel+functions@2.2.13/node_modules/@vercel/functions/get-env.js
56811
- var require_get_env = /* @__PURE__ */ __commonJSMin(((exports, module) => {
56812
- var __defProp = Object.defineProperty;
56813
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
56814
- var __getOwnPropNames = Object.getOwnPropertyNames;
56815
- var __hasOwnProp = Object.prototype.hasOwnProperty;
56816
- var __export = (target, all) => {
56817
- for (var name in all) __defProp(target, name, {
56818
- get: all[name],
56819
- enumerable: true
56820
- });
56821
- };
56822
- var __copyProps = (to, from, except, desc) => {
56823
- if (from && typeof from === "object" || typeof from === "function") {
56824
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
56825
- get: () => from[key],
56826
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
56827
- });
56828
- }
56829
- return to;
56830
- };
56831
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
56832
- var get_env_exports = {};
56833
- __export(get_env_exports, { getEnv: () => getEnv });
56834
- module.exports = __toCommonJS(get_env_exports);
56835
- const getEnv = (env = process.env) => ({
56836
- /**
56837
- * An indicator to show that System Environment Variables have been exposed to your project's Deployments.
56838
- * @example "1"
56839
- */
56840
- VERCEL: get(env, "VERCEL"),
56841
- /**
56842
- * An indicator that the code is running in a Continuous Integration environment.
56843
- * @example "1"
56844
- */
56845
- CI: get(env, "CI"),
56846
- /**
56847
- * The Environment that the app is deployed and running on.
56848
- * @example "production"
56849
- */
56850
- VERCEL_ENV: get(env, "VERCEL_ENV"),
56851
- /**
56852
- * The domain name of the generated deployment URL. The value does not include the protocol scheme https://.
56853
- * NOTE: This Variable cannot be used in conjunction with Standard Deployment Protection.
56854
- * @example "*.vercel.app"
56855
- */
56856
- VERCEL_URL: get(env, "VERCEL_URL"),
56857
- /**
56858
- * The domain name of the generated Git branch URL. The value does not include the protocol scheme https://.
56859
- * @example "*-git-*.vercel.app"
56860
- */
56861
- VERCEL_BRANCH_URL: get(env, "VERCEL_BRANCH_URL"),
56862
- /**
56863
- * A production domain name of the project. This is useful to reliably generate links that point to production such as OG-image URLs.
56864
- * The value does not include the protocol scheme https://.
56865
- * @example "myproject.vercel.app"
56866
- */
56867
- VERCEL_PROJECT_PRODUCTION_URL: get(env, "VERCEL_PROJECT_PRODUCTION_URL"),
56868
- /**
56869
- * The ID of the Region where the app is running.
56870
- *
56871
- * Possible values:
56872
- * - arn1 (Stockholm, Sweden)
56873
- * - bom1 (Mumbai, India)
56874
- * - cdg1 (Paris, France)
56875
- * - cle1 (Cleveland, USA)
56876
- * - cpt1 (Cape Town, South Africa)
56877
- * - dub1 (Dublin, Ireland)
56878
- * - fra1 (Frankfurt, Germany)
56879
- * - gru1 (São Paulo, Brazil)
56880
- * - hkg1 (Hong Kong)
56881
- * - hnd1 (Tokyo, Japan)
56882
- * - iad1 (Washington, D.C., USA)
56883
- * - icn1 (Seoul, South Korea)
56884
- * - kix1 (Osaka, Japan)
56885
- * - lhr1 (London, United Kingdom)
56886
- * - pdx1 (Portland, USA)
56887
- * - sfo1 (San Francisco, USA)
56888
- * - sin1 (Singapore)
56889
- * - syd1 (Sydney, Australia)
56890
- * - dev1 (Development Region)
56891
- *
56892
- * @example "iad1"
56893
- */
56894
- VERCEL_REGION: get(env, "VERCEL_REGION"),
56895
- /**
56896
- * The unique identifier for the deployment, which can be used to implement Skew Protection.
56897
- * @example "dpl_7Gw5ZMBpQA8h9GF832KGp7nwbuh3"
56898
- */
56899
- VERCEL_DEPLOYMENT_ID: get(env, "VERCEL_DEPLOYMENT_ID"),
56900
- /**
56901
- * When Skew Protection is enabled in Project Settings, this value is set to 1.
56902
- * @example "1"
56903
- */
56904
- VERCEL_SKEW_PROTECTION_ENABLED: get(env, "VERCEL_SKEW_PROTECTION_ENABLED"),
56905
- /**
56906
- * The Protection Bypass for Automation value, if the secret has been generated in the project's Deployment Protection settings.
56907
- */
56908
- VERCEL_AUTOMATION_BYPASS_SECRET: get(env, "VERCEL_AUTOMATION_BYPASS_SECRET"),
56909
- /**
56910
- * The Git Provider the deployment is triggered from.
56911
- * @example "github"
56912
- */
56913
- VERCEL_GIT_PROVIDER: get(env, "VERCEL_GIT_PROVIDER"),
56914
- /**
56915
- * The origin repository the deployment is triggered from.
56916
- * @example "my-site"
56917
- */
56918
- VERCEL_GIT_REPO_SLUG: get(env, "VERCEL_GIT_REPO_SLUG"),
56919
- /**
56920
- * The account that owns the repository the deployment is triggered from.
56921
- * @example "acme"
56922
- */
56923
- VERCEL_GIT_REPO_OWNER: get(env, "VERCEL_GIT_REPO_OWNER"),
56924
- /**
56925
- * The ID of the repository the deployment is triggered from.
56926
- * @example "117716146"
56927
- */
56928
- VERCEL_GIT_REPO_ID: get(env, "VERCEL_GIT_REPO_ID"),
56929
- /**
56930
- * The git branch of the commit the deployment was triggered by.
56931
- * @example "improve-about-page"
56932
- */
56933
- VERCEL_GIT_COMMIT_REF: get(env, "VERCEL_GIT_COMMIT_REF"),
56934
- /**
56935
- * The git SHA of the commit the deployment was triggered by.
56936
- * @example "fa1eade47b73733d6312d5abfad33ce9e4068081"
56937
- */
56938
- VERCEL_GIT_COMMIT_SHA: get(env, "VERCEL_GIT_COMMIT_SHA"),
56939
- /**
56940
- * The message attached to the commit the deployment was triggered by.
56941
- * @example "Update about page"
56942
- */
56943
- VERCEL_GIT_COMMIT_MESSAGE: get(env, "VERCEL_GIT_COMMIT_MESSAGE"),
56944
- /**
56945
- * The username attached to the author of the commit that the project was deployed by.
56946
- * @example "johndoe"
56947
- */
56948
- VERCEL_GIT_COMMIT_AUTHOR_LOGIN: get(env, "VERCEL_GIT_COMMIT_AUTHOR_LOGIN"),
56949
- /**
56950
- * The name attached to the author of the commit that the project was deployed by.
56951
- * @example "John Doe"
56952
- */
56953
- VERCEL_GIT_COMMIT_AUTHOR_NAME: get(env, "VERCEL_GIT_COMMIT_AUTHOR_NAME"),
56954
- /**
56955
- * The git SHA of the last successful deployment for the project and branch.
56956
- * NOTE: This Variable is only exposed when an Ignored Build Step is provided.
56957
- * @example "fa1eade47b73733d6312d5abfad33ce9e4068080"
56958
- */
56959
- VERCEL_GIT_PREVIOUS_SHA: get(env, "VERCEL_GIT_PREVIOUS_SHA"),
56960
- /**
56961
- * The pull request id the deployment was triggered by. If a deployment is created on a branch before a pull request is made, this value will be an empty string.
56962
- * @example "23"
56963
- */
56964
- VERCEL_GIT_PULL_REQUEST_ID: get(env, "VERCEL_GIT_PULL_REQUEST_ID")
56965
- });
56966
- const get = (env, key) => {
56967
- const value = env[key];
56968
- return value === "" ? void 0 : value;
56969
- };
56970
- 0 && (module.exports = { getEnv });
56971
- }));
56972
- //#endregion
56973
- //#region ../../node_modules/.pnpm/@vercel+functions@2.2.13/node_modules/@vercel/functions/get-context.js
56974
- var require_get_context = /* @__PURE__ */ __commonJSMin(((exports, module) => {
56975
- var __defProp = Object.defineProperty;
56976
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
56977
- var __getOwnPropNames = Object.getOwnPropertyNames;
56978
- var __hasOwnProp = Object.prototype.hasOwnProperty;
56979
- var __export = (target, all) => {
56980
- for (var name in all) __defProp(target, name, {
56981
- get: all[name],
56982
- enumerable: true
56983
- });
56984
- };
56985
- var __copyProps = (to, from, except, desc) => {
56986
- if (from && typeof from === "object" || typeof from === "function") {
56987
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
56988
- get: () => from[key],
56989
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
56990
- });
56991
- }
56992
- return to;
56993
- };
56994
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
56995
- var get_context_exports = {};
56996
- __export(get_context_exports, {
56997
- SYMBOL_FOR_REQ_CONTEXT: () => SYMBOL_FOR_REQ_CONTEXT,
56998
- getContext: () => getContext
56999
- });
57000
- module.exports = __toCommonJS(get_context_exports);
57001
- const SYMBOL_FOR_REQ_CONTEXT = Symbol.for("@vercel/request-context");
57002
- function getContext() {
57003
- return globalThis[SYMBOL_FOR_REQ_CONTEXT]?.get?.() ?? {};
57004
- }
57005
- 0 && (module.exports = {
57006
- SYMBOL_FOR_REQ_CONTEXT,
57007
- getContext
57008
- });
57009
- }));
57010
- //#endregion
57011
- //#region ../../node_modules/.pnpm/@vercel+functions@2.2.13/node_modules/@vercel/functions/wait-until.js
57012
- var require_wait_until = /* @__PURE__ */ __commonJSMin(((exports, module) => {
57013
- var __defProp = Object.defineProperty;
57014
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
57015
- var __getOwnPropNames = Object.getOwnPropertyNames;
57016
- var __hasOwnProp = Object.prototype.hasOwnProperty;
57017
- var __export = (target, all) => {
57018
- for (var name in all) __defProp(target, name, {
57019
- get: all[name],
57020
- enumerable: true
57021
- });
57022
- };
57023
- var __copyProps = (to, from, except, desc) => {
57024
- if (from && typeof from === "object" || typeof from === "function") {
57025
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
57026
- get: () => from[key],
57027
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
57028
- });
57029
- }
57030
- return to;
57031
- };
57032
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
57033
- var wait_until_exports = {};
57034
- __export(wait_until_exports, { waitUntil: () => waitUntil });
57035
- module.exports = __toCommonJS(wait_until_exports);
57036
- var import_get_context = require_get_context();
57037
- const waitUntil = (promise) => {
57038
- if (promise === null || typeof promise !== "object" || typeof promise.then !== "function") throw new TypeError(`waitUntil can only be called with a Promise, got ${typeof promise}`);
57039
- return (0, import_get_context.getContext)().waitUntil?.(promise);
57040
- };
57041
- 0 && (module.exports = { waitUntil });
57042
- }));
57043
- //#endregion
57044
- //#region ../../node_modules/.pnpm/@vercel+functions@2.2.13/node_modules/@vercel/functions/middleware.js
57045
- var require_middleware = /* @__PURE__ */ __commonJSMin(((exports, module) => {
57046
- var __defProp = Object.defineProperty;
57047
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
57048
- var __getOwnPropNames = Object.getOwnPropertyNames;
57049
- var __hasOwnProp = Object.prototype.hasOwnProperty;
57050
- var __export = (target, all) => {
57051
- for (var name in all) __defProp(target, name, {
57052
- get: all[name],
57053
- enumerable: true
57054
- });
57055
- };
57056
- var __copyProps = (to, from, except, desc) => {
57057
- if (from && typeof from === "object" || typeof from === "function") {
57058
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
57059
- get: () => from[key],
57060
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
57061
- });
57062
- }
57063
- return to;
57064
- };
57065
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
57066
- var middleware_exports = {};
57067
- __export(middleware_exports, {
57068
- next: () => next,
57069
- rewrite: () => rewrite
57070
- });
57071
- module.exports = __toCommonJS(middleware_exports);
57072
- function handleMiddlewareField(init, headers) {
57073
- if (init?.request?.headers) {
57074
- if (!(init.request.headers instanceof Headers)) throw new Error("request.headers must be an instance of Headers");
57075
- const keys = [];
57076
- for (const [key, value] of init.request.headers) {
57077
- headers.set("x-middleware-request-" + key, value);
57078
- keys.push(key);
57079
- }
57080
- headers.set("x-middleware-override-headers", keys.join(","));
57081
- }
57082
- }
57083
- function rewrite(destination, init) {
57084
- const headers = new Headers(init?.headers ?? {});
57085
- headers.set("x-middleware-rewrite", String(destination));
57086
- handleMiddlewareField(init, headers);
57087
- return new Response(null, {
57088
- ...init,
57089
- headers
57090
- });
57091
- }
57092
- function next(init) {
57093
- const headers = new Headers(init?.headers ?? {});
57094
- headers.set("x-middleware-next", "1");
57095
- handleMiddlewareField(init, headers);
57096
- return new Response(null, {
57097
- ...init,
57098
- headers
57099
- });
57100
- }
57101
- 0 && (module.exports = {
57102
- next,
57103
- rewrite
57104
- });
57105
- }));
57106
- //#endregion
57107
- //#region ../../node_modules/.pnpm/@vercel+functions@2.2.13/node_modules/@vercel/functions/cache/in-memory-cache.js
57108
- var require_in_memory_cache = /* @__PURE__ */ __commonJSMin(((exports, module) => {
57109
- var __defProp = Object.defineProperty;
57110
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
57111
- var __getOwnPropNames = Object.getOwnPropertyNames;
57112
- var __hasOwnProp = Object.prototype.hasOwnProperty;
57113
- var __export = (target, all) => {
57114
- for (var name in all) __defProp(target, name, {
57115
- get: all[name],
57116
- enumerable: true
57117
- });
57118
- };
57119
- var __copyProps = (to, from, except, desc) => {
57120
- if (from && typeof from === "object" || typeof from === "function") {
57121
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
57122
- get: () => from[key],
57123
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
57124
- });
57125
- }
57126
- return to;
57127
- };
57128
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
57129
- var in_memory_cache_exports = {};
57130
- __export(in_memory_cache_exports, { InMemoryCache: () => InMemoryCache });
57131
- module.exports = __toCommonJS(in_memory_cache_exports);
57132
- var InMemoryCache = class {
57133
- constructor() {
57134
- this.cache = {};
57135
- }
57136
- async get(key) {
57137
- const entry = this.cache[key];
57138
- if (entry) {
57139
- if (entry.ttl && entry.lastModified + entry.ttl * 1e3 < Date.now()) {
57140
- await this.delete(key);
57141
- return null;
57142
- }
57143
- return entry.value;
57144
- }
57145
- return null;
57146
- }
57147
- async set(key, value, options) {
57148
- this.cache[key] = {
57149
- value,
57150
- lastModified: Date.now(),
57151
- ttl: options?.ttl,
57152
- tags: new Set(options?.tags || [])
57153
- };
57154
- }
57155
- async delete(key) {
57156
- delete this.cache[key];
57157
- }
57158
- async expireTag(tag) {
57159
- const tags = Array.isArray(tag) ? tag : [tag];
57160
- for (const key in this.cache) if (Object.prototype.hasOwnProperty.call(this.cache, key)) {
57161
- const entry = this.cache[key];
57162
- if (tags.some((t) => entry.tags.has(t))) delete this.cache[key];
57163
- }
57164
- }
57165
- };
57166
- 0 && (module.exports = { InMemoryCache });
57167
- }));
57168
- //#endregion
57169
- //#region ../../node_modules/.pnpm/@vercel+functions@2.2.13/node_modules/@vercel/functions/cache/build-client.js
57170
- var require_build_client = /* @__PURE__ */ __commonJSMin(((exports, module) => {
57171
- var __defProp = Object.defineProperty;
57172
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
57173
- var __getOwnPropNames = Object.getOwnPropertyNames;
57174
- var __hasOwnProp = Object.prototype.hasOwnProperty;
57175
- var __export = (target, all) => {
57176
- for (var name in all) __defProp(target, name, {
57177
- get: all[name],
57178
- enumerable: true
57179
- });
57180
- };
57181
- var __copyProps = (to, from, except, desc) => {
57182
- if (from && typeof from === "object" || typeof from === "function") {
57183
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
57184
- get: () => from[key],
57185
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
57186
- });
57187
- }
57188
- return to;
57189
- };
57190
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
57191
- var build_client_exports = {};
57192
- __export(build_client_exports, { BuildCache: () => BuildCache });
57193
- module.exports = __toCommonJS(build_client_exports);
57194
- var import_index = require_cache();
57195
- var BuildCache = class {
57196
- constructor({ endpoint, headers, onError }) {
57197
- this.get = async (key) => {
57198
- try {
57199
- const res = await fetch(`${this.endpoint}${key}`, {
57200
- headers: this.headers,
57201
- method: "GET"
57202
- });
57203
- if (res.status === 404) return null;
57204
- if (res.status === 200) {
57205
- if (res.headers.get(import_index.HEADERS_VERCEL_CACHE_STATE) !== import_index.PkgCacheState.Fresh) {
57206
- res.body?.cancel?.();
57207
- return null;
57208
- }
57209
- return await res.json();
57210
- } else throw new Error(`Failed to get cache: ${res.statusText}`);
57211
- } catch (error) {
57212
- this.onError?.(error);
57213
- return null;
57214
- }
57215
- };
57216
- this.set = async (key, value, options) => {
57217
- try {
57218
- const optionalHeaders = {};
57219
- if (options?.ttl) optionalHeaders[import_index.HEADERS_VERCEL_REVALIDATE] = options.ttl.toString();
57220
- if (options?.tags && options.tags.length > 0) optionalHeaders[import_index.HEADERS_VERCEL_CACHE_TAGS] = options.tags.join(",");
57221
- if (options?.name) optionalHeaders[import_index.HEADERS_VERCEL_CACHE_ITEM_NAME] = options.name;
57222
- const res = await fetch(`${this.endpoint}${key}`, {
57223
- method: "POST",
57224
- headers: {
57225
- ...this.headers,
57226
- ...optionalHeaders
57227
- },
57228
- body: JSON.stringify(value)
57229
- });
57230
- if (res.status !== 200) throw new Error(`Failed to set cache: ${res.status} ${res.statusText}`);
57231
- } catch (error) {
57232
- this.onError?.(error);
57233
- }
57234
- };
57235
- this.delete = async (key) => {
57236
- try {
57237
- const res = await fetch(`${this.endpoint}${key}`, {
57238
- method: "DELETE",
57239
- headers: this.headers
57240
- });
57241
- if (res.status !== 200) throw new Error(`Failed to delete cache: ${res.statusText}`);
57242
- } catch (error) {
57243
- this.onError?.(error);
57244
- }
57245
- };
57246
- this.expireTag = async (tag) => {
57247
- try {
57248
- if (Array.isArray(tag)) tag = tag.join(",");
57249
- const res = await fetch(`${this.endpoint}revalidate?tags=${tag}`, {
57250
- method: "POST",
57251
- headers: this.headers
57252
- });
57253
- if (res.status !== 200) throw new Error(`Failed to revalidate tag: ${res.statusText}`);
57254
- } catch (error) {
57255
- this.onError?.(error);
57256
- }
57257
- };
57258
- this.endpoint = endpoint;
57259
- this.headers = headers;
57260
- this.onError = onError;
57261
- }
57262
- };
57263
- 0 && (module.exports = { BuildCache });
57264
- }));
57265
- //#endregion
57266
- //#region ../../node_modules/.pnpm/@vercel+functions@2.2.13/node_modules/@vercel/functions/cache/index.js
57267
- var require_cache = /* @__PURE__ */ __commonJSMin(((exports, module) => {
57268
- var __defProp = Object.defineProperty;
57269
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
57270
- var __getOwnPropNames = Object.getOwnPropertyNames;
57271
- var __hasOwnProp = Object.prototype.hasOwnProperty;
57272
- var __export = (target, all) => {
57273
- for (var name in all) __defProp(target, name, {
57274
- get: all[name],
57275
- enumerable: true
57276
- });
57277
- };
57278
- var __copyProps = (to, from, except, desc) => {
57279
- if (from && typeof from === "object" || typeof from === "function") {
57280
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
57281
- get: () => from[key],
57282
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
57283
- });
57284
- }
57285
- return to;
57286
- };
57287
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
57288
- var cache_exports = {};
57289
- __export(cache_exports, {
57290
- HEADERS_VERCEL_CACHE_ITEM_NAME: () => HEADERS_VERCEL_CACHE_ITEM_NAME,
57291
- HEADERS_VERCEL_CACHE_STATE: () => HEADERS_VERCEL_CACHE_STATE,
57292
- HEADERS_VERCEL_CACHE_TAGS: () => HEADERS_VERCEL_CACHE_TAGS,
57293
- HEADERS_VERCEL_REVALIDATE: () => HEADERS_VERCEL_REVALIDATE,
57294
- PkgCacheState: () => PkgCacheState,
57295
- getCache: () => getCache
57296
- });
57297
- module.exports = __toCommonJS(cache_exports);
57298
- var import_get_context = require_get_context();
57299
- var import_in_memory_cache = require_in_memory_cache();
57300
- var import_build_client = require_build_client();
57301
- const defaultKeyHashFunction = (key) => {
57302
- let hash = 5381;
57303
- for (let i = 0; i < key.length; i++) hash = hash * 33 ^ key.charCodeAt(i);
57304
- return (hash >>> 0).toString(16);
57305
- };
57306
- const defaultNamespaceSeparator = "$";
57307
- let inMemoryCacheInstance = null;
57308
- let buildCacheInstance = null;
57309
- const getCache = (cacheOptions) => {
57310
- const resolveCache = () => {
57311
- let cache;
57312
- if ((0, import_get_context.getContext)().cache) cache = (0, import_get_context.getContext)().cache;
57313
- else cache = getCacheImplementation(process.env.SUSPENSE_CACHE_DEBUG === "true");
57314
- return cache;
57315
- };
57316
- return wrapWithKeyTransformation(resolveCache, createKeyTransformer(cacheOptions));
57317
- };
57318
- function createKeyTransformer(cacheOptions) {
57319
- const hashFunction = cacheOptions?.keyHashFunction || defaultKeyHashFunction;
57320
- return (key) => {
57321
- if (!cacheOptions?.namespace) return hashFunction(key);
57322
- const separator = cacheOptions.namespaceSeparator || defaultNamespaceSeparator;
57323
- return `${cacheOptions.namespace}${separator}${hashFunction(key)}`;
57324
- };
57325
- }
57326
- function wrapWithKeyTransformation(resolveCache, makeKey) {
57327
- return {
57328
- get: (key) => {
57329
- return resolveCache().get(makeKey(key));
57330
- },
57331
- set: (key, value, options) => {
57332
- return resolveCache().set(makeKey(key), value, options);
57333
- },
57334
- delete: (key) => {
57335
- return resolveCache().delete(makeKey(key));
57336
- },
57337
- expireTag: (tag) => {
57338
- return resolveCache().expireTag(tag);
57339
- }
57340
- };
57341
- }
57342
- let warnedCacheUnavailable = false;
57343
- function getCacheImplementation(debug) {
57344
- if (!inMemoryCacheInstance) inMemoryCacheInstance = new import_in_memory_cache.InMemoryCache();
57345
- if (process.env.RUNTIME_CACHE_DISABLE_BUILD_CACHE === "true") {
57346
- debug && console.log("Using InMemoryCache as build cache is disabled");
57347
- return inMemoryCacheInstance;
57348
- }
57349
- const { RUNTIME_CACHE_ENDPOINT, RUNTIME_CACHE_HEADERS } = process.env;
57350
- if (debug) console.log("Runtime cache environment variables:", {
57351
- RUNTIME_CACHE_ENDPOINT,
57352
- RUNTIME_CACHE_HEADERS
57353
- });
57354
- if (!RUNTIME_CACHE_ENDPOINT || !RUNTIME_CACHE_HEADERS) {
57355
- if (!warnedCacheUnavailable) {
57356
- console.warn("Runtime Cache unavailable in this environment. Falling back to in-memory cache.");
57357
- warnedCacheUnavailable = true;
57358
- }
57359
- return inMemoryCacheInstance;
57360
- }
57361
- if (!buildCacheInstance) {
57362
- let parsedHeaders = {};
57363
- try {
57364
- parsedHeaders = JSON.parse(RUNTIME_CACHE_HEADERS);
57365
- } catch (e) {
57366
- console.error("Failed to parse RUNTIME_CACHE_HEADERS:", e);
57367
- return inMemoryCacheInstance;
57368
- }
57369
- buildCacheInstance = new import_build_client.BuildCache({
57370
- endpoint: RUNTIME_CACHE_ENDPOINT,
57371
- headers: parsedHeaders,
57372
- onError: (error) => console.error(error)
57373
- });
57374
- }
57375
- return buildCacheInstance;
57376
- }
57377
- var PkgCacheState = /* @__PURE__ */ ((PkgCacheState2) => {
57378
- PkgCacheState2["Fresh"] = "fresh";
57379
- PkgCacheState2["Stale"] = "stale";
57380
- PkgCacheState2["Expired"] = "expired";
57381
- PkgCacheState2["NotFound"] = "notFound";
57382
- PkgCacheState2["Error"] = "error";
57383
- return PkgCacheState2;
57384
- })(PkgCacheState || {});
57385
- const HEADERS_VERCEL_CACHE_STATE = "x-vercel-cache-state";
57386
- const HEADERS_VERCEL_REVALIDATE = "x-vercel-revalidate";
57387
- const HEADERS_VERCEL_CACHE_TAGS = "x-vercel-cache-tags";
57388
- const HEADERS_VERCEL_CACHE_ITEM_NAME = "x-vercel-cache-item-name";
57389
- 0 && (module.exports = {
57390
- HEADERS_VERCEL_CACHE_ITEM_NAME,
57391
- HEADERS_VERCEL_CACHE_STATE,
57392
- HEADERS_VERCEL_CACHE_TAGS,
57393
- HEADERS_VERCEL_REVALIDATE,
57394
- PkgCacheState,
57395
- getCache
57396
- });
57397
- }));
57398
- //#endregion
57399
- //#region ../../node_modules/.pnpm/@vercel+functions@2.2.13/node_modules/@vercel/functions/db-connections/index.js
57400
- var require_db_connections = /* @__PURE__ */ __commonJSMin(((exports, module) => {
57401
- var __defProp = Object.defineProperty;
57402
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
57403
- var __getOwnPropNames = Object.getOwnPropertyNames;
57404
- var __hasOwnProp = Object.prototype.hasOwnProperty;
57405
- var __export = (target, all) => {
57406
- for (var name in all) __defProp(target, name, {
57407
- get: all[name],
57408
- enumerable: true
57409
- });
57410
- };
57411
- var __copyProps = (to, from, except, desc) => {
57412
- if (from && typeof from === "object" || typeof from === "function") {
57413
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
57414
- get: () => from[key],
57415
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
57416
- });
57417
- }
57418
- return to;
57419
- };
57420
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
57421
- var db_connections_exports = {};
57422
- __export(db_connections_exports, {
57423
- attachDatabasePool: () => attachDatabasePool,
57424
- experimental_attachDatabasePool: () => experimental_attachDatabasePool
57425
- });
57426
- module.exports = __toCommonJS(db_connections_exports);
57427
- var import_get_context = require_get_context();
57428
- const DEBUG = !!process.env.DEBUG;
57429
- function getIdleTimeout(dbPool) {
57430
- if ("options" in dbPool && dbPool.options) {
57431
- if ("idleTimeoutMillis" in dbPool.options) return typeof dbPool.options.idleTimeoutMillis === "number" ? dbPool.options.idleTimeoutMillis : 1e4;
57432
- if ("maxIdleTimeMS" in dbPool.options) return typeof dbPool.options.maxIdleTimeMS === "number" ? dbPool.options.maxIdleTimeMS : 0;
57433
- if ("status" in dbPool) return 5e3;
57434
- if ("connect" in dbPool && "execute" in dbPool) return 3e4;
57435
- }
57436
- if ("config" in dbPool && dbPool.config) {
57437
- if ("connectionConfig" in dbPool.config && dbPool.config.connectionConfig) return dbPool.config.connectionConfig.idleTimeout || 6e4;
57438
- if ("idleTimeout" in dbPool.config) return typeof dbPool.config.idleTimeout === "number" ? dbPool.config.idleTimeout : 6e4;
57439
- }
57440
- if ("poolTimeout" in dbPool) return typeof dbPool.poolTimeout === "number" ? dbPool.poolTimeout : 6e4;
57441
- if ("idleTimeout" in dbPool) return typeof dbPool.idleTimeout === "number" ? dbPool.idleTimeout : 0;
57442
- return 1e4;
57443
- }
57444
- let idleTimeout = null;
57445
- let idleTimeoutResolve = () => {};
57446
- const bootTime = Date.now();
57447
- const maximumDuration = 900 * 1e3 - 1e3;
57448
- function waitUntilIdleTimeout(dbPool) {
57449
- if (!process.env.VERCEL_URL) return;
57450
- if (idleTimeout) {
57451
- clearTimeout(idleTimeout);
57452
- idleTimeoutResolve();
57453
- }
57454
- const promise = new Promise((resolve) => {
57455
- idleTimeoutResolve = resolve;
57456
- });
57457
- const waitTime = Math.min(getIdleTimeout(dbPool) + 100, maximumDuration - (Date.now() - bootTime));
57458
- idleTimeout = setTimeout(() => {
57459
- idleTimeoutResolve?.();
57460
- if (DEBUG) console.log("Database pool idle timeout reached. Releasing connections.");
57461
- }, waitTime);
57462
- const requestContext = (0, import_get_context.getContext)();
57463
- if (requestContext?.waitUntil) requestContext.waitUntil(promise);
57464
- else console.warn("Pool release event triggered outside of request scope.");
57465
- }
57466
- function attachDatabasePool(dbPool) {
57467
- if (idleTimeout) {
57468
- idleTimeoutResolve?.();
57469
- clearTimeout(idleTimeout);
57470
- }
57471
- if ("on" in dbPool && dbPool.on && "options" in dbPool && "idleTimeoutMillis" in dbPool.options) {
57472
- dbPool.on("release", () => {
57473
- if (DEBUG) console.log("Client released from pool");
57474
- waitUntilIdleTimeout(dbPool);
57475
- });
57476
- return;
57477
- } else if ("on" in dbPool && dbPool.on && "config" in dbPool && dbPool.config && "connectionConfig" in dbPool.config) {
57478
- dbPool.on("release", () => {
57479
- if (DEBUG) console.log("MySQL client released from pool");
57480
- waitUntilIdleTimeout(dbPool);
57481
- });
57482
- return;
57483
- } else if ("on" in dbPool && dbPool.on && "config" in dbPool && dbPool.config && "idleTimeout" in dbPool.config) {
57484
- dbPool.on("release", () => {
57485
- if (DEBUG) console.log("MySQL2/MariaDB client released from pool");
57486
- waitUntilIdleTimeout(dbPool);
57487
- });
57488
- return;
57489
- }
57490
- if ("on" in dbPool && dbPool.on && "options" in dbPool && dbPool.options && "maxIdleTimeMS" in dbPool.options) {
57491
- dbPool.on("connectionCheckedOut", () => {
57492
- if (DEBUG) console.log("MongoDB connection checked out");
57493
- waitUntilIdleTimeout(dbPool);
57494
- });
57495
- return;
57496
- }
57497
- if ("on" in dbPool && dbPool.on && "options" in dbPool && dbPool.options && "socket" in dbPool.options) {
57498
- dbPool.on("end", () => {
57499
- if (DEBUG) console.log("Redis connection ended");
57500
- waitUntilIdleTimeout(dbPool);
57501
- });
57502
- return;
57503
- }
57504
- throw new Error("Unsupported database pool type");
57505
- }
57506
- const experimental_attachDatabasePool = attachDatabasePool;
57507
- 0 && (module.exports = {
57508
- attachDatabasePool,
57509
- experimental_attachDatabasePool
57510
- });
57511
- }));
57512
- //#endregion
57513
- //#region ../../node_modules/.pnpm/@vercel+functions@2.2.13/node_modules/@vercel/functions/index.js
57514
- var require_functions = /* @__PURE__ */ __commonJSMin(((exports, module) => {
57515
- var __defProp = Object.defineProperty;
57516
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
57517
- var __getOwnPropNames = Object.getOwnPropertyNames;
57518
- var __hasOwnProp = Object.prototype.hasOwnProperty;
57519
- var __export = (target, all) => {
57520
- for (var name in all) __defProp(target, name, {
57521
- get: all[name],
57522
- enumerable: true
57523
- });
57524
- };
57525
- var __copyProps = (to, from, except, desc) => {
57526
- if (from && typeof from === "object" || typeof from === "function") {
57527
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
57528
- get: () => from[key],
57529
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
57530
- });
57531
- }
57532
- return to;
57533
- };
57534
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
57535
- var src_exports = {};
57536
- __export(src_exports, {
57537
- attachDatabasePool: () => import_db_connections.attachDatabasePool,
57538
- experimental_attachDatabasePool: () => import_db_connections.experimental_attachDatabasePool,
57539
- geolocation: () => import_headers.geolocation,
57540
- getCache: () => import_cache.getCache,
57541
- getEnv: () => import_get_env.getEnv,
57542
- ipAddress: () => import_headers.ipAddress,
57543
- next: () => import_middleware.next,
57544
- rewrite: () => import_middleware.rewrite,
57545
- waitUntil: () => import_wait_until.waitUntil
57546
- });
57547
- module.exports = __toCommonJS(src_exports);
57548
- var import_headers = require_headers();
57549
- var import_get_env = require_get_env();
57550
- var import_wait_until = require_wait_until();
57551
- var import_middleware = require_middleware();
57552
- var import_cache = require_cache();
57553
- var import_db_connections = require_db_connections();
57554
- 0 && (module.exports = {
57555
- attachDatabasePool,
57556
- experimental_attachDatabasePool,
57557
- geolocation,
57558
- getCache,
57559
- getEnv,
57560
- ipAddress,
57561
- next,
57562
- rewrite,
57563
- waitUntil
57564
- });
57565
- }));
57566
- //#endregion
57567
- //#region ../../node_modules/.pnpm/next-axiom@1.10.0_next@16.2.9_@opentelemetry+api@1.9.1_@playwright+test@1.61.0_react-do_4315f05d6e55f50fff8ada7e553b82cf/node_modules/next-axiom/dist/withAxiom.js
57568
- var require_withAxiom = /* @__PURE__ */ __commonJSMin(((exports) => {
57569
- Object.defineProperty(exports, "__esModule", { value: true });
57570
- exports.withAxiomNextConfig = withAxiomNextConfig;
57571
- exports.withAxiomRouteHandler = withAxiomRouteHandler;
57572
- exports.withAxiom = withAxiom;
57573
- const functions_1 = require_functions();
57574
- const config_1 = require_config();
57575
- const logger_1 = require_logger();
57576
- const shared_1 = require_shared();
57577
- function applyAxiomRewrites(nextConfig) {
57578
- return {
57579
- ...nextConfig,
57580
- rewrites: async () => {
57581
- const rewrites = await nextConfig.rewrites?.();
57582
- const webVitalsEndpoint = config_1.config.getIngestURL(shared_1.EndpointType.webVitals);
57583
- const logsEndpoint = config_1.config.getIngestURL(shared_1.EndpointType.logs);
57584
- if (!webVitalsEndpoint && !logsEndpoint) {
57585
- const log = new logger_1.Logger();
57586
- log.warn("axiom: Envvars not detected. If this is production please see https://github.com/axiomhq/next-axiom for help");
57587
- log.warn("axiom: Sending Web Vitals to /dev/null");
57588
- log.warn("axiom: Sending logs to console");
57589
- return rewrites || [];
57590
- }
57591
- const axiomRewrites = [{
57592
- source: `${config_1.config.proxyPath}/web-vitals`,
57593
- destination: webVitalsEndpoint,
57594
- basePath: false
57595
- }, {
57596
- source: `${config_1.config.proxyPath}/logs`,
57597
- destination: logsEndpoint,
57598
- basePath: false
57599
- }];
57600
- if (!rewrites) return axiomRewrites;
57601
- else if (Array.isArray(rewrites)) return rewrites.concat(axiomRewrites);
57602
- else {
57603
- rewrites.afterFiles = (rewrites.afterFiles || []).concat(axiomRewrites);
57604
- return rewrites;
57605
- }
57606
- }
57607
- };
57608
- }
57609
- function withAxiomNextConfig(nextConfigOrFn) {
57610
- if (typeof nextConfigOrFn === "function") return async (phase, ctx) => {
57611
- const nextConfig = await nextConfigOrFn(phase, ctx);
57612
- return applyAxiomRewrites(Object.assign({}, nextConfig));
57613
- };
57614
- return applyAxiomRewrites(Object.assign({}, nextConfigOrFn));
57615
- }
57616
- function withAxiomRouteHandler(handler, config) {
57617
- return async (req, arg) => {
57618
- let region = "";
57619
- if ("geo" in req) region = req.geo?.region ?? "";
57620
- let pathname = "";
57621
- if ("nextUrl" in req) pathname = req.nextUrl.pathname;
57622
- else if (req instanceof Request) pathname = new URL(req.url).pathname;
57623
- const requestDetails = Array.isArray(config?.logRequestDetails) || config?.logRequestDetails === true ? await (0, shared_1.requestToJSON)(req) : void 0;
57624
- const report = {
57625
- startTime: (/* @__PURE__ */ new Date()).getTime(),
57626
- endTime: (/* @__PURE__ */ new Date()).getTime(),
57627
- path: pathname,
57628
- method: req.method,
57629
- host: req.headers.get("host"),
57630
- userAgent: req.headers.get("user-agent"),
57631
- scheme: req.url.split("://")[0],
57632
- ip: req.headers.get("x-forwarded-for"),
57633
- region,
57634
- details: Array.isArray(config?.logRequestDetails) ? Object.fromEntries(Object.entries(requestDetails).filter(([key]) => (config?.logRequestDetails).includes(key))) : requestDetails
57635
- };
57636
- const logger = new logger_1.Logger({
57637
- req: report,
57638
- source: config_1.isEdgeRuntime ? "edge" : "lambda"
57639
- });
57640
- const log = logger.with({});
57641
- log.config.source = `${config_1.isEdgeRuntime ? "edge" : "lambda"}${!config_1.isVercelIntegration ? "-log" : ""}`;
57642
- const axiomContext = req;
57643
- const args = arg;
57644
- axiomContext.log = log;
57645
- try {
57646
- const result = await handler(axiomContext, args);
57647
- report.endTime = (/* @__PURE__ */ new Date()).getTime();
57648
- report.statusCode = result.status;
57649
- report.durationMs = report.endTime - report.startTime;
57650
- if (!config_1.isVercelIntegration) logger.logHttpRequest(logger_1.LogLevel.info, `${req.method} ${report.path} ${report.statusCode} in ${report.endTime - report.startTime}ms`, report, {});
57651
- log.attachResponseStatus(result.status);
57652
- if (config_1.isVercel) (0, functions_1.waitUntil)(logger.flush());
57653
- else await logger.flush();
57654
- return result;
57655
- } catch (error) {
57656
- report.endTime = (/* @__PURE__ */ new Date()).getTime();
57657
- let statusCode = 500;
57658
- let logLevel = logger_1.LogLevel.error;
57659
- if (error instanceof Error) {
57660
- if (error.message === "NEXT_NOT_FOUND") {
57661
- logLevel = config?.notFoundLogLevel ?? logger_1.LogLevel.warn;
57662
- statusCode = 404;
57663
- } else if (error.message === "NEXT_REDIRECT") {
57664
- logLevel = config?.redirectLogLevel ?? logger_1.LogLevel.info;
57665
- const e = error;
57666
- if (e.digest) {
57667
- const d = e.digest.split(";");
57668
- statusCode = parseInt(d[3]);
57669
- } else statusCode = 307;
57670
- }
57671
- }
57672
- report.statusCode = statusCode;
57673
- report.durationMs = report.endTime - report.startTime;
57674
- if (!config_1.isVercelIntegration) logger.logHttpRequest(logLevel, `${req.method} ${report.path} ${report.statusCode} in ${report.endTime - report.startTime}ms`, report, {});
57675
- log.log(logLevel, error.message, { error });
57676
- log.attachResponseStatus(statusCode);
57677
- if (config_1.isVercel) (0, functions_1.waitUntil)(logger.flush());
57678
- else await logger.flush();
57679
- throw error;
57680
- }
57681
- };
57682
- }
57683
- function isNextConfig(param) {
57684
- return typeof param == "object";
57685
- }
57686
- function isNextConfigFn(param) {
57687
- return typeof param === "function" && param.length === 2;
57688
- }
57689
- function withAxiom(param, config) {
57690
- if (typeof param == "function") {
57691
- if (isNextConfigFn(param)) return withAxiomNextConfig(param);
57692
- return withAxiomRouteHandler(param, config);
57693
- } else if (isNextConfig(param)) return withAxiomNextConfig(param);
57694
- return withAxiomRouteHandler(param, config);
57695
- }
57696
- }));
57697
- //#endregion
57698
- //#region ../../node_modules/.pnpm/next-axiom@1.10.0_next@16.2.9_@opentelemetry+api@1.9.1_@playwright+test@1.61.0_react-do_4315f05d6e55f50fff8ada7e553b82cf/node_modules/next-axiom/dist/webVitals/webVitals.js
57699
- var require_webVitals$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
57700
- Object.defineProperty(exports, "__esModule", { value: true });
57701
- exports.reportWebVitalsWithPath = reportWebVitalsWithPath;
57702
- const config_1 = require_config();
57703
- const shared_1 = require_shared();
57704
- const url = config_1.config.getWebVitalsEndpoint();
57705
- const throttledSendMetrics = (0, shared_1.throttle)(sendMetrics, 1e3);
57706
- let collectedMetrics = [];
57707
- function reportWebVitalsWithPath(metric, route) {
57708
- collectedMetrics.push({
57709
- route,
57710
- ...metric
57711
- });
57712
- if (!config_1.config.isEnvVarsSet()) return;
57713
- throttledSendMetrics();
57714
- }
57715
- function sendMetrics() {
57716
- const body = JSON.stringify(config_1.config.wrapWebVitalsObject(collectedMetrics));
57717
- const headers = {
57718
- "Content-Type": "application/json",
57719
- "User-Agent": "next-axiom/v" + config_1.Version
57720
- };
57721
- if (config_1.config.token) headers["Authorization"] = `Bearer ${config_1.config.token}`;
57722
- const reqOptions = {
57723
- body,
57724
- method: "POST",
57725
- keepalive: true,
57726
- headers
57727
- };
57728
- function sendFallback() {
57729
- fetch(url, reqOptions).catch(console.error);
57730
- }
57731
- if (config_1.isBrowser && config_1.isVercelIntegration && navigator.sendBeacon) try {
57732
- navigator.sendBeacon.bind(navigator)(url, body);
57733
- } catch (err) {
57734
- sendFallback();
57735
- }
57736
- else sendFallback();
57737
- collectedMetrics = [];
57738
- }
57739
- }));
57740
- //#endregion
57741
- //#region ../../node_modules/.pnpm/next-axiom@1.10.0_next@16.2.9_@opentelemetry+api@1.9.1_@playwright+test@1.61.0_react-do_4315f05d6e55f50fff8ada7e553b82cf/node_modules/next-axiom/dist/webVitals/components.js
57742
- var require_components = /* @__PURE__ */ __commonJSMin(((exports) => {
57743
- var __importDefault = exports && exports.__importDefault || function(mod) {
57744
- return mod && mod.__esModule ? mod : { "default": mod };
57745
- };
57746
- Object.defineProperty(exports, "__esModule", { value: true });
57747
- exports.AxiomWebVitals = AxiomWebVitals;
57748
- const react_1$2 = __importDefault(__require("react"));
57749
- const _1 = require_webVitals();
57750
- function AxiomWebVitals({ path }) {
57751
- (0, _1.useReportWebVitals)(path);
57752
- return react_1$2.default.createElement(react_1$2.default.Fragment, null);
57753
- }
57754
- }));
57755
- //#endregion
57756
- //#region ../../node_modules/.pnpm/next-axiom@1.10.0_next@16.2.9_@opentelemetry+api@1.9.1_@playwright+test@1.61.0_react-do_4315f05d6e55f50fff8ada7e553b82cf/node_modules/next-axiom/dist/webVitals/index.js
57757
- var require_webVitals = /* @__PURE__ */ __commonJSMin(((exports) => {
57758
- Object.defineProperty(exports, "__esModule", { value: true });
57759
- exports.AxiomWebVitals = void 0;
57760
- exports.useReportWebVitals = useReportWebVitals;
57761
- const navigation_1$1 = __require("next/navigation.js");
57762
- const web_vitals_1 = __require("next/web-vitals.js");
57763
- const webVitals_1 = require_webVitals$1();
57764
- const react_1$1 = __require("react");
57765
- var components_1 = require_components();
57766
- Object.defineProperty(exports, "AxiomWebVitals", {
57767
- enumerable: true,
57768
- get: function() {
57769
- return components_1.AxiomWebVitals;
57770
- }
57771
- });
57772
- function useReportWebVitals(path) {
57773
- const pathName = (0, navigation_1$1.usePathname)();
57774
- /**
57775
- * Refs allows us to stabilize the path name so that we can properly stabilize the reportWebVitalsFn
57776
- */
57777
- const stabilizedPath = (0, react_1$1.useRef)(path || pathName);
57778
- /**
57779
- * If the path changes, we update the stabilizedPath ref
57780
- */
57781
- if (typeof path === "string" && path !== stabilizedPath.current) stabilizedPath.current = pathName;
57782
- else if (typeof path === "string" && path === stabilizedPath.current) stabilizedPath.current = path;
57783
- /**
57784
- * Stabilizing the reportWebVitalsFn avoids reporting the same metrics from multiple paths, it happens because internally
57785
- * the useReportWebVitals from next uses a useEffect to report the metrics, and the reportWebVitalsFn is passed as a dependency
57786
- * to the useEffect, so when the path changes, the useEffect is re-run, and the same metrics are reported again.
57787
- */
57788
- const reportWebVitalsFn = (0, react_1$1.useCallback)((metric) => (0, webVitals_1.reportWebVitalsWithPath)(metric, stabilizedPath.current), []);
57789
- (0, web_vitals_1.useReportWebVitals)(reportWebVitalsFn);
57790
- }
57791
- }));
57792
- //#endregion
57793
- //#region ../../node_modules/.pnpm/dequal@2.0.3/node_modules/dequal/dist/index.js
57794
- var require_dist$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
57795
- var has = Object.prototype.hasOwnProperty;
57796
- function find(iter, tar, key) {
57797
- for (key of iter.keys()) if (dequal(key, tar)) return key;
57798
- }
57799
- function dequal(foo, bar) {
57800
- var ctor, len, tmp;
57801
- if (foo === bar) return true;
57802
- if (foo && bar && (ctor = foo.constructor) === bar.constructor) {
57803
- if (ctor === Date) return foo.getTime() === bar.getTime();
57804
- if (ctor === RegExp) return foo.toString() === bar.toString();
57805
- if (ctor === Array) {
57806
- if ((len = foo.length) === bar.length) while (len-- && dequal(foo[len], bar[len]));
57807
- return len === -1;
57808
- }
57809
- if (ctor === Set) {
57810
- if (foo.size !== bar.size) return false;
57811
- for (len of foo) {
57812
- tmp = len;
57813
- if (tmp && typeof tmp === "object") {
57814
- tmp = find(bar, tmp);
57815
- if (!tmp) return false;
57816
- }
57817
- if (!bar.has(tmp)) return false;
57818
- }
57819
- return true;
57820
- }
57821
- if (ctor === Map) {
57822
- if (foo.size !== bar.size) return false;
57823
- for (len of foo) {
57824
- tmp = len[0];
57825
- if (tmp && typeof tmp === "object") {
57826
- tmp = find(bar, tmp);
57827
- if (!tmp) return false;
57828
- }
57829
- if (!dequal(len[1], bar.get(tmp))) return false;
57830
- }
57831
- return true;
57832
- }
57833
- if (ctor === ArrayBuffer) {
57834
- foo = new Uint8Array(foo);
57835
- bar = new Uint8Array(bar);
57836
- } else if (ctor === DataView) {
57837
- if ((len = foo.byteLength) === bar.byteLength) while (len-- && foo.getInt8(len) === bar.getInt8(len));
57838
- return len === -1;
57839
- }
57840
- if (ArrayBuffer.isView(foo)) {
57841
- if ((len = foo.byteLength) === bar.byteLength) while (len-- && foo[len] === bar[len]);
57842
- return len === -1;
57843
- }
57844
- if (!ctor || typeof foo === "object") {
57845
- len = 0;
57846
- for (ctor in foo) {
57847
- if (has.call(foo, ctor) && ++len && !has.call(bar, ctor)) return false;
57848
- if (!(ctor in bar) || !dequal(foo[ctor], bar[ctor])) return false;
57849
- }
57850
- return Object.keys(bar).length === len;
57851
- }
57852
- }
57853
- return foo !== foo && bar !== bar;
57854
- }
57855
- exports.dequal = dequal;
57856
- }));
57857
- //#endregion
57858
- //#region ../../node_modules/.pnpm/use-deep-compare@1.3.0_react@19.2.7/node_modules/use-deep-compare/dist-node/index.js
57859
- var require_dist_node = /* @__PURE__ */ __commonJSMin(((exports) => {
57860
- Object.defineProperty(exports, "__esModule", { value: true });
57861
- function _interopDefault(ex) {
57862
- return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex;
57863
- }
57864
- var React$2 = _interopDefault(__require("react"));
57865
- var dequal = require_dist$1();
57866
- function useDeepCompareMemoize(dependencies) {
57867
- const dependenciesRef = React$2.useRef(dependencies);
57868
- const signalRef = React$2.useRef(0);
57869
- if (!dequal.dequal(dependencies, dependenciesRef.current)) {
57870
- dependenciesRef.current = dependencies;
57871
- signalRef.current += 1;
57872
- }
57873
- return React$2.useMemo(() => dependenciesRef.current, [signalRef.current]);
57874
- }
57875
- /**
57876
- * `useDeepCompareCallback` will return a memoized version of the callback that
57877
- * only changes if one of the `dependencies` has changed.
57878
- *
57879
- * Warning: `useDeepCompareCallback` should not be used with dependencies that
57880
- * are all primitive values. Use `React.useCallback` instead.
57881
- *
57882
- * @see {@link https://react.dev/reference/react/useCallback}
57883
- */
57884
- function useDeepCompareCallback(callback, dependencies) {
57885
- return React$2.useCallback(callback, useDeepCompareMemoize(dependencies));
57886
- }
57887
- /**
57888
- * Accepts a function that contains imperative, possibly effectful code.
57889
- *
57890
- * Warning: `useDeepCompareEffect` should not be used with dependencies that
57891
- * are all primitive values. Use `React.useEffect` instead.
57892
- *
57893
- * @see {@link https://react.dev/reference/react/useEffect}
57894
- */
57895
- function useDeepCompareEffect(effect, dependencies) {
57896
- React$2.useEffect(effect, useDeepCompareMemoize(dependencies));
57897
- }
57898
- /**
57899
- * `useDeepCompareImperativeHandle` customizes the instance value that is exposed to parent components when using `ref`.
57900
- * As always, imperative code using refs should be avoided in most cases.
57901
- *
57902
- * `useDeepCompareImperativeHandle` should be used with `React.forwardRef`.
57903
- *
57904
- * It's similar to `useImperativeHandle`, but uses deep comparison on the dependencies.
57905
- *
57906
- * Warning: `useDeepCompareImperativeHandle` should not be used with dependencies that
57907
- * are all primitive values. Use `React.useImperativeHandle` instead.
57908
- *
57909
- * @see {@link https://react.dev/reference/react/useImperativeHandle}
57910
- */
57911
- function useDeepCompareImperativeHandle(ref, init, dependencies) {
57912
- React$2.useImperativeHandle(ref, init, useDeepCompareMemoize(dependencies));
57913
- }
57914
- /**
57915
- * The signature is identical to `useDeepCompareEffect`, but it fires synchronously after all DOM mutations.
57916
- * Use this to read layout from the DOM and synchronously re-render. Updates scheduled inside
57917
- * `useDeepCompareLayoutEffect` will be flushed synchronously, before the browser has a chance to paint.
57918
- *
57919
- * Prefer the standard `useDeepCompareEffect` when possible to avoid blocking visual updates.
57920
- *
57921
- * If you’re migrating code from a class component, `useDeepCompareLayoutEffect` fires in the same phase as
57922
- * `componentDidMount` and `componentDidUpdate`.
57923
- *
57924
- * Warning: `useDeepCompareLayoutEffect` should not be used with dependencies that
57925
- * are all primitive values. Use `React.useLayoutEffect` instead.
57926
- *
57927
- * @see {@link https://react.dev/reference/react/useLayoutEffect}
57928
- */
57929
- function useDeepCompareLayoutEffect(effect, dependencies) {
57930
- React$2.useLayoutEffect(effect, useDeepCompareMemoize(dependencies));
57931
- }
57932
- /**
57933
- * `useDeepCompareMemo` will only recompute the memoized value when one of the
57934
- * `dependencies` has changed.
57935
- *
57936
- * Warning: `useDeepCompareMemo` should not be used with dependencies that
57937
- * are all primitive values. Use `React.useMemo` instead.
57938
- *
57939
- * @see {@link https://react.dev/reference/react/useMemo}
57940
- */
57941
- function useDeepCompareMemo(factory, dependencies) {
57942
- return React$2.useMemo(factory, useDeepCompareMemoize(dependencies));
57943
- }
57944
- exports.useDeepCompareCallback = useDeepCompareCallback;
57945
- exports.useDeepCompareEffect = useDeepCompareEffect;
57946
- exports.useDeepCompareImperativeHandle = useDeepCompareImperativeHandle;
57947
- exports.useDeepCompareLayoutEffect = useDeepCompareLayoutEffect;
57948
- exports.useDeepCompareMemo = useDeepCompareMemo;
57949
- }));
57950
- //#endregion
57951
- //#region ../../node_modules/.pnpm/next-axiom@1.10.0_next@16.2.9_@opentelemetry+api@1.9.1_@playwright+test@1.61.0_react-do_4315f05d6e55f50fff8ada7e553b82cf/node_modules/next-axiom/dist/hooks.js
57952
- var require_hooks = /* @__PURE__ */ __commonJSMin(((exports) => {
57953
- Object.defineProperty(exports, "__esModule", { value: true });
57954
- exports.useLogger = useLogger;
57955
- const navigation_1 = __require("next/navigation.js");
57956
- const logger_1 = require_logger();
57957
- const react_1 = __require("react");
57958
- const use_deep_compare_1 = require_dist_node();
57959
- function useLogger(config = {}) {
57960
- const path = (0, navigation_1.usePathname)();
57961
- const memoizedConfig = (0, use_deep_compare_1.useDeepCompareMemo)(() => ({
57962
- ...config,
57963
- args: {
57964
- ...config.args ?? {},
57965
- path
57966
- }
57967
- }), [config, path]);
57968
- const logger = (0, react_1.useMemo)(() => new logger_1.Logger(memoizedConfig), [memoizedConfig]);
57969
- (0, react_1.useEffect)(() => {
57970
- return () => {
57971
- if (logger) logger.flush();
57972
- };
57973
- }, [path]);
57974
- return logger;
57975
- }
57976
- }));
57977
- //#endregion
57978
- //#region ../../node_modules/.pnpm/next-axiom@1.10.0_next@16.2.9_@opentelemetry+api@1.9.1_@playwright+test@1.61.0_react-do_4315f05d6e55f50fff8ada7e553b82cf/node_modules/next-axiom/dist/index.js
57979
- var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
57980
- var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
57981
- if (k2 === void 0) k2 = k;
57982
- var desc = Object.getOwnPropertyDescriptor(m, k);
57983
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) desc = {
57984
- enumerable: true,
57985
- get: function() {
57986
- return m[k];
57987
- }
57988
- };
57989
- Object.defineProperty(o, k2, desc);
57990
- }) : (function(o, m, k, k2) {
57991
- if (k2 === void 0) k2 = k;
57992
- o[k2] = m[k];
57993
- }));
57994
- var __exportStar = exports && exports.__exportStar || function(m, exports$1) {
57995
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports$1, p)) __createBinding(exports$1, m, p);
57996
- };
57997
- Object.defineProperty(exports, "__esModule", { value: true });
57998
- exports.useLogger = exports.withAxiomRouteHandler = exports.withAxiomNextConfig = exports.withAxiom = exports.throttle = exports.EndpointType = exports.LogLevel = exports.Logger = exports.log = void 0;
57999
- var logger_1 = require_logger();
58000
- Object.defineProperty(exports, "log", {
58001
- enumerable: true,
58002
- get: function() {
58003
- return logger_1.log;
58004
- }
58005
- });
58006
- Object.defineProperty(exports, "Logger", {
58007
- enumerable: true,
58008
- get: function() {
58009
- return logger_1.Logger;
58010
- }
58011
- });
58012
- Object.defineProperty(exports, "LogLevel", {
58013
- enumerable: true,
58014
- get: function() {
58015
- return logger_1.LogLevel;
58016
- }
58017
- });
58018
- var shared_1 = require_shared();
58019
- Object.defineProperty(exports, "EndpointType", {
58020
- enumerable: true,
58021
- get: function() {
58022
- return shared_1.EndpointType;
58023
- }
58024
- });
58025
- Object.defineProperty(exports, "throttle", {
58026
- enumerable: true,
58027
- get: function() {
58028
- return shared_1.throttle;
58029
- }
58030
- });
58031
- __exportStar(require_base(), exports);
58032
- __exportStar(require_config(), exports);
58033
- var withAxiom_1 = require_withAxiom();
58034
- Object.defineProperty(exports, "withAxiom", {
58035
- enumerable: true,
58036
- get: function() {
58037
- return withAxiom_1.withAxiom;
58038
- }
58039
- });
58040
- Object.defineProperty(exports, "withAxiomNextConfig", {
58041
- enumerable: true,
58042
- get: function() {
58043
- return withAxiom_1.withAxiomNextConfig;
58044
- }
58045
- });
58046
- Object.defineProperty(exports, "withAxiomRouteHandler", {
58047
- enumerable: true,
58048
- get: function() {
58049
- return withAxiom_1.withAxiomRouteHandler;
58050
- }
58051
- });
58052
- __exportStar(require_webVitals(), exports);
58053
- var hooks_1 = require_hooks();
58054
- Object.defineProperty(exports, "useLogger", {
58055
- enumerable: true,
58056
- get: function() {
58057
- return hooks_1.useLogger;
58058
- }
58059
- });
58060
- }));
58061
- //#endregion
58062
55677
  //#region ../logger/src/sanitize.ts
58063
55678
  function truncate(input, maxLength) {
58064
55679
  if (input.length <= maxLength) return input;
@@ -58143,28 +55758,44 @@ var init_sanitize = __esmMin((() => {
58143
55758
  ]);
58144
55759
  }));
58145
55760
  //#endregion
58146
- //#region ../logger/src/next.ts
58147
- function wrap(base = import_dist.log) {
55761
+ //#region ../logger/src/console.ts
55762
+ function formatLog(level, message, fields) {
55763
+ const entry = {
55764
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
55765
+ level,
55766
+ message,
55767
+ ...sanitizeLogFields(fields)
55768
+ };
55769
+ return JSON.stringify(entry);
55770
+ }
55771
+ function createLogger(baseFields = {}) {
58148
55772
  return {
58149
- debug: (message, fields) => base.debug(message, sanitizeLogFields(fields)),
58150
- info: (message, fields) => base.info(message, sanitizeLogFields(fields)),
58151
- warn: (message, fields) => base.warn(message, sanitizeLogFields(fields)),
58152
- error: (message, fields) => base.error(message, sanitizeLogFields(fields)),
58153
- withFields: (fields) => wrap(base.with(sanitizeLogFields(fields) ?? {}))
55773
+ debug: (msg, fields) => console.debug(formatLog("debug", msg, {
55774
+ ...baseFields,
55775
+ ...fields
55776
+ })),
55777
+ info: (msg, fields) => console.info(formatLog("info", msg, {
55778
+ ...baseFields,
55779
+ ...fields
55780
+ })),
55781
+ warn: (msg, fields) => console.warn(formatLog("warn", msg, {
55782
+ ...baseFields,
55783
+ ...fields
55784
+ })),
55785
+ error: (msg, fields) => console.error(formatLog("error", msg, {
55786
+ ...baseFields,
55787
+ ...fields
55788
+ })),
55789
+ withFields: (fields) => createLogger({
55790
+ ...baseFields,
55791
+ ...fields
55792
+ })
58154
55793
  };
58155
55794
  }
58156
- var import_dist, logger;
58157
- var init_next = __esmMin((() => {
58158
- import_dist = require_dist();
55795
+ var logger;
55796
+ var init_console = __esmMin((() => {
58159
55797
  init_sanitize();
58160
- logger = wrap();
58161
- }));
58162
- var init_context$1 = __esmMin((() => {}));
58163
- //#endregion
58164
- //#region ../logger/src/index.ts
58165
- var init_src$1 = __esmMin((() => {
58166
- init_next();
58167
- init_context$1();
55798
+ logger = createLogger();
58168
55799
  }));
58169
55800
  //#endregion
58170
55801
  //#region ../blocks/src/system/runtime/nodes/richText-coerce.ts
@@ -58192,7 +55823,7 @@ function coerceRichTextDoc(value, source) {
58192
55823
  return null;
58193
55824
  }
58194
55825
  var init_richText_coerce = __esmMin((() => {
58195
- init_src$1();
55826
+ init_console();
58196
55827
  init_richTextSchema();
58197
55828
  }));
58198
55829
  //#endregion
@@ -59713,12 +57344,12 @@ function getBookingSuccessMessage(successMessage) {
59713
57344
  }
59714
57345
  var init_booking_form_state = __esmMin((() => {
59715
57346
  init_dist$1();
59716
- init_src$4();
57347
+ init_src$3();
59717
57348
  init_booking_form_reserved_fields();
59718
57349
  }));
59719
57350
  var bookingFieldOptionSchema, bookingFieldSchema, bookingSettingsSchema, bookingSourceFormSchema;
59720
57351
  var init_booking_runtime_sources = __esmMin((() => {
59721
- init_src$1();
57352
+ init_console();
59722
57353
  bookingFieldOptionSchema = z$1.object({
59723
57354
  value: z$1.string(),
59724
57355
  label: z$1.string()
@@ -60119,7 +57750,7 @@ function selectEventDetails(args) {
60119
57750
  };
60120
57751
  }
60121
57752
  var init_logic = __esmMin((() => {
60122
- init_src$4();
57753
+ init_src$3();
60123
57754
  init_eventProductEligibility();
60124
57755
  }));
60125
57756
  //#endregion
@@ -60328,7 +57959,7 @@ function EventDetailsView({ selection, showVenue, showMap, showOtherDates, showC
60328
57959
  });
60329
57960
  }
60330
57961
  var init_view$1 = __esmMin((() => {
60331
- init_src$4();
57962
+ init_src$3();
60332
57963
  init_shared$3();
60333
57964
  init_pricing$1();
60334
57965
  init_utils$3();
@@ -60516,7 +58147,7 @@ function eventSeriesIdsForSubject(subject) {
60516
58147
  }
60517
58148
  }
60518
58149
  var init_course_page_surface_scope = __esmMin((() => {
60519
- init_src$4();
58150
+ init_src$3();
60520
58151
  }));
60521
58152
  //#endregion
60522
58153
  //#region ../blocks/src/system/runtime/nodes/course-details/logic.ts
@@ -60613,7 +58244,7 @@ function selectCourseDetails(args) {
60613
58244
  }
60614
58245
  //#endregion
60615
58246
  //#region ../blocks/src/system/runtime/nodes/course-details/runs.ts
60616
- init_src$4();
58247
+ init_src$3();
60617
58248
  function toValidDate(value) {
60618
58249
  if (!value) return null;
60619
58250
  const date = new Date(value);
@@ -60806,7 +58437,7 @@ function CourseDetailsView(props) {
60806
58437
  }
60807
58438
  //#endregion
60808
58439
  //#region ../blocks/src/system/runtime/nodes/course-details.server.tsx
60809
- init_src$4();
58440
+ init_src$3();
60810
58441
  function CourseDetailsSSR({ courses, contentEntry, entrySubrouteContext, subject, courseSlug, showTitle, showDescription, showSessions, sessionsLimit, showVenue, showPrice, showCapacity, showEnrollmentStatus, showMembershipNote, className, children }) {
60811
58442
  const selection = selectCourseDetails({
60812
58443
  courses: courses ?? null,
@@ -61336,7 +58967,7 @@ function localDateParts(isoTimestamp, timeZone) {
61336
58967
  }
61337
58968
  //#endregion
61338
58969
  //#region ../blocks/src/system/runtime/nodes/offerings-preview.tsx
61339
- init_src$4();
58970
+ init_src$3();
61340
58971
  init_buttons();
61341
58972
  init_cards();
61342
58973
  init_shared$2();
@@ -61912,7 +59543,7 @@ function WeeklySlotAvailabilitySSR(props) {
61912
59543
  }
61913
59544
  //#endregion
61914
59545
  //#region ../blocks/src/system/runtime/nodes/events/RecurringSchedule.tsx
61915
- init_src$4();
59546
+ init_src$3();
61916
59547
  function destinationHref(destination) {
61917
59548
  return destination.kind === "external" ? destination.url : destination.path;
61918
59549
  }
@@ -62987,7 +60618,7 @@ function formatShortDayLabel(date) {
62987
60618
  }
62988
60619
  var DEFAULT_EVENT_CELL_COLOR, FULL_DAY_NAMES;
62989
60620
  var init_timetableModel = __esmMin((() => {
62990
- init_src$2();
60621
+ init_src$1();
62991
60622
  init_eventCapacity();
62992
60623
  init_utils$3();
62993
60624
  DEFAULT_EVENT_CELL_COLOR = "rgb(var(--tb-accent))";
@@ -64093,7 +61724,7 @@ function extractAlignmentClassName(className) {
64093
61724
  }
64094
61725
  //#endregion
64095
61726
  //#region ../blocks/src/system/runtime/resolver.ts
64096
- init_src$4();
61727
+ init_src$3();
64097
61728
  init_node();
64098
61729
  init_headingDecoration();
64099
61730
  init_richText_coerce();
@@ -65145,7 +62776,7 @@ function applyStyleOverride(target, key, defaults) {
65145
62776
  }
65146
62777
  //#endregion
65147
62778
  //#region ../blocks/src/system/componentFactory.ts
65148
- init_src$4();
62779
+ init_src$3();
65149
62780
  /**
65150
62781
  * Resolves the layout definition for a block based on its manifest and content.
65151
62782
  *
@@ -65311,7 +62942,7 @@ function assertThemeConfigCanGenerateAccordionSystem(themeConfig) {
65311
62942
  init_repeaterGrid();
65312
62943
  //#endregion
65313
62944
  //#region ../blocks/src/system/media/constrainedVideoMedia.ts
65314
- init_src$3();
62945
+ init_src$2();
65315
62946
  function isRecord$28(value) {
65316
62947
  return typeof value === "object" && value !== null && !Array.isArray(value);
65317
62948
  }
@@ -66286,7 +63917,7 @@ function transformSdkBlockToDefinition(sdkBlock) {
66286
63917
  }
66287
63918
  //#endregion
66288
63919
  //#region ../blocks/src/customBlockRegistry.ts
66289
- init_src$4();
63920
+ init_src$3();
66290
63921
  const defaultCustomBlockSourcePolicy = { kind: "canonical-db-fallback-sdk" };
66291
63922
  function isCustomBlockKind(blockKind) {
66292
63923
  return blockKind.startsWith("custom.");
@@ -66693,7 +64324,7 @@ function summarizeValue(value) {
66693
64324
  }
66694
64325
  //#endregion
66695
64326
  //#region ../blocks/src/subroutes/fold.ts
66696
- init_src$4();
64327
+ init_src$3();
66697
64328
  //#endregion
66698
64329
  //#region ../blocks/src/structure/schema.ts
66699
64330
  const BlockKind = z.string();
@@ -67002,7 +64633,7 @@ systemCustomizeFacetDefinitions.map((definition) => definition.id);
67002
64633
  Array.from(new Set(systemCustomizeFacetDefinitions.flatMap((definition) => definition.values.map((option) => option.value))));
67003
64634
  //#endregion
67004
64635
  //#region ../blocks/src/system/customize/backgrounds.ts
67005
- init_src$4();
64636
+ init_src$3();
67006
64637
  init_site_styles();
67007
64638
  init_gradients();
67008
64639
  const backgroundColorTokenNames = backgroundAppearanceColorTokenNames;
@@ -67990,7 +65621,7 @@ function preset(id, verticalId, canonicalBehaviour, label, pluralLabel, descript
67990
65621
  }
67991
65622
  //#endregion
67992
65623
  //#region ../api/src/event-listing-destination.ts
67993
- init_src$4();
65624
+ init_src$3();
67994
65625
  //#endregion
67995
65626
  //#region ../api/src/utils/isRecord.ts
67996
65627
  function isRecord$25(value) {
@@ -68109,7 +65740,7 @@ const BOOKING_QUESTION_ANSWER_EXPORT_SCOPES = {
68109
65740
  BOOKING_QUESTION_ANSWER_EXPORT_SCOPES.site, BOOKING_QUESTION_ANSWER_EXPORT_SCOPES.appointments, BOOKING_QUESTION_ANSWER_EXPORT_SCOPES.eventSeries, BOOKING_QUESTION_ANSWER_EXPORT_SCOPES.course;
68110
65741
  //#endregion
68111
65742
  //#region ../api/src/staffAccess.ts
68112
- init_src$4();
65743
+ init_src$3();
68113
65744
  //#endregion
68114
65745
  //#region ../api/src/siteBanner.ts
68115
65746
  init_richTextSchema();
@@ -68403,7 +66034,7 @@ function hasNavVisibilityValues(raw) {
68403
66034
  }
68404
66035
  //#endregion
68405
66036
  //#region ../api/src/navigation/identity.ts
68406
- init_src$4();
66037
+ init_src$3();
68407
66038
  function unsafeAsNavigationMenuIdentifier(identifier) {
68408
66039
  return identifier;
68409
66040
  }
@@ -68493,7 +66124,7 @@ function actionableNavigationMenuMatchPlan(plan) {
68493
66124
  * Bidirectional conversion between block-level LinkValue (used in the editor)
68494
66125
  * and LinkPayload (used in the database and API layer).
68495
66126
  */
68496
- init_src$4();
66127
+ init_src$3();
68497
66128
  function stableJson(value) {
68498
66129
  if (value === null || typeof value !== "object") return JSON.stringify(value);
68499
66130
  if (Array.isArray(value)) return `[${value.map(stableJson).join(",")}]`;
@@ -72421,7 +70052,7 @@ function convertPulledFooterToLocal(remoteFooter) {
72421
70052
  }
72422
70053
  //#endregion
72423
70054
  //#region src/cli/navigationIdentity.ts
72424
- init_src$4();
70055
+ init_src$3();
72425
70056
  const navigationIdentity = navigationMenuIdentity;
72426
70057
  function navigationIdentityMap(menus) {
72427
70058
  const byIdentity = /* @__PURE__ */ new Map();
@@ -73515,7 +71146,7 @@ async function writeMediaManifest(contentDir, manifest) {
73515
71146
  * Reads content from the file system for push operations.
73516
71147
  * Mirrors the structure created by writer.ts.
73517
71148
  */
73518
- init_src$4();
71149
+ init_src$3();
73519
71150
  var LegacyEntryTitleError = class extends Error {
73520
71151
  constructor(filePath) {
73521
71152
  super(`${filePath}: top-level "title" is no longer supported for entries. Move the title into entry data (e.g. data.title, data.name, or your content type title field) and run: riverbankcms migrate entries`);
@@ -74143,7 +71774,7 @@ function collectSettingsBrandingIdentifiers(settings) {
74143
71774
  }
74144
71775
  //#endregion
74145
71776
  //#region src/cli/sync/media.ts
74146
- init_src$3();
71777
+ init_src$2();
74147
71778
  /**
74148
71779
  * Default retry configuration for network operations.
74149
71780
  */
@@ -74560,7 +72191,7 @@ const walkPulledContentMedia = (content, handler) => {
74560
72191
  };
74561
72192
  //#endregion
74562
72193
  //#region src/cli/media/value-utils.ts
74563
- init_src$3();
72194
+ init_src$2();
74564
72195
  /**
74565
72196
  * Normalize a media identifier to the canonical slug form.
74566
72197
  * Returns null when the raw value is empty or invalid.
@@ -74616,7 +72247,7 @@ function collectRichTextImageAttrs(value, out = [], location = "") {
74616
72247
  }
74617
72248
  //#endregion
74618
72249
  //#region src/cli/media/local-sync.ts
74619
- init_src$3();
72250
+ init_src$2();
74620
72251
  const GENERIC_MEDIA_NAMES = /* @__PURE__ */ new Set([
74621
72252
  "image",
74622
72253
  "photo",
@@ -80200,7 +77831,7 @@ init_classic_professional();
80200
77831
  init_vibrant_creative();
80201
77832
  //#endregion
80202
77833
  //#region ../site-commands/src/refs.ts
80203
- init_src$4();
77834
+ init_src$3();
80204
77835
  const resourceKinds = [
80205
77836
  "site-style",
80206
77837
  "media",
@@ -80319,7 +77950,7 @@ function normalizedPagePath(slug) {
80319
77950
  //#endregion
80320
77951
  //#region ../site-commands/src/commands.ts
80321
77952
  init_palette();
80322
- init_src$4();
77953
+ init_src$3();
80323
77954
  init_buttons();
80324
77955
  const commandRefSchema = z$1.string().regex(commandRefPattern).transform((value) => value);
80325
77956
  const siteCommandSiteRefSchema = z$1.string().regex(siteCommandSiteRefPattern).transform((value) => value);
@@ -80414,11 +78045,7 @@ const appointmentBookingStatuses = [
80414
78045
  "cancelled",
80415
78046
  "no_show"
80416
78047
  ];
80417
- const courseEnrollmentStatuses = [
80418
- "enrolled",
80419
- "completed",
80420
- "cancelled"
80421
- ];
78048
+ const courseEnrollmentStatuses = ["enrolled"];
80422
78049
  const eventRegistrationStatuses = ["confirmed"];
80423
78050
  const offeringCapacitySchema = z$1.discriminatedUnion("kind", [z$1.object({ kind: z$1.literal("unlimited") }).strict(), z$1.object({
80424
78051
  kind: z$1.literal("limited"),
@@ -82427,7 +80054,7 @@ function isRecord$9(value) {
82427
80054
  }
82428
80055
  //#endregion
82429
80056
  //#region ../site-commands/src/refContributions.ts
82430
- init_src$4();
80057
+ init_src$3();
82431
80058
  function commandRefContributions(command) {
82432
80059
  switch (command.type) {
82433
80060
  case "configureSiteIdentity":
@@ -82855,7 +80482,7 @@ function staticGap(code, message) {
82855
80482
  }
82856
80483
  //#endregion
82857
80484
  //#region ../site-commands/src/planner.ts
82858
- init_src$4();
80485
+ init_src$3();
82859
80486
  const commandTypeSet = new Set(siteCommandTypes);
82860
80487
  function parseCommandBatch(input) {
82861
80488
  const unknownTypeErrors = findUnknownCommandTypes(input);
@@ -83410,7 +81037,7 @@ function countRisks(risks) {
83410
81037
  }
83411
81038
  //#endregion
83412
81039
  //#region ../site-commands/src/stableJson.ts
83413
- init_src$4();
81040
+ init_src$3();
83414
81041
  function stableStringify(value) {
83415
81042
  const sorted = sortValue(value);
83416
81043
  switch (typeof sorted) {
@@ -83435,7 +81062,7 @@ function sortRecord(record) {
83435
81062
  }
83436
81063
  //#endregion
83437
81064
  //#region src/cli/site-commands/commandRuntime.ts
83438
- init_src$4();
81065
+ init_src$3();
83439
81066
  function createCliCommandBatchRef(input) {
83440
81067
  return [
83441
81068
  "sdk-cli",
@@ -83823,7 +81450,7 @@ function classifySdkEventSchedule(input, options = {}) {
83823
81450
  }
83824
81451
  //#endregion
83825
81452
  //#region src/cli/site-commands/datedOfferingCommands.ts
83826
- init_src$4();
81453
+ init_src$3();
83827
81454
  init_richTextSchema();
83828
81455
  const datedOfferingSiteCommandTypes = [
83829
81456
  "upsertVenue",
@@ -84378,7 +82005,7 @@ const unsafeAsCliFormSlug = (value) => value;
84378
82005
  const unsafeAsCliNavigationMenuName = (value) => value;
84379
82006
  //#endregion
84380
82007
  //#region src/cli/site-commands/commandRuntimeCompat.ts
84381
- init_src$4();
82008
+ init_src$3();
84382
82009
  function commandReportToSyncResult(input) {
84383
82010
  const result = createEmptySyncResult();
84384
82011
  for (const outcome of input.report.outcomes) switch (outcome.status) {
@@ -84407,7 +82034,7 @@ async function executeCompiledCliCommandPlanAsSyncResult(input) {
84407
82034
  }
84408
82035
  //#endregion
84409
82036
  //#region src/cli/site-commands/entryCommands.ts
84410
- init_src$4();
82037
+ init_src$3();
84411
82038
  const entrySiteCommandTypes = [
84412
82039
  "upsertContentEntry",
84413
82040
  "publishContentEntry",
@@ -84649,7 +82276,7 @@ function optionalTitle(data) {
84649
82276
  }
84650
82277
  //#endregion
84651
82278
  //#region src/cli/site-commands/formCommands.ts
84652
- init_src$4();
82279
+ init_src$3();
84653
82280
  const formSiteCommandTypes = ["upsertForm"];
84654
82281
  function compileFormPushCommands(input) {
84655
82282
  const commandBindings = [];
@@ -84778,7 +82405,7 @@ function recordFormFailure(result, identifier, message) {
84778
82405
  }
84779
82406
  //#endregion
84780
82407
  //#region src/cli/site-commands/footerCommands.ts
84781
- init_src$4();
82408
+ init_src$3();
84782
82409
  init_richTextSchema();
84783
82410
  const footerSiteCommandTypes = ["upsertFooterContent"];
84784
82411
  const footerCommandRef = createFooterRef(["site"]);
@@ -84867,7 +82494,7 @@ function recordFooterFailure(result, identifier, message) {
84867
82494
  }
84868
82495
  //#endregion
84869
82496
  //#region src/cli/site-commands/navigationCommands.ts
84870
- init_src$4();
82497
+ init_src$3();
84871
82498
  const navigationSiteCommandTypes = ["upsertNavigationMenu"];
84872
82499
  function compileNavigationPushCommands(input) {
84873
82500
  const commandBindings = [];
@@ -85221,7 +82848,7 @@ function sdkCustomBlockManifest(block) {
85221
82848
  }
85222
82849
  //#endregion
85223
82850
  //#region src/cli/site-commands/pageCommands.ts
85224
- init_src$4();
82851
+ init_src$3();
85225
82852
  const pageSiteCommandTypes = [
85226
82853
  "upsertPage",
85227
82854
  "upsertPageBlock",
@@ -85725,7 +83352,7 @@ function blockIdentifierFromPageBlockIdentifier(identifier) {
85725
83352
  }
85726
83353
  //#endregion
85727
83354
  //#region src/cli/site-commands/commandSurfaceDispatch.ts
85728
- init_src$4();
83355
+ init_src$3();
85729
83356
  function compileContentPushExecutionPlan(plan, input, dependencies = {}) {
85730
83357
  const steps = [];
85731
83358
  for (const step of plan.steps) switch (step.kind) {
@@ -86090,7 +83717,7 @@ function emptyLocalEntries() {
86090
83717
  }
86091
83718
  //#endregion
86092
83719
  //#region src/cli/site-commands/pushExecutionPlan.ts
86093
- init_src$4();
83720
+ init_src$3();
86094
83721
  function planContentPushExecution(input) {
86095
83722
  switch (input.pushScope) {
86096
83723
  case "entries": return syncPlanWithSteps([commandSurfaceStep("entry", "continue")]);
@@ -86177,7 +83804,7 @@ function orderCommandSurfacesForPushAll(surfaces) {
86177
83804
  }
86178
83805
  //#endregion
86179
83806
  //#region src/cli/site-commands/pushExecution.ts
86180
- init_src$4();
83807
+ init_src$3();
86181
83808
  async function executeContentPushPlan(input) {
86182
83809
  return contentPushExecutionReportToSyncResult(await executeContentPushPlanAsCommandReport(input));
86183
83810
  }
@@ -87852,7 +85479,7 @@ async function fetchRemotePulledEntriesForContentType(client, contentType, outpu
87852
85479
  }
87853
85480
  //#endregion
87854
85481
  //#region src/cli/merge-remote/entryMergePush.ts
87855
- init_src$4();
85482
+ init_src$3();
87856
85483
  async function planAndReportRemoteEntryMerge(input) {
87857
85484
  input.output.info("Planning remote-aware entry merge...");
87858
85485
  const mergeScope = entryMergePushScope({
@@ -90029,7 +87656,7 @@ function reportMediaValidationWarningsAndCollectBlocking(output, validation) {
90029
87656
  }
90030
87657
  //#endregion
90031
87658
  //#region src/cli/site-commands/oneOffCommands.ts
90032
- init_src$4();
87659
+ init_src$3();
90033
87660
  function compileOneOffEntryCommand(input) {
90034
87661
  const commandBinding = oneOffEntryCommandBinding(input.mutation);
90035
87662
  return planCliCommandBatchForBindings({
@@ -140934,7 +138561,7 @@ function formatTime$2(isoString, timeZone = "UTC") {
140934
138561
  }
140935
138562
  var hasWarnedAboutRuntimeTimeZoneFallback;
140936
138563
  var init_date_formatting = __esmMin((() => {
140937
- init_src$4();
138564
+ init_src$3();
140938
138565
  hasWarnedAboutRuntimeTimeZoneFallback = false;
140939
138566
  }));
140940
138567
  //#endregion
@@ -141186,7 +138813,7 @@ function useAvailableDates({ siteId: _siteId, serviceId, resourceId, timezone, i
141186
138813
  }
141187
138814
  var AVAILABILITY_REFRESH_INTERVAL_MS$1, AVAILABILITY_REFRESH_JITTER_MS$1;
141188
138815
  var init_useAvailableDates = __esmMin((() => {
141189
- init_src$4();
138816
+ init_src$3();
141190
138817
  init_api();
141191
138818
  init_date_formatting();
141192
138819
  init_useVisibleTabPolling();
@@ -141346,7 +138973,7 @@ function useAvailableSlots({ siteId: _siteId, serviceId, resourceId, selectedDat
141346
138973
  }
141347
138974
  var AVAILABILITY_REFRESH_INTERVAL_MS, AVAILABILITY_REFRESH_JITTER_MS;
141348
138975
  var init_useAvailableSlots = __esmMin((() => {
141349
- init_src$4();
138976
+ init_src$3();
141350
138977
  init_api();
141351
138978
  init_useVisibleTabPolling();
141352
138979
  init_useAvailableSlots_state();
@@ -141682,7 +139309,7 @@ function formatPrice(cents, currency = "GBP", locale) {
141682
139309
  return formatCurrencyAmount(cents, currency, { locale });
141683
139310
  }
141684
139311
  var init_formatting = __esmMin((() => {
141685
- init_src$4();
139312
+ init_src$3();
141686
139313
  init_types$1();
141687
139314
  }));
141688
139315
  //#endregion
@@ -141888,7 +139515,7 @@ function formatScheduleDate(isoString, locale) {
141888
139515
  }
141889
139516
  var init_bookingPaymentOptions = __esmMin((() => {
141890
139517
  init_dist$1();
141891
- init_src$4();
139518
+ init_src$3();
141892
139519
  init_bookingPaymentOptionCopy();
141893
139520
  init_formatting();
141894
139521
  }));
@@ -142557,7 +140184,7 @@ function omitRecordKey(record, key) {
142557
140184
  }
142558
140185
  var unsafeAsBookingFieldId;
142559
140186
  var init_booking_form_headless_state = __esmMin((() => {
142560
- init_src$4();
140187
+ init_src$3();
142561
140188
  init_dist$1();
142562
140189
  init_booking_form_state();
142563
140190
  unsafeAsBookingFieldId = (id) => id;
@@ -143194,7 +140821,7 @@ function useLatestRef(value) {
143194
140821
  var init_useHeadlessBookingFlow = __esmMin((() => {
143195
140822
  init_client();
143196
140823
  init_src();
143197
- init_src$4();
140824
+ init_src$3();
143198
140825
  init_api();
143199
140826
  init_booking_form_state();
143200
140827
  init_useAvailableDates();
@@ -144606,7 +142233,7 @@ function SelectedCheck() {
144606
142233
  });
144607
142234
  }
144608
142235
  var init_booking_form_default_ui = __esmMin((() => {
144609
- init_src$4();
142236
+ init_src$3();
144610
142237
  init_buttons();
144611
142238
  init_client();
144612
142239
  init_dist$1();
@@ -145089,7 +142716,7 @@ function BookingSurface({ id, className, children }) {
145089
142716
  }
145090
142717
  var PORTAL_REBOOK_QUERY_PARAM, PORTAL_REBOOK_QUERY_VALUE, REBOOK_COMPLETION_MODE_VERIFIED_CHECKOUT, REBOOK_COMPLETION_MODE_BYPASSED, BookingFormClient;
145091
142718
  var init_booking_form_client = __esmMin((() => {
145092
- init_src$1();
142719
+ init_console();
145093
142720
  init_client();
145094
142721
  init_api();
145095
142722
  init_SuccessMessage();
@@ -145672,7 +143299,7 @@ function findSelectedTicketType(input) {
145672
143299
  }
145673
143300
  var ENTITLEMENT_SINGLE_TICKET_TOOLTIP;
145674
143301
  var init_utils$1 = __esmMin((() => {
145675
- init_src$4();
143302
+ init_src$3();
145676
143303
  init_pricing$1();
145677
143304
  init_shared();
145678
143305
  ENTITLEMENT_SINGLE_TICKET_TOOLTIP = "Only available for single-ticket bookings";
@@ -146429,7 +144056,7 @@ function getMaxAllowedTicketCount(input) {
146429
144056
  }
146430
144057
  var TicketSelectionStep;
146431
144058
  var init_TicketSelectionStep = __esmMin((() => {
146432
- init_src$4();
144059
+ init_src$3();
146433
144060
  init_pricing$1();
146434
144061
  init_utils$1();
146435
144062
  init_ticketSelectionLines();
@@ -147850,7 +145477,7 @@ function EventRegistrationSummaryBar(props) {
147850
145477
  })] });
147851
145478
  }
147852
145479
  var init_EventRegistrationSummaryBar = __esmMin((() => {
147853
- init_src$4();
145480
+ init_src$3();
147854
145481
  init_utils$1();
147855
145482
  init_eventPaymentOptions();
147856
145483
  }));
@@ -148959,7 +146586,7 @@ function useEventRegistrationWizardWithDeps(options, deps) {
148959
146586
  }
148960
146587
  var eventRegistrationWizardDeps;
148961
146588
  var init_useEventRegistrationWizard = __esmMin((() => {
148962
- init_src$4();
146589
+ init_src$3();
148963
146590
  init_api();
148964
146591
  init_pricing$1();
148965
146592
  init_validation();
@@ -149446,7 +147073,7 @@ function EventRegistrationWizard(props) {
149446
147073
  }
149447
147074
  var EVENT_PORTAL_AUTH_COPY;
149448
147075
  var init_EventRegistrationWizard = __esmMin((() => {
149449
- init_src$4();
147076
+ init_src$3();
149450
147077
  init_client();
149451
147078
  init_StepIndicator$1();
149452
147079
  init_wizardSteps$2();
@@ -152138,7 +149765,7 @@ function formatTime(dateString, options) {
152138
149765
  }
152139
149766
  var COURSE_REGISTRATION_ANCHOR_ID;
152140
149767
  var init_utils = __esmMin((() => {
152141
- init_src$4();
149768
+ init_src$3();
152142
149769
  init_shared();
152143
149770
  COURSE_REGISTRATION_ANCHOR_ID = "course-registration";
152144
149771
  }));
@@ -154437,7 +152064,7 @@ function checkoutFormForDiscountUiState(form, discountUiState) {
154437
152064
  }
154438
152065
  var EMAIL_PATTERN;
154439
152066
  var init_shop_checkout_form = __esmMin((() => {
154440
- init_src$4();
152067
+ init_src$3();
154441
152068
  init_types$2();
154442
152069
  EMAIL_PATTERN = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
154443
152070
  }));
@@ -155593,7 +153220,7 @@ function PassesMembershipsController({ render }) {
155593
153220
  }
155594
153221
  var SHOP_ANCHOR_ID;
155595
153222
  var init_shop_client = __esmMin((() => {
155596
- init_src$4();
153223
+ init_src$3();
155597
153224
  init_buttons();
155598
153225
  init_api();
155599
153226
  init_ModalShell();
@@ -156180,13 +153807,13 @@ async function mountIsland(island, options) {
156180
153807
  }
156181
153808
  //#endregion
156182
153809
  //#region src/rendering/mediaAssets.ts
156183
- init_src$4();
153810
+ init_src$3();
156184
153811
  //#endregion
156185
153812
  //#region src/rendering/islands/BlocksIslandsHydrator.tsx
156186
153813
  init_media();
156187
153814
  //#endregion
156188
153815
  //#region ../blocks/src/system/blocks/site-footer-runtime.ts
156189
- init_src$4();
153816
+ init_src$3();
156190
153817
  //#endregion
156191
153818
  //#region ../blocks/src/rendering/server.ts
156192
153819
  init_schema$1();
@@ -156203,7 +153830,7 @@ init_vibrant_creative();
156203
153830
  init_buttons();
156204
153831
  //#endregion
156205
153832
  //#region src/rendering/themeRuntime.tsx
156206
- init_src$4();
153833
+ init_src$3();
156207
153834
  //#endregion
156208
153835
  //#region src/client/cache.ts
156209
153836
  var SimpleCache = class {
@@ -156316,7 +153943,7 @@ var SimpleCache = class {
156316
153943
  * 1. This constant
156317
153944
  * 2. The "version" field in package.json
156318
153945
  */
156319
- const SDK_VERSION = "0.119.0";
153946
+ const SDK_VERSION = "0.123.0";
156320
153947
  //#endregion
156321
153948
  //#region src/client/error.ts
156322
153949
  /**
@@ -164907,7 +162534,7 @@ Examples:
164907
162534
  `).addCommand(listCommand).addCommand(initCommand).addCommand(applyCommand);
164908
162535
  //#endregion
164909
162536
  //#region src/cli/commands/webhooks.ts
164910
- init_src$4();
162537
+ init_src$3();
164911
162538
  const RIVERBANK_WEBHOOK_SECRET_ENV = "RIVERBANK_WEBHOOK_SECRET";
164912
162539
  function isNodeError(error) {
164913
162540
  return error instanceof Error && "code" in error;
@@ -165533,7 +163160,7 @@ Examples:
165533
163160
  `).addCommand(editCommand);
165534
163161
  //#endregion
165535
163162
  //#region src/cli/setup/setupPlan.ts
165536
- init_src$4();
163163
+ init_src$3();
165537
163164
  function envPrefix(target) {
165538
163165
  return target === "remote" ? "RIVERBANK_REMOTE" : "RIVERBANK_LOCAL";
165539
163166
  }