latest update in wings

This commit is contained in:
2026-07-14 12:11:28 +05:30
parent 07e035dd62
commit fea3017013
1176 changed files with 386209 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
ActionDidNotRevalidate: null,
ActionDidRevalidateDynamicOnly: null,
ActionDidRevalidateStaticAndDynamic: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
ActionDidNotRevalidate: function() {
return ActionDidNotRevalidate;
},
ActionDidRevalidateDynamicOnly: function() {
return ActionDidRevalidateDynamicOnly;
},
ActionDidRevalidateStaticAndDynamic: function() {
return ActionDidRevalidateStaticAndDynamic;
}
});
const ActionDidNotRevalidate = 0;
const ActionDidRevalidateStaticAndDynamic = 1;
const ActionDidRevalidateDynamicOnly = 2;
//# sourceMappingURL=action-revalidation-kind.js.map

View File

@@ -0,0 +1,50 @@
'use client';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
AppRouterContext: null,
GlobalLayoutRouterContext: null,
LayoutRouterContext: null,
MissingSlotContext: null,
TemplateContext: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
AppRouterContext: function() {
return AppRouterContext;
},
GlobalLayoutRouterContext: function() {
return GlobalLayoutRouterContext;
},
LayoutRouterContext: function() {
return LayoutRouterContext;
},
MissingSlotContext: function() {
return MissingSlotContext;
},
TemplateContext: function() {
return TemplateContext;
}
});
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
const _react = /*#__PURE__*/ _interop_require_default._(require("react"));
const AppRouterContext = _react.default.createContext(null);
const LayoutRouterContext = _react.default.createContext(null);
const GlobalLayoutRouterContext = _react.default.createContext(null);
const TemplateContext = _react.default.createContext(null);
if (process.env.NODE_ENV !== 'production') {
AppRouterContext.displayName = 'AppRouterContext';
LayoutRouterContext.displayName = 'LayoutRouterContext';
GlobalLayoutRouterContext.displayName = 'GlobalLayoutRouterContext';
TemplateContext.displayName = 'TemplateContext';
}
const MissingSlotContext = _react.default.createContext(new Set());
//# sourceMappingURL=app-router-context.shared-runtime.js.map

View File

@@ -0,0 +1,46 @@
/**
* App Router types - Client-safe types for the Next.js App Router
*
* This file contains type definitions that can be safely imported
* by both client-side and server-side code without circular dependencies.
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "PrefetchHint", {
enumerable: true,
get: function() {
return PrefetchHint;
}
});
var PrefetchHint = /*#__PURE__*/ function(PrefetchHint) {
// This segment has a runtime prefetch enabled (via unstable_instant with
// prefetch: 'runtime'). Per-segment only, does not propagate to ancestors.
PrefetchHint[PrefetchHint["HasRuntimePrefetch"] = 1] = "HasRuntimePrefetch";
// This segment or one of its descendants has an instant config defined
// (any truthy unstable_instant, regardless of prefetch mode). Propagates
// upward so the root segment reflects the entire subtree.
PrefetchHint[PrefetchHint["SubtreeHasInstant"] = 2] = "SubtreeHasInstant";
// This segment itself has a loading.tsx boundary.
PrefetchHint[PrefetchHint["SegmentHasLoadingBoundary"] = 4] = "SegmentHasLoadingBoundary";
// A descendant segment (but not this one) has a loading.tsx boundary.
// Propagates upward so the root reflects the entire subtree.
PrefetchHint[PrefetchHint["SubtreeHasLoadingBoundary"] = 8] = "SubtreeHasLoadingBoundary";
// This segment is the root layout of the application.
PrefetchHint[PrefetchHint["IsRootLayout"] = 16] = "IsRootLayout";
// This segment's response includes its parent's data inlined into it.
// Set at build time by the segment size measurement pass.
PrefetchHint[PrefetchHint["ParentInlinedIntoSelf"] = 32] = "ParentInlinedIntoSelf";
// This segment's data is inlined into one of its children — don't fetch
// it separately. Set at build time by the segment size measurement pass.
PrefetchHint[PrefetchHint["InlinedIntoChild"] = 64] = "InlinedIntoChild";
// On a __PAGE__: this page's response includes the head (metadata/viewport)
// at the end of its SegmentPrefetch[] array.
PrefetchHint[PrefetchHint["HeadInlinedIntoSelf"] = 128] = "HeadInlinedIntoSelf";
// On the root hint node: the head was NOT inlined into any page — fetch
// it separately. Absence of this bit means the head is bundled into a page.
PrefetchHint[PrefetchHint["HeadOutlined"] = 256] = "HeadOutlined";
return PrefetchHint;
}({});
//# sourceMappingURL=app-router-types.js.map

448
build/node_modules/next/dist/shared/lib/constants.js generated vendored Normal file
View File

@@ -0,0 +1,448 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
APP_CLIENT_INTERNALS: null,
APP_PATHS_MANIFEST: null,
APP_PATH_ROUTES_MANIFEST: null,
AdapterOutputType: null,
BARREL_OPTIMIZATION_PREFIX: null,
BLOCKED_PAGES: null,
BUILD_ID_FILE: null,
BUILD_MANIFEST: null,
CLIENT_PUBLIC_FILES_PATH: null,
CLIENT_REFERENCE_MANIFEST: null,
CLIENT_STATIC_FILES_PATH: null,
CLIENT_STATIC_FILES_RUNTIME_MAIN: null,
CLIENT_STATIC_FILES_RUNTIME_MAIN_APP: null,
CLIENT_STATIC_FILES_RUNTIME_POLYFILLS: null,
CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL: null,
CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH: null,
CLIENT_STATIC_FILES_RUNTIME_WEBPACK: null,
COMPILER_INDEXES: null,
COMPILER_NAMES: null,
CONFIG_FILES: null,
DEFAULT_RUNTIME_WEBPACK: null,
DEFAULT_SANS_SERIF_FONT: null,
DEFAULT_SERIF_FONT: null,
DEV_CLIENT_MIDDLEWARE_MANIFEST: null,
DEV_CLIENT_PAGES_MANIFEST: null,
DYNAMIC_CSS_MANIFEST: null,
EDGE_RUNTIME_WEBPACK: null,
EDGE_UNSUPPORTED_NODE_APIS: null,
EXPORT_DETAIL: null,
EXPORT_MARKER: null,
FUNCTIONS_CONFIG_MANIFEST: null,
IMAGES_MANIFEST: null,
INTERCEPTION_ROUTE_REWRITE_MANIFEST: null,
MIDDLEWARE_BUILD_MANIFEST: null,
MIDDLEWARE_MANIFEST: null,
MIDDLEWARE_REACT_LOADABLE_MANIFEST: null,
MODERN_BROWSERSLIST_TARGET: null,
NEXT_BUILTIN_DOCUMENT: null,
NEXT_FONT_MANIFEST: null,
PAGES_MANIFEST: null,
PHASE_ANALYZE: null,
PHASE_DEVELOPMENT_SERVER: null,
PHASE_EXPORT: null,
PHASE_INFO: null,
PHASE_PRODUCTION_BUILD: null,
PHASE_PRODUCTION_SERVER: null,
PHASE_TEST: null,
PREFETCH_HINTS: null,
PRERENDER_MANIFEST: null,
REACT_LOADABLE_MANIFEST: null,
ROUTES_MANIFEST: null,
RSC_MODULE_TYPES: null,
SERVER_DIRECTORY: null,
SERVER_FILES_MANIFEST: null,
SERVER_PROPS_ID: null,
SERVER_REFERENCE_MANIFEST: null,
STATIC_PROPS_ID: null,
STATIC_STATUS_PAGES: null,
STRING_LITERAL_DROP_BUNDLE: null,
SUBRESOURCE_INTEGRITY_MANIFEST: null,
SYSTEM_ENTRYPOINTS: null,
TRACE_OUTPUT_VERSION: null,
TURBOPACK_CLIENT_BUILD_MANIFEST: null,
TURBOPACK_CLIENT_MIDDLEWARE_MANIFEST: null,
TURBO_TRACE_DEFAULT_MEMORY_LIMIT: null,
UNDERSCORE_GLOBAL_ERROR_ROUTE: null,
UNDERSCORE_GLOBAL_ERROR_ROUTE_ENTRY: null,
UNDERSCORE_NOT_FOUND_ROUTE: null,
UNDERSCORE_NOT_FOUND_ROUTE_ENTRY: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
APP_CLIENT_INTERNALS: function() {
return APP_CLIENT_INTERNALS;
},
APP_PATHS_MANIFEST: function() {
return APP_PATHS_MANIFEST;
},
APP_PATH_ROUTES_MANIFEST: function() {
return APP_PATH_ROUTES_MANIFEST;
},
AdapterOutputType: function() {
return AdapterOutputType;
},
BARREL_OPTIMIZATION_PREFIX: function() {
return BARREL_OPTIMIZATION_PREFIX;
},
BLOCKED_PAGES: function() {
return BLOCKED_PAGES;
},
BUILD_ID_FILE: function() {
return BUILD_ID_FILE;
},
BUILD_MANIFEST: function() {
return BUILD_MANIFEST;
},
CLIENT_PUBLIC_FILES_PATH: function() {
return CLIENT_PUBLIC_FILES_PATH;
},
CLIENT_REFERENCE_MANIFEST: function() {
return CLIENT_REFERENCE_MANIFEST;
},
CLIENT_STATIC_FILES_PATH: function() {
return CLIENT_STATIC_FILES_PATH;
},
CLIENT_STATIC_FILES_RUNTIME_MAIN: function() {
return CLIENT_STATIC_FILES_RUNTIME_MAIN;
},
CLIENT_STATIC_FILES_RUNTIME_MAIN_APP: function() {
return CLIENT_STATIC_FILES_RUNTIME_MAIN_APP;
},
CLIENT_STATIC_FILES_RUNTIME_POLYFILLS: function() {
return CLIENT_STATIC_FILES_RUNTIME_POLYFILLS;
},
CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL: function() {
return CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL;
},
CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH: function() {
return CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH;
},
CLIENT_STATIC_FILES_RUNTIME_WEBPACK: function() {
return CLIENT_STATIC_FILES_RUNTIME_WEBPACK;
},
COMPILER_INDEXES: function() {
return COMPILER_INDEXES;
},
COMPILER_NAMES: function() {
return COMPILER_NAMES;
},
CONFIG_FILES: function() {
return CONFIG_FILES;
},
DEFAULT_RUNTIME_WEBPACK: function() {
return DEFAULT_RUNTIME_WEBPACK;
},
DEFAULT_SANS_SERIF_FONT: function() {
return DEFAULT_SANS_SERIF_FONT;
},
DEFAULT_SERIF_FONT: function() {
return DEFAULT_SERIF_FONT;
},
DEV_CLIENT_MIDDLEWARE_MANIFEST: function() {
return DEV_CLIENT_MIDDLEWARE_MANIFEST;
},
DEV_CLIENT_PAGES_MANIFEST: function() {
return DEV_CLIENT_PAGES_MANIFEST;
},
DYNAMIC_CSS_MANIFEST: function() {
return DYNAMIC_CSS_MANIFEST;
},
EDGE_RUNTIME_WEBPACK: function() {
return EDGE_RUNTIME_WEBPACK;
},
EDGE_UNSUPPORTED_NODE_APIS: function() {
return EDGE_UNSUPPORTED_NODE_APIS;
},
EXPORT_DETAIL: function() {
return EXPORT_DETAIL;
},
EXPORT_MARKER: function() {
return EXPORT_MARKER;
},
FUNCTIONS_CONFIG_MANIFEST: function() {
return FUNCTIONS_CONFIG_MANIFEST;
},
IMAGES_MANIFEST: function() {
return IMAGES_MANIFEST;
},
INTERCEPTION_ROUTE_REWRITE_MANIFEST: function() {
return INTERCEPTION_ROUTE_REWRITE_MANIFEST;
},
MIDDLEWARE_BUILD_MANIFEST: function() {
return MIDDLEWARE_BUILD_MANIFEST;
},
MIDDLEWARE_MANIFEST: function() {
return MIDDLEWARE_MANIFEST;
},
MIDDLEWARE_REACT_LOADABLE_MANIFEST: function() {
return MIDDLEWARE_REACT_LOADABLE_MANIFEST;
},
MODERN_BROWSERSLIST_TARGET: function() {
return _modernbrowserslisttarget.default;
},
NEXT_BUILTIN_DOCUMENT: function() {
return NEXT_BUILTIN_DOCUMENT;
},
NEXT_FONT_MANIFEST: function() {
return NEXT_FONT_MANIFEST;
},
PAGES_MANIFEST: function() {
return PAGES_MANIFEST;
},
PHASE_ANALYZE: function() {
return PHASE_ANALYZE;
},
PHASE_DEVELOPMENT_SERVER: function() {
return PHASE_DEVELOPMENT_SERVER;
},
PHASE_EXPORT: function() {
return PHASE_EXPORT;
},
PHASE_INFO: function() {
return PHASE_INFO;
},
PHASE_PRODUCTION_BUILD: function() {
return PHASE_PRODUCTION_BUILD;
},
PHASE_PRODUCTION_SERVER: function() {
return PHASE_PRODUCTION_SERVER;
},
PHASE_TEST: function() {
return PHASE_TEST;
},
PREFETCH_HINTS: function() {
return PREFETCH_HINTS;
},
PRERENDER_MANIFEST: function() {
return PRERENDER_MANIFEST;
},
REACT_LOADABLE_MANIFEST: function() {
return REACT_LOADABLE_MANIFEST;
},
ROUTES_MANIFEST: function() {
return ROUTES_MANIFEST;
},
RSC_MODULE_TYPES: function() {
return RSC_MODULE_TYPES;
},
SERVER_DIRECTORY: function() {
return SERVER_DIRECTORY;
},
SERVER_FILES_MANIFEST: function() {
return SERVER_FILES_MANIFEST;
},
SERVER_PROPS_ID: function() {
return SERVER_PROPS_ID;
},
SERVER_REFERENCE_MANIFEST: function() {
return SERVER_REFERENCE_MANIFEST;
},
STATIC_PROPS_ID: function() {
return STATIC_PROPS_ID;
},
STATIC_STATUS_PAGES: function() {
return STATIC_STATUS_PAGES;
},
STRING_LITERAL_DROP_BUNDLE: function() {
return STRING_LITERAL_DROP_BUNDLE;
},
SUBRESOURCE_INTEGRITY_MANIFEST: function() {
return SUBRESOURCE_INTEGRITY_MANIFEST;
},
SYSTEM_ENTRYPOINTS: function() {
return SYSTEM_ENTRYPOINTS;
},
TRACE_OUTPUT_VERSION: function() {
return TRACE_OUTPUT_VERSION;
},
TURBOPACK_CLIENT_BUILD_MANIFEST: function() {
return TURBOPACK_CLIENT_BUILD_MANIFEST;
},
TURBOPACK_CLIENT_MIDDLEWARE_MANIFEST: function() {
return TURBOPACK_CLIENT_MIDDLEWARE_MANIFEST;
},
TURBO_TRACE_DEFAULT_MEMORY_LIMIT: function() {
return TURBO_TRACE_DEFAULT_MEMORY_LIMIT;
},
UNDERSCORE_GLOBAL_ERROR_ROUTE: function() {
return _entryconstants.UNDERSCORE_GLOBAL_ERROR_ROUTE;
},
UNDERSCORE_GLOBAL_ERROR_ROUTE_ENTRY: function() {
return _entryconstants.UNDERSCORE_GLOBAL_ERROR_ROUTE_ENTRY;
},
UNDERSCORE_NOT_FOUND_ROUTE: function() {
return _entryconstants.UNDERSCORE_NOT_FOUND_ROUTE;
},
UNDERSCORE_NOT_FOUND_ROUTE_ENTRY: function() {
return _entryconstants.UNDERSCORE_NOT_FOUND_ROUTE_ENTRY;
}
});
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
const _modernbrowserslisttarget = /*#__PURE__*/ _interop_require_default._(require("./modern-browserslist-target"));
const _entryconstants = require("./entry-constants");
const COMPILER_NAMES = {
client: 'client',
server: 'server',
edgeServer: 'edge-server'
};
const COMPILER_INDEXES = {
[COMPILER_NAMES.client]: 0,
[COMPILER_NAMES.server]: 1,
[COMPILER_NAMES.edgeServer]: 2
};
var AdapterOutputType = /*#__PURE__*/ function(AdapterOutputType) {
/**
* `PAGES` represents all the React pages that are under `pages/`.
*/ AdapterOutputType["PAGES"] = "PAGES";
/**
* `PAGES_API` represents all the API routes under `pages/api/`.
*/ AdapterOutputType["PAGES_API"] = "PAGES_API";
/**
* `APP_PAGE` represents all the React pages that are under `app/` with the
* filename of `page.{j,t}s{,x}`.
*/ AdapterOutputType["APP_PAGE"] = "APP_PAGE";
/**
* `APP_ROUTE` represents all the API routes and metadata routes that are under `app/` with the
* filename of `route.{j,t}s{,x}`.
*/ AdapterOutputType["APP_ROUTE"] = "APP_ROUTE";
/**
* `PRERENDER` represents an ISR enabled route that might
* have a seeded cache entry or fallback generated during build
*/ AdapterOutputType["PRERENDER"] = "PRERENDER";
/**
* `STATIC_FILE` represents a static file (ie /_next/static)
*/ AdapterOutputType["STATIC_FILE"] = "STATIC_FILE";
/**
* `MIDDLEWARE` represents the middleware output if present
*/ AdapterOutputType["MIDDLEWARE"] = "MIDDLEWARE";
return AdapterOutputType;
}({});
const PHASE_EXPORT = 'phase-export';
const PHASE_ANALYZE = 'phase-analyze';
const PHASE_PRODUCTION_BUILD = 'phase-production-build';
const PHASE_PRODUCTION_SERVER = 'phase-production-server';
const PHASE_DEVELOPMENT_SERVER = 'phase-development-server';
const PHASE_TEST = 'phase-test';
const PHASE_INFO = 'phase-info';
const PAGES_MANIFEST = 'pages-manifest.json';
const APP_PATHS_MANIFEST = 'app-paths-manifest.json';
const APP_PATH_ROUTES_MANIFEST = 'app-path-routes-manifest.json';
const BUILD_MANIFEST = 'build-manifest.json';
const FUNCTIONS_CONFIG_MANIFEST = 'functions-config-manifest.json';
const SUBRESOURCE_INTEGRITY_MANIFEST = 'subresource-integrity-manifest';
const NEXT_FONT_MANIFEST = 'next-font-manifest';
const EXPORT_MARKER = 'export-marker.json';
const EXPORT_DETAIL = 'export-detail.json';
const PRERENDER_MANIFEST = 'prerender-manifest.json';
const PREFETCH_HINTS = 'prefetch-hints.json';
const ROUTES_MANIFEST = 'routes-manifest.json';
const IMAGES_MANIFEST = 'images-manifest.json';
const SERVER_FILES_MANIFEST = 'required-server-files';
const DEV_CLIENT_PAGES_MANIFEST = '_devPagesManifest.json';
const MIDDLEWARE_MANIFEST = 'middleware-manifest.json';
const TURBOPACK_CLIENT_MIDDLEWARE_MANIFEST = '_clientMiddlewareManifest.js';
const TURBOPACK_CLIENT_BUILD_MANIFEST = 'client-build-manifest.json';
const DEV_CLIENT_MIDDLEWARE_MANIFEST = '_devMiddlewareManifest.json';
const REACT_LOADABLE_MANIFEST = 'react-loadable-manifest.json';
const SERVER_DIRECTORY = 'server';
const CONFIG_FILES = [
'next.config.js',
'next.config.mjs',
'next.config.ts',
// process.features can be undefined on Edge runtime
// TODO: Remove `as any` once we bump @types/node to v22.10.0+
...process?.features?.typescript ? [
'next.config.mts'
] : []
];
const BUILD_ID_FILE = 'BUILD_ID';
const BLOCKED_PAGES = [
'/_document',
'/_app',
'/_error'
];
const CLIENT_PUBLIC_FILES_PATH = 'public';
const CLIENT_STATIC_FILES_PATH = 'static';
const STRING_LITERAL_DROP_BUNDLE = '__NEXT_DROP_CLIENT_FILE__';
const NEXT_BUILTIN_DOCUMENT = '__NEXT_BUILTIN_DOCUMENT__';
const BARREL_OPTIMIZATION_PREFIX = '__barrel_optimize__';
const CLIENT_REFERENCE_MANIFEST = 'client-reference-manifest';
const SERVER_REFERENCE_MANIFEST = 'server-reference-manifest';
const MIDDLEWARE_BUILD_MANIFEST = 'middleware-build-manifest';
const MIDDLEWARE_REACT_LOADABLE_MANIFEST = 'middleware-react-loadable-manifest';
const INTERCEPTION_ROUTE_REWRITE_MANIFEST = 'interception-route-rewrite-manifest';
const DYNAMIC_CSS_MANIFEST = 'dynamic-css-manifest';
const CLIENT_STATIC_FILES_RUNTIME_MAIN = `main`;
const CLIENT_STATIC_FILES_RUNTIME_MAIN_APP = `${CLIENT_STATIC_FILES_RUNTIME_MAIN}-app`;
const APP_CLIENT_INTERNALS = 'app-pages-internals';
const CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH = `react-refresh`;
const CLIENT_STATIC_FILES_RUNTIME_WEBPACK = `webpack`;
const CLIENT_STATIC_FILES_RUNTIME_POLYFILLS = 'polyfills';
const CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL = Symbol(CLIENT_STATIC_FILES_RUNTIME_POLYFILLS);
const DEFAULT_RUNTIME_WEBPACK = 'webpack-runtime';
const EDGE_RUNTIME_WEBPACK = 'edge-runtime-webpack';
const STATIC_PROPS_ID = '__N_SSG';
const SERVER_PROPS_ID = '__N_SSP';
const DEFAULT_SERIF_FONT = {
name: 'Times New Roman',
xAvgCharWidth: 821,
azAvgWidth: 854.3953488372093,
unitsPerEm: 2048
};
const DEFAULT_SANS_SERIF_FONT = {
name: 'Arial',
xAvgCharWidth: 904,
azAvgWidth: 934.5116279069767,
unitsPerEm: 2048
};
const STATIC_STATUS_PAGES = [
'/500'
];
const TRACE_OUTPUT_VERSION = 1;
const TURBO_TRACE_DEFAULT_MEMORY_LIMIT = 6000;
const RSC_MODULE_TYPES = {
client: 'client',
server: 'server'
};
const EDGE_UNSUPPORTED_NODE_APIS = [
'clearImmediate',
'setImmediate',
'BroadcastChannel',
'ByteLengthQueuingStrategy',
'CompressionStream',
'CountQueuingStrategy',
'DecompressionStream',
'DomException',
'MessageChannel',
'MessageEvent',
'MessagePort',
'ReadableByteStreamController',
'ReadableStreamBYOBRequest',
'ReadableStreamDefaultController',
'TransformStreamDefaultController',
'WritableStreamDefaultController'
];
const SYSTEM_ENTRYPOINTS = new Set([
CLIENT_STATIC_FILES_RUNTIME_MAIN,
CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH,
CLIENT_STATIC_FILES_RUNTIME_MAIN_APP
]);
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', { value: true });
Object.assign(exports.default, exports);
module.exports = exports.default;
}
//# sourceMappingURL=constants.js.map

30
build/node_modules/next/dist/shared/lib/deep-freeze.js generated vendored Normal file
View File

@@ -0,0 +1,30 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "deepFreeze", {
enumerable: true,
get: function() {
return deepFreeze;
}
});
function deepFreeze(obj) {
// If the object is already frozen, there's no need to freeze it again.
if (Object.isFrozen(obj)) return obj;
// An array is an object, but we also want to freeze each element in the array
// as well.
if (Array.isArray(obj)) {
for (const item of obj){
if (!item || typeof item !== 'object') continue;
deepFreeze(item);
}
return Object.freeze(obj);
}
for (const value of Object.values(obj)){
if (!value || typeof value !== 'object') continue;
deepFreeze(value);
}
return Object.freeze(obj);
}
//# sourceMappingURL=deep-freeze.js.map

View File

@@ -0,0 +1,63 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
getAssetToken: null,
getAssetTokenQuery: null,
getDeploymentId: null,
getDeploymentIdQuery: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
getAssetToken: function() {
return getAssetToken;
},
getAssetTokenQuery: function() {
return getAssetTokenQuery;
},
getDeploymentId: function() {
return getDeploymentId;
},
getDeploymentIdQuery: function() {
return getDeploymentIdQuery;
}
});
let deploymentId;
if (typeof window !== 'undefined') {
deploymentId = document.documentElement.dataset.dplId;
// Immediately remove the attribute to prevent hydration errors (the dplId was inserted into the
// HTML only), React isn't aware of it at all.
delete document.documentElement.dataset.dplId;
} else {
// Client side: replaced with globalThis.NEXT_DEPLOYMENT_ID
// Server side: left as is or replaced with a string or replaced with false
deploymentId = process.env.NEXT_DEPLOYMENT_ID || undefined;
}
function getDeploymentId() {
return deploymentId;
}
function getDeploymentIdQuery(ampersand = false) {
let id = getDeploymentId();
if (id) {
return `${ampersand ? '&' : '?'}dpl=${id}`;
}
return '';
}
function getAssetToken() {
return process.env.NEXT_IMMUTABLE_ASSET_TOKEN || process.env.NEXT_DEPLOYMENT_ID;
}
function getAssetTokenQuery(ampersand = false) {
let id = getAssetToken();
if (id) {
return `${ampersand ? '&' : '?'}dpl=${id}`;
}
return '';
}
//# sourceMappingURL=deployment-id.js.map

34
build/node_modules/next/dist/shared/lib/dset.js generated vendored Normal file
View File

@@ -0,0 +1,34 @@
/*
The MIT License (MIT)
Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ // This file is based on https://github.com/lukeed/dset/blob/v3.1.3/src/index.js
// It's been edited for the needs of this script
// See the LICENSE at the top of the file
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "dset", {
enumerable: true,
get: function() {
return dset;
}
});
function dset(obj, keys, val) {
keys.split && (keys = keys.split('.'));
var i = 0, l = keys.length, t = obj, x, k;
while(i < l){
k = keys[i++];
if (k === '__proto__' || k === 'constructor' || k === 'prototype') break;
t = t[k] = i === l ? val : typeof (x = t[k]) === typeof keys ? x : keys[i] * 0 !== 0 || !!~('' + keys[i]).indexOf('.') ? {} : [];
}
}
//# sourceMappingURL=dset.js.map

View File

@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "encodeURIPath", {
enumerable: true,
get: function() {
return encodeURIPath;
}
});
function encodeURIPath(file) {
return file.split('/').map((p)=>encodeURIComponent(p)).join('/');
}
//# sourceMappingURL=encode-uri-path.js.map

View File

@@ -0,0 +1,36 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
UNDERSCORE_GLOBAL_ERROR_ROUTE: null,
UNDERSCORE_GLOBAL_ERROR_ROUTE_ENTRY: null,
UNDERSCORE_NOT_FOUND_ROUTE: null,
UNDERSCORE_NOT_FOUND_ROUTE_ENTRY: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
UNDERSCORE_GLOBAL_ERROR_ROUTE: function() {
return UNDERSCORE_GLOBAL_ERROR_ROUTE;
},
UNDERSCORE_GLOBAL_ERROR_ROUTE_ENTRY: function() {
return UNDERSCORE_GLOBAL_ERROR_ROUTE_ENTRY;
},
UNDERSCORE_NOT_FOUND_ROUTE: function() {
return UNDERSCORE_NOT_FOUND_ROUTE;
},
UNDERSCORE_NOT_FOUND_ROUTE_ENTRY: function() {
return UNDERSCORE_NOT_FOUND_ROUTE_ENTRY;
}
});
const UNDERSCORE_NOT_FOUND_ROUTE = '/_not-found';
const UNDERSCORE_NOT_FOUND_ROUTE_ENTRY = `${UNDERSCORE_NOT_FOUND_ROUTE}/page`;
const UNDERSCORE_GLOBAL_ERROR_ROUTE = '/_global-error';
const UNDERSCORE_GLOBAL_ERROR_ROUTE_ENTRY = `${UNDERSCORE_GLOBAL_ERROR_ROUTE}/page`;
//# sourceMappingURL=entry-constants.js.map

View File

@@ -0,0 +1,36 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
decorateServerError: null,
getErrorSource: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
decorateServerError: function() {
return decorateServerError;
},
getErrorSource: function() {
return getErrorSource;
}
});
const symbolError = Symbol.for('NextjsError');
function getErrorSource(error) {
return error[symbolError] || null;
}
function decorateServerError(error, type) {
Object.defineProperty(error, symbolError, {
writable: false,
enumerable: false,
configurable: false,
value: type
});
}
//# sourceMappingURL=error-source.js.map

View File

@@ -0,0 +1,39 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
CanaryOnlyConfigError: null,
isStableBuild: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
CanaryOnlyConfigError: function() {
return CanaryOnlyConfigError;
},
isStableBuild: function() {
return isStableBuild;
}
});
function isStableBuild() {
return !"16.2.6"?.includes('canary') && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV;
}
class CanaryOnlyConfigError extends Error {
constructor(arg){
if (typeof arg === 'object' && 'feature' in arg) {
super(`The experimental feature "${arg.feature}" can only be enabled when using the latest canary version of Next.js.`);
} else {
super(arg);
}
// This error is meant to interrupt the server start/build process
// but the stack trace isn't meaningful, as it points to internal code.
this.stack = undefined;
}
}
//# sourceMappingURL=canary-only-config-error.js.map

View File

@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "codeFrameColumns", {
enumerable: true,
get: function() {
return codeFrameColumns;
}
});
const _swc = require("../../../build/swc");
function codeFrameColumns(file, location, options = {}) {
// Default to the terminal width
if (options.maxWidth === undefined) {
options.maxWidth = process.stdout.columns;
}
return (0, _swc.getBindingsSync)().codeFrameColumns(file, location, options);
}
//# sourceMappingURL=code-frame.js.map

View File

@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "MISSING_ROOT_TAGS_ERROR", {
enumerable: true,
get: function() {
return MISSING_ROOT_TAGS_ERROR;
}
});
const MISSING_ROOT_TAGS_ERROR = 'NEXT_MISSING_ROOT_TAGS';
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', { value: true });
Object.assign(exports.default, exports);
module.exports = exports.default;
}
//# sourceMappingURL=constants.js.map

View File

@@ -0,0 +1,24 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "throwEmptyGenerateStaticParamsError", {
enumerable: true,
get: function() {
return throwEmptyGenerateStaticParamsError;
}
});
function throwEmptyGenerateStaticParamsError() {
const error = Object.defineProperty(new Error('When using Cache Components, all `generateStaticParams` functions must return at least one result. ' + 'This is to ensure that we can perform build-time validation that there is no other dynamic accesses that would cause a runtime error.\n\n' + 'Learn more: https://nextjs.org/docs/messages/empty-generate-static-params'), "__NEXT_ERROR_CODE", {
value: "E898",
enumerable: false,
configurable: true
});
error.name = 'EmptyGenerateStaticParamsError';
// This error is meant to interrupt the server start/build process
// but the stack trace isn't meaningful, as it points to internal code.
error.stack = undefined;
throw error;
}
//# sourceMappingURL=empty-generate-static-params-error.js.map

View File

@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "HardDeprecatedConfigError", {
enumerable: true,
get: function() {
return HardDeprecatedConfigError;
}
});
class HardDeprecatedConfigError extends Error {
constructor(message){
super(message);
// This error is meant to interrupt the server start/build process
// but the stack trace isn't meaningful, as it points to internal code.
this.stack = undefined;
}
}
//# sourceMappingURL=hard-deprecated-config-error.js.map

View File

@@ -0,0 +1,22 @@
// regexp is based on https://github.com/sindresorhus/escape-string-regexp
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "escapeStringRegexp", {
enumerable: true,
get: function() {
return escapeStringRegexp;
}
});
const reHasRegExp = /[|\\{}()[\]^$+*?.-]/;
const reReplaceRegExp = /[|\\{}()[\]^$+*?.-]/g;
function escapeStringRegexp(str) {
// see also: https://github.com/lodash/lodash/blob/2da024c3b4f9947a48517639de7560457cd4ec6c/escapeRegExp.js#L23
if (reHasRegExp.test(str)) {
return str.replace(reReplaceRegExp, '\\$&');
}
return str;
}
//# sourceMappingURL=escape-regexp.js.map

View File

@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "getHostname", {
enumerable: true,
get: function() {
return getHostname;
}
});
function getHostname(parsed, headers) {
// Get the hostname from the headers if it exists, otherwise use the parsed
// hostname.
let hostname;
if (headers?.host && !Array.isArray(headers.host)) {
hostname = headers.host.toString().split(':', 1)[0];
} else if (parsed.hostname) {
hostname = parsed.hostname;
} else return;
return hostname.toLowerCase();
}
//# sourceMappingURL=get-hostname.js.map

42
build/node_modules/next/dist/shared/lib/hash.js generated vendored Normal file
View File

@@ -0,0 +1,42 @@
// http://www.cse.yorku.ca/~oz/hash.html
// More specifically, 32-bit hash via djbxor
// (ref: https://gist.github.com/eplawless/52813b1d8ad9af510d85?permalink_comment_id=3367765#gistcomment-3367765)
// This is due to number type differences between rust for turbopack to js number types,
// where rust does not have easy way to repreesnt js's 53-bit float number type for the matching
// overflow behavior. This is more `correct` in terms of having canonical hash across different runtime / implementation
// as can gaurantee determinstic output from 32bit hash.
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
djb2Hash: null,
hexHash: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
djb2Hash: function() {
return djb2Hash;
},
hexHash: function() {
return hexHash;
}
});
function djb2Hash(str) {
let hash = 5381;
for(let i = 0; i < str.length; i++){
const char = str.charCodeAt(i);
hash = (hash << 5) + hash + char & 0xffffffff;
}
return hash >>> 0;
}
function hexHash(str) {
return djb2Hash(str).toString(36).slice(0, 5);
}
//# sourceMappingURL=hash.js.map

View File

@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "HeadManagerContext", {
enumerable: true,
get: function() {
return HeadManagerContext;
}
});
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
const _react = /*#__PURE__*/ _interop_require_default._(require("react"));
const HeadManagerContext = _react.default.createContext({});
if (process.env.NODE_ENV !== 'production') {
HeadManagerContext.displayName = 'HeadManagerContext';
}
//# sourceMappingURL=head-manager-context.shared-runtime.js.map

163
build/node_modules/next/dist/shared/lib/head.js generated vendored Normal file
View File

@@ -0,0 +1,163 @@
'use client';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
default: null,
defaultHead: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
default: function() {
return _default;
},
defaultHead: function() {
return defaultHead;
}
});
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _jsxruntime = require("react/jsx-runtime");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _sideeffect = /*#__PURE__*/ _interop_require_default._(require("./side-effect"));
const _headmanagercontextsharedruntime = require("./head-manager-context.shared-runtime");
const _warnonce = require("./utils/warn-once");
function defaultHead() {
const head = [
/*#__PURE__*/ (0, _jsxruntime.jsx)("meta", {
charSet: "utf-8"
}, "charset"),
/*#__PURE__*/ (0, _jsxruntime.jsx)("meta", {
name: "viewport",
content: "width=device-width"
}, "viewport")
];
return head;
}
function onlyReactElement(list, child) {
// React children can be "string" or "number" in this case we ignore them for backwards compat
if (typeof child === 'string' || typeof child === 'number') {
return list;
}
// Adds support for React.Fragment
if (child.type === _react.default.Fragment) {
return list.concat(// @ts-expect-error @types/react does not remove fragments but this could also return ReactPortal[]
_react.default.Children.toArray(child.props.children).reduce(// @ts-expect-error @types/react does not remove fragments but this could also return ReactPortal[]
(fragmentList, fragmentChild)=>{
if (typeof fragmentChild === 'string' || typeof fragmentChild === 'number') {
return fragmentList;
}
return fragmentList.concat(fragmentChild);
}, []));
}
return list.concat(child);
}
const METATYPES = [
'name',
'httpEquiv',
'charSet',
'itemProp'
];
/*
returns a function for filtering head child elements
which shouldn't be duplicated, like <title/>
Also adds support for deduplicated `key` properties
*/ function unique() {
const keys = new Set();
const tags = new Set();
const metaTypes = new Set();
const metaCategories = {};
return (h)=>{
let isUnique = true;
let hasKey = false;
if (h.key && typeof h.key !== 'number' && h.key.indexOf('$') > 0) {
hasKey = true;
const key = h.key.slice(h.key.indexOf('$') + 1);
if (keys.has(key)) {
isUnique = false;
} else {
keys.add(key);
}
}
// eslint-disable-next-line default-case
switch(h.type){
case 'title':
case 'base':
if (tags.has(h.type)) {
isUnique = false;
} else {
tags.add(h.type);
}
break;
case 'meta':
for(let i = 0, len = METATYPES.length; i < len; i++){
const metatype = METATYPES[i];
if (!h.props.hasOwnProperty(metatype)) continue;
if (metatype === 'charSet') {
if (metaTypes.has(metatype)) {
isUnique = false;
} else {
metaTypes.add(metatype);
}
} else {
const category = h.props[metatype];
const categories = metaCategories[metatype] || new Set();
if ((metatype !== 'name' || !hasKey) && categories.has(category)) {
isUnique = false;
} else {
categories.add(category);
metaCategories[metatype] = categories;
}
}
}
break;
}
return isUnique;
};
}
/**
*
* @param headChildrenElements List of children of <Head>
*/ function reduceComponents(headChildrenElements) {
return headChildrenElements.reduce(onlyReactElement, []).reverse().concat(defaultHead().reverse()).filter(unique()).reverse().map((c, i)=>{
const key = c.key || i;
if (process.env.NODE_ENV === 'development') {
// omit JSON-LD structured data snippets from the warning
if (c.type === 'script' && c.props['type'] !== 'application/ld+json') {
const srcMessage = c.props['src'] ? `<script> tag with src="${c.props['src']}"` : `inline <script>`;
(0, _warnonce.warnOnce)(`Do not add <script> tags using next/head (see ${srcMessage}). Use next/script instead. \nSee more info here: https://nextjs.org/docs/messages/no-script-tags-in-head-component`);
} else if (c.type === 'link' && c.props['rel'] === 'stylesheet') {
(0, _warnonce.warnOnce)(`Do not add stylesheets using next/head (see <link rel="stylesheet"> tag with href="${c.props['href']}"). Use Document instead. \nSee more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component`);
}
}
return /*#__PURE__*/ _react.default.cloneElement(c, {
key
});
});
}
/**
* This component injects elements to `<head>` of your page.
* To avoid duplicated `tags` in `<head>` you can use the `key` property, which will make sure every tag is only rendered once.
*/ function Head({ children }) {
const headManager = (0, _react.useContext)(_headmanagercontextsharedruntime.HeadManagerContext);
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_sideeffect.default, {
reduceComponentsToState: reduceComponents,
headManager: headManager,
children: children
});
}
const _default = Head;
if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
Object.defineProperty(exports.default, '__esModule', { value: true });
Object.assign(exports.default, exports);
module.exports = exports.default;
}
//# sourceMappingURL=head.js.map

View File

@@ -0,0 +1,60 @@
'use client';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
NavigationPromisesContext: null,
PathParamsContext: null,
PathnameContext: null,
ReadonlyURLSearchParams: null,
SearchParamsContext: null,
createDevToolsInstrumentedPromise: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
NavigationPromisesContext: function() {
return NavigationPromisesContext;
},
PathParamsContext: function() {
return PathParamsContext;
},
PathnameContext: function() {
return PathnameContext;
},
ReadonlyURLSearchParams: function() {
return _readonlyurlsearchparams.ReadonlyURLSearchParams;
},
SearchParamsContext: function() {
return SearchParamsContext;
},
createDevToolsInstrumentedPromise: function() {
return createDevToolsInstrumentedPromise;
}
});
const _react = require("react");
const _readonlyurlsearchparams = require("../../client/components/readonly-url-search-params");
const SearchParamsContext = (0, _react.createContext)(null);
const PathnameContext = (0, _react.createContext)(null);
const PathParamsContext = (0, _react.createContext)(null);
const NavigationPromisesContext = (0, _react.createContext)(null);
function createDevToolsInstrumentedPromise(displayName, value) {
const promise = Promise.resolve(value);
promise.status = 'fulfilled';
promise.value = value;
promise.displayName = `${displayName} (SSR)`;
return promise;
}
if (process.env.NODE_ENV !== 'production') {
SearchParamsContext.displayName = 'SearchParamsContext';
PathnameContext.displayName = 'PathnameContext';
PathParamsContext.displayName = 'PathParamsContext';
NavigationPromisesContext.displayName = 'NavigationPromisesContext';
}
//# sourceMappingURL=hooks-client-context.shared-runtime.js.map

View File

@@ -0,0 +1,40 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
HtmlContext: null,
useHtmlContext: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
HtmlContext: function() {
return HtmlContext;
},
useHtmlContext: function() {
return useHtmlContext;
}
});
const _react = require("react");
const HtmlContext = (0, _react.createContext)(undefined);
if (process.env.NODE_ENV !== 'production') {
HtmlContext.displayName = 'HtmlContext';
}
function useHtmlContext() {
const context = (0, _react.useContext)(HtmlContext);
if (!context) {
throw Object.defineProperty(new Error(`<Html> should not be imported outside of pages/_document.\n` + 'Read more: https://nextjs.org/docs/messages/no-document-import-in-page'), "__NEXT_ERROR_CODE", {
value: "E67",
enumerable: false,
configurable: true
});
}
return context;
}
//# sourceMappingURL=html-context.shared-runtime.js.map

52
build/node_modules/next/dist/shared/lib/htmlescape.js generated vendored Normal file
View File

@@ -0,0 +1,52 @@
// This utility is based on https://github.com/zertosh/htmlescape
// License: https://github.com/zertosh/htmlescape/blob/0527ca7156a524d256101bb310a9f970f63078ad/LICENSE
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
ESCAPE_REGEX: null,
htmlEscapeAttributeString: null,
htmlEscapeJsonString: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
ESCAPE_REGEX: function() {
return ESCAPE_REGEX;
},
htmlEscapeAttributeString: function() {
return htmlEscapeAttributeString;
},
htmlEscapeJsonString: function() {
return htmlEscapeJsonString;
}
});
const ESCAPE_LOOKUP = {
'&': '\\u0026',
'>': '\\u003e',
'<': '\\u003c',
'\u2028': '\\u2028',
'\u2029': '\\u2029'
};
const ESCAPE_REGEX = /[&><\u2028\u2029]/g;
const ATTRIBUTE_ESCAPE_LOOKUP = {
'&': '&amp;',
'"': '&quot;',
"'": '&#39;',
'<': '&lt;',
'>': '&gt;'
};
const ATTRIBUTE_ESCAPE_REGEX = /[&"'<>]/g;
function htmlEscapeJsonString(str) {
return str.replace(ESCAPE_REGEX, (match)=>ESCAPE_LOOKUP[match]);
}
function htmlEscapeAttributeString(str) {
return str.replace(ATTRIBUTE_ESCAPE_REGEX, (match)=>ATTRIBUTE_ESCAPE_LOOKUP[match]);
}
//# sourceMappingURL=htmlescape.js.map

View File

@@ -0,0 +1,25 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "detectDomainLocale", {
enumerable: true,
get: function() {
return detectDomainLocale;
}
});
function detectDomainLocale(domainItems, hostname, detectedLocale) {
if (!domainItems) return;
if (detectedLocale) {
detectedLocale = detectedLocale.toLowerCase();
}
for (const item of domainItems){
// remove port if present
const domainHostname = item.domain?.split(':', 1)[0].toLowerCase();
if (hostname === domainHostname || detectedLocale === item.defaultLocale.toLowerCase() || item.locales?.some((locale)=>locale.toLowerCase() === detectedLocale)) {
return item;
}
}
}
//# sourceMappingURL=detect-domain-locale.js.map

View File

@@ -0,0 +1,59 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "getLocaleRedirect", {
enumerable: true,
get: function() {
return getLocaleRedirect;
}
});
const _acceptheader = require("../../../server/accept-header");
const _denormalizepagepath = require("../page-path/denormalize-page-path");
const _detectdomainlocale = require("./detect-domain-locale");
const _formaturl = require("../router/utils/format-url");
const _getcookieparser = require("../../../server/api-utils/get-cookie-parser");
function getLocaleFromCookie(i18n, headers = {}) {
const nextLocale = (0, _getcookieparser.getCookieParser)(headers || {})()?.NEXT_LOCALE?.toLowerCase();
return nextLocale ? i18n.locales.find((locale)=>nextLocale === locale.toLowerCase()) : undefined;
}
function detectLocale({ i18n, headers, domainLocale, preferredLocale, pathLocale }) {
return pathLocale || domainLocale?.defaultLocale || getLocaleFromCookie(i18n, headers) || preferredLocale || i18n.defaultLocale;
}
function getAcceptPreferredLocale(i18n, headers) {
if (headers?.['accept-language'] && !Array.isArray(headers['accept-language'])) {
try {
return (0, _acceptheader.acceptLanguage)(headers['accept-language'], i18n.locales);
} catch (err) {}
}
}
function getLocaleRedirect({ defaultLocale, domainLocale, pathLocale, headers, nextConfig, urlParsed }) {
if (nextConfig.i18n && nextConfig.i18n.localeDetection !== false && (0, _denormalizepagepath.denormalizePagePath)(urlParsed.pathname) === '/') {
const preferredLocale = getAcceptPreferredLocale(nextConfig.i18n, headers);
const detectedLocale = detectLocale({
i18n: nextConfig.i18n,
preferredLocale,
headers,
pathLocale,
domainLocale
});
const preferredDomain = (0, _detectdomainlocale.detectDomainLocale)(nextConfig.i18n.domains, undefined, preferredLocale);
if (domainLocale && preferredDomain) {
const isPDomain = preferredDomain.domain === domainLocale.domain;
const isPLocale = preferredDomain.defaultLocale === preferredLocale;
if (!isPDomain || !isPLocale) {
const scheme = `http${preferredDomain.http ? '' : 's'}`;
const rlocale = isPLocale ? '' : preferredLocale;
return `${scheme}://${preferredDomain.domain}/${rlocale}`;
}
}
if (detectedLocale.toLowerCase() !== defaultLocale.toLowerCase()) {
return (0, _formaturl.formatUrl)({
...urlParsed,
pathname: `${nextConfig.basePath || ''}/${detectedLocale}${nextConfig.trailingSlash ? '/' : ''}`
});
}
}
}
//# sourceMappingURL=get-locale-redirect.js.map

View File

@@ -0,0 +1,54 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "normalizeLocalePath", {
enumerable: true,
get: function() {
return normalizeLocalePath;
}
});
/**
* A cache of lowercased locales for each list of locales. This is stored as a
* WeakMap so if the locales are garbage collected, the cache entry will be
* removed as well.
*/ const cache = new WeakMap();
function normalizeLocalePath(pathname, locales) {
// If locales is undefined, return the pathname as is.
if (!locales) return {
pathname
};
// Get the cached lowercased locales or create a new cache entry.
let lowercasedLocales = cache.get(locales);
if (!lowercasedLocales) {
lowercasedLocales = locales.map((locale)=>locale.toLowerCase());
cache.set(locales, lowercasedLocales);
}
let detectedLocale;
// The first segment will be empty, because it has a leading `/`. If
// there is no further segment, there is no locale (or it's the default).
const segments = pathname.split('/', 2);
// If there's no second segment (ie, the pathname is just `/`), there's no
// locale.
if (!segments[1]) return {
pathname
};
// The second segment will contain the locale part if any.
const segment = segments[1].toLowerCase();
// See if the segment matches one of the locales. If it doesn't, there is
// no locale (or it's the default).
const index = lowercasedLocales.indexOf(segment);
if (index < 0) return {
pathname
};
// Return the case-sensitive locale.
detectedLocale = locales[index];
// Remove the `/${locale}` part of the pathname.
pathname = pathname.slice(detectedLocale.length + 1) || '/';
return {
pathname,
detectedLocale
};
}
//# sourceMappingURL=normalize-locale-path.js.map

View File

@@ -0,0 +1,22 @@
/**
* A shared function, used on both client and server, to generate a SVG blur placeholder.
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "getImageBlurSvg", {
enumerable: true,
get: function() {
return getImageBlurSvg;
}
});
function getImageBlurSvg({ widthInt, heightInt, blurWidth, blurHeight, blurDataURL, objectFit }) {
const std = 20;
const svgWidth = blurWidth ? blurWidth * 40 : widthInt;
const svgHeight = blurHeight ? blurHeight * 40 : heightInt;
const viewBox = svgWidth && svgHeight ? `viewBox='0 0 ${svgWidth} ${svgHeight}'` : '';
const preserveAspectRatio = viewBox ? 'none' : objectFit === 'contain' ? 'xMidYMid' : objectFit === 'cover' ? 'xMidYMid slice' : 'none';
return `%3Csvg xmlns='http://www.w3.org/2000/svg' ${viewBox}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='${std}'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='${std}'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${preserveAspectRatio}' style='filter: url(%23b);' href='${blurDataURL}'/%3E%3C/svg%3E`;
}
//# sourceMappingURL=image-blur-svg.js.map

View File

@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "ImageConfigContext", {
enumerable: true,
get: function() {
return ImageConfigContext;
}
});
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
const _react = /*#__PURE__*/ _interop_require_default._(require("react"));
const _imageconfig = require("./image-config");
const ImageConfigContext = _react.default.createContext(_imageconfig.imageConfigDefault);
if (process.env.NODE_ENV !== 'production') {
ImageConfigContext.displayName = 'ImageConfigContext';
}
//# sourceMappingURL=image-config-context.shared-runtime.js.map

View File

@@ -0,0 +1,77 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
VALID_LOADERS: null,
imageConfigDefault: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
VALID_LOADERS: function() {
return VALID_LOADERS;
},
imageConfigDefault: function() {
return imageConfigDefault;
}
});
const VALID_LOADERS = [
'default',
'imgix',
'cloudinary',
'akamai',
'custom'
];
const imageConfigDefault = {
deviceSizes: [
640,
750,
828,
1080,
1200,
1920,
2048,
3840
],
imageSizes: [
32,
48,
64,
96,
128,
256,
384
],
path: '/_next/image',
loader: 'default',
loaderFile: '',
/**
* @deprecated Use `remotePatterns` instead to protect your application from malicious users.
*/ domains: [],
disableStaticImages: false,
minimumCacheTTL: 14400,
formats: [
'image/webp'
],
maximumDiskCacheSize: undefined,
maximumRedirects: 3,
maximumResponseBody: 50000000,
dangerouslyAllowLocalIP: false,
dangerouslyAllowSVG: false,
contentSecurityPolicy: `script-src 'none'; frame-src 'none'; sandbox;`,
contentDispositionType: 'attachment',
localPatterns: undefined,
remotePatterns: [],
qualities: [
75
],
unoptimized: false,
customCacheHandler: false
};
//# sourceMappingURL=image-config.js.map

View File

@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "InvariantError", {
enumerable: true,
get: function() {
return InvariantError;
}
});
class InvariantError extends Error {
constructor(message, options){
super(`Invariant: ${message.endsWith('.') ? message : message + '.'} This is a bug in Next.js.`, options);
this.name = 'InvariantError';
}
}
//# sourceMappingURL=invariant-error.js.map

View File

@@ -0,0 +1,42 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
getObjectClassLabel: null,
isPlainObject: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
getObjectClassLabel: function() {
return getObjectClassLabel;
},
isPlainObject: function() {
return isPlainObject;
}
});
function getObjectClassLabel(value) {
return Object.prototype.toString.call(value);
}
function isPlainObject(value) {
if (getObjectClassLabel(value) !== '[object Object]') {
return false;
}
const prototype = Object.getPrototypeOf(value);
/**
* this used to be previously:
*
* `return prototype === null || prototype === Object.prototype`
*
* but Edge Runtime expose Object from vm, being that kind of type-checking wrongly fail.
*
* It was changed to the current implementation since it's resilient to serialization.
*/ return prototype === null || prototype.hasOwnProperty('isPrototypeOf');
}
//# sourceMappingURL=is-plain-object.js.map

20
build/node_modules/next/dist/shared/lib/is-thenable.js generated vendored Normal file
View File

@@ -0,0 +1,20 @@
/**
* Check to see if a value is Thenable.
*
* @param promise the maybe-thenable value
* @returns true if the value is thenable
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "isThenable", {
enumerable: true,
get: function() {
return isThenable;
}
});
function isThenable(promise) {
return promise !== null && typeof promise === 'object' && 'then' in promise && typeof promise.then === 'function';
}
//# sourceMappingURL=is-thenable.js.map

View File

@@ -0,0 +1,14 @@
/**
* This module is for next.js server internal usage of path module.
* It will use native path module for nodejs runtime.
* It will use path-browserify polyfill for edge runtime.
*/ "use strict";
let path;
if (process.env.NEXT_RUNTIME === 'edge') {
path = require('next/dist/compiled/path-browserify');
} else {
path = require('path');
}
module.exports = path;
//# sourceMappingURL=path.js.map

View File

@@ -0,0 +1,37 @@
// This has to be a shared module which is shared between client component error boundary and dynamic component
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
BailoutToCSRError: null,
isBailoutToCSRError: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
BailoutToCSRError: function() {
return BailoutToCSRError;
},
isBailoutToCSRError: function() {
return isBailoutToCSRError;
}
});
const BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING';
class BailoutToCSRError extends Error {
constructor(reason){
super(`Bail out to client-side rendering: ${reason}`), this.reason = reason, this.digest = BAILOUT_TO_CSR;
}
}
function isBailoutToCSRError(err) {
if (typeof err !== 'object' || err === null || !('digest' in err)) {
return false;
}
return err.digest === BAILOUT_TO_CSR;
}
//# sourceMappingURL=bailout-to-csr.js.map

View File

@@ -0,0 +1,19 @@
'use client';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "LoadableContext", {
enumerable: true,
get: function() {
return LoadableContext;
}
});
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
const _react = /*#__PURE__*/ _interop_require_default._(require("react"));
const LoadableContext = _react.default.createContext(null);
if (process.env.NODE_ENV !== 'production') {
LoadableContext.displayName = 'LoadableContext';
}
//# sourceMappingURL=loadable-context.shared-runtime.js.map

View File

@@ -0,0 +1,246 @@
// TODO: Remove use of `any` type.
/**
@copyright (c) 2017-present James Kyle <me@thejameskyle.com>
MIT License
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
*/ // https://github.com/jamiebuilds/react-loadable/blob/v5.5.0/src/index.js
// Modified to be compatible with webpack 4 / Next.js
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return _default;
}
});
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
const _react = /*#__PURE__*/ _interop_require_default._(require("react"));
const _loadablecontextsharedruntime = require("./loadable-context.shared-runtime");
function resolve(obj) {
return obj && obj.default ? obj.default : obj;
}
const ALL_INITIALIZERS = [];
const READY_INITIALIZERS = [];
let initialized = false;
function load(loader) {
let promise = loader();
let state = {
loading: true,
loaded: null,
error: null
};
state.promise = promise.then((loaded)=>{
state.loading = false;
state.loaded = loaded;
return loaded;
}).catch((err)=>{
state.loading = false;
state.error = err;
throw err;
});
return state;
}
function createLoadableComponent(loadFn, options) {
let opts = Object.assign({
loader: null,
loading: null,
delay: 200,
timeout: null,
webpack: null,
modules: null
}, options);
/** @type LoadableSubscription */ let subscription = null;
function init() {
if (!subscription) {
const sub = new LoadableSubscription(loadFn, opts);
subscription = {
getCurrentValue: sub.getCurrentValue.bind(sub),
subscribe: sub.subscribe.bind(sub),
retry: sub.retry.bind(sub),
promise: sub.promise.bind(sub)
};
}
return subscription.promise();
}
// Server only
if (typeof window === 'undefined') {
ALL_INITIALIZERS.push(init);
}
// Client only
if (!initialized && typeof window !== 'undefined') {
// require.resolveWeak check is needed for environments that don't have it available like Jest
const moduleIds = opts.webpack && typeof require.resolveWeak === 'function' ? opts.webpack() : opts.modules;
if (moduleIds) {
READY_INITIALIZERS.push((ids)=>{
for (const moduleId of moduleIds){
if (ids.includes(moduleId)) {
return init();
}
}
});
}
}
function useLoadableModule() {
init();
const context = _react.default.useContext(_loadablecontextsharedruntime.LoadableContext);
if (context && Array.isArray(opts.modules)) {
opts.modules.forEach((moduleName)=>{
context(moduleName);
});
}
}
function LoadableComponent(props, ref) {
useLoadableModule();
const state = _react.default.useSyncExternalStore(subscription.subscribe, subscription.getCurrentValue, subscription.getCurrentValue);
_react.default.useImperativeHandle(ref, ()=>({
retry: subscription.retry
}), []);
return _react.default.useMemo(()=>{
if (state.loading || state.error) {
return /*#__PURE__*/ _react.default.createElement(opts.loading, {
isLoading: state.loading,
pastDelay: state.pastDelay,
timedOut: state.timedOut,
error: state.error,
retry: subscription.retry
});
} else if (state.loaded) {
return /*#__PURE__*/ _react.default.createElement(resolve(state.loaded), props);
} else {
return null;
}
}, [
props,
state
]);
}
LoadableComponent.preload = ()=>init();
LoadableComponent.displayName = 'LoadableComponent';
return /*#__PURE__*/ _react.default.forwardRef(LoadableComponent);
}
class LoadableSubscription {
constructor(loadFn, opts){
this._loadFn = loadFn;
this._opts = opts;
this._callbacks = new Set();
this._delay = null;
this._timeout = null;
this.retry();
}
promise() {
return this._res.promise;
}
retry() {
this._clearTimeouts();
this._res = this._loadFn(this._opts.loader);
this._state = {
pastDelay: false,
timedOut: false
};
const { _res: res, _opts: opts } = this;
if (res.loading) {
if (typeof opts.delay === 'number') {
if (opts.delay === 0) {
this._state.pastDelay = true;
} else {
this._delay = setTimeout(()=>{
this._update({
pastDelay: true
});
}, opts.delay);
}
}
if (typeof opts.timeout === 'number') {
this._timeout = setTimeout(()=>{
this._update({
timedOut: true
});
}, opts.timeout);
}
}
this._res.promise.then(()=>{
this._update({});
this._clearTimeouts();
}).catch((_err)=>{
this._update({});
this._clearTimeouts();
});
this._update({});
}
_update(partial) {
this._state = {
...this._state,
error: this._res.error,
loaded: this._res.loaded,
loading: this._res.loading,
...partial
};
this._callbacks.forEach((callback)=>callback());
}
_clearTimeouts() {
clearTimeout(this._delay);
clearTimeout(this._timeout);
}
getCurrentValue() {
return this._state;
}
subscribe(callback) {
this._callbacks.add(callback);
return ()=>{
this._callbacks.delete(callback);
};
}
}
function Loadable(opts) {
return createLoadableComponent(load, opts);
}
function flushInitializers(initializers, ids) {
let promises = [];
while(initializers.length){
let init = initializers.pop();
promises.push(init(ids));
}
return Promise.all(promises).then(()=>{
if (initializers.length) {
return flushInitializers(initializers, ids);
}
});
}
Loadable.preloadAll = ()=>{
return new Promise((resolveInitializers, reject)=>{
flushInitializers(ALL_INITIALIZERS).then(resolveInitializers, reject);
});
};
Loadable.preloadReady = (ids = [])=>{
return new Promise((resolvePreload)=>{
const res = ()=>{
initialized = true;
return resolvePreload();
};
// We always will resolve, errors should be handled within loading UIs.
flushInitializers(READY_INITIALIZERS, ids).then(res, res);
});
};
if (typeof window !== 'undefined') {
window.__NEXT_PRELOADREADY = Loadable.preloadReady;
}
const _default = Loadable;
//# sourceMappingURL=loadable.shared-runtime.js.map

View File

@@ -0,0 +1,46 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
hasLocalMatch: null,
matchLocalPattern: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
hasLocalMatch: function() {
return hasLocalMatch;
},
matchLocalPattern: function() {
return matchLocalPattern;
}
});
const _picomatch = require("next/dist/compiled/picomatch");
function matchLocalPattern(pattern, url) {
if (pattern.search !== undefined) {
if (pattern.search !== url.search) {
return false;
}
}
if (!(0, _picomatch.makeRe)(pattern.pathname ?? '**', {
dot: true
}).test(url.pathname)) {
return false;
}
return true;
}
function hasLocalMatch(localPatterns, urlPathAndQuery) {
if (!localPatterns) {
// if the user didn't define "localPatterns", we allow all local images
return true;
}
const url = new URL(urlPathAndQuery, 'http://n');
return localPatterns.some((p)=>matchLocalPattern(p, url));
}
//# sourceMappingURL=match-local-pattern.js.map

View File

@@ -0,0 +1,63 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
hasRemoteMatch: null,
matchRemotePattern: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
hasRemoteMatch: function() {
return hasRemoteMatch;
},
matchRemotePattern: function() {
return matchRemotePattern;
}
});
const _picomatch = require("next/dist/compiled/picomatch");
function matchRemotePattern(pattern, url) {
if (pattern.protocol !== undefined) {
if (pattern.protocol.replace(/:$/, '') !== url.protocol.replace(/:$/, '')) {
return false;
}
}
if (pattern.port !== undefined) {
if (pattern.port !== url.port) {
return false;
}
}
if (pattern.hostname === undefined) {
throw Object.defineProperty(new Error(`Pattern should define hostname but found\n${JSON.stringify(pattern)}`), "__NEXT_ERROR_CODE", {
value: "E410",
enumerable: false,
configurable: true
});
} else {
if (!(0, _picomatch.makeRe)(pattern.hostname).test(url.hostname)) {
return false;
}
}
if (pattern.search !== undefined) {
if (pattern.search !== url.search) {
return false;
}
}
// Should be the same as writeImagesManifest()
if (!(0, _picomatch.makeRe)(pattern.pathname ?? '**', {
dot: true
}).test(url.pathname)) {
return false;
}
return true;
}
function hasRemoteMatch(domains, remotePatterns, url) {
return domains.some((domain)=>url.hostname === domain) || remotePatterns.some((p)=>matchRemotePattern(p, url));
}
//# sourceMappingURL=match-remote-pattern.js.map

View File

@@ -0,0 +1,15 @@
// Note: This file is JS because it's used by the taskfile-swc.js file, which is JS.
// Keep file changes in sync with the corresponding `.d.ts` files.
/**
* These are the minimum browser versions that we consider "modern" and thus compile for by default.
* This list was generated using `pnpm browserslist "baseline widely available"` on 2025-10-01.
*/ "use strict";
const MODERN_BROWSERSLIST_TARGET = [
'chrome 111',
'edge 111',
'firefox 111',
'safari 16.4'
];
module.exports = MODERN_BROWSERSLIST_TARGET;
//# sourceMappingURL=modern-browserslist-target.js.map

View File

@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "NoFallbackError", {
enumerable: true,
get: function() {
return NoFallbackError;
}
});
class NoFallbackError extends Error {
constructor(){
super();
this.message = 'Internal: NoFallbackError';
}
}
//# sourceMappingURL=no-fallback-error.external.js.map

View File

@@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "normalizedAssetPrefix", {
enumerable: true,
get: function() {
return normalizedAssetPrefix;
}
});
function normalizedAssetPrefix(assetPrefix) {
// remove all leading slashes and trailing slashes
const escapedAssetPrefix = assetPrefix?.replace(/^\/+|\/+$/g, '') || false;
// if an assetPrefix was '/', we return empty string
// because it could be an unnecessary trailing slash
if (!escapedAssetPrefix) {
return '';
}
if (URL.canParse(escapedAssetPrefix)) {
const url = new URL(escapedAssetPrefix).toString();
return url.endsWith('/') ? url.slice(0, -1) : url;
}
// assuming assetPrefix here is a pathname-style,
// restore the leading slash
return `/${escapedAssetPrefix}`;
}
//# sourceMappingURL=normalized-asset-prefix.js.map

View File

@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "absolutePathToPage", {
enumerable: true,
get: function() {
return absolutePathToPage;
}
});
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
const _ensureleadingslash = require("./ensure-leading-slash");
const _normalizepathsep = require("./normalize-path-sep");
const _path = /*#__PURE__*/ _interop_require_default._(require("../isomorphic/path"));
const _removepagepathtail = require("./remove-page-path-tail");
const _getmetadataroute = require("../../../lib/metadata/get-metadata-route");
function absolutePathToPage(pagePath, options) {
const isAppDir = options.pagesType === 'app';
const page = (0, _removepagepathtail.removePagePathTail)((0, _normalizepathsep.normalizePathSep)((0, _ensureleadingslash.ensureLeadingSlash)(_path.default.relative(options.dir, pagePath))), {
extensions: options.extensions,
keepIndex: options.keepIndex
});
return isAppDir ? (0, _getmetadataroute.normalizeMetadataRoute)(page) : page;
}
//# sourceMappingURL=absolute-path-to-page.js.map

View File

@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "denormalizePagePath", {
enumerable: true,
get: function() {
return denormalizePagePath;
}
});
const _utils = require("../router/utils");
const _normalizepathsep = require("./normalize-path-sep");
function denormalizePagePath(page) {
let _page = (0, _normalizepathsep.normalizePathSep)(page);
return _page.startsWith('/index/') && !(0, _utils.isDynamicRoute)(_page) ? _page.slice(6) : _page !== '/index' ? _page : '/';
}
//# sourceMappingURL=denormalize-page-path.js.map

View File

@@ -0,0 +1,18 @@
/**
* For a given page path, this function ensures that there is a leading slash.
* If there is not a leading slash, one is added, otherwise it is noop.
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "ensureLeadingSlash", {
enumerable: true,
get: function() {
return ensureLeadingSlash;
}
});
function ensureLeadingSlash(path) {
return path.startsWith('/') ? path : `/${path}`;
}
//# sourceMappingURL=ensure-leading-slash.js.map

View File

@@ -0,0 +1,40 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "getPagePaths", {
enumerable: true,
get: function() {
return getPagePaths;
}
});
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
const _denormalizepagepath = require("./denormalize-page-path");
const _path = /*#__PURE__*/ _interop_require_default._(require("../isomorphic/path"));
function getPagePaths(normalizedPagePath, extensions, isAppDir) {
const page = (0, _denormalizepagepath.denormalizePagePath)(normalizedPagePath);
let prefixes;
if (isAppDir) {
prefixes = [
page
];
} else if (normalizedPagePath.endsWith('/index')) {
prefixes = [
_path.default.join(page, 'index')
];
} else {
prefixes = [
page,
_path.default.join(page, 'index')
];
}
const paths = [];
for (const extension of extensions){
for (const prefix of prefixes){
paths.push(`${prefix}.${extension}`);
}
}
return paths;
}
//# sourceMappingURL=get-page-paths.js.map

View File

@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "normalizeDataPath", {
enumerable: true,
get: function() {
return normalizeDataPath;
}
});
const _pathhasprefix = require("../router/utils/path-has-prefix");
function normalizeDataPath(pathname) {
if (!(0, _pathhasprefix.pathHasPrefix)(pathname || '/', '/_next/data')) {
return pathname;
}
pathname = pathname.replace(/\/_next\/data\/[^/]{1,}/, '').replace(/\.json$/, '');
if (pathname === '/index') {
return '/';
}
return pathname;
}
//# sourceMappingURL=normalize-data-path.js.map

View File

@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "normalizePagePath", {
enumerable: true,
get: function() {
return normalizePagePath;
}
});
const _ensureleadingslash = require("./ensure-leading-slash");
const _utils = require("../router/utils");
const _utils1 = require("../utils");
function normalizePagePath(page) {
const normalized = /^\/index(\/|$)/.test(page) && !(0, _utils.isDynamicRoute)(page) ? `/index${page}` : page === '/' ? '/index' : (0, _ensureleadingslash.ensureLeadingSlash)(page);
if (process.env.NEXT_RUNTIME !== 'edge') {
const { posix } = require('path');
const resolvedPage = posix.normalize(normalized);
if (resolvedPage !== normalized) {
throw new _utils1.NormalizeError(`Requested and resolved page mismatch: ${normalized} ${resolvedPage}`);
}
}
return normalized;
}
//# sourceMappingURL=normalize-page-path.js.map

View File

@@ -0,0 +1,19 @@
/**
* For a given page path, this function ensures that there is no backslash
* escaping slashes in the path. Example:
* - `foo\/bar\/baz` -> `foo/bar/baz`
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "normalizePathSep", {
enumerable: true,
get: function() {
return normalizePathSep;
}
});
function normalizePathSep(path) {
return path.replace(/\\/g, '/');
}
//# sourceMappingURL=normalize-path-sep.js.map

View File

@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "removePagePathTail", {
enumerable: true,
get: function() {
return removePagePathTail;
}
});
const _normalizepathsep = require("./normalize-path-sep");
function removePagePathTail(pagePath, options) {
pagePath = (0, _normalizepathsep.normalizePathSep)(pagePath).replace(new RegExp(`\\.+(?:${options.extensions.join('|')})$`), '');
if (options.keepIndex !== true) {
pagePath = pagePath.replace(/\/index$/, '') || '/';
}
return pagePath;
}
//# sourceMappingURL=remove-page-path-tail.js.map

View File

@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "createPromiseWithResolvers", {
enumerable: true,
get: function() {
return createPromiseWithResolvers;
}
});
function createPromiseWithResolvers() {
// Shim of Stage 4 Promise.withResolvers proposal
let resolve;
let reject;
const promise = new Promise((res, rej)=>{
resolve = res;
reject = rej;
});
return {
resolve: resolve,
reject: reject,
promise
};
}
//# sourceMappingURL=promise-with-resolvers.js.map

View File

@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "RouterContext", {
enumerable: true,
get: function() {
return RouterContext;
}
});
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
const _react = /*#__PURE__*/ _interop_require_default._(require("react"));
const RouterContext = _react.default.createContext(null);
if (process.env.NODE_ENV !== 'production') {
RouterContext.displayName = 'RouterContext';
}
//# sourceMappingURL=router-context.shared-runtime.js.map

View File

@@ -0,0 +1,136 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
PathnameContextProviderAdapter: null,
adaptForAppRouterInstance: null,
adaptForPathParams: null,
adaptForSearchParams: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
PathnameContextProviderAdapter: function() {
return PathnameContextProviderAdapter;
},
adaptForAppRouterInstance: function() {
return adaptForAppRouterInstance;
},
adaptForPathParams: function() {
return adaptForPathParams;
},
adaptForSearchParams: function() {
return adaptForSearchParams;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _jsxruntime = require("react/jsx-runtime");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const _hooksclientcontextsharedruntime = require("../hooks-client-context.shared-runtime");
const _utils = require("./utils");
const _aspathtosearchparams = require("./utils/as-path-to-search-params");
const _routeregex = require("./utils/route-regex");
function adaptForAppRouterInstance(pagesRouter) {
return {
back () {
pagesRouter.back();
},
forward () {
pagesRouter.forward();
},
refresh () {
pagesRouter.reload();
},
hmrRefresh () {},
push (href, { scroll } = {}) {
void pagesRouter.push(href, undefined, {
scroll
});
},
replace (href, { scroll } = {}) {
void pagesRouter.replace(href, undefined, {
scroll
});
},
prefetch (href) {
void pagesRouter.prefetch(href);
}
};
}
function adaptForSearchParams(router) {
if (!router.isReady || !router.query) {
return new URLSearchParams();
}
return (0, _aspathtosearchparams.asPathToSearchParams)(router.asPath);
}
function adaptForPathParams(router) {
if (!router.isReady || !router.query) {
return null;
}
const pathParams = {};
const routeRegex = (0, _routeregex.getRouteRegex)(router.pathname);
const keys = Object.keys(routeRegex.groups);
for (const key of keys){
pathParams[key] = router.query[key];
}
return pathParams;
}
function PathnameContextProviderAdapter({ children, router, ...props }) {
const ref = (0, _react.useRef)(props.isAutoExport);
const value = (0, _react.useMemo)(()=>{
// isAutoExport is only ever `true` on the first render from the server,
// so reset it to `false` after we read it for the first time as `true`. If
// we don't use the value, then we don't need it.
const isAutoExport = ref.current;
if (isAutoExport) {
ref.current = false;
}
// When the route is a dynamic route, we need to do more processing to
// determine if we need to stop showing the pathname.
if ((0, _utils.isDynamicRoute)(router.pathname)) {
// When the router is rendering the fallback page, it can't possibly know
// the path, so return `null` here. Read more about fallback pages over
// at:
// https://nextjs.org/docs/api-reference/data-fetching/get-static-paths#fallback-pages
if (router.isFallback) {
return null;
}
// When `isAutoExport` is true, meaning this is a page page has been
// automatically statically optimized, and the router is not ready, then
// we can't know the pathname yet. Read more about automatic static
// optimization at:
// https://nextjs.org/docs/advanced-features/automatic-static-optimization
if (isAutoExport && !router.isReady) {
return null;
}
}
// The `router.asPath` contains the pathname seen by the browser (including
// any query strings), so it should have that stripped. Read more about the
// `asPath` option over at:
// https://nextjs.org/docs/api-reference/next/router#router-object
let url;
try {
url = new URL(router.asPath, 'http://f');
} catch (_) {
// fallback to / for invalid asPath values e.g. //
return '/';
}
return url.pathname;
}, [
router.asPath,
router.isFallback,
router.isReady,
router.pathname
]);
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_hooksclientcontextsharedruntime.PathnameContext.Provider, {
value: value,
children: children
});
}
//# sourceMappingURL=adapters.js.map

View File

@@ -0,0 +1,134 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
isInterceptionAppRoute: null,
isNormalizedAppRoute: null,
parseAppRoute: null,
parseAppRouteSegment: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
isInterceptionAppRoute: function() {
return isInterceptionAppRoute;
},
isNormalizedAppRoute: function() {
return isNormalizedAppRoute;
},
parseAppRoute: function() {
return parseAppRoute;
},
parseAppRouteSegment: function() {
return parseAppRouteSegment;
}
});
const _invarianterror = require("../../invariant-error");
const _getsegmentparam = require("../utils/get-segment-param");
const _interceptionroutes = require("../utils/interception-routes");
function normalizeEncodedDynamicPlaceholder(segment) {
if (!/%5b|%5d/i.test(segment)) {
return segment;
}
try {
const decodedSegment = decodeURIComponent(segment);
return (0, _getsegmentparam.getSegmentParam)(decodedSegment) ? decodedSegment : segment;
} catch {
return segment;
}
}
function parseAppRouteSegment(segment) {
if (segment === '') {
return null;
}
// Check if the segment starts with an interception marker
const interceptionMarker = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.find((m)=>segment.startsWith(m));
const param = (0, _getsegmentparam.getSegmentParam)(segment);
if (param) {
return {
type: 'dynamic',
name: segment,
param,
interceptionMarker
};
} else if (segment.startsWith('(') && segment.endsWith(')')) {
return {
type: 'route-group',
name: segment,
interceptionMarker
};
} else if (segment.startsWith('@')) {
return {
type: 'parallel-route',
name: segment,
interceptionMarker
};
} else {
return {
type: 'static',
name: segment,
interceptionMarker
};
}
}
function isNormalizedAppRoute(route) {
return route.normalized;
}
function isInterceptionAppRoute(route) {
return route.interceptionMarker !== undefined && route.interceptingRoute !== undefined && route.interceptedRoute !== undefined;
}
function parseAppRoute(pathname, normalized) {
const pathnameSegments = pathname.split('/').filter(Boolean);
// Build segments array with static and dynamic segments
const segments = [];
// Parse if this is an interception route.
let interceptionMarker;
let interceptingRoute;
let interceptedRoute;
for (const segment of pathnameSegments){
const normalizedSegment = normalizeEncodedDynamicPlaceholder(segment);
// Parse the segment into an AppSegment.
const appSegment = parseAppRouteSegment(normalizedSegment);
if (!appSegment) {
continue;
}
if (normalized && (appSegment.type === 'route-group' || appSegment.type === 'parallel-route')) {
throw Object.defineProperty(new _invarianterror.InvariantError(`${pathname} is being parsed as a normalized route, but it has a route group or parallel route segment.`), "__NEXT_ERROR_CODE", {
value: "E923",
enumerable: false,
configurable: true
});
}
segments.push(appSegment);
if (appSegment.interceptionMarker) {
const parts = pathname.split(appSegment.interceptionMarker);
if (parts.length !== 2) {
throw Object.defineProperty(new Error(`Invalid interception route: ${pathname}`), "__NEXT_ERROR_CODE", {
value: "E924",
enumerable: false,
configurable: true
});
}
interceptingRoute = normalized ? parseAppRoute(parts[0], true) : parseAppRoute(parts[0], false);
interceptedRoute = normalized ? parseAppRoute(parts[1], true) : parseAppRoute(parts[1], false);
interceptionMarker = appSegment.interceptionMarker;
}
}
const dynamicSegments = segments.filter((segment)=>segment.type === 'dynamic');
return {
normalized,
pathname,
segments,
dynamicSegments,
interceptionMarker,
interceptingRoute,
interceptedRoute
};
}
//# sourceMappingURL=app.js.map

View File

@@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "addLocale", {
enumerable: true,
get: function() {
return addLocale;
}
});
const _addpathprefix = require("./add-path-prefix");
const _pathhasprefix = require("./path-has-prefix");
function addLocale(path, locale, defaultLocale, ignorePrefix) {
// If no locale was given or the locale is the default locale, we don't need
// to prefix the path.
if (!locale || locale === defaultLocale) return path;
const lower = path.toLowerCase();
// If the path is an API path or the path already has the locale prefix, we
// don't need to prefix the path.
if (!ignorePrefix) {
if ((0, _pathhasprefix.pathHasPrefix)(lower, '/api')) return path;
if ((0, _pathhasprefix.pathHasPrefix)(lower, `/${locale.toLowerCase()}`)) return path;
}
// Add the locale prefix to the path.
return (0, _addpathprefix.addPathPrefix)(path, `/${locale}`);
}
//# sourceMappingURL=add-locale.js.map

View File

@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "addPathPrefix", {
enumerable: true,
get: function() {
return addPathPrefix;
}
});
const _parsepath = require("./parse-path");
function addPathPrefix(path, prefix) {
if (!path.startsWith('/') || !prefix) {
return path;
}
const { pathname, query, hash } = (0, _parsepath.parsePath)(path);
return `${prefix}${pathname}${query}${hash}`;
}
//# sourceMappingURL=add-path-prefix.js.map

View File

@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "addPathSuffix", {
enumerable: true,
get: function() {
return addPathSuffix;
}
});
const _parsepath = require("./parse-path");
function addPathSuffix(path, suffix) {
if (!path.startsWith('/') || !suffix) {
return path;
}
const { pathname, query, hash } = (0, _parsepath.parsePath)(path);
return `${pathname}${suffix}${query}${hash}`;
}
//# sourceMappingURL=add-path-suffix.js.map

View File

@@ -0,0 +1,62 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
compareAppPaths: null,
normalizeAppPath: null,
normalizeRscURL: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
compareAppPaths: function() {
return compareAppPaths;
},
normalizeAppPath: function() {
return normalizeAppPath;
},
normalizeRscURL: function() {
return normalizeRscURL;
}
});
const _ensureleadingslash = require("../../page-path/ensure-leading-slash");
const _segment = require("../../segment");
function normalizeAppPath(route) {
return (0, _ensureleadingslash.ensureLeadingSlash)(route.split('/').reduce((pathname, segment, index, segments)=>{
// Empty segments are ignored.
if (!segment) {
return pathname;
}
// Groups are ignored.
if ((0, _segment.isGroupSegment)(segment)) {
return pathname;
}
// Parallel segments are ignored.
if (segment[0] === '@') {
return pathname;
}
// The last segment (if it's a leaf) should be ignored.
if ((segment === 'page' || segment === 'route') && index === segments.length - 1) {
return pathname;
}
return `${pathname}/${segment}`;
}, ''));
}
function compareAppPaths(a, b) {
const aHasSlot = a.includes('/@');
const bHasSlot = b.includes('/@');
if (aHasSlot && !bHasSlot) return -1;
if (!aHasSlot && bHasSlot) return 1;
return a.localeCompare(b);
}
function normalizeRscURL(url) {
return url.replace(/\.rsc($|\?)/, // $1 ensures `?` is preserved
'$1');
}
//# sourceMappingURL=app-paths.js.map

View File

@@ -0,0 +1,17 @@
// Convert router.asPath to a URLSearchParams object
// example: /dynamic/[slug]?foo=bar -> { foo: 'bar' }
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "asPathToSearchParams", {
enumerable: true,
get: function() {
return asPathToSearchParams;
}
});
function asPathToSearchParams(asPath) {
return new URL(asPath, 'http://n').searchParams;
}
//# sourceMappingURL=as-path-to-search-params.js.map

View File

@@ -0,0 +1,70 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
computeCacheBustingSearchParam: null,
computeLegacyCacheBustingSearchParam: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
computeCacheBustingSearchParam: function() {
return computeCacheBustingSearchParam;
},
computeLegacyCacheBustingSearchParam: function() {
return computeLegacyCacheBustingSearchParam;
}
});
const _hash = require("../../hash");
const CACHE_BUSTING_SEARCH_PARAM_DIGEST_BYTES = 12;
const textEncoder = new TextEncoder();
function encodeCacheBustingSearchParam(bytes) {
let binary = '';
for(let i = 0; i < bytes.length; i++){
binary += String.fromCharCode(bytes[i]);
}
return btoa(binary).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
}
function normalizeCacheBustingInput(value) {
if (value === undefined) {
return '0';
}
return Array.isArray(value) ? value.join(',') : value;
}
function createCacheBustingSearchParamInput(prefetchHeader, segmentPrefetchHeader, stateTreeHeader, nextUrlHeader) {
if ((prefetchHeader === undefined || prefetchHeader === '0') && segmentPrefetchHeader === undefined && stateTreeHeader === undefined && nextUrlHeader === undefined) {
return null;
}
return [
prefetchHeader ?? '0',
normalizeCacheBustingInput(segmentPrefetchHeader),
normalizeCacheBustingInput(stateTreeHeader),
normalizeCacheBustingInput(nextUrlHeader)
].join(',');
}
async function computeCacheBustingSearchParamFromInput(input) {
// Truncate SHA-256 to 96 bits to keep `_rsc` compact
const digest = await globalThis.crypto.subtle.digest('SHA-256', textEncoder.encode(input));
return encodeCacheBustingSearchParam(new Uint8Array(digest).subarray(0, CACHE_BUSTING_SEARCH_PARAM_DIGEST_BYTES));
}
async function computeCacheBustingSearchParam(prefetchHeader, segmentPrefetchHeader, stateTreeHeader, nextUrlHeader) {
const input = createCacheBustingSearchParamInput(prefetchHeader, segmentPrefetchHeader, stateTreeHeader, nextUrlHeader);
if (input === null) {
return '';
}
return computeCacheBustingSearchParamFromInput(input);
}
function computeLegacyCacheBustingSearchParam(prefetchHeader, segmentPrefetchHeader, stateTreeHeader, nextUrlHeader) {
const input = createCacheBustingSearchParamInput(prefetchHeader, segmentPrefetchHeader, stateTreeHeader, nextUrlHeader);
if (input === null) {
return '';
}
return (0, _hash.hexHash)(input);
}
//# sourceMappingURL=cache-busting-search-param.js.map

View File

@@ -0,0 +1,16 @@
// escape delimiters used by path-to-regexp
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return escapePathDelimiters;
}
});
function escapePathDelimiters(segment, escapeEncoded) {
return segment.replace(new RegExp(`([/#?]${escapeEncoded ? '|%(2f|23|3f|5c)' : ''})`, 'gi'), (char)=>encodeURIComponent(char));
}
//# sourceMappingURL=escape-path-delimiters.js.map

View File

@@ -0,0 +1,27 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "formatNextPathnameInfo", {
enumerable: true,
get: function() {
return formatNextPathnameInfo;
}
});
const _removetrailingslash = require("./remove-trailing-slash");
const _addpathprefix = require("./add-path-prefix");
const _addpathsuffix = require("./add-path-suffix");
const _addlocale = require("./add-locale");
function formatNextPathnameInfo(info) {
let pathname = (0, _addlocale.addLocale)(info.pathname, info.locale, info.buildId ? undefined : info.defaultLocale, info.ignorePrefix);
if (info.buildId || !info.trailingSlash) {
pathname = (0, _removetrailingslash.removeTrailingSlash)(pathname);
}
if (info.buildId) {
pathname = (0, _addpathsuffix.addPathSuffix)((0, _addpathprefix.addPathPrefix)(pathname, `/_next/data/${info.buildId}`), info.pathname === '/' ? 'index.json' : '.json');
}
pathname = (0, _addpathprefix.addPathPrefix)(pathname, info.basePath);
return !info.buildId && info.trailingSlash ? !pathname.endsWith('/') ? (0, _addpathsuffix.addPathSuffix)(pathname, '/') : pathname : (0, _removetrailingslash.removeTrailingSlash)(pathname);
}
//# sourceMappingURL=format-next-pathname-info.js.map

View File

@@ -0,0 +1,111 @@
// Format function modified from nodejs
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
formatUrl: null,
formatWithValidation: null,
urlObjectKeys: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
formatUrl: function() {
return formatUrl;
},
formatWithValidation: function() {
return formatWithValidation;
},
urlObjectKeys: function() {
return urlObjectKeys;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _querystring = /*#__PURE__*/ _interop_require_wildcard._(require("./querystring"));
const slashedProtocols = /https?|ftp|gopher|file/;
function formatUrl(urlObj) {
let { auth, hostname } = urlObj;
let protocol = urlObj.protocol || '';
let pathname = urlObj.pathname || '';
let hash = urlObj.hash || '';
let query = urlObj.query || '';
let host = false;
auth = auth ? encodeURIComponent(auth).replace(/%3A/i, ':') + '@' : '';
if (urlObj.host) {
host = auth + urlObj.host;
} else if (hostname) {
host = auth + (~hostname.indexOf(':') ? `[${hostname}]` : hostname);
if (urlObj.port) {
host += ':' + urlObj.port;
}
}
if (query && typeof query === 'object') {
query = String(_querystring.urlQueryToSearchParams(query));
}
let search = urlObj.search || query && `?${query}` || '';
if (protocol && !protocol.endsWith(':')) protocol += ':';
if (urlObj.slashes || (!protocol || slashedProtocols.test(protocol)) && host !== false) {
host = '//' + (host || '');
if (pathname && pathname[0] !== '/') pathname = '/' + pathname;
} else if (!host) {
host = '';
}
if (hash && hash[0] !== '#') hash = '#' + hash;
if (search && search[0] !== '?') search = '?' + search;
pathname = pathname.replace(/[?#]/g, encodeURIComponent);
search = search.replace('#', '%23');
return `${protocol}${host}${pathname}${search}${hash}`;
}
const urlObjectKeys = [
'auth',
'hash',
'host',
'hostname',
'href',
'path',
'pathname',
'port',
'protocol',
'query',
'search',
'slashes'
];
function formatWithValidation(url) {
if (process.env.NODE_ENV === 'development') {
if (url !== null && typeof url === 'object') {
Object.keys(url).forEach((key)=>{
if (!urlObjectKeys.includes(key)) {
console.warn(`Unknown key passed via urlObject into url.format: ${key}`);
}
});
}
}
return formatUrl(url);
}
//# sourceMappingURL=format-url.js.map

View File

@@ -0,0 +1,174 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
PARAMETER_PATTERN: null,
getDynamicParam: null,
interpolateParallelRouteParams: null,
parseMatchedParameter: null,
parseParameter: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
PARAMETER_PATTERN: function() {
return PARAMETER_PATTERN;
},
getDynamicParam: function() {
return getDynamicParam;
},
interpolateParallelRouteParams: function() {
return interpolateParallelRouteParams;
},
parseMatchedParameter: function() {
return parseMatchedParameter;
},
parseParameter: function() {
return parseParameter;
}
});
const _invarianterror = require("../../invariant-error");
const _parseloadertree = require("./parse-loader-tree");
const _app = require("../routes/app");
const _resolveparamvalue = require("./resolve-param-value");
/**
* Gets the value of a param from the params object. This correctly handles the
* case where the param is a fallback route param and encodes the resulting
* value.
*
* @param interpolatedParams - The params object.
* @param segmentKey - The key of the segment.
* @param fallbackRouteParams - The fallback route params.
* @returns The value of the param.
*/ function getParamValue(interpolatedParams, segmentKey, fallbackRouteParams) {
let value = interpolatedParams[segmentKey];
if (fallbackRouteParams?.has(segmentKey)) {
// We know that the fallback route params has the segment key because we
// checked that above.
const [searchValue] = fallbackRouteParams.get(segmentKey);
value = searchValue;
} else if (Array.isArray(value)) {
value = value.map((i)=>encodeURIComponent(i));
} else if (typeof value === 'string') {
value = encodeURIComponent(value);
}
return value;
}
function interpolateParallelRouteParams(loaderTree, params, pagePath, fallbackRouteParams) {
const interpolated = structuredClone(params);
// Stack-based traversal with depth tracking
const stack = [
{
tree: loaderTree,
depth: 0
}
];
// Parse the route from the provided page path.
const route = (0, _app.parseAppRoute)(pagePath, true);
while(stack.length > 0){
const { tree, depth } = stack.pop();
const { segment, parallelRoutes } = (0, _parseloadertree.parseLoaderTree)(tree);
const appSegment = (0, _app.parseAppRouteSegment)(segment);
if (appSegment?.type === 'dynamic' && !interpolated.hasOwnProperty(appSegment.param.paramName) && // If the param is in the fallback route params, we don't need to
// interpolate it because it's already marked as being unknown.
!fallbackRouteParams?.has(appSegment.param.paramName)) {
const { paramName, paramType } = appSegment.param;
const paramValue = (0, _resolveparamvalue.resolveParamValue)(paramName, paramType, depth, route, interpolated);
if (paramValue !== undefined) {
interpolated[paramName] = paramValue;
} else if (paramType !== 'optional-catchall') {
throw Object.defineProperty(new _invarianterror.InvariantError(`Could not resolve param value for segment: ${paramName}`), "__NEXT_ERROR_CODE", {
value: "E932",
enumerable: false,
configurable: true
});
}
}
// Calculate next depth - increment if this is not a route group and not empty
let nextDepth = depth;
if (appSegment && appSegment.type !== 'route-group' && appSegment.type !== 'parallel-route') {
nextDepth++;
}
// Add all parallel routes to the stack for processing
for (const parallelRoute of Object.values(parallelRoutes)){
stack.push({
tree: parallelRoute,
depth: nextDepth
});
}
}
return interpolated;
}
function getDynamicParam(interpolatedParams, segmentKey, dynamicParamType, fallbackRouteParams, staticSiblings) {
let value = getParamValue(interpolatedParams, segmentKey, fallbackRouteParams);
// handle the case where an optional catchall does not have a value,
// e.g. `/dashboard/[[...slug]]` when requesting `/dashboard`
if (!value || value.length === 0) {
if (dynamicParamType === 'oc') {
return {
param: segmentKey,
value: null,
type: dynamicParamType,
treeSegment: [
segmentKey,
'',
dynamicParamType,
staticSiblings
]
};
}
throw Object.defineProperty(new _invarianterror.InvariantError(`Missing value for segment key: "${segmentKey}" with dynamic param type: ${dynamicParamType}`), "__NEXT_ERROR_CODE", {
value: "E864",
enumerable: false,
configurable: true
});
}
const paramCacheKey = Array.isArray(value) ? value.join('/') : value;
return {
param: segmentKey,
// The value that is passed to user code.
value,
// The value that is rendered in the router tree.
// TODO: If the number of static siblings exceeds some threshold (e.g.,
// dozens or hundreds), consider sending a Bloom filter instead of the full
// array to reduce payload size. The client would then use the Bloom filter
// to check membership with a small false positive rate.
treeSegment: [
segmentKey,
paramCacheKey,
dynamicParamType,
staticSiblings
],
type: dynamicParamType
};
}
const PARAMETER_PATTERN = /^([^[]*)\[((?:\[[^\]]*\])|[^\]]+)\](.*)$/;
function parseParameter(param) {
const match = param.match(PARAMETER_PATTERN);
if (!match) {
return parseMatchedParameter(param);
}
return parseMatchedParameter(match[2]);
}
function parseMatchedParameter(param) {
const optional = param.startsWith('[') && param.endsWith(']');
if (optional) {
param = param.slice(1, -1);
}
const repeat = param.startsWith('...');
if (repeat) {
param = param.slice(3);
}
return {
key: param,
repeat,
optional
};
}
//# sourceMappingURL=get-dynamic-param.js.map

View File

@@ -0,0 +1,52 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "getNextPathnameInfo", {
enumerable: true,
get: function() {
return getNextPathnameInfo;
}
});
const _normalizelocalepath = require("../../i18n/normalize-locale-path");
const _removepathprefix = require("./remove-path-prefix");
const _pathhasprefix = require("./path-has-prefix");
function getNextPathnameInfo(pathname, options) {
const { basePath, i18n, trailingSlash } = options.nextConfig ?? {};
const info = {
pathname,
trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash
};
if (basePath && (0, _pathhasprefix.pathHasPrefix)(info.pathname, basePath)) {
info.pathname = (0, _removepathprefix.removePathPrefix)(info.pathname, basePath);
info.basePath = basePath;
}
let pathnameNoDataPrefix = info.pathname;
if (info.pathname.startsWith('/_next/data/') && info.pathname.endsWith('.json')) {
const paths = info.pathname.replace(/^\/_next\/data\//, '').replace(/\.json$/, '').split('/');
const buildId = paths[0];
info.buildId = buildId;
pathnameNoDataPrefix = paths[1] !== 'index' ? `/${paths.slice(1).join('/')}` : '/';
// update pathname with normalized if enabled although
// we use normalized to populate locale info still
if (options.parseData === true) {
info.pathname = pathnameNoDataPrefix;
}
}
// If provided, use the locale route normalizer to detect the locale instead
// of the function below.
if (i18n) {
let result = options.i18nProvider ? options.i18nProvider.analyze(info.pathname) : (0, _normalizelocalepath.normalizeLocalePath)(info.pathname, i18n.locales);
info.locale = result.detectedLocale;
info.pathname = result.pathname ?? info.pathname;
if (!result.detectedLocale && info.buildId) {
result = options.i18nProvider ? options.i18nProvider.analyze(pathnameNoDataPrefix) : (0, _normalizelocalepath.normalizeLocalePath)(pathnameNoDataPrefix, i18n.locales);
if (result.detectedLocale) {
info.locale = result.detectedLocale;
}
}
}
return info;
}
//# sourceMappingURL=get-next-pathname-info.js.map

View File

@@ -0,0 +1,25 @@
// Translate a pages asset path (relative from a common prefix) back into its logical route
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, // "asset path" being its javascript file, data file, prerendered html,...
"default", {
enumerable: true,
get: function() {
return getRouteFromAssetPath;
}
});
const _isdynamic = require("./is-dynamic");
function getRouteFromAssetPath(assetPath, ext = '') {
assetPath = assetPath.replace(/\\/g, '/');
assetPath = ext && assetPath.endsWith(ext) ? assetPath.slice(0, -ext.length) : assetPath;
if (assetPath.startsWith('/index/') && !(0, _isdynamic.isDynamicRoute)(assetPath)) {
assetPath = assetPath.slice(6);
} else if (assetPath === '/index') {
assetPath = '/';
}
return assetPath;
}
//# sourceMappingURL=get-route-from-asset-path.js.map

View File

@@ -0,0 +1,90 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
getParamProperties: null,
getSegmentParam: null,
isCatchAll: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
getParamProperties: function() {
return getParamProperties;
},
getSegmentParam: function() {
return getSegmentParam;
},
isCatchAll: function() {
return isCatchAll;
}
});
const _interceptionroutes = require("./interception-routes");
function getSegmentParam(segment) {
const interceptionMarker = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.find((marker)=>segment.startsWith(marker));
// if an interception marker is part of the path segment, we need to jump ahead
// to the relevant portion for param parsing
if (interceptionMarker) {
segment = segment.slice(interceptionMarker.length);
}
if (segment.startsWith('[[...') && segment.endsWith(']]')) {
return {
// TODO-APP: Optional catchall does not currently work with parallel routes,
// so for now aren't handling a potential interception marker.
paramType: 'optional-catchall',
paramName: segment.slice(5, -2)
};
}
if (segment.startsWith('[...') && segment.endsWith(']')) {
return {
paramType: interceptionMarker ? `catchall-intercepted-${interceptionMarker}` : 'catchall',
paramName: segment.slice(4, -1)
};
}
if (segment.startsWith('[') && segment.endsWith(']')) {
return {
paramType: interceptionMarker ? `dynamic-intercepted-${interceptionMarker}` : 'dynamic',
paramName: segment.slice(1, -1)
};
}
return null;
}
function isCatchAll(type) {
return type === 'catchall' || type === 'catchall-intercepted-(..)(..)' || type === 'catchall-intercepted-(.)' || type === 'catchall-intercepted-(..)' || type === 'catchall-intercepted-(...)' || type === 'optional-catchall';
}
function getParamProperties(paramType) {
let repeat = false;
let optional = false;
switch(paramType){
case 'catchall':
case 'catchall-intercepted-(..)(..)':
case 'catchall-intercepted-(.)':
case 'catchall-intercepted-(..)':
case 'catchall-intercepted-(...)':
repeat = true;
break;
case 'optional-catchall':
repeat = true;
optional = true;
break;
case 'dynamic':
case 'dynamic-intercepted-(..)(..)':
case 'dynamic-intercepted-(.)':
case 'dynamic-intercepted-(..)':
case 'dynamic-intercepted-(...)':
break;
default:
paramType;
}
return {
repeat,
optional
};
}
//# sourceMappingURL=get-segment-param.js.map

View File

@@ -0,0 +1,17 @@
// This regex contains the bots that we need to do a blocking render for and can't safely stream the response
// due to how they parse the DOM. For example, they might explicitly check for metadata in the `head` tag, so we can't stream metadata tags after the `head` was sent.
// Note: The pattern [\w-]+-Google captures all Google crawlers with "-Google" suffix (e.g., Mediapartners-Google, AdsBot-Google, Storebot-Google)
// as well as crawlers starting with "Google-" (e.g., Google-PageRenderer, Google-InspectionTool)
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "HTML_LIMITED_BOT_UA_RE", {
enumerable: true,
get: function() {
return HTML_LIMITED_BOT_UA_RE;
}
});
const HTML_LIMITED_BOT_UA_RE = /[\w-]+-Google|Google-[\w-]+|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti|googleweblight/i;
//# sourceMappingURL=html-bots.js.map

View File

@@ -0,0 +1,30 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
getSortedRouteObjects: null,
getSortedRoutes: null,
isDynamicRoute: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
getSortedRouteObjects: function() {
return _sortedroutes.getSortedRouteObjects;
},
getSortedRoutes: function() {
return _sortedroutes.getSortedRoutes;
},
isDynamicRoute: function() {
return _isdynamic.isDynamicRoute;
}
});
const _sortedroutes = require("./sorted-routes");
const _isdynamic = require("./is-dynamic");
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,33 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "interceptionPrefixFromParamType", {
enumerable: true,
get: function() {
return interceptionPrefixFromParamType;
}
});
function interceptionPrefixFromParamType(paramType) {
switch(paramType){
case 'catchall-intercepted-(..)(..)':
case 'dynamic-intercepted-(..)(..)':
return '(..)(..)';
case 'catchall-intercepted-(.)':
case 'dynamic-intercepted-(.)':
return '(.)';
case 'catchall-intercepted-(..)':
case 'dynamic-intercepted-(..)':
return '(..)';
case 'catchall-intercepted-(...)':
case 'dynamic-intercepted-(...)':
return '(...)';
case 'catchall':
case 'dynamic':
case 'optional-catchall':
default:
return null;
}
}
//# sourceMappingURL=interception-prefix-from-param-type.js.map

View File

@@ -0,0 +1,108 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
INTERCEPTION_ROUTE_MARKERS: null,
extractInterceptionRouteInformation: null,
isInterceptionRouteAppPath: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
INTERCEPTION_ROUTE_MARKERS: function() {
return INTERCEPTION_ROUTE_MARKERS;
},
extractInterceptionRouteInformation: function() {
return extractInterceptionRouteInformation;
},
isInterceptionRouteAppPath: function() {
return isInterceptionRouteAppPath;
}
});
const _apppaths = require("./app-paths");
const INTERCEPTION_ROUTE_MARKERS = [
'(..)(..)',
'(.)',
'(..)',
'(...)'
];
function isInterceptionRouteAppPath(path) {
// TODO-APP: add more serious validation
return path.split('/').find((segment)=>INTERCEPTION_ROUTE_MARKERS.find((m)=>segment.startsWith(m))) !== undefined;
}
function extractInterceptionRouteInformation(path) {
let interceptingRoute;
let marker;
let interceptedRoute;
for (const segment of path.split('/')){
marker = INTERCEPTION_ROUTE_MARKERS.find((m)=>segment.startsWith(m));
if (marker) {
;
[interceptingRoute, interceptedRoute] = path.split(marker, 2);
break;
}
}
if (!interceptingRoute || !marker || !interceptedRoute) {
throw Object.defineProperty(new Error(`Invalid interception route: ${path}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`), "__NEXT_ERROR_CODE", {
value: "E269",
enumerable: false,
configurable: true
});
}
interceptingRoute = (0, _apppaths.normalizeAppPath)(interceptingRoute) // normalize the path, e.g. /(blog)/feed -> /feed
;
switch(marker){
case '(.)':
// (.) indicates that we should match with sibling routes, so we just need to append the intercepted route to the intercepting route
if (interceptingRoute === '/') {
interceptedRoute = `/${interceptedRoute}`;
} else {
interceptedRoute = interceptingRoute + '/' + interceptedRoute;
}
break;
case '(..)':
// (..) indicates that we should match at one level up, so we need to remove the last segment of the intercepting route
if (interceptingRoute === '/') {
throw Object.defineProperty(new Error(`Invalid interception route: ${path}. Cannot use (..) marker at the root level, use (.) instead.`), "__NEXT_ERROR_CODE", {
value: "E207",
enumerable: false,
configurable: true
});
}
interceptedRoute = interceptingRoute.split('/').slice(0, -1).concat(interceptedRoute).join('/');
break;
case '(...)':
// (...) will match the route segment in the root directory, so we need to use the root directory to prepend the intercepted route
interceptedRoute = '/' + interceptedRoute;
break;
case '(..)(..)':
// (..)(..) indicates that we should match at two levels up, so we need to remove the last two segments of the intercepting route
const splitInterceptingRoute = interceptingRoute.split('/');
if (splitInterceptingRoute.length <= 2) {
throw Object.defineProperty(new Error(`Invalid interception route: ${path}. Cannot use (..)(..) marker at the root level or one level up.`), "__NEXT_ERROR_CODE", {
value: "E486",
enumerable: false,
configurable: true
});
}
interceptedRoute = splitInterceptingRoute.slice(0, -2).concat(interceptedRoute).join('/');
break;
default:
throw Object.defineProperty(new Error('Invariant: unexpected marker'), "__NEXT_ERROR_CODE", {
value: "E112",
enumerable: false,
configurable: true
});
}
return {
interceptingRoute,
interceptedRoute
};
}
//# sourceMappingURL=interception-routes.js.map

View File

@@ -0,0 +1,57 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
HTML_LIMITED_BOT_UA_RE: null,
HTML_LIMITED_BOT_UA_RE_STRING: null,
getBotType: null,
isBot: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
HTML_LIMITED_BOT_UA_RE: function() {
return _htmlbots.HTML_LIMITED_BOT_UA_RE;
},
HTML_LIMITED_BOT_UA_RE_STRING: function() {
return HTML_LIMITED_BOT_UA_RE_STRING;
},
getBotType: function() {
return getBotType;
},
isBot: function() {
return isBot;
}
});
const _htmlbots = require("./html-bots");
// Bot crawler that will spin up a headless browser and execute JS.
// Only the main Googlebot search crawler executes JavaScript, not other Google crawlers.
// x-ref: https://developers.google.com/search/docs/crawling-indexing/google-common-crawlers
// This regex specifically matches "Googlebot" but NOT "Mediapartners-Google", "AdsBot-Google", etc.
const HEADLESS_BROWSER_BOT_UA_RE = /Googlebot(?!-)|Googlebot$/i;
const HTML_LIMITED_BOT_UA_RE_STRING = _htmlbots.HTML_LIMITED_BOT_UA_RE.source;
function isDomBotUA(userAgent) {
return HEADLESS_BROWSER_BOT_UA_RE.test(userAgent);
}
function isHtmlLimitedBotUA(userAgent) {
return _htmlbots.HTML_LIMITED_BOT_UA_RE.test(userAgent);
}
function isBot(userAgent) {
return isDomBotUA(userAgent) || isHtmlLimitedBotUA(userAgent);
}
function getBotType(userAgent) {
if (isDomBotUA(userAgent)) {
return 'dom';
}
if (isHtmlLimitedBotUA(userAgent)) {
return 'html';
}
return undefined;
}
//# sourceMappingURL=is-bot.js.map

View File

@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "isDynamicRoute", {
enumerable: true,
get: function() {
return isDynamicRoute;
}
});
const _interceptionroutes = require("./interception-routes");
// Identify /.*[param].*/ in route string
const TEST_ROUTE = /\/[^/]*\[[^/]+\][^/]*(?=\/|$)/;
// Identify /[param]/ in route string
const TEST_STRICT_ROUTE = /\/\[[^/]+\](?=\/|$)/;
function isDynamicRoute(route, strict = true) {
if ((0, _interceptionroutes.isInterceptionRouteAppPath)(route)) {
route = (0, _interceptionroutes.extractInterceptionRouteInformation)(route).interceptedRoute;
}
if (strict) {
return TEST_STRICT_ROUTE.test(route);
}
return TEST_ROUTE.test(route);
}
//# sourceMappingURL=is-dynamic.js.map

View File

@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "getMiddlewareRouteMatcher", {
enumerable: true,
get: function() {
return getMiddlewareRouteMatcher;
}
});
const _preparedestination = require("./prepare-destination");
function getMiddlewareRouteMatcher(matchers) {
return (pathname, req, query)=>{
for (const matcher of matchers){
const routeMatch = new RegExp(matcher.regexp).exec(pathname);
if (!routeMatch) {
continue;
}
if (matcher.has || matcher.missing) {
const hasParams = (0, _preparedestination.matchHas)(req, query, matcher.has, matcher.missing);
if (!hasParams) {
continue;
}
}
return true;
}
return false;
};
}
//# sourceMappingURL=middleware-route-matcher.js.map

View File

@@ -0,0 +1,30 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "parseLoaderTree", {
enumerable: true,
get: function() {
return parseLoaderTree;
}
});
const _segment = require("../../segment");
function parseLoaderTree(tree) {
const [segment, parallelRoutes, modules, staticSiblings] = tree;
const { layout, template } = modules;
let { page } = modules;
// a __DEFAULT__ segment means that this route didn't match any of the
// segments in the route, so we should use the default page
page = segment === _segment.DEFAULT_SEGMENT_KEY ? modules.defaultPage : page;
const conventionPath = layout?.[1] || template?.[1] || page?.[1];
return {
page,
segment,
modules,
/* it can be either layout / template / page */ conventionPath,
parallelRoutes,
staticSiblings
};
}
//# sourceMappingURL=parse-loader-tree.js.map

View File

@@ -0,0 +1,33 @@
/**
* Given a path this function will find the pathname, query and hash and return
* them. This is useful to parse full paths on the client side.
* @param path A path to parse e.g. /foo/bar?id=1#hash
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "parsePath", {
enumerable: true,
get: function() {
return parsePath;
}
});
function parsePath(path) {
const hashIndex = path.indexOf('#');
const queryIndex = path.indexOf('?');
const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex);
if (hasQuery || hashIndex > -1) {
return {
pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),
query: hasQuery ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined) : '',
hash: hashIndex > -1 ? path.slice(hashIndex) : ''
};
}
return {
pathname: path,
query: '',
hash: ''
};
}
//# sourceMappingURL=parse-path.js.map

View File

@@ -0,0 +1,43 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "parseRelativeUrl", {
enumerable: true,
get: function() {
return parseRelativeUrl;
}
});
const _utils = require("../../utils");
const _querystring = require("./querystring");
function parseRelativeUrl(url, base, parseQuery = true) {
const globalBase = new URL(typeof window === 'undefined' ? 'http://n' : (0, _utils.getLocationOrigin)());
const resolvedBase = base ? new URL(base, globalBase) : url.startsWith('.') ? new URL(typeof window === 'undefined' ? 'http://n' : window.location.href) : globalBase;
const { pathname, searchParams, search, hash, href, origin } = url.startsWith('/') ? // See https://nodejs.org/api/http.html#messageurl
// Not using `origin` to support other protocols
new URL(`${resolvedBase.protocol}//${resolvedBase.host}${url}`) : new URL(url, resolvedBase);
if (origin !== globalBase.origin) {
throw Object.defineProperty(new Error(`invariant: invalid relative URL, router received ${url}`), "__NEXT_ERROR_CODE", {
value: "E159",
enumerable: false,
configurable: true
});
}
return {
auth: null,
host: null,
hostname: null,
pathname,
port: null,
protocol: null,
query: parseQuery ? (0, _querystring.searchParamsToUrlQuery)(searchParams) : undefined,
search,
hash,
href: href.slice(origin.length),
// We don't know for relative URLs at this point since we set a custom, internal
// base that isn't surfaced to users.
slashes: null
};
}
//# sourceMappingURL=parse-relative-url.js.map

View File

@@ -0,0 +1,38 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "parseUrl", {
enumerable: true,
get: function() {
return parseUrl;
}
});
const _querystring = require("./querystring");
const _parserelativeurl = require("./parse-relative-url");
function parseUrl(url) {
if (url.startsWith('/')) {
return (0, _parserelativeurl.parseRelativeUrl)(url);
}
const parsedURL = new URL(url);
const username = parsedURL.username;
const password = parsedURL.password;
const auth = username ? password ? `${username}:${password}` : username : null;
const pathname = parsedURL.pathname;
const search = parsedURL.search;
return {
auth,
hash: parsedURL.hash,
hostname: parsedURL.hostname,
href: parsedURL.href,
pathname,
port: parsedURL.port,
protocol: parsedURL.protocol,
query: (0, _querystring.searchParamsToUrlQuery)(parsedURL.searchParams),
search,
origin: parsedURL.origin,
slashes: parsedURL.href.slice(parsedURL.protocol.length, parsedURL.protocol.length + 2) === '//'
};
}
//# sourceMappingURL=parse-url.js.map

View File

@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "pathHasPrefix", {
enumerable: true,
get: function() {
return pathHasPrefix;
}
});
const _parsepath = require("./parse-path");
function pathHasPrefix(path, prefix) {
if (typeof path !== 'string') {
return false;
}
const { pathname } = (0, _parsepath.parsePath)(path);
return pathname === prefix || pathname.startsWith(prefix + '/');
}
//# sourceMappingURL=path-has-prefix.js.map

View File

@@ -0,0 +1,49 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "getPathMatch", {
enumerable: true,
get: function() {
return getPathMatch;
}
});
const _pathtoregexp = require("next/dist/compiled/path-to-regexp");
function getPathMatch(path, options) {
const keys = [];
const regexp = (0, _pathtoregexp.pathToRegexp)(path, keys, {
delimiter: '/',
sensitive: typeof options?.sensitive === 'boolean' ? options.sensitive : false,
strict: options?.strict
});
const matcher = (0, _pathtoregexp.regexpToFunction)(options?.regexModifier ? new RegExp(options.regexModifier(regexp.source), regexp.flags) : regexp, keys);
/**
* A matcher function that will check if a given pathname matches the path
* given in the builder function. When the path does not match it will return
* `false` but if it does it will return an object with the matched params
* merged with the params provided in the second argument.
*/ return (pathname, params)=>{
// If no pathname is provided it's not a match.
if (typeof pathname !== 'string') return false;
const match = matcher(pathname);
// If the path did not match `false` will be returned.
if (!match) return false;
/**
* If unnamed params are not allowed they must be removed from
* the matched parameters. path-to-regexp uses "string" for named and
* "number" for unnamed parameters.
*/ if (options?.removeUnnamedParams) {
for (const key of keys){
if (typeof key.name === 'number') {
delete match.params[key.name];
}
}
}
return {
...params,
...match.params
};
};
}
//# sourceMappingURL=path-match.js.map

View File

@@ -0,0 +1,292 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
compileNonPath: null,
matchHas: null,
parseDestination: null,
prepareDestination: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
compileNonPath: function() {
return compileNonPath;
},
matchHas: function() {
return matchHas;
},
parseDestination: function() {
return parseDestination;
},
prepareDestination: function() {
return prepareDestination;
}
});
const _escaperegexp = require("../../escape-regexp");
const _parseurl = require("./parse-url");
const _interceptionroutes = require("./interception-routes");
const _getcookieparser = require("../../../../server/api-utils/get-cookie-parser");
const _routematchutils = require("./route-match-utils");
/**
* Ensure only a-zA-Z are used for param names for proper interpolating
* with path-to-regexp
*/ function getSafeParamName(paramName) {
let newParamName = '';
for(let i = 0; i < paramName.length; i++){
const charCode = paramName.charCodeAt(i);
if (charCode > 64 && charCode < 91 || // A-Z
charCode > 96 && charCode < 123 // a-z
) {
newParamName += paramName[i];
}
}
return newParamName;
}
function escapeSegment(str, segmentName) {
return str.replace(new RegExp(`:${(0, _escaperegexp.escapeStringRegexp)(segmentName)}`, 'g'), `__ESC_COLON_${segmentName}`);
}
function unescapeSegments(str) {
return str.replace(/__ESC_COLON_/gi, ':');
}
function matchHas(req, query, has = [], missing = []) {
const params = {};
const hasMatch = (hasItem)=>{
let value;
let key = hasItem.key;
switch(hasItem.type){
case 'header':
{
key = key.toLowerCase();
value = req.headers[key];
break;
}
case 'cookie':
{
if ('cookies' in req) {
value = req.cookies[hasItem.key];
} else {
const cookies = (0, _getcookieparser.getCookieParser)(req.headers)();
value = cookies[hasItem.key];
}
break;
}
case 'query':
{
value = query[key];
break;
}
case 'host':
{
const { host } = req?.headers || {};
// remove port from host if present
const hostname = host?.split(':', 1)[0].toLowerCase();
value = hostname;
break;
}
default:
{
break;
}
}
if (!hasItem.value && value) {
params[getSafeParamName(key)] = value;
return true;
} else if (value) {
const matcher = new RegExp(`^${hasItem.value}$`);
const matches = Array.isArray(value) ? value.slice(-1)[0].match(matcher) : value.match(matcher);
if (matches) {
if (Array.isArray(matches)) {
if (matches.groups) {
Object.keys(matches.groups).forEach((groupKey)=>{
params[groupKey] = matches.groups[groupKey];
});
} else if (hasItem.type === 'host' && matches[0]) {
params.host = matches[0];
}
}
return true;
}
}
return false;
};
const allMatch = has.every((item)=>hasMatch(item)) && !missing.some((item)=>hasMatch(item));
if (allMatch) {
return params;
}
return false;
}
function compileNonPath(value, params) {
if (!value.includes(':')) {
return value;
}
for (const key of Object.keys(params)){
if (value.includes(`:${key}`)) {
value = value.replace(new RegExp(`:${key}\\*`, 'g'), `:${key}--ESCAPED_PARAM_ASTERISKS`).replace(new RegExp(`:${key}\\?`, 'g'), `:${key}--ESCAPED_PARAM_QUESTION`).replace(new RegExp(`:${key}\\+`, 'g'), `:${key}--ESCAPED_PARAM_PLUS`).replace(new RegExp(`:${key}(?!\\w)`, 'g'), `--ESCAPED_PARAM_COLON${key}`);
}
}
value = value.replace(/(:|\*|\?|\+|\(|\)|\{|\})/g, '\\$1').replace(/--ESCAPED_PARAM_PLUS/g, '+').replace(/--ESCAPED_PARAM_COLON/g, ':').replace(/--ESCAPED_PARAM_QUESTION/g, '?').replace(/--ESCAPED_PARAM_ASTERISKS/g, '*');
// the value needs to start with a forward-slash to be compiled
// correctly
return (0, _routematchutils.safeCompile)(`/${value}`, {
validate: false
})(params).slice(1);
}
function parseDestination(args) {
let escaped = args.destination;
for (const param of Object.keys({
...args.params,
...args.query
})){
if (!param) continue;
escaped = escapeSegment(escaped, param);
}
const parsed = (0, _parseurl.parseUrl)(escaped);
let pathname = parsed.pathname;
if (pathname) {
pathname = unescapeSegments(pathname);
}
let href = parsed.href;
if (href) {
href = unescapeSegments(href);
}
let hostname = parsed.hostname;
if (hostname) {
hostname = unescapeSegments(hostname);
}
let hash = parsed.hash;
if (hash) {
hash = unescapeSegments(hash);
}
let search = parsed.search;
if (search) {
search = unescapeSegments(search);
}
let origin = parsed.origin;
if (origin) {
origin = unescapeSegments(origin);
}
return {
...parsed,
pathname,
hostname,
href,
hash,
search,
origin
};
}
function prepareDestination(args) {
const parsedDestination = parseDestination(args);
const { hostname: destHostname, query: destQuery, search: destSearch } = parsedDestination;
// The following code assumes that the pathname here includes the hash if it's
// present.
let destPath = parsedDestination.pathname;
if (parsedDestination.hash) {
destPath = `${destPath}${parsedDestination.hash}`;
}
const destParams = [];
const destPathParamKeys = [];
(0, _routematchutils.safePathToRegexp)(destPath, destPathParamKeys);
for (const key of destPathParamKeys){
destParams.push(key.name);
}
if (destHostname) {
const destHostnameParamKeys = [];
(0, _routematchutils.safePathToRegexp)(destHostname, destHostnameParamKeys);
for (const key of destHostnameParamKeys){
destParams.push(key.name);
}
}
const destPathCompiler = (0, _routematchutils.safeCompile)(destPath, // we don't validate while compiling the destination since we should
// have already validated before we got to this point and validating
// breaks compiling destinations with named pattern params from the source
// e.g. /something:hello(.*) -> /another/:hello is broken with validation
// since compile validation is meant for reversing and not for inserting
// params from a separate path-regex into another
{
validate: false
});
let destHostnameCompiler;
if (destHostname) {
destHostnameCompiler = (0, _routematchutils.safeCompile)(destHostname, {
validate: false
});
}
// update any params in query values
for (const [key, strOrArray] of Object.entries(destQuery)){
// the value needs to start with a forward-slash to be compiled
// correctly
if (Array.isArray(strOrArray)) {
destQuery[key] = strOrArray.map((value)=>compileNonPath(unescapeSegments(value), args.params));
} else if (typeof strOrArray === 'string') {
destQuery[key] = compileNonPath(unescapeSegments(strOrArray), args.params);
}
}
// add path params to query if it's not a redirect and not
// already defined in destination query or path
let paramKeys = Object.keys(args.params).filter((name)=>name !== 'nextInternalLocale');
if (args.appendParamsToQuery && !paramKeys.some((key)=>destParams.includes(key))) {
for (const key of paramKeys){
if (!(key in destQuery)) {
destQuery[key] = args.params[key];
}
}
}
let newUrl;
// The compiler also that the interception route marker is an unnamed param, hence '0',
// so we need to add it to the params object.
if ((0, _interceptionroutes.isInterceptionRouteAppPath)(destPath)) {
for (const segment of destPath.split('/')){
const marker = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.find((m)=>segment.startsWith(m));
if (marker) {
if (marker === '(..)(..)') {
args.params['0'] = '(..)';
args.params['1'] = '(..)';
} else {
args.params['0'] = marker;
}
break;
}
}
}
try {
newUrl = destPathCompiler(args.params);
const [pathname, hash] = newUrl.split('#', 2);
if (destHostnameCompiler) {
parsedDestination.hostname = destHostnameCompiler(args.params);
}
parsedDestination.pathname = pathname;
parsedDestination.hash = `${hash ? '#' : ''}${hash || ''}`;
parsedDestination.search = destSearch ? compileNonPath(destSearch, args.params) : '';
} catch (err) {
if (err.message.match(/Expected .*? to not repeat, but got an array/)) {
throw Object.defineProperty(new Error(`To use a multi-match in the destination you must add \`*\` at the end of the param name to signify it should repeat. https://nextjs.org/docs/messages/invalid-multi-match`), "__NEXT_ERROR_CODE", {
value: "E329",
enumerable: false,
configurable: true
});
}
throw err;
}
// Query merge order lowest priority to highest
// 1. initial URL query values
// 2. path segment values
// 3. destination specified query values
parsedDestination.query = {
...args.query,
...parsedDestination.query
};
return {
newUrl,
destQuery,
parsedDestination
};
}
//# sourceMappingURL=prepare-destination.js.map

View File

@@ -0,0 +1,79 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
assign: null,
searchParamsToUrlQuery: null,
urlQueryToSearchParams: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
assign: function() {
return assign;
},
searchParamsToUrlQuery: function() {
return searchParamsToUrlQuery;
},
urlQueryToSearchParams: function() {
return urlQueryToSearchParams;
}
});
function searchParamsToUrlQuery(searchParams) {
const query = {};
for (const [key, value] of searchParams.entries()){
const existing = query[key];
if (typeof existing === 'undefined') {
query[key] = value;
} else if (Array.isArray(existing)) {
existing.push(value);
} else {
query[key] = [
existing,
value
];
}
}
return query;
}
function stringifyUrlQueryParam(param) {
if (typeof param === 'string') {
return param;
}
if (typeof param === 'number' && !isNaN(param) || typeof param === 'boolean') {
return String(param);
} else {
return '';
}
}
function urlQueryToSearchParams(query) {
const searchParams = new URLSearchParams();
for (const [key, value] of Object.entries(query)){
if (Array.isArray(value)) {
for (const item of value){
searchParams.append(key, stringifyUrlQueryParam(item));
}
} else {
searchParams.set(key, stringifyUrlQueryParam(value));
}
}
return searchParams;
}
function assign(target, ...searchParamsList) {
for (const searchParams of searchParamsList){
for (const key of searchParams.keys()){
target.delete(key);
}
for (const [key, value] of searchParams.entries()){
target.append(key, value);
}
}
return target;
}
//# sourceMappingURL=querystring.js.map

View File

@@ -0,0 +1,40 @@
/**
* The result of parsing a URL relative to a base URL.
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
getRelativeURL: null,
parseRelativeURL: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
getRelativeURL: function() {
return getRelativeURL;
},
parseRelativeURL: function() {
return parseRelativeURL;
}
});
function parseRelativeURL(url, base) {
const baseURL = typeof base === 'string' ? new URL(base) : base;
const relative = new URL(url, base);
// The URL is relative if the origin is the same as the base URL.
const isRelative = relative.origin === baseURL.origin;
return {
url: isRelative ? relative.toString().slice(baseURL.origin.length) : relative.toString(),
isRelative
};
}
function getRelativeURL(url, base) {
const relative = parseRelativeURL(url, base);
return relative.url;
}
//# sourceMappingURL=relativize-url.js.map

View File

@@ -0,0 +1,39 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "removePathPrefix", {
enumerable: true,
get: function() {
return removePathPrefix;
}
});
const _pathhasprefix = require("./path-has-prefix");
function removePathPrefix(path, prefix) {
// If the path doesn't start with the prefix we can return it as is. This
// protects us from situations where the prefix is a substring of the path
// prefix such as:
//
// For prefix: /blog
//
// /blog -> true
// /blog/ -> true
// /blog/1 -> true
// /blogging -> false
// /blogging/ -> false
// /blogging/1 -> false
if (!(0, _pathhasprefix.pathHasPrefix)(path, prefix)) {
return path;
}
// Remove the prefix from the path via slicing.
const withoutPrefix = path.slice(prefix.length);
// If the path without the prefix starts with a `/` we can return it as is.
if (withoutPrefix.startsWith('/')) {
return withoutPrefix;
}
// If the path without the prefix doesn't start with a `/` we need to add it
// back to the path to make sure it's a valid path.
return `/${withoutPrefix}`;
}
//# sourceMappingURL=remove-path-prefix.js.map

View File

@@ -0,0 +1,21 @@
/**
* Removes the trailing slash for a given route or page path. Preserves the
* root page. Examples:
* - `/foo/bar/` -> `/foo/bar`
* - `/foo/bar` -> `/foo/bar`
* - `/` -> `/`
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "removeTrailingSlash", {
enumerable: true,
get: function() {
return removeTrailingSlash;
}
});
function removeTrailingSlash(route) {
return route.replace(/\/$/, '') || '/';
}
//# sourceMappingURL=remove-trailing-slash.js.map

View File

@@ -0,0 +1,116 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "resolveParamValue", {
enumerable: true,
get: function() {
return resolveParamValue;
}
});
const _invarianterror = require("../../invariant-error");
const _interceptionprefixfromparamtype = require("./interception-prefix-from-param-type");
/**
* Extracts the param value from a path segment, handling interception markers
* based on the expected param type.
*
* @param pathSegment - The path segment to extract the value from
* @param params - The current params object for resolving dynamic param references
* @param paramType - The expected param type which may include interception marker info
* @returns The extracted param value
*/ function getParamValueFromSegment(pathSegment, params, paramType) {
// If the segment is dynamic, resolve it from the params object
if (pathSegment.type === 'dynamic') {
return params[pathSegment.param.paramName];
}
// If the paramType indicates this is an intercepted param, strip the marker
// that matches the interception marker in the param type
const interceptionPrefix = (0, _interceptionprefixfromparamtype.interceptionPrefixFromParamType)(paramType);
if (interceptionPrefix === pathSegment.interceptionMarker) {
return pathSegment.name.replace(pathSegment.interceptionMarker, '');
}
// For static segments, use the name
return pathSegment.name;
}
function resolveParamValue(paramName, paramType, depth, route, params) {
switch(paramType){
case 'catchall':
case 'optional-catchall':
case 'catchall-intercepted-(..)(..)':
case 'catchall-intercepted-(.)':
case 'catchall-intercepted-(..)':
case 'catchall-intercepted-(...)':
// For catchall routes, derive from pathname using depth to determine
// which segments to use
const processedSegments = [];
// Process segments to handle any embedded dynamic params
for(let index = depth; index < route.segments.length; index++){
const pathSegment = route.segments[index];
if (pathSegment.type === 'static') {
let value = pathSegment.name;
// For intercepted catch-all params, strip the marker from the first segment
const interceptionPrefix = (0, _interceptionprefixfromparamtype.interceptionPrefixFromParamType)(paramType);
if (interceptionPrefix && index === depth && interceptionPrefix === pathSegment.interceptionMarker) {
// Strip the interception marker from the value
value = value.replace(pathSegment.interceptionMarker, '');
}
processedSegments.push(value);
} else {
// If the segment is a param placeholder, check if we have its value
if (!params.hasOwnProperty(pathSegment.param.paramName)) {
// If the segment is an optional catchall, we can break out of the
// loop because it's optional!
if (pathSegment.param.paramType === 'optional-catchall') {
break;
}
// Unknown param placeholder in pathname - can't derive full value
return undefined;
}
// If the segment matches a param, use the param value
// We don't encode values here as that's handled during retrieval.
const paramValue = params[pathSegment.param.paramName];
if (Array.isArray(paramValue)) {
processedSegments.push(...paramValue);
} else {
processedSegments.push(paramValue);
}
}
}
if (processedSegments.length > 0) {
return processedSegments;
} else if (paramType === 'optional-catchall') {
return undefined;
} else {
// We shouldn't be able to match a catchall segment without any path
// segments if it's not an optional catchall
throw Object.defineProperty(new _invarianterror.InvariantError(`Unexpected empty path segments match for a route "${route.pathname}" with param "${paramName}" of type "${paramType}"`), "__NEXT_ERROR_CODE", {
value: "E931",
enumerable: false,
configurable: true
});
}
case 'dynamic':
case 'dynamic-intercepted-(..)(..)':
case 'dynamic-intercepted-(.)':
case 'dynamic-intercepted-(..)':
case 'dynamic-intercepted-(...)':
// For regular dynamic parameters, take the segment at this depth
if (depth < route.segments.length) {
const pathSegment = route.segments[depth];
// Check if the segment at this depth is a placeholder for an unknown param
if (pathSegment.type === 'dynamic' && !params.hasOwnProperty(pathSegment.param.paramName)) {
// The segment is a placeholder like [category] and we don't have the value
return undefined;
}
// If the segment matches a param, use the param value from params object
// Otherwise it's a static segment, just use it directly
// We don't encode values here as that's handled during retrieval
return getParamValueFromSegment(pathSegment, params, paramType);
}
return undefined;
default:
paramType;
}
}
//# sourceMappingURL=resolve-param-value.js.map

View File

@@ -0,0 +1,113 @@
/**
* Client-safe utilities for route matching that don't import server-side
* utilities to avoid bundling issues with Turbopack
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
safeCompile: null,
safePathToRegexp: null,
safeRegexpToFunction: null,
safeRouteMatcher: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
safeCompile: function() {
return safeCompile;
},
safePathToRegexp: function() {
return safePathToRegexp;
},
safeRegexpToFunction: function() {
return safeRegexpToFunction;
},
safeRouteMatcher: function() {
return safeRouteMatcher;
}
});
const _pathtoregexp = require("next/dist/compiled/path-to-regexp");
const _routepatternnormalizer = require("../../../../lib/route-pattern-normalizer");
function safePathToRegexp(route, keys, options) {
if (typeof route !== 'string') {
return (0, _pathtoregexp.pathToRegexp)(route, keys, options);
}
// Check if normalization is needed and cache the result
const needsNormalization = (0, _routepatternnormalizer.hasAdjacentParameterIssues)(route);
const routeToUse = needsNormalization ? (0, _routepatternnormalizer.normalizeAdjacentParameters)(route) : route;
try {
return (0, _pathtoregexp.pathToRegexp)(routeToUse, keys, options);
} catch (error) {
// Only try normalization if we haven't already normalized
if (!needsNormalization) {
try {
const normalizedRoute = (0, _routepatternnormalizer.normalizeAdjacentParameters)(route);
return (0, _pathtoregexp.pathToRegexp)(normalizedRoute, keys, options);
} catch (retryError) {
// If that doesn't work, fall back to original error
throw error;
}
}
throw error;
}
}
function safeCompile(route, options) {
// Check if normalization is needed and cache the result
const needsNormalization = (0, _routepatternnormalizer.hasAdjacentParameterIssues)(route);
const routeToUse = needsNormalization ? (0, _routepatternnormalizer.normalizeAdjacentParameters)(route) : route;
try {
const compiler = (0, _pathtoregexp.compile)(routeToUse, options);
// If we normalized the route, wrap the compiler to strip separators from output
// The normalization inserts _NEXTSEP_ as a literal string in the pattern to satisfy
// path-to-regexp validation, but we don't want it in the final compiled URL
if (needsNormalization) {
return (params)=>{
return (0, _routepatternnormalizer.stripNormalizedSeparators)(compiler(params));
};
}
return compiler;
} catch (error) {
// Only try normalization if we haven't already normalized
if (!needsNormalization) {
try {
const normalizedRoute = (0, _routepatternnormalizer.normalizeAdjacentParameters)(route);
const compiler = (0, _pathtoregexp.compile)(normalizedRoute, options);
// Wrap the compiler to strip separators from output
return (params)=>{
return (0, _routepatternnormalizer.stripNormalizedSeparators)(compiler(params));
};
} catch (retryError) {
// If that doesn't work, fall back to original error
throw error;
}
}
throw error;
}
}
function safeRegexpToFunction(regexp, keys) {
const originalMatcher = (0, _pathtoregexp.regexpToFunction)(regexp, keys || []);
return (pathname)=>{
const result = originalMatcher(pathname);
if (!result) return false;
// Clean parameters before returning
return {
...result,
params: (0, _routepatternnormalizer.stripParameterSeparators)(result.params)
};
};
}
function safeRouteMatcher(matcherFn) {
return (pathname)=>{
const result = matcherFn(pathname);
if (!result) return false;
// Clean parameters before returning
return (0, _routepatternnormalizer.stripParameterSeparators)(result);
};
}
//# sourceMappingURL=route-match-utils.js.map

View File

@@ -0,0 +1,45 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "getRouteMatcher", {
enumerable: true,
get: function() {
return getRouteMatcher;
}
});
const _utils = require("../../utils");
const _routematchutils = require("./route-match-utils");
function getRouteMatcher({ re, groups }) {
const rawMatcher = (pathname)=>{
const routeMatch = re.exec(pathname);
if (!routeMatch) return false;
const decode = (param)=>{
try {
return decodeURIComponent(param);
} catch {
throw Object.defineProperty(new _utils.DecodeError('failed to decode param'), "__NEXT_ERROR_CODE", {
value: "E528",
enumerable: false,
configurable: true
});
}
};
const params = {};
for (const [key, group] of Object.entries(groups)){
const match = routeMatch[group.pos];
if (match !== undefined) {
if (group.repeat) {
params[key] = match.split('/').map((entry)=>decode(entry));
} else {
params[key] = decode(match);
}
}
}
return params;
};
// Wrap with safe matcher to handle parameter cleaning
return (0, _routematchutils.safeRouteMatcher)(rawMatcher);
}
//# sourceMappingURL=route-matcher.js.map

View File

@@ -0,0 +1,256 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
getNamedMiddlewareRegex: null,
getNamedRouteRegex: null,
getRouteRegex: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
getNamedMiddlewareRegex: function() {
return getNamedMiddlewareRegex;
},
getNamedRouteRegex: function() {
return getNamedRouteRegex;
},
getRouteRegex: function() {
return getRouteRegex;
}
});
const _constants = require("../../../../lib/constants");
const _interceptionroutes = require("./interception-routes");
const _escaperegexp = require("../../escape-regexp");
const _removetrailingslash = require("./remove-trailing-slash");
const _getdynamicparam = require("./get-dynamic-param");
function getParametrizedRoute(route, includeSuffix, includePrefix) {
const groups = {};
let groupIndex = 1;
const segments = [];
for (const segment of (0, _removetrailingslash.removeTrailingSlash)(route).slice(1).split('/')){
const markerMatch = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.find((m)=>segment.startsWith(m));
const paramMatches = segment.match(_getdynamicparam.PARAMETER_PATTERN) // Check for parameters
;
if (markerMatch && paramMatches && paramMatches[2]) {
const { key, optional, repeat } = (0, _getdynamicparam.parseMatchedParameter)(paramMatches[2]);
groups[key] = {
pos: groupIndex++,
repeat,
optional
};
segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(markerMatch)}([^/]+?)`);
} else if (paramMatches && paramMatches[2]) {
const { key, repeat, optional } = (0, _getdynamicparam.parseMatchedParameter)(paramMatches[2]);
groups[key] = {
pos: groupIndex++,
repeat,
optional
};
if (includePrefix && paramMatches[1]) {
segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(paramMatches[1])}`);
}
let s = repeat ? optional ? '(?:/(.+?))?' : '/(.+?)' : '/([^/]+?)';
// Remove the leading slash if includePrefix already added it.
if (includePrefix && paramMatches[1]) {
s = s.substring(1);
}
segments.push(s);
} else {
segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(segment)}`);
}
// If there's a suffix, add it to the segments if it's enabled.
if (includeSuffix && paramMatches && paramMatches[3]) {
segments.push((0, _escaperegexp.escapeStringRegexp)(paramMatches[3]));
}
}
return {
parameterizedRoute: segments.join(''),
groups
};
}
function getRouteRegex(normalizedRoute, { includeSuffix = false, includePrefix = false, excludeOptionalTrailingSlash = false } = {}) {
const { parameterizedRoute, groups } = getParametrizedRoute(normalizedRoute, includeSuffix, includePrefix);
let re = parameterizedRoute;
if (!excludeOptionalTrailingSlash) {
re += '(?:/)?';
}
return {
re: new RegExp(`^${re}$`),
groups: groups
};
}
/**
* Builds a function to generate a minimal routeKey using only a-z and minimal
* number of characters.
*/ function buildGetSafeRouteKey() {
let i = 0;
return ()=>{
let routeKey = '';
let j = ++i;
while(j > 0){
routeKey += String.fromCharCode(97 + (j - 1) % 26);
j = Math.floor((j - 1) / 26);
}
return routeKey;
};
}
function getSafeKeyFromSegment({ interceptionMarker, getSafeRouteKey, segment, routeKeys, keyPrefix, backreferenceDuplicateKeys }) {
const { key, optional, repeat } = (0, _getdynamicparam.parseMatchedParameter)(segment);
// replace any non-word characters since they can break
// the named regex
let cleanedKey = key.replace(/\W/g, '');
if (keyPrefix) {
cleanedKey = `${keyPrefix}${cleanedKey}`;
}
let invalidKey = false;
// check if the key is still invalid and fallback to using a known
// safe key
if (cleanedKey.length === 0 || cleanedKey.length > 30) {
invalidKey = true;
}
if (!isNaN(parseInt(cleanedKey.slice(0, 1)))) {
invalidKey = true;
}
if (invalidKey) {
cleanedKey = getSafeRouteKey();
}
const duplicateKey = cleanedKey in routeKeys;
if (keyPrefix) {
routeKeys[cleanedKey] = `${keyPrefix}${key}`;
} else {
routeKeys[cleanedKey] = key;
}
// if the segment has an interception marker, make sure that's part of the regex pattern
// this is to ensure that the route with the interception marker doesn't incorrectly match
// the non-intercepted route (ie /app/(.)[username] should not match /app/[username])
const interceptionPrefix = interceptionMarker ? (0, _escaperegexp.escapeStringRegexp)(interceptionMarker) : '';
let pattern;
if (duplicateKey && backreferenceDuplicateKeys) {
// Use a backreference to the key to ensure that the key is the same value
// in each of the placeholders.
pattern = `\\k<${cleanedKey}>`;
} else if (repeat) {
pattern = `(?<${cleanedKey}>.+?)`;
} else {
pattern = `(?<${cleanedKey}>[^/]+?)`;
}
return {
key,
pattern: optional ? `(?:/${interceptionPrefix}${pattern})?` : `/${interceptionPrefix}${pattern}`,
cleanedKey: cleanedKey,
optional,
repeat
};
}
function getNamedParametrizedRoute(route, prefixRouteKeys, includeSuffix, includePrefix, backreferenceDuplicateKeys, reference = {
names: {},
intercepted: {}
}) {
const getSafeRouteKey = buildGetSafeRouteKey();
const routeKeys = {};
const segments = [];
const inverseParts = [];
// Ensure we don't mutate the original reference object.
reference = structuredClone(reference);
for (const segment of (0, _removetrailingslash.removeTrailingSlash)(route).slice(1).split('/')){
const hasInterceptionMarker = _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.some((m)=>segment.startsWith(m));
const paramMatches = segment.match(_getdynamicparam.PARAMETER_PATTERN) // Check for parameters
;
const interceptionMarker = hasInterceptionMarker ? paramMatches?.[1] : undefined;
let keyPrefix;
if (interceptionMarker && paramMatches?.[2]) {
keyPrefix = prefixRouteKeys ? _constants.NEXT_INTERCEPTION_MARKER_PREFIX : undefined;
reference.intercepted[paramMatches[2]] = interceptionMarker;
} else if (paramMatches?.[2] && reference.intercepted[paramMatches[2]]) {
keyPrefix = prefixRouteKeys ? _constants.NEXT_INTERCEPTION_MARKER_PREFIX : undefined;
} else {
keyPrefix = prefixRouteKeys ? _constants.NEXT_QUERY_PARAM_PREFIX : undefined;
}
if (interceptionMarker && paramMatches && paramMatches[2]) {
// If there's an interception marker, add it to the segments.
const { key, pattern, cleanedKey, repeat, optional } = getSafeKeyFromSegment({
getSafeRouteKey,
interceptionMarker,
segment: paramMatches[2],
routeKeys,
keyPrefix,
backreferenceDuplicateKeys
});
segments.push(pattern);
inverseParts.push(`/${paramMatches[1]}:${reference.names[key] ?? cleanedKey}${repeat ? optional ? '*' : '+' : ''}`);
reference.names[key] ??= cleanedKey;
} else if (paramMatches && paramMatches[2]) {
// If there's a prefix, add it to the segments if it's enabled.
if (includePrefix && paramMatches[1]) {
segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(paramMatches[1])}`);
inverseParts.push(`/${paramMatches[1]}`);
}
const { key, pattern, cleanedKey, repeat, optional } = getSafeKeyFromSegment({
getSafeRouteKey,
segment: paramMatches[2],
routeKeys,
keyPrefix,
backreferenceDuplicateKeys
});
// Remove the leading slash if includePrefix already added it.
let s = pattern;
if (includePrefix && paramMatches[1]) {
s = s.substring(1);
}
segments.push(s);
inverseParts.push(`/:${reference.names[key] ?? cleanedKey}${repeat ? optional ? '*' : '+' : ''}`);
reference.names[key] ??= cleanedKey;
} else {
segments.push(`/${(0, _escaperegexp.escapeStringRegexp)(segment)}`);
inverseParts.push(`/${segment}`);
}
// If there's a suffix, add it to the segments if it's enabled.
if (includeSuffix && paramMatches && paramMatches[3]) {
segments.push((0, _escaperegexp.escapeStringRegexp)(paramMatches[3]));
inverseParts.push(paramMatches[3]);
}
}
return {
namedParameterizedRoute: segments.join(''),
routeKeys,
pathToRegexpPattern: inverseParts.join(''),
reference
};
}
function getNamedRouteRegex(normalizedRoute, options) {
const result = getNamedParametrizedRoute(normalizedRoute, options.prefixRouteKeys, options.includeSuffix ?? false, options.includePrefix ?? false, options.backreferenceDuplicateKeys ?? false, options.reference);
let namedRegex = result.namedParameterizedRoute;
if (!options.excludeOptionalTrailingSlash) {
namedRegex += '(?:/)?';
}
return {
...getRouteRegex(normalizedRoute, options),
namedRegex: `^${namedRegex}$`,
routeKeys: result.routeKeys,
pathToRegexpPattern: result.pathToRegexpPattern,
reference: result.reference
};
}
function getNamedMiddlewareRegex(normalizedRoute, options) {
const { parameterizedRoute } = getParametrizedRoute(normalizedRoute, false, false);
const { catchAll = true } = options;
if (parameterizedRoute === '/') {
let catchAllRegex = catchAll ? '.*' : '';
return {
namedRegex: `^/${catchAllRegex}$`
};
}
const { namedParameterizedRoute } = getNamedParametrizedRoute(normalizedRoute, false, false, false, false, undefined);
let catchAllGroupedRegex = catchAll ? '(?:(/.*)?)' : '';
return {
namedRegex: `^${namedParameterizedRoute}${catchAllGroupedRegex}$`
};
}
//# sourceMappingURL=route-regex.js.map

View File

@@ -0,0 +1,244 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
getSortedRouteObjects: null,
getSortedRoutes: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
getSortedRouteObjects: function() {
return getSortedRouteObjects;
},
getSortedRoutes: function() {
return getSortedRoutes;
}
});
class UrlNode {
insert(urlPath) {
this._insert(urlPath.split('/').filter(Boolean), [], false);
}
smoosh() {
return this._smoosh();
}
_smoosh(prefix = '/') {
const childrenPaths = [
...this.children.keys()
].sort();
if (this.slugName !== null) {
childrenPaths.splice(childrenPaths.indexOf('[]'), 1);
}
if (this.restSlugName !== null) {
childrenPaths.splice(childrenPaths.indexOf('[...]'), 1);
}
if (this.optionalRestSlugName !== null) {
childrenPaths.splice(childrenPaths.indexOf('[[...]]'), 1);
}
const routes = childrenPaths.map((c)=>this.children.get(c)._smoosh(`${prefix}${c}/`)).reduce((prev, curr)=>[
...prev,
...curr
], []);
if (this.slugName !== null) {
routes.push(...this.children.get('[]')._smoosh(`${prefix}[${this.slugName}]/`));
}
if (!this.placeholder) {
const r = prefix === '/' ? '/' : prefix.slice(0, -1);
if (this.optionalRestSlugName != null) {
throw Object.defineProperty(new Error(`You cannot define a route with the same specificity as a optional catch-all route ("${r}" and "${r}[[...${this.optionalRestSlugName}]]").`), "__NEXT_ERROR_CODE", {
value: "E458",
enumerable: false,
configurable: true
});
}
routes.unshift(r);
}
if (this.restSlugName !== null) {
routes.push(...this.children.get('[...]')._smoosh(`${prefix}[...${this.restSlugName}]/`));
}
if (this.optionalRestSlugName !== null) {
routes.push(...this.children.get('[[...]]')._smoosh(`${prefix}[[...${this.optionalRestSlugName}]]/`));
}
return routes;
}
_insert(urlPaths, slugNames, isCatchAll) {
if (urlPaths.length === 0) {
this.placeholder = false;
return;
}
if (isCatchAll) {
throw Object.defineProperty(new Error(`Catch-all must be the last part of the URL.`), "__NEXT_ERROR_CODE", {
value: "E392",
enumerable: false,
configurable: true
});
}
// The next segment in the urlPaths list
let nextSegment = urlPaths[0];
// Check if the segment matches `[something]`
if (nextSegment.startsWith('[') && nextSegment.endsWith(']')) {
// Strip `[` and `]`, leaving only `something`
let segmentName = nextSegment.slice(1, -1);
let isOptional = false;
if (segmentName.startsWith('[') && segmentName.endsWith(']')) {
// Strip optional `[` and `]`, leaving only `something`
segmentName = segmentName.slice(1, -1);
isOptional = true;
}
if (segmentName.startsWith('…')) {
throw Object.defineProperty(new Error(`Detected a three-dot character ('…') at ('${segmentName}'). Did you mean ('...')?`), "__NEXT_ERROR_CODE", {
value: "E147",
enumerable: false,
configurable: true
});
}
if (segmentName.startsWith('...')) {
// Strip `...`, leaving only `something`
segmentName = segmentName.substring(3);
isCatchAll = true;
}
if (segmentName.startsWith('[') || segmentName.endsWith(']')) {
throw Object.defineProperty(new Error(`Segment names may not start or end with extra brackets ('${segmentName}').`), "__NEXT_ERROR_CODE", {
value: "E421",
enumerable: false,
configurable: true
});
}
if (segmentName.startsWith('.')) {
throw Object.defineProperty(new Error(`Segment names may not start with erroneous periods ('${segmentName}').`), "__NEXT_ERROR_CODE", {
value: "E288",
enumerable: false,
configurable: true
});
}
function handleSlug(previousSlug, nextSlug) {
if (previousSlug !== null) {
// If the specific segment already has a slug but the slug is not `something`
// This prevents collisions like:
// pages/[post]/index.js
// pages/[id]/index.js
// Because currently multiple dynamic params on the same segment level are not supported
if (previousSlug !== nextSlug) {
// TODO: This error seems to be confusing for users, needs an error link, the description can be based on above comment.
throw Object.defineProperty(new Error(`You cannot use different slug names for the same dynamic path ('${previousSlug}' !== '${nextSlug}').`), "__NEXT_ERROR_CODE", {
value: "E337",
enumerable: false,
configurable: true
});
}
}
slugNames.forEach((slug)=>{
if (slug === nextSlug) {
throw Object.defineProperty(new Error(`You cannot have the same slug name "${nextSlug}" repeat within a single dynamic path`), "__NEXT_ERROR_CODE", {
value: "E247",
enumerable: false,
configurable: true
});
}
if (slug.replace(/\W/g, '') === nextSegment.replace(/\W/g, '')) {
throw Object.defineProperty(new Error(`You cannot have the slug names "${slug}" and "${nextSlug}" differ only by non-word symbols within a single dynamic path`), "__NEXT_ERROR_CODE", {
value: "E499",
enumerable: false,
configurable: true
});
}
});
slugNames.push(nextSlug);
}
if (isCatchAll) {
if (isOptional) {
if (this.restSlugName != null) {
throw Object.defineProperty(new Error(`You cannot use both an required and optional catch-all route at the same level ("[...${this.restSlugName}]" and "${urlPaths[0]}" ).`), "__NEXT_ERROR_CODE", {
value: "E299",
enumerable: false,
configurable: true
});
}
handleSlug(this.optionalRestSlugName, segmentName);
// slugName is kept as it can only be one particular slugName
this.optionalRestSlugName = segmentName;
// nextSegment is overwritten to [[...]] so that it can later be sorted specifically
nextSegment = '[[...]]';
} else {
if (this.optionalRestSlugName != null) {
throw Object.defineProperty(new Error(`You cannot use both an optional and required catch-all route at the same level ("[[...${this.optionalRestSlugName}]]" and "${urlPaths[0]}").`), "__NEXT_ERROR_CODE", {
value: "E300",
enumerable: false,
configurable: true
});
}
handleSlug(this.restSlugName, segmentName);
// slugName is kept as it can only be one particular slugName
this.restSlugName = segmentName;
// nextSegment is overwritten to [...] so that it can later be sorted specifically
nextSegment = '[...]';
}
} else {
if (isOptional) {
throw Object.defineProperty(new Error(`Optional route parameters are not yet supported ("${urlPaths[0]}").`), "__NEXT_ERROR_CODE", {
value: "E435",
enumerable: false,
configurable: true
});
}
handleSlug(this.slugName, segmentName);
// slugName is kept as it can only be one particular slugName
this.slugName = segmentName;
// nextSegment is overwritten to [] so that it can later be sorted specifically
nextSegment = '[]';
}
}
// If this UrlNode doesn't have the nextSegment yet we create a new child UrlNode
if (!this.children.has(nextSegment)) {
this.children.set(nextSegment, new UrlNode());
}
this.children.get(nextSegment)._insert(urlPaths.slice(1), slugNames, isCatchAll);
}
constructor(){
this.placeholder = true;
this.children = new Map();
this.slugName = null;
this.restSlugName = null;
this.optionalRestSlugName = null;
}
}
function getSortedRoutes(normalizedPages) {
// First the UrlNode is created, and every UrlNode can have only 1 dynamic segment
// Eg you can't have pages/[post]/abc.js and pages/[hello]/something-else.js
// Only 1 dynamic segment per nesting level
// So in the case that is test/integration/dynamic-routing it'll be this:
// pages/[post]/comments.js
// pages/blog/[post]/comment/[id].js
// Both are fine because `pages/[post]` and `pages/blog` are on the same level
// So in this case `UrlNode` created here has `this.slugName === 'post'`
// And since your PR passed through `slugName` as an array basically it'd including it in too many possibilities
// Instead what has to be passed through is the upwards path's dynamic names
const root = new UrlNode();
// Here the `root` gets injected multiple paths, and insert will break them up into sublevels
normalizedPages.forEach((pagePath)=>root.insert(pagePath));
// Smoosh will then sort those sublevels up to the point where you get the correct route definition priority
return root.smoosh();
}
function getSortedRouteObjects(objects, getter) {
// We're assuming here that all the pathnames are unique, that way we can
// sort the list and use the index as the key.
const indexes = {};
const pathnames = [];
for(let i = 0; i < objects.length; i++){
const pathname = getter(objects[i]);
indexes[pathname] = i;
pathnames[i] = pathname;
}
// Sort the pathnames.
const sorted = getSortedRoutes(pathnames);
// Map the sorted pathnames back to the original objects using the new sorted
// index.
return sorted.map((pathname)=>objects[indexes[pathname]]);
}
//# sourceMappingURL=sorted-routes.js.map

View File

@@ -0,0 +1,99 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
HEAD_REQUEST_KEY: null,
ROOT_SEGMENT_REQUEST_KEY: null,
appendSegmentRequestKeyPart: null,
convertSegmentPathToStaticExportFilename: null,
createSegmentRequestKeyPart: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
HEAD_REQUEST_KEY: function() {
return HEAD_REQUEST_KEY;
},
ROOT_SEGMENT_REQUEST_KEY: function() {
return ROOT_SEGMENT_REQUEST_KEY;
},
appendSegmentRequestKeyPart: function() {
return appendSegmentRequestKeyPart;
},
convertSegmentPathToStaticExportFilename: function() {
return convertSegmentPathToStaticExportFilename;
},
createSegmentRequestKeyPart: function() {
return createSegmentRequestKeyPart;
}
});
const _segment = require("../segment");
const ROOT_SEGMENT_REQUEST_KEY = '';
const HEAD_REQUEST_KEY = '/_head';
function createSegmentRequestKeyPart(segment) {
if (typeof segment === 'string') {
if (segment.startsWith(_segment.PAGE_SEGMENT_KEY)) {
// The Flight Router State type sometimes includes the search params in
// the page segment. However, the Segment Cache tracks this as a separate
// key. So, we strip the search params here, and then add them back when
// the cache entry is turned back into a FlightRouterState. This is an
// unfortunate consequence of the FlightRouteState being used both as a
// transport type and as a cache key; we'll address this once more of the
// Segment Cache implementation has settled.
// TODO: We should hoist the search params out of the FlightRouterState
// type entirely, This is our plan for dynamic route params, too.
return _segment.PAGE_SEGMENT_KEY;
}
const safeName = // TODO: FlightRouterState encodes Not Found routes as "/_not-found".
// But params typically don't include the leading slash. We should use
// a different encoding to avoid this special case.
segment === '/_not-found' ? '_not-found' : encodeToFilesystemAndURLSafeString(segment);
// Since this is not a dynamic segment, it's fully encoded. It does not
// need to be "hydrated" with a param value.
return safeName;
}
const name = segment[0];
const paramType = segment[2];
const safeName = encodeToFilesystemAndURLSafeString(name);
const encodedName = '$' + paramType + '$' + safeName;
return encodedName;
}
function appendSegmentRequestKeyPart(parentRequestKey, parallelRouteKey, childRequestKeyPart) {
// Aside from being filesystem safe, segment keys are also designed so that
// each segment and parallel route creates its own subdirectory. Roughly in
// the same shape as the source app directory. This is mostly just for easier
// debugging (you can open up the build folder and navigate the output); if
// we wanted to do we could just use a flat structure.
// Omit the parallel route key for children, since this is the most
// common case. Saves some bytes (and it's what the app directory does).
const slotKey = parallelRouteKey === 'children' ? childRequestKeyPart : `@${encodeToFilesystemAndURLSafeString(parallelRouteKey)}/${childRequestKeyPart}`;
return parentRequestKey + '/' + slotKey;
}
// Define a regex pattern to match the most common characters found in a route
// param. It excludes anything that might not be cross-platform filesystem
// compatible, like |. It does not need to be precise because the fallback is to
// just base64url-encode the whole parameter, which is fine; we just don't do it
// by default for compactness, and for easier debugging.
const simpleParamValueRegex = /^[a-zA-Z0-9\-_@]+$/;
function encodeToFilesystemAndURLSafeString(value) {
if (simpleParamValueRegex.test(value)) {
return value;
}
// If there are any unsafe characters, base64url-encode the entire value.
// We also add a ! prefix so it doesn't collide with the simple case.
const base64url = btoa(value).replace(/\+/g, '-') // Replace '+' with '-'
.replace(/\//g, '_') // Replace '/' with '_'
.replace(/=+$/, '') // Remove trailing '='
;
return '!' + base64url;
}
function convertSegmentPathToStaticExportFilename(segmentPath) {
return `__next${segmentPath.replace(/\//g, '.')}.txt`;
}
//# sourceMappingURL=segment-value-encoding.js.map

View File

@@ -0,0 +1,32 @@
/**
* Vary Params Decoding
*
* This module is shared between server and client.
*/ "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "readVaryParams", {
enumerable: true,
get: function() {
return readVaryParams;
}
});
function readVaryParams(thenable) {
// Attach a no-op listener to force Flight to synchronously resolve the
// thenable. When a thenable arrives from the Flight stream, it may be in an
// intermediate 'resolved_model' state (data received but not unwrapped).
// Calling .then() triggers Flight to transition it to 'fulfilled', making
// the value available synchronously. React uses this same optimization
// internally to avoid unnecessary microtasks.
thenable.then(noop);
// If the thenable is still not 'fulfilled' after calling .then(), the server
// failed to resolve it before the stream ended. Treat as unknown.
if (thenable.status !== 'fulfilled') {
return null;
}
return thenable.value;
}
const noop = ()=>{};
//# sourceMappingURL=vary-params-decoding.js.map

102
build/node_modules/next/dist/shared/lib/segment.js generated vendored Normal file
View File

@@ -0,0 +1,102 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
DEFAULT_SEGMENT_KEY: null,
NOT_FOUND_SEGMENT_KEY: null,
PAGE_SEGMENT_KEY: null,
addSearchParamsIfPageSegment: null,
computeSelectedLayoutSegment: null,
getSegmentValue: null,
getSelectedLayoutSegmentPath: null,
isGroupSegment: null,
isParallelRouteSegment: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DEFAULT_SEGMENT_KEY: function() {
return DEFAULT_SEGMENT_KEY;
},
NOT_FOUND_SEGMENT_KEY: function() {
return NOT_FOUND_SEGMENT_KEY;
},
PAGE_SEGMENT_KEY: function() {
return PAGE_SEGMENT_KEY;
},
addSearchParamsIfPageSegment: function() {
return addSearchParamsIfPageSegment;
},
computeSelectedLayoutSegment: function() {
return computeSelectedLayoutSegment;
},
getSegmentValue: function() {
return getSegmentValue;
},
getSelectedLayoutSegmentPath: function() {
return getSelectedLayoutSegmentPath;
},
isGroupSegment: function() {
return isGroupSegment;
},
isParallelRouteSegment: function() {
return isParallelRouteSegment;
}
});
function getSegmentValue(segment) {
return Array.isArray(segment) ? segment[1] : segment;
}
function isGroupSegment(segment) {
// Use array[0] for performant purpose
return segment[0] === '(' && segment.endsWith(')');
}
function isParallelRouteSegment(segment) {
return segment.startsWith('@') && segment !== '@children';
}
function addSearchParamsIfPageSegment(segment, searchParams) {
const isPageSegment = segment.includes(PAGE_SEGMENT_KEY);
if (isPageSegment) {
const stringifiedQuery = JSON.stringify(searchParams);
return stringifiedQuery !== '{}' ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery : PAGE_SEGMENT_KEY;
}
return segment;
}
function computeSelectedLayoutSegment(segments, parallelRouteKey) {
if (!segments || segments.length === 0) {
return null;
}
// For 'children', use first segment; for other parallel routes, use last segment
const rawSegment = parallelRouteKey === 'children' ? segments[0] : segments[segments.length - 1];
// If the default slot is showing, return null since it's not technically "selected" (it's a fallback)
// Returning an internal value like `__DEFAULT__` would be confusing
return rawSegment === DEFAULT_SEGMENT_KEY ? null : rawSegment;
}
function getSelectedLayoutSegmentPath(tree, parallelRouteKey, first = true, segmentPath = []) {
let node;
if (first) {
// Use the provided parallel route key on the first parallel route
node = tree[1][parallelRouteKey];
} else {
// After first parallel route prefer children, if there's no children pick the first parallel route.
const parallelRoutes = tree[1];
node = parallelRoutes.children ?? Object.values(parallelRoutes)[0];
}
if (!node) return segmentPath;
const segment = node[0];
let segmentValue = getSegmentValue(segment);
if (!segmentValue || segmentValue.startsWith(PAGE_SEGMENT_KEY)) {
return segmentPath;
}
segmentPath.push(segmentValue);
return getSelectedLayoutSegmentPath(node, parallelRouteKey, false, segmentPath);
}
const PAGE_SEGMENT_KEY = '__PAGE__';
const DEFAULT_SEGMENT_KEY = '__DEFAULT__';
const NOT_FOUND_SEGMENT_KEY = '/_not-found';
//# sourceMappingURL=segment.js.map

View File

@@ -0,0 +1,35 @@
'use client';
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
ServerInsertedHTMLContext: null,
useServerInsertedHTML: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
ServerInsertedHTMLContext: function() {
return ServerInsertedHTMLContext;
},
useServerInsertedHTML: function() {
return useServerInsertedHTML;
}
});
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
const ServerInsertedHTMLContext = /*#__PURE__*/ _react.default.createContext(null);
function useServerInsertedHTML(callback) {
const addInsertedServerHTMLCallback = (0, _react.useContext)(ServerInsertedHTMLContext);
// Should have no effects on client where there's no flush effects provider
if (addInsertedServerHTMLCallback) {
addInsertedServerHTMLCallback(callback);
}
}
//# sourceMappingURL=server-inserted-html.shared-runtime.js.map

View File

@@ -0,0 +1,56 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
extractInfoFromServerReferenceId: null,
omitUnusedArgs: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
extractInfoFromServerReferenceId: function() {
return extractInfoFromServerReferenceId;
},
omitUnusedArgs: function() {
return omitUnusedArgs;
}
});
function extractInfoFromServerReferenceId(id) {
const infoByte = parseInt(id.slice(0, 2), 16);
const typeBit = infoByte >> 7 & 0x1;
const argMask = infoByte >> 1 & 0x3f;
const restArgs = infoByte & 0x1;
const usedArgs = Array(6);
for(let index = 0; index < 6; index++){
const bitPosition = 5 - index;
const bit = argMask >> bitPosition & 0x1;
usedArgs[index] = bit === 1;
}
return {
type: typeBit === 1 ? 'use-cache' : 'server-action',
usedArgs: usedArgs,
hasRestArgs: restArgs === 1
};
}
function omitUnusedArgs(args, info) {
const filteredArgs = new Array(args.length);
let length = 0;
for(let index = 0; index < args.length; index++){
if (index < 6 && info.usedArgs[index] || // This assumes that the server reference info byte has the restArgs bit
// set to 1 if there are more than 6 args.
index >= 6 && info.hasRestArgs) {
filteredArgs[index] = args[index];
length = index + 1;
}
}
// Trim trailing unused args from the array.
filteredArgs.length = length;
return filteredArgs;
}
//# sourceMappingURL=server-reference-info.js.map

63
build/node_modules/next/dist/shared/lib/side-effect.js generated vendored Normal file
View File

@@ -0,0 +1,63 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function() {
return SideEffect;
}
});
const _react = require("react");
const isServer = typeof window === 'undefined';
const useClientOnlyLayoutEffect = isServer ? ()=>{} : _react.useLayoutEffect;
const useClientOnlyEffect = isServer ? ()=>{} : _react.useEffect;
function SideEffect(props) {
const { headManager, reduceComponentsToState } = props;
function emitChange() {
if (headManager && headManager.mountedInstances) {
const headElements = _react.Children.toArray(Array.from(headManager.mountedInstances).filter(Boolean));
headManager.updateHead(reduceComponentsToState(headElements));
}
}
if (isServer) {
headManager?.mountedInstances?.add(props.children);
emitChange();
}
useClientOnlyLayoutEffect(()=>{
headManager?.mountedInstances?.add(props.children);
return ()=>{
headManager?.mountedInstances?.delete(props.children);
};
});
// We need to call `updateHead` method whenever the `SideEffect` is trigger in all
// life-cycles: mount, update, unmount. However, if there are multiple `SideEffect`s
// being rendered, we only trigger the method from the last one.
// This is ensured by keeping the last unflushed `updateHead` in the `_pendingUpdate`
// singleton in the layout effect pass, and actually trigger it in the effect pass.
useClientOnlyLayoutEffect(()=>{
if (headManager) {
headManager._pendingUpdate = emitChange;
}
return ()=>{
if (headManager) {
headManager._pendingUpdate = emitChange;
}
};
});
useClientOnlyEffect(()=>{
if (headManager && headManager._pendingUpdate) {
headManager._pendingUpdate();
headManager._pendingUpdate = null;
}
return ()=>{
if (headManager && headManager._pendingUpdate) {
headManager._pendingUpdate();
headManager._pendingUpdate = null;
}
};
});
return null;
}
//# sourceMappingURL=side-effect.js.map

40
build/node_modules/next/dist/shared/lib/size-limit.js generated vendored Normal file
View File

@@ -0,0 +1,40 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
DEFAULT_MAX_POSTPONED_STATE_SIZE: null,
parseMaxPostponedStateSize: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DEFAULT_MAX_POSTPONED_STATE_SIZE: function() {
return DEFAULT_MAX_POSTPONED_STATE_SIZE;
},
parseMaxPostponedStateSize: function() {
return parseMaxPostponedStateSize;
}
});
const DEFAULT_MAX_POSTPONED_STATE_SIZE = '100 MB';
// 100MB in bytes. Not using the parseSizeLimit for performance as parseMaxPostponedStateSize is in the hot path for rendering.
const DEFAULT_MAX_POSTPONED_STATE_SIZE_BYTES = 104857600;
function parseSizeLimit(size) {
const bytes = require('next/dist/compiled/bytes').parse(size);
if (bytes === null || isNaN(bytes) || bytes < 1) {
return undefined;
}
return bytes;
}
function parseMaxPostponedStateSize(size) {
if (!size) {
return DEFAULT_MAX_POSTPONED_STATE_SIZE_BYTES;
}
return parseSizeLimit(size);
}
//# sourceMappingURL=size-limit.js.map

View File

@@ -0,0 +1,53 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
TurbopackInternalError: null,
throwTurbopackInternalError: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
TurbopackInternalError: function() {
return TurbopackInternalError;
},
throwTurbopackInternalError: function() {
return throwTurbopackInternalError;
}
});
const _events = require("../../../telemetry/events");
const _shared = require("../../../trace/shared");
class TurbopackInternalError extends Error {
constructor({ message, anonymizedLocation }){
super(message), this.name = 'TurbopackInternalError', // Manually set this as this isn't statically determinable
this.__NEXT_ERROR_CODE = 'TurbopackInternalError';
this.location = anonymizedLocation;
}
}
function throwTurbopackInternalError(conversionError, opts) {
if (conversionError != null) {
// Somehow napi failed to convert `opts` to a JS object??? Just give up and throw that instead.
throw Object.defineProperty(new Error('NAPI type conversion error in throwTurbopackInternalError', {
cause: conversionError
}), "__NEXT_ERROR_CODE", {
value: "E723",
enumerable: false,
configurable: true
});
}
const err = new TurbopackInternalError(opts);
const telemetry = _shared.traceGlobals.get('telemetry');
if (telemetry) {
telemetry.record((0, _events.eventErrorThrown)(err, opts.anonymizedLocation));
} else {
console.error('Expected `telemetry` to be set in globals');
}
throw err;
}
//# sourceMappingURL=internal-error.js.map

207
build/node_modules/next/dist/shared/lib/utils.js generated vendored Normal file
View File

@@ -0,0 +1,207 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
DecodeError: null,
MiddlewareNotFoundError: null,
MissingStaticPage: null,
NormalizeError: null,
PageNotFoundError: null,
SP: null,
ST: null,
WEB_VITALS: null,
execOnce: null,
getDisplayName: null,
getLocationOrigin: null,
getURL: null,
isAbsoluteUrl: null,
isResSent: null,
loadGetInitialProps: null,
normalizeRepeatedSlashes: null,
stringifyError: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
DecodeError: function() {
return DecodeError;
},
MiddlewareNotFoundError: function() {
return MiddlewareNotFoundError;
},
MissingStaticPage: function() {
return MissingStaticPage;
},
NormalizeError: function() {
return NormalizeError;
},
PageNotFoundError: function() {
return PageNotFoundError;
},
SP: function() {
return SP;
},
ST: function() {
return ST;
},
WEB_VITALS: function() {
return WEB_VITALS;
},
execOnce: function() {
return execOnce;
},
getDisplayName: function() {
return getDisplayName;
},
getLocationOrigin: function() {
return getLocationOrigin;
},
getURL: function() {
return getURL;
},
isAbsoluteUrl: function() {
return isAbsoluteUrl;
},
isResSent: function() {
return isResSent;
},
loadGetInitialProps: function() {
return loadGetInitialProps;
},
normalizeRepeatedSlashes: function() {
return normalizeRepeatedSlashes;
},
stringifyError: function() {
return stringifyError;
}
});
const WEB_VITALS = [
'CLS',
'FCP',
'FID',
'INP',
'LCP',
'TTFB'
];
function execOnce(fn) {
let used = false;
let result;
return (...args)=>{
if (!used) {
used = true;
result = fn(...args);
}
return result;
};
}
// Scheme: https://tools.ietf.org/html/rfc3986#section-3.1
// Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3
const ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\d+\-.]*?:/;
const isAbsoluteUrl = (url)=>ABSOLUTE_URL_REGEX.test(url);
function getLocationOrigin() {
const { protocol, hostname, port } = window.location;
return `${protocol}//${hostname}${port ? ':' + port : ''}`;
}
function getURL() {
const { href } = window.location;
const origin = getLocationOrigin();
return href.substring(origin.length);
}
function getDisplayName(Component) {
return typeof Component === 'string' ? Component : Component.displayName || Component.name || 'Unknown';
}
function isResSent(res) {
return res.finished || res.headersSent;
}
function normalizeRepeatedSlashes(url) {
const urlParts = url.split('?');
const urlNoQuery = urlParts[0];
return urlNoQuery// first we replace any non-encoded backslashes with forward
// then normalize repeated forward slashes
.replace(/\\/g, '/').replace(/\/\/+/g, '/') + (urlParts[1] ? `?${urlParts.slice(1).join('?')}` : '');
}
async function loadGetInitialProps(App, ctx) {
if (process.env.NODE_ENV !== 'production') {
if (App.prototype?.getInitialProps) {
const message = `"${getDisplayName(App)}.getInitialProps()" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.`;
throw Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
value: "E1035",
enumerable: false,
configurable: true
});
}
}
// when called from _app `ctx` is nested in `ctx`
const res = ctx.res || ctx.ctx && ctx.ctx.res;
if (!App.getInitialProps) {
if (ctx.ctx && ctx.Component) {
// @ts-ignore pageProps default
return {
pageProps: await loadGetInitialProps(ctx.Component, ctx.ctx)
};
}
return {};
}
const props = await App.getInitialProps(ctx);
if (res && isResSent(res)) {
return props;
}
if (!props) {
const message = `"${getDisplayName(App)}.getInitialProps()" should resolve to an object. But found "${props}" instead.`;
throw Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
value: "E1025",
enumerable: false,
configurable: true
});
}
if (process.env.NODE_ENV !== 'production') {
if (Object.keys(props).length === 0 && !ctx.ctx) {
console.warn(`${getDisplayName(App)} returned an empty object from \`getInitialProps\`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps`);
}
}
return props;
}
const SP = typeof performance !== 'undefined';
const ST = SP && [
'mark',
'measure',
'getEntriesByName'
].every((method)=>typeof performance[method] === 'function');
class DecodeError extends Error {
}
class NormalizeError extends Error {
}
class PageNotFoundError extends Error {
constructor(page){
super();
this.code = 'ENOENT';
this.name = 'PageNotFoundError';
this.message = `Cannot find module for page: ${page}`;
}
}
class MissingStaticPage extends Error {
constructor(page, message){
super();
this.message = `Failed to load static file for page: ${page} ${message}`;
}
}
class MiddlewareNotFoundError extends Error {
constructor(){
super();
this.code = 'ENOENT';
this.message = `Cannot find the middleware module`;
}
}
function stringifyError(error) {
return JSON.stringify({
message: error.message,
stack: error.stack
});
}
//# sourceMappingURL=utils.js.map

View File

@@ -0,0 +1,69 @@
// This regex will have fast negatives meaning valid identifiers may not pass
// this test. However this is only used during static generation to provide hints
// about why a page bailed out of some or all prerendering and we can use bracket notation
// for example while `ಠ_ಠ` is a valid identifier it's ok to print `searchParams['ಠ_ಠ']`
// even if this would have been fine too `searchParams.ಠ_ಠ`
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
0 && (module.exports = {
describeHasCheckingStringProperty: null,
describeStringPropertyAccess: null,
wellKnownProperties: null
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: all[name]
});
}
_export(exports, {
describeHasCheckingStringProperty: function() {
return describeHasCheckingStringProperty;
},
describeStringPropertyAccess: function() {
return describeStringPropertyAccess;
},
wellKnownProperties: function() {
return wellKnownProperties;
}
});
const isDefinitelyAValidIdentifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
function describeStringPropertyAccess(target, prop) {
if (isDefinitelyAValidIdentifier.test(prop)) {
return `\`${target}.${prop}\``;
}
return `\`${target}[${JSON.stringify(prop)}]\``;
}
function describeHasCheckingStringProperty(target, prop) {
const stringifiedProp = JSON.stringify(prop);
return `\`Reflect.has(${target}, ${stringifiedProp})\`, \`${stringifiedProp} in ${target}\`, or similar`;
}
const wellKnownProperties = new Set([
'hasOwnProperty',
'isPrototypeOf',
'propertyIsEnumerable',
'toString',
'valueOf',
'toLocaleString',
// Promise prototype
'then',
'catch',
'finally',
// React Promise extension
'status',
// 'value',
// 'error',
// React introspection
'displayName',
'_debugInfo',
// Common tested properties
'toJSON',
'$$typeof',
'__esModule',
// Tested by flight when checking for iterables
'@@iterator'
]);
//# sourceMappingURL=reflect-utils.js.map

View File

@@ -0,0 +1,22 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "warnOnce", {
enumerable: true,
get: function() {
return warnOnce;
}
});
let warnOnce = (_)=>{};
if (process.env.NODE_ENV !== 'production') {
const warnings = new Set();
warnOnce = (msg)=>{
if (!warnings.has(msg)) {
console.warn(msg);
}
warnings.add(msg);
};
}
//# sourceMappingURL=warn-once.js.map

Some files were not shown because too many files have changed in this diff Show More