module.exports = [ "[project]/node_modules/next/dist/server/route-modules/app-page/module.compiled.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; else { if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; else { if ("TURBOPACK compile-time truthy", 1) { if ("TURBOPACK compile-time truthy", 1) { module.exports = __turbopack_context__.r("[externals]/next/dist/compiled/next-server/app-page-turbo.runtime.dev.js [external] (next/dist/compiled/next-server/app-page-turbo.runtime.dev.js, cjs)"); } else //TURBOPACK unreachable ; } else //TURBOPACK unreachable ; } } //# sourceMappingURL=module.compiled.js.map }), "[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; module.exports = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/module.compiled.js [app-ssr] (ecmascript)").vendored['react-ssr'].React; //# sourceMappingURL=react.js.map }), "[project]/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } function _interop_require_wildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) return obj; if (obj === null || typeof obj !== "object" && typeof obj !== "function") return { default: obj }; var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) return cache.get(obj); var newObj = { __proto__: null }; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for(var key in obj){ if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc); else newObj[key] = obj[key]; } } newObj.default = obj; if (cache) cache.set(obj, newObj); return newObj; } exports._ = _interop_require_wildcard; }), "[project]/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/app-router-context.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; module.exports = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/module.compiled.js [app-ssr] (ecmascript)").vendored['contexts'].AppRouterContext; //# sourceMappingURL=app-router-context.js.map }), "[project]/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/hooks-client-context.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; module.exports = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/module.compiled.js [app-ssr] (ecmascript)").vendored['contexts'].HooksClientContext; //# sourceMappingURL=hooks-client-context.js.map }), "[project]/node_modules/next/dist/shared/lib/segment.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { DEFAULT_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; }, 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__'; //# sourceMappingURL=segment.js.map }), "[project]/node_modules/next/dist/client/components/readonly-url-search-params.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; /** * ReadonlyURLSearchParams implementation shared between client and server. * This file is intentionally not marked as 'use client' or 'use server' * so it can be imported by both environments. */ /** @internal */ Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "ReadonlyURLSearchParams", { enumerable: true, get: function() { return ReadonlyURLSearchParams; } }); class ReadonlyURLSearchParamsError extends Error { constructor(){ super('Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams'); } } class ReadonlyURLSearchParams extends URLSearchParams { /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */ append() { throw new ReadonlyURLSearchParamsError(); } /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */ delete() { throw new ReadonlyURLSearchParamsError(); } /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */ set() { throw new ReadonlyURLSearchParamsError(); } /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */ sort() { throw new ReadonlyURLSearchParamsError(); } } 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=readonly-url-search-params.js.map }), "[project]/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/server-inserted-html.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; module.exports = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/module.compiled.js [app-ssr] (ecmascript)").vendored['contexts'].ServerInsertedHtml; //# sourceMappingURL=server-inserted-html.js.map }), "[project]/node_modules/next/dist/client/components/unrecognized-action-error.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { UnrecognizedActionError: null, unstable_isUnrecognizedActionError: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { UnrecognizedActionError: function() { return UnrecognizedActionError; }, unstable_isUnrecognizedActionError: function() { return unstable_isUnrecognizedActionError; } }); class UnrecognizedActionError extends Error { constructor(...args){ super(...args); this.name = 'UnrecognizedActionError'; } } function unstable_isUnrecognizedActionError(error) { return !!(error && typeof error === 'object' && error instanceof UnrecognizedActionError); } 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=unrecognized-action-error.js.map }), "[project]/node_modules/next/dist/client/components/redirect-status-code.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "RedirectStatusCode", { enumerable: true, get: function() { return RedirectStatusCode; } }); var RedirectStatusCode = /*#__PURE__*/ function(RedirectStatusCode) { RedirectStatusCode[RedirectStatusCode["SeeOther"] = 303] = "SeeOther"; RedirectStatusCode[RedirectStatusCode["TemporaryRedirect"] = 307] = "TemporaryRedirect"; RedirectStatusCode[RedirectStatusCode["PermanentRedirect"] = 308] = "PermanentRedirect"; return RedirectStatusCode; }({}); 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=redirect-status-code.js.map }), "[project]/node_modules/next/dist/client/components/redirect-error.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { REDIRECT_ERROR_CODE: null, RedirectType: null, isRedirectError: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { REDIRECT_ERROR_CODE: function() { return REDIRECT_ERROR_CODE; }, RedirectType: function() { return RedirectType; }, isRedirectError: function() { return isRedirectError; } }); const _redirectstatuscode = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/redirect-status-code.js [app-ssr] (ecmascript)"); const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'; var RedirectType = /*#__PURE__*/ function(RedirectType) { RedirectType["push"] = "push"; RedirectType["replace"] = "replace"; return RedirectType; }({}); function isRedirectError(error) { if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { return false; } const digest = error.digest.split(';'); const [errorCode, type] = digest; const destination = digest.slice(2, -2).join(';'); const status = digest.at(-2); const statusCode = Number(status); return errorCode === REDIRECT_ERROR_CODE && (type === 'replace' || type === 'push') && typeof destination === 'string' && !isNaN(statusCode) && statusCode in _redirectstatuscode.RedirectStatusCode; } 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=redirect-error.js.map }), "[project]/node_modules/next/dist/client/components/redirect.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { getRedirectError: null, getRedirectStatusCodeFromError: null, getRedirectTypeFromError: null, getURLFromRedirectError: null, permanentRedirect: null, redirect: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { getRedirectError: function() { return getRedirectError; }, getRedirectStatusCodeFromError: function() { return getRedirectStatusCodeFromError; }, getRedirectTypeFromError: function() { return getRedirectTypeFromError; }, getURLFromRedirectError: function() { return getURLFromRedirectError; }, permanentRedirect: function() { return permanentRedirect; }, redirect: function() { return redirect; } }); const _redirectstatuscode = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/redirect-status-code.js [app-ssr] (ecmascript)"); const _redirecterror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/redirect-error.js [app-ssr] (ecmascript)"); const actionAsyncStorage = ("TURBOPACK compile-time truthy", 1) ? __turbopack_context__.r("[externals]/next/dist/server/app-render/action-async-storage.external.js [external] (next/dist/server/app-render/action-async-storage.external.js, cjs)").actionAsyncStorage : "TURBOPACK unreachable"; function getRedirectError(url, type, statusCode = _redirectstatuscode.RedirectStatusCode.TemporaryRedirect) { const error = Object.defineProperty(new Error(_redirecterror.REDIRECT_ERROR_CODE), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.digest = `${_redirecterror.REDIRECT_ERROR_CODE};${type};${url};${statusCode};`; return error; } function redirect(/** The URL to redirect to */ url, type) { type ??= actionAsyncStorage?.getStore()?.isAction ? _redirecterror.RedirectType.push : _redirecterror.RedirectType.replace; throw getRedirectError(url, type, _redirectstatuscode.RedirectStatusCode.TemporaryRedirect); } function permanentRedirect(/** The URL to redirect to */ url, type = _redirecterror.RedirectType.replace) { throw getRedirectError(url, type, _redirectstatuscode.RedirectStatusCode.PermanentRedirect); } function getURLFromRedirectError(error) { if (!(0, _redirecterror.isRedirectError)(error)) return null; // Slices off the beginning of the digest that contains the code and the // separating ';'. return error.digest.split(';').slice(2, -2).join(';'); } function getRedirectTypeFromError(error) { if (!(0, _redirecterror.isRedirectError)(error)) { throw Object.defineProperty(new Error('Not a redirect error'), "__NEXT_ERROR_CODE", { value: "E260", enumerable: false, configurable: true }); } return error.digest.split(';', 2)[1]; } function getRedirectStatusCodeFromError(error) { if (!(0, _redirecterror.isRedirectError)(error)) { throw Object.defineProperty(new Error('Not a redirect error'), "__NEXT_ERROR_CODE", { value: "E260", enumerable: false, configurable: true }); } return Number(error.digest.split(';').at(-2)); } 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=redirect.js.map }), "[project]/node_modules/next/dist/client/components/http-access-fallback/http-access-fallback.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { HTTPAccessErrorStatus: null, HTTP_ERROR_FALLBACK_ERROR_CODE: null, getAccessFallbackErrorTypeByStatus: null, getAccessFallbackHTTPStatus: null, isHTTPAccessFallbackError: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { HTTPAccessErrorStatus: function() { return HTTPAccessErrorStatus; }, HTTP_ERROR_FALLBACK_ERROR_CODE: function() { return HTTP_ERROR_FALLBACK_ERROR_CODE; }, getAccessFallbackErrorTypeByStatus: function() { return getAccessFallbackErrorTypeByStatus; }, getAccessFallbackHTTPStatus: function() { return getAccessFallbackHTTPStatus; }, isHTTPAccessFallbackError: function() { return isHTTPAccessFallbackError; } }); const HTTPAccessErrorStatus = { NOT_FOUND: 404, FORBIDDEN: 403, UNAUTHORIZED: 401 }; const ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus)); const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'; function isHTTPAccessFallbackError(error) { if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { return false; } const [prefix, httpStatus] = error.digest.split(';'); return prefix === HTTP_ERROR_FALLBACK_ERROR_CODE && ALLOWED_CODES.has(Number(httpStatus)); } function getAccessFallbackHTTPStatus(error) { const httpStatus = error.digest.split(';')[1]; return Number(httpStatus); } function getAccessFallbackErrorTypeByStatus(status) { switch(status){ case 401: return 'unauthorized'; case 403: return 'forbidden'; case 404: return 'not-found'; default: return; } } 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=http-access-fallback.js.map }), "[project]/node_modules/next/dist/client/components/not-found.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "notFound", { enumerable: true, get: function() { return notFound; } }); const _httpaccessfallback = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/http-access-fallback/http-access-fallback.js [app-ssr] (ecmascript)"); /** * This function allows you to render the [not-found.js file](https://nextjs.org/docs/app/api-reference/file-conventions/not-found) * within a route segment as well as inject a tag. * * `notFound()` can be used in * [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components), * [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and * [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations). * * - In a Server Component, this will insert a `` meta tag and set the status code to 404. * - In a Route Handler or Server Action, it will serve a 404 to the caller. * * Read more: [Next.js Docs: `notFound`](https://nextjs.org/docs/app/api-reference/functions/not-found) */ const DIGEST = `${_httpaccessfallback.HTTP_ERROR_FALLBACK_ERROR_CODE};404`; function notFound() { const error = Object.defineProperty(new Error(DIGEST), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.digest = DIGEST; throw error; } 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=not-found.js.map }), "[project]/node_modules/next/dist/client/components/forbidden.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "forbidden", { enumerable: true, get: function() { return forbidden; } }); const _httpaccessfallback = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/http-access-fallback/http-access-fallback.js [app-ssr] (ecmascript)"); // TODO: Add `forbidden` docs /** * @experimental * This function allows you to render the [forbidden.js file](https://nextjs.org/docs/app/api-reference/file-conventions/forbidden) * within a route segment as well as inject a tag. * * `forbidden()` can be used in * [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components), * [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and * [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations). * * Read more: [Next.js Docs: `forbidden`](https://nextjs.org/docs/app/api-reference/functions/forbidden) */ const DIGEST = `${_httpaccessfallback.HTTP_ERROR_FALLBACK_ERROR_CODE};403`; function forbidden() { if ("TURBOPACK compile-time truthy", 1) { throw Object.defineProperty(new Error(`\`forbidden()\` is experimental and only allowed to be enabled when \`experimental.authInterrupts\` is enabled.`), "__NEXT_ERROR_CODE", { value: "E488", enumerable: false, configurable: true }); } const error = Object.defineProperty(new Error(DIGEST), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.digest = DIGEST; throw error; } 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=forbidden.js.map }), "[project]/node_modules/next/dist/client/components/unauthorized.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "unauthorized", { enumerable: true, get: function() { return unauthorized; } }); const _httpaccessfallback = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/http-access-fallback/http-access-fallback.js [app-ssr] (ecmascript)"); // TODO: Add `unauthorized` docs /** * @experimental * This function allows you to render the [unauthorized.js file](https://nextjs.org/docs/app/api-reference/file-conventions/unauthorized) * within a route segment as well as inject a tag. * * `unauthorized()` can be used in * [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components), * [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and * [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations). * * * Read more: [Next.js Docs: `unauthorized`](https://nextjs.org/docs/app/api-reference/functions/unauthorized) */ const DIGEST = `${_httpaccessfallback.HTTP_ERROR_FALLBACK_ERROR_CODE};401`; function unauthorized() { if ("TURBOPACK compile-time truthy", 1) { throw Object.defineProperty(new Error(`\`unauthorized()\` is experimental and only allowed to be used when \`experimental.authInterrupts\` is enabled.`), "__NEXT_ERROR_CODE", { value: "E411", enumerable: false, configurable: true }); } const error = Object.defineProperty(new Error(DIGEST), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.digest = DIGEST; throw error; } 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=unauthorized.js.map }), "[project]/node_modules/next/dist/server/dynamic-rendering-utils.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { isHangingPromiseRejectionError: null, makeDevtoolsIOAwarePromise: null, makeHangingPromise: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { isHangingPromiseRejectionError: function() { return isHangingPromiseRejectionError; }, makeDevtoolsIOAwarePromise: function() { return makeDevtoolsIOAwarePromise; }, makeHangingPromise: function() { return makeHangingPromise; } }); function isHangingPromiseRejectionError(err) { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false; } return err.digest === HANGING_PROMISE_REJECTION; } const HANGING_PROMISE_REJECTION = 'HANGING_PROMISE_REJECTION'; class HangingPromiseRejectionError extends Error { constructor(route, expression){ super(`During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \`setTimeout\`, \`after\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route "${route}".`), this.route = route, this.expression = expression, this.digest = HANGING_PROMISE_REJECTION; } } const abortListenersBySignal = new WeakMap(); function makeHangingPromise(signal, route, expression) { if (signal.aborted) { return Promise.reject(new HangingPromiseRejectionError(route, expression)); } else { const hangingPromise = new Promise((_, reject)=>{ const boundRejection = reject.bind(null, new HangingPromiseRejectionError(route, expression)); let currentListeners = abortListenersBySignal.get(signal); if (currentListeners) { currentListeners.push(boundRejection); } else { const listeners = [ boundRejection ]; abortListenersBySignal.set(signal, listeners); signal.addEventListener('abort', ()=>{ for(let i = 0; i < listeners.length; i++){ listeners[i](); } }, { once: true }); } }); // We are fine if no one actually awaits this promise. We shouldn't consider this an unhandled rejection so // we attach a noop catch handler here to suppress this warning. If you actually await somewhere or construct // your own promise out of it you'll need to ensure you handle the error when it rejects. hangingPromise.catch(ignoreReject); return hangingPromise; } } function ignoreReject() {} function makeDevtoolsIOAwarePromise(underlying, requestStore, stage) { if (requestStore.stagedRendering) { // We resolve each stage in a timeout, so React DevTools will pick this up as IO. return requestStore.stagedRendering.delayUntilStage(stage, undefined, underlying); } // in React DevTools if we resolve in a setTimeout we will observe // the promise resolution as something that can suspend a boundary or root. return new Promise((resolve)=>{ // Must use setTimeout to be considered IO React DevTools. setImmediate will not work. setTimeout(()=>{ resolve(underlying); }, 0); }); } //# sourceMappingURL=dynamic-rendering-utils.js.map }), "[project]/node_modules/next/dist/server/lib/router-utils/is-postpone.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "isPostpone", { enumerable: true, get: function() { return isPostpone; } }); const REACT_POSTPONE_TYPE = Symbol.for('react.postpone'); function isPostpone(error) { return typeof error === 'object' && error !== null && error.$$typeof === REACT_POSTPONE_TYPE; } //# sourceMappingURL=is-postpone.js.map }), "[project]/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; // This has to be a shared module which is shared between client component error boundary and dynamic component 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 }), "[project]/node_modules/next/dist/client/components/is-next-router-error.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "isNextRouterError", { enumerable: true, get: function() { return isNextRouterError; } }); const _httpaccessfallback = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/http-access-fallback/http-access-fallback.js [app-ssr] (ecmascript)"); const _redirecterror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/redirect-error.js [app-ssr] (ecmascript)"); function isNextRouterError(error) { return (0, _redirecterror.isRedirectError)(error) || (0, _httpaccessfallback.isHTTPAccessFallbackError)(error); } 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=is-next-router-error.js.map }), "[project]/node_modules/next/dist/client/components/hooks-server-context.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { DynamicServerError: null, isDynamicServerError: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { DynamicServerError: function() { return DynamicServerError; }, isDynamicServerError: function() { return isDynamicServerError; } }); const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'; class DynamicServerError extends Error { constructor(description){ super(`Dynamic server usage: ${description}`), this.description = description, this.digest = DYNAMIC_ERROR_CODE; } } function isDynamicServerError(err) { if (typeof err !== 'object' || err === null || !('digest' in err) || typeof err.digest !== 'string') { return false; } return err.digest === DYNAMIC_ERROR_CODE; } 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=hooks-server-context.js.map }), "[project]/node_modules/next/dist/client/components/static-generation-bailout.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { StaticGenBailoutError: null, isStaticGenBailoutError: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { StaticGenBailoutError: function() { return StaticGenBailoutError; }, isStaticGenBailoutError: function() { return isStaticGenBailoutError; } }); const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'; class StaticGenBailoutError extends Error { constructor(...args){ super(...args), this.code = NEXT_STATIC_GEN_BAILOUT; } } function isStaticGenBailoutError(error) { if (typeof error !== 'object' || error === null || !('code' in error)) { return false; } return error.code === NEXT_STATIC_GEN_BAILOUT; } 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=static-generation-bailout.js.map }), "[project]/node_modules/next/dist/lib/framework/boundary-constants.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { METADATA_BOUNDARY_NAME: null, OUTLET_BOUNDARY_NAME: null, ROOT_LAYOUT_BOUNDARY_NAME: null, VIEWPORT_BOUNDARY_NAME: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { METADATA_BOUNDARY_NAME: function() { return METADATA_BOUNDARY_NAME; }, OUTLET_BOUNDARY_NAME: function() { return OUTLET_BOUNDARY_NAME; }, ROOT_LAYOUT_BOUNDARY_NAME: function() { return ROOT_LAYOUT_BOUNDARY_NAME; }, VIEWPORT_BOUNDARY_NAME: function() { return VIEWPORT_BOUNDARY_NAME; } }); const METADATA_BOUNDARY_NAME = '__next_metadata_boundary__'; const VIEWPORT_BOUNDARY_NAME = '__next_viewport_boundary__'; const OUTLET_BOUNDARY_NAME = '__next_outlet_boundary__'; const ROOT_LAYOUT_BOUNDARY_NAME = '__next_root_layout_boundary__'; //# sourceMappingURL=boundary-constants.js.map }), "[project]/node_modules/next/dist/lib/scheduler.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { atLeastOneTask: null, scheduleImmediate: null, scheduleOnNextTick: null, waitAtLeastOneReactRenderTask: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { atLeastOneTask: function() { return atLeastOneTask; }, scheduleImmediate: function() { return scheduleImmediate; }, scheduleOnNextTick: function() { return scheduleOnNextTick; }, waitAtLeastOneReactRenderTask: function() { return waitAtLeastOneReactRenderTask; } }); const scheduleOnNextTick = (cb)=>{ // We use Promise.resolve().then() here so that the operation is scheduled at // the end of the promise job queue, we then add it to the next process tick // to ensure it's evaluated afterwards. // // This was inspired by the implementation of the DataLoader interface: https://github.com/graphql/dataloader/blob/d336bd15282664e0be4b4a657cb796f09bafbc6b/src/index.js#L213-L255 // Promise.resolve().then(()=>{ if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; else { process.nextTick(cb); } }); }; const scheduleImmediate = (cb)=>{ if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; else { setImmediate(cb); } }; function atLeastOneTask() { return new Promise((resolve)=>scheduleImmediate(resolve)); } function waitAtLeastOneReactRenderTask() { if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; else { return new Promise((r)=>setImmediate(r)); } } //# sourceMappingURL=scheduler.js.map }), "[project]/node_modules/next/dist/shared/lib/invariant-error.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "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 }), "[project]/node_modules/next/dist/shared/lib/promise-with-resolvers.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "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 }), "[project]/node_modules/next/dist/server/app-render/staged-rendering.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { RenderStage: null, StagedRenderingController: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { RenderStage: function() { return RenderStage; }, StagedRenderingController: function() { return StagedRenderingController; } }); const _invarianterror = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/invariant-error.js [app-ssr] (ecmascript)"); const _promisewithresolvers = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/promise-with-resolvers.js [app-ssr] (ecmascript)"); var RenderStage = /*#__PURE__*/ function(RenderStage) { RenderStage[RenderStage["Static"] = 1] = "Static"; RenderStage[RenderStage["Runtime"] = 2] = "Runtime"; RenderStage[RenderStage["Dynamic"] = 3] = "Dynamic"; return RenderStage; }({}); class StagedRenderingController { constructor(abortSignal = null){ this.abortSignal = abortSignal; this.currentStage = 1; this.runtimeStagePromise = (0, _promisewithresolvers.createPromiseWithResolvers)(); this.dynamicStagePromise = (0, _promisewithresolvers.createPromiseWithResolvers)(); if (abortSignal) { abortSignal.addEventListener('abort', ()=>{ const { reason } = abortSignal; if (this.currentStage < 2) { this.runtimeStagePromise.promise.catch(ignoreReject) // avoid unhandled rejections ; this.runtimeStagePromise.reject(reason); } if (this.currentStage < 3) { this.dynamicStagePromise.promise.catch(ignoreReject) // avoid unhandled rejections ; this.dynamicStagePromise.reject(reason); } }, { once: true }); } } advanceStage(stage) { // If we're already at the target stage or beyond, do nothing. // (this can happen e.g. if sync IO advanced us to the dynamic stage) if (this.currentStage >= stage) { return; } this.currentStage = stage; // Note that we might be going directly from Static to Dynamic, // so we need to resolve the runtime stage as well. if (stage >= 2) { this.runtimeStagePromise.resolve(); } if (stage >= 3) { this.dynamicStagePromise.resolve(); } } getStagePromise(stage) { switch(stage){ case 2: { return this.runtimeStagePromise.promise; } case 3: { return this.dynamicStagePromise.promise; } default: { stage; throw Object.defineProperty(new _invarianterror.InvariantError(`Invalid render stage: ${stage}`), "__NEXT_ERROR_CODE", { value: "E881", enumerable: false, configurable: true }); } } } waitForStage(stage) { return this.getStagePromise(stage); } delayUntilStage(stage, displayName, resolvedValue) { const ioTriggerPromise = this.getStagePromise(stage); const promise = makeDevtoolsIOPromiseFromIOTrigger(ioTriggerPromise, displayName, resolvedValue); // Analogously to `makeHangingPromise`, we might reject this promise if the signal is invoked. // (e.g. in the case where we don't want want the render to proceed to the dynamic stage and abort it). // We shouldn't consider this an unhandled rejection, so we attach a noop catch handler here to suppress this warning. if (this.abortSignal) { promise.catch(ignoreReject); } return promise; } } function ignoreReject() {} // TODO(restart-on-cache-miss): the layering of `delayUntilStage`, // `makeDevtoolsIOPromiseFromIOTrigger` and and `makeDevtoolsIOAwarePromise` // is confusing, we should clean it up. function makeDevtoolsIOPromiseFromIOTrigger(ioTrigger, displayName, resolvedValue) { // If we create a `new Promise` and give it a displayName // (with no userspace code above us in the stack) // React Devtools will use it as the IO cause when determining "suspended by". // In particular, it should shadow any inner IO that resolved/rejected the promise // (in case of staged rendering, this will be the `setTimeout` that triggers the relevant stage) const promise = new Promise((resolve, reject)=>{ ioTrigger.then(resolve.bind(null, resolvedValue), reject); }); if (displayName !== undefined) { // @ts-expect-error promise.displayName = displayName; } return promise; } //# sourceMappingURL=staged-rendering.js.map }), "[project]/node_modules/next/dist/server/app-render/dynamic-rendering.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; /** * The functions provided by this module are used to communicate certain properties * about the currently running code so that Next.js can make decisions on how to handle * the current execution in different rendering modes such as pre-rendering, resuming, and SSR. * * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering. * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of * Dynamic indications. * * The first is simply an intention to be dynamic. unstable_noStore is an example of this where * the currently executing code simply declares that the current scope is dynamic but if you use it * inside unstable_cache it can still be cached. This type of indication can be removed if we ever * make the default dynamic to begin with because the only way you would ever be static is inside * a cache scope which this indication does not affect. * * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic * because it means that it is inappropriate to cache this at all. using a dynamic data source inside * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should * read that data outside the cache and pass it in as an argument to the cached function. */ Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { Postpone: null, PreludeState: null, abortAndThrowOnSynchronousRequestDataAccess: null, abortOnSynchronousPlatformIOAccess: null, accessedDynamicData: null, annotateDynamicAccess: null, consumeDynamicAccess: null, createDynamicTrackingState: null, createDynamicValidationState: null, createHangingInputAbortSignal: null, createRenderInBrowserAbortSignal: null, delayUntilRuntimeStage: null, formatDynamicAPIAccesses: null, getFirstDynamicReason: null, isDynamicPostpone: null, isPrerenderInterruptedError: null, logDisallowedDynamicError: null, markCurrentScopeAsDynamic: null, postponeWithTracking: null, throwIfDisallowedDynamic: null, throwToInterruptStaticGeneration: null, trackAllowedDynamicAccess: null, trackDynamicDataInDynamicRender: null, trackSynchronousPlatformIOAccessInDev: null, useDynamicRouteParams: null, useDynamicSearchParams: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { Postpone: function() { return Postpone; }, PreludeState: function() { return PreludeState; }, abortAndThrowOnSynchronousRequestDataAccess: function() { return abortAndThrowOnSynchronousRequestDataAccess; }, abortOnSynchronousPlatformIOAccess: function() { return abortOnSynchronousPlatformIOAccess; }, accessedDynamicData: function() { return accessedDynamicData; }, annotateDynamicAccess: function() { return annotateDynamicAccess; }, consumeDynamicAccess: function() { return consumeDynamicAccess; }, createDynamicTrackingState: function() { return createDynamicTrackingState; }, createDynamicValidationState: function() { return createDynamicValidationState; }, createHangingInputAbortSignal: function() { return createHangingInputAbortSignal; }, createRenderInBrowserAbortSignal: function() { return createRenderInBrowserAbortSignal; }, delayUntilRuntimeStage: function() { return delayUntilRuntimeStage; }, formatDynamicAPIAccesses: function() { return formatDynamicAPIAccesses; }, getFirstDynamicReason: function() { return getFirstDynamicReason; }, isDynamicPostpone: function() { return isDynamicPostpone; }, isPrerenderInterruptedError: function() { return isPrerenderInterruptedError; }, logDisallowedDynamicError: function() { return logDisallowedDynamicError; }, markCurrentScopeAsDynamic: function() { return markCurrentScopeAsDynamic; }, postponeWithTracking: function() { return postponeWithTracking; }, throwIfDisallowedDynamic: function() { return throwIfDisallowedDynamic; }, throwToInterruptStaticGeneration: function() { return throwToInterruptStaticGeneration; }, trackAllowedDynamicAccess: function() { return trackAllowedDynamicAccess; }, trackDynamicDataInDynamicRender: function() { return trackDynamicDataInDynamicRender; }, trackSynchronousPlatformIOAccessInDev: function() { return trackSynchronousPlatformIOAccessInDev; }, useDynamicRouteParams: function() { return useDynamicRouteParams; }, useDynamicSearchParams: function() { return useDynamicSearchParams; } }); const _react = /*#__PURE__*/ _interop_require_default(__turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)")); const _hooksservercontext = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/hooks-server-context.js [app-ssr] (ecmascript)"); const _staticgenerationbailout = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/static-generation-bailout.js [app-ssr] (ecmascript)"); const _workunitasyncstorageexternal = __turbopack_context__.r("[externals]/next/dist/server/app-render/work-unit-async-storage.external.js [external] (next/dist/server/app-render/work-unit-async-storage.external.js, cjs)"); const _workasyncstorageexternal = __turbopack_context__.r("[externals]/next/dist/server/app-render/work-async-storage.external.js [external] (next/dist/server/app-render/work-async-storage.external.js, cjs)"); const _dynamicrenderingutils = __turbopack_context__.r("[project]/node_modules/next/dist/server/dynamic-rendering-utils.js [app-ssr] (ecmascript)"); const _boundaryconstants = __turbopack_context__.r("[project]/node_modules/next/dist/lib/framework/boundary-constants.js [app-ssr] (ecmascript)"); const _scheduler = __turbopack_context__.r("[project]/node_modules/next/dist/lib/scheduler.js [app-ssr] (ecmascript)"); const _bailouttocsr = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js [app-ssr] (ecmascript)"); const _invarianterror = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/invariant-error.js [app-ssr] (ecmascript)"); const _stagedrendering = __turbopack_context__.r("[project]/node_modules/next/dist/server/app-render/staged-rendering.js [app-ssr] (ecmascript)"); function _interop_require_default(obj) { return obj && obj.__esModule ? obj : { default: obj }; } const hasPostpone = typeof _react.default.unstable_postpone === 'function'; function createDynamicTrackingState(isDebugDynamicAccesses) { return { isDebugDynamicAccesses, dynamicAccesses: [], syncDynamicErrorWithStack: null }; } function createDynamicValidationState() { return { hasSuspenseAboveBody: false, hasDynamicMetadata: false, hasDynamicViewport: false, hasAllowedDynamic: false, dynamicErrors: [] }; } function getFirstDynamicReason(trackingState) { var _trackingState_dynamicAccesses_; return (_trackingState_dynamicAccesses_ = trackingState.dynamicAccesses[0]) == null ? void 0 : _trackingState_dynamicAccesses_.expression; } function markCurrentScopeAsDynamic(store, workUnitStore, expression) { if (workUnitStore) { switch(workUnitStore.type){ case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return; case 'private-cache': // A private cache scope is already dynamic by definition. return; case 'prerender-legacy': case 'prerender-ppr': case 'request': break; default: workUnitStore; } } // If we're forcing dynamic rendering or we're forcing static rendering, we // don't need to do anything here because the entire page is already dynamic // or it's static and it should not throw or postpone here. if (store.forceDynamic || store.forceStatic) return; if (store.dynamicShouldError) { throw Object.defineProperty(new _staticgenerationbailout.StaticGenBailoutError(`Route ${store.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E553", enumerable: false, configurable: true }); } if (workUnitStore) { switch(workUnitStore.type){ case 'prerender-ppr': return postponeWithTracking(store.route, expression, workUnitStore.dynamicTracking); case 'prerender-legacy': workUnitStore.revalidate = 0; // We aren't prerendering, but we are generating a static page. We need // to bail out of static generation. const err = Object.defineProperty(new _hooksservercontext.DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { value: "E550", enumerable: false, configurable: true }); store.dynamicUsageDescription = expression; store.dynamicUsageStack = err.stack; throw err; case 'request': if ("TURBOPACK compile-time truthy", 1) { workUnitStore.usedDynamic = true; } break; default: workUnitStore; } } } function throwToInterruptStaticGeneration(expression, store, prerenderStore) { // We aren't prerendering but we are generating a static page. We need to bail out of static generation const err = Object.defineProperty(new _hooksservercontext.DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { value: "E558", enumerable: false, configurable: true }); prerenderStore.revalidate = 0; store.dynamicUsageDescription = expression; store.dynamicUsageStack = err.stack; throw err; } function trackDynamicDataInDynamicRender(workUnitStore) { switch(workUnitStore.type){ case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return; case 'private-cache': // A private cache scope is already dynamic by definition. return; case 'prerender': case 'prerender-runtime': case 'prerender-legacy': case 'prerender-ppr': case 'prerender-client': break; case 'request': if ("TURBOPACK compile-time truthy", 1) { workUnitStore.usedDynamic = true; } break; default: workUnitStore; } } function abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) { const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`; const error = createPrerenderInterruptedError(reason); prerenderStore.controller.abort(error); const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } } function abortOnSynchronousPlatformIOAccess(route, expression, errorWithStack, prerenderStore) { const dynamicTracking = prerenderStore.dynamicTracking; abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack; } } } function trackSynchronousPlatformIOAccessInDev(requestStore) { // We don't actually have a controller to abort but we do the semantic equivalent by // advancing the request store out of the prerender stage if (requestStore.stagedRendering) { // TODO: error for sync IO in the runtime stage // (which is not currently covered by the validation render in `spawnDynamicValidationInDev`) requestStore.stagedRendering.advanceStage(_stagedrendering.RenderStage.Dynamic); } } function abortAndThrowOnSynchronousRequestDataAccess(route, expression, errorWithStack, prerenderStore) { const prerenderSignal = prerenderStore.controller.signal; if (prerenderSignal.aborted === false) { // TODO it would be better to move this aborted check into the callsite so we can avoid making // the error object when it isn't relevant to the aborting of the prerender however // since we need the throw semantics regardless of whether we abort it is easier to land // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer // to ideal implementation abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack; } } } throw createPrerenderInterruptedError(`Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`); } function Postpone({ reason, route }) { const prerenderStore = _workunitasyncstorageexternal.workUnitAsyncStorage.getStore(); const dynamicTracking = prerenderStore && prerenderStore.type === 'prerender-ppr' ? prerenderStore.dynamicTracking : null; postponeWithTracking(route, reason, dynamicTracking); } function postponeWithTracking(route, expression, dynamicTracking) { assertPostpone(); if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } _react.default.unstable_postpone(createPostponeReason(route, expression)); } function createPostponeReason(route, expression) { return `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` + `React throws this special object to indicate where. It should not be caught by ` + `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`; } function isDynamicPostpone(err) { if (typeof err === 'object' && err !== null && typeof err.message === 'string') { return isDynamicPostponeReason(err.message); } return false; } function isDynamicPostponeReason(reason) { return reason.includes('needs to bail out of prerendering at this point because it used') && reason.includes('Learn more: https://nextjs.org/docs/messages/ppr-caught-error'); } if (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) { throw Object.defineProperty(new Error('Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'), "__NEXT_ERROR_CODE", { value: "E296", enumerable: false, configurable: true }); } const NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED'; function createPrerenderInterruptedError(message) { const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.digest = NEXT_PRERENDER_INTERRUPTED; return error; } function isPrerenderInterruptedError(error) { return typeof error === 'object' && error !== null && error.digest === NEXT_PRERENDER_INTERRUPTED && 'name' in error && 'message' in error && error instanceof Error; } function accessedDynamicData(dynamicAccesses) { return dynamicAccesses.length > 0; } function consumeDynamicAccess(serverDynamic, clientDynamic) { // We mutate because we only call this once we are no longer writing // to the dynamicTrackingState and it's more efficient than creating a new // array. serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses); return serverDynamic.dynamicAccesses; } function formatDynamicAPIAccesses(dynamicAccesses) { return dynamicAccesses.filter((access)=>typeof access.stack === 'string' && access.stack.length > 0).map(({ expression, stack })=>{ stack = stack.split('\n') // Remove the "Error: " prefix from the first line of the stack trace as // well as the first 4 lines of the stack trace which is the distance // from the user code and the `new Error().stack` call. .slice(4).filter((line)=>{ // Exclude Next.js internals from the stack trace. if (line.includes('node_modules/next/')) { return false; } // Exclude anonymous functions from the stack trace. if (line.includes(' ()')) { return false; } // Exclude Node.js internals from the stack trace. if (line.includes(' (node:')) { return false; } return true; }).join('\n'); return `Dynamic API Usage Debug - ${expression}:\n${stack}`; }); } function assertPostpone() { if (!hasPostpone) { throw Object.defineProperty(new Error(`Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`), "__NEXT_ERROR_CODE", { value: "E224", enumerable: false, configurable: true }); } } function createRenderInBrowserAbortSignal() { const controller = new AbortController(); controller.abort(Object.defineProperty(new _bailouttocsr.BailoutToCSRError('Render in Browser'), "__NEXT_ERROR_CODE", { value: "E721", enumerable: false, configurable: true })); return controller.signal; } function createHangingInputAbortSignal(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-runtime': const controller = new AbortController(); if (workUnitStore.cacheSignal) { // If we have a cacheSignal it means we're in a prospective render. If // the input we're waiting on is coming from another cache, we do want // to wait for it so that we can resolve this cache entry too. workUnitStore.cacheSignal.inputReady().then(()=>{ controller.abort(); }); } else { // Otherwise we're in the final render and we should already have all // our caches filled. // If the prerender uses stages, we have wait until the runtime stage, // at which point all runtime inputs will be resolved. // (otherwise, a runtime prerender might consider `cookies()` hanging // even though they'd resolve in the next task.) // // We might still be waiting on some microtasks so we // wait one tick before giving up. When we give up, we still want to // render the content of this cache as deeply as we can so that we can // suspend as deeply as possible in the tree or not at all if we don't // end up waiting for the input. const runtimeStagePromise = (0, _workunitasyncstorageexternal.getRuntimeStagePromise)(workUnitStore); if (runtimeStagePromise) { runtimeStagePromise.then(()=>(0, _scheduler.scheduleOnNextTick)(()=>controller.abort())); } else { (0, _scheduler.scheduleOnNextTick)(()=>controller.abort()); } } return controller.signal; case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return undefined; default: workUnitStore; } } function annotateDynamicAccess(expression, prerenderStore) { const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } } function useDynamicRouteParams(expression) { const workStore = _workasyncstorageexternal.workAsyncStorage.getStore(); const workUnitStore = _workunitasyncstorageexternal.workUnitAsyncStorage.getStore(); if (workStore && workUnitStore) { switch(workUnitStore.type){ case 'prerender-client': case 'prerender': { const fallbackParams = workUnitStore.fallbackRouteParams; if (fallbackParams && fallbackParams.size > 0) { // We are in a prerender with cacheComponents semantics. We are going to // hang here and never resolve. This will cause the currently // rendering component to effectively be a dynamic hole. _react.default.use((0, _dynamicrenderingutils.makeHangingPromise)(workUnitStore.renderSignal, workStore.route, expression)); } break; } case 'prerender-ppr': { const fallbackParams = workUnitStore.fallbackRouteParams; if (fallbackParams && fallbackParams.size > 0) { return postponeWithTracking(workStore.route, expression, workUnitStore.dynamicTracking); } break; } case 'prerender-runtime': throw Object.defineProperty(new _invarianterror.InvariantError(`\`${expression}\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E771", enumerable: false, configurable: true }); case 'cache': case 'private-cache': throw Object.defineProperty(new _invarianterror.InvariantError(`\`${expression}\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E745", enumerable: false, configurable: true }); case 'prerender-legacy': case 'request': case 'unstable-cache': break; default: workUnitStore; } } } function useDynamicSearchParams(expression) { const workStore = _workasyncstorageexternal.workAsyncStorage.getStore(); const workUnitStore = _workunitasyncstorageexternal.workUnitAsyncStorage.getStore(); if (!workStore) { // We assume pages router context and just return return; } if (!workUnitStore) { (0, _workunitasyncstorageexternal.throwForMissingRequestStore)(expression); } switch(workUnitStore.type){ case 'prerender-client': { _react.default.use((0, _dynamicrenderingutils.makeHangingPromise)(workUnitStore.renderSignal, workStore.route, expression)); break; } case 'prerender-legacy': case 'prerender-ppr': { if (workStore.forceStatic) { return; } throw Object.defineProperty(new _bailouttocsr.BailoutToCSRError(expression), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-runtime': throw Object.defineProperty(new _invarianterror.InvariantError(`\`${expression}\` was called from a Server Component. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E795", enumerable: false, configurable: true }); case 'cache': case 'unstable-cache': case 'private-cache': throw Object.defineProperty(new _invarianterror.InvariantError(`\`${expression}\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E745", enumerable: false, configurable: true }); case 'request': return; default: workUnitStore; } } const hasSuspenseRegex = /\n\s+at Suspense \(\)/; // Common implicit body tags that React will treat as body when placed directly in html const bodyAndImplicitTags = 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6'; // Detects when RootLayoutBoundary (our framework marker component) appears // after Suspense in the component stack, indicating the root layout is wrapped // within a Suspense boundary. Ensures no body/html/implicit-body components are in between. // // Example matches: // at Suspense () // at __next_root_layout_boundary__ () // // Or with other components in between (but not body/html/implicit-body): // at Suspense () // at SomeComponent () // at __next_root_layout_boundary__ () const hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(`\\n\\s+at Suspense \\(\\)(?:(?!\\n\\s+at (?:${bodyAndImplicitTags}) \\(\\))[\\s\\S])*?\\n\\s+at ${_boundaryconstants.ROOT_LAYOUT_BOUNDARY_NAME} \\([^\\n]*\\)`); const hasMetadataRegex = new RegExp(`\\n\\s+at ${_boundaryconstants.METADATA_BOUNDARY_NAME}[\\n\\s]`); const hasViewportRegex = new RegExp(`\\n\\s+at ${_boundaryconstants.VIEWPORT_BOUNDARY_NAME}[\\n\\s]`); const hasOutletRegex = new RegExp(`\\n\\s+at ${_boundaryconstants.OUTLET_BOUNDARY_NAME}[\\n\\s]`); function trackAllowedDynamicAccess(workStore, componentStack, dynamicValidation, clientDynamic) { if (hasOutletRegex.test(componentStack)) { // We don't need to track that this is dynamic. It is only so when something else is also dynamic. return; } else if (hasMetadataRegex.test(componentStack)) { dynamicValidation.hasDynamicMetadata = true; return; } else if (hasViewportRegex.test(componentStack)) { dynamicValidation.hasDynamicViewport = true; return; } else if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) { // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule. // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering. dynamicValidation.hasAllowedDynamic = true; dynamicValidation.hasSuspenseAboveBody = true; return; } else if (hasSuspenseRegex.test(componentStack)) { // this error had a Suspense boundary above it so we don't need to report it as a source // of disallowed dynamicValidation.hasAllowedDynamic = true; return; } else if (clientDynamic.syncDynamicErrorWithStack) { // This task was the task that called the sync error. dynamicValidation.dynamicErrors.push(clientDynamic.syncDynamicErrorWithStack); return; } else { const message = `Route "${workStore.route}": Uncached data was accessed outside of ` + '. This delays the entire page from rendering, resulting in a ' + 'slow user experience. Learn more: ' + 'https://nextjs.org/docs/messages/blocking-route'; const error = createErrorWithComponentOrOwnerStack(message, componentStack); dynamicValidation.dynamicErrors.push(error); return; } } /** * In dev mode, we prefer using the owner stack, otherwise the provided * component stack is used. */ function createErrorWithComponentOrOwnerStack(message, componentStack) { const ownerStack = ("TURBOPACK compile-time value", "development") !== 'production' && _react.default.captureOwnerStack ? _react.default.captureOwnerStack() : null; const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.stack = error.name + ': ' + message + (ownerStack ?? componentStack); return error; } var PreludeState = /*#__PURE__*/ function(PreludeState) { PreludeState[PreludeState["Full"] = 0] = "Full"; PreludeState[PreludeState["Empty"] = 1] = "Empty"; PreludeState[PreludeState["Errored"] = 2] = "Errored"; return PreludeState; }({}); function logDisallowedDynamicError(workStore, error) { console.error(error); if (!workStore.dev) { if (workStore.hasReadableErrorStacks) { console.error(`To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error.`); } else { console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following: - Start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error. - Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`); } } } function throwIfDisallowedDynamic(workStore, prelude, dynamicValidation, serverDynamic) { if (serverDynamic.syncDynamicErrorWithStack) { logDisallowedDynamicError(workStore, serverDynamic.syncDynamicErrorWithStack); throw new _staticgenerationbailout.StaticGenBailoutError(); } if (prelude !== 0) { if (dynamicValidation.hasSuspenseAboveBody) { // This route has opted into allowing fully dynamic rendering // by including a Suspense boundary above the body. In this case // a lack of a shell is not considered disallowed so we simply return return; } // We didn't have any sync bailouts but there may be user code which // blocked the root. We would have captured these during the prerender // and can log them here and then terminate the build/validating render const dynamicErrors = dynamicValidation.dynamicErrors; if (dynamicErrors.length > 0) { for(let i = 0; i < dynamicErrors.length; i++){ logDisallowedDynamicError(workStore, dynamicErrors[i]); } throw new _staticgenerationbailout.StaticGenBailoutError(); } // If we got this far then the only other thing that could be blocking // the root is dynamic Viewport. If this is dynamic then // you need to opt into that by adding a Suspense boundary above the body // to indicate your are ok with fully dynamic rendering. if (dynamicValidation.hasDynamicViewport) { console.error(`Route "${workStore.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`); throw new _staticgenerationbailout.StaticGenBailoutError(); } if (prelude === 1) { // If we ever get this far then we messed up the tracking of invalid dynamic. // We still adhere to the constraint that you must produce a shell but invite the // user to report this as a bug in Next.js. console.error(`Route "${workStore.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`); throw new _staticgenerationbailout.StaticGenBailoutError(); } } else { if (dynamicValidation.hasAllowedDynamic === false && dynamicValidation.hasDynamicMetadata) { console.error(`Route "${workStore.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`); throw new _staticgenerationbailout.StaticGenBailoutError(); } } } function delayUntilRuntimeStage(prerenderStore, result) { if (prerenderStore.runtimeStagePromise) { return prerenderStore.runtimeStagePromise.then(()=>result); } return result; } //# sourceMappingURL=dynamic-rendering.js.map }), "[project]/node_modules/next/dist/client/components/unstable-rethrow.server.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "unstable_rethrow", { enumerable: true, get: function() { return unstable_rethrow; } }); const _dynamicrenderingutils = __turbopack_context__.r("[project]/node_modules/next/dist/server/dynamic-rendering-utils.js [app-ssr] (ecmascript)"); const _ispostpone = __turbopack_context__.r("[project]/node_modules/next/dist/server/lib/router-utils/is-postpone.js [app-ssr] (ecmascript)"); const _bailouttocsr = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js [app-ssr] (ecmascript)"); const _isnextroutererror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/is-next-router-error.js [app-ssr] (ecmascript)"); const _dynamicrendering = __turbopack_context__.r("[project]/node_modules/next/dist/server/app-render/dynamic-rendering.js [app-ssr] (ecmascript)"); const _hooksservercontext = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/hooks-server-context.js [app-ssr] (ecmascript)"); function unstable_rethrow(error) { if ((0, _isnextroutererror.isNextRouterError)(error) || (0, _bailouttocsr.isBailoutToCSRError)(error) || (0, _hooksservercontext.isDynamicServerError)(error) || (0, _dynamicrendering.isDynamicPostpone)(error) || (0, _ispostpone.isPostpone)(error) || (0, _dynamicrenderingutils.isHangingPromiseRejectionError)(error) || (0, _dynamicrendering.isPrerenderInterruptedError)(error)) { throw error; } if (error instanceof Error && 'cause' in error) { unstable_rethrow(error.cause); } } 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=unstable-rethrow.server.js.map }), "[project]/node_modules/next/dist/client/components/unstable-rethrow.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; /** * This function should be used to rethrow internal Next.js errors so that they can be handled by the framework. * When wrapping an API that uses errors to interrupt control flow, you should use this function before you do any error handling. * This function will rethrow the error if it is a Next.js error so it can be handled, otherwise it will do nothing. * * Read more: [Next.js Docs: `unstable_rethrow`](https://nextjs.org/docs/app/api-reference/functions/unstable_rethrow) */ Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "unstable_rethrow", { enumerable: true, get: function() { return unstable_rethrow; } }); const unstable_rethrow = ("TURBOPACK compile-time truthy", 1) ? __turbopack_context__.r("[project]/node_modules/next/dist/client/components/unstable-rethrow.server.js [app-ssr] (ecmascript)").unstable_rethrow : "TURBOPACK unreachable"; 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=unstable-rethrow.js.map }), "[project]/node_modules/next/dist/client/components/navigation.react-server.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { ReadonlyURLSearchParams: null, RedirectType: null, forbidden: null, notFound: null, permanentRedirect: null, redirect: null, unauthorized: null, unstable_isUnrecognizedActionError: null, unstable_rethrow: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { ReadonlyURLSearchParams: function() { return _readonlyurlsearchparams.ReadonlyURLSearchParams; }, RedirectType: function() { return _redirecterror.RedirectType; }, forbidden: function() { return _forbidden.forbidden; }, notFound: function() { return _notfound.notFound; }, permanentRedirect: function() { return _redirect.permanentRedirect; }, redirect: function() { return _redirect.redirect; }, unauthorized: function() { return _unauthorized.unauthorized; }, unstable_isUnrecognizedActionError: function() { return unstable_isUnrecognizedActionError; }, unstable_rethrow: function() { return _unstablerethrow.unstable_rethrow; } }); const _readonlyurlsearchparams = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/readonly-url-search-params.js [app-ssr] (ecmascript)"); const _redirect = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/redirect.js [app-ssr] (ecmascript)"); const _redirecterror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/redirect-error.js [app-ssr] (ecmascript)"); const _notfound = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/not-found.js [app-ssr] (ecmascript)"); const _forbidden = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/forbidden.js [app-ssr] (ecmascript)"); const _unauthorized = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/unauthorized.js [app-ssr] (ecmascript)"); const _unstablerethrow = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/unstable-rethrow.js [app-ssr] (ecmascript)"); function unstable_isUnrecognizedActionError() { throw Object.defineProperty(new Error('`unstable_isUnrecognizedActionError` can only be used on the client.'), "__NEXT_ERROR_CODE", { value: "E776", enumerable: false, configurable: true }); } 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=navigation.react-server.js.map }), "[project]/node_modules/next/dist/client/components/navigation.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { ReadonlyURLSearchParams: null, RedirectType: null, ServerInsertedHTMLContext: null, forbidden: null, notFound: null, permanentRedirect: null, redirect: null, unauthorized: null, unstable_isUnrecognizedActionError: null, unstable_rethrow: null, useParams: null, usePathname: null, useRouter: null, useSearchParams: null, useSelectedLayoutSegment: null, useSelectedLayoutSegments: null, useServerInsertedHTML: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { ReadonlyURLSearchParams: function() { return _navigationreactserver.ReadonlyURLSearchParams; }, RedirectType: function() { return _navigationreactserver.RedirectType; }, ServerInsertedHTMLContext: function() { return _serverinsertedhtmlsharedruntime.ServerInsertedHTMLContext; }, forbidden: function() { return _navigationreactserver.forbidden; }, notFound: function() { return _navigationreactserver.notFound; }, permanentRedirect: function() { return _navigationreactserver.permanentRedirect; }, redirect: function() { return _navigationreactserver.redirect; }, unauthorized: function() { return _navigationreactserver.unauthorized; }, unstable_isUnrecognizedActionError: function() { return _unrecognizedactionerror.unstable_isUnrecognizedActionError; }, unstable_rethrow: function() { return _navigationreactserver.unstable_rethrow; }, useParams: function() { return useParams; }, usePathname: function() { return usePathname; }, useRouter: function() { return useRouter; }, useSearchParams: function() { return useSearchParams; }, useSelectedLayoutSegment: function() { return useSelectedLayoutSegment; }, useSelectedLayoutSegments: function() { return useSelectedLayoutSegments; }, useServerInsertedHTML: function() { return _serverinsertedhtmlsharedruntime.useServerInsertedHTML; } }); const _interop_require_wildcard = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs [app-ssr] (ecmascript)"); const _react = /*#__PURE__*/ _interop_require_wildcard._(__turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)")); const _approutercontextsharedruntime = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/app-router-context.js [app-ssr] (ecmascript)"); const _hooksclientcontextsharedruntime = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/hooks-client-context.js [app-ssr] (ecmascript)"); const _segment = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/segment.js [app-ssr] (ecmascript)"); const _readonlyurlsearchparams = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/readonly-url-search-params.js [app-ssr] (ecmascript)"); const _serverinsertedhtmlsharedruntime = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/server-inserted-html.js [app-ssr] (ecmascript)"); const _unrecognizedactionerror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/unrecognized-action-error.js [app-ssr] (ecmascript)"); const _navigationreactserver = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/navigation.react-server.js [app-ssr] (ecmascript)"); const useDynamicRouteParams = ("TURBOPACK compile-time truthy", 1) ? __turbopack_context__.r("[project]/node_modules/next/dist/server/app-render/dynamic-rendering.js [app-ssr] (ecmascript)").useDynamicRouteParams : "TURBOPACK unreachable"; const useDynamicSearchParams = ("TURBOPACK compile-time truthy", 1) ? __turbopack_context__.r("[project]/node_modules/next/dist/server/app-render/dynamic-rendering.js [app-ssr] (ecmascript)").useDynamicSearchParams : "TURBOPACK unreachable"; function useSearchParams() { useDynamicSearchParams?.('useSearchParams()'); const searchParams = (0, _react.useContext)(_hooksclientcontextsharedruntime.SearchParamsContext); // In the case where this is `null`, the compat types added in // `next-env.d.ts` will add a new overload that changes the return type to // include `null`. const readonlySearchParams = (0, _react.useMemo)(()=>{ if (!searchParams) { // When the router is not ready in pages, we won't have the search params // available. return null; } return new _readonlyurlsearchparams.ReadonlyURLSearchParams(searchParams); }, [ searchParams ]); // Instrument with Suspense DevTools (dev-only) if (("TURBOPACK compile-time value", "development") !== 'production' && 'use' in _react.default) { const navigationPromises = (0, _react.use)(_hooksclientcontextsharedruntime.NavigationPromisesContext); if (navigationPromises) { return (0, _react.use)(navigationPromises.searchParams); } } return readonlySearchParams; } function usePathname() { useDynamicRouteParams?.('usePathname()'); // In the case where this is `null`, the compat types added in `next-env.d.ts` // will add a new overload that changes the return type to include `null`. const pathname = (0, _react.useContext)(_hooksclientcontextsharedruntime.PathnameContext); // Instrument with Suspense DevTools (dev-only) if (("TURBOPACK compile-time value", "development") !== 'production' && 'use' in _react.default) { const navigationPromises = (0, _react.use)(_hooksclientcontextsharedruntime.NavigationPromisesContext); if (navigationPromises) { return (0, _react.use)(navigationPromises.pathname); } } return pathname; } function useRouter() { const router = (0, _react.useContext)(_approutercontextsharedruntime.AppRouterContext); if (router === null) { throw Object.defineProperty(new Error('invariant expected app router to be mounted'), "__NEXT_ERROR_CODE", { value: "E238", enumerable: false, configurable: true }); } return router; } function useParams() { useDynamicRouteParams?.('useParams()'); const params = (0, _react.useContext)(_hooksclientcontextsharedruntime.PathParamsContext); // Instrument with Suspense DevTools (dev-only) if (("TURBOPACK compile-time value", "development") !== 'production' && 'use' in _react.default) { const navigationPromises = (0, _react.use)(_hooksclientcontextsharedruntime.NavigationPromisesContext); if (navigationPromises) { return (0, _react.use)(navigationPromises.params); } } return params; } function useSelectedLayoutSegments(parallelRouteKey = 'children') { useDynamicRouteParams?.('useSelectedLayoutSegments()'); const context = (0, _react.useContext)(_approutercontextsharedruntime.LayoutRouterContext); // @ts-expect-error This only happens in `pages`. Type is overwritten in navigation.d.ts if (!context) return null; // Instrument with Suspense DevTools (dev-only) if (("TURBOPACK compile-time value", "development") !== 'production' && 'use' in _react.default) { const navigationPromises = (0, _react.use)(_hooksclientcontextsharedruntime.NavigationPromisesContext); if (navigationPromises) { const promise = navigationPromises.selectedLayoutSegmentsPromises?.get(parallelRouteKey); if (promise) { // We should always have a promise here, but if we don't, it's not worth erroring over. // We just won't be able to instrument it, but can still provide the value. return (0, _react.use)(promise); } } } return (0, _segment.getSelectedLayoutSegmentPath)(context.parentTree, parallelRouteKey); } function useSelectedLayoutSegment(parallelRouteKey = 'children') { useDynamicRouteParams?.('useSelectedLayoutSegment()'); const navigationPromises = (0, _react.useContext)(_hooksclientcontextsharedruntime.NavigationPromisesContext); const selectedLayoutSegments = useSelectedLayoutSegments(parallelRouteKey); // Instrument with Suspense DevTools (dev-only) if (("TURBOPACK compile-time value", "development") !== 'production' && navigationPromises && 'use' in _react.default) { const promise = navigationPromises.selectedLayoutSegmentPromises?.get(parallelRouteKey); if (promise) { // We should always have a promise here, but if we don't, it's not worth erroring over. // We just won't be able to instrument it, but can still provide the value. return (0, _react.use)(promise); } } return (0, _segment.computeSelectedLayoutSegment)(selectedLayoutSegments, parallelRouteKey); } 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=navigation.js.map }), "[project]/node_modules/next/navigation.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { module.exports = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/navigation.js [app-ssr] (ecmascript)"); }), "[project]/node_modules/@vercel/analytics/dist/next/index.mjs [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "Analytics", ()=>Analytics2 ]); // src/nextjs/index.tsx var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"); // src/nextjs/utils.ts var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$navigation$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/navigation.js [app-ssr] (ecmascript)"); "use client"; ; ; // package.json var name = "@vercel/analytics"; var version = "1.6.1"; // src/queue.ts var initQueue = ()=>{ if (window.va) return; window.va = function a(...params) { (window.vaq = window.vaq || []).push(params); }; }; // src/utils.ts function isBrowser() { return ("TURBOPACK compile-time value", "undefined") !== "undefined"; } function detectEnvironment() { try { const env = ("TURBOPACK compile-time value", "development"); if ("TURBOPACK compile-time truthy", 1) { return "development"; } } catch (e) {} return "production"; } function setMode(mode = "auto") { if (mode === "auto") { window.vam = detectEnvironment(); return; } window.vam = mode; } function getMode() { const mode = isBrowser() ? "TURBOPACK unreachable" : detectEnvironment(); return mode || "production"; } function isDevelopment() { return getMode() === "development"; } function computeRoute(pathname, pathParams) { if (!pathname || !pathParams) { return pathname; } let result = pathname; try { const entries = Object.entries(pathParams); for (const [key, value] of entries){ if (!Array.isArray(value)) { const matcher = turnValueToRegExp(value); if (matcher.test(result)) { result = result.replace(matcher, `/[${key}]`); } } } for (const [key, value] of entries){ if (Array.isArray(value)) { const matcher = turnValueToRegExp(value.join("/")); if (matcher.test(result)) { result = result.replace(matcher, `/[...${key}]`); } } } return result; } catch (e) { return pathname; } } function turnValueToRegExp(value) { return new RegExp(`/${escapeRegExp(value)}(?=[/?#]|$)`); } function escapeRegExp(string) { return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); } function getScriptSrc(props) { if (props.scriptSrc) { return props.scriptSrc; } if (isDevelopment()) { return "https://va.vercel-scripts.com/v1/script.debug.js"; } if (props.basePath) { return `${props.basePath}/insights/script.js`; } return "/_vercel/insights/script.js"; } // src/generic.ts function inject(props = { debug: true }) { var _a; if (!isBrowser()) return; //TURBOPACK unreachable ; const src = undefined; const script = undefined; } function pageview({ route, path }) { var _a; (_a = window.va) == null ? void 0 : _a.call(window, "pageview", { route, path }); } // src/react/utils.ts function getBasePath() { if (typeof process === "undefined" || typeof process.env === "undefined") { return void 0; } return process.env.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH; } // src/react/index.tsx function Analytics(props) { (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useEffect"])(()=>{ var _a; if (props.beforeSend) { (_a = window.va) == null ? void 0 : _a.call(window, "beforeSend", props.beforeSend); } }, [ props.beforeSend ]); (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useEffect"])(()=>{ inject({ framework: props.framework || "react", basePath: props.basePath ?? getBasePath(), ...props.route !== void 0 && { disableAutoTrack: true }, ...props }); }, []); (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useEffect"])(()=>{ if (props.route && props.path) { pageview({ route: props.route, path: props.path }); } }, [ props.route, props.path ]); return null; } ; var useRoute = ()=>{ const params = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$navigation$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useParams"])(); const searchParams = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$navigation$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useSearchParams"])(); const path = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$navigation$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["usePathname"])(); if (!params) { return { route: null, path }; } const finalParams = Object.keys(params).length ? params : Object.fromEntries(searchParams.entries()); return { route: computeRoute(path, finalParams), path }; }; function getBasePath2() { if (typeof process === "undefined" || typeof process.env === "undefined") { return void 0; } return process.env.NEXT_PUBLIC_VERCEL_OBSERVABILITY_BASEPATH; } // src/nextjs/index.tsx function AnalyticsComponent(props) { const { route, path } = useRoute(); return /* @__PURE__ */ __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"].createElement(Analytics, { path, route, ...props, basePath: getBasePath2(), framework: "next" }); } function Analytics2(props) { return /* @__PURE__ */ __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"].createElement(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["Suspense"], { fallback: null }, /* @__PURE__ */ __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"].createElement(AnalyticsComponent, { ...props })); } ; //# sourceMappingURL=index.mjs.map }), "[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-dev-runtime.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; module.exports = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/module.compiled.js [app-ssr] (ecmascript)").vendored['react-ssr'].ReactJsxDevRuntime; //# sourceMappingURL=react-jsx-dev-runtime.js.map }), "[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; module.exports = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/module.compiled.js [app-ssr] (ecmascript)").vendored['react-ssr'].ReactJsxRuntime; //# sourceMappingURL=react-jsx-runtime.js.map }), "[project]/node_modules/next/dist/shared/lib/router/utils/querystring.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "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 }), "[project]/node_modules/next/dist/shared/lib/router/utils/format-url.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; // 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. 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 = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs [app-ssr] (ecmascript)"); const _querystring = /*#__PURE__*/ _interop_require_wildcard._(__turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/querystring.js [app-ssr] (ecmascript)")); 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 ("TURBOPACK compile-time truthy", 1) { 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 }), "[project]/node_modules/next/dist/client/use-merged-ref.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "useMergedRef", { enumerable: true, get: function() { return useMergedRef; } }); const _react = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"); function useMergedRef(refA, refB) { const cleanupA = (0, _react.useRef)(null); const cleanupB = (0, _react.useRef)(null); // NOTE: In theory, we could skip the wrapping if only one of the refs is non-null. // (this happens often if the user doesn't pass a ref to Link/Form/Image) // But this can cause us to leak a cleanup-ref into user code (previously via ``), // and the user might pass that ref into ref-merging library that doesn't support cleanup refs // (because it hasn't been updated for React 19) // which can then cause things to blow up, because a cleanup-returning ref gets called with `null`. // So in practice, it's safer to be defensive and always wrap the ref, even on React 19. return (0, _react.useCallback)((current)=>{ if (current === null) { const cleanupFnA = cleanupA.current; if (cleanupFnA) { cleanupA.current = null; cleanupFnA(); } const cleanupFnB = cleanupB.current; if (cleanupFnB) { cleanupB.current = null; cleanupFnB(); } } else { if (refA) { cleanupA.current = applyRef(refA, current); } if (refB) { cleanupB.current = applyRef(refB, current); } } }, [ refA, refB ]); } function applyRef(refA, current) { if (typeof refA === 'function') { const cleanup = refA(current); if (typeof cleanup === 'function') { return cleanup; } else { return ()=>refA(null); } } else { refA.current = current; return ()=>{ refA.current = null; }; } } 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=use-merged-ref.js.map }), "[project]/node_modules/next/dist/shared/lib/utils.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "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 ("TURBOPACK compile-time truthy", 1) { 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: "E394", 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: "E394", enumerable: false, configurable: true }); } if ("TURBOPACK compile-time truthy", 1) { 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 }), "[project]/node_modules/next/dist/shared/lib/router/utils/parse-path.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; /** * 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 */ 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 }), "[project]/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "addPathPrefix", { enumerable: true, get: function() { return addPathPrefix; } }); const _parsepath = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/parse-path.js [app-ssr] (ecmascript)"); 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 }), "[project]/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; /** * Removes the trailing slash for a given route or page path. Preserves the * root page. Examples: * - `/foo/bar/` -> `/foo/bar` * - `/foo/bar` -> `/foo/bar` * - `/` -> `/` */ 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 }), "[project]/node_modules/next/dist/client/normalize-trailing-slash.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "normalizePathTrailingSlash", { enumerable: true, get: function() { return normalizePathTrailingSlash; } }); const _removetrailingslash = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js [app-ssr] (ecmascript)"); const _parsepath = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/parse-path.js [app-ssr] (ecmascript)"); const normalizePathTrailingSlash = (path)=>{ if (!path.startsWith('/') || ("TURBOPACK compile-time value", void 0)) { return path; } const { pathname, query, hash } = (0, _parsepath.parsePath)(path); if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; return `${(0, _removetrailingslash.removeTrailingSlash)(pathname)}${query}${hash}`; }; 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=normalize-trailing-slash.js.map }), "[project]/node_modules/next/dist/client/add-base-path.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "addBasePath", { enumerable: true, get: function() { return addBasePath; } }); const _addpathprefix = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js [app-ssr] (ecmascript)"); const _normalizetrailingslash = __turbopack_context__.r("[project]/node_modules/next/dist/client/normalize-trailing-slash.js [app-ssr] (ecmascript)"); const basePath = ("TURBOPACK compile-time value", "") || ''; function addBasePath(path, required) { return (0, _normalizetrailingslash.normalizePathTrailingSlash)(("TURBOPACK compile-time falsy", 0) ? "TURBOPACK unreachable" : (0, _addpathprefix.addPathPrefix)(path, basePath)); } 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=add-base-path.js.map }), "[project]/node_modules/next/dist/shared/lib/utils/warn-once.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "warnOnce", { enumerable: true, get: function() { return warnOnce; } }); let warnOnce = (_)=>{}; if ("TURBOPACK compile-time truthy", 1) { const warnings = new Set(); warnOnce = (msg)=>{ if (!warnings.has(msg)) { console.warn(msg); } warnings.add(msg); }; } //# sourceMappingURL=warn-once.js.map }), "[project]/node_modules/next/dist/client/components/segment-cache/types.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; /** * Shared types and constants for the Segment Cache. */ Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { FetchStrategy: null, NavigationResultTag: null, PrefetchPriority: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { FetchStrategy: function() { return FetchStrategy; }, NavigationResultTag: function() { return NavigationResultTag; }, PrefetchPriority: function() { return PrefetchPriority; } }); var NavigationResultTag = /*#__PURE__*/ function(NavigationResultTag) { NavigationResultTag[NavigationResultTag["MPA"] = 0] = "MPA"; NavigationResultTag[NavigationResultTag["Success"] = 1] = "Success"; NavigationResultTag[NavigationResultTag["NoOp"] = 2] = "NoOp"; NavigationResultTag[NavigationResultTag["Async"] = 3] = "Async"; return NavigationResultTag; }({}); var PrefetchPriority = /*#__PURE__*/ function(PrefetchPriority) { /** * Assigned to the most recently hovered/touched link. Special network * bandwidth is reserved for this task only. There's only ever one Intent- * priority task at a time; when a new Intent task is scheduled, the previous * one is bumped down to Default. */ PrefetchPriority[PrefetchPriority["Intent"] = 2] = "Intent"; /** * The default priority for prefetch tasks. */ PrefetchPriority[PrefetchPriority["Default"] = 1] = "Default"; /** * Assigned to tasks when they spawn non-blocking background work, like * revalidating a partially cached entry to see if more data is available. */ PrefetchPriority[PrefetchPriority["Background"] = 0] = "Background"; return PrefetchPriority; }({}); var FetchStrategy = /*#__PURE__*/ function(FetchStrategy) { // Deliberately ordered so we can easily compare two segments // and determine if one segment is "more specific" than another // (i.e. if it's likely that it contains more data) FetchStrategy[FetchStrategy["LoadingBoundary"] = 0] = "LoadingBoundary"; FetchStrategy[FetchStrategy["PPR"] = 1] = "PPR"; FetchStrategy[FetchStrategy["PPRRuntime"] = 2] = "PPRRuntime"; FetchStrategy[FetchStrategy["Full"] = 3] = "Full"; return FetchStrategy; }({}); 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=types.js.map }), "[project]/node_modules/next/dist/client/components/segment-cache/cache-key.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; // TypeScript trick to simulate opaque types, like in Flow. Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "createCacheKey", { enumerable: true, get: function() { return createCacheKey; } }); function createCacheKey(originalHref, nextUrl) { const originalUrl = new URL(originalHref); const cacheKey = { pathname: originalUrl.pathname, search: originalUrl.search, nextUrl: nextUrl }; return cacheKey; } 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=cache-key.js.map }), "[project]/node_modules/next/dist/shared/lib/app-router-types.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; /** * 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. */ Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "HasLoadingBoundary", { enumerable: true, get: function() { return HasLoadingBoundary; } }); var HasLoadingBoundary = /*#__PURE__*/ function(HasLoadingBoundary) { // There is a loading boundary in this particular segment HasLoadingBoundary[HasLoadingBoundary["SegmentHasLoadingBoundary"] = 1] = "SegmentHasLoadingBoundary"; // There is a loading boundary somewhere in the subtree (but not in // this segment) HasLoadingBoundary[HasLoadingBoundary["SubtreeHasLoadingBoundary"] = 2] = "SubtreeHasLoadingBoundary"; // There is no loading boundary in this segment or any of its descendants HasLoadingBoundary[HasLoadingBoundary["SubtreeHasNoLoadingBoundary"] = 3] = "SubtreeHasNoLoadingBoundary"; return HasLoadingBoundary; }({}); //# sourceMappingURL=app-router-types.js.map }), "[project]/node_modules/next/dist/client/components/match-segments.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "matchSegment", { enumerable: true, get: function() { return matchSegment; } }); const matchSegment = (existingSegment, segment)=>{ // segment is either Array or string if (typeof existingSegment === 'string') { if (typeof segment === 'string') { // Common case: segment is just a string return existingSegment === segment; } return false; } if (typeof segment === 'string') { return false; } return existingSegment[0] === segment[0] && existingSegment[1] === segment[1]; }; 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=match-segments.js.map }), "[project]/node_modules/next/dist/client/components/app-router-headers.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { ACTION_HEADER: null, FLIGHT_HEADERS: null, NEXT_ACTION_NOT_FOUND_HEADER: null, NEXT_DID_POSTPONE_HEADER: null, NEXT_HMR_REFRESH_HASH_COOKIE: null, NEXT_HMR_REFRESH_HEADER: null, NEXT_HTML_REQUEST_ID_HEADER: null, NEXT_IS_PRERENDER_HEADER: null, NEXT_REQUEST_ID_HEADER: null, NEXT_REWRITTEN_PATH_HEADER: null, NEXT_REWRITTEN_QUERY_HEADER: null, NEXT_ROUTER_PREFETCH_HEADER: null, NEXT_ROUTER_SEGMENT_PREFETCH_HEADER: null, NEXT_ROUTER_STALE_TIME_HEADER: null, NEXT_ROUTER_STATE_TREE_HEADER: null, NEXT_RSC_UNION_QUERY: null, NEXT_URL: null, RSC_CONTENT_TYPE_HEADER: null, RSC_HEADER: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { ACTION_HEADER: function() { return ACTION_HEADER; }, FLIGHT_HEADERS: function() { return FLIGHT_HEADERS; }, NEXT_ACTION_NOT_FOUND_HEADER: function() { return NEXT_ACTION_NOT_FOUND_HEADER; }, NEXT_DID_POSTPONE_HEADER: function() { return NEXT_DID_POSTPONE_HEADER; }, NEXT_HMR_REFRESH_HASH_COOKIE: function() { return NEXT_HMR_REFRESH_HASH_COOKIE; }, NEXT_HMR_REFRESH_HEADER: function() { return NEXT_HMR_REFRESH_HEADER; }, NEXT_HTML_REQUEST_ID_HEADER: function() { return NEXT_HTML_REQUEST_ID_HEADER; }, NEXT_IS_PRERENDER_HEADER: function() { return NEXT_IS_PRERENDER_HEADER; }, NEXT_REQUEST_ID_HEADER: function() { return NEXT_REQUEST_ID_HEADER; }, NEXT_REWRITTEN_PATH_HEADER: function() { return NEXT_REWRITTEN_PATH_HEADER; }, NEXT_REWRITTEN_QUERY_HEADER: function() { return NEXT_REWRITTEN_QUERY_HEADER; }, NEXT_ROUTER_PREFETCH_HEADER: function() { return NEXT_ROUTER_PREFETCH_HEADER; }, NEXT_ROUTER_SEGMENT_PREFETCH_HEADER: function() { return NEXT_ROUTER_SEGMENT_PREFETCH_HEADER; }, NEXT_ROUTER_STALE_TIME_HEADER: function() { return NEXT_ROUTER_STALE_TIME_HEADER; }, NEXT_ROUTER_STATE_TREE_HEADER: function() { return NEXT_ROUTER_STATE_TREE_HEADER; }, NEXT_RSC_UNION_QUERY: function() { return NEXT_RSC_UNION_QUERY; }, NEXT_URL: function() { return NEXT_URL; }, RSC_CONTENT_TYPE_HEADER: function() { return RSC_CONTENT_TYPE_HEADER; }, RSC_HEADER: function() { return RSC_HEADER; } }); const RSC_HEADER = 'rsc'; const ACTION_HEADER = 'next-action'; const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree'; const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch'; const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch'; const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh'; const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__'; const NEXT_URL = 'next-url'; const RSC_CONTENT_TYPE_HEADER = 'text/x-component'; const FLIGHT_HEADERS = [ RSC_HEADER, NEXT_ROUTER_STATE_TREE_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_HMR_REFRESH_HEADER, NEXT_ROUTER_SEGMENT_PREFETCH_HEADER ]; const NEXT_RSC_UNION_QUERY = '_rsc'; const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time'; const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed'; const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path'; const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query'; const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender'; const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found'; const NEXT_REQUEST_ID_HEADER = 'x-nextjs-request-id'; const NEXT_HTML_REQUEST_ID_HEADER = 'x-nextjs-html-request-id'; 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=app-router-headers.js.map }), "[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-server-dom-turbopack-client.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; module.exports = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/module.compiled.js [app-ssr] (ecmascript)").vendored['react-ssr'].ReactServerDOMTurbopackClient; //# sourceMappingURL=react-server-dom-turbopack-client.js.map }), "[project]/node_modules/next/dist/client/components/router-reducer/router-reducer-types.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { ACTION_HMR_REFRESH: null, ACTION_NAVIGATE: null, ACTION_REFRESH: null, ACTION_RESTORE: null, ACTION_SERVER_ACTION: null, ACTION_SERVER_PATCH: null, PrefetchKind: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { ACTION_HMR_REFRESH: function() { return ACTION_HMR_REFRESH; }, ACTION_NAVIGATE: function() { return ACTION_NAVIGATE; }, ACTION_REFRESH: function() { return ACTION_REFRESH; }, ACTION_RESTORE: function() { return ACTION_RESTORE; }, ACTION_SERVER_ACTION: function() { return ACTION_SERVER_ACTION; }, ACTION_SERVER_PATCH: function() { return ACTION_SERVER_PATCH; }, PrefetchKind: function() { return PrefetchKind; } }); const ACTION_REFRESH = 'refresh'; const ACTION_NAVIGATE = 'navigate'; const ACTION_RESTORE = 'restore'; const ACTION_SERVER_PATCH = 'server-patch'; const ACTION_HMR_REFRESH = 'hmr-refresh'; const ACTION_SERVER_ACTION = 'server-action'; var PrefetchKind = /*#__PURE__*/ function(PrefetchKind) { PrefetchKind["AUTO"] = "auto"; PrefetchKind["FULL"] = "full"; PrefetchKind["TEMPORARY"] = "temporary"; return PrefetchKind; }({}); 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=router-reducer-types.js.map }), "[project]/node_modules/next/dist/shared/lib/is-thenable.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; /** * Check to see if a value is Thenable. * * @param promise the maybe-thenable value * @returns true if the value is thenable */ 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 }), "[project]/node_modules/next/dist/next-devtools/dev-overlay.shim.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { dispatcher: null, renderAppDevOverlay: null, renderPagesDevOverlay: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { dispatcher: function() { return dispatcher; }, renderAppDevOverlay: function() { return renderAppDevOverlay; }, renderPagesDevOverlay: function() { return renderPagesDevOverlay; } }); function renderAppDevOverlay() { throw Object.defineProperty(new Error("Next DevTools: Can't render in this environment. This is a bug in Next.js"), "__NEXT_ERROR_CODE", { value: "E697", enumerable: false, configurable: true }); } function renderPagesDevOverlay() { throw Object.defineProperty(new Error("Next DevTools: Can't render in this environment. This is a bug in Next.js"), "__NEXT_ERROR_CODE", { value: "E697", enumerable: false, configurable: true }); } const dispatcher = new Proxy({}, { get: (_, prop)=>{ return ()=>{ throw Object.defineProperty(new Error(`Next DevTools: Can't dispatch ${String(prop)} in this environment. This is a bug in Next.js`), "__NEXT_ERROR_CODE", { value: "E698", enumerable: false, configurable: true }); }; } }); 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=dev-overlay.shim.js.map }), "[project]/node_modules/next/dist/next-devtools/userspace/use-app-dev-rendering-indicator.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "useAppDevRenderingIndicator", { enumerable: true, get: function() { return useAppDevRenderingIndicator; } }); const _react = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"); const _nextdevtools = __turbopack_context__.r("[project]/node_modules/next/dist/next-devtools/dev-overlay.shim.js [app-ssr] (ecmascript)"); const useAppDevRenderingIndicator = ()=>{ const [isPending, startTransition] = (0, _react.useTransition)(); (0, _react.useEffect)(()=>{ if (isPending) { _nextdevtools.dispatcher.renderingIndicatorShow(); } else { _nextdevtools.dispatcher.renderingIndicatorHide(); } }, [ isPending ]); return startTransition; }; 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=use-app-dev-rendering-indicator.js.map }), "[project]/node_modules/next/dist/client/components/use-action-queue.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { dispatchAppRouterAction: null, useActionQueue: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { dispatchAppRouterAction: function() { return dispatchAppRouterAction; }, useActionQueue: function() { return useActionQueue; } }); const _interop_require_wildcard = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs [app-ssr] (ecmascript)"); const _react = /*#__PURE__*/ _interop_require_wildcard._(__turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)")); const _isthenable = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/is-thenable.js [app-ssr] (ecmascript)"); // The app router state lives outside of React, so we can import the dispatch // method directly wherever we need it, rather than passing it around via props // or context. let dispatch = null; function dispatchAppRouterAction(action) { if (dispatch === null) { throw Object.defineProperty(new Error('Internal Next.js error: Router action dispatched before initialization.'), "__NEXT_ERROR_CODE", { value: "E668", enumerable: false, configurable: true }); } dispatch(action); } const __DEV__ = ("TURBOPACK compile-time value", "development") !== 'production'; const promisesWithDebugInfo = ("TURBOPACK compile-time truthy", 1) ? new WeakMap() : "TURBOPACK unreachable"; function useActionQueue(actionQueue) { const [state, setState] = _react.default.useState(actionQueue.state); // Because of a known issue that requires to decode Flight streams inside the // render phase, we have to be a bit clever and assign the dispatch method to // a module-level variable upon initialization. The useState hook in this // module only exists to synchronize state that lives outside of React. // Ideally, what we'd do instead is pass the state as a prop to root.render; // this is conceptually how we're modeling the app router state, despite the // weird implementation details. if ("TURBOPACK compile-time truthy", 1) { const { useAppDevRenderingIndicator } = __turbopack_context__.r("[project]/node_modules/next/dist/next-devtools/userspace/use-app-dev-rendering-indicator.js [app-ssr] (ecmascript)"); // eslint-disable-next-line react-hooks/rules-of-hooks const appDevRenderingIndicator = useAppDevRenderingIndicator(); dispatch = (action)=>{ appDevRenderingIndicator(()=>{ actionQueue.dispatch(action, setState); }); }; } else //TURBOPACK unreachable ; // When navigating to a non-prefetched route, then App Router state will be // blocked until the server responds. We need to transfer the `_debugInfo` // from the underlying Flight response onto the top-level promise that is // passed to React (via `use`) so that the latency is accurately represented // in the React DevTools. const stateWithDebugInfo = (0, _react.useMemo)(()=>{ if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; if ((0, _isthenable.isThenable)(state)) { // useMemo can't be used to cache a Promise since the memoized value is thrown // away when we suspend. So we use a WeakMap to cache the Promise with debug info. let promiseWithDebugInfo = promisesWithDebugInfo.get(state); if (promiseWithDebugInfo === undefined) { const debugInfo = []; promiseWithDebugInfo = Promise.resolve(state).then((asyncState)=>{ if (asyncState.debugInfo !== null) { debugInfo.push(...asyncState.debugInfo); } return asyncState; }); promiseWithDebugInfo._debugInfo = debugInfo; promisesWithDebugInfo.set(state, promiseWithDebugInfo); } return promiseWithDebugInfo; } return state; }, [ state ]); return (0, _isthenable.isThenable)(stateWithDebugInfo) ? (0, _react.use)(stateWithDebugInfo) : stateWithDebugInfo; } 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=use-action-queue.js.map }), "[project]/node_modules/next/dist/client/app-call-server.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "callServer", { enumerable: true, get: function() { return callServer; } }); const _react = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"); const _routerreducertypes = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/router-reducer-types.js [app-ssr] (ecmascript)"); const _useactionqueue = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/use-action-queue.js [app-ssr] (ecmascript)"); async function callServer(actionId, actionArgs) { return new Promise((resolve, reject)=>{ (0, _react.startTransition)(()=>{ (0, _useactionqueue.dispatchAppRouterAction)({ type: _routerreducertypes.ACTION_SERVER_ACTION, actionId, actionArgs, resolve, reject }); }); }); } 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=app-call-server.js.map }), "[project]/node_modules/next/dist/client/app-find-source-map-url.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "findSourceMapURL", { enumerable: true, get: function() { return findSourceMapURL; } }); const basePath = ("TURBOPACK compile-time value", "") || ''; const pathname = `${basePath}/__nextjs_source-map`; const findSourceMapURL = ("TURBOPACK compile-time truthy", 1) ? function findSourceMapURL(filename) { if (filename === '') { return null; } if (filename.startsWith(document.location.origin) && filename.includes('/_next/static')) { // This is a request for a client chunk. This can only happen when // using Turbopack. In this case, since we control how those source // maps are generated, we can safely assume that the sourceMappingURL // is relative to the filename, with an added `.map` extension. The // browser can just request this file, and it gets served through the // normal dev server, without the need to route this through // the `/__nextjs_source-map` dev middleware. return `${filename}.map`; } const url = new URL(pathname, document.location.origin); url.searchParams.set('filename', filename); return url.href; } : "TURBOPACK unreachable"; 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=app-find-source-map-url.js.map }), "[project]/node_modules/next/dist/shared/lib/segment-cache/segment-value-encoding.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "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 = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/segment.js [app-ssr] (ecmascript)"); 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 = // 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 }), "[project]/node_modules/next/dist/client/route-params.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { doesStaticSegmentAppearInURL: null, getCacheKeyForDynamicParam: null, getParamValueFromCacheKey: null, getRenderedPathname: null, getRenderedSearch: null, parseDynamicParamFromURLPart: null, urlSearchParamsToParsedUrlQuery: null, urlToUrlWithoutFlightMarker: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { doesStaticSegmentAppearInURL: function() { return doesStaticSegmentAppearInURL; }, getCacheKeyForDynamicParam: function() { return getCacheKeyForDynamicParam; }, getParamValueFromCacheKey: function() { return getParamValueFromCacheKey; }, getRenderedPathname: function() { return getRenderedPathname; }, getRenderedSearch: function() { return getRenderedSearch; }, parseDynamicParamFromURLPart: function() { return parseDynamicParamFromURLPart; }, urlSearchParamsToParsedUrlQuery: function() { return urlSearchParamsToParsedUrlQuery; }, urlToUrlWithoutFlightMarker: function() { return urlToUrlWithoutFlightMarker; } }); const _segment = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/segment.js [app-ssr] (ecmascript)"); const _segmentvalueencoding = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/segment-cache/segment-value-encoding.js [app-ssr] (ecmascript)"); const _approuterheaders = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/app-router-headers.js [app-ssr] (ecmascript)"); function getRenderedSearch(response) { // If the server performed a rewrite, the search params used to render the // page will be different from the params in the request URL. In this case, // the response will include a header that gives the rewritten search query. const rewrittenQuery = response.headers.get(_approuterheaders.NEXT_REWRITTEN_QUERY_HEADER); if (rewrittenQuery !== null) { return rewrittenQuery === '' ? '' : '?' + rewrittenQuery; } // If the header is not present, there was no rewrite, so we use the search // query of the response URL. return urlToUrlWithoutFlightMarker(new URL(response.url)).search; } function getRenderedPathname(response) { // If the server performed a rewrite, the pathname used to render the // page will be different from the pathname in the request URL. In this case, // the response will include a header that gives the rewritten pathname. const rewrittenPath = response.headers.get(_approuterheaders.NEXT_REWRITTEN_PATH_HEADER); return rewrittenPath ?? urlToUrlWithoutFlightMarker(new URL(response.url)).pathname; } function parseDynamicParamFromURLPart(paramType, pathnameParts, partIndex) { // This needs to match the behavior in get-dynamic-param.ts. switch(paramType){ // Catchalls case 'c': { // Catchalls receive all the remaining URL parts. If there are no // remaining pathname parts, return an empty array. return partIndex < pathnameParts.length ? pathnameParts.slice(partIndex).map((s)=>encodeURIComponent(s)) : []; } // Catchall intercepted case 'ci(..)(..)': case 'ci(.)': case 'ci(..)': case 'ci(...)': { const prefix = paramType.length - 2; return partIndex < pathnameParts.length ? pathnameParts.slice(partIndex).map((s, i)=>{ if (i === 0) { return encodeURIComponent(s.slice(prefix)); } return encodeURIComponent(s); }) : []; } // Optional catchalls case 'oc': { // Optional catchalls receive all the remaining URL parts, unless this is // the end of the pathname, in which case they return null. return partIndex < pathnameParts.length ? pathnameParts.slice(partIndex).map((s)=>encodeURIComponent(s)) : null; } // Dynamic case 'd': { if (partIndex >= pathnameParts.length) { // The route tree expected there to be more parts in the URL than there // actually are. This could happen if the x-nextjs-rewritten-path header // is incorrectly set, or potentially due to bug in Next.js. TODO: // Should this be a hard error? During a prefetch, we can just abort. // During a client navigation, we could trigger a hard refresh. But if // it happens during initial render, we don't really have any // recovery options. return ''; } return encodeURIComponent(pathnameParts[partIndex]); } // Dynamic intercepted case 'di(..)(..)': case 'di(.)': case 'di(..)': case 'di(...)': { const prefix = paramType.length - 2; if (partIndex >= pathnameParts.length) { // The route tree expected there to be more parts in the URL than there // actually are. This could happen if the x-nextjs-rewritten-path header // is incorrectly set, or potentially due to bug in Next.js. TODO: // Should this be a hard error? During a prefetch, we can just abort. // During a client navigation, we could trigger a hard refresh. But if // it happens during initial render, we don't really have any // recovery options. return ''; } return encodeURIComponent(pathnameParts[partIndex].slice(prefix)); } default: paramType; return ''; } } function doesStaticSegmentAppearInURL(segment) { // This is not a parameterized segment; however, we need to determine // whether or not this segment appears in the URL. For example, this route // groups do not appear in the URL, so they should be skipped. Any other // special cases must be handled here. // TODO: Consider encoding this directly into the router tree instead of // inferring it on the client based on the segment type. Something like // a `doesAppearInURL` flag in FlightRouterState. if (segment === _segmentvalueencoding.ROOT_SEGMENT_REQUEST_KEY || // For some reason, the loader tree sometimes includes extra __PAGE__ // "layouts" when part of a parallel route. But it's not a leaf node. // Otherwise, we wouldn't need this special case because pages are // always leaf nodes. // TODO: Investigate why the loader produces these fake page segments. segment.startsWith(_segment.PAGE_SEGMENT_KEY) || // Route groups. segment[0] === '(' && segment.endsWith(')') || segment === _segment.DEFAULT_SEGMENT_KEY || segment === '/_not-found') { return false; } else { // All other segment types appear in the URL return true; } } function getCacheKeyForDynamicParam(paramValue, renderedSearch) { // This needs to match the logic in get-dynamic-param.ts, until we're able to // unify the various implementations so that these are always computed on // the client. if (typeof paramValue === 'string') { // TODO: Refactor or remove this helper function to accept a string rather // than the whole segment type. Also we can probably just append the // search string instead of turning it into JSON. const pageSegmentWithSearchParams = (0, _segment.addSearchParamsIfPageSegment)(paramValue, Object.fromEntries(new URLSearchParams(renderedSearch))); return pageSegmentWithSearchParams; } else if (paramValue === null) { return ''; } else { return paramValue.join('/'); } } function urlToUrlWithoutFlightMarker(url) { const urlWithoutFlightParameters = new URL(url); urlWithoutFlightParameters.searchParams.delete(_approuterheaders.NEXT_RSC_UNION_QUERY); if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; return urlWithoutFlightParameters; } function getParamValueFromCacheKey(paramCacheKey, paramType) { // Turn the cache key string sent by the server (as part of FlightRouterState) // into a value that can be passed to `useParams` and client components. const isCatchAll = paramType === 'c' || paramType === 'oc'; if (isCatchAll) { // Catch-all param keys are a concatenation of the path segments. // See equivalent logic in `getSelectedParams`. // TODO: We should just pass the array directly, rather than concatenate // it to a string and then split it back to an array. It needs to be an // array in some places, like when passing a key React, but we can convert // it at runtime in those places. return paramCacheKey.split('/'); } return paramCacheKey; } function urlSearchParamsToParsedUrlQuery(searchParams) { // Converts a URLSearchParams object to the same type used by the server when // creating search params props, i.e. the type returned by Node's // "querystring" module. const result = {}; for (const [key, value] of searchParams.entries()){ if (result[key] === undefined) { result[key] = value; } else if (Array.isArray(result[key])) { result[key].push(value); } else { result[key] = [ result[key], value ]; } } return result; } 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=route-params.js.map }), "[project]/node_modules/next/dist/client/components/router-reducer/create-href-from-url.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "createHrefFromUrl", { enumerable: true, get: function() { return createHrefFromUrl; } }); function createHrefFromUrl(url, includeHash = true) { return url.pathname + url.search + (includeHash ? url.hash : ''); } 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=create-href-from-url.js.map }), "[project]/node_modules/next/dist/client/flight-data-helpers.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { createInitialRSCPayloadFromFallbackPrerender: null, getFlightDataPartsFromPath: null, getNextFlightSegmentPath: null, normalizeFlightData: null, prepareFlightRouterStateForRequest: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { createInitialRSCPayloadFromFallbackPrerender: function() { return createInitialRSCPayloadFromFallbackPrerender; }, getFlightDataPartsFromPath: function() { return getFlightDataPartsFromPath; }, getNextFlightSegmentPath: function() { return getNextFlightSegmentPath; }, normalizeFlightData: function() { return normalizeFlightData; }, prepareFlightRouterStateForRequest: function() { return prepareFlightRouterStateForRequest; } }); const _segment = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/segment.js [app-ssr] (ecmascript)"); const _routeparams = __turbopack_context__.r("[project]/node_modules/next/dist/client/route-params.js [app-ssr] (ecmascript)"); const _createhreffromurl = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/create-href-from-url.js [app-ssr] (ecmascript)"); function getFlightDataPartsFromPath(flightDataPath) { // Pick the last 4 items from the `FlightDataPath` to get the [tree, seedData, viewport, isHeadPartial]. const flightDataPathLength = 4; // tree, seedData, and head are *always* the last three items in the `FlightDataPath`. const [tree, seedData, head, isHeadPartial] = flightDataPath.slice(-flightDataPathLength); // The `FlightSegmentPath` is everything except the last three items. For a root render, it won't be present. const segmentPath = flightDataPath.slice(0, -flightDataPathLength); return { // TODO: Unify these two segment path helpers. We are inconsistently pushing an empty segment ("") // to the start of the segment path in some places which makes it hard to use solely the segment path. // Look for "// TODO-APP: remove ''" in the codebase. pathToSegment: segmentPath.slice(0, -1), segmentPath, // if the `FlightDataPath` corresponds with the root, there'll be no segment path, // in which case we default to ''. segment: segmentPath[segmentPath.length - 1] ?? '', tree, seedData, head, isHeadPartial, isRootRender: flightDataPath.length === flightDataPathLength }; } function createInitialRSCPayloadFromFallbackPrerender(response, fallbackInitialRSCPayload) { // This is a static fallback page. In order to hydrate the page, we need to // parse the client params from the URL, but to account for the possibility // that the page was rewritten, we need to check the response headers // for x-nextjs-rewritten-path or x-nextjs-rewritten-query headers. Since // we can't access the headers of the initial document response, the client // performs a fetch request to the current location. Since it's possible that // the fetch request will be dynamically rewritten to a different path than // the initial document, this fetch request delivers _all_ the hydration data // for the page; it was not inlined into the document, like it normally // would be. // // TODO: Consider treating the case where fetch is rewritten to a different // path from the document as a special deopt case. We should optimistically // assume this won't happen, inline the data into the document, and perform // a minimal request (like a HEAD or range request) to verify that the // response matches. Tricky to get right because we need to account for // all the different deployment environments we support, like output: // "export" mode, where we currently don't assume that custom response // headers are present. // Patch the Flight data sent by the server with the correct params parsed // from the URL + response object. const renderedPathname = (0, _routeparams.getRenderedPathname)(response); const renderedSearch = (0, _routeparams.getRenderedSearch)(response); const canonicalUrl = (0, _createhreffromurl.createHrefFromUrl)(new URL(location.href)); const originalFlightDataPath = fallbackInitialRSCPayload.f[0]; const originalFlightRouterState = originalFlightDataPath[0]; return { b: fallbackInitialRSCPayload.b, c: canonicalUrl.split('/'), q: renderedSearch, i: fallbackInitialRSCPayload.i, f: [ [ fillInFallbackFlightRouterState(originalFlightRouterState, renderedPathname, renderedSearch), originalFlightDataPath[1], originalFlightDataPath[2], originalFlightDataPath[2] ] ], m: fallbackInitialRSCPayload.m, G: fallbackInitialRSCPayload.G, S: fallbackInitialRSCPayload.S }; } function fillInFallbackFlightRouterState(flightRouterState, renderedPathname, renderedSearch) { const pathnameParts = renderedPathname.split('/').filter((p)=>p !== ''); const index = 0; return fillInFallbackFlightRouterStateImpl(flightRouterState, renderedSearch, pathnameParts, index); } function fillInFallbackFlightRouterStateImpl(flightRouterState, renderedSearch, pathnameParts, pathnamePartsIndex) { const originalSegment = flightRouterState[0]; let newSegment; let doesAppearInURL; if (typeof originalSegment === 'string') { newSegment = originalSegment; doesAppearInURL = (0, _routeparams.doesStaticSegmentAppearInURL)(originalSegment); } else { const paramName = originalSegment[0]; const paramType = originalSegment[2]; const paramValue = (0, _routeparams.parseDynamicParamFromURLPart)(paramType, pathnameParts, pathnamePartsIndex); const cacheKey = (0, _routeparams.getCacheKeyForDynamicParam)(paramValue, renderedSearch); newSegment = [ paramName, cacheKey, paramType ]; doesAppearInURL = true; } // Only increment the index if the segment appears in the URL. If it's a // "virtual" segment, like a route group, it remains the same. const childPathnamePartsIndex = doesAppearInURL ? pathnamePartsIndex + 1 : pathnamePartsIndex; const children = flightRouterState[1]; const newChildren = {}; for(let key in children){ const childFlightRouterState = children[key]; newChildren[key] = fillInFallbackFlightRouterStateImpl(childFlightRouterState, renderedSearch, pathnameParts, childPathnamePartsIndex); } const newState = [ newSegment, newChildren, null, flightRouterState[3], flightRouterState[4] ]; return newState; } function getNextFlightSegmentPath(flightSegmentPath) { // Since `FlightSegmentPath` is a repeated tuple of `Segment` and `ParallelRouteKey`, we slice off two items // to get the next segment path. return flightSegmentPath.slice(2); } function normalizeFlightData(flightData) { // FlightData can be a string when the server didn't respond with a proper flight response, // or when a redirect happens, to signal to the client that it needs to perform an MPA navigation. if (typeof flightData === 'string') { return flightData; } return flightData.map((flightDataPath)=>getFlightDataPartsFromPath(flightDataPath)); } function prepareFlightRouterStateForRequest(flightRouterState, isHmrRefresh) { // HMR requests need the complete, unmodified state for proper functionality if (isHmrRefresh) { return encodeURIComponent(JSON.stringify(flightRouterState)); } return encodeURIComponent(JSON.stringify(stripClientOnlyDataFromFlightRouterState(flightRouterState))); } /** * Recursively strips client-only data from FlightRouterState while preserving * server-needed information for proper rendering decisions. */ function stripClientOnlyDataFromFlightRouterState(flightRouterState) { const [segment, parallelRoutes, _url, refreshMarker, isRootLayout, hasLoadingBoundary] = flightRouterState; // __PAGE__ segments are always fetched from the server, so there's // no need to send them up const cleanedSegment = stripSearchParamsFromPageSegment(segment); // Recursively process parallel routes const cleanedParallelRoutes = {}; for (const [key, childState] of Object.entries(parallelRoutes)){ cleanedParallelRoutes[key] = stripClientOnlyDataFromFlightRouterState(childState); } const result = [ cleanedSegment, cleanedParallelRoutes, null, shouldPreserveRefreshMarker(refreshMarker) ? refreshMarker : null ]; // Append optional fields if present if (isRootLayout !== undefined) { result[4] = isRootLayout; } if (hasLoadingBoundary !== undefined) { result[5] = hasLoadingBoundary; } return result; } /** * Strips search parameters from __PAGE__ segments to prevent sensitive * client-side data from being sent to the server. */ function stripSearchParamsFromPageSegment(segment) { if (typeof segment === 'string' && segment.startsWith(_segment.PAGE_SEGMENT_KEY + '?')) { return _segment.PAGE_SEGMENT_KEY; } return segment; } /** * Determines whether the refresh marker should be sent to the server * Client-only markers like 'refresh' are stripped, while server-needed markers * like 'refetch' and 'inside-shared-layout' are preserved. */ function shouldPreserveRefreshMarker(refreshMarker) { return Boolean(refreshMarker && refreshMarker !== 'refresh'); } 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=flight-data-helpers.js.map }), "[project]/node_modules/next/dist/client/app-build-id.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; // This gets assigned as a side-effect during app initialization. Because it // represents the build used to create the JS bundle, it should never change // after being set, so we store it in a global variable. // // When performing RSC requests, if the incoming data has a different build ID, // we perform an MPA navigation/refresh to load the updated build and ensure // that the client and server in sync. // Starts as an empty string. In practice, because setAppBuildId is called // during initialization before hydration starts, this will always get // reassigned to the actual build ID before it's ever needed by a navigation. // If for some reasons it didn't, due to a bug or race condition, then on // navigation the build comparision would fail and trigger an MPA navigation. Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { getAppBuildId: null, setAppBuildId: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { getAppBuildId: function() { return getAppBuildId; }, setAppBuildId: function() { return setAppBuildId; } }); let globalBuildId = ''; function setAppBuildId(buildId) { globalBuildId = buildId; } function getAppBuildId() { return globalBuildId; } 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=app-build-id.js.map }), "[project]/node_modules/next/dist/shared/lib/hash.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; // 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. 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 }), "[project]/node_modules/next/dist/shared/lib/router/utils/cache-busting-search-param.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "computeCacheBustingSearchParam", { enumerable: true, get: function() { return computeCacheBustingSearchParam; } }); const _hash = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/hash.js [app-ssr] (ecmascript)"); function computeCacheBustingSearchParam(prefetchHeader, segmentPrefetchHeader, stateTreeHeader, nextUrlHeader) { if ((prefetchHeader === undefined || prefetchHeader === '0') && segmentPrefetchHeader === undefined && stateTreeHeader === undefined && nextUrlHeader === undefined) { return ''; } return (0, _hash.hexHash)([ prefetchHeader || '0', segmentPrefetchHeader || '0', stateTreeHeader || '0', nextUrlHeader || '0' ].join(',')); } //# sourceMappingURL=cache-busting-search-param.js.map }), "[project]/node_modules/next/dist/client/components/router-reducer/set-cache-busting-search-param.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { setCacheBustingSearchParam: null, setCacheBustingSearchParamWithHash: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { setCacheBustingSearchParam: function() { return setCacheBustingSearchParam; }, setCacheBustingSearchParamWithHash: function() { return setCacheBustingSearchParamWithHash; } }); const _cachebustingsearchparam = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/cache-busting-search-param.js [app-ssr] (ecmascript)"); const _approuterheaders = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/app-router-headers.js [app-ssr] (ecmascript)"); const setCacheBustingSearchParam = (url, headers)=>{ const uniqueCacheKey = (0, _cachebustingsearchparam.computeCacheBustingSearchParam)(headers[_approuterheaders.NEXT_ROUTER_PREFETCH_HEADER], headers[_approuterheaders.NEXT_ROUTER_SEGMENT_PREFETCH_HEADER], headers[_approuterheaders.NEXT_ROUTER_STATE_TREE_HEADER], headers[_approuterheaders.NEXT_URL]); setCacheBustingSearchParamWithHash(url, uniqueCacheKey); }; const setCacheBustingSearchParamWithHash = (url, hash)=>{ /** * Note that we intentionally do not use `url.searchParams.set` here: * * const url = new URL('https://example.com/search?q=custom%20spacing'); * url.searchParams.set('_rsc', 'abc123'); * console.log(url.toString()); // Outputs: https://example.com/search?q=custom+spacing&_rsc=abc123 * ^ <--- this is causing confusion * This is in fact intended based on https://url.spec.whatwg.org/#interface-urlsearchparams, but * we want to preserve the %20 as %20 if that's what the user passed in, hence the custom * logic below. */ const existingSearch = url.search; const rawQuery = existingSearch.startsWith('?') ? existingSearch.slice(1) : existingSearch; // Always remove any existing cache busting param and add a fresh one to ensure // we have the correct value based on current request headers const pairs = rawQuery.split('&').filter((pair)=>pair && !pair.startsWith(`${_approuterheaders.NEXT_RSC_UNION_QUERY}=`)); if (hash.length > 0) { pairs.push(`${_approuterheaders.NEXT_RSC_UNION_QUERY}=${hash}`); } else { pairs.push(`${_approuterheaders.NEXT_RSC_UNION_QUERY}`); } url.search = pairs.length ? `?${pairs.join('&')}` : ''; }; 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=set-cache-busting-search-param.js.map }), "[project]/node_modules/next/dist/client/components/router-reducer/fetch-server-response.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { createFetch: null, createFromNextReadableStream: null, fetchServerResponse: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { createFetch: function() { return createFetch; }, createFromNextReadableStream: function() { return createFromNextReadableStream; }, fetchServerResponse: function() { return fetchServerResponse; } }); const _client = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-server-dom-turbopack-client.js [app-ssr] (ecmascript)"); const _approuterheaders = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/app-router-headers.js [app-ssr] (ecmascript)"); const _appcallserver = __turbopack_context__.r("[project]/node_modules/next/dist/client/app-call-server.js [app-ssr] (ecmascript)"); const _appfindsourcemapurl = __turbopack_context__.r("[project]/node_modules/next/dist/client/app-find-source-map-url.js [app-ssr] (ecmascript)"); const _routerreducertypes = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/router-reducer-types.js [app-ssr] (ecmascript)"); const _flightdatahelpers = __turbopack_context__.r("[project]/node_modules/next/dist/client/flight-data-helpers.js [app-ssr] (ecmascript)"); const _appbuildid = __turbopack_context__.r("[project]/node_modules/next/dist/client/app-build-id.js [app-ssr] (ecmascript)"); const _setcachebustingsearchparam = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/set-cache-busting-search-param.js [app-ssr] (ecmascript)"); const _routeparams = __turbopack_context__.r("[project]/node_modules/next/dist/client/route-params.js [app-ssr] (ecmascript)"); const createFromReadableStream = _client.createFromReadableStream; const createFromFetch = _client.createFromFetch; let createDebugChannel; if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; function doMpaNavigation(url) { return (0, _routeparams.urlToUrlWithoutFlightMarker)(new URL(url, location.origin)).toString(); } let isPageUnloading = false; if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; async function fetchServerResponse(url, options) { const { flightRouterState, nextUrl, prefetchKind } = options; const headers = { // Enable flight response [_approuterheaders.RSC_HEADER]: '1', // Provide the current router state [_approuterheaders.NEXT_ROUTER_STATE_TREE_HEADER]: (0, _flightdatahelpers.prepareFlightRouterStateForRequest)(flightRouterState, options.isHmrRefresh) }; /** * Three cases: * - `prefetchKind` is `undefined`, it means it's a normal navigation, so we want to prefetch the page data fully * - `prefetchKind` is `full` - we want to prefetch the whole page so same as above * - `prefetchKind` is `auto` - if the page is dynamic, prefetch the page data partially, if static prefetch the page data fully */ if (prefetchKind === _routerreducertypes.PrefetchKind.AUTO) { headers[_approuterheaders.NEXT_ROUTER_PREFETCH_HEADER] = '1'; } if (("TURBOPACK compile-time value", "development") === 'development' && options.isHmrRefresh) { headers[_approuterheaders.NEXT_HMR_REFRESH_HEADER] = '1'; } if (nextUrl) { headers[_approuterheaders.NEXT_URL] = nextUrl; } // In static export mode, we need to modify the URL to request the .txt file, // but we should preserve the original URL for the canonical URL and error handling. const originalUrl = url; try { // When creating a "temporary" prefetch (the "on-demand" prefetch that gets created on navigation, if one doesn't exist) // we send the request with a "high" priority as it's in response to a user interaction that could be blocking a transition. // Otherwise, all other prefetches are sent with a "low" priority. // We use "auto" for in all other cases to match the existing default, as this function is shared outside of prefetching. const fetchPriority = prefetchKind ? prefetchKind === _routerreducertypes.PrefetchKind.TEMPORARY ? 'high' : 'low' : 'auto'; if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; // Typically, during a navigation, we decode the response using Flight's // `createFromFetch` API, which accepts a `fetch` promise. // TODO: Remove this check once the old PPR flag is removed const isLegacyPPR = ("TURBOPACK compile-time value", false) && !("TURBOPACK compile-time value", false); const shouldImmediatelyDecode = !isLegacyPPR; const res = await createFetch(url, headers, fetchPriority, shouldImmediatelyDecode); const responseUrl = (0, _routeparams.urlToUrlWithoutFlightMarker)(new URL(res.url)); const canonicalUrl = res.redirected ? responseUrl : originalUrl; const contentType = res.headers.get('content-type') || ''; const interception = !!res.headers.get('vary')?.includes(_approuterheaders.NEXT_URL); const postponed = !!res.headers.get(_approuterheaders.NEXT_DID_POSTPONE_HEADER); const staleTimeHeaderSeconds = res.headers.get(_approuterheaders.NEXT_ROUTER_STALE_TIME_HEADER); const staleTime = staleTimeHeaderSeconds !== null ? parseInt(staleTimeHeaderSeconds, 10) * 1000 : -1; let isFlightResponse = contentType.startsWith(_approuterheaders.RSC_CONTENT_TYPE_HEADER); if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; // If fetch returns something different than flight response handle it like a mpa navigation // If the fetch was not 200, we also handle it like a mpa navigation if (!isFlightResponse || !res.ok || !res.body) { // in case the original URL came with a hash, preserve it before redirecting to the new URL if (url.hash) { responseUrl.hash = url.hash; } return doMpaNavigation(responseUrl.toString()); } // We may navigate to a page that requires a different Webpack runtime. // In prod, every page will have the same Webpack runtime. // In dev, the Webpack runtime is minimal for each page. // We need to ensure the Webpack runtime is updated before executing client-side JS of the new page. // TODO: This needs to happen in the Flight Client. // Or Webpack needs to include the runtime update in the Flight response as // a blocking script. if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; let flightResponsePromise = res.flightResponse; if (flightResponsePromise === null) { // Typically, `createFetch` would have already started decoding the // Flight response. If it hasn't, though, we need to decode it now. // TODO: This should only be reachable if legacy PPR is enabled (i.e. PPR // without Cache Components). Remove this branch once legacy PPR // is deleted. const flightStream = postponed ? createUnclosingPrefetchStream(res.body) : res.body; flightResponsePromise = createFromNextReadableStream(flightStream, headers); } const flightResponse = await flightResponsePromise; if ((0, _appbuildid.getAppBuildId)() !== flightResponse.b) { return doMpaNavigation(res.url); } const normalizedFlightData = (0, _flightdatahelpers.normalizeFlightData)(flightResponse.f); if (typeof normalizedFlightData === 'string') { return doMpaNavigation(normalizedFlightData); } return { flightData: normalizedFlightData, canonicalUrl: canonicalUrl, renderedSearch: (0, _routeparams.getRenderedSearch)(res), couldBeIntercepted: interception, prerendered: flightResponse.S, postponed, staleTime, debugInfo: flightResponsePromise._debugInfo ?? null }; } catch (err) { if (!isPageUnloading) { console.error(`Failed to fetch RSC payload for ${originalUrl}. Falling back to browser navigation.`, err); } // If fetch fails handle it like a mpa navigation // TODO-APP: Add a test for the case where a CORS request fails, e.g. external url redirect coming from the response. // See https://github.com/vercel/next.js/issues/43605#issuecomment-1451617521 for a reproduction. return originalUrl.toString(); } } async function createFetch(url, headers, fetchPriority, shouldImmediatelyDecode, signal) { // TODO: In output: "export" mode, the headers do nothing. Omit them (and the // cache busting search param) from the request so they're // maximally cacheable. if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; if ("TURBOPACK compile-time truthy", 1) { if (self.__next_r) { headers[_approuterheaders.NEXT_HTML_REQUEST_ID_HEADER] = self.__next_r; } // Create a new request ID for the server action request. The server uses // this to tag debug information sent via WebSocket to the client, which // then routes those chunks to the debug channel associated with this ID. headers[_approuterheaders.NEXT_REQUEST_ID_HEADER] = crypto.getRandomValues(new Uint32Array(1))[0].toString(16); } const fetchOptions = { // Backwards compat for older browsers. `same-origin` is the default in modern browsers. credentials: 'same-origin', headers, priority: fetchPriority || undefined, signal }; // `fetchUrl` is slightly different from `url` because we add a cache-busting // search param to it. This should not leak outside of this function, so we // track them separately. let fetchUrl = new URL(url); (0, _setcachebustingsearchparam.setCacheBustingSearchParam)(fetchUrl, headers); let fetchPromise = fetch(fetchUrl, fetchOptions); // Immediately pass the fetch promise to the Flight client so that the debug // info includes the latency from the client to the server. The internal timer // in React starts as soon as `createFromFetch` is called. // // The only case where we don't do this is during a prefetch, because we have // to do some extra processing of the response stream (see // `createUnclosingPrefetchStream`). But this is fine, because a top-level // prefetch response never blocks a navigation; if it hasn't already been // written into the cache by the time the navigation happens, the router will // go straight to a dynamic request. let flightResponsePromise = shouldImmediatelyDecode ? createFromNextFetch(fetchPromise, headers) : null; let browserResponse = await fetchPromise; // If the server responds with a redirect (e.g. 307), and the redirected // location does not contain the cache busting search param set in the // original request, the response is likely invalid — when following the // redirect, the browser forwards the request headers, but since the cache // busting search param is missing, the server will reject the request due to // a mismatch. // // Ideally, we would be able to intercept the redirect response and perform it // manually, instead of letting the browser automatically follow it, but this // is not allowed by the fetch API. // // So instead, we must "replay" the redirect by fetching the new location // again, but this time we'll append the cache busting search param to prevent // a mismatch. // // TODO: We can optimize Next.js's built-in middleware APIs by returning a // custom status code, to prevent the browser from automatically following it. // // This does not affect Server Action-based redirects; those are encoded // differently, as part of the Flight body. It only affects redirects that // occur in a middleware or a third-party proxy. let redirected = browserResponse.redirected; if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; // Remove the cache busting search param from the response URL, to prevent it // from leaking outside of this function. const responseUrl = new URL(browserResponse.url, fetchUrl); responseUrl.searchParams.delete(_approuterheaders.NEXT_RSC_UNION_QUERY); const rscResponse = { url: responseUrl.href, // This is true if any redirects occurred, either automatically by the // browser, or manually by us. So it's different from // `browserResponse.redirected`, which only tells us whether the browser // followed a redirect, and only for the last response in the chain. redirected, // These can be copied from the last browser response we received. We // intentionally only expose the subset of fields that are actually used // elsewhere in the codebase. ok: browserResponse.ok, headers: browserResponse.headers, body: browserResponse.body, status: browserResponse.status, // This is the exact promise returned by `createFromFetch`. It contains // debug information that we need to transfer to any derived promises that // are later rendered by React. flightResponse: flightResponsePromise }; return rscResponse; } function createFromNextReadableStream(flightStream, requestHeaders) { return createFromReadableStream(flightStream, { callServer: _appcallserver.callServer, findSourceMapURL: _appfindsourcemapurl.findSourceMapURL, debugChannel: createDebugChannel && createDebugChannel(requestHeaders) }); } function createFromNextFetch(promiseForResponse, requestHeaders) { return createFromFetch(promiseForResponse, { callServer: _appcallserver.callServer, findSourceMapURL: _appfindsourcemapurl.findSourceMapURL, debugChannel: createDebugChannel && createDebugChannel(requestHeaders) }); } function createUnclosingPrefetchStream(originalFlightStream) { // When PPR is enabled, prefetch streams may contain references that never // resolve, because that's how we encode dynamic data access. In the decoded // object returned by the Flight client, these are reified into hanging // promises that suspend during render, which is effectively what we want. // The UI resolves when it switches to the dynamic data stream // (via useDeferredValue(dynamic, static)). // // However, the Flight implementation currently errors if the server closes // the response before all the references are resolved. As a cheat to work // around this, we wrap the original stream in a new stream that never closes, // and therefore doesn't error. const reader = originalFlightStream.getReader(); return new ReadableStream({ async pull (controller) { while(true){ const { done, value } = await reader.read(); if (!done) { // Pass to the target stream and keep consuming the Flight response // from the server. controller.enqueue(value); continue; } // The server stream has closed. Exit, but intentionally do not close // the target stream. return; } } }); } 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=fetch-server-response.js.map }), "[project]/node_modules/next/dist/client/components/segment-cache/lru.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { deleteFromLru: null, lruPut: null, updateLruSize: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { deleteFromLru: function() { return deleteFromLru; }, lruPut: function() { return lruPut; }, updateLruSize: function() { return updateLruSize; } }); const _cachemap = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/segment-cache/cache-map.js [app-ssr] (ecmascript)"); let head = null; let didScheduleCleanup = false; let lruSize = 0; // TODO: I chose the max size somewhat arbitrarily. Consider setting this based // on navigator.deviceMemory, or some other heuristic. We should make this // customizable via the Next.js config, too. const maxLruSize = 50 * 1024 * 1024 // 50 MB ; function lruPut(node) { if (head === node) { // Already at the head return; } const prev = node.prev; const next = node.next; if (next === null || prev === null) { // This is an insertion lruSize += node.size; // Whenever we add an entry, we need to check if we've exceeded the // max size. We don't evict entries immediately; they're evicted later in // an asynchronous task. ensureCleanupIsScheduled(); } else { // This is a move. Remove from its current position. prev.next = next; next.prev = prev; } // Move to the front of the list if (head === null) { // This is the first entry node.prev = node; node.next = node; } else { // Add to the front of the list const tail = head.prev; node.prev = tail; // In practice, this is never null, but that isn't encoded in the type if (tail !== null) { tail.next = node; } node.next = head; head.prev = node; } head = node; } function updateLruSize(node, newNodeSize) { // This is a separate function from `put` so that we can resize the entry // regardless of whether it's currently being tracked by the LRU. const prevNodeSize = node.size; node.size = newNodeSize; if (node.next === null) { // This entry is not currently being tracked by the LRU. return; } // Update the total LRU size lruSize = lruSize - prevNodeSize + newNodeSize; ensureCleanupIsScheduled(); } function deleteFromLru(deleted) { const next = deleted.next; const prev = deleted.prev; if (next !== null && prev !== null) { lruSize -= deleted.size; deleted.next = null; deleted.prev = null; // Remove from the list if (head === deleted) { // Update the head if (next === head) { // This was the last entry head = null; } else { head = next; } } else { prev.next = next; next.prev = prev; } } else { // Already deleted } } function ensureCleanupIsScheduled() { if (didScheduleCleanup || lruSize <= maxLruSize) { return; } didScheduleCleanup = true; requestCleanupCallback(cleanup); } function cleanup() { didScheduleCleanup = false; // Evict entries until we're at 90% capacity. We can assume this won't // infinite loop because even if `maxLruSize` were 0, eventually // `deleteFromLru` sets `head` to `null` when we run out entries. const ninetyPercentMax = maxLruSize * 0.9; while(lruSize > ninetyPercentMax && head !== null){ const tail = head.prev; // In practice, this is never null, but that isn't encoded in the type if (tail !== null) { // Delete the entry from the map. In turn, this will remove it from // the LRU. (0, _cachemap.deleteFromCacheMap)(tail.value); } } } const requestCleanupCallback = typeof requestIdleCallback === 'function' ? requestIdleCallback : (cb)=>setTimeout(cb, 0); 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=lru.js.map }), "[project]/node_modules/next/dist/client/components/segment-cache/cache-map.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { Fallback: null, createCacheMap: null, deleteFromCacheMap: null, getFromCacheMap: null, isValueExpired: null, setInCacheMap: null, setSizeInCacheMap: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { Fallback: function() { return Fallback; }, createCacheMap: function() { return createCacheMap; }, deleteFromCacheMap: function() { return deleteFromCacheMap; }, getFromCacheMap: function() { return getFromCacheMap; }, isValueExpired: function() { return isValueExpired; }, setInCacheMap: function() { return setInCacheMap; }, setSizeInCacheMap: function() { return setSizeInCacheMap; } }); const _lru = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/segment-cache/lru.js [app-ssr] (ecmascript)"); const Fallback = {}; // This is a special internal key that is used for "revalidation" entries. It's // an implementation detail that shouldn't leak outside of this module. const Revalidation = {}; function createCacheMap() { const cacheMap = { parent: null, key: null, value: null, map: null, // LRU-related fields prev: null, next: null, size: 0 }; return cacheMap; } function getOrInitialize(cacheMap, keys, isRevalidation) { // Go through each level of keys until we find the entry that matches, or // create a new entry if one doesn't exist. // // This function will only return entries that match the keypath _exactly_. // Unlike getWithFallback, it will not access fallback entries unless it's // explicitly part of the keypath. let entry = cacheMap; let remainingKeys = keys; let key = null; while(true){ const previousKey = key; if (remainingKeys !== null) { key = remainingKeys.value; remainingKeys = remainingKeys.parent; } else if (isRevalidation && previousKey !== Revalidation) { // During a revalidation, we append an internal "Revalidation" key to // the end of the keypath. The "normal" entry is its parent. // However, if the parent entry is currently empty, we don't need to store // this as a revalidation entry. Just insert the revalidation into the // normal slot. if (entry.value === null) { return entry; } // Otheriwse, create a child entry. key = Revalidation; } else { break; } let map = entry.map; if (map !== null) { const existingEntry = map.get(key); if (existingEntry !== undefined) { // Found a match. Keep going. entry = existingEntry; continue; } } else { map = new Map(); entry.map = map; } // No entry exists yet at this level. Create a new one. const newEntry = { parent: entry, key, value: null, map: null, // LRU-related fields prev: null, next: null, size: 0 }; map.set(key, newEntry); entry = newEntry; } return entry; } function getFromCacheMap(now, currentCacheVersion, rootEntry, keys, isRevalidation) { const entry = getEntryWithFallbackImpl(now, currentCacheVersion, rootEntry, keys, isRevalidation, 0); if (entry === null || entry.value === null) { return null; } // This is an LRU access. Move the entry to the front of the list. (0, _lru.lruPut)(entry); return entry.value; } function isValueExpired(now, currentCacheVersion, value) { return value.staleAt <= now || value.version < currentCacheVersion; } function lazilyEvictIfNeeded(now, currentCacheVersion, entry) { // We have a matching entry, but before we can return it, we need to check if // it's still fresh. Otherwise it should be treated the same as a cache miss. if (entry.value === null) { // This entry has no value, so there's nothing to evict. return entry; } const value = entry.value; if (isValueExpired(now, currentCacheVersion, value)) { // The value expired. Lazily evict it from the cache, and return null. This // is conceptually the same as a cache miss. deleteMapEntry(entry); return null; } // The matched entry has not expired. Return it. return entry; } function getEntryWithFallbackImpl(now, currentCacheVersion, entry, keys, isRevalidation, previousKey) { // This is similar to getExactEntry, but if an exact match is not found for // a key, it will return the fallback entry instead. This is recursive at // every level, e.g. an entry with keypath [a, Fallback, c, Fallback] is // valid match for [a, b, c, d]. // // It will return the most specific match available. let key; let remainingKeys; if (keys !== null) { key = keys.value; remainingKeys = keys.parent; } else if (isRevalidation && previousKey !== Revalidation) { // During a revalidation, we append an internal "Revalidation" key to // the end of the keypath. key = Revalidation; remainingKeys = null; } else { // There are no more keys. This is the terminal entry. // TODO: When performing a lookup during a navigation, as opposed to a // prefetch, we may want to skip entries that are Pending if there's also // a Fulfilled fallback entry. Tricky to say, though, since if it's // already pending, it's likely to stream in soon. Maybe we could do this // just on slow connections and offline mode. return lazilyEvictIfNeeded(now, currentCacheVersion, entry); } const map = entry.map; if (map !== null) { const existingEntry = map.get(key); if (existingEntry !== undefined) { // Found an exact match for this key. Keep searching. const result = getEntryWithFallbackImpl(now, currentCacheVersion, existingEntry, remainingKeys, isRevalidation, key); if (result !== null) { return result; } } // No match found for this key. Check if there's a fallback. const fallbackEntry = map.get(Fallback); if (fallbackEntry !== undefined) { // Found a fallback for this key. Keep searching. return getEntryWithFallbackImpl(now, currentCacheVersion, fallbackEntry, remainingKeys, isRevalidation, key); } } return null; } function setInCacheMap(cacheMap, keys, value, isRevalidation) { // Add a value to the map at the given keypath. If the value is already // part of the map, it's removed from its previous keypath. (NOTE: This is // unlike a regular JS map, but the behavior is intentional.) const entry = getOrInitialize(cacheMap, keys, isRevalidation); setMapEntryValue(entry, value); // This is an LRU access. Move the entry to the front of the list. (0, _lru.lruPut)(entry); (0, _lru.updateLruSize)(entry, value.size); } function setMapEntryValue(entry, value) { if (entry.value !== null) { // There's already a value at the given keypath. Disconnect the old value // from the map. We're not calling `deleteMapEntry` here because the // entry itself is still in the map. We just want to overwrite its value. dropRef(entry.value); // Fill the entry with the updated value. const emptyEntry = entry; emptyEntry.value = null; fillEmptyReference(emptyEntry, value); } else { fillEmptyReference(entry, value); } } function fillEmptyReference(entry, value) { // This value may already be in the map at a different keypath. // Grab a reference before we overwrite it. const oldEntry = value.ref; const fullEntry = entry; fullEntry.value = value; value.ref = fullEntry; (0, _lru.updateLruSize)(fullEntry, value.size); if (oldEntry !== null && oldEntry !== entry && oldEntry.value === value) { // This value is already in the map at a different keypath in the map. // Values only exist at a single keypath at a time. Remove it from the // previous keypath. // // Note that only the internal map entry is garbage collected; we don't // call `dropRef` here because it's still in the map, just // at a new keypath (the one we just set, above). deleteMapEntry(oldEntry); } } function deleteFromCacheMap(value) { const entry = value.ref; if (entry === null) { // This value is not a member of any map. return; } dropRef(value); deleteMapEntry(entry); } function dropRef(value) { // Drop the value from the map by setting its `ref` backpointer to // null. This is a separate operation from `deleteMapEntry` because when // re-keying a value we need to be able to delete the old, internal map // entry without garbage collecting the value itself. value.ref = null; } function deleteMapEntry(entry) { // Delete the entry from the cache. const emptyEntry = entry; emptyEntry.value = null; (0, _lru.deleteFromLru)(entry); // Check if we can garbage collect the entry. const map = emptyEntry.map; if (map === null) { // Since this entry has no value, and also no child entries, we can // garbage collect it. Remove it from its parent, and keep garbage // collecting the parents until we reach a non-empty entry. let parent = emptyEntry.parent; let key = emptyEntry.key; while(parent !== null){ const parentMap = parent.map; if (parentMap !== null) { parentMap.delete(key); if (parentMap.size === 0) { // We just removed the last entry in the parent map. parent.map = null; if (parent.value === null) { // The parent node has no child entries, nor does it have a value // on itself. It can be garbage collected. Keep going. key = parent.key; parent = parent.parent; continue; } } } break; } } else { // Check if there's a revalidating entry. If so, promote it to a // "normal" entry, since the normal one was just deleted. const revalidatingEntry = map.get(Revalidation); if (revalidatingEntry !== undefined && revalidatingEntry.value !== null) { setMapEntryValue(emptyEntry, revalidatingEntry.value); } } } function setSizeInCacheMap(value, size) { const entry = value.ref; if (entry === null) { // This value is not a member of any map. return; } // Except during initialization (when the size is set to 0), this is the only // place the `size` field should be updated, to ensure it's in sync with the // the LRU. value.size = size; (0, _lru.updateLruSize)(entry, size); } 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=cache-map.js.map }), "[project]/node_modules/next/dist/client/components/segment-cache/vary-path.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { appendLayoutVaryPath: null, clonePageVaryPathWithNewSearchParams: null, finalizeLayoutVaryPath: null, finalizeMetadataVaryPath: null, finalizePageVaryPath: null, getFulfilledRouteVaryPath: null, getRouteVaryPath: null, getSegmentVaryPathForRequest: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { appendLayoutVaryPath: function() { return appendLayoutVaryPath; }, clonePageVaryPathWithNewSearchParams: function() { return clonePageVaryPathWithNewSearchParams; }, finalizeLayoutVaryPath: function() { return finalizeLayoutVaryPath; }, finalizeMetadataVaryPath: function() { return finalizeMetadataVaryPath; }, finalizePageVaryPath: function() { return finalizePageVaryPath; }, getFulfilledRouteVaryPath: function() { return getFulfilledRouteVaryPath; }, getRouteVaryPath: function() { return getRouteVaryPath; }, getSegmentVaryPathForRequest: function() { return getSegmentVaryPathForRequest; } }); const _types = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/segment-cache/types.js [app-ssr] (ecmascript)"); const _cachemap = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/segment-cache/cache-map.js [app-ssr] (ecmascript)"); const _segmentvalueencoding = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/segment-cache/segment-value-encoding.js [app-ssr] (ecmascript)"); function getRouteVaryPath(pathname, search, nextUrl) { // requestKey -> searchParams -> nextUrl const varyPath = { value: pathname, parent: { value: search, parent: { value: nextUrl, parent: null } } }; return varyPath; } function getFulfilledRouteVaryPath(pathname, search, nextUrl, couldBeIntercepted) { // This is called when a route's data is fulfilled. The cache entry will be // re-keyed based on which inputs the response varies by. // requestKey -> searchParams -> nextUrl const varyPath = { value: pathname, parent: { value: search, parent: { value: couldBeIntercepted ? nextUrl : _cachemap.Fallback, parent: null } } }; return varyPath; } function appendLayoutVaryPath(parentPath, cacheKey) { const varyPathPart = { value: cacheKey, parent: parentPath }; return varyPathPart; } function finalizeLayoutVaryPath(requestKey, varyPath) { const layoutVaryPath = { value: requestKey, parent: varyPath }; return layoutVaryPath; } function finalizePageVaryPath(requestKey, renderedSearch, varyPath) { // Unlike layouts, a page segment's vary path also includes the search string. // requestKey -> searchParams -> pathParams const pageVaryPath = { value: requestKey, parent: { value: renderedSearch, parent: varyPath } }; return pageVaryPath; } function finalizeMetadataVaryPath(pageRequestKey, renderedSearch, varyPath) { // The metadata "segment" is not a real segment because it doesn't exist in // the normal structure of the route tree, but in terms of caching, it // behaves like a page segment because it varies by all the same params as // a page. // // To keep the protocol for querying the server simple, the request key for // the metadata does not include any path information. It's unnecessary from // the server's perspective, because unlike page segments, there's only one // metadata response per URL, i.e. there's no need to distinguish multiple // parallel pages. // // However, this means the metadata request key is insufficient for // caching the the metadata in the client cache, because on the client we // use the request key to distinguish the metadata entry from all other // page's metadata entries. // // So instead we create a simulated request key based on the page segment. // Conceptually this is equivalent to the request key the server would have // assigned the metadata segment if it treated it as part of the actual // route structure. // If there are multiple parallel pages, we use whichever is the first one. // This is fine because the only difference between request keys for // different parallel pages are things like route groups and parallel // route slots. As long as it's always the same one, it doesn't matter. const pageVaryPath = { // Append the actual metadata request key to the page request key. Note // that we're not using a separate vary path part; it's unnecessary because // these are not conceptually separate inputs. value: pageRequestKey + _segmentvalueencoding.HEAD_REQUEST_KEY, parent: { value: renderedSearch, parent: varyPath } }; return pageVaryPath; } function getSegmentVaryPathForRequest(fetchStrategy, tree) { // This is used for storing pending requests in the cache. We want to choose // the most generic vary path based on the strategy used to fetch it, i.e. // static/PPR versus runtime prefetching, so that it can be reused as much // as possible. // // We may be able to re-key the response to something even more generic once // we receive it — for example, if the server tells us that the response // doesn't vary on a particular param — but even before we send the request, // we know some params are reusable based on the fetch strategy alone. For // example, a static prefetch will never vary on search params. // // The original vary path with all the params filled in is stored on the // route tree object. We will clone this one to create a new vary path // where certain params are replaced with Fallback. // // This result of this function is not stored anywhere. It's only used to // access the cache a single time. // // TODO: Rather than create a new list object just to access the cache, the // plan is to add the concept of a "vary mask". This will represent all the // params that can be treated as Fallback. (Or perhaps the inverse.) const originalVaryPath = tree.varyPath; // Only page segments (and the special "metadata" segment, which is treated // like a page segment for the purposes of caching) may contain search // params. There's no reason to include them in the vary path otherwise. if (tree.isPage) { // Only a runtime prefetch will include search params in the vary path. // Static prefetches never include search params, so they can be reused // across all possible search param values. const doesVaryOnSearchParams = fetchStrategy === _types.FetchStrategy.Full || fetchStrategy === _types.FetchStrategy.PPRRuntime; if (!doesVaryOnSearchParams) { // The response from the the server will not vary on search params. Clone // the end of the original vary path to replace the search params // with Fallback. // // requestKey -> searchParams -> pathParams // ^ This part gets replaced with Fallback const searchParamsVaryPath = originalVaryPath.parent; const pathParamsVaryPath = searchParamsVaryPath.parent; const patchedVaryPath = { value: originalVaryPath.value, parent: { value: _cachemap.Fallback, parent: pathParamsVaryPath } }; return patchedVaryPath; } } // The request does vary on search params. We don't need to modify anything. return originalVaryPath; } function clonePageVaryPathWithNewSearchParams(originalVaryPath, newSearch) { // requestKey -> searchParams -> pathParams // ^ This part gets replaced with newSearch const searchParamsVaryPath = originalVaryPath.parent; const clonedVaryPath = { value: originalVaryPath.value, parent: { value: newSearch, parent: searchParamsVaryPath.parent } }; return clonedVaryPath; } 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=vary-path.js.map }), "[project]/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; /** * 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. */ 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 }), "[project]/node_modules/next/dist/shared/lib/router/utils/app-paths.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { normalizeAppPath: null, normalizeRscURL: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { normalizeAppPath: function() { return normalizeAppPath; }, normalizeRscURL: function() { return normalizeRscURL; } }); const _ensureleadingslash = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js [app-ssr] (ecmascript)"); const _segment = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/segment.js [app-ssr] (ecmascript)"); 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 normalizeRscURL(url) { return url.replace(/\.rsc($|\?)/, '$1'); } //# sourceMappingURL=app-paths.js.map }), "[project]/node_modules/next/dist/shared/lib/router/utils/interception-routes.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "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 = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/app-paths.js [app-ssr] (ecmascript)"); 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 //(..|...|..)(..)/`), "__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 }), "[project]/node_modules/next/dist/client/components/router-reducer/compute-changed-path.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { computeChangedPath: null, extractPathFromFlightRouterState: null, getSelectedParams: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { computeChangedPath: function() { return computeChangedPath; }, extractPathFromFlightRouterState: function() { return extractPathFromFlightRouterState; }, getSelectedParams: function() { return getSelectedParams; } }); const _interceptionroutes = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/interception-routes.js [app-ssr] (ecmascript)"); const _segment = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/segment.js [app-ssr] (ecmascript)"); const _matchsegments = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/match-segments.js [app-ssr] (ecmascript)"); const removeLeadingSlash = (segment)=>{ return segment[0] === '/' ? segment.slice(1) : segment; }; const segmentToPathname = (segment)=>{ if (typeof segment === 'string') { // 'children' is not a valid path -- it's technically a parallel route that corresponds with the current segment's page // if we don't skip it, then the computed pathname might be something like `/children` which doesn't make sense. if (segment === 'children') return ''; return segment; } return segment[1]; }; function normalizeSegments(segments) { return segments.reduce((acc, segment)=>{ segment = removeLeadingSlash(segment); if (segment === '' || (0, _segment.isGroupSegment)(segment)) { return acc; } return `${acc}/${segment}`; }, '') || '/'; } function extractPathFromFlightRouterState(flightRouterState) { const segment = Array.isArray(flightRouterState[0]) ? flightRouterState[0][1] : flightRouterState[0]; if (segment === _segment.DEFAULT_SEGMENT_KEY || _interceptionroutes.INTERCEPTION_ROUTE_MARKERS.some((m)=>segment.startsWith(m))) return undefined; if (segment.startsWith(_segment.PAGE_SEGMENT_KEY)) return ''; const segments = [ segmentToPathname(segment) ]; const parallelRoutes = flightRouterState[1] ?? {}; const childrenPath = parallelRoutes.children ? extractPathFromFlightRouterState(parallelRoutes.children) : undefined; if (childrenPath !== undefined) { segments.push(childrenPath); } else { for (const [key, value] of Object.entries(parallelRoutes)){ if (key === 'children') continue; const childPath = extractPathFromFlightRouterState(value); if (childPath !== undefined) { segments.push(childPath); } } } return normalizeSegments(segments); } function computeChangedPathImpl(treeA, treeB) { const [segmentA, parallelRoutesA] = treeA; const [segmentB, parallelRoutesB] = treeB; const normalizedSegmentA = segmentToPathname(segmentA); const normalizedSegmentB = segmentToPathname(segmentB); if (_interceptionroutes.INTERCEPTION_ROUTE_MARKERS.some((m)=>normalizedSegmentA.startsWith(m) || normalizedSegmentB.startsWith(m))) { return ''; } if (!(0, _matchsegments.matchSegment)(segmentA, segmentB)) { // once we find where the tree changed, we compute the rest of the path by traversing the tree return extractPathFromFlightRouterState(treeB) ?? ''; } for(const parallelRouterKey in parallelRoutesA){ if (parallelRoutesB[parallelRouterKey]) { const changedPath = computeChangedPathImpl(parallelRoutesA[parallelRouterKey], parallelRoutesB[parallelRouterKey]); if (changedPath !== null) { return `${segmentToPathname(segmentB)}/${changedPath}`; } } } return null; } function computeChangedPath(treeA, treeB) { const changedPath = computeChangedPathImpl(treeA, treeB); if (changedPath == null || changedPath === '/') { return changedPath; } // lightweight normalization to remove route groups return normalizeSegments(changedPath.split('/')); } function getSelectedParams(currentTree, params = {}) { const parallelRoutes = currentTree[1]; for (const parallelRoute of Object.values(parallelRoutes)){ const segment = parallelRoute[0]; const isDynamicParameter = Array.isArray(segment); const segmentValue = isDynamicParameter ? segment[1] : segment; if (!segmentValue || segmentValue.startsWith(_segment.PAGE_SEGMENT_KEY)) continue; // Ensure catchAll and optional catchall are turned into an array const isCatchAll = isDynamicParameter && (segment[2] === 'c' || segment[2] === 'oc'); if (isCatchAll) { params[segment[0]] = segment[1].split('/'); } else if (isDynamicParameter) { params[segment[0]] = segment[1]; } params = getSelectedParams(parallelRoute, params); } return params; } 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=compute-changed-path.js.map }), "[project]/node_modules/next/dist/client/components/router-reducer/handle-mutable.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "handleMutable", { enumerable: true, get: function() { return handleMutable; } }); const _computechangedpath = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/compute-changed-path.js [app-ssr] (ecmascript)"); function isNotUndefined(value) { return typeof value !== 'undefined'; } function handleMutable(state, mutable) { // shouldScroll is true by default, can override to false. const shouldScroll = mutable.shouldScroll ?? true; let previousNextUrl = state.previousNextUrl; let nextUrl = state.nextUrl; if (isNotUndefined(mutable.patchedTree)) { // If we received a patched tree, we need to compute the changed path. const changedPath = (0, _computechangedpath.computeChangedPath)(state.tree, mutable.patchedTree); if (changedPath) { // If the tree changed, we need to update the nextUrl previousNextUrl = nextUrl; nextUrl = changedPath; } else if (!nextUrl) { // if the tree ends up being the same (ie, no changed path), and we don't have a nextUrl, then we should use the canonicalUrl nextUrl = state.canonicalUrl; } // otherwise this will be a no-op and continue to use the existing nextUrl } return { // Set href. canonicalUrl: mutable.canonicalUrl ?? state.canonicalUrl, renderedSearch: mutable.renderedSearch ?? state.renderedSearch, pushRef: { pendingPush: isNotUndefined(mutable.pendingPush) ? mutable.pendingPush : state.pushRef.pendingPush, mpaNavigation: isNotUndefined(mutable.mpaNavigation) ? mutable.mpaNavigation : state.pushRef.mpaNavigation, preserveCustomHistoryState: isNotUndefined(mutable.preserveCustomHistoryState) ? mutable.preserveCustomHistoryState : state.pushRef.preserveCustomHistoryState }, // All navigation requires scroll and focus management to trigger. focusAndScrollRef: { apply: shouldScroll ? isNotUndefined(mutable?.scrollableSegments) ? true : state.focusAndScrollRef.apply : false, onlyHashChange: mutable.onlyHashChange || false, hashFragment: shouldScroll ? mutable.hashFragment && mutable.hashFragment !== '' ? decodeURIComponent(mutable.hashFragment.slice(1)) : state.focusAndScrollRef.hashFragment : null, segmentPaths: shouldScroll ? mutable?.scrollableSegments ?? state.focusAndScrollRef.segmentPaths : [] }, // Apply cache. cache: mutable.cache ? mutable.cache : state.cache, // Apply patched router state. tree: isNotUndefined(mutable.patchedTree) ? mutable.patchedTree : state.tree, nextUrl, previousNextUrl: previousNextUrl, debugInfo: mutable.collectedDebugInfo ?? null }; } 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=handle-mutable.js.map }), "[project]/node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "createRouterCacheKey", { enumerable: true, get: function() { return createRouterCacheKey; } }); const _segment = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/segment.js [app-ssr] (ecmascript)"); function createRouterCacheKey(segment, withoutSearchParameters = false) { // if the segment is an array, it means it's a dynamic segment // for example, ['lang', 'en', 'd']. We need to convert it to a string to store it as a cache node key. if (Array.isArray(segment)) { return `${segment[0]}|${segment[1]}|${segment[2]}`; } // Page segments might have search parameters, ie __PAGE__?foo=bar // When `withoutSearchParameters` is true, we only want to return the page segment if (withoutSearchParameters && segment.startsWith(_segment.PAGE_SEGMENT_KEY)) { return _segment.PAGE_SEGMENT_KEY; } return segment; } 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=create-router-cache-key.js.map }), "[project]/node_modules/next/dist/client/components/router-reducer/is-navigating-to-new-root-layout.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "isNavigatingToNewRootLayout", { enumerable: true, get: function() { return isNavigatingToNewRootLayout; } }); function isNavigatingToNewRootLayout(currentTree, nextTree) { // Compare segments const currentTreeSegment = currentTree[0]; const nextTreeSegment = nextTree[0]; // If any segment is different before we find the root layout, the root layout has changed. // E.g. /same/(group1)/layout.js -> /same/(group2)/layout.js // First segment is 'same' for both, keep looking. (group1) changed to (group2) before the root layout was found, it must have changed. if (Array.isArray(currentTreeSegment) && Array.isArray(nextTreeSegment)) { // Compare dynamic param name and type but ignore the value, different values would not affect the current root layout // /[name] - /slug1 and /slug2, both values (slug1 & slug2) still has the same layout /[name]/layout.js if (currentTreeSegment[0] !== nextTreeSegment[0] || currentTreeSegment[2] !== nextTreeSegment[2]) { return true; } } else if (currentTreeSegment !== nextTreeSegment) { return true; } // Current tree root layout found if (currentTree[4]) { // If the next tree doesn't have the root layout flag, it must have changed. return !nextTree[4]; } // Current tree didn't have its root layout here, must have changed. if (nextTree[4]) { return true; } // We can't assume it's `parallelRoutes.children` here in case the root layout is `app/@something/layout.js` // But it's not possible to be more than one parallelRoutes before the root layout is found // TODO-APP: change to traverse all parallel routes const currentTreeChild = Object.values(currentTree[1])[0]; const nextTreeChild = Object.values(nextTree[1])[0]; if (!currentTreeChild || !nextTreeChild) return true; return isNavigatingToNewRootLayout(currentTreeChild, nextTreeChild); } 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=is-navigating-to-new-root-layout.js.map }), "[project]/node_modules/next/dist/client/components/router-reducer/ppr-navigations.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { abortTask: null, listenForDynamicRequest: null, startPPRNavigation: null, updateCacheNodeOnPopstateRestoration: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { abortTask: function() { return abortTask; }, listenForDynamicRequest: function() { return listenForDynamicRequest; }, startPPRNavigation: function() { return startPPRNavigation; }, updateCacheNodeOnPopstateRestoration: function() { return updateCacheNodeOnPopstateRestoration; } }); const _segment = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/segment.js [app-ssr] (ecmascript)"); const _matchsegments = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/match-segments.js [app-ssr] (ecmascript)"); const _createhreffromurl = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/create-href-from-url.js [app-ssr] (ecmascript)"); const _createroutercachekey = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js [app-ssr] (ecmascript)"); const _isnavigatingtonewrootlayout = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/is-navigating-to-new-root-layout.js [app-ssr] (ecmascript)"); const _navigatereducer = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js [app-ssr] (ecmascript)"); const MPA_NAVIGATION_TASK = { route: null, node: null, dynamicRequestTree: null, children: null }; function startPPRNavigation(navigatedAt, oldUrl, oldCacheNode, oldRouterState, newRouterState, prefetchData, prefetchHead, isPrefetchHeadPartial, isSamePageNavigation, scrollableSegmentsResult) { const segmentPath = []; return updateCacheNodeOnNavigation(navigatedAt, oldUrl, oldCacheNode, oldRouterState, newRouterState, false, prefetchData, prefetchHead, isPrefetchHeadPartial, isSamePageNavigation, segmentPath, scrollableSegmentsResult); } function updateCacheNodeOnNavigation(navigatedAt, oldUrl, oldCacheNode, oldRouterState, newRouterState, didFindRootLayout, prefetchData, prefetchHead, isPrefetchHeadPartial, isSamePageNavigation, segmentPath, scrollableSegmentsResult) { // Diff the old and new trees to reuse the shared layouts. const oldRouterStateChildren = oldRouterState[1]; const newRouterStateChildren = newRouterState[1]; const prefetchDataChildren = prefetchData !== null ? prefetchData[1] : null; if (!didFindRootLayout) { // We're currently traversing the part of the tree that was also part of // the previous route. If we discover a root layout, then we don't need to // trigger an MPA navigation. See beginRenderingNewRouteTree for context. const isRootLayout = newRouterState[4] === true; if (isRootLayout) { // Found a matching root layout. didFindRootLayout = true; } } const oldParallelRoutes = oldCacheNode.parallelRoutes; // Clone the current set of segment children, even if they aren't active in // the new tree. // TODO: We currently retain all the inactive segments indefinitely, until // there's an explicit refresh, or a parent layout is lazily refreshed. We // rely on this for popstate navigations, which update the Router State Tree // but do not eagerly perform a data fetch, because they expect the segment // data to already be in the Cache Node tree. For highly static sites that // are mostly read-only, this may happen only rarely, causing memory to // leak. We should figure out a better model for the lifetime of inactive // segments, so we can maintain instant back/forward navigations without // leaking memory indefinitely. const prefetchParallelRoutes = new Map(oldParallelRoutes); // As we diff the trees, we may sometimes modify (copy-on-write, not mutate) // the Route Tree that was returned by the server — for example, in the case // of default parallel routes, we preserve the currently active segment. To // avoid mutating the original tree, we clone the router state children along // the return path. let patchedRouterStateChildren = {}; let taskChildren = null; // Most navigations require a request to fetch additional data from the // server, either because the data was not already prefetched, or because the // target route contains dynamic data that cannot be prefetched. // // However, if the target route is fully static, and it's already completely // loaded into the segment cache, then we can skip the server request. // // This starts off as `false`, and is set to `true` if any of the child // routes requires a dynamic request. let needsDynamicRequest = false; // As we traverse the children, we'll construct a FlightRouterState that can // be sent to the server to request the dynamic data. If it turns out that // nothing in the subtree is dynamic (i.e. needsDynamicRequest is false at the // end), then this will be discarded. // TODO: We can probably optimize the format of this data structure to only // include paths that are dynamic. Instead of reusing the // FlightRouterState type. let dynamicRequestTreeChildren = {}; for(let parallelRouteKey in newRouterStateChildren){ const newRouterStateChild = newRouterStateChildren[parallelRouteKey]; const oldRouterStateChild = oldRouterStateChildren[parallelRouteKey]; const oldSegmentMapChild = oldParallelRoutes.get(parallelRouteKey); const prefetchDataChild = prefetchDataChildren !== null ? prefetchDataChildren[parallelRouteKey] : null; const newSegmentChild = newRouterStateChild[0]; const newSegmentPathChild = segmentPath.concat([ parallelRouteKey, newSegmentChild ]); const newSegmentKeyChild = (0, _createroutercachekey.createRouterCacheKey)(newSegmentChild); const oldSegmentChild = oldRouterStateChild !== undefined ? oldRouterStateChild[0] : undefined; const oldCacheNodeChild = oldSegmentMapChild !== undefined ? oldSegmentMapChild.get(newSegmentKeyChild) : undefined; let taskChild; if (newSegmentChild === _segment.DEFAULT_SEGMENT_KEY) { // This is another kind of leaf segment — a default route. // // Default routes have special behavior. When there's no matching segment // for a parallel route, Next.js preserves the currently active segment // during a client navigation — but not for initial render. The server // leaves it to the client to account for this. So we need to handle // it here. if (oldRouterStateChild !== undefined) { // Reuse the existing Router State for this segment. We spawn a "task" // just to keep track of the updated router state; unlike most, it's // already fulfilled and won't be affected by the dynamic response. taskChild = reuseActiveSegmentInDefaultSlot(oldUrl, oldRouterStateChild); } else { // There's no currently active segment. Switch to the "create" path. taskChild = beginRenderingNewRouteTree(navigatedAt, oldRouterStateChild, newRouterStateChild, oldCacheNodeChild, didFindRootLayout, prefetchDataChild !== undefined ? prefetchDataChild : null, prefetchHead, isPrefetchHeadPartial, newSegmentPathChild, scrollableSegmentsResult); } } else if (isSamePageNavigation && // Check if this is a page segment. // TODO: We're not consistent about how we do this check. Some places // check if the segment starts with PAGE_SEGMENT_KEY, but most seem to // check if there any any children, which is why I'm doing it here. We // should probably encode an empty children set as `null` though. Either // way, we should update all the checks to be consistent. Object.keys(newRouterStateChild[1]).length === 0) { // We special case navigations to the exact same URL as the current // location. It's a common UI pattern for apps to refresh when you click a // link to the current page. So when this happens, we refresh the dynamic // data in the page segments. // // Note that this does not apply if the any part of the hash or search // query has changed. This might feel a bit weird but it makes more sense // when you consider that the way to trigger this behavior is to click // the same link multiple times. // // TODO: We should probably refresh the *entire* route when this case // occurs, not just the page segments. Essentially treating it the same as // a refresh() triggered by an action, which is the more explicit way of // modeling the UI pattern described above. // // Also note that this only refreshes the dynamic data, not static/ // cached data. If the page segment is fully static and prefetched, the // request is skipped. (This is also how refresh() works.) taskChild = beginRenderingNewRouteTree(navigatedAt, oldRouterStateChild, newRouterStateChild, oldCacheNodeChild, didFindRootLayout, prefetchDataChild !== undefined ? prefetchDataChild : null, prefetchHead, isPrefetchHeadPartial, newSegmentPathChild, scrollableSegmentsResult); } else if (oldRouterStateChild !== undefined && oldSegmentChild !== undefined && (0, _matchsegments.matchSegment)(newSegmentChild, oldSegmentChild)) { if (oldCacheNodeChild !== undefined && oldRouterStateChild !== undefined) { // This segment exists in both the old and new trees. Recursively update // the children. taskChild = updateCacheNodeOnNavigation(navigatedAt, oldUrl, oldCacheNodeChild, oldRouterStateChild, newRouterStateChild, didFindRootLayout, prefetchDataChild, prefetchHead, isPrefetchHeadPartial, isSamePageNavigation, newSegmentPathChild, scrollableSegmentsResult); } else { // There's no existing Cache Node for this segment. Switch to the // "create" path. taskChild = beginRenderingNewRouteTree(navigatedAt, oldRouterStateChild, newRouterStateChild, oldCacheNodeChild, didFindRootLayout, prefetchDataChild !== undefined ? prefetchDataChild : null, prefetchHead, isPrefetchHeadPartial, newSegmentPathChild, scrollableSegmentsResult); } } else { // This is a new tree. Switch to the "create" path. taskChild = beginRenderingNewRouteTree(navigatedAt, oldRouterStateChild, newRouterStateChild, oldCacheNodeChild, didFindRootLayout, prefetchDataChild !== undefined ? prefetchDataChild : null, prefetchHead, isPrefetchHeadPartial, newSegmentPathChild, scrollableSegmentsResult); } if (taskChild !== null) { // Recursively propagate up the child tasks. if (taskChild.route === null) { // One of the child tasks discovered a change to the root layout. // Immediately unwind from this recursive traversal. return MPA_NAVIGATION_TASK; } if (taskChildren === null) { taskChildren = new Map(); } taskChildren.set(parallelRouteKey, taskChild); const newCacheNodeChild = taskChild.node; if (newCacheNodeChild !== null) { const newSegmentMapChild = new Map(oldSegmentMapChild); newSegmentMapChild.set(newSegmentKeyChild, newCacheNodeChild); prefetchParallelRoutes.set(parallelRouteKey, newSegmentMapChild); } // The child tree's route state may be different from the prefetched // route sent by the server. We need to clone it as we traverse back up // the tree. const taskChildRoute = taskChild.route; patchedRouterStateChildren[parallelRouteKey] = taskChildRoute; const dynamicRequestTreeChild = taskChild.dynamicRequestTree; if (dynamicRequestTreeChild !== null) { // Something in the child tree is dynamic. needsDynamicRequest = true; dynamicRequestTreeChildren[parallelRouteKey] = dynamicRequestTreeChild; } else { dynamicRequestTreeChildren[parallelRouteKey] = taskChildRoute; } } else { // The child didn't change. We can use the prefetched router state. patchedRouterStateChildren[parallelRouteKey] = newRouterStateChild; dynamicRequestTreeChildren[parallelRouteKey] = newRouterStateChild; } } if (taskChildren === null) { // No new tasks were spawned. return null; } const newCacheNode = { lazyData: null, rsc: oldCacheNode.rsc, // We intentionally aren't updating the prefetchRsc field, since this node // is already part of the current tree, because it would be weird for // prefetch data to be newer than the final data. It probably won't ever be // observable anyway, but it could happen if the segment is unmounted then // mounted again, because LayoutRouter will momentarily switch to rendering // prefetchRsc, via useDeferredValue. prefetchRsc: oldCacheNode.prefetchRsc, head: oldCacheNode.head, prefetchHead: oldCacheNode.prefetchHead, loading: oldCacheNode.loading, // Everything is cloned except for the children, which we computed above. parallelRoutes: prefetchParallelRoutes, navigatedAt }; return { // Return a cloned copy of the router state with updated children. route: patchRouterStateWithNewChildren(newRouterState, patchedRouterStateChildren), node: newCacheNode, dynamicRequestTree: needsDynamicRequest ? patchRouterStateWithNewChildren(newRouterState, dynamicRequestTreeChildren) : null, children: taskChildren }; } function beginRenderingNewRouteTree(navigatedAt, oldRouterState, newRouterState, existingCacheNode, didFindRootLayout, prefetchData, possiblyPartialPrefetchHead, isPrefetchHeadPartial, segmentPath, scrollableSegmentsResult) { if (!didFindRootLayout) { // The route tree changed before we reached a layout. (The highest-level // layout in a route tree is referred to as the "root" layout.) This could // mean that we're navigating between two different root layouts. When this // happens, we perform a full-page (MPA-style) navigation. // // However, the algorithm for deciding where to start rendering a route // (i.e. the one performed in order to reach this function) is stricter // than the one used to detect a change in the root layout. So just because // we're re-rendering a segment outside of the root layout does not mean we // should trigger a full-page navigation. // // Specifically, we handle dynamic parameters differently: two segments are // considered the same even if their parameter values are different. // // Refer to isNavigatingToNewRootLayout for details. // // Note that we only have to perform this extra traversal if we didn't // already discover a root layout in the part of the tree that is unchanged. // In the common case, this branch is skipped completely. if (oldRouterState === undefined || (0, _isnavigatingtonewrootlayout.isNavigatingToNewRootLayout)(oldRouterState, newRouterState)) { // The root layout changed. Perform a full-page navigation. return MPA_NAVIGATION_TASK; } } return createCacheNodeOnNavigation(navigatedAt, newRouterState, existingCacheNode, prefetchData, possiblyPartialPrefetchHead, isPrefetchHeadPartial, segmentPath, scrollableSegmentsResult); } function createCacheNodeOnNavigation(navigatedAt, routerState, existingCacheNode, prefetchData, possiblyPartialPrefetchHead, isPrefetchHeadPartial, segmentPath, scrollableSegmentsResult) { // Same traversal as updateCacheNodeNavigation, but we switch to this path // once we reach the part of the tree that was not in the previous route. We // don't need to diff against the old tree, we just need to create a new one. // The head is assigned to every leaf segment delivered by the server. Based // on corresponding logic in fill-lazy-items-till-leaf-with-head.ts const routerStateChildren = routerState[1]; const isLeafSegment = Object.keys(routerStateChildren).length === 0; // Even we're rendering inside the "new" part of the target tree, we may have // a locally cached segment that we can reuse. This may come from either 1) // the CacheNode tree, which lives in React state and is populated by previous // navigations; or 2) the prefetch cache, which is a separate cache that is // populated by prefetches. let rsc; let loading; let head; let cacheNodeNavigatedAt; if (existingCacheNode !== undefined && // DYNAMIC_STALETIME_MS defaults to 0, but it can be increased using // the experimental.staleTimes.dynamic config. When set, we'll avoid // refetching dynamic data if it was fetched within the given threshold. existingCacheNode.navigatedAt + _navigatereducer.DYNAMIC_STALETIME_MS > navigatedAt) { // We have an existing CacheNode for this segment, and it's not stale. We // should reuse it rather than request a new one. rsc = existingCacheNode.rsc; loading = existingCacheNode.loading; head = existingCacheNode.head; // Don't update the navigatedAt timestamp, since we're reusing stale data. cacheNodeNavigatedAt = existingCacheNode.navigatedAt; } else if (prefetchData !== null) { // There's no existing CacheNode for this segment, but we do have prefetch // data. If the prefetch data is fully static (i.e. does not contain any // dynamic holes), we don't need to request it from the server. rsc = prefetchData[0]; loading = prefetchData[2]; head = isLeafSegment ? possiblyPartialPrefetchHead : null; // Even though we're accessing the data from the prefetch cache, this is // conceptually a new segment, not a reused one. So we should update the // navigatedAt timestamp. cacheNodeNavigatedAt = navigatedAt; const isPrefetchRscPartial = prefetchData[3]; if (isPrefetchRscPartial || // Check if the head is partial (only relevant if this is a leaf segment) isPrefetchHeadPartial && isLeafSegment) { // We only have partial data from this segment. Like missing segments, we // must request the full data from the server. return spawnPendingTask(navigatedAt, routerState, prefetchData, possiblyPartialPrefetchHead, isPrefetchHeadPartial, segmentPath, scrollableSegmentsResult); } else { // The prefetch data is fully static, so we can omit it from the // navigation request. } } else { // There's no prefetch for this segment. Everything from this point will be // requested from the server, even if there are static children below it. // Create a terminal task node that will later be fulfilled by // server response. return spawnPendingTask(navigatedAt, routerState, null, possiblyPartialPrefetchHead, isPrefetchHeadPartial, segmentPath, scrollableSegmentsResult); } // We already have a full segment we can render, so we don't need to request a // new one from the server. Keep traversing down the tree until we reach // something that requires a dynamic request. const prefetchDataChildren = prefetchData !== null ? prefetchData[1] : null; const taskChildren = new Map(); const existingCacheNodeChildren = existingCacheNode !== undefined ? existingCacheNode.parallelRoutes : null; const cacheNodeChildren = new Map(existingCacheNodeChildren); let dynamicRequestTreeChildren = {}; let needsDynamicRequest = false; if (isLeafSegment) { // The segment path of every leaf segment (i.e. page) is collected into // a result array. This is used by the LayoutRouter to scroll to ensure that // new pages are visible after a navigation. // TODO: We should use a string to represent the segment path instead of // an array. We already use a string representation for the path when // accessing the Segment Cache, so we can use the same one. scrollableSegmentsResult.push(segmentPath); } else { for(let parallelRouteKey in routerStateChildren){ const routerStateChild = routerStateChildren[parallelRouteKey]; const prefetchDataChild = prefetchDataChildren !== null ? prefetchDataChildren[parallelRouteKey] : null; const existingSegmentMapChild = existingCacheNodeChildren !== null ? existingCacheNodeChildren.get(parallelRouteKey) : undefined; const segmentChild = routerStateChild[0]; const segmentPathChild = segmentPath.concat([ parallelRouteKey, segmentChild ]); const segmentKeyChild = (0, _createroutercachekey.createRouterCacheKey)(segmentChild); const existingCacheNodeChild = existingSegmentMapChild !== undefined ? existingSegmentMapChild.get(segmentKeyChild) : undefined; const taskChild = createCacheNodeOnNavigation(navigatedAt, routerStateChild, existingCacheNodeChild, prefetchDataChild, possiblyPartialPrefetchHead, isPrefetchHeadPartial, segmentPathChild, scrollableSegmentsResult); taskChildren.set(parallelRouteKey, taskChild); const dynamicRequestTreeChild = taskChild.dynamicRequestTree; if (dynamicRequestTreeChild !== null) { // Something in the child tree is dynamic. needsDynamicRequest = true; dynamicRequestTreeChildren[parallelRouteKey] = dynamicRequestTreeChild; } else { dynamicRequestTreeChildren[parallelRouteKey] = routerStateChild; } const newCacheNodeChild = taskChild.node; if (newCacheNodeChild !== null) { const newSegmentMapChild = new Map(); newSegmentMapChild.set(segmentKeyChild, newCacheNodeChild); cacheNodeChildren.set(parallelRouteKey, newSegmentMapChild); } } } return { // Since we're inside a new route tree, unlike the // `updateCacheNodeOnNavigation` path, the router state on the children // tasks is always the same as the router state we pass in. So we don't need // to clone/modify it. route: routerState, node: { lazyData: null, // Since this segment is already full, we don't need to use the // `prefetchRsc` field. rsc, prefetchRsc: null, head, prefetchHead: null, loading, parallelRoutes: cacheNodeChildren, navigatedAt: cacheNodeNavigatedAt }, dynamicRequestTree: needsDynamicRequest ? patchRouterStateWithNewChildren(routerState, dynamicRequestTreeChildren) : null, children: taskChildren }; } function patchRouterStateWithNewChildren(baseRouterState, newChildren) { const clone = [ baseRouterState[0], newChildren ]; // Based on equivalent logic in apply-router-state-patch-to-tree, but should // confirm whether we need to copy all of these fields. Not sure the server // ever sends, e.g. the refetch marker. if (2 in baseRouterState) { clone[2] = baseRouterState[2]; } if (3 in baseRouterState) { clone[3] = baseRouterState[3]; } if (4 in baseRouterState) { clone[4] = baseRouterState[4]; } return clone; } function spawnPendingTask(navigatedAt, routerState, prefetchData, prefetchHead, isPrefetchHeadPartial, segmentPath, scrollableSegmentsResult) { // Create a task that will later be fulfilled by data from the server. // Clone the prefetched route tree and the `refetch` marker to it. We'll send // this to the server so it knows where to start rendering. const dynamicRequestTree = patchRouterStateWithNewChildren(routerState, routerState[1]); dynamicRequestTree[3] = 'refetch'; const newTask = { route: routerState, // Corresponds to the part of the route that will be rendered on the server. node: createPendingCacheNode(navigatedAt, routerState, prefetchData, prefetchHead, isPrefetchHeadPartial, segmentPath, scrollableSegmentsResult), // Because this is non-null, and it gets propagated up through the parent // tasks, the root task will know that it needs to perform a server request. dynamicRequestTree, children: null }; return newTask; } function reuseActiveSegmentInDefaultSlot(oldUrl, oldRouterState) { // This is a "default" segment. These are never sent by the server during a // soft navigation; instead, the client reuses whatever segment was already // active in that slot on the previous route. This means if we later need to // refresh the segment, it will have to be refetched from the previous route's // URL. We store it in the Flight Router State. // // TODO: We also mark the segment with a "refresh" marker but I think we can // get rid of that eventually by making sure we only add URLs to page segments // that are reused. Then the presence of the URL alone is enough. let reusedRouterState; const oldRefreshMarker = oldRouterState[3]; if (oldRefreshMarker === 'refresh') { // This segment was already reused from an even older route. Keep its // existing URL and refresh marker. reusedRouterState = oldRouterState; } else { // This segment was not previously reused, and it's not on the new route. // So it must have been delivered in the old route. reusedRouterState = patchRouterStateWithNewChildren(oldRouterState, oldRouterState[1]); reusedRouterState[2] = (0, _createhreffromurl.createHrefFromUrl)(oldUrl); reusedRouterState[3] = 'refresh'; } return { route: reusedRouterState, node: null, dynamicRequestTree: null, children: null }; } function listenForDynamicRequest(task, responsePromise) { responsePromise.then((result)=>{ if (typeof result === 'string') { // Happens when navigating to page in `pages` from `app`. We shouldn't // get here because should have already handled this during // the prefetch. return; } const { flightData, debugInfo } = result; for (const normalizedFlightData of flightData){ const { segmentPath, tree: serverRouterState, seedData: dynamicData, head: dynamicHead } = normalizedFlightData; if (!dynamicData) { continue; } writeDynamicDataIntoPendingTask(task, segmentPath, serverRouterState, dynamicData, dynamicHead, debugInfo); } // Now that we've exhausted all the data we received from the server, if // there are any remaining pending tasks in the tree, abort them now. // If there's any missing data, it will trigger a lazy fetch. abortTask(task, null, debugInfo); }, (error)=>{ // This will trigger an error during render abortTask(task, error, null); }); } function writeDynamicDataIntoPendingTask(rootTask, segmentPath, serverRouterState, dynamicData, dynamicHead, debugInfo) { // The data sent by the server represents only a subtree of the app. We need // to find the part of the task tree that matches the server response, and // fulfill it using the dynamic data. // // segmentPath represents the parent path of subtree. It's a repeating pattern // of parallel route key and segment: // // [string, Segment, string, Segment, string, Segment, ...] // // Iterate through the path and finish any tasks that match this payload. let task = rootTask; for(let i = 0; i < segmentPath.length; i += 2){ const parallelRouteKey = segmentPath[i]; const segment = segmentPath[i + 1]; const taskChildren = task.children; if (taskChildren !== null) { const taskChild = taskChildren.get(parallelRouteKey); if (taskChild !== undefined) { const taskSegment = taskChild.route[0]; if ((0, _matchsegments.matchSegment)(segment, taskSegment)) { // Found a match for this task. Keep traversing down the task tree. task = taskChild; continue; } } } // We didn't find a child task that matches the server data. Exit. We won't // abort the task, though, because a different FlightDataPath may be able to // fulfill it (see loop in listenForDynamicRequest). We only abort tasks // once we've run out of data. return; } finishTaskUsingDynamicDataPayload(task, serverRouterState, dynamicData, dynamicHead, debugInfo); } function finishTaskUsingDynamicDataPayload(task, serverRouterState, dynamicData, dynamicHead, debugInfo) { if (task.dynamicRequestTree === null) { // Everything in this subtree is already complete. Bail out. return; } // dynamicData may represent a larger subtree than the task. Before we can // finish the task, we need to line them up. const taskChildren = task.children; const taskNode = task.node; if (taskChildren === null) { // We've reached the leaf node of the pending task. The server data tree // lines up the pending Cache Node tree. We can now switch to the // normal algorithm. if (taskNode !== null) { finishPendingCacheNode(taskNode, task.route, serverRouterState, dynamicData, dynamicHead, debugInfo); // Set this to null to indicate that this task is now complete. task.dynamicRequestTree = null; } return; } // The server returned more data than we need to finish the task. Skip over // the extra segments until we reach the leaf task node. const serverChildren = serverRouterState[1]; const dynamicDataChildren = dynamicData[1]; for(const parallelRouteKey in serverRouterState){ const serverRouterStateChild = serverChildren[parallelRouteKey]; const dynamicDataChild = dynamicDataChildren[parallelRouteKey]; const taskChild = taskChildren.get(parallelRouteKey); if (taskChild !== undefined) { const taskSegment = taskChild.route[0]; if ((0, _matchsegments.matchSegment)(serverRouterStateChild[0], taskSegment) && dynamicDataChild !== null && dynamicDataChild !== undefined) { // Found a match for this task. Keep traversing down the task tree. return finishTaskUsingDynamicDataPayload(taskChild, serverRouterStateChild, dynamicDataChild, dynamicHead, debugInfo); } } // We didn't find a child task that matches the server data. We won't abort // the task, though, because a different FlightDataPath may be able to // fulfill it (see loop in listenForDynamicRequest). We only abort tasks // once we've run out of data. } } function createPendingCacheNode(navigatedAt, routerState, prefetchData, prefetchHead, isPrefetchHeadPartial, segmentPath, scrollableSegmentsResult) { const routerStateChildren = routerState[1]; const prefetchDataChildren = prefetchData !== null ? prefetchData[1] : null; const parallelRoutes = new Map(); for(let parallelRouteKey in routerStateChildren){ const routerStateChild = routerStateChildren[parallelRouteKey]; const prefetchDataChild = prefetchDataChildren !== null ? prefetchDataChildren[parallelRouteKey] : null; const segmentChild = routerStateChild[0]; const segmentPathChild = segmentPath.concat([ parallelRouteKey, segmentChild ]); const segmentKeyChild = (0, _createroutercachekey.createRouterCacheKey)(segmentChild); const newCacheNodeChild = createPendingCacheNode(navigatedAt, routerStateChild, prefetchDataChild === undefined ? null : prefetchDataChild, prefetchHead, isPrefetchHeadPartial, segmentPathChild, scrollableSegmentsResult); const newSegmentMapChild = new Map(); newSegmentMapChild.set(segmentKeyChild, newCacheNodeChild); parallelRoutes.set(parallelRouteKey, newSegmentMapChild); } // The head is assigned to every leaf segment delivered by the server. Based // on corresponding logic in fill-lazy-items-till-leaf-with-head.ts const isLeafSegment = parallelRoutes.size === 0; if (isLeafSegment) { // The segment path of every leaf segment (i.e. page) is collected into // a result array. This is used by the LayoutRouter to scroll to ensure that // new pages are visible after a navigation. // TODO: We should use a string to represent the segment path instead of // an array. We already use a string representation for the path when // accessing the Segment Cache, so we can use the same one. scrollableSegmentsResult.push(segmentPath); } const maybePrefetchRsc = prefetchData !== null ? prefetchData[0] : null; return { lazyData: null, parallelRoutes: parallelRoutes, prefetchRsc: maybePrefetchRsc !== undefined ? maybePrefetchRsc : null, prefetchHead: isLeafSegment ? prefetchHead : [ null, null ], // Create a deferred promise. This will be fulfilled once the dynamic // response is received from the server. rsc: createDeferredRsc(), head: isLeafSegment ? createDeferredRsc() : null, // TODO: Technically, a loading boundary could contain dynamic data. We must // have separate `loading` and `prefetchLoading` fields to handle this, like // we do for the segment data and head. loading: prefetchData !== null ? prefetchData[2] ?? null : createDeferredRsc(), navigatedAt }; } function finishPendingCacheNode(cacheNode, taskState, serverState, dynamicData, dynamicHead, debugInfo) { // Writes a dynamic response into an existing Cache Node tree. This does _not_ // create a new tree, it updates the existing tree in-place. So it must follow // the Suspense rules of cache safety — it can resolve pending promises, but // it cannot overwrite existing data. It can add segments to the tree (because // a missing segment will cause the layout router to suspend). // but it cannot delete them. // // We must resolve every promise in the tree, or else it will suspend // indefinitely. If we did not receive data for a segment, we will resolve its // data promise to `null` to trigger a lazy fetch during render. const taskStateChildren = taskState[1]; const serverStateChildren = serverState[1]; const dataChildren = dynamicData[1]; // The router state that we traverse the tree with (taskState) is the same one // that we used to construct the pending Cache Node tree. That way we're sure // to resolve all the pending promises. const parallelRoutes = cacheNode.parallelRoutes; for(let parallelRouteKey in taskStateChildren){ const taskStateChild = taskStateChildren[parallelRouteKey]; const serverStateChild = serverStateChildren[parallelRouteKey]; const dataChild = dataChildren[parallelRouteKey]; const segmentMapChild = parallelRoutes.get(parallelRouteKey); const taskSegmentChild = taskStateChild[0]; const taskSegmentKeyChild = (0, _createroutercachekey.createRouterCacheKey)(taskSegmentChild); const cacheNodeChild = segmentMapChild !== undefined ? segmentMapChild.get(taskSegmentKeyChild) : undefined; if (cacheNodeChild !== undefined) { if (serverStateChild !== undefined && (0, _matchsegments.matchSegment)(taskSegmentChild, serverStateChild[0])) { if (dataChild !== undefined && dataChild !== null) { // This is the happy path. Recursively update all the children. finishPendingCacheNode(cacheNodeChild, taskStateChild, serverStateChild, dataChild, dynamicHead, debugInfo); } else { // The server never returned data for this segment. Trigger a lazy // fetch during render. This shouldn't happen because the Route Tree // and the Seed Data tree sent by the server should always be the same // shape when part of the same server response. abortPendingCacheNode(taskStateChild, cacheNodeChild, null, debugInfo); } } else { // The server never returned data for this segment. Trigger a lazy // fetch during render. abortPendingCacheNode(taskStateChild, cacheNodeChild, null, debugInfo); } } else { // The server response matches what was expected to receive, but there's // no matching Cache Node in the task tree. This is a bug in the // implementation because we should have created a node for every // segment in the tree that's associated with this task. } } // Use the dynamic data from the server to fulfill the deferred RSC promise // on the Cache Node. const rsc = cacheNode.rsc; const dynamicSegmentData = dynamicData[0]; if (rsc === null) { // This is a lazy cache node. We can overwrite it. This is only safe // because we know that the LayoutRouter suspends if `rsc` is `null`. cacheNode.rsc = dynamicSegmentData; } else if (isDeferredRsc(rsc)) { // This is a deferred RSC promise. We can fulfill it with the data we just // received from the server. If it was already resolved by a different // navigation, then this does nothing because we can't overwrite data. rsc.resolve(dynamicSegmentData, debugInfo); } else { // This is not a deferred RSC promise, nor is it empty, so it must have // been populated by a different navigation. We must not overwrite it. } // If we navigated without a prefetch, then `loading` will be a deferred promise too. // Fulfill it using the dynamic response so that we can display the loading boundary. const loading = cacheNode.loading; if (isDeferredRsc(loading)) { const dynamicLoading = dynamicData[2]; loading.resolve(dynamicLoading, debugInfo); } // Check if this is a leaf segment. If so, it will have a `head` property with // a pending promise that needs to be resolved with the dynamic head from // the server. const head = cacheNode.head; if (isDeferredRsc(head)) { head.resolve(dynamicHead, debugInfo); } } function abortTask(task, error, debugInfo) { const cacheNode = task.node; if (cacheNode === null) { // This indicates the task is already complete. return; } const taskChildren = task.children; if (taskChildren === null) { // Reached the leaf task node. This is the root of a pending cache // node tree. abortPendingCacheNode(task.route, cacheNode, error, debugInfo); } else { // This is an intermediate task node. Keep traversing until we reach a // task node with no children. That will be the root of the cache node tree // that needs to be resolved. for (const taskChild of taskChildren.values()){ abortTask(taskChild, error, debugInfo); } } // Set this to null to indicate that this task is now complete. task.dynamicRequestTree = null; } function abortPendingCacheNode(routerState, cacheNode, error, debugInfo) { // For every pending segment in the tree, resolve its `rsc` promise to `null` // to trigger a lazy fetch during render. // // Or, if an error object is provided, it will error instead. const routerStateChildren = routerState[1]; const parallelRoutes = cacheNode.parallelRoutes; for(let parallelRouteKey in routerStateChildren){ const routerStateChild = routerStateChildren[parallelRouteKey]; const segmentMapChild = parallelRoutes.get(parallelRouteKey); if (segmentMapChild === undefined) { continue; } const segmentChild = routerStateChild[0]; const segmentKeyChild = (0, _createroutercachekey.createRouterCacheKey)(segmentChild); const cacheNodeChild = segmentMapChild.get(segmentKeyChild); if (cacheNodeChild !== undefined) { abortPendingCacheNode(routerStateChild, cacheNodeChild, error, debugInfo); } else { // This shouldn't happen because we're traversing the same tree that was // used to construct the cache nodes in the first place. } } const rsc = cacheNode.rsc; if (isDeferredRsc(rsc)) { if (error === null) { // This will trigger a lazy fetch during render. rsc.resolve(null, debugInfo); } else { // This will trigger an error during rendering. rsc.reject(error, debugInfo); } } const loading = cacheNode.loading; if (isDeferredRsc(loading)) { loading.resolve(null, debugInfo); } // Check if this is a leaf segment. If so, it will have a `head` property with // a pending promise that needs to be resolved. If an error was provided, we // will not resolve it with an error, since this is rendered at the root of // the app. We want the segment to error, not the entire app. const head = cacheNode.head; if (isDeferredRsc(head)) { head.resolve(null, debugInfo); } } function updateCacheNodeOnPopstateRestoration(oldCacheNode, routerState) { // A popstate navigation reads data from the local cache. It does not issue // new network requests (unless the cache entries have been evicted). So, we // update the cache to drop the prefetch data for any segment whose dynamic // data was already received. This prevents an unnecessary flash back to PPR // state during a back/forward navigation. // // This function clones the entire cache node tree and sets the `prefetchRsc` // field to `null` to prevent it from being rendered. We can't mutate the node // in place because this is a concurrent data structure. const routerStateChildren = routerState[1]; const oldParallelRoutes = oldCacheNode.parallelRoutes; const newParallelRoutes = new Map(oldParallelRoutes); for(let parallelRouteKey in routerStateChildren){ const routerStateChild = routerStateChildren[parallelRouteKey]; const segmentChild = routerStateChild[0]; const segmentKeyChild = (0, _createroutercachekey.createRouterCacheKey)(segmentChild); const oldSegmentMapChild = oldParallelRoutes.get(parallelRouteKey); if (oldSegmentMapChild !== undefined) { const oldCacheNodeChild = oldSegmentMapChild.get(segmentKeyChild); if (oldCacheNodeChild !== undefined) { const newCacheNodeChild = updateCacheNodeOnPopstateRestoration(oldCacheNodeChild, routerStateChild); const newSegmentMapChild = new Map(oldSegmentMapChild); newSegmentMapChild.set(segmentKeyChild, newCacheNodeChild); newParallelRoutes.set(parallelRouteKey, newSegmentMapChild); } } } // Only show prefetched data if the dynamic data is still pending. // // Tehnically, what we're actually checking is whether the dynamic network // response was received. But since it's a streaming response, this does not // mean that all the dynamic data has fully streamed in. It just means that // _some_ of the dynamic data was received. But as a heuristic, we assume that // the rest dynamic data will stream in quickly, so it's still better to skip // the prefetch state. const rsc = oldCacheNode.rsc; const shouldUsePrefetch = isDeferredRsc(rsc) && rsc.status === 'pending'; return { lazyData: null, rsc, head: oldCacheNode.head, prefetchHead: shouldUsePrefetch ? oldCacheNode.prefetchHead : [ null, null ], prefetchRsc: shouldUsePrefetch ? oldCacheNode.prefetchRsc : null, loading: oldCacheNode.loading, // These are the cloned children we computed above parallelRoutes: newParallelRoutes, navigatedAt: oldCacheNode.navigatedAt }; } const DEFERRED = Symbol(); // This type exists to distinguish a DeferredRsc from a Flight promise. It's a // compromise to avoid adding an extra field on every Cache Node, which would be // awkward because the pre-PPR parts of codebase would need to account for it, // too. We can remove it once type Cache Node type is more settled. function isDeferredRsc(value) { return value && typeof value === 'object' && value.tag === DEFERRED; } function createDeferredRsc() { // Create an unresolved promise that represents data derived from a Flight // response. The promise will be resolved later as soon as we start receiving // data from the server, i.e. as soon as the Flight client decodes and returns // the top-level response object. // The `_debugInfo` field contains profiling information. Promises that are // created by Flight already have this info added by React; for any derived // promise created by the router, we need to transfer the Flight debug info // onto the derived promise. // // The debug info represents the latency between the start of the navigation // and the start of rendering. (It does not represent the time it takes for // whole stream to finish.) const debugInfo = []; let resolve; let reject; const pendingRsc = new Promise((res, rej)=>{ resolve = res; reject = rej; }); pendingRsc.status = 'pending'; pendingRsc.resolve = (value, responseDebugInfo)=>{ if (pendingRsc.status === 'pending') { const fulfilledRsc = pendingRsc; fulfilledRsc.status = 'fulfilled'; fulfilledRsc.value = value; if (responseDebugInfo !== null) { // Transfer the debug info to the derived promise. debugInfo.push.apply(debugInfo, responseDebugInfo); } resolve(value); } }; pendingRsc.reject = (error, responseDebugInfo)=>{ if (pendingRsc.status === 'pending') { const rejectedRsc = pendingRsc; rejectedRsc.status = 'rejected'; rejectedRsc.reason = error; if (responseDebugInfo !== null) { // Transfer the debug info to the derived promise. debugInfo.push.apply(debugInfo, responseDebugInfo); } reject(error); } }; pendingRsc.tag = DEFERRED; pendingRsc._debugInfo = debugInfo; return pendingRsc; } 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=ppr-navigations.js.map }), "[project]/node_modules/next/dist/client/components/segment-cache/navigation.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "navigate", { enumerable: true, get: function() { return navigate; } }); const _fetchserverresponse = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/fetch-server-response.js [app-ssr] (ecmascript)"); const _pprnavigations = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/ppr-navigations.js [app-ssr] (ecmascript)"); const _createhreffromurl = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/create-href-from-url.js [app-ssr] (ecmascript)"); const _cache = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/segment-cache/cache.js [app-ssr] (ecmascript)"); const _cachekey = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/segment-cache/cache-key.js [app-ssr] (ecmascript)"); const _segment = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/segment.js [app-ssr] (ecmascript)"); const _types = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/segment-cache/types.js [app-ssr] (ecmascript)"); function navigate(url, currentUrl, currentCacheNode, currentFlightRouterState, nextUrl, shouldScroll, accumulation) { const now = Date.now(); const href = url.href; // We special case navigations to the exact same URL as the current location. // It's a common UI pattern for apps to refresh when you click a link to the // current page. So when this happens, we refresh the dynamic data in the page // segments. // // Note that this does not apply if the any part of the hash or search query // has changed. This might feel a bit weird but it makes more sense when you // consider that the way to trigger this behavior is to click the same link // multiple times. // // TODO: We should probably refresh the *entire* route when this case occurs, // not just the page segments. Essentially treating it the same as a refresh() // triggered by an action, which is the more explicit way of modeling the UI // pattern described above. // // Also note that this only refreshes the dynamic data, not static/ cached // data. If the page segment is fully static and prefetched, the request is // skipped. (This is also how refresh() works.) const isSamePageNavigation = // consider storing the current URL in the router state instead of reading // from the location object. In practice I don't think this matters much // since we keep them in sync anyway, but having two sources of truth can // lead to subtle bugs and race conditions. href === window.location.href; const cacheKey = (0, _cachekey.createCacheKey)(href, nextUrl); const route = (0, _cache.readRouteCacheEntry)(now, cacheKey); if (route !== null && route.status === _cache.EntryStatus.Fulfilled) { // We have a matching prefetch. const snapshot = readRenderSnapshotFromCache(now, route, route.tree); const prefetchFlightRouterState = snapshot.flightRouterState; const prefetchSeedData = snapshot.seedData; const headSnapshot = readHeadSnapshotFromCache(now, route); const prefetchHead = headSnapshot.rsc; const isPrefetchHeadPartial = headSnapshot.isPartial; // TODO: The "canonicalUrl" stored in the cache doesn't include the hash, // because hash entries do not vary by hash fragment. However, the one // we set in the router state *does* include the hash, and it's used to // sync with the actual browser location. To make this less of a refactor // hazard, we should always track the hash separately from the rest of // the URL. const newCanonicalUrl = route.canonicalUrl + url.hash; const renderedSearch = route.renderedSearch; return navigateUsingPrefetchedRouteTree(now, url, currentUrl, nextUrl, isSamePageNavigation, currentCacheNode, currentFlightRouterState, prefetchFlightRouterState, prefetchSeedData, prefetchHead, isPrefetchHeadPartial, newCanonicalUrl, renderedSearch, shouldScroll, url.hash); } // There was no matching route tree in the cache. Let's see if we can // construct an "optimistic" route tree. // // Do not construct an optimistic route tree if there was a cache hit, but // the entry has a rejected status, since it may have been rejected due to a // rewrite or redirect based on the search params. // // TODO: There are multiple reasons a prefetch might be rejected; we should // track them explicitly and choose what to do here based on that. if (route === null || route.status !== _cache.EntryStatus.Rejected) { const optimisticRoute = (0, _cache.requestOptimisticRouteCacheEntry)(now, url, nextUrl); if (optimisticRoute !== null) { // We have an optimistic route tree. Proceed with the normal flow. const snapshot = readRenderSnapshotFromCache(now, optimisticRoute, optimisticRoute.tree); const prefetchFlightRouterState = snapshot.flightRouterState; const prefetchSeedData = snapshot.seedData; const headSnapshot = readHeadSnapshotFromCache(now, optimisticRoute); const prefetchHead = headSnapshot.rsc; const isPrefetchHeadPartial = headSnapshot.isPartial; const newCanonicalUrl = optimisticRoute.canonicalUrl + url.hash; const newRenderedSearch = optimisticRoute.renderedSearch; return navigateUsingPrefetchedRouteTree(now, url, currentUrl, nextUrl, isSamePageNavigation, currentCacheNode, currentFlightRouterState, prefetchFlightRouterState, prefetchSeedData, prefetchHead, isPrefetchHeadPartial, newCanonicalUrl, newRenderedSearch, shouldScroll, url.hash); } } // There's no matching prefetch for this route in the cache. let collectedDebugInfo = accumulation.collectedDebugInfo ?? []; if (accumulation.collectedDebugInfo === undefined) { collectedDebugInfo = accumulation.collectedDebugInfo = []; } return { tag: _types.NavigationResultTag.Async, data: navigateDynamicallyWithNoPrefetch(now, url, currentUrl, nextUrl, isSamePageNavigation, currentCacheNode, currentFlightRouterState, shouldScroll, url.hash, collectedDebugInfo) }; } function navigateUsingPrefetchedRouteTree(now, url, currentUrl, nextUrl, isSamePageNavigation, currentCacheNode, currentFlightRouterState, prefetchFlightRouterState, prefetchSeedData, prefetchHead, isPrefetchHeadPartial, canonicalUrl, renderedSearch, shouldScroll, hash) { // Recursively construct a prefetch tree by reading from the Segment Cache. To // maintain compatibility, we output the same data structures as the old // prefetching implementation: FlightRouterState and CacheNodeSeedData. // TODO: Eventually updateCacheNodeOnNavigation (or the equivalent) should // read from the Segment Cache directly. It's only structured this way for now // so we can share code with the old prefetching implementation. const scrollableSegments = []; const task = (0, _pprnavigations.startPPRNavigation)(now, currentUrl, currentCacheNode, currentFlightRouterState, prefetchFlightRouterState, prefetchSeedData, prefetchHead, isPrefetchHeadPartial, isSamePageNavigation, scrollableSegments); if (task !== null) { const dynamicRequestTree = task.dynamicRequestTree; if (dynamicRequestTree !== null) { const promiseForDynamicServerResponse = (0, _fetchserverresponse.fetchServerResponse)(new URL(canonicalUrl, url.origin), { flightRouterState: dynamicRequestTree, nextUrl }); (0, _pprnavigations.listenForDynamicRequest)(task, promiseForDynamicServerResponse); } else { // The prefetched tree does not contain dynamic holes — it's // fully static. We can skip the dynamic request. } return navigationTaskToResult(task, currentCacheNode, canonicalUrl, renderedSearch, scrollableSegments, shouldScroll, hash); } // The server sent back an empty tree patch. There's nothing to update, except // possibly the URL. return { tag: _types.NavigationResultTag.NoOp, data: { canonicalUrl, shouldScroll } }; } function navigationTaskToResult(task, currentCacheNode, canonicalUrl, renderedSearch, scrollableSegments, shouldScroll, hash) { const flightRouterState = task.route; if (flightRouterState === null) { // When no router state is provided, it signals that we should perform an // MPA navigation. return { tag: _types.NavigationResultTag.MPA, data: canonicalUrl }; } const newCacheNode = task.node; return { tag: _types.NavigationResultTag.Success, data: { flightRouterState, cacheNode: newCacheNode !== null ? newCacheNode : currentCacheNode, canonicalUrl, renderedSearch, scrollableSegments, shouldScroll, hash } }; } function readRenderSnapshotFromCache(now, route, tree) { let childRouterStates = {}; let childSeedDatas = {}; const slots = tree.slots; if (slots !== null) { for(const parallelRouteKey in slots){ const childTree = slots[parallelRouteKey]; const childResult = readRenderSnapshotFromCache(now, route, childTree); childRouterStates[parallelRouteKey] = childResult.flightRouterState; childSeedDatas[parallelRouteKey] = childResult.seedData; } } let rsc = null; let loading = null; let isPartial = true; const segmentEntry = (0, _cache.readSegmentCacheEntry)(now, tree.varyPath); if (segmentEntry !== null) { switch(segmentEntry.status){ case _cache.EntryStatus.Fulfilled: { // Happy path: a cache hit rsc = segmentEntry.rsc; loading = segmentEntry.loading; isPartial = segmentEntry.isPartial; break; } case _cache.EntryStatus.Pending: { // We haven't received data for this segment yet, but there's already // an in-progress request. Since it's extremely likely to arrive // before the dynamic data response, we might as well use it. const promiseForFulfilledEntry = (0, _cache.waitForSegmentCacheEntry)(segmentEntry); rsc = promiseForFulfilledEntry.then((entry)=>entry !== null ? entry.rsc : null); loading = promiseForFulfilledEntry.then((entry)=>entry !== null ? entry.loading : null); // Since we don't know yet whether the segment is partial or fully // static, we must assume it's partial; we can't skip the // dynamic request. isPartial = true; break; } case _cache.EntryStatus.Empty: case _cache.EntryStatus.Rejected: break; default: segmentEntry; } } // The navigation implementation expects the search params to be // included in the segment. However, the Segment Cache tracks search // params separately from the rest of the segment key. So we need to // add them back here. // // See corresponding comment in convertFlightRouterStateToTree. // // TODO: What we should do instead is update the navigation diffing // logic to compare search params explicitly. This is a temporary // solution until more of the Segment Cache implementation has settled. const segment = (0, _segment.addSearchParamsIfPageSegment)(tree.segment, Object.fromEntries(new URLSearchParams(route.renderedSearch))); // We don't need this information in a render snapshot, so this can just be a placeholder. const hasRuntimePrefetch = false; return { flightRouterState: [ segment, childRouterStates, null, null, tree.isRootLayout ], seedData: [ rsc, childSeedDatas, loading, isPartial, hasRuntimePrefetch ] }; } function readHeadSnapshotFromCache(now, route) { // Same as readRenderSnapshotFromCache, but for the head let rsc = null; let isPartial = true; const segmentEntry = (0, _cache.readSegmentCacheEntry)(now, route.metadata.varyPath); if (segmentEntry !== null) { switch(segmentEntry.status){ case _cache.EntryStatus.Fulfilled: { rsc = segmentEntry.rsc; isPartial = segmentEntry.isPartial; break; } case _cache.EntryStatus.Pending: { const promiseForFulfilledEntry = (0, _cache.waitForSegmentCacheEntry)(segmentEntry); rsc = promiseForFulfilledEntry.then((entry)=>entry !== null ? entry.rsc : null); isPartial = true; break; } case _cache.EntryStatus.Empty: case _cache.EntryStatus.Rejected: break; default: segmentEntry; } } return { rsc, isPartial }; } async function navigateDynamicallyWithNoPrefetch(now, url, currentUrl, nextUrl, isSamePageNavigation, currentCacheNode, currentFlightRouterState, shouldScroll, hash, collectedDebugInfo) { // Runs when a navigation happens but there's no cached prefetch we can use. // Don't bother to wait for a prefetch response; go straight to a full // navigation that contains both static and dynamic data in a single stream. // (This is unlike the old navigation implementation, which instead blocks // the dynamic request until a prefetch request is received.) // // To avoid duplication of logic, we're going to pretend that the tree // returned by the dynamic request is, in fact, a prefetch tree. Then we can // use the same server response to write the actual data into the CacheNode // tree. So it's the same flow as the "happy path" (prefetch, then // navigation), except we use a single server response for both stages. const promiseForDynamicServerResponse = (0, _fetchserverresponse.fetchServerResponse)(url, { flightRouterState: currentFlightRouterState, nextUrl }); const result = await promiseForDynamicServerResponse; if (typeof result === 'string') { // This is an MPA navigation. const newUrl = result; return { tag: _types.NavigationResultTag.MPA, data: newUrl }; } const { flightData, canonicalUrl, renderedSearch, debugInfo: debugInfoFromResponse } = result; if (debugInfoFromResponse !== null) { collectedDebugInfo.push(...debugInfoFromResponse); } // Since the response format of dynamic requests and prefetches is slightly // different, we'll need to massage the data a bit. Create FlightRouterState // tree that simulates what we'd receive as the result of a prefetch. const prefetchFlightRouterState = simulatePrefetchTreeUsingDynamicTreePatch(currentFlightRouterState, flightData); // In our simulated prefetch payload, we pretend that there's no seed data // nor a prefetch head. const prefetchSeedData = null; const prefetchHead = null; const isPrefetchHeadPartial = true; // Now we proceed exactly as we would for normal navigation. const scrollableSegments = []; const task = (0, _pprnavigations.startPPRNavigation)(now, currentUrl, currentCacheNode, currentFlightRouterState, prefetchFlightRouterState, prefetchSeedData, prefetchHead, isPrefetchHeadPartial, isSamePageNavigation, scrollableSegments); if (task !== null) { // In this case, we've already sent the dynamic request, so we don't // actually use the request tree created by `startPPRNavigation`, // except to check if it contains dynamic holes. // // This is almost always true, but it could be false if all the segment data // was present in the cache, but the route tree was not. E.g. navigating // to a URL that was not prefetched but rewrites to a different URL // that was. const hasDynamicHoles = task.dynamicRequestTree !== null; if (hasDynamicHoles) { (0, _pprnavigations.listenForDynamicRequest)(task, promiseForDynamicServerResponse); } else { // The prefetched tree does not contain dynamic holes — it's // fully static. We don't need to process the server response further. } return navigationTaskToResult(task, currentCacheNode, (0, _createhreffromurl.createHrefFromUrl)(canonicalUrl), renderedSearch, scrollableSegments, shouldScroll, hash); } // The server sent back an empty tree patch. There's nothing to update, except // possibly the URL. return { tag: _types.NavigationResultTag.NoOp, data: { canonicalUrl: (0, _createhreffromurl.createHrefFromUrl)(canonicalUrl), shouldScroll } }; } function simulatePrefetchTreeUsingDynamicTreePatch(currentTree, flightData) { // Takes the current FlightRouterState and applies the router state patch // received from the server, to create a full FlightRouterState tree that we // can pretend was returned by a prefetch. // // (It sounds similar to what applyRouterStatePatch does, but it doesn't need // to handle stuff like interception routes or diffing since that will be // handled later.) let baseTree = currentTree; for (const { segmentPath, tree: treePatch } of flightData){ // If the server sends us multiple tree patches, we only need to clone the // base tree when applying the first patch. After the first patch, we can // apply the remaining patches in place without copying. const canMutateInPlace = baseTree !== currentTree; baseTree = simulatePrefetchTreeUsingDynamicTreePatchImpl(baseTree, treePatch, segmentPath, canMutateInPlace, 0); } return baseTree; } function simulatePrefetchTreeUsingDynamicTreePatchImpl(baseRouterState, patch, segmentPath, canMutateInPlace, index) { if (index === segmentPath.length) { // We reached the part of the tree that we need to patch. return patch; } // segmentPath represents the parent path of subtree. It's a repeating // pattern of parallel route key and segment: // // [string, Segment, string, Segment, string, Segment, ...] // // This path tells us which part of the base tree to apply the tree patch. // // NOTE: In the case of a fully dynamic request with no prefetch, we receive // the FlightRouterState patch in the same request as the dynamic data. // Therefore we don't need to worry about diffing the segment values; we can // assume the server sent us a correct result. const updatedParallelRouteKey = segmentPath[index]; // const segment: Segment = segmentPath[index + 1] <-- Not used, see note above const baseChildren = baseRouterState[1]; const newChildren = {}; for(const parallelRouteKey in baseChildren){ if (parallelRouteKey === updatedParallelRouteKey) { const childBaseRouterState = baseChildren[parallelRouteKey]; newChildren[parallelRouteKey] = simulatePrefetchTreeUsingDynamicTreePatchImpl(childBaseRouterState, patch, segmentPath, canMutateInPlace, // the end of the segment path. index + 2); } else { // This child is not being patched. Copy it over as-is. newChildren[parallelRouteKey] = baseChildren[parallelRouteKey]; } } if (canMutateInPlace) { // We can mutate the base tree in place, because the base tree is already // a clone. baseRouterState[1] = newChildren; return baseRouterState; } // Clone all the fields except the children. // // Based on equivalent logic in apply-router-state-patch-to-tree, but should // confirm whether we need to copy all of these fields. Not sure the server // ever sends, e.g. the refetch marker. const clone = [ baseRouterState[0], newChildren ]; if (2 in baseRouterState) { clone[2] = baseRouterState[2]; } if (3 in baseRouterState) { clone[3] = baseRouterState[3]; } if (4 in baseRouterState) { clone[4] = baseRouterState[4]; } return clone; } 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=navigation.js.map }), "[project]/node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { DYNAMIC_STALETIME_MS: null, STATIC_STALETIME_MS: null, generateSegmentsFromPatch: null, handleExternalUrl: null, navigateReducer: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { DYNAMIC_STALETIME_MS: function() { return DYNAMIC_STALETIME_MS; }, STATIC_STALETIME_MS: function() { return STATIC_STALETIME_MS; }, generateSegmentsFromPatch: function() { return generateSegmentsFromPatch; }, handleExternalUrl: function() { return handleExternalUrl; }, navigateReducer: function() { return navigateReducer; } }); const _createhreffromurl = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/create-href-from-url.js [app-ssr] (ecmascript)"); const _handlemutable = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/handle-mutable.js [app-ssr] (ecmascript)"); const _navigation = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/segment-cache/navigation.js [app-ssr] (ecmascript)"); const _types = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/segment-cache/types.js [app-ssr] (ecmascript)"); const _cache = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/segment-cache/cache.js [app-ssr] (ecmascript)"); const DYNAMIC_STALETIME_MS = Number(("TURBOPACK compile-time value", "0")) * 1000; const STATIC_STALETIME_MS = (0, _cache.getStaleTimeMs)(Number(("TURBOPACK compile-time value", "300"))); function handleExternalUrl(state, mutable, url, pendingPush) { mutable.mpaNavigation = true; mutable.canonicalUrl = url; mutable.pendingPush = pendingPush; mutable.scrollableSegments = undefined; return (0, _handlemutable.handleMutable)(state, mutable); } function generateSegmentsFromPatch(flightRouterPatch) { const segments = []; const [segment, parallelRoutes] = flightRouterPatch; if (Object.keys(parallelRoutes).length === 0) { return [ [ segment ] ]; } for (const [parallelRouteKey, parallelRoute] of Object.entries(parallelRoutes)){ for (const childSegment of generateSegmentsFromPatch(parallelRoute)){ // If the segment is empty, it means we are at the root of the tree if (segment === '') { segments.push([ parallelRouteKey, ...childSegment ]); } else { segments.push([ segment, parallelRouteKey, ...childSegment ]); } } } return segments; } function handleNavigationResult(url, state, mutable, pendingPush, result) { switch(result.tag){ case _types.NavigationResultTag.MPA: { // Perform an MPA navigation. const newUrl = result.data; return handleExternalUrl(state, mutable, newUrl, pendingPush); } case _types.NavigationResultTag.NoOp: { // The server responded with no change to the current page. However, if // the URL changed, we still need to update that. const newCanonicalUrl = result.data.canonicalUrl; mutable.canonicalUrl = newCanonicalUrl; // Check if the only thing that changed was the hash fragment. const oldUrl = new URL(state.canonicalUrl, url); const onlyHashChange = // navigations are always same-origin. url.pathname === oldUrl.pathname && url.search === oldUrl.search && url.hash !== oldUrl.hash; if (onlyHashChange) { // The only updated part of the URL is the hash. mutable.onlyHashChange = true; mutable.shouldScroll = result.data.shouldScroll; mutable.hashFragment = url.hash; // Setting this to an empty array triggers a scroll for all new and // updated segments. See `ScrollAndFocusHandler` for more details. mutable.scrollableSegments = []; } return (0, _handlemutable.handleMutable)(state, mutable); } case _types.NavigationResultTag.Success: { // Received a new result. mutable.cache = result.data.cacheNode; mutable.patchedTree = result.data.flightRouterState; mutable.renderedSearch = result.data.renderedSearch; mutable.canonicalUrl = result.data.canonicalUrl; mutable.scrollableSegments = result.data.scrollableSegments; mutable.shouldScroll = result.data.shouldScroll; mutable.hashFragment = result.data.hash; return (0, _handlemutable.handleMutable)(state, mutable); } case _types.NavigationResultTag.Async: { return result.data.then((asyncResult)=>handleNavigationResult(url, state, mutable, pendingPush, asyncResult), // TODO: This matches the current behavior but we need to do something // better here if the network fails. ()=>{ return state; }); } default: { result; return state; } } } function navigateReducer(state, action) { const { url, isExternalUrl, navigateType, shouldScroll } = action; const mutable = {}; const href = (0, _createhreffromurl.createHrefFromUrl)(url); const pendingPush = navigateType === 'push'; mutable.preserveCustomHistoryState = false; mutable.pendingPush = pendingPush; if (isExternalUrl) { return handleExternalUrl(state, mutable, url.toString(), pendingPush); } // Handles case where `` tag is present, // which will trigger an MPA navigation. if (document.getElementById('__next-page-redirect')) { return handleExternalUrl(state, mutable, href, pendingPush); } // Temporary glue code between the router reducer and the new navigation // implementation. Eventually we'll rewrite the router reducer to a // state machine. const currentUrl = new URL(state.canonicalUrl, location.origin); const result = (0, _navigation.navigate)(url, currentUrl, state.cache, state.tree, state.nextUrl, shouldScroll, mutable); return handleNavigationResult(url, state, mutable, pendingPush, result); } 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=navigate-reducer.js.map }), "[project]/node_modules/next/dist/shared/lib/segment-cache/output-export-prefetch-encoding.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; // In output: export mode, the build id is added to the start of the HTML // document, directly after the doctype declaration. During a prefetch, the // client performs a range request to get the build id, so it can check whether // the target page belongs to the same build. // // The first 64 bytes of the document are requested. The exact number isn't // too important; it must be larger than the build id + doctype + closing and // ending comment markers, but it doesn't need to match the end of the // comment exactly. // // Build ids are 21 bytes long in the default implementation, though this // can be overridden in the Next.js config. For the purposes of this check, // it's OK to only match the start of the id, so we'll truncate it if exceeds // a certain length. Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { DOC_PREFETCH_RANGE_HEADER_VALUE: null, doesExportedHtmlMatchBuildId: null, insertBuildIdComment: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { DOC_PREFETCH_RANGE_HEADER_VALUE: function() { return DOC_PREFETCH_RANGE_HEADER_VALUE; }, doesExportedHtmlMatchBuildId: function() { return doesExportedHtmlMatchBuildId; }, insertBuildIdComment: function() { return insertBuildIdComment; } }); const DOCTYPE_PREFIX = '' // 15 bytes ; const MAX_BUILD_ID_LENGTH = 24; const DOC_PREFETCH_RANGE_HEADER_VALUE = 'bytes=0-63'; function escapeBuildId(buildId) { // If the build id is longer than the given limit, it's OK for our purposes // to only match the beginning. const truncated = buildId.slice(0, MAX_BUILD_ID_LENGTH); // Replace hyphens with underscores so it doesn't break the HTML comment. // (Unlikely, but if this did happen it would break the whole document.) return truncated.replace(/-/g, '_'); } function insertBuildIdComment(originalHtml, buildId) { if (buildId.includes('-->') || // React always inserts a doctype at the start of the document. Skip if it // isn't present. Shouldn't happen; suggests an issue elsewhere. !originalHtml.startsWith(DOCTYPE_PREFIX)) { // Return the original HTML unchanged. This means the document will not // be prefetched. // TODO: The build id comment is currently only used during prefetches, but // if we eventually use this mechanism for regular navigations, we may need // to error during build if we fail to insert it for some reason. return originalHtml; } // The comment must be inserted after the doctype. return originalHtml.replace(DOCTYPE_PREFIX, DOCTYPE_PREFIX + ''); } function doesExportedHtmlMatchBuildId(partialHtmlDocument, buildId) { // Check whether the document starts with the expected buildId. return partialHtmlDocument.startsWith(DOCTYPE_PREFIX + ''); } //# sourceMappingURL=output-export-prefetch-encoding.js.map }), "[project]/node_modules/next/dist/client/components/segment-cache/cache.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { EntryStatus: null, canNewFetchStrategyProvideMoreContent: null, convertRouteTreeToFlightRouterState: null, createDetachedSegmentCacheEntry: null, fetchRouteOnCacheMiss: null, fetchSegmentOnCacheMiss: null, fetchSegmentPrefetchesUsingDynamicRequest: null, getCurrentCacheVersion: null, getStaleTimeMs: null, overwriteRevalidatingSegmentCacheEntry: null, pingInvalidationListeners: null, readOrCreateRevalidatingSegmentEntry: null, readOrCreateRouteCacheEntry: null, readOrCreateSegmentCacheEntry: null, readRouteCacheEntry: null, readSegmentCacheEntry: null, requestOptimisticRouteCacheEntry: null, revalidateEntireCache: null, upgradeToPendingSegment: null, upsertSegmentEntry: null, waitForSegmentCacheEntry: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { EntryStatus: function() { return EntryStatus; }, canNewFetchStrategyProvideMoreContent: function() { return canNewFetchStrategyProvideMoreContent; }, convertRouteTreeToFlightRouterState: function() { return convertRouteTreeToFlightRouterState; }, createDetachedSegmentCacheEntry: function() { return createDetachedSegmentCacheEntry; }, fetchRouteOnCacheMiss: function() { return fetchRouteOnCacheMiss; }, fetchSegmentOnCacheMiss: function() { return fetchSegmentOnCacheMiss; }, fetchSegmentPrefetchesUsingDynamicRequest: function() { return fetchSegmentPrefetchesUsingDynamicRequest; }, getCurrentCacheVersion: function() { return getCurrentCacheVersion; }, getStaleTimeMs: function() { return getStaleTimeMs; }, overwriteRevalidatingSegmentCacheEntry: function() { return overwriteRevalidatingSegmentCacheEntry; }, pingInvalidationListeners: function() { return pingInvalidationListeners; }, readOrCreateRevalidatingSegmentEntry: function() { return readOrCreateRevalidatingSegmentEntry; }, readOrCreateRouteCacheEntry: function() { return readOrCreateRouteCacheEntry; }, readOrCreateSegmentCacheEntry: function() { return readOrCreateSegmentCacheEntry; }, readRouteCacheEntry: function() { return readRouteCacheEntry; }, readSegmentCacheEntry: function() { return readSegmentCacheEntry; }, requestOptimisticRouteCacheEntry: function() { return requestOptimisticRouteCacheEntry; }, revalidateEntireCache: function() { return revalidateEntireCache; }, upgradeToPendingSegment: function() { return upgradeToPendingSegment; }, upsertSegmentEntry: function() { return upsertSegmentEntry; }, waitForSegmentCacheEntry: function() { return waitForSegmentCacheEntry; } }); const _approutertypes = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/app-router-types.js [app-ssr] (ecmascript)"); const _approuterheaders = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/app-router-headers.js [app-ssr] (ecmascript)"); const _fetchserverresponse = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/fetch-server-response.js [app-ssr] (ecmascript)"); const _scheduler = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/segment-cache/scheduler.js [app-ssr] (ecmascript)"); const _varypath = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/segment-cache/vary-path.js [app-ssr] (ecmascript)"); const _appbuildid = __turbopack_context__.r("[project]/node_modules/next/dist/client/app-build-id.js [app-ssr] (ecmascript)"); const _createhreffromurl = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/create-href-from-url.js [app-ssr] (ecmascript)"); const _cachekey = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/segment-cache/cache-key.js [app-ssr] (ecmascript)"); const _routeparams = __turbopack_context__.r("[project]/node_modules/next/dist/client/route-params.js [app-ssr] (ecmascript)"); const _cachemap = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/segment-cache/cache-map.js [app-ssr] (ecmascript)"); const _segmentvalueencoding = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/segment-cache/segment-value-encoding.js [app-ssr] (ecmascript)"); const _flightdatahelpers = __turbopack_context__.r("[project]/node_modules/next/dist/client/flight-data-helpers.js [app-ssr] (ecmascript)"); const _navigatereducer = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js [app-ssr] (ecmascript)"); const _links = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/links.js [app-ssr] (ecmascript)"); const _segment = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/segment.js [app-ssr] (ecmascript)"); const _outputexportprefetchencoding = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/segment-cache/output-export-prefetch-encoding.js [app-ssr] (ecmascript)"); const _types = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/segment-cache/types.js [app-ssr] (ecmascript)"); const _promisewithresolvers = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/promise-with-resolvers.js [app-ssr] (ecmascript)"); function getStaleTimeMs(staleTimeSeconds) { return Math.max(staleTimeSeconds, 30) * 1000; } var EntryStatus = /*#__PURE__*/ function(EntryStatus) { EntryStatus[EntryStatus["Empty"] = 0] = "Empty"; EntryStatus[EntryStatus["Pending"] = 1] = "Pending"; EntryStatus[EntryStatus["Fulfilled"] = 2] = "Fulfilled"; EntryStatus[EntryStatus["Rejected"] = 3] = "Rejected"; return EntryStatus; }({}); const isOutputExportMode = ("TURBOPACK compile-time value", "development") === 'production' && ("TURBOPACK compile-time value", void 0) === 'export'; const MetadataOnlyRequestTree = [ '', {}, null, 'metadata-only' ]; let routeCacheMap = (0, _cachemap.createCacheMap)(); let segmentCacheMap = (0, _cachemap.createCacheMap)(); // All invalidation listeners for the whole cache are tracked in single set. // Since we don't yet support tag or path-based invalidation, there's no point // tracking them any more granularly than this. Once we add granular // invalidation, that may change, though generally the model is to just notify // the listeners and allow the caller to poll the prefetch cache with a new // prefetch task if desired. let invalidationListeners = null; // Incrementing counter used to track cache invalidations. let currentCacheVersion = 0; function getCurrentCacheVersion() { return currentCacheVersion; } function revalidateEntireCache(nextUrl, tree) { // Increment the current cache version. This does not eagerly evict anything // from the cache, but because all the entries are versioned, and we check // the version when reading from the cache, this effectively causes all // entries to be evicted lazily. We do it lazily because in the future, // actions like revalidateTag or refresh will not evict the entire cache, // but rather some subset of the entries. currentCacheVersion++; // Start a cooldown before re-prefetching to allow CDN cache propagation. (0, _scheduler.startRevalidationCooldown)(); // Prefetch all the currently visible links again, to re-fill the cache. (0, _links.pingVisibleLinks)(nextUrl, tree); // Similarly, notify all invalidation listeners (i.e. those passed to // `router.prefetch(onInvalidate)`), so they can trigger a new prefetch // if needed. pingInvalidationListeners(nextUrl, tree); } function attachInvalidationListener(task) { // This function is called whenever a prefetch task reads a cache entry. If // the task has an onInvalidate function associated with it — i.e. the one // optionally passed to router.prefetch(onInvalidate) — then we attach that // listener to the every cache entry that the task reads. Then, if an entry // is invalidated, we call the function. if (task.onInvalidate !== null) { if (invalidationListeners === null) { invalidationListeners = new Set([ task ]); } else { invalidationListeners.add(task); } } } function notifyInvalidationListener(task) { const onInvalidate = task.onInvalidate; if (onInvalidate !== null) { // Clear the callback from the task object to guarantee it's not called more // than once. task.onInvalidate = null; // This is a user-space function, so we must wrap in try/catch. try { onInvalidate(); } catch (error) { if (typeof reportError === 'function') { reportError(error); } else { console.error(error); } } } } function pingInvalidationListeners(nextUrl, tree) { // The rough equivalent of pingVisibleLinks, but for onInvalidate callbacks. // This is called when the Next-Url or the base tree changes, since those // may affect the result of a prefetch task. It's also called after a // cache invalidation. if (invalidationListeners !== null) { const tasks = invalidationListeners; invalidationListeners = null; for (const task of tasks){ if ((0, _scheduler.isPrefetchTaskDirty)(task, nextUrl, tree)) { notifyInvalidationListener(task); } } } } function readRouteCacheEntry(now, key) { const varyPath = (0, _varypath.getRouteVaryPath)(key.pathname, key.search, key.nextUrl); const isRevalidation = false; return (0, _cachemap.getFromCacheMap)(now, getCurrentCacheVersion(), routeCacheMap, varyPath, isRevalidation); } function readSegmentCacheEntry(now, varyPath) { const isRevalidation = false; return (0, _cachemap.getFromCacheMap)(now, getCurrentCacheVersion(), segmentCacheMap, varyPath, isRevalidation); } function readRevalidatingSegmentCacheEntry(now, varyPath) { const isRevalidation = true; return (0, _cachemap.getFromCacheMap)(now, getCurrentCacheVersion(), segmentCacheMap, varyPath, isRevalidation); } function waitForSegmentCacheEntry(pendingEntry) { // Because the entry is pending, there's already a in-progress request. // Attach a promise to the entry that will resolve when the server responds. let promiseWithResolvers = pendingEntry.promise; if (promiseWithResolvers === null) { promiseWithResolvers = pendingEntry.promise = (0, _promisewithresolvers.createPromiseWithResolvers)(); } else { // There's already a promise we can use } return promiseWithResolvers.promise; } function readOrCreateRouteCacheEntry(now, task, key) { attachInvalidationListener(task); const existingEntry = readRouteCacheEntry(now, key); if (existingEntry !== null) { return existingEntry; } // Create a pending entry and add it to the cache. const pendingEntry = { canonicalUrl: null, status: 0, blockedTasks: null, tree: null, metadata: null, // This is initialized to true because we don't know yet whether the route // could be intercepted. It's only set to false once we receive a response // from the server. couldBeIntercepted: true, // Similarly, we don't yet know if the route supports PPR. isPPREnabled: false, renderedSearch: null, // Map-related fields ref: null, size: 0, // Since this is an empty entry, there's no reason to ever evict it. It will // be updated when the data is populated. staleAt: Infinity, version: getCurrentCacheVersion() }; const varyPath = (0, _varypath.getRouteVaryPath)(key.pathname, key.search, key.nextUrl); const isRevalidation = false; (0, _cachemap.setInCacheMap)(routeCacheMap, varyPath, pendingEntry, isRevalidation); return pendingEntry; } function requestOptimisticRouteCacheEntry(now, requestedUrl, nextUrl) { // This function is called during a navigation when there was no matching // route tree in the prefetch cache. Before de-opting to a blocking, // unprefetched navigation, we will first attempt to construct an "optimistic" // route tree by checking the cache for similar routes. // // Check if there's a route with the same pathname, but with different // search params. We can then base our optimistic route tree on this entry. // // Conceptually, we are simulating what would happen if we did perform a // prefetch the requested URL, under the assumption that the server will // not redirect or rewrite the request in a different manner than the // base route tree. This assumption might not hold, in which case we'll have // to recover when we perform the dynamic navigation request. However, this // is what would happen if a route were dynamically rewritten/redirected // in between the prefetch and the navigation. So the logic needs to exist // to handle this case regardless. // Look for a route with the same pathname, but with an empty search string. // TODO: There's nothing inherently special about the empty search string; // it's chosen somewhat arbitrarily, with the rationale that it's the most // likely one to exist. But we should update this to match _any_ search // string. The plan is to generalize this logic alongside other improvements // related to "fallback" cache entries. const requestedSearch = requestedUrl.search; if (requestedSearch === '') { // The caller would have already checked if a route with an empty search // string is in the cache. So we can bail out here. return null; } const urlWithoutSearchParams = new URL(requestedUrl); urlWithoutSearchParams.search = ''; const routeWithNoSearchParams = readRouteCacheEntry(now, (0, _cachekey.createCacheKey)(urlWithoutSearchParams.href, nextUrl)); if (routeWithNoSearchParams === null || routeWithNoSearchParams.status !== 2) { // Bail out of constructing an optimistic route tree. This will result in // a blocking, unprefetched navigation. return null; } // Now we have a base route tree we can "patch" with our optimistic values. // Optimistically assume that redirects for the requested pathname do // not vary on the search string. Therefore, if the base route was // redirected to a different search string, then the optimistic route // should be redirected to the same search string. Otherwise, we use // the requested search string. const canonicalUrlForRouteWithNoSearchParams = new URL(routeWithNoSearchParams.canonicalUrl, requestedUrl.origin); const optimisticCanonicalSearch = canonicalUrlForRouteWithNoSearchParams.search !== '' ? canonicalUrlForRouteWithNoSearchParams.search : requestedSearch; // Similarly, optimistically assume that rewrites for the requested // pathname do not vary on the search string. Therefore, if the base // route was rewritten to a different search string, then the optimistic // route should be rewritten to the same search string. Otherwise, we use // the requested search string. const optimisticRenderedSearch = routeWithNoSearchParams.renderedSearch !== '' ? routeWithNoSearchParams.renderedSearch : requestedSearch; const optimisticUrl = new URL(routeWithNoSearchParams.canonicalUrl, location.origin); optimisticUrl.search = optimisticCanonicalSearch; const optimisticCanonicalUrl = (0, _createhreffromurl.createHrefFromUrl)(optimisticUrl); const optimisticRouteTree = createOptimisticRouteTree(routeWithNoSearchParams.tree, optimisticRenderedSearch); const optimisticMetadataTree = createOptimisticRouteTree(routeWithNoSearchParams.metadata, optimisticRenderedSearch); // Clone the base route tree, and override the relevant fields with our // optimistic values. const optimisticEntry = { canonicalUrl: optimisticCanonicalUrl, status: 2, // This isn't cloned because it's instance-specific blockedTasks: null, tree: optimisticRouteTree, metadata: optimisticMetadataTree, couldBeIntercepted: routeWithNoSearchParams.couldBeIntercepted, isPPREnabled: routeWithNoSearchParams.isPPREnabled, // Override the rendered search with the optimistic value. renderedSearch: optimisticRenderedSearch, // Map-related fields ref: null, size: 0, staleAt: routeWithNoSearchParams.staleAt, version: routeWithNoSearchParams.version }; // Do not insert this entry into the cache. It only exists so we can // perform the current navigation. Just return it to the caller. return optimisticEntry; } function createOptimisticRouteTree(tree, newRenderedSearch) { // Create a new route tree that identical to the original one except for // the rendered search string, which is contained in the vary path. let clonedSlots = null; const originalSlots = tree.slots; if (originalSlots !== null) { clonedSlots = {}; for(const parallelRouteKey in originalSlots){ const childTree = originalSlots[parallelRouteKey]; clonedSlots[parallelRouteKey] = createOptimisticRouteTree(childTree, newRenderedSearch); } } // We only need to clone the vary path if the route is a page. if (tree.isPage) { return { requestKey: tree.requestKey, segment: tree.segment, varyPath: (0, _varypath.clonePageVaryPathWithNewSearchParams)(tree.varyPath, newRenderedSearch), isPage: true, slots: clonedSlots, isRootLayout: tree.isRootLayout, hasLoadingBoundary: tree.hasLoadingBoundary, hasRuntimePrefetch: tree.hasRuntimePrefetch }; } return { requestKey: tree.requestKey, segment: tree.segment, varyPath: tree.varyPath, isPage: false, slots: clonedSlots, isRootLayout: tree.isRootLayout, hasLoadingBoundary: tree.hasLoadingBoundary, hasRuntimePrefetch: tree.hasRuntimePrefetch }; } function readOrCreateSegmentCacheEntry(now, fetchStrategy, route, tree) { const existingEntry = readSegmentCacheEntry(now, tree.varyPath); if (existingEntry !== null) { return existingEntry; } // Create a pending entry and add it to the cache. const varyPathForRequest = (0, _varypath.getSegmentVaryPathForRequest)(fetchStrategy, tree); const pendingEntry = createDetachedSegmentCacheEntry(route.staleAt); const isRevalidation = false; (0, _cachemap.setInCacheMap)(segmentCacheMap, varyPathForRequest, pendingEntry, isRevalidation); return pendingEntry; } function readOrCreateRevalidatingSegmentEntry(now, fetchStrategy, route, tree) { // This function is called when we've already confirmed that a particular // segment is cached, but we want to perform another request anyway in case it // returns more complete and/or fresher data than we already have. The logic // for deciding whether to replace the existing entry is handled elsewhere; // this function just handles retrieving a cache entry that we can use to // track the revalidation. // // The reason revalidations are stored in the cache is because we need to be // able to dedupe multiple revalidation requests. The reason they have to be // handled specially is because we shouldn't overwrite a "normal" entry if // one exists at the same keypath. So, for each internal cache location, there // is a special "revalidation" slot that is used solely for this purpose. // // You can think of it as if all the revalidation entries were stored in a // separate cache map from the canonical entries, and then transfered to the // canonical cache map once the request is complete — this isn't how it's // actually implemented, since it's more efficient to store them in the same // data structure as the normal entries, but that's how it's modeled // conceptually. // TODO: Once we implement Fallback behavior for params, where an entry is // re-keyed based on response information, we'll need to account for the // possibility that the keypath of the previous entry is more generic than // the keypath of the revalidating entry. In other words, the server could // return a less generic entry upon revalidation. For now, though, this isn't // a concern because the keypath is based solely on the prefetch strategy, // not on data contained in the response. const existingEntry = readRevalidatingSegmentCacheEntry(now, tree.varyPath); if (existingEntry !== null) { return existingEntry; } // Create a pending entry and add it to the cache. const varyPathForRequest = (0, _varypath.getSegmentVaryPathForRequest)(fetchStrategy, tree); const pendingEntry = createDetachedSegmentCacheEntry(route.staleAt); const isRevalidation = true; (0, _cachemap.setInCacheMap)(segmentCacheMap, varyPathForRequest, pendingEntry, isRevalidation); return pendingEntry; } function overwriteRevalidatingSegmentCacheEntry(fetchStrategy, route, tree) { // This function is called when we've already decided to replace an existing // revalidation entry. Create a new entry and write it into the cache, // overwriting the previous value. const varyPathForRequest = (0, _varypath.getSegmentVaryPathForRequest)(fetchStrategy, tree); const pendingEntry = createDetachedSegmentCacheEntry(route.staleAt); const isRevalidation = true; (0, _cachemap.setInCacheMap)(segmentCacheMap, varyPathForRequest, pendingEntry, isRevalidation); return pendingEntry; } function upsertSegmentEntry(now, varyPath, candidateEntry) { // We have a new entry that has not yet been inserted into the cache. Before // we do so, we need to confirm whether it takes precedence over the existing // entry (if one exists). // TODO: We should not upsert an entry if its key was invalidated in the time // since the request was made. We can do that by passing the "owner" entry to // this function and confirming it's the same as `existingEntry`. if ((0, _cachemap.isValueExpired)(now, getCurrentCacheVersion(), candidateEntry)) { // The entry is expired. We cannot upsert it. return null; } const existingEntry = readSegmentCacheEntry(now, varyPath); if (existingEntry !== null) { // Don't replace a more specific segment with a less-specific one. A case where this // might happen is if the existing segment was fetched via // ``. if (// than the segment we already have in the cache, so it can't have more content. candidateEntry.fetchStrategy !== existingEntry.fetchStrategy && !canNewFetchStrategyProvideMoreContent(existingEntry.fetchStrategy, candidateEntry.fetchStrategy) || // The existing entry isn't partial, but the new one is. // (TODO: can this be true if `candidateEntry.fetchStrategy >= existingEntry.fetchStrategy`?) !existingEntry.isPartial && candidateEntry.isPartial) { // We're going to leave revalidating entry in the cache so that it doesn't // get revalidated again unnecessarily. Downgrade the Fulfilled entry to // Rejected and null out the data so it can be garbage collected. We leave // `staleAt` intact to prevent subsequent revalidation attempts only until // the entry expires. const rejectedEntry = candidateEntry; rejectedEntry.status = 3; rejectedEntry.loading = null; rejectedEntry.rsc = null; return null; } // Evict the existing entry from the cache. (0, _cachemap.deleteFromCacheMap)(existingEntry); } const isRevalidation = false; (0, _cachemap.setInCacheMap)(segmentCacheMap, varyPath, candidateEntry, isRevalidation); return candidateEntry; } function createDetachedSegmentCacheEntry(staleAt) { const emptyEntry = { status: 0, // Default to assuming the fetch strategy will be PPR. This will be updated // when a fetch is actually initiated. fetchStrategy: _types.FetchStrategy.PPR, rsc: null, loading: null, isPartial: true, promise: null, // Map-related fields ref: null, size: 0, staleAt, version: 0 }; return emptyEntry; } function upgradeToPendingSegment(emptyEntry, fetchStrategy) { const pendingEntry = emptyEntry; pendingEntry.status = 1; pendingEntry.fetchStrategy = fetchStrategy; // Set the version here, since this is right before the request is initiated. // The next time the global cache version is incremented, the entry will // effectively be evicted. This happens before initiating the request, rather // than when receiving the response, because it's guaranteed to happen // before the data is read on the server. pendingEntry.version = getCurrentCacheVersion(); return pendingEntry; } function pingBlockedTasks(entry) { const blockedTasks = entry.blockedTasks; if (blockedTasks !== null) { for (const task of blockedTasks){ (0, _scheduler.pingPrefetchTask)(task); } entry.blockedTasks = null; } } function fulfillRouteCacheEntry(entry, tree, metadataVaryPath, staleAt, couldBeIntercepted, canonicalUrl, renderedSearch, isPPREnabled) { // The Head is not actually part of the route tree, but other than that, it's // fetched and cached like a segment. Some functions expect a RouteTree // object, so rather than fork the logic in all those places, we use this // "fake" one. const metadata = { requestKey: _segmentvalueencoding.HEAD_REQUEST_KEY, segment: _segmentvalueencoding.HEAD_REQUEST_KEY, varyPath: metadataVaryPath, // The metadata isn't really a "page" (though it isn't really a "segment" // either) but for the purposes of how this field is used, it behaves like // one. If this logic ever gets more complex we can change this to an enum. isPage: true, slots: null, isRootLayout: false, hasLoadingBoundary: _approutertypes.HasLoadingBoundary.SubtreeHasNoLoadingBoundary, hasRuntimePrefetch: false }; const fulfilledEntry = entry; fulfilledEntry.status = 2; fulfilledEntry.tree = tree; fulfilledEntry.metadata = metadata; fulfilledEntry.staleAt = staleAt; fulfilledEntry.couldBeIntercepted = couldBeIntercepted; fulfilledEntry.canonicalUrl = canonicalUrl; fulfilledEntry.renderedSearch = renderedSearch; fulfilledEntry.isPPREnabled = isPPREnabled; pingBlockedTasks(entry); return fulfilledEntry; } function fulfillSegmentCacheEntry(segmentCacheEntry, rsc, loading, staleAt, isPartial) { const fulfilledEntry = segmentCacheEntry; fulfilledEntry.status = 2; fulfilledEntry.rsc = rsc; fulfilledEntry.loading = loading; fulfilledEntry.staleAt = staleAt; fulfilledEntry.isPartial = isPartial; // Resolve any listeners that were waiting for this data. if (segmentCacheEntry.promise !== null) { segmentCacheEntry.promise.resolve(fulfilledEntry); // Free the promise for garbage collection. fulfilledEntry.promise = null; } return fulfilledEntry; } function rejectRouteCacheEntry(entry, staleAt) { const rejectedEntry = entry; rejectedEntry.status = 3; rejectedEntry.staleAt = staleAt; pingBlockedTasks(entry); } function rejectSegmentCacheEntry(entry, staleAt) { const rejectedEntry = entry; rejectedEntry.status = 3; rejectedEntry.staleAt = staleAt; if (entry.promise !== null) { // NOTE: We don't currently propagate the reason the prefetch was canceled // but we could by accepting a `reason` argument. entry.promise.resolve(null); entry.promise = null; } } function convertRootTreePrefetchToRouteTree(rootTree, renderedPathname, renderedSearch, acc) { // Remove trailing and leading slashes const pathnameParts = renderedPathname.split('/').filter((p)=>p !== ''); const index = 0; const rootSegment = _segmentvalueencoding.ROOT_SEGMENT_REQUEST_KEY; return convertTreePrefetchToRouteTree(rootTree.tree, rootSegment, null, _segmentvalueencoding.ROOT_SEGMENT_REQUEST_KEY, pathnameParts, index, renderedSearch, acc); } function convertTreePrefetchToRouteTree(prefetch, segment, partialVaryPath, requestKey, pathnameParts, pathnamePartsIndex, renderedSearch, acc) { // Converts the route tree sent by the server into the format used by the // cache. The cached version of the tree includes additional fields, such as a // cache key for each segment. Since this is frequently accessed, we compute // it once instead of on every access. This same cache key is also used to // request the segment from the server. let slots = null; let isPage; let varyPath; const prefetchSlots = prefetch.slots; if (prefetchSlots !== null) { isPage = false; varyPath = (0, _varypath.finalizeLayoutVaryPath)(requestKey, partialVaryPath); slots = {}; for(let parallelRouteKey in prefetchSlots){ const childPrefetch = prefetchSlots[parallelRouteKey]; const childParamName = childPrefetch.name; const childParamType = childPrefetch.paramType; const childServerSentParamKey = childPrefetch.paramKey; let childDoesAppearInURL; let childSegment; let childPartialVaryPath; if (childParamType !== null) { // This segment is parameterized. Get the param from the pathname. const childParamValue = (0, _routeparams.parseDynamicParamFromURLPart)(childParamType, pathnameParts, pathnamePartsIndex); // Assign a cache key to the segment, based on the param value. In the // pre-Segment Cache implementation, the server computes this and sends // it in the body of the response. In the Segment Cache implementation, // the server sends an empty string and we fill it in here. // TODO: We're intentionally not adding the search param to page // segments here; it's tracked separately and added back during a read. // This would clearer if we waited to construct the segment until it's // read from the cache, since that's effectively what we're // doing anyway. const childParamKey = // cacheComponents is enabled. childServerSentParamKey !== null ? childServerSentParamKey : (0, _routeparams.getCacheKeyForDynamicParam)(childParamValue, ''); childPartialVaryPath = (0, _varypath.appendLayoutVaryPath)(partialVaryPath, childParamKey); childSegment = [ childParamName, childParamKey, childParamType ]; childDoesAppearInURL = true; } else { // This segment does not have a param. Inherit the partial vary path of // the parent. childPartialVaryPath = partialVaryPath; childSegment = childParamName; childDoesAppearInURL = (0, _routeparams.doesStaticSegmentAppearInURL)(childParamName); } // Only increment the index if the segment appears in the URL. If it's a // "virtual" segment, like a route group, it remains the same. const childPathnamePartsIndex = childDoesAppearInURL ? pathnamePartsIndex + 1 : pathnamePartsIndex; const childRequestKeyPart = (0, _segmentvalueencoding.createSegmentRequestKeyPart)(childSegment); const childRequestKey = (0, _segmentvalueencoding.appendSegmentRequestKeyPart)(requestKey, parallelRouteKey, childRequestKeyPart); slots[parallelRouteKey] = convertTreePrefetchToRouteTree(childPrefetch, childSegment, childPartialVaryPath, childRequestKey, pathnameParts, childPathnamePartsIndex, renderedSearch, acc); } } else { if (requestKey.endsWith(_segment.PAGE_SEGMENT_KEY)) { // This is a page segment. isPage = true; varyPath = (0, _varypath.finalizePageVaryPath)(requestKey, renderedSearch, partialVaryPath); // The metadata "segment" is not part the route tree, but it has the same // conceptual params as a page segment. Write the vary path into the // accumulator object. If there are multiple parallel pages, we use the // first one. Which page we choose is arbitrary as long as it's // consistently the same one every time every time. See // finalizeMetadataVaryPath for more details. if (acc.metadataVaryPath === null) { acc.metadataVaryPath = (0, _varypath.finalizeMetadataVaryPath)(requestKey, renderedSearch, partialVaryPath); } } else { // This is a layout segment. isPage = false; varyPath = (0, _varypath.finalizeLayoutVaryPath)(requestKey, partialVaryPath); } } return { requestKey, segment, varyPath, // TODO: Cheating the type system here a bit because TypeScript can't tell // that the type of isPage and varyPath are consistent. The fix would be to // create separate constructors and call the appropriate one from each of // the branches above. Just seems a bit overkill only for one field so I'll // leave it as-is for now. If isPage were wrong it would break the behavior // and we'd catch it quickly, anyway. isPage: isPage, slots, isRootLayout: prefetch.isRootLayout, // This field is only relevant to dynamic routes. For a PPR/static route, // there's always some partial loading state we can fetch. hasLoadingBoundary: _approutertypes.HasLoadingBoundary.SegmentHasLoadingBoundary, hasRuntimePrefetch: prefetch.hasRuntimePrefetch }; } function convertRootFlightRouterStateToRouteTree(flightRouterState, renderedSearch, acc) { return convertFlightRouterStateToRouteTree(flightRouterState, _segmentvalueencoding.ROOT_SEGMENT_REQUEST_KEY, null, renderedSearch, acc); } function convertFlightRouterStateToRouteTree(flightRouterState, requestKey, parentPartialVaryPath, renderedSearch, acc) { const originalSegment = flightRouterState[0]; let segment; let partialVaryPath; let isPage; let varyPath; if (Array.isArray(originalSegment)) { isPage = false; const paramCacheKey = originalSegment[1]; partialVaryPath = (0, _varypath.appendLayoutVaryPath)(parentPartialVaryPath, paramCacheKey); varyPath = (0, _varypath.finalizeLayoutVaryPath)(requestKey, partialVaryPath); segment = originalSegment; } else { // This segment does not have a param. Inherit the partial vary path of // the parent. partialVaryPath = parentPartialVaryPath; if (requestKey.endsWith(_segment.PAGE_SEGMENT_KEY)) { // This is a page segment. isPage = true; // The navigation implementation expects the search params to be included // in the segment. However, in the case of a static response, the search // params are omitted. So the client needs to add them back in when reading // from the Segment Cache. // // For consistency, we'll do this for dynamic responses, too. // // TODO: We should move search params out of FlightRouterState and handle // them entirely on the client, similar to our plan for dynamic params. segment = _segment.PAGE_SEGMENT_KEY; varyPath = (0, _varypath.finalizePageVaryPath)(requestKey, renderedSearch, partialVaryPath); // The metadata "segment" is not part the route tree, but it has the same // conceptual params as a page segment. Write the vary path into the // accumulator object. If there are multiple parallel pages, we use the // first one. Which page we choose is arbitrary as long as it's // consistently the same one every time every time. See // finalizeMetadataVaryPath for more details. if (acc.metadataVaryPath === null) { acc.metadataVaryPath = (0, _varypath.finalizeMetadataVaryPath)(requestKey, renderedSearch, partialVaryPath); } } else { // This is a layout segment. isPage = false; segment = originalSegment; varyPath = (0, _varypath.finalizeLayoutVaryPath)(requestKey, partialVaryPath); } } let slots = null; const parallelRoutes = flightRouterState[1]; for(let parallelRouteKey in parallelRoutes){ const childRouterState = parallelRoutes[parallelRouteKey]; const childSegment = childRouterState[0]; // TODO: Eventually, the param values will not be included in the response // from the server. We'll instead fill them in on the client by parsing // the URL. This is where we'll do that. const childRequestKeyPart = (0, _segmentvalueencoding.createSegmentRequestKeyPart)(childSegment); const childRequestKey = (0, _segmentvalueencoding.appendSegmentRequestKeyPart)(requestKey, parallelRouteKey, childRequestKeyPart); const childTree = convertFlightRouterStateToRouteTree(childRouterState, childRequestKey, partialVaryPath, renderedSearch, acc); if (slots === null) { slots = { [parallelRouteKey]: childTree }; } else { slots[parallelRouteKey] = childTree; } } return { requestKey, segment, varyPath, // TODO: Cheating the type system here a bit because TypeScript can't tell // that the type of isPage and varyPath are consistent. The fix would be to // create separate constructors and call the appropriate one from each of // the branches above. Just seems a bit overkill only for one field so I'll // leave it as-is for now. If isPage were wrong it would break the behavior // and we'd catch it quickly, anyway. isPage: isPage, slots, isRootLayout: flightRouterState[4] === true, hasLoadingBoundary: flightRouterState[5] !== undefined ? flightRouterState[5] : _approutertypes.HasLoadingBoundary.SubtreeHasNoLoadingBoundary, // Non-static tree responses are only used by apps that haven't adopted // Cache Components. So this is always false. hasRuntimePrefetch: false }; } function convertRouteTreeToFlightRouterState(routeTree) { const parallelRoutes = {}; if (routeTree.slots !== null) { for(const parallelRouteKey in routeTree.slots){ parallelRoutes[parallelRouteKey] = convertRouteTreeToFlightRouterState(routeTree.slots[parallelRouteKey]); } } const flightRouterState = [ routeTree.segment, parallelRoutes, null, null, routeTree.isRootLayout ]; return flightRouterState; } async function fetchRouteOnCacheMiss(entry, task, key) { // This function is allowed to use async/await because it contains the actual // fetch that gets issued on a cache miss. Notice it writes the result to the // cache entry directly, rather than return data that is then written by // the caller. const pathname = key.pathname; const search = key.search; const nextUrl = key.nextUrl; const segmentPath = '/_tree'; const headers = { [_approuterheaders.RSC_HEADER]: '1', [_approuterheaders.NEXT_ROUTER_PREFETCH_HEADER]: '1', [_approuterheaders.NEXT_ROUTER_SEGMENT_PREFETCH_HEADER]: segmentPath }; if (nextUrl !== null) { headers[_approuterheaders.NEXT_URL] = nextUrl; } try { const url = new URL(pathname + search, location.origin); let response; let urlAfterRedirects; if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; else { // "Server" mode. We can use request headers instead of the pathname. // TODO: The eventual plan is to get rid of our custom request headers and // encode everything into the URL, using a similar strategy to the // "output: export" block above. response = await fetchPrefetchResponse(url, headers); urlAfterRedirects = response !== null && response.redirected ? new URL(response.url) : url; } if (!response || !response.ok || // 204 is a Cache miss. Though theoretically this shouldn't happen when // PPR is enabled, because we always respond to route tree requests, even // if it needs to be blockingly generated on demand. response.status === 204 || !response.body) { // Server responded with an error, or with a miss. We should still cache // the response, but we can try again after 10 seconds. rejectRouteCacheEntry(entry, Date.now() + 10 * 1000); return null; } // TODO: The canonical URL is the href without the origin. I think // historically the reason for this is because the initial canonical URL // gets passed as a prop to the top-level React component, which means it // needs to be computed during SSR. If it were to include the origin, it // would need to always be same as location.origin on the client, to prevent // a hydration mismatch. To sidestep this complexity, we omit the origin. // // However, since this is neither a native URL object nor a fully qualified // URL string, we need to be careful about how we use it. To prevent subtle // mistakes, we should create a special type for it, instead of just string. // Or, we should just use a (readonly) URL object instead. The type of the // prop that we pass to seed the initial state does not need to be the same // type as the state itself. const canonicalUrl = (0, _createhreffromurl.createHrefFromUrl)(urlAfterRedirects); // Check whether the response varies based on the Next-Url header. const varyHeader = response.headers.get('vary'); const couldBeIntercepted = varyHeader !== null && varyHeader.includes(_approuterheaders.NEXT_URL); // Track when the network connection closes. const closed = (0, _promisewithresolvers.createPromiseWithResolvers)(); // This checks whether the response was served from the per-segment cache, // rather than the old prefetching flow. If it fails, it implies that PPR // is disabled on this route. const routeIsPPREnabled = response.headers.get(_approuterheaders.NEXT_DID_POSTPONE_HEADER) === '2' || // In output: "export" mode, we can't rely on response headers. But if we // receive a well-formed response, we can assume it's a static response, // because all data is static in this mode. isOutputExportMode; if (routeIsPPREnabled) { const prefetchStream = createPrefetchResponseStream(response.body, closed.resolve, function onResponseSizeUpdate(size) { (0, _cachemap.setSizeInCacheMap)(entry, size); }); const serverData = await (0, _fetchserverresponse.createFromNextReadableStream)(prefetchStream, headers); if (serverData.buildId !== (0, _appbuildid.getAppBuildId)()) { // The server build does not match the client. Treat as a 404. During // an actual navigation, the router will trigger an MPA navigation. // TODO: Consider moving the build ID to a response header so we can check // it before decoding the response, and so there's one way of checking // across all response types. // TODO: We should cache the fact that this is an MPA navigation. rejectRouteCacheEntry(entry, Date.now() + 10 * 1000); return null; } // Get the params that were used to render the target page. These may // be different from the params in the request URL, if the page // was rewritten. const renderedPathname = (0, _routeparams.getRenderedPathname)(response); const renderedSearch = (0, _routeparams.getRenderedSearch)(response); // Convert the server-sent data into the RouteTree format used by the // client cache. // // During this traversal, we accumulate additional data into this // "accumulator" object. const acc = { metadataVaryPath: null }; const routeTree = convertRootTreePrefetchToRouteTree(serverData, renderedPathname, renderedSearch, acc); const metadataVaryPath = acc.metadataVaryPath; if (metadataVaryPath === null) { rejectRouteCacheEntry(entry, Date.now() + 10 * 1000); return null; } const staleTimeMs = getStaleTimeMs(serverData.staleTime); fulfillRouteCacheEntry(entry, routeTree, metadataVaryPath, Date.now() + staleTimeMs, couldBeIntercepted, canonicalUrl, renderedSearch, routeIsPPREnabled); } else { // PPR is not enabled for this route. The server responds with a // different format (FlightRouterState) that we need to convert. // TODO: We will unify the responses eventually. I'm keeping the types // separate for now because FlightRouterState has so many // overloaded concerns. const prefetchStream = createPrefetchResponseStream(response.body, closed.resolve, function onResponseSizeUpdate(size) { (0, _cachemap.setSizeInCacheMap)(entry, size); }); const serverData = await (0, _fetchserverresponse.createFromNextReadableStream)(prefetchStream, headers); if (serverData.b !== (0, _appbuildid.getAppBuildId)()) { // The server build does not match the client. Treat as a 404. During // an actual navigation, the router will trigger an MPA navigation. // TODO: Consider moving the build ID to a response header so we can check // it before decoding the response, and so there's one way of checking // across all response types. // TODO: We should cache the fact that this is an MPA navigation. rejectRouteCacheEntry(entry, Date.now() + 10 * 1000); return null; } writeDynamicTreeResponseIntoCache(Date.now(), task, // using the LoadingBoundary fetch strategy, so mark their cache entries accordingly. _types.FetchStrategy.LoadingBoundary, response, serverData, entry, couldBeIntercepted, canonicalUrl, routeIsPPREnabled); } if (!couldBeIntercepted) { // This route will never be intercepted. So we can use this entry for all // requests to this route, regardless of the Next-Url header. This works // because when reading the cache we always check for a valid // non-intercepted entry first. // Re-key the entry. The `set` implementation handles removing it from // its previous position in the cache. We don't need to do anything to // update the LRU, because the entry is already in it. // TODO: Treat this as an upsert — should check if an entry already // exists at the new keypath, and if so, whether we should keep that // one instead. const fulfilledVaryPath = (0, _varypath.getFulfilledRouteVaryPath)(pathname, search, nextUrl, couldBeIntercepted); const isRevalidation = false; (0, _cachemap.setInCacheMap)(routeCacheMap, fulfilledVaryPath, entry, isRevalidation); } // Return a promise that resolves when the network connection closes, so // the scheduler can track the number of concurrent network connections. return { value: null, closed: closed.promise }; } catch (error) { // Either the connection itself failed, or something bad happened while // decoding the response. rejectRouteCacheEntry(entry, Date.now() + 10 * 1000); return null; } } async function fetchSegmentOnCacheMiss(route, segmentCacheEntry, routeKey, tree) { // This function is allowed to use async/await because it contains the actual // fetch that gets issued on a cache miss. Notice it writes the result to the // cache entry directly, rather than return data that is then written by // the caller. // // Segment fetches are non-blocking so we don't need to ping the scheduler // on completion. // Use the canonical URL to request the segment, not the original URL. These // are usually the same, but the canonical URL will be different if the route // tree response was redirected. To avoid an extra waterfall on every segment // request, we pass the redirected URL instead of the original one. const url = new URL(route.canonicalUrl, location.origin); const nextUrl = routeKey.nextUrl; const requestKey = tree.requestKey; const normalizedRequestKey = requestKey === _segmentvalueencoding.ROOT_SEGMENT_REQUEST_KEY ? // `_index` instead of as an empty string. This should be treated as // an implementation detail and not as a stable part of the protocol. // It just needs to match the equivalent logic that happens when // prerendering the responses. It should not leak outside of Next.js. '/_index' : requestKey; const headers = { [_approuterheaders.RSC_HEADER]: '1', [_approuterheaders.NEXT_ROUTER_PREFETCH_HEADER]: '1', [_approuterheaders.NEXT_ROUTER_SEGMENT_PREFETCH_HEADER]: normalizedRequestKey }; if (nextUrl !== null) { headers[_approuterheaders.NEXT_URL] = nextUrl; } const requestUrl = ("TURBOPACK compile-time falsy", 0) ? "TURBOPACK unreachable" : url; try { const response = await fetchPrefetchResponse(requestUrl, headers); if (!response || !response.ok || response.status === 204 || // Cache miss // This checks whether the response was served from the per-segment cache, // rather than the old prefetching flow. If it fails, it implies that PPR // is disabled on this route. Theoretically this should never happen // because we only issue requests for segments once we've verified that // the route supports PPR. response.headers.get(_approuterheaders.NEXT_DID_POSTPONE_HEADER) !== '2' && // In output: "export" mode, we can't rely on response headers. But if // we receive a well-formed response, we can assume it's a static // response, because all data is static in this mode. !isOutputExportMode || !response.body) { // Server responded with an error, or with a miss. We should still cache // the response, but we can try again after 10 seconds. rejectSegmentCacheEntry(segmentCacheEntry, Date.now() + 10 * 1000); return null; } // Track when the network connection closes. const closed = (0, _promisewithresolvers.createPromiseWithResolvers)(); // Wrap the original stream in a new stream that never closes. That way the // Flight client doesn't error if there's a hanging promise. const prefetchStream = createPrefetchResponseStream(response.body, closed.resolve, function onResponseSizeUpdate(size) { (0, _cachemap.setSizeInCacheMap)(segmentCacheEntry, size); }); const serverData = await (0, _fetchserverresponse.createFromNextReadableStream)(prefetchStream, headers); if (serverData.buildId !== (0, _appbuildid.getAppBuildId)()) { // The server build does not match the client. Treat as a 404. During // an actual navigation, the router will trigger an MPA navigation. // TODO: Consider moving the build ID to a response header so we can check // it before decoding the response, and so there's one way of checking // across all response types. rejectSegmentCacheEntry(segmentCacheEntry, Date.now() + 10 * 1000); return null; } return { value: fulfillSegmentCacheEntry(segmentCacheEntry, serverData.rsc, serverData.loading, // So we use the stale time of the route. route.staleAt, serverData.isPartial), // Return a promise that resolves when the network connection closes, so // the scheduler can track the number of concurrent network connections. closed: closed.promise }; } catch (error) { // Either the connection itself failed, or something bad happened while // decoding the response. rejectSegmentCacheEntry(segmentCacheEntry, Date.now() + 10 * 1000); return null; } } async function fetchSegmentPrefetchesUsingDynamicRequest(task, route, fetchStrategy, dynamicRequestTree, spawnedEntries) { const key = task.key; const url = new URL(route.canonicalUrl, location.origin); const nextUrl = key.nextUrl; if (spawnedEntries.size === 1 && spawnedEntries.has(route.metadata.requestKey)) { // The only thing pending is the head. Instruct the server to // skip over everything else. dynamicRequestTree = MetadataOnlyRequestTree; } const headers = { [_approuterheaders.RSC_HEADER]: '1', [_approuterheaders.NEXT_ROUTER_STATE_TREE_HEADER]: (0, _flightdatahelpers.prepareFlightRouterStateForRequest)(dynamicRequestTree) }; if (nextUrl !== null) { headers[_approuterheaders.NEXT_URL] = nextUrl; } switch(fetchStrategy){ case _types.FetchStrategy.Full: { break; } case _types.FetchStrategy.PPRRuntime: { headers[_approuterheaders.NEXT_ROUTER_PREFETCH_HEADER] = '2'; break; } case _types.FetchStrategy.LoadingBoundary: { headers[_approuterheaders.NEXT_ROUTER_PREFETCH_HEADER] = '1'; break; } default: { fetchStrategy; } } try { const response = await fetchPrefetchResponse(url, headers); if (!response || !response.ok || !response.body) { // Server responded with an error, or with a miss. We should still cache // the response, but we can try again after 10 seconds. rejectSegmentEntriesIfStillPending(spawnedEntries, Date.now() + 10 * 1000); return null; } const renderedSearch = (0, _routeparams.getRenderedSearch)(response); if (renderedSearch !== route.renderedSearch) { // The search params that were used to render the target page are // different from the search params in the request URL. This only happens // when there's a dynamic rewrite in between the tree prefetch and the // data prefetch. // TODO: For now, since this is an edge case, we reject the prefetch, but // the proper way to handle this is to evict the stale route tree entry // then fill the cache with the new response. rejectSegmentEntriesIfStillPending(spawnedEntries, Date.now() + 10 * 1000); return null; } // Track when the network connection closes. const closed = (0, _promisewithresolvers.createPromiseWithResolvers)(); let fulfilledEntries = null; const prefetchStream = createPrefetchResponseStream(response.body, closed.resolve, function onResponseSizeUpdate(totalBytesReceivedSoFar) { // When processing a dynamic response, we don't know how large each // individual segment is, so approximate by assiging each segment // the average of the total response size. if (fulfilledEntries === null) { // Haven't received enough data yet to know which segments // were included. return; } const averageSize = totalBytesReceivedSoFar / fulfilledEntries.length; for (const entry of fulfilledEntries){ (0, _cachemap.setSizeInCacheMap)(entry, averageSize); } }); const serverData = await (0, _fetchserverresponse.createFromNextReadableStream)(prefetchStream, headers); const isResponsePartial = fetchStrategy === _types.FetchStrategy.PPRRuntime ? serverData.rp?.[0] === true : false; // Aside from writing the data into the cache, this function also returns // the entries that were fulfilled, so we can streamingly update their sizes // in the LRU as more data comes in. fulfilledEntries = writeDynamicRenderResponseIntoCache(Date.now(), task, fetchStrategy, response, serverData, isResponsePartial, route, spawnedEntries); // Return a promise that resolves when the network connection closes, so // the scheduler can track the number of concurrent network connections. return { value: null, closed: closed.promise }; } catch (error) { rejectSegmentEntriesIfStillPending(spawnedEntries, Date.now() + 10 * 1000); return null; } } function writeDynamicTreeResponseIntoCache(now, task, fetchStrategy, response, serverData, entry, couldBeIntercepted, canonicalUrl, routeIsPPREnabled) { // Get the URL that was used to render the target page. This may be different // from the URL in the request URL, if the page was rewritten. const renderedSearch = (0, _routeparams.getRenderedSearch)(response); const normalizedFlightDataResult = (0, _flightdatahelpers.normalizeFlightData)(serverData.f); if (// MPA navigation. typeof normalizedFlightDataResult === 'string' || normalizedFlightDataResult.length !== 1) { rejectRouteCacheEntry(entry, now + 10 * 1000); return; } const flightData = normalizedFlightDataResult[0]; if (!flightData.isRootRender) { // Unexpected response format. rejectRouteCacheEntry(entry, now + 10 * 1000); return; } const flightRouterState = flightData.tree; // For runtime prefetches, stale time is in the payload at rp[1]. // For other responses, fall back to the header. const staleTimeSeconds = typeof serverData.rp?.[1] === 'number' ? serverData.rp[1] : parseInt(response.headers.get(_approuterheaders.NEXT_ROUTER_STALE_TIME_HEADER) ?? '', 10); const staleTimeMs = !isNaN(staleTimeSeconds) ? getStaleTimeMs(staleTimeSeconds) : _navigatereducer.STATIC_STALETIME_MS; // If the response contains dynamic holes, then we must conservatively assume // that any individual segment might contain dynamic holes, and also the // head. If it did not contain dynamic holes, then we can assume every segment // and the head is completely static. const isResponsePartial = response.headers.get(_approuterheaders.NEXT_DID_POSTPONE_HEADER) === '1'; // Convert the server-sent data into the RouteTree format used by the // client cache. // // During this traversal, we accumulate additional data into this // "accumulator" object. const acc = { metadataVaryPath: null }; const routeTree = convertRootFlightRouterStateToRouteTree(flightRouterState, renderedSearch, acc); const metadataVaryPath = acc.metadataVaryPath; if (metadataVaryPath === null) { rejectRouteCacheEntry(entry, now + 10 * 1000); return; } const fulfilledEntry = fulfillRouteCacheEntry(entry, routeTree, metadataVaryPath, now + staleTimeMs, couldBeIntercepted, canonicalUrl, renderedSearch, routeIsPPREnabled); // If the server sent segment data as part of the response, we should write // it into the cache to prevent a second, redundant prefetch request. // // TODO: When `clientSegmentCache` is enabled, the server does not include // segment data when responding to a route tree prefetch request. However, // when `clientSegmentCache` is set to "client-only", and PPR is enabled (or // the page is fully static), the normal check is bypassed and the server // responds with the full page. This is a temporary situation until we can // remove the "client-only" option. Then, we can delete this function call. writeDynamicRenderResponseIntoCache(now, task, fetchStrategy, response, serverData, isResponsePartial, fulfilledEntry, null); } function rejectSegmentEntriesIfStillPending(entries, staleAt) { const fulfilledEntries = []; for (const entry of entries.values()){ if (entry.status === 1) { rejectSegmentCacheEntry(entry, staleAt); } else if (entry.status === 2) { fulfilledEntries.push(entry); } } return fulfilledEntries; } function writeDynamicRenderResponseIntoCache(now, task, fetchStrategy, response, serverData, isResponsePartial, route, spawnedEntries) { if (serverData.b !== (0, _appbuildid.getAppBuildId)()) { // The server build does not match the client. Treat as a 404. During // an actual navigation, the router will trigger an MPA navigation. // TODO: Consider moving the build ID to a response header so we can check // it before decoding the response, and so there's one way of checking // across all response types. if (spawnedEntries !== null) { rejectSegmentEntriesIfStillPending(spawnedEntries, now + 10 * 1000); } return null; } const flightDatas = (0, _flightdatahelpers.normalizeFlightData)(serverData.f); if (typeof flightDatas === 'string') { // This means navigating to this route will result in an MPA navigation. // TODO: We should cache this, too, so that the MPA navigation is immediate. return null; } // For runtime prefetches, stale time is in the payload at rp[1]. // For other responses, fall back to the header. const staleTimeSeconds = typeof serverData.rp?.[1] === 'number' ? serverData.rp[1] : parseInt(response.headers.get(_approuterheaders.NEXT_ROUTER_STALE_TIME_HEADER) ?? '', 10); const staleTimeMs = !isNaN(staleTimeSeconds) ? getStaleTimeMs(staleTimeSeconds) : _navigatereducer.STATIC_STALETIME_MS; const staleAt = now + staleTimeMs; for (const flightData of flightDatas){ const seedData = flightData.seedData; if (seedData !== null) { // The data sent by the server represents only a subtree of the app. We // need to find the part of the task tree that matches the response. // // segmentPath represents the parent path of subtree. It's a repeating // pattern of parallel route key and segment: // // [string, Segment, string, Segment, string, Segment, ...] const segmentPath = flightData.segmentPath; let tree = route.tree; for(let i = 0; i < segmentPath.length; i += 2){ const parallelRouteKey = segmentPath[i]; if (tree?.slots?.[parallelRouteKey] !== undefined) { tree = tree.slots[parallelRouteKey]; } else { if (spawnedEntries !== null) { rejectSegmentEntriesIfStillPending(spawnedEntries, now + 10 * 1000); } return null; } } writeSeedDataIntoCache(now, task, fetchStrategy, route, tree, staleAt, seedData, isResponsePartial, spawnedEntries); } const head = flightData.head; if (head !== null) { fulfillEntrySpawnedByRuntimePrefetch(now, fetchStrategy, route, head, null, flightData.isHeadPartial, staleAt, route.metadata, spawnedEntries); } } // Any entry that's still pending was intentionally not rendered by the // server, because it was inside the loading boundary. Mark them as rejected // so we know not to fetch them again. // TODO: If PPR is enabled on some routes but not others, then it's possible // that a different page is able to do a per-segment prefetch of one of the // segments we're marking as rejected here. We should mark on the segment // somehow that the reason for the rejection is because of a non-PPR prefetch. // That way a per-segment prefetch knows to disregard the rejection. if (spawnedEntries !== null) { const fulfilledEntries = rejectSegmentEntriesIfStillPending(spawnedEntries, now + 10 * 1000); return fulfilledEntries; } return null; } function writeSeedDataIntoCache(now, task, fetchStrategy, route, tree, staleAt, seedData, isResponsePartial, entriesOwnedByCurrentTask) { // This function is used to write the result of a runtime server request // (CacheNodeSeedData) into the prefetch cache. const rsc = seedData[0]; const loading = seedData[2]; const isPartial = rsc === null || isResponsePartial; fulfillEntrySpawnedByRuntimePrefetch(now, fetchStrategy, route, rsc, loading, isPartial, staleAt, tree, entriesOwnedByCurrentTask); // Recursively write the child data into the cache. const slots = tree.slots; if (slots !== null) { const seedDataChildren = seedData[1]; for(const parallelRouteKey in slots){ const childTree = slots[parallelRouteKey]; const childSeedData = seedDataChildren[parallelRouteKey]; if (childSeedData !== null && childSeedData !== undefined) { writeSeedDataIntoCache(now, task, fetchStrategy, route, childTree, staleAt, childSeedData, isResponsePartial, entriesOwnedByCurrentTask); } } } } function fulfillEntrySpawnedByRuntimePrefetch(now, fetchStrategy, route, rsc, loading, isPartial, staleAt, tree, entriesOwnedByCurrentTask) { // We should only write into cache entries that are owned by us. Or create // a new one and write into that. We must never write over an entry that was // created by a different task, because that causes data races. const ownedEntry = entriesOwnedByCurrentTask !== null ? entriesOwnedByCurrentTask.get(tree.requestKey) : undefined; if (ownedEntry !== undefined) { fulfillSegmentCacheEntry(ownedEntry, rsc, loading, staleAt, isPartial); } else { // There's no matching entry. Attempt to create a new one. const possiblyNewEntry = readOrCreateSegmentCacheEntry(now, fetchStrategy, route, tree); if (possiblyNewEntry.status === 0) { // Confirmed this is a new entry. We can fulfill it. const newEntry = possiblyNewEntry; fulfillSegmentCacheEntry(upgradeToPendingSegment(newEntry, fetchStrategy), rsc, loading, staleAt, isPartial); } else { // There was already an entry in the cache. But we may be able to // replace it with the new one from the server. const newEntry = fulfillSegmentCacheEntry(upgradeToPendingSegment(createDetachedSegmentCacheEntry(staleAt), fetchStrategy), rsc, loading, staleAt, isPartial); upsertSegmentEntry(now, (0, _varypath.getSegmentVaryPathForRequest)(fetchStrategy, tree), newEntry); } } } async function fetchPrefetchResponse(url, headers) { const fetchPriority = 'low'; // When issuing a prefetch request, don't immediately decode the response; we // use the lower level `createFromResponse` API instead because we need to do // some extra processing of the response stream. See // `createPrefetchResponseStream` for more details. const shouldImmediatelyDecode = false; const response = await (0, _fetchserverresponse.createFetch)(url, headers, fetchPriority, shouldImmediatelyDecode); if (!response.ok) { return null; } // Check the content type if ("TURBOPACK compile-time falsy", 0) { // In output: "export" mode, we relaxed about the content type, since it's // not Next.js that's serving the response. If the status is OK, assume the // response is valid. If it's not a valid response, the Flight client won't // be able to decode it, and we'll treat it as a miss. } else { const contentType = response.headers.get('content-type'); const isFlightResponse = contentType && contentType.startsWith(_approuterheaders.RSC_CONTENT_TYPE_HEADER); if (!isFlightResponse) { return null; } } return response; } function createPrefetchResponseStream(originalFlightStream, onStreamClose, onResponseSizeUpdate) { // When PPR is enabled, prefetch streams may contain references that never // resolve, because that's how we encode dynamic data access. In the decoded // object returned by the Flight client, these are reified into hanging // promises that suspend during render, which is effectively what we want. // The UI resolves when it switches to the dynamic data stream // (via useDeferredValue(dynamic, static)). // // However, the Flight implementation currently errors if the server closes // the response before all the references are resolved. As a cheat to work // around this, we wrap the original stream in a new stream that never closes, // and therefore doesn't error. // // While processing the original stream, we also incrementally update the size // of the cache entry in the LRU. let totalByteLength = 0; const reader = originalFlightStream.getReader(); return new ReadableStream({ async pull (controller) { while(true){ const { done, value } = await reader.read(); if (!done) { // Pass to the target stream and keep consuming the Flight response // from the server. controller.enqueue(value); // Incrementally update the size of the cache entry in the LRU. // NOTE: Since prefetch responses are delivered in a single chunk, // it's not really necessary to do this streamingly, but I'm doing it // anyway in case this changes in the future. totalByteLength += value.byteLength; onResponseSizeUpdate(totalByteLength); continue; } // The server stream has closed. Exit, but intentionally do not close // the target stream. We do notify the caller, though. onStreamClose(); return; } } }); } function addSegmentPathToUrlInOutputExportMode(url, segmentPath) { if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; return url; } function canNewFetchStrategyProvideMoreContent(currentStrategy, newStrategy) { return currentStrategy < newStrategy; } 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=cache.js.map }), "[project]/node_modules/next/dist/client/components/segment-cache/scheduler.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { cancelPrefetchTask: null, isPrefetchTaskDirty: null, pingPrefetchTask: null, reschedulePrefetchTask: null, schedulePrefetchTask: null, startRevalidationCooldown: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { cancelPrefetchTask: function() { return cancelPrefetchTask; }, isPrefetchTaskDirty: function() { return isPrefetchTaskDirty; }, pingPrefetchTask: function() { return pingPrefetchTask; }, reschedulePrefetchTask: function() { return reschedulePrefetchTask; }, schedulePrefetchTask: function() { return schedulePrefetchTask; }, startRevalidationCooldown: function() { return startRevalidationCooldown; } }); const _approutertypes = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/app-router-types.js [app-ssr] (ecmascript)"); const _matchsegments = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/match-segments.js [app-ssr] (ecmascript)"); const _cache = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/segment-cache/cache.js [app-ssr] (ecmascript)"); const _varypath = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/segment-cache/vary-path.js [app-ssr] (ecmascript)"); const _cachekey = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/segment-cache/cache-key.js [app-ssr] (ecmascript)"); const _types = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/segment-cache/types.js [app-ssr] (ecmascript)"); const _segment = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/segment.js [app-ssr] (ecmascript)"); const scheduleMicrotask = typeof queueMicrotask === 'function' ? queueMicrotask : (fn)=>Promise.resolve().then(fn).catch((error)=>setTimeout(()=>{ throw error; })); const taskHeap = []; let inProgressRequests = 0; let sortIdCounter = 0; let didScheduleMicrotask = false; // The most recently hovered (or touched, etc) link, i.e. the most recent task // scheduled at Intent priority. There's only ever a single task at Intent // priority at a time. We reserve special network bandwidth for this task only. let mostRecentlyHoveredLink = null; // CDN cache propagation delay after revalidation (in milliseconds) const REVALIDATION_COOLDOWN_MS = 300; // Timeout handle for the revalidation cooldown. When non-null, prefetch // requests are blocked to allow CDN cache propagation. let revalidationCooldownTimeoutHandle = null; function startRevalidationCooldown() { // Clear any existing timeout in case multiple revalidations happen // in quick succession. if (revalidationCooldownTimeoutHandle !== null) { clearTimeout(revalidationCooldownTimeoutHandle); } // Schedule the cooldown to expire after the delay. revalidationCooldownTimeoutHandle = setTimeout(()=>{ revalidationCooldownTimeoutHandle = null; // Retry the prefetch queue now that the cooldown has expired. ensureWorkIsScheduled(); }, REVALIDATION_COOLDOWN_MS); } function schedulePrefetchTask(key, treeAtTimeOfPrefetch, fetchStrategy, priority, onInvalidate) { // Spawn a new prefetch task const task = { key, treeAtTimeOfPrefetch, cacheVersion: (0, _cache.getCurrentCacheVersion)(), priority, phase: 1, hasBackgroundWork: false, spawnedRuntimePrefetches: null, fetchStrategy, sortId: sortIdCounter++, isCanceled: false, onInvalidate, _heapIndex: -1 }; trackMostRecentlyHoveredLink(task); heapPush(taskHeap, task); // Schedule an async task to process the queue. // // The main reason we process the queue in an async task is for batching. // It's common for a single JS task/event to trigger multiple prefetches. // By deferring to a microtask, we only process the queue once per JS task. // If they have different priorities, it also ensures they are processed in // the optimal order. ensureWorkIsScheduled(); return task; } function cancelPrefetchTask(task) { // Remove the prefetch task from the queue. If the task already completed, // then this is a no-op. // // We must also explicitly mark the task as canceled so that a blocked task // does not get added back to the queue when it's pinged by the network. task.isCanceled = true; heapDelete(taskHeap, task); } function reschedulePrefetchTask(task, treeAtTimeOfPrefetch, fetchStrategy, priority) { // Bump the prefetch task to the top of the queue, as if it were a fresh // task. This is essentially the same as canceling the task and scheduling // a new one, except it reuses the original object. // // The primary use case is to increase the priority of a Link-initated // prefetch on hover. // Un-cancel the task, in case it was previously canceled. task.isCanceled = false; task.phase = 1; // Assign a new sort ID to move it ahead of all other tasks at the same // priority level. (Higher sort IDs are processed first.) task.sortId = sortIdCounter++; task.priority = // Intent priority, even if the rescheduled priority is lower. task === mostRecentlyHoveredLink ? _types.PrefetchPriority.Intent : priority; task.treeAtTimeOfPrefetch = treeAtTimeOfPrefetch; task.fetchStrategy = fetchStrategy; trackMostRecentlyHoveredLink(task); if (task._heapIndex !== -1) { // The task is already in the queue. heapResift(taskHeap, task); } else { heapPush(taskHeap, task); } ensureWorkIsScheduled(); } function isPrefetchTaskDirty(task, nextUrl, tree) { // This is used to quickly bail out of a prefetch task if the result is // guaranteed to not have changed since the task was initiated. This is // strictly an optimization — theoretically, if it always returned true, no // behavior should change because a full prefetch task will effectively // perform the same checks. const currentCacheVersion = (0, _cache.getCurrentCacheVersion)(); return task.cacheVersion !== currentCacheVersion || task.treeAtTimeOfPrefetch !== tree || task.key.nextUrl !== nextUrl; } function trackMostRecentlyHoveredLink(task) { // Track the mostly recently hovered link, i.e. the most recently scheduled // task at Intent priority. There must only be one such task at a time. if (task.priority === _types.PrefetchPriority.Intent && task !== mostRecentlyHoveredLink) { if (mostRecentlyHoveredLink !== null) { // Bump the previously hovered link's priority down to Default. if (mostRecentlyHoveredLink.priority !== _types.PrefetchPriority.Background) { mostRecentlyHoveredLink.priority = _types.PrefetchPriority.Default; heapResift(taskHeap, mostRecentlyHoveredLink); } } mostRecentlyHoveredLink = task; } } function ensureWorkIsScheduled() { if (didScheduleMicrotask) { // Already scheduled a task to process the queue return; } didScheduleMicrotask = true; scheduleMicrotask(processQueueInMicrotask); } /** * Checks if we've exceeded the maximum number of concurrent prefetch requests, * to avoid saturating the browser's internal network queue. This is a * cooperative limit — prefetch tasks should check this before issuing * new requests. * * Also checks if we're within the revalidation cooldown window, during which * prefetch requests are delayed to allow CDN cache propagation. */ function hasNetworkBandwidth(task) { // Check if we're within the revalidation cooldown window if (revalidationCooldownTimeoutHandle !== null) { // We're within the cooldown window. Return false to prevent prefetching. // When the cooldown expires, the timeout will call ensureWorkIsScheduled() // to retry the queue. return false; } // TODO: Also check if there's an in-progress navigation. We should never // add prefetch requests to the network queue if an actual navigation is // taking place, to ensure there's sufficient bandwidth for render-blocking // data and resources. // TODO: Consider reserving some amount of bandwidth for static prefetches. if (task.priority === _types.PrefetchPriority.Intent) { // The most recently hovered link is allowed to exceed the default limit. // // The goal is to always have enough bandwidth to start a new prefetch // request when hovering over a link. // // However, because we don't abort in-progress requests, it's still possible // we'll run out of bandwidth. When links are hovered in quick succession, // there could be multiple hover requests running simultaneously. return inProgressRequests < 12; } // The default limit is lower than the limit for a hovered link. return inProgressRequests < 4; } function spawnPrefetchSubtask(prefetchSubtask) { // When the scheduler spawns an async task, we don't await its result. // Instead, the async task writes its result directly into the cache, then // pings the scheduler to continue. // // We process server responses streamingly, so the prefetch subtask will // likely resolve before we're finished receiving all the data. The subtask // result includes a promise that resolves once the network connection is // closed. The scheduler uses this to control network bandwidth by tracking // and limiting the number of concurrent requests. inProgressRequests++; return prefetchSubtask.then((result)=>{ if (result === null) { // The prefetch task errored before it could start processing the // network stream. Assume the connection is closed. onPrefetchConnectionClosed(); return null; } // Wait for the connection to close before freeing up more bandwidth. result.closed.then(onPrefetchConnectionClosed); return result.value; }); } function onPrefetchConnectionClosed() { inProgressRequests--; // Notify the scheduler that we have more bandwidth, and can continue // processing tasks. ensureWorkIsScheduled(); } function pingPrefetchTask(task) { // "Ping" a prefetch that's already in progress to notify it of new data. if (task.isCanceled || // Check if prefetch is already queued. task._heapIndex !== -1) { return; } // Add the task back to the queue. heapPush(taskHeap, task); ensureWorkIsScheduled(); } function processQueueInMicrotask() { didScheduleMicrotask = false; // We aim to minimize how often we read the current time. Since nearly all // functions in the prefetch scheduler are synchronous, we can read the time // once and pass it as an argument wherever it's needed. const now = Date.now(); // Process the task queue until we run out of network bandwidth. let task = heapPeek(taskHeap); while(task !== null && hasNetworkBandwidth(task)){ task.cacheVersion = (0, _cache.getCurrentCacheVersion)(); const exitStatus = pingRoute(now, task); // These fields are only valid for a single attempt. Reset them after each // iteration of the task queue. const hasBackgroundWork = task.hasBackgroundWork; task.hasBackgroundWork = false; task.spawnedRuntimePrefetches = null; switch(exitStatus){ case 0: // The task yielded because there are too many requests in progress. // Stop processing tasks until we have more bandwidth. return; case 1: // The task is blocked. It needs more data before it can proceed. // Keep the task out of the queue until the server responds. heapPop(taskHeap); // Continue to the next task task = heapPeek(taskHeap); continue; case 2: if (task.phase === 1) { // Finished prefetching the route tree. Proceed to prefetching // the segments. task.phase = 0; heapResift(taskHeap, task); } else if (hasBackgroundWork) { // The task spawned additional background work. Reschedule the task // at background priority. task.priority = _types.PrefetchPriority.Background; heapResift(taskHeap, task); } else { // The prefetch is complete. Continue to the next task. heapPop(taskHeap); } task = heapPeek(taskHeap); continue; default: exitStatus; } } } /** * Check this during a prefetch task to determine if background work can be * performed. If so, it evaluates to `true`. Otherwise, it returns `false`, * while also scheduling a background task to run later. Usage: * * @example * if (background(task)) { * // Perform background-pri work * } */ function background(task) { if (task.priority === _types.PrefetchPriority.Background) { return true; } task.hasBackgroundWork = true; return false; } function pingRoute(now, task) { const key = task.key; const route = (0, _cache.readOrCreateRouteCacheEntry)(now, task, key); const exitStatus = pingRootRouteTree(now, task, route); if (exitStatus !== 0 && key.search !== '') { // If the URL has a non-empty search string, also prefetch the pathname // without the search string. We use the searchless route tree as a base for // optimistic routing; see requestOptimisticRouteCacheEntry for details. // // Note that we don't need to prefetch any of the segment data. Just the // route tree. // // TODO: This is a temporary solution; the plan is to replace this by adding // a wildcard lookup method to the TupleMap implementation. This is // non-trivial to implement because it needs to account for things like // fallback route entries, hence this temporary workaround. const url = new URL(key.pathname, location.origin); const keyWithoutSearch = (0, _cachekey.createCacheKey)(url.href, key.nextUrl); const routeWithoutSearch = (0, _cache.readOrCreateRouteCacheEntry)(now, task, keyWithoutSearch); switch(routeWithoutSearch.status){ case _cache.EntryStatus.Empty: { if (background(task)) { routeWithoutSearch.status = _cache.EntryStatus.Pending; spawnPrefetchSubtask((0, _cache.fetchRouteOnCacheMiss)(routeWithoutSearch, task, keyWithoutSearch)); } break; } case _cache.EntryStatus.Pending: case _cache.EntryStatus.Fulfilled: case _cache.EntryStatus.Rejected: { break; } default: routeWithoutSearch; } } return exitStatus; } function pingRootRouteTree(now, task, route) { switch(route.status){ case _cache.EntryStatus.Empty: { // Route is not yet cached, and there's no request already in progress. // Spawn a task to request the route, load it into the cache, and ping // the task to continue. // TODO: There are multiple strategies in the API for prefetching // a route. Currently we've only implemented the main one: per-segment, // static-data only. // // There's also `` // which prefetch both static *and* dynamic data. // Similarly, we need to fallback to the old, per-page // behavior if PPR is disabled for a route (via the incremental opt-in). // // Those cases will be handled here. spawnPrefetchSubtask((0, _cache.fetchRouteOnCacheMiss)(route, task, task.key)); // If the request takes longer than a minute, a subsequent request should // retry instead of waiting for this one. When the response is received, // this value will be replaced by a new value based on the stale time sent // from the server. // TODO: We should probably also manually abort the fetch task, to reclaim // server bandwidth. route.staleAt = now + 60 * 1000; // Upgrade to Pending so we know there's already a request in progress route.status = _cache.EntryStatus.Pending; // Intentional fallthrough to the Pending branch } case _cache.EntryStatus.Pending: { // Still pending. We can't start prefetching the segments until the route // tree has loaded. Add the task to the set of blocked tasks so that it // is notified when the route tree is ready. const blockedTasks = route.blockedTasks; if (blockedTasks === null) { route.blockedTasks = new Set([ task ]); } else { blockedTasks.add(task); } return 1; } case _cache.EntryStatus.Rejected: { // Route tree failed to load. Treat as a 404. return 2; } case _cache.EntryStatus.Fulfilled: { if (task.phase !== 0) { // Do not prefetch segment data until we've entered the segment phase. return 2; } // Recursively fill in the segment tree. if (!hasNetworkBandwidth(task)) { // Stop prefetching segments until there's more bandwidth. return 0; } const tree = route.tree; // A task's fetch strategy gets set to `PPR` for any "auto" prefetch. // If it turned out that the route isn't PPR-enabled, we need to use `LoadingBoundary` instead. // We don't need to do this for runtime prefetches, because those are only available in // `cacheComponents`, where every route is PPR. const fetchStrategy = task.fetchStrategy === _types.FetchStrategy.PPR ? route.isPPREnabled ? _types.FetchStrategy.PPR : _types.FetchStrategy.LoadingBoundary : task.fetchStrategy; switch(fetchStrategy){ case _types.FetchStrategy.PPR: { // For Cache Components pages, each segment may be prefetched // statically or using a runtime request, based on various // configurations and heuristics. We'll do this in two passes: first // traverse the tree and perform all the static prefetches. // // Then, if there are any segments that need a runtime request, // do another pass to perform a runtime prefetch. pingStaticHead(now, task, route); const exitStatus = pingSharedPartOfCacheComponentsTree(now, task, route, task.treeAtTimeOfPrefetch, tree); if (exitStatus === 0) { // Child yielded without finishing. return 0; } const spawnedRuntimePrefetches = task.spawnedRuntimePrefetches; if (spawnedRuntimePrefetches !== null) { // During the first pass, we discovered segments that require a // runtime prefetch. Do a second pass to construct a request tree. const spawnedEntries = new Map(); pingRuntimeHead(now, task, route, spawnedEntries, _types.FetchStrategy.PPRRuntime); const requestTree = pingRuntimePrefetches(now, task, route, tree, spawnedRuntimePrefetches, spawnedEntries); let needsDynamicRequest = spawnedEntries.size > 0; if (needsDynamicRequest) { // Perform a dynamic prefetch request and populate the cache with // the result. spawnPrefetchSubtask((0, _cache.fetchSegmentPrefetchesUsingDynamicRequest)(task, route, _types.FetchStrategy.PPRRuntime, requestTree, spawnedEntries)); } } return 2; } case _types.FetchStrategy.Full: case _types.FetchStrategy.PPRRuntime: case _types.FetchStrategy.LoadingBoundary: { // Prefetch multiple segments using a single dynamic request. // TODO: We can consolidate this branch with previous one by modeling // it as if the first segment in the new tree has runtime prefetching // enabled. Will do this as a follow-up refactor. Might want to remove // the special metatdata case below first. In the meantime, it's not // really that much duplication, just would be nice to remove one of // these codepaths. const spawnedEntries = new Map(); pingRuntimeHead(now, task, route, spawnedEntries, fetchStrategy); const dynamicRequestTree = diffRouteTreeAgainstCurrent(now, task, route, task.treeAtTimeOfPrefetch, tree, spawnedEntries, fetchStrategy); let needsDynamicRequest = spawnedEntries.size > 0; if (needsDynamicRequest) { spawnPrefetchSubtask((0, _cache.fetchSegmentPrefetchesUsingDynamicRequest)(task, route, fetchStrategy, dynamicRequestTree, spawnedEntries)); } return 2; } default: fetchStrategy; } break; } default: { route; } } return 2; } function pingStaticHead(now, task, route) { // The Head data for a page (metadata, viewport) is not really a route // segment, in the sense that it doesn't appear in the route tree. But we // store it in the cache as if it were, using a special key. pingStaticSegmentData(now, task, route, (0, _cache.readOrCreateSegmentCacheEntry)(now, _types.FetchStrategy.PPR, route, route.metadata), task.key, route.metadata); } function pingRuntimeHead(now, task, route, spawnedEntries, fetchStrategy) { pingRouteTreeAndIncludeDynamicData(now, task, route, route.metadata, false, spawnedEntries, // and LoadingBoundary fetchStrategy === _types.FetchStrategy.LoadingBoundary ? _types.FetchStrategy.Full : fetchStrategy); } // TODO: Rename dynamic -> runtime throughout this module function pingSharedPartOfCacheComponentsTree(now, task, route, oldTree, newTree) { // When Cache Components is enabled (or PPR, or a fully static route when PPR // is disabled; those cases are treated equivalently to Cache Components), we // start by prefetching each segment individually. Once we reach the "new" // part of the tree — the part that doesn't exist on the current page — we // may choose to switch to a runtime prefetch instead, based on the // information sent by the server in the route tree. // // The traversal starts in the "shared" part of the tree. Once we reach the // "new" part of the tree, we switch to a different traversal, // pingNewPartOfCacheComponentsTree. // Prefetch this segment's static data. const segment = (0, _cache.readOrCreateSegmentCacheEntry)(now, task.fetchStrategy, route, newTree); pingStaticSegmentData(now, task, route, segment, task.key, newTree); // Recursively ping the children. const oldTreeChildren = oldTree[1]; const newTreeChildren = newTree.slots; if (newTreeChildren !== null) { for(const parallelRouteKey in newTreeChildren){ if (!hasNetworkBandwidth(task)) { // Stop prefetching segments until there's more bandwidth. return 0; } const newTreeChild = newTreeChildren[parallelRouteKey]; const newTreeChildSegment = newTreeChild.segment; const oldTreeChild = oldTreeChildren[parallelRouteKey]; const oldTreeChildSegment = oldTreeChild?.[0]; let childExitStatus; if (oldTreeChildSegment !== undefined && doesCurrentSegmentMatchCachedSegment(route, newTreeChildSegment, oldTreeChildSegment)) { // We're still in the "shared" part of the tree. childExitStatus = pingSharedPartOfCacheComponentsTree(now, task, route, oldTreeChild, newTreeChild); } else { // We've entered the "new" part of the tree. Switch // traversal functions. childExitStatus = pingNewPartOfCacheComponentsTree(now, task, route, newTreeChild); } if (childExitStatus === 0) { // Child yielded without finishing. return 0; } } } return 2; } function pingNewPartOfCacheComponentsTree(now, task, route, tree) { // We're now prefetching in the "new" part of the tree, the part that doesn't // exist on the current page. (In other words, we're deeper than the // shared layouts.) Segments in here default to being prefetched statically. // However, if the server instructs us to, we may switch to a runtime // prefetch instead. Traverse the tree and check at each segment. if (tree.hasRuntimePrefetch) { // This route has a runtime prefetch response. Since we're below the shared // layout, everything from this point should be prefetched using a single, // combined runtime request, rather than using per-segment static requests. // This is true even if some of the child segments are known to be fully // static — once we've decided to perform a runtime prefetch, we might as // well respond with the static segments in the same roundtrip. (That's how // regular navigations work, too.) We'll still skip over segments that are // already cached, though. // // It's the server's responsibility to set a reasonable value of // `hasRuntimePrefetch`. Currently it's user-defined, but eventually, the // server may send a value of `false` even if the user opts in, if it // determines during build that the route is always fully static. There are // more optimizations we can do once we implement fallback param // tracking, too. // // Use the task object to collect the segments that need a runtime prefetch. // This will signal to the outer task queue that a second traversal is // required to construct a request tree. if (task.spawnedRuntimePrefetches === null) { task.spawnedRuntimePrefetches = new Set([ tree.requestKey ]); } else { task.spawnedRuntimePrefetches.add(tree.requestKey); } // Then exit the traversal without prefetching anything further. return 2; } // This segment should not be runtime prefetched. Prefetch its static data. const segment = (0, _cache.readOrCreateSegmentCacheEntry)(now, task.fetchStrategy, route, tree); pingStaticSegmentData(now, task, route, segment, task.key, tree); if (tree.slots !== null) { if (!hasNetworkBandwidth(task)) { // Stop prefetching segments until there's more bandwidth. return 0; } // Recursively ping the children. for(const parallelRouteKey in tree.slots){ const childTree = tree.slots[parallelRouteKey]; const childExitStatus = pingNewPartOfCacheComponentsTree(now, task, route, childTree); if (childExitStatus === 0) { // Child yielded without finishing. return 0; } } } // This segment and all its children have finished prefetching. return 2; } function diffRouteTreeAgainstCurrent(now, task, route, oldTree, newTree, spawnedEntries, fetchStrategy) { // This is a single recursive traversal that does multiple things: // - Finds the parts of the target route (newTree) that are not part of // of the current page (oldTree) by diffing them, using the same algorithm // as a real navigation. // - Constructs a request tree (FlightRouterState) that describes which // segments need to be prefetched and which ones are already cached. // - Creates a set of pending cache entries for the segments that need to // be prefetched, so that a subsequent prefetch task does not request the // same segments again. const oldTreeChildren = oldTree[1]; const newTreeChildren = newTree.slots; let requestTreeChildren = {}; if (newTreeChildren !== null) { for(const parallelRouteKey in newTreeChildren){ const newTreeChild = newTreeChildren[parallelRouteKey]; const newTreeChildSegment = newTreeChild.segment; const oldTreeChild = oldTreeChildren[parallelRouteKey]; const oldTreeChildSegment = oldTreeChild?.[0]; if (oldTreeChildSegment !== undefined && doesCurrentSegmentMatchCachedSegment(route, newTreeChildSegment, oldTreeChildSegment)) { // This segment is already part of the current route. Keep traversing. const requestTreeChild = diffRouteTreeAgainstCurrent(now, task, route, oldTreeChild, newTreeChild, spawnedEntries, fetchStrategy); requestTreeChildren[parallelRouteKey] = requestTreeChild; } else { // This segment is not part of the current route. We're entering a // part of the tree that we need to prefetch (unless everything is // already cached). switch(fetchStrategy){ case _types.FetchStrategy.LoadingBoundary: { // When PPR is disabled, we can't prefetch per segment. We must // fallback to the old prefetch behavior and send a dynamic request. // Only routes that include a loading boundary can be prefetched in // this way. // // This is simlar to a "full" prefetch, but we're much more // conservative about which segments to include in the request. // // The server will only render up to the first loading boundary // inside new part of the tree. If there's no loading boundary // anywhere in the tree, the server will never return any data, so // we can skip the request. const subtreeHasLoadingBoundary = newTreeChild.hasLoadingBoundary !== _approutertypes.HasLoadingBoundary.SubtreeHasNoLoadingBoundary; const requestTreeChild = subtreeHasLoadingBoundary ? pingPPRDisabledRouteTreeUpToLoadingBoundary(now, task, route, newTreeChild, null, spawnedEntries) : (0, _cache.convertRouteTreeToFlightRouterState)(newTreeChild); requestTreeChildren[parallelRouteKey] = requestTreeChild; break; } case _types.FetchStrategy.PPRRuntime: { // This is a runtime prefetch. Fetch all cacheable data in the tree, // not just the static PPR shell. const requestTreeChild = pingRouteTreeAndIncludeDynamicData(now, task, route, newTreeChild, false, spawnedEntries, fetchStrategy); requestTreeChildren[parallelRouteKey] = requestTreeChild; break; } case _types.FetchStrategy.Full: { // This is a "full" prefetch. Fetch all the data in the tree, both // static and dynamic. We issue roughly the same request that we // would during a real navigation. The goal is that once the // navigation occurs, the router should not have to fetch any // additional data. // // Although the response will include dynamic data, opting into a // Full prefetch — via — implicitly // instructs the cache to treat the response as "static", or non- // dynamic, since the whole point is to cache it for // future navigations. // // Construct a tree (currently a FlightRouterState) that represents // which segments need to be prefetched and which ones are already // cached. If the tree is empty, then we can exit. Otherwise, we'll // send the request tree to the server and use the response to // populate the segment cache. const requestTreeChild = pingRouteTreeAndIncludeDynamicData(now, task, route, newTreeChild, false, spawnedEntries, fetchStrategy); requestTreeChildren[parallelRouteKey] = requestTreeChild; break; } default: fetchStrategy; } } } } const requestTree = [ newTree.segment, requestTreeChildren, null, null, newTree.isRootLayout ]; return requestTree; } function pingPPRDisabledRouteTreeUpToLoadingBoundary(now, task, route, tree, refetchMarkerContext, spawnedEntries) { // This function is similar to pingRouteTreeAndIncludeDynamicData, except the // server is only going to return a minimal loading state — it will stop // rendering at the first loading boundary. Whereas a Full prefetch is // intentionally aggressive and tries to pretfetch all the data that will be // needed for a navigation, a LoadingBoundary prefetch is much more // conservative. For example, it will omit from the request tree any segment // that is already cached, regardles of whether it's partial or full. By // contrast, a Full prefetch will refetch partial segments. // "inside-shared-layout" tells the server where to start looking for a // loading boundary. let refetchMarker = refetchMarkerContext === null ? 'inside-shared-layout' : null; const segment = (0, _cache.readOrCreateSegmentCacheEntry)(now, task.fetchStrategy, route, tree); switch(segment.status){ case _cache.EntryStatus.Empty: { // This segment is not cached. Add a refetch marker so the server knows // to start rendering here. // TODO: Instead of a "refetch" marker, we could just omit this subtree's // FlightRouterState from the request tree. I think this would probably // already work even without any updates to the server. For consistency, // though, I'll send the full tree and we'll look into this later as part // of a larger redesign of the request protocol. // Add the pending cache entry to the result map. spawnedEntries.set(tree.requestKey, (0, _cache.upgradeToPendingSegment)(segment, // might not include it in the pending response. If another route is able // to issue a per-segment request, we'll do that in the background. _types.FetchStrategy.LoadingBoundary)); if (refetchMarkerContext !== 'refetch') { refetchMarker = refetchMarkerContext = 'refetch'; } else { // There's already a parent with a refetch marker, so we don't need // to add another one. } break; } case _cache.EntryStatus.Fulfilled: { // The segment is already cached. const segmentHasLoadingBoundary = tree.hasLoadingBoundary === _approutertypes.HasLoadingBoundary.SegmentHasLoadingBoundary; if (segmentHasLoadingBoundary) { // This segment has a loading boundary, which means the server won't // render its children. So there's nothing left to prefetch along this // path. We can bail out. return (0, _cache.convertRouteTreeToFlightRouterState)(tree); } break; } case _cache.EntryStatus.Pending: { break; } case _cache.EntryStatus.Rejected: { break; } default: segment; } const requestTreeChildren = {}; if (tree.slots !== null) { for(const parallelRouteKey in tree.slots){ const childTree = tree.slots[parallelRouteKey]; requestTreeChildren[parallelRouteKey] = pingPPRDisabledRouteTreeUpToLoadingBoundary(now, task, route, childTree, refetchMarkerContext, spawnedEntries); } } const requestTree = [ tree.segment, requestTreeChildren, null, refetchMarker, tree.isRootLayout ]; return requestTree; } function pingRouteTreeAndIncludeDynamicData(now, task, route, tree, isInsideRefetchingParent, spawnedEntries, fetchStrategy) { // The tree we're constructing is the same shape as the tree we're navigating // to. But even though this is a "new" tree, some of the individual segments // may be cached as a result of other route prefetches. // // So we need to find the first uncached segment along each path add an // explicit "refetch" marker so the server knows where to start rendering. // Once the server starts rendering along a path, it keeps rendering the // entire subtree. const segment = (0, _cache.readOrCreateSegmentCacheEntry)(now, // and we have to use the former here. // We can have a task with `FetchStrategy.PPR` where some of its segments are configured to // always use runtime prefetching (via `export const prefetch`), and those should check for // entries that include search params. fetchStrategy, route, tree); let spawnedSegment = null; switch(segment.status){ case _cache.EntryStatus.Empty: { // This segment is not cached. Include it in the request. spawnedSegment = (0, _cache.upgradeToPendingSegment)(segment, fetchStrategy); break; } case _cache.EntryStatus.Fulfilled: { // The segment is already cached. if (segment.isPartial && (0, _cache.canNewFetchStrategyProvideMoreContent)(segment.fetchStrategy, fetchStrategy)) { // The cached segment contains dynamic holes, and was prefetched using a less specific strategy than the current one. // This means we're in one of these cases: // - we have a static prefetch, and we're doing a runtime prefetch // - we have a static or runtime prefetch, and we're doing a Full prefetch (or a navigation). // In either case, we need to include it in the request to get a more specific (or full) version. spawnedSegment = pingFullSegmentRevalidation(now, route, tree, fetchStrategy); } break; } case _cache.EntryStatus.Pending: case _cache.EntryStatus.Rejected: { // There's either another prefetch currently in progress, or the previous // attempt failed. If the new strategy can provide more content, fetch it again. if ((0, _cache.canNewFetchStrategyProvideMoreContent)(segment.fetchStrategy, fetchStrategy)) { spawnedSegment = pingFullSegmentRevalidation(now, route, tree, fetchStrategy); } break; } default: segment; } const requestTreeChildren = {}; if (tree.slots !== null) { for(const parallelRouteKey in tree.slots){ const childTree = tree.slots[parallelRouteKey]; requestTreeChildren[parallelRouteKey] = pingRouteTreeAndIncludeDynamicData(now, task, route, childTree, isInsideRefetchingParent || spawnedSegment !== null, spawnedEntries, fetchStrategy); } } if (spawnedSegment !== null) { // Add the pending entry to the result map. spawnedEntries.set(tree.requestKey, spawnedSegment); } // Don't bother to add a refetch marker if one is already present in a parent. const refetchMarker = !isInsideRefetchingParent && spawnedSegment !== null ? 'refetch' : null; const requestTree = [ tree.segment, requestTreeChildren, null, refetchMarker, tree.isRootLayout ]; return requestTree; } function pingRuntimePrefetches(now, task, route, tree, spawnedRuntimePrefetches, spawnedEntries) { // Construct a request tree (FlightRouterState) for a runtime prefetch. If // a segment is part of the runtime prefetch, the tree is constructed by // diffing against what's already in the prefetch cache. Otherwise, we send // a regular FlightRouterState with no special markers. // // See pingRouteTreeAndIncludeDynamicData for details. if (spawnedRuntimePrefetches.has(tree.requestKey)) { // This segment needs a runtime prefetch. return pingRouteTreeAndIncludeDynamicData(now, task, route, tree, false, spawnedEntries, _types.FetchStrategy.PPRRuntime); } let requestTreeChildren = {}; const slots = tree.slots; if (slots !== null) { for(const parallelRouteKey in slots){ const childTree = slots[parallelRouteKey]; requestTreeChildren[parallelRouteKey] = pingRuntimePrefetches(now, task, route, childTree, spawnedRuntimePrefetches, spawnedEntries); } } // This segment is not part of the runtime prefetch. Clone the base tree. const requestTree = [ tree.segment, requestTreeChildren, null, null ]; return requestTree; } function pingStaticSegmentData(now, task, route, segment, routeKey, tree) { switch(segment.status){ case _cache.EntryStatus.Empty: // Upgrade to Pending so we know there's already a request in progress spawnPrefetchSubtask((0, _cache.fetchSegmentOnCacheMiss)(route, (0, _cache.upgradeToPendingSegment)(segment, _types.FetchStrategy.PPR), routeKey, tree)); break; case _cache.EntryStatus.Pending: { // There's already a request in progress. Depending on what kind of // request it is, we may want to revalidate it. switch(segment.fetchStrategy){ case _types.FetchStrategy.PPR: case _types.FetchStrategy.PPRRuntime: case _types.FetchStrategy.Full: break; case _types.FetchStrategy.LoadingBoundary: // There's a pending request, but because it's using the old // prefetching strategy, we can't be sure if it will be fulfilled by // the response — it might be inside the loading boundary. Perform // a revalidation, but because it's speculative, wait to do it at // background priority. if (background(task)) { // TODO: Instead of speculatively revalidating, consider including // `hasLoading` in the route tree prefetch response. pingPPRSegmentRevalidation(now, route, routeKey, tree); } break; default: segment.fetchStrategy; } break; } case _cache.EntryStatus.Rejected: { // The existing entry in the cache was rejected. Depending on how it // was originally fetched, we may or may not want to revalidate it. switch(segment.fetchStrategy){ case _types.FetchStrategy.PPR: case _types.FetchStrategy.PPRRuntime: case _types.FetchStrategy.Full: break; case _types.FetchStrategy.LoadingBoundary: // There's a rejected entry, but it was fetched using the loading // boundary strategy. So the reason it wasn't returned by the server // might just be because it was inside a loading boundary. Or because // there was a dynamic rewrite. Revalidate it using the per- // segment strategy. // // Because a rejected segment will definitely prevent the segment (and // all of its children) from rendering, we perform this revalidation // immediately instead of deferring it to a background task. pingPPRSegmentRevalidation(now, route, routeKey, tree); break; default: segment.fetchStrategy; } break; } case _cache.EntryStatus.Fulfilled: break; default: segment; } // Segments do not have dependent tasks, so once the prefetch is initiated, // there's nothing else for us to do (except write the server data into the // entry, which is handled by `fetchSegmentOnCacheMiss`). } function pingPPRSegmentRevalidation(now, route, routeKey, tree) { const revalidatingSegment = (0, _cache.readOrCreateRevalidatingSegmentEntry)(now, _types.FetchStrategy.PPR, route, tree); switch(revalidatingSegment.status){ case _cache.EntryStatus.Empty: // Spawn a prefetch request and upsert the segment into the cache // upon completion. upsertSegmentOnCompletion(spawnPrefetchSubtask((0, _cache.fetchSegmentOnCacheMiss)(route, (0, _cache.upgradeToPendingSegment)(revalidatingSegment, _types.FetchStrategy.PPR), routeKey, tree)), (0, _varypath.getSegmentVaryPathForRequest)(_types.FetchStrategy.PPR, tree)); break; case _cache.EntryStatus.Pending: break; case _cache.EntryStatus.Fulfilled: case _cache.EntryStatus.Rejected: break; default: revalidatingSegment; } } function pingFullSegmentRevalidation(now, route, tree, fetchStrategy) { const revalidatingSegment = (0, _cache.readOrCreateRevalidatingSegmentEntry)(now, fetchStrategy, route, tree); if (revalidatingSegment.status === _cache.EntryStatus.Empty) { // During a Full/PPRRuntime prefetch, a single dynamic request is made for all the // segments that we need. So we don't initiate a request here directly. By // returning a pending entry from this function, it signals to the caller // that this segment should be included in the request that's sent to // the server. const pendingSegment = (0, _cache.upgradeToPendingSegment)(revalidatingSegment, fetchStrategy); upsertSegmentOnCompletion((0, _cache.waitForSegmentCacheEntry)(pendingSegment), (0, _varypath.getSegmentVaryPathForRequest)(fetchStrategy, tree)); return pendingSegment; } else { // There's already a revalidation in progress. const nonEmptyRevalidatingSegment = revalidatingSegment; if ((0, _cache.canNewFetchStrategyProvideMoreContent)(nonEmptyRevalidatingSegment.fetchStrategy, fetchStrategy)) { // The existing revalidation was fetched using a less specific strategy. // Reset it and start a new revalidation. const emptySegment = (0, _cache.overwriteRevalidatingSegmentCacheEntry)(fetchStrategy, route, tree); const pendingSegment = (0, _cache.upgradeToPendingSegment)(emptySegment, fetchStrategy); upsertSegmentOnCompletion((0, _cache.waitForSegmentCacheEntry)(pendingSegment), (0, _varypath.getSegmentVaryPathForRequest)(fetchStrategy, tree)); return pendingSegment; } switch(nonEmptyRevalidatingSegment.status){ case _cache.EntryStatus.Pending: // There's already an in-progress prefetch that includes this segment. return null; case _cache.EntryStatus.Fulfilled: case _cache.EntryStatus.Rejected: // A previous revalidation attempt finished, but we chose not to replace // the existing entry in the cache. Don't try again until or unless the // revalidation entry expires. return null; default: nonEmptyRevalidatingSegment; return null; } } } const noop = ()=>{}; function upsertSegmentOnCompletion(promise, varyPath) { // Wait for a segment to finish loading, then upsert it into the cache promise.then((fulfilled)=>{ if (fulfilled !== null) { // Received new data. Attempt to replace the existing entry in the cache. (0, _cache.upsertSegmentEntry)(Date.now(), varyPath, fulfilled); } }, noop); } function doesCurrentSegmentMatchCachedSegment(route, currentSegment, cachedSegment) { if (cachedSegment === _segment.PAGE_SEGMENT_KEY) { // In the FlightRouterState stored by the router, the page segment has the // rendered search params appended to the name of the segment. In the // prefetch cache, however, this is stored separately. So, when comparing // the router's current FlightRouterState to the cached FlightRouterState, // we need to make sure we compare both parts of the segment. // TODO: This is not modeled clearly. We use the same type, // FlightRouterState, for both the CacheNode tree _and_ the prefetch cache // _and_ the server response format, when conceptually those are three // different things and treated in different ways. We should encode more of // this information into the type design so mistakes are less likely. return currentSegment === (0, _segment.addSearchParamsIfPageSegment)(_segment.PAGE_SEGMENT_KEY, Object.fromEntries(new URLSearchParams(route.renderedSearch))); } // Non-page segments are compared using the same function as the server return (0, _matchsegments.matchSegment)(cachedSegment, currentSegment); } // ----------------------------------------------------------------------------- // The remainder of the module is a MinHeap implementation. Try not to put any // logic below here unless it's related to the heap algorithm. We can extract // this to a separate module if/when we need multiple kinds of heaps. // ----------------------------------------------------------------------------- function compareQueuePriority(a, b) { // Since the queue is a MinHeap, this should return a positive number if b is // higher priority than a, and a negative number if a is higher priority // than b. // `priority` is an integer, where higher numbers are higher priority. const priorityDiff = b.priority - a.priority; if (priorityDiff !== 0) { return priorityDiff; } // If the priority is the same, check which phase the prefetch is in — is it // prefetching the route tree, or the segments? Route trees are prioritized. const phaseDiff = b.phase - a.phase; if (phaseDiff !== 0) { return phaseDiff; } // Finally, check the insertion order. `sortId` is an incrementing counter // assigned to prefetches. We want to process the newest prefetches first. return b.sortId - a.sortId; } function heapPush(heap, node) { const index = heap.length; heap.push(node); node._heapIndex = index; heapSiftUp(heap, node, index); } function heapPeek(heap) { return heap.length === 0 ? null : heap[0]; } function heapPop(heap) { if (heap.length === 0) { return null; } const first = heap[0]; first._heapIndex = -1; const last = heap.pop(); if (last !== first) { heap[0] = last; last._heapIndex = 0; heapSiftDown(heap, last, 0); } return first; } function heapDelete(heap, node) { const index = node._heapIndex; if (index !== -1) { node._heapIndex = -1; if (heap.length !== 0) { const last = heap.pop(); if (last !== node) { heap[index] = last; last._heapIndex = index; heapSiftDown(heap, last, index); } } } } function heapResift(heap, node) { const index = node._heapIndex; if (index !== -1) { if (index === 0) { heapSiftDown(heap, node, 0); } else { const parentIndex = index - 1 >>> 1; const parent = heap[parentIndex]; if (compareQueuePriority(parent, node) > 0) { // The parent is larger. Sift up. heapSiftUp(heap, node, index); } else { // The parent is smaller (or equal). Sift down. heapSiftDown(heap, node, index); } } } } function heapSiftUp(heap, node, i) { let index = i; while(index > 0){ const parentIndex = index - 1 >>> 1; const parent = heap[parentIndex]; if (compareQueuePriority(parent, node) > 0) { // The parent is larger. Swap positions. heap[parentIndex] = node; node._heapIndex = parentIndex; heap[index] = parent; parent._heapIndex = index; index = parentIndex; } else { // The parent is smaller. Exit. return; } } } function heapSiftDown(heap, node, i) { let index = i; const length = heap.length; const halfLength = length >>> 1; while(index < halfLength){ const leftIndex = (index + 1) * 2 - 1; const left = heap[leftIndex]; const rightIndex = leftIndex + 1; const right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those. if (compareQueuePriority(left, node) < 0) { if (rightIndex < length && compareQueuePriority(right, left) < 0) { heap[index] = right; right._heapIndex = index; heap[rightIndex] = node; node._heapIndex = rightIndex; index = rightIndex; } else { heap[index] = left; left._heapIndex = index; heap[leftIndex] = node; node._heapIndex = leftIndex; index = leftIndex; } } else if (rightIndex < length && compareQueuePriority(right, node) < 0) { heap[index] = right; right._heapIndex = index; heap[rightIndex] = node; node._heapIndex = rightIndex; index = rightIndex; } else { // Neither child is smaller. Exit. return; } } } 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=scheduler.js.map }), "[project]/node_modules/next/dist/client/components/links.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { IDLE_LINK_STATUS: null, PENDING_LINK_STATUS: null, mountFormInstance: null, mountLinkInstance: null, onLinkVisibilityChanged: null, onNavigationIntent: null, pingVisibleLinks: null, setLinkForCurrentNavigation: null, unmountLinkForCurrentNavigation: null, unmountPrefetchableInstance: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { IDLE_LINK_STATUS: function() { return IDLE_LINK_STATUS; }, PENDING_LINK_STATUS: function() { return PENDING_LINK_STATUS; }, mountFormInstance: function() { return mountFormInstance; }, mountLinkInstance: function() { return mountLinkInstance; }, onLinkVisibilityChanged: function() { return onLinkVisibilityChanged; }, onNavigationIntent: function() { return onNavigationIntent; }, pingVisibleLinks: function() { return pingVisibleLinks; }, setLinkForCurrentNavigation: function() { return setLinkForCurrentNavigation; }, unmountLinkForCurrentNavigation: function() { return unmountLinkForCurrentNavigation; }, unmountPrefetchableInstance: function() { return unmountPrefetchableInstance; } }); const _types = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/segment-cache/types.js [app-ssr] (ecmascript)"); const _cachekey = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/segment-cache/cache-key.js [app-ssr] (ecmascript)"); const _scheduler = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/segment-cache/scheduler.js [app-ssr] (ecmascript)"); const _react = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"); // Tracks the most recently navigated link instance. When null, indicates // the current navigation was not initiated by a link click. let linkForMostRecentNavigation = null; const PENDING_LINK_STATUS = { pending: true }; const IDLE_LINK_STATUS = { pending: false }; function setLinkForCurrentNavigation(link) { (0, _react.startTransition)(()=>{ linkForMostRecentNavigation?.setOptimisticLinkStatus(IDLE_LINK_STATUS); link?.setOptimisticLinkStatus(PENDING_LINK_STATUS); linkForMostRecentNavigation = link; }); } function unmountLinkForCurrentNavigation(link) { if (linkForMostRecentNavigation === link) { linkForMostRecentNavigation = null; } } // Use a WeakMap to associate a Link instance with its DOM element. This is // used by the IntersectionObserver to track the link's visibility. const prefetchable = typeof WeakMap === 'function' ? new WeakMap() : new Map(); // A Set of the currently visible links. We re-prefetch visible links after a // cache invalidation, or when the current URL changes. It's a separate data // structure from the WeakMap above because only the visible links need to // be enumerated. const prefetchableAndVisible = new Set(); // A single IntersectionObserver instance shared by all components. const observer = typeof IntersectionObserver === 'function' ? new IntersectionObserver(handleIntersect, { rootMargin: '200px' }) : null; function observeVisibility(element, instance) { const existingInstance = prefetchable.get(element); if (existingInstance !== undefined) { // This shouldn't happen because each component should have its own // anchor tag instance, but it's defensive coding to avoid a memory leak in // case there's a logical error somewhere else. unmountPrefetchableInstance(element); } // Only track prefetchable links that have a valid prefetch URL prefetchable.set(element, instance); if (observer !== null) { observer.observe(element); } } function coercePrefetchableUrl(href) { if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; else { return null; } } function mountLinkInstance(element, href, router, fetchStrategy, prefetchEnabled, setOptimisticLinkStatus) { if (prefetchEnabled) { const prefetchURL = coercePrefetchableUrl(href); if (prefetchURL !== null) { const instance = { router, fetchStrategy, isVisible: false, prefetchTask: null, prefetchHref: prefetchURL.href, setOptimisticLinkStatus }; // We only observe the link's visibility if it's prefetchable. For // example, this excludes links to external URLs. observeVisibility(element, instance); return instance; } } // If the link is not prefetchable, we still create an instance so we can // track its optimistic state (i.e. useLinkStatus). const instance = { router, fetchStrategy, isVisible: false, prefetchTask: null, prefetchHref: null, setOptimisticLinkStatus }; return instance; } function mountFormInstance(element, href, router, fetchStrategy) { const prefetchURL = coercePrefetchableUrl(href); if (prefetchURL === null) { // This href is not prefetchable, so we don't track it. // TODO: We currently observe/unobserve a form every time its href changes. // For Links, this isn't a big deal because the href doesn't usually change, // but for forms it's extremely common. We should optimize this. return; } const instance = { router, fetchStrategy, isVisible: false, prefetchTask: null, prefetchHref: prefetchURL.href, setOptimisticLinkStatus: null }; observeVisibility(element, instance); } function unmountPrefetchableInstance(element) { const instance = prefetchable.get(element); if (instance !== undefined) { prefetchable.delete(element); prefetchableAndVisible.delete(instance); const prefetchTask = instance.prefetchTask; if (prefetchTask !== null) { (0, _scheduler.cancelPrefetchTask)(prefetchTask); } } if (observer !== null) { observer.unobserve(element); } } function handleIntersect(entries) { for (const entry of entries){ // Some extremely old browsers or polyfills don't reliably support // isIntersecting so we check intersectionRatio instead. (Do we care? Not // really. But whatever this is fine.) const isVisible = entry.intersectionRatio > 0; onLinkVisibilityChanged(entry.target, isVisible); } } function onLinkVisibilityChanged(element, isVisible) { if ("TURBOPACK compile-time truthy", 1) { // Prefetching on viewport is disabled in development for performance // reasons, because it requires compiling the target page. // TODO: Investigate re-enabling this. return; } //TURBOPACK unreachable ; const instance = undefined; } function onNavigationIntent(element, unstable_upgradeToDynamicPrefetch) { const instance = prefetchable.get(element); if (instance === undefined) { return; } // Prefetch the link on hover/touchstart. if (instance !== undefined) { if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; rescheduleLinkPrefetch(instance, _types.PrefetchPriority.Intent); } } function rescheduleLinkPrefetch(instance, priority) { // Ensures that app-router-instance is not compiled in the server bundle if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; } function pingVisibleLinks(nextUrl, tree) { // For each currently visible link, cancel the existing prefetch task (if it // exists) and schedule a new one. This is effectively the same as if all the // visible links left and then re-entered the viewport. // // This is called when the Next-Url or the base tree changes, since those // may affect the result of a prefetch task. It's also called after a // cache invalidation. for (const instance of prefetchableAndVisible){ const task = instance.prefetchTask; if (task !== null && !(0, _scheduler.isPrefetchTaskDirty)(task, nextUrl, tree)) { continue; } // Something changed. Cancel the existing prefetch task and schedule a // new one. if (task !== null) { (0, _scheduler.cancelPrefetchTask)(task); } const cacheKey = (0, _cachekey.createCacheKey)(instance.prefetchHref, nextUrl); instance.prefetchTask = (0, _scheduler.schedulePrefetchTask)(cacheKey, tree, instance.fetchStrategy, _types.PrefetchPriority.Default, null); } } 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=links.js.map }), "[project]/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "pathHasPrefix", { enumerable: true, get: function() { return pathHasPrefix; } }); const _parsepath = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/parse-path.js [app-ssr] (ecmascript)"); 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 }), "[project]/node_modules/next/dist/client/has-base-path.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "hasBasePath", { enumerable: true, get: function() { return hasBasePath; } }); const _pathhasprefix = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js [app-ssr] (ecmascript)"); const basePath = ("TURBOPACK compile-time value", "") || ''; function hasBasePath(path) { return (0, _pathhasprefix.pathHasPrefix)(path, basePath); } 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=has-base-path.js.map }), "[project]/node_modules/next/dist/shared/lib/router/utils/is-local-url.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "isLocalURL", { enumerable: true, get: function() { return isLocalURL; } }); const _utils = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/utils.js [app-ssr] (ecmascript)"); const _hasbasepath = __turbopack_context__.r("[project]/node_modules/next/dist/client/has-base-path.js [app-ssr] (ecmascript)"); function isLocalURL(url) { // prevent a hydration mismatch on href for url with anchor refs if (!(0, _utils.isAbsoluteUrl)(url)) return true; try { // absolute urls can be local if they are on the same origin const locationOrigin = (0, _utils.getLocationOrigin)(); const resolved = new URL(url, locationOrigin); return resolved.origin === locationOrigin && (0, _hasbasepath.hasBasePath)(resolved.pathname); } catch (_) { return false; } } //# sourceMappingURL=is-local-url.js.map }), "[project]/node_modules/next/dist/shared/lib/utils/error-once.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "errorOnce", { enumerable: true, get: function() { return errorOnce; } }); let errorOnce = (_)=>{}; if ("TURBOPACK compile-time truthy", 1) { const errors = new Set(); errorOnce = (msg)=>{ if (!errors.has(msg)) { console.error(msg); } errors.add(msg); }; } //# sourceMappingURL=error-once.js.map }), "[project]/node_modules/next/dist/client/app-dir/link.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { default: null, useLinkStatus: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { /** * A React component that extends the HTML `` element to provide * [prefetching](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#2-prefetching) * and client-side navigation. This is the primary way to navigate between routes in Next.js. * * @remarks * - Prefetching is only enabled in production. * * @see https://nextjs.org/docs/app/api-reference/components/link */ default: function() { return LinkComponent; }, useLinkStatus: function() { return useLinkStatus; } }); const _interop_require_wildcard = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs [app-ssr] (ecmascript)"); const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js [app-ssr] (ecmascript)"); const _react = /*#__PURE__*/ _interop_require_wildcard._(__turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)")); const _formaturl = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/format-url.js [app-ssr] (ecmascript)"); const _approutercontextsharedruntime = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/app-router-context.js [app-ssr] (ecmascript)"); const _usemergedref = __turbopack_context__.r("[project]/node_modules/next/dist/client/use-merged-ref.js [app-ssr] (ecmascript)"); const _utils = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/utils.js [app-ssr] (ecmascript)"); const _addbasepath = __turbopack_context__.r("[project]/node_modules/next/dist/client/add-base-path.js [app-ssr] (ecmascript)"); const _warnonce = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/utils/warn-once.js [app-ssr] (ecmascript)"); const _links = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/links.js [app-ssr] (ecmascript)"); const _islocalurl = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/is-local-url.js [app-ssr] (ecmascript)"); const _types = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/segment-cache/types.js [app-ssr] (ecmascript)"); const _erroronce = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/utils/error-once.js [app-ssr] (ecmascript)"); function isModifiedEvent(event) { const eventTarget = event.currentTarget; const target = eventTarget.getAttribute('target'); return target && target !== '_self' || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey || // triggers resource download event.nativeEvent && event.nativeEvent.which === 2; } function linkClicked(e, href, as, linkInstanceRef, replace, scroll, onNavigate) { if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; } function formatStringOrUrl(urlObjOrString) { if (typeof urlObjOrString === 'string') { return urlObjOrString; } return (0, _formaturl.formatUrl)(urlObjOrString); } function LinkComponent(props) { const [linkStatus, setOptimisticLinkStatus] = (0, _react.useOptimistic)(_links.IDLE_LINK_STATUS); let children; const linkInstanceRef = (0, _react.useRef)(null); const { href: hrefProp, as: asProp, children: childrenProp, prefetch: prefetchProp = null, passHref, replace, shallow, scroll, onClick, onMouseEnter: onMouseEnterProp, onTouchStart: onTouchStartProp, legacyBehavior = false, onNavigate, ref: forwardedRef, unstable_dynamicOnHover, ...restProps } = props; children = childrenProp; if (legacyBehavior && (typeof children === 'string' || typeof children === 'number')) { children = /*#__PURE__*/ (0, _jsxruntime.jsx)("a", { children: children }); } const router = _react.default.useContext(_approutercontextsharedruntime.AppRouterContext); const prefetchEnabled = prefetchProp !== false; const fetchStrategy = prefetchProp !== false ? getFetchStrategyFromPrefetchProp(prefetchProp) : _types.FetchStrategy.PPR; if ("TURBOPACK compile-time truthy", 1) { function createPropError(args) { return Object.defineProperty(new Error(`Failed prop type: The prop \`${args.key}\` expects a ${args.expected} in \`\`, but got \`${args.actual}\` instead.` + (("TURBOPACK compile-time falsy", 0) ? "TURBOPACK unreachable" : '')), "__NEXT_ERROR_CODE", { value: "E319", enumerable: false, configurable: true }); } // TypeScript trick for type-guarding: const requiredPropsGuard = { href: true }; const requiredProps = Object.keys(requiredPropsGuard); requiredProps.forEach((key)=>{ if (key === 'href') { if (props[key] == null || typeof props[key] !== 'string' && typeof props[key] !== 'object') { throw createPropError({ key, expected: '`string` or `object`', actual: props[key] === null ? 'null' : typeof props[key] }); } } else { // TypeScript trick for type-guarding: const _ = key; } }); // TypeScript trick for type-guarding: const optionalPropsGuard = { as: true, replace: true, scroll: true, shallow: true, passHref: true, prefetch: true, unstable_dynamicOnHover: true, onClick: true, onMouseEnter: true, onTouchStart: true, legacyBehavior: true, onNavigate: true }; const optionalProps = Object.keys(optionalPropsGuard); optionalProps.forEach((key)=>{ const valType = typeof props[key]; if (key === 'as') { if (props[key] && valType !== 'string' && valType !== 'object') { throw createPropError({ key, expected: '`string` or `object`', actual: valType }); } } else if (key === 'onClick' || key === 'onMouseEnter' || key === 'onTouchStart' || key === 'onNavigate') { if (props[key] && valType !== 'function') { throw createPropError({ key, expected: '`function`', actual: valType }); } } else if (key === 'replace' || key === 'scroll' || key === 'shallow' || key === 'passHref' || key === 'legacyBehavior' || key === 'unstable_dynamicOnHover') { if (props[key] != null && valType !== 'boolean') { throw createPropError({ key, expected: '`boolean`', actual: valType }); } } else if (key === 'prefetch') { if (props[key] != null && valType !== 'boolean' && props[key] !== 'auto') { throw createPropError({ key, expected: '`boolean | "auto"`', actual: valType }); } } else { // TypeScript trick for type-guarding: const _ = key; } }); } if ("TURBOPACK compile-time truthy", 1) { if (props.locale) { (0, _warnonce.warnOnce)('The `locale` prop is not supported in `next/link` while using the `app` router. Read more about app router internalization: https://nextjs.org/docs/app/building-your-application/routing/internationalization'); } if (!asProp) { let href; if (typeof hrefProp === 'string') { href = hrefProp; } else if (typeof hrefProp === 'object' && typeof hrefProp.pathname === 'string') { href = hrefProp.pathname; } if (href) { const hasDynamicSegment = href.split('/').some((segment)=>segment.startsWith('[') && segment.endsWith(']')); if (hasDynamicSegment) { throw Object.defineProperty(new Error(`Dynamic href \`${href}\` found in while using the \`/app\` router, this is not supported. Read more: https://nextjs.org/docs/messages/app-dir-dynamic-href`), "__NEXT_ERROR_CODE", { value: "E267", enumerable: false, configurable: true }); } } } } const { href, as } = _react.default.useMemo(()=>{ const resolvedHref = formatStringOrUrl(hrefProp); return { href: resolvedHref, as: asProp ? formatStringOrUrl(asProp) : resolvedHref }; }, [ hrefProp, asProp ]); // This will return the first child, if multiple are provided it will throw an error let child; if (legacyBehavior) { if (children?.$$typeof === Symbol.for('react.lazy')) { throw Object.defineProperty(new Error(`\`\` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's \`\` tag.`), "__NEXT_ERROR_CODE", { value: "E863", enumerable: false, configurable: true }); } if ("TURBOPACK compile-time truthy", 1) { if (onClick) { console.warn(`"onClick" was passed to with \`href\` of \`${hrefProp}\` but "legacyBehavior" was set. The legacy behavior requires onClick be set on the child of next/link`); } if (onMouseEnterProp) { console.warn(`"onMouseEnter" was passed to with \`href\` of \`${hrefProp}\` but "legacyBehavior" was set. The legacy behavior requires onMouseEnter be set on the child of next/link`); } try { child = _react.default.Children.only(children); } catch (err) { if (!children) { throw Object.defineProperty(new Error(`No children were passed to with \`href\` of \`${hrefProp}\` but one child is required https://nextjs.org/docs/messages/link-no-children`), "__NEXT_ERROR_CODE", { value: "E320", enumerable: false, configurable: true }); } throw Object.defineProperty(new Error(`Multiple children were passed to with \`href\` of \`${hrefProp}\` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children` + (("TURBOPACK compile-time falsy", 0) ? "TURBOPACK unreachable" : '')), "__NEXT_ERROR_CODE", { value: "E266", enumerable: false, configurable: true }); } } else //TURBOPACK unreachable ; } else { if ("TURBOPACK compile-time truthy", 1) { if (children?.type === 'a') { throw Object.defineProperty(new Error('Invalid with child. Please remove or use .\nLearn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor'), "__NEXT_ERROR_CODE", { value: "E209", enumerable: false, configurable: true }); } } } const childRef = legacyBehavior ? child && typeof child === 'object' && child.ref : forwardedRef; // Use a callback ref to attach an IntersectionObserver to the anchor tag on // mount. In the future we will also use this to keep track of all the // currently mounted instances, e.g. so we can re-prefetch them after // a revalidation or refresh. const observeLinkVisibilityOnMount = _react.default.useCallback((element)=>{ if (router !== null) { linkInstanceRef.current = (0, _links.mountLinkInstance)(element, href, router, fetchStrategy, prefetchEnabled, setOptimisticLinkStatus); } return ()=>{ if (linkInstanceRef.current) { (0, _links.unmountLinkForCurrentNavigation)(linkInstanceRef.current); linkInstanceRef.current = null; } (0, _links.unmountPrefetchableInstance)(element); }; }, [ prefetchEnabled, href, router, fetchStrategy, setOptimisticLinkStatus ]); const mergedRef = (0, _usemergedref.useMergedRef)(observeLinkVisibilityOnMount, childRef); const childProps = { ref: mergedRef, onClick (e) { if ("TURBOPACK compile-time truthy", 1) { if (!e) { throw Object.defineProperty(new Error(`Component rendered inside next/link has to pass click event to "onClick" prop.`), "__NEXT_ERROR_CODE", { value: "E312", enumerable: false, configurable: true }); } } if (!legacyBehavior && typeof onClick === 'function') { onClick(e); } if (legacyBehavior && child.props && typeof child.props.onClick === 'function') { child.props.onClick(e); } if (!router) { return; } if (e.defaultPrevented) { return; } linkClicked(e, href, as, linkInstanceRef, replace, scroll, onNavigate); }, onMouseEnter (e) { if (!legacyBehavior && typeof onMouseEnterProp === 'function') { onMouseEnterProp(e); } if (legacyBehavior && child.props && typeof child.props.onMouseEnter === 'function') { child.props.onMouseEnter(e); } if (!router) { return; } if ("TURBOPACK compile-time truthy", 1) { return; } //TURBOPACK unreachable ; const upgradeToDynamicPrefetch = undefined; }, onTouchStart: ("TURBOPACK compile-time falsy", 0) ? "TURBOPACK unreachable" : function onTouchStart(e) { if (!legacyBehavior && typeof onTouchStartProp === 'function') { onTouchStartProp(e); } if (legacyBehavior && child.props && typeof child.props.onTouchStart === 'function') { child.props.onTouchStart(e); } if (!router) { return; } if (!prefetchEnabled) { return; } const upgradeToDynamicPrefetch = unstable_dynamicOnHover === true; (0, _links.onNavigationIntent)(e.currentTarget, upgradeToDynamicPrefetch); } }; // If the url is absolute, we can bypass the logic to prepend the basePath. if ((0, _utils.isAbsoluteUrl)(as)) { childProps.href = as; } else if (!legacyBehavior || passHref || child.type === 'a' && !('href' in child.props)) { childProps.href = (0, _addbasepath.addBasePath)(as); } let link; if (legacyBehavior) { if ("TURBOPACK compile-time truthy", 1) { (0, _erroronce.errorOnce)('`legacyBehavior` is deprecated and will be removed in a future ' + 'release. A codemod is available to upgrade your components:\n\n' + 'npx @next/codemod@latest new-link .\n\n' + 'Learn more: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#remove-a-tags-from-link-components'); } link = /*#__PURE__*/ _react.default.cloneElement(child, childProps); } else { link = /*#__PURE__*/ (0, _jsxruntime.jsx)("a", { ...restProps, ...childProps, children: children }); } return /*#__PURE__*/ (0, _jsxruntime.jsx)(LinkStatusContext.Provider, { value: linkStatus, children: link }); } const LinkStatusContext = /*#__PURE__*/ (0, _react.createContext)(_links.IDLE_LINK_STATUS); const useLinkStatus = ()=>{ return (0, _react.useContext)(LinkStatusContext); }; function getFetchStrategyFromPrefetchProp(prefetchProp) { if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; else { return prefetchProp === null || prefetchProp === 'auto' ? _types.FetchStrategy.PPR : // (although invalid values should've been filtered out by prop validation in dev) _types.FetchStrategy.Full; } } 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=link.js.map }), "[project]/node_modules/lucide-react/dist/esm/shared/src/utils.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; /** * @license lucide-react v0.454.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ __turbopack_context__.s([ "mergeClasses", ()=>mergeClasses, "toKebabCase", ()=>toKebabCase ]); const toKebabCase = (string)=>string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(); const mergeClasses = (...classes)=>classes.filter((className, index, array)=>{ return Boolean(className) && className.trim() !== "" && array.indexOf(className) === index; }).join(" ").trim(); ; //# sourceMappingURL=utils.js.map }), "[project]/node_modules/lucide-react/dist/esm/defaultAttributes.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; /** * @license lucide-react v0.454.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ __turbopack_context__.s([ "default", ()=>defaultAttributes ]); var defaultAttributes = { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }; ; //# sourceMappingURL=defaultAttributes.js.map }), "[project]/node_modules/lucide-react/dist/esm/Icon.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; /** * @license lucide-react v0.454.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ __turbopack_context__.s([ "default", ()=>Icon ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$defaultAttributes$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/defaultAttributes.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$shared$2f$src$2f$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/shared/src/utils.js [app-ssr] (ecmascript)"); ; ; ; const Icon = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["forwardRef"])(({ color = "currentColor", size = 24, strokeWidth = 2, absoluteStrokeWidth, className = "", children, iconNode, ...rest }, ref)=>{ return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["createElement"])("svg", { ref, ...__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$defaultAttributes$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"], width: size, height: size, stroke: color, strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth, className: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$shared$2f$src$2f$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["mergeClasses"])("lucide", className), ...rest }, [ ...iconNode.map(([tag, attrs])=>(0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["createElement"])(tag, attrs)), ...Array.isArray(children) ? children : [ children ] ]); }); ; //# sourceMappingURL=Icon.js.map }), "[project]/node_modules/lucide-react/dist/esm/createLucideIcon.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; /** * @license lucide-react v0.454.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ __turbopack_context__.s([ "default", ()=>createLucideIcon ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$shared$2f$src$2f$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/shared/src/utils.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$Icon$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/Icon.js [app-ssr] (ecmascript)"); ; ; ; const createLucideIcon = (iconName, iconNode)=>{ const Component = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["forwardRef"])(({ className, ...props }, ref)=>(0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["createElement"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$Icon$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"], { ref, iconNode, className: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$shared$2f$src$2f$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["mergeClasses"])(`lucide-${(0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$shared$2f$src$2f$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["toKebabCase"])(iconName)}`, className), ...props })); Component.displayName = `${iconName}`; return Component; }; ; //# sourceMappingURL=createLucideIcon.js.map }), "[project]/node_modules/lucide-react/dist/esm/icons/house.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; /** * @license lucide-react v0.454.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ __turbopack_context__.s([ "default", ()=>House ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/createLucideIcon.js [app-ssr] (ecmascript)"); ; const House = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"])("House", [ [ "path", { d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8", key: "5wwlr5" } ], [ "path", { d: "M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z", key: "1d0kgt" } ] ]); ; //# sourceMappingURL=house.js.map }), "[project]/node_modules/lucide-react/dist/esm/icons/house.js [app-ssr] (ecmascript) ", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "Home", ()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$house$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"] ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$house$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/icons/house.js [app-ssr] (ecmascript)"); }), "[project]/node_modules/lucide-react/dist/esm/icons/message-circle.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; /** * @license lucide-react v0.454.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ __turbopack_context__.s([ "default", ()=>MessageCircle ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/createLucideIcon.js [app-ssr] (ecmascript)"); ; const MessageCircle = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"])("MessageCircle", [ [ "path", { d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z", key: "vv11sd" } ] ]); ; //# sourceMappingURL=message-circle.js.map }), "[project]/node_modules/lucide-react/dist/esm/icons/message-circle.js [app-ssr] (ecmascript) ", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "MessageCircle", ()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$message$2d$circle$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"] ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$message$2d$circle$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/icons/message-circle.js [app-ssr] (ecmascript)"); }), "[project]/node_modules/lucide-react/dist/esm/icons/user.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; /** * @license lucide-react v0.454.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ __turbopack_context__.s([ "default", ()=>User ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/createLucideIcon.js [app-ssr] (ecmascript)"); ; const User = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"])("User", [ [ "path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" } ], [ "circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" } ] ]); ; //# sourceMappingURL=user.js.map }), "[project]/node_modules/lucide-react/dist/esm/icons/user.js [app-ssr] (ecmascript) ", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "User", ()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$user$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"] ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$user$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/icons/user.js [app-ssr] (ecmascript)"); }), "[project]/node_modules/lucide-react/dist/esm/icons/x.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; /** * @license lucide-react v0.454.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ __turbopack_context__.s([ "default", ()=>X ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/createLucideIcon.js [app-ssr] (ecmascript)"); ; const X = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"])("X", [ [ "path", { d: "M18 6 6 18", key: "1bl5f8" } ], [ "path", { d: "m6 6 12 12", key: "d8bk6v" } ] ]); ; //# sourceMappingURL=x.js.map }), "[project]/node_modules/lucide-react/dist/esm/icons/x.js [app-ssr] (ecmascript) ", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "X", ()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$x$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"] ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$x$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/icons/x.js [app-ssr] (ecmascript)"); }), "[project]/node_modules/lucide-react/dist/esm/icons/users.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; /** * @license lucide-react v0.454.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ __turbopack_context__.s([ "default", ()=>Users ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/createLucideIcon.js [app-ssr] (ecmascript)"); ; const Users = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"])("Users", [ [ "path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" } ], [ "circle", { cx: "9", cy: "7", r: "4", key: "nufk8" } ], [ "path", { d: "M22 21v-2a4 4 0 0 0-3-3.87", key: "kshegd" } ], [ "path", { d: "M16 3.13a4 4 0 0 1 0 7.75", key: "1da9ce" } ] ]); ; //# sourceMappingURL=users.js.map }), "[project]/node_modules/lucide-react/dist/esm/icons/users.js [app-ssr] (ecmascript) ", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "Users", ()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$users$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"] ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$users$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/icons/users.js [app-ssr] (ecmascript)"); }), "[project]/node_modules/lucide-react/dist/esm/icons/music.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; /** * @license lucide-react v0.454.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ __turbopack_context__.s([ "default", ()=>Music ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/createLucideIcon.js [app-ssr] (ecmascript)"); ; const Music = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$createLucideIcon$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"])("Music", [ [ "path", { d: "M9 18V5l12-2v13", key: "1jmyc2" } ], [ "circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" } ], [ "circle", { cx: "18", cy: "16", r: "3", key: "1hluhg" } ] ]); ; //# sourceMappingURL=music.js.map }), "[project]/node_modules/lucide-react/dist/esm/icons/music.js [app-ssr] (ecmascript) ", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "Music", ()=>__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$music$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"] ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$lucide$2d$react$2f$dist$2f$esm$2f$icons$2f$music$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/lucide-react/dist/esm/icons/music.js [app-ssr] (ecmascript)"); }), "[project]/node_modules/zustand/esm/vanilla.mjs [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "createStore", ()=>createStore ]); const createStoreImpl = (createState)=>{ let state; const listeners = /* @__PURE__ */ new Set(); const setState = (partial, replace)=>{ const nextState = typeof partial === "function" ? partial(state) : partial; if (!Object.is(nextState, state)) { const previousState = state; state = (replace != null ? replace : typeof nextState !== "object" || nextState === null) ? nextState : Object.assign({}, state, nextState); listeners.forEach((listener)=>listener(state, previousState)); } }; const getState = ()=>state; const getInitialState = ()=>initialState; const subscribe = (listener)=>{ listeners.add(listener); return ()=>listeners.delete(listener); }; const api = { setState, getState, getInitialState, subscribe }; const initialState = state = createState(setState, getState, api); return api; }; const createStore = (createState)=>createState ? createStoreImpl(createState) : createStoreImpl; ; }), "[project]/node_modules/zustand/esm/react.mjs [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "create", ()=>create, "useStore", ()=>useStore ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$zustand$2f$esm$2f$vanilla$2e$mjs__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/zustand/esm/vanilla.mjs [app-ssr] (ecmascript)"); ; ; const identity = (arg)=>arg; function useStore(api, selector = identity) { const slice = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"].useSyncExternalStore(api.subscribe, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"].useCallback(()=>selector(api.getState()), [ api, selector ]), __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"].useCallback(()=>selector(api.getInitialState()), [ api, selector ])); __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"].useDebugValue(slice); return slice; } const createImpl = (createState)=>{ const api = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$zustand$2f$esm$2f$vanilla$2e$mjs__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["createStore"])(createState); const useBoundStore = (selector)=>useStore(api, selector); Object.assign(useBoundStore, api); return useBoundStore; }; const create = (createState)=>createState ? createImpl(createState) : createImpl; ; }), "[project]/node_modules/zustand/esm/middleware.mjs [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "combine", ()=>combine, "createJSONStorage", ()=>createJSONStorage, "devtools", ()=>devtools, "persist", ()=>persist, "redux", ()=>redux, "subscribeWithSelector", ()=>subscribeWithSelector, "unstable_ssrSafe", ()=>ssrSafe ]); const __TURBOPACK__import$2e$meta__ = { get url () { return `file://${__turbopack_context__.P("node_modules/zustand/esm/middleware.mjs")}`; } }; const reduxImpl = (reducer, initial)=>(set, _get, api)=>{ api.dispatch = (action)=>{ set((state)=>reducer(state, action), false, action); return action; }; api.dispatchFromDevtools = true; return { dispatch: (...args)=>api.dispatch(...args), ...initial }; }; const redux = reduxImpl; const trackedConnections = /* @__PURE__ */ new Map(); const getTrackedConnectionState = (name)=>{ const api = trackedConnections.get(name); if (!api) return {}; return Object.fromEntries(Object.entries(api.stores).map(([key, api2])=>[ key, api2.getState() ])); }; const extractConnectionInformation = (store, extensionConnector, options)=>{ if (store === void 0) { return { type: "untracked", connection: extensionConnector.connect(options) }; } const existingConnection = trackedConnections.get(options.name); if (existingConnection) { return { type: "tracked", store, ...existingConnection }; } const newConnection = { connection: extensionConnector.connect(options), stores: {} }; trackedConnections.set(options.name, newConnection); return { type: "tracked", store, ...newConnection }; }; const removeStoreFromTrackedConnections = (name, store)=>{ if (store === void 0) return; const connectionInfo = trackedConnections.get(name); if (!connectionInfo) return; delete connectionInfo.stores[store]; if (Object.keys(connectionInfo.stores).length === 0) { trackedConnections.delete(name); } }; const findCallerName = (stack)=>{ var _a, _b; if (!stack) return void 0; const traceLines = stack.split("\n"); const apiSetStateLineIndex = traceLines.findIndex((traceLine)=>traceLine.includes("api.setState")); if (apiSetStateLineIndex < 0) return void 0; const callerLine = ((_a = traceLines[apiSetStateLineIndex + 1]) == null ? void 0 : _a.trim()) || ""; return (_b = /.+ (.+) .+/.exec(callerLine)) == null ? void 0 : _b[1]; }; const devtoolsImpl = (fn, devtoolsOptions = {})=>(set, get, api)=>{ const { enabled, anonymousActionType, store, ...options } = devtoolsOptions; let extensionConnector; try { extensionConnector = (enabled != null ? enabled : (__TURBOPACK__import$2e$meta__.env ? __TURBOPACK__import$2e$meta__.env.MODE : void 0) !== "production") && window.__REDUX_DEVTOOLS_EXTENSION__; } catch (e) {} if (!extensionConnector) { return fn(set, get, api); } const { connection, ...connectionInformation } = extractConnectionInformation(store, extensionConnector, options); let isRecording = true; api.setState = (state, replace, nameOrAction)=>{ const r = set(state, replace); if (!isRecording) return r; const action = nameOrAction === void 0 ? { type: anonymousActionType || findCallerName(new Error().stack) || "anonymous" } : typeof nameOrAction === "string" ? { type: nameOrAction } : nameOrAction; if (store === void 0) { connection == null ? void 0 : connection.send(action, get()); return r; } connection == null ? void 0 : connection.send({ ...action, type: `${store}/${action.type}` }, { ...getTrackedConnectionState(options.name), [store]: api.getState() }); return r; }; api.devtools = { cleanup: ()=>{ if (connection && typeof connection.unsubscribe === "function") { connection.unsubscribe(); } removeStoreFromTrackedConnections(options.name, store); } }; const setStateFromDevtools = (...a)=>{ const originalIsRecording = isRecording; isRecording = false; set(...a); isRecording = originalIsRecording; }; const initialState = fn(api.setState, get, api); if (connectionInformation.type === "untracked") { connection == null ? void 0 : connection.init(initialState); } else { connectionInformation.stores[connectionInformation.store] = api; connection == null ? void 0 : connection.init(Object.fromEntries(Object.entries(connectionInformation.stores).map(([key, store2])=>[ key, key === connectionInformation.store ? initialState : store2.getState() ]))); } if (api.dispatchFromDevtools && typeof api.dispatch === "function") { let didWarnAboutReservedActionType = false; const originalDispatch = api.dispatch; api.dispatch = (...args)=>{ if ((__TURBOPACK__import$2e$meta__.env ? __TURBOPACK__import$2e$meta__.env.MODE : void 0) !== "production" && args[0].type === "__setState" && !didWarnAboutReservedActionType) { console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'); didWarnAboutReservedActionType = true; } originalDispatch(...args); }; } connection.subscribe((message)=>{ var _a; switch(message.type){ case "ACTION": if (typeof message.payload !== "string") { console.error("[zustand devtools middleware] Unsupported action format"); return; } return parseJsonThen(message.payload, (action)=>{ if (action.type === "__setState") { if (store === void 0) { setStateFromDevtools(action.state); return; } if (Object.keys(action.state).length !== 1) { console.error(` [zustand devtools middleware] Unsupported __setState action format. When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(), and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } } `); } const stateFromDevtools = action.state[store]; if (stateFromDevtools === void 0 || stateFromDevtools === null) { return; } if (JSON.stringify(api.getState()) !== JSON.stringify(stateFromDevtools)) { setStateFromDevtools(stateFromDevtools); } return; } if (!api.dispatchFromDevtools) return; if (typeof api.dispatch !== "function") return; api.dispatch(action); }); case "DISPATCH": switch(message.payload.type){ case "RESET": setStateFromDevtools(initialState); if (store === void 0) { return connection == null ? void 0 : connection.init(api.getState()); } return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name)); case "COMMIT": if (store === void 0) { connection == null ? void 0 : connection.init(api.getState()); return; } return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name)); case "ROLLBACK": return parseJsonThen(message.state, (state)=>{ if (store === void 0) { setStateFromDevtools(state); connection == null ? void 0 : connection.init(api.getState()); return; } setStateFromDevtools(state[store]); connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name)); }); case "JUMP_TO_STATE": case "JUMP_TO_ACTION": return parseJsonThen(message.state, (state)=>{ if (store === void 0) { setStateFromDevtools(state); return; } if (JSON.stringify(api.getState()) !== JSON.stringify(state[store])) { setStateFromDevtools(state[store]); } }); case "IMPORT_STATE": { const { nextLiftedState } = message.payload; const lastComputedState = (_a = nextLiftedState.computedStates.slice(-1)[0]) == null ? void 0 : _a.state; if (!lastComputedState) return; if (store === void 0) { setStateFromDevtools(lastComputedState); } else { setStateFromDevtools(lastComputedState[store]); } connection == null ? void 0 : connection.send(null, // FIXME no-any nextLiftedState); return; } case "PAUSE_RECORDING": return isRecording = !isRecording; } return; } }); return initialState; }; const devtools = devtoolsImpl; const parseJsonThen = (stringified, fn)=>{ let parsed; try { parsed = JSON.parse(stringified); } catch (e) { console.error("[zustand devtools middleware] Could not parse the received json", e); } if (parsed !== void 0) fn(parsed); }; const subscribeWithSelectorImpl = (fn)=>(set, get, api)=>{ const origSubscribe = api.subscribe; api.subscribe = (selector, optListener, options)=>{ let listener = selector; if (optListener) { const equalityFn = (options == null ? void 0 : options.equalityFn) || Object.is; let currentSlice = selector(api.getState()); listener = (state)=>{ const nextSlice = selector(state); if (!equalityFn(currentSlice, nextSlice)) { const previousSlice = currentSlice; optListener(currentSlice = nextSlice, previousSlice); } }; if (options == null ? void 0 : options.fireImmediately) { optListener(currentSlice, currentSlice); } } return origSubscribe(listener); }; const initialState = fn(set, get, api); return initialState; }; const subscribeWithSelector = subscribeWithSelectorImpl; function combine(initialState, create) { return (...args)=>Object.assign({}, initialState, create(...args)); } function createJSONStorage(getStorage, options) { let storage; try { storage = getStorage(); } catch (e) { return; } const persistStorage = { getItem: (name)=>{ var _a; const parse = (str2)=>{ if (str2 === null) { return null; } return JSON.parse(str2, options == null ? void 0 : options.reviver); }; const str = (_a = storage.getItem(name)) != null ? _a : null; if (str instanceof Promise) { return str.then(parse); } return parse(str); }, setItem: (name, newValue)=>storage.setItem(name, JSON.stringify(newValue, options == null ? void 0 : options.replacer)), removeItem: (name)=>storage.removeItem(name) }; return persistStorage; } const toThenable = (fn)=>(input)=>{ try { const result = fn(input); if (result instanceof Promise) { return result; } return { then (onFulfilled) { return toThenable(onFulfilled)(result); }, catch (_onRejected) { return this; } }; } catch (e) { return { then (_onFulfilled) { return this; }, catch (onRejected) { return toThenable(onRejected)(e); } }; } }; const persistImpl = (config, baseOptions)=>(set, get, api)=>{ let options = { storage: createJSONStorage(()=>localStorage), partialize: (state)=>state, version: 0, merge: (persistedState, currentState)=>({ ...currentState, ...persistedState }), ...baseOptions }; let hasHydrated = false; const hydrationListeners = /* @__PURE__ */ new Set(); const finishHydrationListeners = /* @__PURE__ */ new Set(); let storage = options.storage; if (!storage) { return config((...args)=>{ console.warn(`[zustand persist middleware] Unable to update item '${options.name}', the given storage is currently unavailable.`); set(...args); }, get, api); } const setItem = ()=>{ const state = options.partialize({ ...get() }); return storage.setItem(options.name, { state, version: options.version }); }; const savedSetState = api.setState; api.setState = (state, replace)=>{ savedSetState(state, replace); return setItem(); }; const configResult = config((...args)=>{ set(...args); return setItem(); }, get, api); api.getInitialState = ()=>configResult; let stateFromStorage; const hydrate = ()=>{ var _a, _b; if (!storage) return; hasHydrated = false; hydrationListeners.forEach((cb)=>{ var _a2; return cb((_a2 = get()) != null ? _a2 : configResult); }); const postRehydrationCallback = ((_b = options.onRehydrateStorage) == null ? void 0 : _b.call(options, (_a = get()) != null ? _a : configResult)) || void 0; return toThenable(storage.getItem.bind(storage))(options.name).then((deserializedStorageValue)=>{ if (deserializedStorageValue) { if (typeof deserializedStorageValue.version === "number" && deserializedStorageValue.version !== options.version) { if (options.migrate) { const migration = options.migrate(deserializedStorageValue.state, deserializedStorageValue.version); if (migration instanceof Promise) { return migration.then((result)=>[ true, result ]); } return [ true, migration ]; } console.error(`State loaded from storage couldn't be migrated since no migrate function was provided`); } else { return [ false, deserializedStorageValue.state ]; } } return [ false, void 0 ]; }).then((migrationResult)=>{ var _a2; const [migrated, migratedState] = migrationResult; stateFromStorage = options.merge(migratedState, (_a2 = get()) != null ? _a2 : configResult); set(stateFromStorage, true); if (migrated) { return setItem(); } }).then(()=>{ postRehydrationCallback == null ? void 0 : postRehydrationCallback(stateFromStorage, void 0); stateFromStorage = get(); hasHydrated = true; finishHydrationListeners.forEach((cb)=>cb(stateFromStorage)); }).catch((e)=>{ postRehydrationCallback == null ? void 0 : postRehydrationCallback(void 0, e); }); }; api.persist = { setOptions: (newOptions)=>{ options = { ...options, ...newOptions }; if (newOptions.storage) { storage = newOptions.storage; } }, clearStorage: ()=>{ storage == null ? void 0 : storage.removeItem(options.name); }, getOptions: ()=>options, rehydrate: ()=>hydrate(), hasHydrated: ()=>hasHydrated, onHydrate: (cb)=>{ hydrationListeners.add(cb); return ()=>{ hydrationListeners.delete(cb); }; }, onFinishHydration: (cb)=>{ finishHydrationListeners.add(cb); return ()=>{ finishHydrationListeners.delete(cb); }; } }; if (!options.skipHydration) { hydrate(); } return stateFromStorage || configResult; }; const persist = persistImpl; function ssrSafe(config, isSSR = ("TURBOPACK compile-time value", "undefined") === "undefined") { return (set, get, api)=>{ if (!isSSR) { return config(set, get, api); } const ssrSet = ()=>{ throw new Error("Cannot set state of Zustand store in SSR"); }; api.setState = ssrSet; return config(ssrSet, get, api); }; } ; }), "[project]/node_modules/@radix-ui/react-compose-refs/dist/index.mjs [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; // packages/react/compose-refs/src/composeRefs.tsx __turbopack_context__.s([ "composeRefs", ()=>composeRefs, "useComposedRefs", ()=>useComposedRefs ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"); ; function setRef(ref, value) { if (typeof ref === "function") { return ref(value); } else if (ref !== null && ref !== void 0) { ref.current = value; } } function composeRefs(...refs) { return (node)=>{ let hasCleanup = false; const cleanups = refs.map((ref)=>{ const cleanup = setRef(ref, node); if (!hasCleanup && typeof cleanup == "function") { hasCleanup = true; } return cleanup; }); if (hasCleanup) { return ()=>{ for(let i = 0; i < cleanups.length; i++){ const cleanup = cleanups[i]; if (typeof cleanup == "function") { cleanup(); } else { setRef(refs[i], null); } } }; } }; } function useComposedRefs(...refs) { return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useCallback"](composeRefs(...refs), refs); } ; //# sourceMappingURL=index.mjs.map }), "[project]/node_modules/@radix-ui/react-slot/dist/index.mjs [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; // packages/react/slot/src/Slot.tsx __turbopack_context__.s([ "Root", ()=>Root, "Slot", ()=>Slot, "Slottable", ()=>Slottable ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$compose$2d$refs$2f$dist$2f$index$2e$mjs__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/@radix-ui/react-compose-refs/dist/index.mjs [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js [app-ssr] (ecmascript)"); ; ; ; var Slot = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{ const { children, ...slotProps } = props; const childrenArray = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["Children"].toArray(children); const slottable = childrenArray.find(isSlottable); if (slottable) { const newElement = slottable.props.children; const newChildren = childrenArray.map((child)=>{ if (child === slottable) { if (__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["Children"].count(newElement) > 1) return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["Children"].only(null); return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["isValidElement"](newElement) ? newElement.props.children : null; } else { return child; } }); return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])(SlotClone, { ...slotProps, ref: forwardedRef, children: __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["isValidElement"](newElement) ? __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["cloneElement"](newElement, void 0, newChildren) : null }); } return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])(SlotClone, { ...slotProps, ref: forwardedRef, children }); }); Slot.displayName = "Slot"; var SlotClone = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["forwardRef"]((props, forwardedRef)=>{ const { children, ...slotProps } = props; if (__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["isValidElement"](children)) { const childrenRef = getElementRef(children); return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["cloneElement"](children, { ...mergeProps(slotProps, children.props), // @ts-ignore ref: forwardedRef ? (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f40$radix$2d$ui$2f$react$2d$compose$2d$refs$2f$dist$2f$index$2e$mjs__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["composeRefs"])(forwardedRef, childrenRef) : childrenRef }); } return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["Children"].count(children) > 1 ? __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["Children"].only(null) : null; }); SlotClone.displayName = "SlotClone"; var Slottable = ({ children })=>{ return /* @__PURE__ */ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["Fragment"], { children }); }; function isSlottable(child) { return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["isValidElement"](child) && child.type === Slottable; } function mergeProps(slotProps, childProps) { const overrideProps = { ...childProps }; for(const propName in childProps){ const slotPropValue = slotProps[propName]; const childPropValue = childProps[propName]; const isHandler = /^on[A-Z]/.test(propName); if (isHandler) { if (slotPropValue && childPropValue) { overrideProps[propName] = (...args)=>{ childPropValue(...args); slotPropValue(...args); }; } else if (slotPropValue) { overrideProps[propName] = slotPropValue; } } else if (propName === "style") { overrideProps[propName] = { ...slotPropValue, ...childPropValue }; } else if (propName === "className") { overrideProps[propName] = [ slotPropValue, childPropValue ].filter(Boolean).join(" "); } } return { ...slotProps, ...overrideProps }; } function getElementRef(element) { let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get; let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning; if (mayWarn) { return element.ref; } getter = Object.getOwnPropertyDescriptor(element, "ref")?.get; mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning; if (mayWarn) { return element.props.ref; } return element.props.ref || element.ref; } var Root = Slot; ; //# sourceMappingURL=index.mjs.map }), "[project]/node_modules/clsx/dist/clsx.mjs [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "clsx", ()=>clsx, "default", ()=>__TURBOPACK__default__export__ ]); function r(e) { var t, f, n = ""; if ("string" == typeof e || "number" == typeof e) n += e; else if ("object" == typeof e) if (Array.isArray(e)) { var o = e.length; for(t = 0; t < o; t++)e[t] && (f = r(e[t])) && (n && (n += " "), n += f); } else for(f in e)e[f] && (n && (n += " "), n += f); return n; } function clsx() { for(var e, t, f = 0, n = "", o = arguments.length; f < o; f++)(e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t); return n; } const __TURBOPACK__default__export__ = clsx; }), "[project]/node_modules/class-variance-authority/dist/index.mjs [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; /** * Copyright 2022 Joe Bell. All rights reserved. * * This file is licensed to you under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with the * License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ __turbopack_context__.s([ "cva", ()=>cva, "cx", ()=>cx ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$clsx$2f$dist$2f$clsx$2e$mjs__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/clsx/dist/clsx.mjs [app-ssr] (ecmascript)"); ; const falsyToString = (value)=>typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value; const cx = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$clsx$2f$dist$2f$clsx$2e$mjs__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["clsx"]; const cva = (base, config)=>(props)=>{ var _config_compoundVariants; if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className); const { variants, defaultVariants } = config; const getVariantClassNames = Object.keys(variants).map((variant)=>{ const variantProp = props === null || props === void 0 ? void 0 : props[variant]; const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant]; if (variantProp === null) return null; const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp); return variants[variant][variantKey]; }); const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{ let [key, value] = param; if (value === undefined) { return acc; } acc[key] = value; return acc; }, {}); const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param)=>{ let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param; return Object.entries(compoundVariantOptions).every((param)=>{ let [key, value] = param; return Array.isArray(value) ? value.includes({ ...defaultVariants, ...propsWithoutUndefined }[key]) : ({ ...defaultVariants, ...propsWithoutUndefined })[key] === value; }) ? [ ...acc, cvClass, cvClassName ] : acc; }, []); return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className); }; }), "[project]/node_modules/tailwind-merge/dist/bundle-mjs.mjs [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "createTailwindMerge", ()=>createTailwindMerge, "extendTailwindMerge", ()=>extendTailwindMerge, "fromTheme", ()=>fromTheme, "getDefaultConfig", ()=>getDefaultConfig, "mergeConfigs", ()=>mergeConfigs, "twJoin", ()=>twJoin, "twMerge", ()=>twMerge, "validators", ()=>validators ]); const CLASS_PART_SEPARATOR = '-'; const createClassGroupUtils = (config)=>{ const classMap = createClassMap(config); const { conflictingClassGroups, conflictingClassGroupModifiers } = config; const getClassGroupId = (className)=>{ const classParts = className.split(CLASS_PART_SEPARATOR); // Classes like `-inset-1` produce an empty string as first classPart. We assume that classes for negative values are used correctly and remove it from classParts. if (classParts[0] === '' && classParts.length !== 1) { classParts.shift(); } return getGroupRecursive(classParts, classMap) || getGroupIdForArbitraryProperty(className); }; const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier)=>{ const conflicts = conflictingClassGroups[classGroupId] || []; if (hasPostfixModifier && conflictingClassGroupModifiers[classGroupId]) { return [ ...conflicts, ...conflictingClassGroupModifiers[classGroupId] ]; } return conflicts; }; return { getClassGroupId, getConflictingClassGroupIds }; }; const getGroupRecursive = (classParts, classPartObject)=>{ if (classParts.length === 0) { return classPartObject.classGroupId; } const currentClassPart = classParts[0]; const nextClassPartObject = classPartObject.nextPart.get(currentClassPart); const classGroupFromNextClassPart = nextClassPartObject ? getGroupRecursive(classParts.slice(1), nextClassPartObject) : undefined; if (classGroupFromNextClassPart) { return classGroupFromNextClassPart; } if (classPartObject.validators.length === 0) { return undefined; } const classRest = classParts.join(CLASS_PART_SEPARATOR); return classPartObject.validators.find(({ validator })=>validator(classRest))?.classGroupId; }; const arbitraryPropertyRegex = /^\[(.+)\]$/; const getGroupIdForArbitraryProperty = (className)=>{ if (arbitraryPropertyRegex.test(className)) { const arbitraryPropertyClassName = arbitraryPropertyRegex.exec(className)[1]; const property = arbitraryPropertyClassName?.substring(0, arbitraryPropertyClassName.indexOf(':')); if (property) { // I use two dots here because one dot is used as prefix for class groups in plugins return 'arbitrary..' + property; } } }; /** * Exported for testing only */ const createClassMap = (config)=>{ const { theme, prefix } = config; const classMap = { nextPart: new Map(), validators: [] }; const prefixedClassGroupEntries = getPrefixedClassGroupEntries(Object.entries(config.classGroups), prefix); prefixedClassGroupEntries.forEach(([classGroupId, classGroup])=>{ processClassesRecursively(classGroup, classMap, classGroupId, theme); }); return classMap; }; const processClassesRecursively = (classGroup, classPartObject, classGroupId, theme)=>{ classGroup.forEach((classDefinition)=>{ if (typeof classDefinition === 'string') { const classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition); classPartObjectToEdit.classGroupId = classGroupId; return; } if (typeof classDefinition === 'function') { if (isThemeGetter(classDefinition)) { processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme); return; } classPartObject.validators.push({ validator: classDefinition, classGroupId }); return; } Object.entries(classDefinition).forEach(([key, classGroup])=>{ processClassesRecursively(classGroup, getPart(classPartObject, key), classGroupId, theme); }); }); }; const getPart = (classPartObject, path)=>{ let currentClassPartObject = classPartObject; path.split(CLASS_PART_SEPARATOR).forEach((pathPart)=>{ if (!currentClassPartObject.nextPart.has(pathPart)) { currentClassPartObject.nextPart.set(pathPart, { nextPart: new Map(), validators: [] }); } currentClassPartObject = currentClassPartObject.nextPart.get(pathPart); }); return currentClassPartObject; }; const isThemeGetter = (func)=>func.isThemeGetter; const getPrefixedClassGroupEntries = (classGroupEntries, prefix)=>{ if (!prefix) { return classGroupEntries; } return classGroupEntries.map(([classGroupId, classGroup])=>{ const prefixedClassGroup = classGroup.map((classDefinition)=>{ if (typeof classDefinition === 'string') { return prefix + classDefinition; } if (typeof classDefinition === 'object') { return Object.fromEntries(Object.entries(classDefinition).map(([key, value])=>[ prefix + key, value ])); } return classDefinition; }); return [ classGroupId, prefixedClassGroup ]; }); }; // LRU cache inspired from hashlru (https://github.com/dominictarr/hashlru/blob/v1.0.4/index.js) but object replaced with Map to improve performance const createLruCache = (maxCacheSize)=>{ if (maxCacheSize < 1) { return { get: ()=>undefined, set: ()=>{} }; } let cacheSize = 0; let cache = new Map(); let previousCache = new Map(); const update = (key, value)=>{ cache.set(key, value); cacheSize++; if (cacheSize > maxCacheSize) { cacheSize = 0; previousCache = cache; cache = new Map(); } }; return { get (key) { let value = cache.get(key); if (value !== undefined) { return value; } if ((value = previousCache.get(key)) !== undefined) { update(key, value); return value; } }, set (key, value) { if (cache.has(key)) { cache.set(key, value); } else { update(key, value); } } }; }; const IMPORTANT_MODIFIER = '!'; const createParseClassName = (config)=>{ const { separator, experimentalParseClassName } = config; const isSeparatorSingleCharacter = separator.length === 1; const firstSeparatorCharacter = separator[0]; const separatorLength = separator.length; // parseClassName inspired by https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js const parseClassName = (className)=>{ const modifiers = []; let bracketDepth = 0; let modifierStart = 0; let postfixModifierPosition; for(let index = 0; index < className.length; index++){ let currentCharacter = className[index]; if (bracketDepth === 0) { if (currentCharacter === firstSeparatorCharacter && (isSeparatorSingleCharacter || className.slice(index, index + separatorLength) === separator)) { modifiers.push(className.slice(modifierStart, index)); modifierStart = index + separatorLength; continue; } if (currentCharacter === '/') { postfixModifierPosition = index; continue; } } if (currentCharacter === '[') { bracketDepth++; } else if (currentCharacter === ']') { bracketDepth--; } } const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.substring(modifierStart); const hasImportantModifier = baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER); const baseClassName = hasImportantModifier ? baseClassNameWithImportantModifier.substring(1) : baseClassNameWithImportantModifier; const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined; return { modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition }; }; if (experimentalParseClassName) { return (className)=>experimentalParseClassName({ className, parseClassName }); } return parseClassName; }; /** * Sorts modifiers according to following schema: * - Predefined modifiers are sorted alphabetically * - When an arbitrary variant appears, it must be preserved which modifiers are before and after it */ const sortModifiers = (modifiers)=>{ if (modifiers.length <= 1) { return modifiers; } const sortedModifiers = []; let unsortedModifiers = []; modifiers.forEach((modifier)=>{ const isArbitraryVariant = modifier[0] === '['; if (isArbitraryVariant) { sortedModifiers.push(...unsortedModifiers.sort(), modifier); unsortedModifiers = []; } else { unsortedModifiers.push(modifier); } }); sortedModifiers.push(...unsortedModifiers.sort()); return sortedModifiers; }; const createConfigUtils = (config)=>({ cache: createLruCache(config.cacheSize), parseClassName: createParseClassName(config), ...createClassGroupUtils(config) }); const SPLIT_CLASSES_REGEX = /\s+/; const mergeClassList = (classList, configUtils)=>{ const { parseClassName, getClassGroupId, getConflictingClassGroupIds } = configUtils; /** * Set of classGroupIds in following format: * `{importantModifier}{variantModifiers}{classGroupId}` * @example 'float' * @example 'hover:focus:bg-color' * @example 'md:!pr' */ const classGroupsInConflict = []; const classNames = classList.trim().split(SPLIT_CLASSES_REGEX); let result = ''; for(let index = classNames.length - 1; index >= 0; index -= 1){ const originalClassName = classNames[index]; const { modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition } = parseClassName(originalClassName); let hasPostfixModifier = Boolean(maybePostfixModifierPosition); let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName); if (!classGroupId) { if (!hasPostfixModifier) { // Not a Tailwind class result = originalClassName + (result.length > 0 ? ' ' + result : result); continue; } classGroupId = getClassGroupId(baseClassName); if (!classGroupId) { // Not a Tailwind class result = originalClassName + (result.length > 0 ? ' ' + result : result); continue; } hasPostfixModifier = false; } const variantModifier = sortModifiers(modifiers).join(':'); const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier; const classId = modifierId + classGroupId; if (classGroupsInConflict.includes(classId)) { continue; } classGroupsInConflict.push(classId); const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier); for(let i = 0; i < conflictGroups.length; ++i){ const group = conflictGroups[i]; classGroupsInConflict.push(modifierId + group); } // Tailwind class not in conflict result = originalClassName + (result.length > 0 ? ' ' + result : result); } return result; }; /** * The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better. * * Specifically: * - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js * - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts * * Original code has MIT license: Copyright (c) Luke Edwards (lukeed.com) */ function twJoin() { let index = 0; let argument; let resolvedValue; let string = ''; while(index < arguments.length){ if (argument = arguments[index++]) { if (resolvedValue = toValue(argument)) { string && (string += ' '); string += resolvedValue; } } } return string; } const toValue = (mix)=>{ if (typeof mix === 'string') { return mix; } let resolvedValue; let string = ''; for(let k = 0; k < mix.length; k++){ if (mix[k]) { if (resolvedValue = toValue(mix[k])) { string && (string += ' '); string += resolvedValue; } } } return string; }; function createTailwindMerge(createConfigFirst, ...createConfigRest) { let configUtils; let cacheGet; let cacheSet; let functionToCall = initTailwindMerge; function initTailwindMerge(classList) { const config = createConfigRest.reduce((previousConfig, createConfigCurrent)=>createConfigCurrent(previousConfig), createConfigFirst()); configUtils = createConfigUtils(config); cacheGet = configUtils.cache.get; cacheSet = configUtils.cache.set; functionToCall = tailwindMerge; return tailwindMerge(classList); } function tailwindMerge(classList) { const cachedResult = cacheGet(classList); if (cachedResult) { return cachedResult; } const result = mergeClassList(classList, configUtils); cacheSet(classList, result); return result; } return function callTailwindMerge() { return functionToCall(twJoin.apply(null, arguments)); }; } const fromTheme = (key)=>{ const themeGetter = (theme)=>theme[key] || []; themeGetter.isThemeGetter = true; return themeGetter; }; const arbitraryValueRegex = /^\[(?:([a-z-]+):)?(.+)\]$/i; const fractionRegex = /^\d+\/\d+$/; const stringLengths = /*#__PURE__*/ new Set([ 'px', 'full', 'screen' ]); const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/; const lengthUnitRegex = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/; const colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/; // Shadow always begins with x and y offset separated by underscore optionally prepended by inset const shadowRegex = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/; const imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/; const isLength = (value)=>isNumber(value) || stringLengths.has(value) || fractionRegex.test(value); const isArbitraryLength = (value)=>getIsArbitraryValue(value, 'length', isLengthOnly); const isNumber = (value)=>Boolean(value) && !Number.isNaN(Number(value)); const isArbitraryNumber = (value)=>getIsArbitraryValue(value, 'number', isNumber); const isInteger = (value)=>Boolean(value) && Number.isInteger(Number(value)); const isPercent = (value)=>value.endsWith('%') && isNumber(value.slice(0, -1)); const isArbitraryValue = (value)=>arbitraryValueRegex.test(value); const isTshirtSize = (value)=>tshirtUnitRegex.test(value); const sizeLabels = /*#__PURE__*/ new Set([ 'length', 'size', 'percentage' ]); const isArbitrarySize = (value)=>getIsArbitraryValue(value, sizeLabels, isNever); const isArbitraryPosition = (value)=>getIsArbitraryValue(value, 'position', isNever); const imageLabels = /*#__PURE__*/ new Set([ 'image', 'url' ]); const isArbitraryImage = (value)=>getIsArbitraryValue(value, imageLabels, isImage); const isArbitraryShadow = (value)=>getIsArbitraryValue(value, '', isShadow); const isAny = ()=>true; const getIsArbitraryValue = (value, label, testValue)=>{ const result = arbitraryValueRegex.exec(value); if (result) { if (result[1]) { return typeof label === 'string' ? result[1] === label : label.has(result[1]); } return testValue(result[2]); } return false; }; const isLengthOnly = (value)=>// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths. // For example, `hsl(0 0% 0%)` would be classified as a length without this check. // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough. lengthUnitRegex.test(value) && !colorFunctionRegex.test(value); const isNever = ()=>false; const isShadow = (value)=>shadowRegex.test(value); const isImage = (value)=>imageRegex.test(value); const validators = /*#__PURE__*/ Object.defineProperty({ __proto__: null, isAny, isArbitraryImage, isArbitraryLength, isArbitraryNumber, isArbitraryPosition, isArbitraryShadow, isArbitrarySize, isArbitraryValue, isInteger, isLength, isNumber, isPercent, isTshirtSize }, Symbol.toStringTag, { value: 'Module' }); const getDefaultConfig = ()=>{ const colors = fromTheme('colors'); const spacing = fromTheme('spacing'); const blur = fromTheme('blur'); const brightness = fromTheme('brightness'); const borderColor = fromTheme('borderColor'); const borderRadius = fromTheme('borderRadius'); const borderSpacing = fromTheme('borderSpacing'); const borderWidth = fromTheme('borderWidth'); const contrast = fromTheme('contrast'); const grayscale = fromTheme('grayscale'); const hueRotate = fromTheme('hueRotate'); const invert = fromTheme('invert'); const gap = fromTheme('gap'); const gradientColorStops = fromTheme('gradientColorStops'); const gradientColorStopPositions = fromTheme('gradientColorStopPositions'); const inset = fromTheme('inset'); const margin = fromTheme('margin'); const opacity = fromTheme('opacity'); const padding = fromTheme('padding'); const saturate = fromTheme('saturate'); const scale = fromTheme('scale'); const sepia = fromTheme('sepia'); const skew = fromTheme('skew'); const space = fromTheme('space'); const translate = fromTheme('translate'); const getOverscroll = ()=>[ 'auto', 'contain', 'none' ]; const getOverflow = ()=>[ 'auto', 'hidden', 'clip', 'visible', 'scroll' ]; const getSpacingWithAutoAndArbitrary = ()=>[ 'auto', isArbitraryValue, spacing ]; const getSpacingWithArbitrary = ()=>[ isArbitraryValue, spacing ]; const getLengthWithEmptyAndArbitrary = ()=>[ '', isLength, isArbitraryLength ]; const getNumberWithAutoAndArbitrary = ()=>[ 'auto', isNumber, isArbitraryValue ]; const getPositions = ()=>[ 'bottom', 'center', 'left', 'left-bottom', 'left-top', 'right', 'right-bottom', 'right-top', 'top' ]; const getLineStyles = ()=>[ 'solid', 'dashed', 'dotted', 'double', 'none' ]; const getBlendModes = ()=>[ 'normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity' ]; const getAlign = ()=>[ 'start', 'end', 'center', 'between', 'around', 'evenly', 'stretch' ]; const getZeroAndEmpty = ()=>[ '', '0', isArbitraryValue ]; const getBreaks = ()=>[ 'auto', 'avoid', 'all', 'avoid-page', 'page', 'left', 'right', 'column' ]; const getNumberAndArbitrary = ()=>[ isNumber, isArbitraryValue ]; return { cacheSize: 500, separator: ':', theme: { colors: [ isAny ], spacing: [ isLength, isArbitraryLength ], blur: [ 'none', '', isTshirtSize, isArbitraryValue ], brightness: getNumberAndArbitrary(), borderColor: [ colors ], borderRadius: [ 'none', '', 'full', isTshirtSize, isArbitraryValue ], borderSpacing: getSpacingWithArbitrary(), borderWidth: getLengthWithEmptyAndArbitrary(), contrast: getNumberAndArbitrary(), grayscale: getZeroAndEmpty(), hueRotate: getNumberAndArbitrary(), invert: getZeroAndEmpty(), gap: getSpacingWithArbitrary(), gradientColorStops: [ colors ], gradientColorStopPositions: [ isPercent, isArbitraryLength ], inset: getSpacingWithAutoAndArbitrary(), margin: getSpacingWithAutoAndArbitrary(), opacity: getNumberAndArbitrary(), padding: getSpacingWithArbitrary(), saturate: getNumberAndArbitrary(), scale: getNumberAndArbitrary(), sepia: getZeroAndEmpty(), skew: getNumberAndArbitrary(), space: getSpacingWithArbitrary(), translate: getSpacingWithArbitrary() }, classGroups: { // Layout /** * Aspect Ratio * @see https://tailwindcss.com/docs/aspect-ratio */ aspect: [ { aspect: [ 'auto', 'square', 'video', isArbitraryValue ] } ], /** * Container * @see https://tailwindcss.com/docs/container */ container: [ 'container' ], /** * Columns * @see https://tailwindcss.com/docs/columns */ columns: [ { columns: [ isTshirtSize ] } ], /** * Break After * @see https://tailwindcss.com/docs/break-after */ 'break-after': [ { 'break-after': getBreaks() } ], /** * Break Before * @see https://tailwindcss.com/docs/break-before */ 'break-before': [ { 'break-before': getBreaks() } ], /** * Break Inside * @see https://tailwindcss.com/docs/break-inside */ 'break-inside': [ { 'break-inside': [ 'auto', 'avoid', 'avoid-page', 'avoid-column' ] } ], /** * Box Decoration Break * @see https://tailwindcss.com/docs/box-decoration-break */ 'box-decoration': [ { 'box-decoration': [ 'slice', 'clone' ] } ], /** * Box Sizing * @see https://tailwindcss.com/docs/box-sizing */ box: [ { box: [ 'border', 'content' ] } ], /** * Display * @see https://tailwindcss.com/docs/display */ display: [ 'block', 'inline-block', 'inline', 'flex', 'inline-flex', 'table', 'inline-table', 'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row-group', 'table-row', 'flow-root', 'grid', 'inline-grid', 'contents', 'list-item', 'hidden' ], /** * Floats * @see https://tailwindcss.com/docs/float */ float: [ { float: [ 'right', 'left', 'none', 'start', 'end' ] } ], /** * Clear * @see https://tailwindcss.com/docs/clear */ clear: [ { clear: [ 'left', 'right', 'both', 'none', 'start', 'end' ] } ], /** * Isolation * @see https://tailwindcss.com/docs/isolation */ isolation: [ 'isolate', 'isolation-auto' ], /** * Object Fit * @see https://tailwindcss.com/docs/object-fit */ 'object-fit': [ { object: [ 'contain', 'cover', 'fill', 'none', 'scale-down' ] } ], /** * Object Position * @see https://tailwindcss.com/docs/object-position */ 'object-position': [ { object: [ ...getPositions(), isArbitraryValue ] } ], /** * Overflow * @see https://tailwindcss.com/docs/overflow */ overflow: [ { overflow: getOverflow() } ], /** * Overflow X * @see https://tailwindcss.com/docs/overflow */ 'overflow-x': [ { 'overflow-x': getOverflow() } ], /** * Overflow Y * @see https://tailwindcss.com/docs/overflow */ 'overflow-y': [ { 'overflow-y': getOverflow() } ], /** * Overscroll Behavior * @see https://tailwindcss.com/docs/overscroll-behavior */ overscroll: [ { overscroll: getOverscroll() } ], /** * Overscroll Behavior X * @see https://tailwindcss.com/docs/overscroll-behavior */ 'overscroll-x': [ { 'overscroll-x': getOverscroll() } ], /** * Overscroll Behavior Y * @see https://tailwindcss.com/docs/overscroll-behavior */ 'overscroll-y': [ { 'overscroll-y': getOverscroll() } ], /** * Position * @see https://tailwindcss.com/docs/position */ position: [ 'static', 'fixed', 'absolute', 'relative', 'sticky' ], /** * Top / Right / Bottom / Left * @see https://tailwindcss.com/docs/top-right-bottom-left */ inset: [ { inset: [ inset ] } ], /** * Right / Left * @see https://tailwindcss.com/docs/top-right-bottom-left */ 'inset-x': [ { 'inset-x': [ inset ] } ], /** * Top / Bottom * @see https://tailwindcss.com/docs/top-right-bottom-left */ 'inset-y': [ { 'inset-y': [ inset ] } ], /** * Start * @see https://tailwindcss.com/docs/top-right-bottom-left */ start: [ { start: [ inset ] } ], /** * End * @see https://tailwindcss.com/docs/top-right-bottom-left */ end: [ { end: [ inset ] } ], /** * Top * @see https://tailwindcss.com/docs/top-right-bottom-left */ top: [ { top: [ inset ] } ], /** * Right * @see https://tailwindcss.com/docs/top-right-bottom-left */ right: [ { right: [ inset ] } ], /** * Bottom * @see https://tailwindcss.com/docs/top-right-bottom-left */ bottom: [ { bottom: [ inset ] } ], /** * Left * @see https://tailwindcss.com/docs/top-right-bottom-left */ left: [ { left: [ inset ] } ], /** * Visibility * @see https://tailwindcss.com/docs/visibility */ visibility: [ 'visible', 'invisible', 'collapse' ], /** * Z-Index * @see https://tailwindcss.com/docs/z-index */ z: [ { z: [ 'auto', isInteger, isArbitraryValue ] } ], // Flexbox and Grid /** * Flex Basis * @see https://tailwindcss.com/docs/flex-basis */ basis: [ { basis: getSpacingWithAutoAndArbitrary() } ], /** * Flex Direction * @see https://tailwindcss.com/docs/flex-direction */ 'flex-direction': [ { flex: [ 'row', 'row-reverse', 'col', 'col-reverse' ] } ], /** * Flex Wrap * @see https://tailwindcss.com/docs/flex-wrap */ 'flex-wrap': [ { flex: [ 'wrap', 'wrap-reverse', 'nowrap' ] } ], /** * Flex * @see https://tailwindcss.com/docs/flex */ flex: [ { flex: [ '1', 'auto', 'initial', 'none', isArbitraryValue ] } ], /** * Flex Grow * @see https://tailwindcss.com/docs/flex-grow */ grow: [ { grow: getZeroAndEmpty() } ], /** * Flex Shrink * @see https://tailwindcss.com/docs/flex-shrink */ shrink: [ { shrink: getZeroAndEmpty() } ], /** * Order * @see https://tailwindcss.com/docs/order */ order: [ { order: [ 'first', 'last', 'none', isInteger, isArbitraryValue ] } ], /** * Grid Template Columns * @see https://tailwindcss.com/docs/grid-template-columns */ 'grid-cols': [ { 'grid-cols': [ isAny ] } ], /** * Grid Column Start / End * @see https://tailwindcss.com/docs/grid-column */ 'col-start-end': [ { col: [ 'auto', { span: [ 'full', isInteger, isArbitraryValue ] }, isArbitraryValue ] } ], /** * Grid Column Start * @see https://tailwindcss.com/docs/grid-column */ 'col-start': [ { 'col-start': getNumberWithAutoAndArbitrary() } ], /** * Grid Column End * @see https://tailwindcss.com/docs/grid-column */ 'col-end': [ { 'col-end': getNumberWithAutoAndArbitrary() } ], /** * Grid Template Rows * @see https://tailwindcss.com/docs/grid-template-rows */ 'grid-rows': [ { 'grid-rows': [ isAny ] } ], /** * Grid Row Start / End * @see https://tailwindcss.com/docs/grid-row */ 'row-start-end': [ { row: [ 'auto', { span: [ isInteger, isArbitraryValue ] }, isArbitraryValue ] } ], /** * Grid Row Start * @see https://tailwindcss.com/docs/grid-row */ 'row-start': [ { 'row-start': getNumberWithAutoAndArbitrary() } ], /** * Grid Row End * @see https://tailwindcss.com/docs/grid-row */ 'row-end': [ { 'row-end': getNumberWithAutoAndArbitrary() } ], /** * Grid Auto Flow * @see https://tailwindcss.com/docs/grid-auto-flow */ 'grid-flow': [ { 'grid-flow': [ 'row', 'col', 'dense', 'row-dense', 'col-dense' ] } ], /** * Grid Auto Columns * @see https://tailwindcss.com/docs/grid-auto-columns */ 'auto-cols': [ { 'auto-cols': [ 'auto', 'min', 'max', 'fr', isArbitraryValue ] } ], /** * Grid Auto Rows * @see https://tailwindcss.com/docs/grid-auto-rows */ 'auto-rows': [ { 'auto-rows': [ 'auto', 'min', 'max', 'fr', isArbitraryValue ] } ], /** * Gap * @see https://tailwindcss.com/docs/gap */ gap: [ { gap: [ gap ] } ], /** * Gap X * @see https://tailwindcss.com/docs/gap */ 'gap-x': [ { 'gap-x': [ gap ] } ], /** * Gap Y * @see https://tailwindcss.com/docs/gap */ 'gap-y': [ { 'gap-y': [ gap ] } ], /** * Justify Content * @see https://tailwindcss.com/docs/justify-content */ 'justify-content': [ { justify: [ 'normal', ...getAlign() ] } ], /** * Justify Items * @see https://tailwindcss.com/docs/justify-items */ 'justify-items': [ { 'justify-items': [ 'start', 'end', 'center', 'stretch' ] } ], /** * Justify Self * @see https://tailwindcss.com/docs/justify-self */ 'justify-self': [ { 'justify-self': [ 'auto', 'start', 'end', 'center', 'stretch' ] } ], /** * Align Content * @see https://tailwindcss.com/docs/align-content */ 'align-content': [ { content: [ 'normal', ...getAlign(), 'baseline' ] } ], /** * Align Items * @see https://tailwindcss.com/docs/align-items */ 'align-items': [ { items: [ 'start', 'end', 'center', 'baseline', 'stretch' ] } ], /** * Align Self * @see https://tailwindcss.com/docs/align-self */ 'align-self': [ { self: [ 'auto', 'start', 'end', 'center', 'stretch', 'baseline' ] } ], /** * Place Content * @see https://tailwindcss.com/docs/place-content */ 'place-content': [ { 'place-content': [ ...getAlign(), 'baseline' ] } ], /** * Place Items * @see https://tailwindcss.com/docs/place-items */ 'place-items': [ { 'place-items': [ 'start', 'end', 'center', 'baseline', 'stretch' ] } ], /** * Place Self * @see https://tailwindcss.com/docs/place-self */ 'place-self': [ { 'place-self': [ 'auto', 'start', 'end', 'center', 'stretch' ] } ], // Spacing /** * Padding * @see https://tailwindcss.com/docs/padding */ p: [ { p: [ padding ] } ], /** * Padding X * @see https://tailwindcss.com/docs/padding */ px: [ { px: [ padding ] } ], /** * Padding Y * @see https://tailwindcss.com/docs/padding */ py: [ { py: [ padding ] } ], /** * Padding Start * @see https://tailwindcss.com/docs/padding */ ps: [ { ps: [ padding ] } ], /** * Padding End * @see https://tailwindcss.com/docs/padding */ pe: [ { pe: [ padding ] } ], /** * Padding Top * @see https://tailwindcss.com/docs/padding */ pt: [ { pt: [ padding ] } ], /** * Padding Right * @see https://tailwindcss.com/docs/padding */ pr: [ { pr: [ padding ] } ], /** * Padding Bottom * @see https://tailwindcss.com/docs/padding */ pb: [ { pb: [ padding ] } ], /** * Padding Left * @see https://tailwindcss.com/docs/padding */ pl: [ { pl: [ padding ] } ], /** * Margin * @see https://tailwindcss.com/docs/margin */ m: [ { m: [ margin ] } ], /** * Margin X * @see https://tailwindcss.com/docs/margin */ mx: [ { mx: [ margin ] } ], /** * Margin Y * @see https://tailwindcss.com/docs/margin */ my: [ { my: [ margin ] } ], /** * Margin Start * @see https://tailwindcss.com/docs/margin */ ms: [ { ms: [ margin ] } ], /** * Margin End * @see https://tailwindcss.com/docs/margin */ me: [ { me: [ margin ] } ], /** * Margin Top * @see https://tailwindcss.com/docs/margin */ mt: [ { mt: [ margin ] } ], /** * Margin Right * @see https://tailwindcss.com/docs/margin */ mr: [ { mr: [ margin ] } ], /** * Margin Bottom * @see https://tailwindcss.com/docs/margin */ mb: [ { mb: [ margin ] } ], /** * Margin Left * @see https://tailwindcss.com/docs/margin */ ml: [ { ml: [ margin ] } ], /** * Space Between X * @see https://tailwindcss.com/docs/space */ 'space-x': [ { 'space-x': [ space ] } ], /** * Space Between X Reverse * @see https://tailwindcss.com/docs/space */ 'space-x-reverse': [ 'space-x-reverse' ], /** * Space Between Y * @see https://tailwindcss.com/docs/space */ 'space-y': [ { 'space-y': [ space ] } ], /** * Space Between Y Reverse * @see https://tailwindcss.com/docs/space */ 'space-y-reverse': [ 'space-y-reverse' ], // Sizing /** * Width * @see https://tailwindcss.com/docs/width */ w: [ { w: [ 'auto', 'min', 'max', 'fit', 'svw', 'lvw', 'dvw', isArbitraryValue, spacing ] } ], /** * Min-Width * @see https://tailwindcss.com/docs/min-width */ 'min-w': [ { 'min-w': [ isArbitraryValue, spacing, 'min', 'max', 'fit' ] } ], /** * Max-Width * @see https://tailwindcss.com/docs/max-width */ 'max-w': [ { 'max-w': [ isArbitraryValue, spacing, 'none', 'full', 'min', 'max', 'fit', 'prose', { screen: [ isTshirtSize ] }, isTshirtSize ] } ], /** * Height * @see https://tailwindcss.com/docs/height */ h: [ { h: [ isArbitraryValue, spacing, 'auto', 'min', 'max', 'fit', 'svh', 'lvh', 'dvh' ] } ], /** * Min-Height * @see https://tailwindcss.com/docs/min-height */ 'min-h': [ { 'min-h': [ isArbitraryValue, spacing, 'min', 'max', 'fit', 'svh', 'lvh', 'dvh' ] } ], /** * Max-Height * @see https://tailwindcss.com/docs/max-height */ 'max-h': [ { 'max-h': [ isArbitraryValue, spacing, 'min', 'max', 'fit', 'svh', 'lvh', 'dvh' ] } ], /** * Size * @see https://tailwindcss.com/docs/size */ size: [ { size: [ isArbitraryValue, spacing, 'auto', 'min', 'max', 'fit' ] } ], // Typography /** * Font Size * @see https://tailwindcss.com/docs/font-size */ 'font-size': [ { text: [ 'base', isTshirtSize, isArbitraryLength ] } ], /** * Font Smoothing * @see https://tailwindcss.com/docs/font-smoothing */ 'font-smoothing': [ 'antialiased', 'subpixel-antialiased' ], /** * Font Style * @see https://tailwindcss.com/docs/font-style */ 'font-style': [ 'italic', 'not-italic' ], /** * Font Weight * @see https://tailwindcss.com/docs/font-weight */ 'font-weight': [ { font: [ 'thin', 'extralight', 'light', 'normal', 'medium', 'semibold', 'bold', 'extrabold', 'black', isArbitraryNumber ] } ], /** * Font Family * @see https://tailwindcss.com/docs/font-family */ 'font-family': [ { font: [ isAny ] } ], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ 'fvn-normal': [ 'normal-nums' ], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ 'fvn-ordinal': [ 'ordinal' ], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ 'fvn-slashed-zero': [ 'slashed-zero' ], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ 'fvn-figure': [ 'lining-nums', 'oldstyle-nums' ], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ 'fvn-spacing': [ 'proportional-nums', 'tabular-nums' ], /** * Font Variant Numeric * @see https://tailwindcss.com/docs/font-variant-numeric */ 'fvn-fraction': [ 'diagonal-fractions', 'stacked-fractions' ], /** * Letter Spacing * @see https://tailwindcss.com/docs/letter-spacing */ tracking: [ { tracking: [ 'tighter', 'tight', 'normal', 'wide', 'wider', 'widest', isArbitraryValue ] } ], /** * Line Clamp * @see https://tailwindcss.com/docs/line-clamp */ 'line-clamp': [ { 'line-clamp': [ 'none', isNumber, isArbitraryNumber ] } ], /** * Line Height * @see https://tailwindcss.com/docs/line-height */ leading: [ { leading: [ 'none', 'tight', 'snug', 'normal', 'relaxed', 'loose', isLength, isArbitraryValue ] } ], /** * List Style Image * @see https://tailwindcss.com/docs/list-style-image */ 'list-image': [ { 'list-image': [ 'none', isArbitraryValue ] } ], /** * List Style Type * @see https://tailwindcss.com/docs/list-style-type */ 'list-style-type': [ { list: [ 'none', 'disc', 'decimal', isArbitraryValue ] } ], /** * List Style Position * @see https://tailwindcss.com/docs/list-style-position */ 'list-style-position': [ { list: [ 'inside', 'outside' ] } ], /** * Placeholder Color * @deprecated since Tailwind CSS v3.0.0 * @see https://tailwindcss.com/docs/placeholder-color */ 'placeholder-color': [ { placeholder: [ colors ] } ], /** * Placeholder Opacity * @see https://tailwindcss.com/docs/placeholder-opacity */ 'placeholder-opacity': [ { 'placeholder-opacity': [ opacity ] } ], /** * Text Alignment * @see https://tailwindcss.com/docs/text-align */ 'text-alignment': [ { text: [ 'left', 'center', 'right', 'justify', 'start', 'end' ] } ], /** * Text Color * @see https://tailwindcss.com/docs/text-color */ 'text-color': [ { text: [ colors ] } ], /** * Text Opacity * @see https://tailwindcss.com/docs/text-opacity */ 'text-opacity': [ { 'text-opacity': [ opacity ] } ], /** * Text Decoration * @see https://tailwindcss.com/docs/text-decoration */ 'text-decoration': [ 'underline', 'overline', 'line-through', 'no-underline' ], /** * Text Decoration Style * @see https://tailwindcss.com/docs/text-decoration-style */ 'text-decoration-style': [ { decoration: [ ...getLineStyles(), 'wavy' ] } ], /** * Text Decoration Thickness * @see https://tailwindcss.com/docs/text-decoration-thickness */ 'text-decoration-thickness': [ { decoration: [ 'auto', 'from-font', isLength, isArbitraryLength ] } ], /** * Text Underline Offset * @see https://tailwindcss.com/docs/text-underline-offset */ 'underline-offset': [ { 'underline-offset': [ 'auto', isLength, isArbitraryValue ] } ], /** * Text Decoration Color * @see https://tailwindcss.com/docs/text-decoration-color */ 'text-decoration-color': [ { decoration: [ colors ] } ], /** * Text Transform * @see https://tailwindcss.com/docs/text-transform */ 'text-transform': [ 'uppercase', 'lowercase', 'capitalize', 'normal-case' ], /** * Text Overflow * @see https://tailwindcss.com/docs/text-overflow */ 'text-overflow': [ 'truncate', 'text-ellipsis', 'text-clip' ], /** * Text Wrap * @see https://tailwindcss.com/docs/text-wrap */ 'text-wrap': [ { text: [ 'wrap', 'nowrap', 'balance', 'pretty' ] } ], /** * Text Indent * @see https://tailwindcss.com/docs/text-indent */ indent: [ { indent: getSpacingWithArbitrary() } ], /** * Vertical Alignment * @see https://tailwindcss.com/docs/vertical-align */ 'vertical-align': [ { align: [ 'baseline', 'top', 'middle', 'bottom', 'text-top', 'text-bottom', 'sub', 'super', isArbitraryValue ] } ], /** * Whitespace * @see https://tailwindcss.com/docs/whitespace */ whitespace: [ { whitespace: [ 'normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces' ] } ], /** * Word Break * @see https://tailwindcss.com/docs/word-break */ break: [ { break: [ 'normal', 'words', 'all', 'keep' ] } ], /** * Hyphens * @see https://tailwindcss.com/docs/hyphens */ hyphens: [ { hyphens: [ 'none', 'manual', 'auto' ] } ], /** * Content * @see https://tailwindcss.com/docs/content */ content: [ { content: [ 'none', isArbitraryValue ] } ], // Backgrounds /** * Background Attachment * @see https://tailwindcss.com/docs/background-attachment */ 'bg-attachment': [ { bg: [ 'fixed', 'local', 'scroll' ] } ], /** * Background Clip * @see https://tailwindcss.com/docs/background-clip */ 'bg-clip': [ { 'bg-clip': [ 'border', 'padding', 'content', 'text' ] } ], /** * Background Opacity * @deprecated since Tailwind CSS v3.0.0 * @see https://tailwindcss.com/docs/background-opacity */ 'bg-opacity': [ { 'bg-opacity': [ opacity ] } ], /** * Background Origin * @see https://tailwindcss.com/docs/background-origin */ 'bg-origin': [ { 'bg-origin': [ 'border', 'padding', 'content' ] } ], /** * Background Position * @see https://tailwindcss.com/docs/background-position */ 'bg-position': [ { bg: [ ...getPositions(), isArbitraryPosition ] } ], /** * Background Repeat * @see https://tailwindcss.com/docs/background-repeat */ 'bg-repeat': [ { bg: [ 'no-repeat', { repeat: [ '', 'x', 'y', 'round', 'space' ] } ] } ], /** * Background Size * @see https://tailwindcss.com/docs/background-size */ 'bg-size': [ { bg: [ 'auto', 'cover', 'contain', isArbitrarySize ] } ], /** * Background Image * @see https://tailwindcss.com/docs/background-image */ 'bg-image': [ { bg: [ 'none', { 'gradient-to': [ 't', 'tr', 'r', 'br', 'b', 'bl', 'l', 'tl' ] }, isArbitraryImage ] } ], /** * Background Color * @see https://tailwindcss.com/docs/background-color */ 'bg-color': [ { bg: [ colors ] } ], /** * Gradient Color Stops From Position * @see https://tailwindcss.com/docs/gradient-color-stops */ 'gradient-from-pos': [ { from: [ gradientColorStopPositions ] } ], /** * Gradient Color Stops Via Position * @see https://tailwindcss.com/docs/gradient-color-stops */ 'gradient-via-pos': [ { via: [ gradientColorStopPositions ] } ], /** * Gradient Color Stops To Position * @see https://tailwindcss.com/docs/gradient-color-stops */ 'gradient-to-pos': [ { to: [ gradientColorStopPositions ] } ], /** * Gradient Color Stops From * @see https://tailwindcss.com/docs/gradient-color-stops */ 'gradient-from': [ { from: [ gradientColorStops ] } ], /** * Gradient Color Stops Via * @see https://tailwindcss.com/docs/gradient-color-stops */ 'gradient-via': [ { via: [ gradientColorStops ] } ], /** * Gradient Color Stops To * @see https://tailwindcss.com/docs/gradient-color-stops */ 'gradient-to': [ { to: [ gradientColorStops ] } ], // Borders /** * Border Radius * @see https://tailwindcss.com/docs/border-radius */ rounded: [ { rounded: [ borderRadius ] } ], /** * Border Radius Start * @see https://tailwindcss.com/docs/border-radius */ 'rounded-s': [ { 'rounded-s': [ borderRadius ] } ], /** * Border Radius End * @see https://tailwindcss.com/docs/border-radius */ 'rounded-e': [ { 'rounded-e': [ borderRadius ] } ], /** * Border Radius Top * @see https://tailwindcss.com/docs/border-radius */ 'rounded-t': [ { 'rounded-t': [ borderRadius ] } ], /** * Border Radius Right * @see https://tailwindcss.com/docs/border-radius */ 'rounded-r': [ { 'rounded-r': [ borderRadius ] } ], /** * Border Radius Bottom * @see https://tailwindcss.com/docs/border-radius */ 'rounded-b': [ { 'rounded-b': [ borderRadius ] } ], /** * Border Radius Left * @see https://tailwindcss.com/docs/border-radius */ 'rounded-l': [ { 'rounded-l': [ borderRadius ] } ], /** * Border Radius Start Start * @see https://tailwindcss.com/docs/border-radius */ 'rounded-ss': [ { 'rounded-ss': [ borderRadius ] } ], /** * Border Radius Start End * @see https://tailwindcss.com/docs/border-radius */ 'rounded-se': [ { 'rounded-se': [ borderRadius ] } ], /** * Border Radius End End * @see https://tailwindcss.com/docs/border-radius */ 'rounded-ee': [ { 'rounded-ee': [ borderRadius ] } ], /** * Border Radius End Start * @see https://tailwindcss.com/docs/border-radius */ 'rounded-es': [ { 'rounded-es': [ borderRadius ] } ], /** * Border Radius Top Left * @see https://tailwindcss.com/docs/border-radius */ 'rounded-tl': [ { 'rounded-tl': [ borderRadius ] } ], /** * Border Radius Top Right * @see https://tailwindcss.com/docs/border-radius */ 'rounded-tr': [ { 'rounded-tr': [ borderRadius ] } ], /** * Border Radius Bottom Right * @see https://tailwindcss.com/docs/border-radius */ 'rounded-br': [ { 'rounded-br': [ borderRadius ] } ], /** * Border Radius Bottom Left * @see https://tailwindcss.com/docs/border-radius */ 'rounded-bl': [ { 'rounded-bl': [ borderRadius ] } ], /** * Border Width * @see https://tailwindcss.com/docs/border-width */ 'border-w': [ { border: [ borderWidth ] } ], /** * Border Width X * @see https://tailwindcss.com/docs/border-width */ 'border-w-x': [ { 'border-x': [ borderWidth ] } ], /** * Border Width Y * @see https://tailwindcss.com/docs/border-width */ 'border-w-y': [ { 'border-y': [ borderWidth ] } ], /** * Border Width Start * @see https://tailwindcss.com/docs/border-width */ 'border-w-s': [ { 'border-s': [ borderWidth ] } ], /** * Border Width End * @see https://tailwindcss.com/docs/border-width */ 'border-w-e': [ { 'border-e': [ borderWidth ] } ], /** * Border Width Top * @see https://tailwindcss.com/docs/border-width */ 'border-w-t': [ { 'border-t': [ borderWidth ] } ], /** * Border Width Right * @see https://tailwindcss.com/docs/border-width */ 'border-w-r': [ { 'border-r': [ borderWidth ] } ], /** * Border Width Bottom * @see https://tailwindcss.com/docs/border-width */ 'border-w-b': [ { 'border-b': [ borderWidth ] } ], /** * Border Width Left * @see https://tailwindcss.com/docs/border-width */ 'border-w-l': [ { 'border-l': [ borderWidth ] } ], /** * Border Opacity * @see https://tailwindcss.com/docs/border-opacity */ 'border-opacity': [ { 'border-opacity': [ opacity ] } ], /** * Border Style * @see https://tailwindcss.com/docs/border-style */ 'border-style': [ { border: [ ...getLineStyles(), 'hidden' ] } ], /** * Divide Width X * @see https://tailwindcss.com/docs/divide-width */ 'divide-x': [ { 'divide-x': [ borderWidth ] } ], /** * Divide Width X Reverse * @see https://tailwindcss.com/docs/divide-width */ 'divide-x-reverse': [ 'divide-x-reverse' ], /** * Divide Width Y * @see https://tailwindcss.com/docs/divide-width */ 'divide-y': [ { 'divide-y': [ borderWidth ] } ], /** * Divide Width Y Reverse * @see https://tailwindcss.com/docs/divide-width */ 'divide-y-reverse': [ 'divide-y-reverse' ], /** * Divide Opacity * @see https://tailwindcss.com/docs/divide-opacity */ 'divide-opacity': [ { 'divide-opacity': [ opacity ] } ], /** * Divide Style * @see https://tailwindcss.com/docs/divide-style */ 'divide-style': [ { divide: getLineStyles() } ], /** * Border Color * @see https://tailwindcss.com/docs/border-color */ 'border-color': [ { border: [ borderColor ] } ], /** * Border Color X * @see https://tailwindcss.com/docs/border-color */ 'border-color-x': [ { 'border-x': [ borderColor ] } ], /** * Border Color Y * @see https://tailwindcss.com/docs/border-color */ 'border-color-y': [ { 'border-y': [ borderColor ] } ], /** * Border Color S * @see https://tailwindcss.com/docs/border-color */ 'border-color-s': [ { 'border-s': [ borderColor ] } ], /** * Border Color E * @see https://tailwindcss.com/docs/border-color */ 'border-color-e': [ { 'border-e': [ borderColor ] } ], /** * Border Color Top * @see https://tailwindcss.com/docs/border-color */ 'border-color-t': [ { 'border-t': [ borderColor ] } ], /** * Border Color Right * @see https://tailwindcss.com/docs/border-color */ 'border-color-r': [ { 'border-r': [ borderColor ] } ], /** * Border Color Bottom * @see https://tailwindcss.com/docs/border-color */ 'border-color-b': [ { 'border-b': [ borderColor ] } ], /** * Border Color Left * @see https://tailwindcss.com/docs/border-color */ 'border-color-l': [ { 'border-l': [ borderColor ] } ], /** * Divide Color * @see https://tailwindcss.com/docs/divide-color */ 'divide-color': [ { divide: [ borderColor ] } ], /** * Outline Style * @see https://tailwindcss.com/docs/outline-style */ 'outline-style': [ { outline: [ '', ...getLineStyles() ] } ], /** * Outline Offset * @see https://tailwindcss.com/docs/outline-offset */ 'outline-offset': [ { 'outline-offset': [ isLength, isArbitraryValue ] } ], /** * Outline Width * @see https://tailwindcss.com/docs/outline-width */ 'outline-w': [ { outline: [ isLength, isArbitraryLength ] } ], /** * Outline Color * @see https://tailwindcss.com/docs/outline-color */ 'outline-color': [ { outline: [ colors ] } ], /** * Ring Width * @see https://tailwindcss.com/docs/ring-width */ 'ring-w': [ { ring: getLengthWithEmptyAndArbitrary() } ], /** * Ring Width Inset * @see https://tailwindcss.com/docs/ring-width */ 'ring-w-inset': [ 'ring-inset' ], /** * Ring Color * @see https://tailwindcss.com/docs/ring-color */ 'ring-color': [ { ring: [ colors ] } ], /** * Ring Opacity * @see https://tailwindcss.com/docs/ring-opacity */ 'ring-opacity': [ { 'ring-opacity': [ opacity ] } ], /** * Ring Offset Width * @see https://tailwindcss.com/docs/ring-offset-width */ 'ring-offset-w': [ { 'ring-offset': [ isLength, isArbitraryLength ] } ], /** * Ring Offset Color * @see https://tailwindcss.com/docs/ring-offset-color */ 'ring-offset-color': [ { 'ring-offset': [ colors ] } ], // Effects /** * Box Shadow * @see https://tailwindcss.com/docs/box-shadow */ shadow: [ { shadow: [ '', 'inner', 'none', isTshirtSize, isArbitraryShadow ] } ], /** * Box Shadow Color * @see https://tailwindcss.com/docs/box-shadow-color */ 'shadow-color': [ { shadow: [ isAny ] } ], /** * Opacity * @see https://tailwindcss.com/docs/opacity */ opacity: [ { opacity: [ opacity ] } ], /** * Mix Blend Mode * @see https://tailwindcss.com/docs/mix-blend-mode */ 'mix-blend': [ { 'mix-blend': [ ...getBlendModes(), 'plus-lighter', 'plus-darker' ] } ], /** * Background Blend Mode * @see https://tailwindcss.com/docs/background-blend-mode */ 'bg-blend': [ { 'bg-blend': getBlendModes() } ], // Filters /** * Filter * @deprecated since Tailwind CSS v3.0.0 * @see https://tailwindcss.com/docs/filter */ filter: [ { filter: [ '', 'none' ] } ], /** * Blur * @see https://tailwindcss.com/docs/blur */ blur: [ { blur: [ blur ] } ], /** * Brightness * @see https://tailwindcss.com/docs/brightness */ brightness: [ { brightness: [ brightness ] } ], /** * Contrast * @see https://tailwindcss.com/docs/contrast */ contrast: [ { contrast: [ contrast ] } ], /** * Drop Shadow * @see https://tailwindcss.com/docs/drop-shadow */ 'drop-shadow': [ { 'drop-shadow': [ '', 'none', isTshirtSize, isArbitraryValue ] } ], /** * Grayscale * @see https://tailwindcss.com/docs/grayscale */ grayscale: [ { grayscale: [ grayscale ] } ], /** * Hue Rotate * @see https://tailwindcss.com/docs/hue-rotate */ 'hue-rotate': [ { 'hue-rotate': [ hueRotate ] } ], /** * Invert * @see https://tailwindcss.com/docs/invert */ invert: [ { invert: [ invert ] } ], /** * Saturate * @see https://tailwindcss.com/docs/saturate */ saturate: [ { saturate: [ saturate ] } ], /** * Sepia * @see https://tailwindcss.com/docs/sepia */ sepia: [ { sepia: [ sepia ] } ], /** * Backdrop Filter * @deprecated since Tailwind CSS v3.0.0 * @see https://tailwindcss.com/docs/backdrop-filter */ 'backdrop-filter': [ { 'backdrop-filter': [ '', 'none' ] } ], /** * Backdrop Blur * @see https://tailwindcss.com/docs/backdrop-blur */ 'backdrop-blur': [ { 'backdrop-blur': [ blur ] } ], /** * Backdrop Brightness * @see https://tailwindcss.com/docs/backdrop-brightness */ 'backdrop-brightness': [ { 'backdrop-brightness': [ brightness ] } ], /** * Backdrop Contrast * @see https://tailwindcss.com/docs/backdrop-contrast */ 'backdrop-contrast': [ { 'backdrop-contrast': [ contrast ] } ], /** * Backdrop Grayscale * @see https://tailwindcss.com/docs/backdrop-grayscale */ 'backdrop-grayscale': [ { 'backdrop-grayscale': [ grayscale ] } ], /** * Backdrop Hue Rotate * @see https://tailwindcss.com/docs/backdrop-hue-rotate */ 'backdrop-hue-rotate': [ { 'backdrop-hue-rotate': [ hueRotate ] } ], /** * Backdrop Invert * @see https://tailwindcss.com/docs/backdrop-invert */ 'backdrop-invert': [ { 'backdrop-invert': [ invert ] } ], /** * Backdrop Opacity * @see https://tailwindcss.com/docs/backdrop-opacity */ 'backdrop-opacity': [ { 'backdrop-opacity': [ opacity ] } ], /** * Backdrop Saturate * @see https://tailwindcss.com/docs/backdrop-saturate */ 'backdrop-saturate': [ { 'backdrop-saturate': [ saturate ] } ], /** * Backdrop Sepia * @see https://tailwindcss.com/docs/backdrop-sepia */ 'backdrop-sepia': [ { 'backdrop-sepia': [ sepia ] } ], // Tables /** * Border Collapse * @see https://tailwindcss.com/docs/border-collapse */ 'border-collapse': [ { border: [ 'collapse', 'separate' ] } ], /** * Border Spacing * @see https://tailwindcss.com/docs/border-spacing */ 'border-spacing': [ { 'border-spacing': [ borderSpacing ] } ], /** * Border Spacing X * @see https://tailwindcss.com/docs/border-spacing */ 'border-spacing-x': [ { 'border-spacing-x': [ borderSpacing ] } ], /** * Border Spacing Y * @see https://tailwindcss.com/docs/border-spacing */ 'border-spacing-y': [ { 'border-spacing-y': [ borderSpacing ] } ], /** * Table Layout * @see https://tailwindcss.com/docs/table-layout */ 'table-layout': [ { table: [ 'auto', 'fixed' ] } ], /** * Caption Side * @see https://tailwindcss.com/docs/caption-side */ caption: [ { caption: [ 'top', 'bottom' ] } ], // Transitions and Animation /** * Tranisition Property * @see https://tailwindcss.com/docs/transition-property */ transition: [ { transition: [ 'none', 'all', '', 'colors', 'opacity', 'shadow', 'transform', isArbitraryValue ] } ], /** * Transition Duration * @see https://tailwindcss.com/docs/transition-duration */ duration: [ { duration: getNumberAndArbitrary() } ], /** * Transition Timing Function * @see https://tailwindcss.com/docs/transition-timing-function */ ease: [ { ease: [ 'linear', 'in', 'out', 'in-out', isArbitraryValue ] } ], /** * Transition Delay * @see https://tailwindcss.com/docs/transition-delay */ delay: [ { delay: getNumberAndArbitrary() } ], /** * Animation * @see https://tailwindcss.com/docs/animation */ animate: [ { animate: [ 'none', 'spin', 'ping', 'pulse', 'bounce', isArbitraryValue ] } ], // Transforms /** * Transform * @see https://tailwindcss.com/docs/transform */ transform: [ { transform: [ '', 'gpu', 'none' ] } ], /** * Scale * @see https://tailwindcss.com/docs/scale */ scale: [ { scale: [ scale ] } ], /** * Scale X * @see https://tailwindcss.com/docs/scale */ 'scale-x': [ { 'scale-x': [ scale ] } ], /** * Scale Y * @see https://tailwindcss.com/docs/scale */ 'scale-y': [ { 'scale-y': [ scale ] } ], /** * Rotate * @see https://tailwindcss.com/docs/rotate */ rotate: [ { rotate: [ isInteger, isArbitraryValue ] } ], /** * Translate X * @see https://tailwindcss.com/docs/translate */ 'translate-x': [ { 'translate-x': [ translate ] } ], /** * Translate Y * @see https://tailwindcss.com/docs/translate */ 'translate-y': [ { 'translate-y': [ translate ] } ], /** * Skew X * @see https://tailwindcss.com/docs/skew */ 'skew-x': [ { 'skew-x': [ skew ] } ], /** * Skew Y * @see https://tailwindcss.com/docs/skew */ 'skew-y': [ { 'skew-y': [ skew ] } ], /** * Transform Origin * @see https://tailwindcss.com/docs/transform-origin */ 'transform-origin': [ { origin: [ 'center', 'top', 'top-right', 'right', 'bottom-right', 'bottom', 'bottom-left', 'left', 'top-left', isArbitraryValue ] } ], // Interactivity /** * Accent Color * @see https://tailwindcss.com/docs/accent-color */ accent: [ { accent: [ 'auto', colors ] } ], /** * Appearance * @see https://tailwindcss.com/docs/appearance */ appearance: [ { appearance: [ 'none', 'auto' ] } ], /** * Cursor * @see https://tailwindcss.com/docs/cursor */ cursor: [ { cursor: [ 'auto', 'default', 'pointer', 'wait', 'text', 'move', 'help', 'not-allowed', 'none', 'context-menu', 'progress', 'cell', 'crosshair', 'vertical-text', 'alias', 'copy', 'no-drop', 'grab', 'grabbing', 'all-scroll', 'col-resize', 'row-resize', 'n-resize', 'e-resize', 's-resize', 'w-resize', 'ne-resize', 'nw-resize', 'se-resize', 'sw-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'zoom-in', 'zoom-out', isArbitraryValue ] } ], /** * Caret Color * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities */ 'caret-color': [ { caret: [ colors ] } ], /** * Pointer Events * @see https://tailwindcss.com/docs/pointer-events */ 'pointer-events': [ { 'pointer-events': [ 'none', 'auto' ] } ], /** * Resize * @see https://tailwindcss.com/docs/resize */ resize: [ { resize: [ 'none', 'y', 'x', '' ] } ], /** * Scroll Behavior * @see https://tailwindcss.com/docs/scroll-behavior */ 'scroll-behavior': [ { scroll: [ 'auto', 'smooth' ] } ], /** * Scroll Margin * @see https://tailwindcss.com/docs/scroll-margin */ 'scroll-m': [ { 'scroll-m': getSpacingWithArbitrary() } ], /** * Scroll Margin X * @see https://tailwindcss.com/docs/scroll-margin */ 'scroll-mx': [ { 'scroll-mx': getSpacingWithArbitrary() } ], /** * Scroll Margin Y * @see https://tailwindcss.com/docs/scroll-margin */ 'scroll-my': [ { 'scroll-my': getSpacingWithArbitrary() } ], /** * Scroll Margin Start * @see https://tailwindcss.com/docs/scroll-margin */ 'scroll-ms': [ { 'scroll-ms': getSpacingWithArbitrary() } ], /** * Scroll Margin End * @see https://tailwindcss.com/docs/scroll-margin */ 'scroll-me': [ { 'scroll-me': getSpacingWithArbitrary() } ], /** * Scroll Margin Top * @see https://tailwindcss.com/docs/scroll-margin */ 'scroll-mt': [ { 'scroll-mt': getSpacingWithArbitrary() } ], /** * Scroll Margin Right * @see https://tailwindcss.com/docs/scroll-margin */ 'scroll-mr': [ { 'scroll-mr': getSpacingWithArbitrary() } ], /** * Scroll Margin Bottom * @see https://tailwindcss.com/docs/scroll-margin */ 'scroll-mb': [ { 'scroll-mb': getSpacingWithArbitrary() } ], /** * Scroll Margin Left * @see https://tailwindcss.com/docs/scroll-margin */ 'scroll-ml': [ { 'scroll-ml': getSpacingWithArbitrary() } ], /** * Scroll Padding * @see https://tailwindcss.com/docs/scroll-padding */ 'scroll-p': [ { 'scroll-p': getSpacingWithArbitrary() } ], /** * Scroll Padding X * @see https://tailwindcss.com/docs/scroll-padding */ 'scroll-px': [ { 'scroll-px': getSpacingWithArbitrary() } ], /** * Scroll Padding Y * @see https://tailwindcss.com/docs/scroll-padding */ 'scroll-py': [ { 'scroll-py': getSpacingWithArbitrary() } ], /** * Scroll Padding Start * @see https://tailwindcss.com/docs/scroll-padding */ 'scroll-ps': [ { 'scroll-ps': getSpacingWithArbitrary() } ], /** * Scroll Padding End * @see https://tailwindcss.com/docs/scroll-padding */ 'scroll-pe': [ { 'scroll-pe': getSpacingWithArbitrary() } ], /** * Scroll Padding Top * @see https://tailwindcss.com/docs/scroll-padding */ 'scroll-pt': [ { 'scroll-pt': getSpacingWithArbitrary() } ], /** * Scroll Padding Right * @see https://tailwindcss.com/docs/scroll-padding */ 'scroll-pr': [ { 'scroll-pr': getSpacingWithArbitrary() } ], /** * Scroll Padding Bottom * @see https://tailwindcss.com/docs/scroll-padding */ 'scroll-pb': [ { 'scroll-pb': getSpacingWithArbitrary() } ], /** * Scroll Padding Left * @see https://tailwindcss.com/docs/scroll-padding */ 'scroll-pl': [ { 'scroll-pl': getSpacingWithArbitrary() } ], /** * Scroll Snap Align * @see https://tailwindcss.com/docs/scroll-snap-align */ 'snap-align': [ { snap: [ 'start', 'end', 'center', 'align-none' ] } ], /** * Scroll Snap Stop * @see https://tailwindcss.com/docs/scroll-snap-stop */ 'snap-stop': [ { snap: [ 'normal', 'always' ] } ], /** * Scroll Snap Type * @see https://tailwindcss.com/docs/scroll-snap-type */ 'snap-type': [ { snap: [ 'none', 'x', 'y', 'both' ] } ], /** * Scroll Snap Type Strictness * @see https://tailwindcss.com/docs/scroll-snap-type */ 'snap-strictness': [ { snap: [ 'mandatory', 'proximity' ] } ], /** * Touch Action * @see https://tailwindcss.com/docs/touch-action */ touch: [ { touch: [ 'auto', 'none', 'manipulation' ] } ], /** * Touch Action X * @see https://tailwindcss.com/docs/touch-action */ 'touch-x': [ { 'touch-pan': [ 'x', 'left', 'right' ] } ], /** * Touch Action Y * @see https://tailwindcss.com/docs/touch-action */ 'touch-y': [ { 'touch-pan': [ 'y', 'up', 'down' ] } ], /** * Touch Action Pinch Zoom * @see https://tailwindcss.com/docs/touch-action */ 'touch-pz': [ 'touch-pinch-zoom' ], /** * User Select * @see https://tailwindcss.com/docs/user-select */ select: [ { select: [ 'none', 'text', 'all', 'auto' ] } ], /** * Will Change * @see https://tailwindcss.com/docs/will-change */ 'will-change': [ { 'will-change': [ 'auto', 'scroll', 'contents', 'transform', isArbitraryValue ] } ], // SVG /** * Fill * @see https://tailwindcss.com/docs/fill */ fill: [ { fill: [ colors, 'none' ] } ], /** * Stroke Width * @see https://tailwindcss.com/docs/stroke-width */ 'stroke-w': [ { stroke: [ isLength, isArbitraryLength, isArbitraryNumber ] } ], /** * Stroke * @see https://tailwindcss.com/docs/stroke */ stroke: [ { stroke: [ colors, 'none' ] } ], // Accessibility /** * Screen Readers * @see https://tailwindcss.com/docs/screen-readers */ sr: [ 'sr-only', 'not-sr-only' ], /** * Forced Color Adjust * @see https://tailwindcss.com/docs/forced-color-adjust */ 'forced-color-adjust': [ { 'forced-color-adjust': [ 'auto', 'none' ] } ] }, conflictingClassGroups: { overflow: [ 'overflow-x', 'overflow-y' ], overscroll: [ 'overscroll-x', 'overscroll-y' ], inset: [ 'inset-x', 'inset-y', 'start', 'end', 'top', 'right', 'bottom', 'left' ], 'inset-x': [ 'right', 'left' ], 'inset-y': [ 'top', 'bottom' ], flex: [ 'basis', 'grow', 'shrink' ], gap: [ 'gap-x', 'gap-y' ], p: [ 'px', 'py', 'ps', 'pe', 'pt', 'pr', 'pb', 'pl' ], px: [ 'pr', 'pl' ], py: [ 'pt', 'pb' ], m: [ 'mx', 'my', 'ms', 'me', 'mt', 'mr', 'mb', 'ml' ], mx: [ 'mr', 'ml' ], my: [ 'mt', 'mb' ], size: [ 'w', 'h' ], 'font-size': [ 'leading' ], 'fvn-normal': [ 'fvn-ordinal', 'fvn-slashed-zero', 'fvn-figure', 'fvn-spacing', 'fvn-fraction' ], 'fvn-ordinal': [ 'fvn-normal' ], 'fvn-slashed-zero': [ 'fvn-normal' ], 'fvn-figure': [ 'fvn-normal' ], 'fvn-spacing': [ 'fvn-normal' ], 'fvn-fraction': [ 'fvn-normal' ], 'line-clamp': [ 'display', 'overflow' ], rounded: [ 'rounded-s', 'rounded-e', 'rounded-t', 'rounded-r', 'rounded-b', 'rounded-l', 'rounded-ss', 'rounded-se', 'rounded-ee', 'rounded-es', 'rounded-tl', 'rounded-tr', 'rounded-br', 'rounded-bl' ], 'rounded-s': [ 'rounded-ss', 'rounded-es' ], 'rounded-e': [ 'rounded-se', 'rounded-ee' ], 'rounded-t': [ 'rounded-tl', 'rounded-tr' ], 'rounded-r': [ 'rounded-tr', 'rounded-br' ], 'rounded-b': [ 'rounded-br', 'rounded-bl' ], 'rounded-l': [ 'rounded-tl', 'rounded-bl' ], 'border-spacing': [ 'border-spacing-x', 'border-spacing-y' ], 'border-w': [ 'border-w-s', 'border-w-e', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l' ], 'border-w-x': [ 'border-w-r', 'border-w-l' ], 'border-w-y': [ 'border-w-t', 'border-w-b' ], 'border-color': [ 'border-color-s', 'border-color-e', 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l' ], 'border-color-x': [ 'border-color-r', 'border-color-l' ], 'border-color-y': [ 'border-color-t', 'border-color-b' ], 'scroll-m': [ 'scroll-mx', 'scroll-my', 'scroll-ms', 'scroll-me', 'scroll-mt', 'scroll-mr', 'scroll-mb', 'scroll-ml' ], 'scroll-mx': [ 'scroll-mr', 'scroll-ml' ], 'scroll-my': [ 'scroll-mt', 'scroll-mb' ], 'scroll-p': [ 'scroll-px', 'scroll-py', 'scroll-ps', 'scroll-pe', 'scroll-pt', 'scroll-pr', 'scroll-pb', 'scroll-pl' ], 'scroll-px': [ 'scroll-pr', 'scroll-pl' ], 'scroll-py': [ 'scroll-pt', 'scroll-pb' ], touch: [ 'touch-x', 'touch-y', 'touch-pz' ], 'touch-x': [ 'touch' ], 'touch-y': [ 'touch' ], 'touch-pz': [ 'touch' ] }, conflictingClassGroupModifiers: { 'font-size': [ 'leading' ] } }; }; /** * @param baseConfig Config where other config will be merged into. This object will be mutated. * @param configExtension Partial config to merge into the `baseConfig`. */ const mergeConfigs = (baseConfig, { cacheSize, prefix, separator, experimentalParseClassName, extend = {}, override = {} })=>{ overrideProperty(baseConfig, 'cacheSize', cacheSize); overrideProperty(baseConfig, 'prefix', prefix); overrideProperty(baseConfig, 'separator', separator); overrideProperty(baseConfig, 'experimentalParseClassName', experimentalParseClassName); for(const configKey in override){ overrideConfigProperties(baseConfig[configKey], override[configKey]); } for(const key in extend){ mergeConfigProperties(baseConfig[key], extend[key]); } return baseConfig; }; const overrideProperty = (baseObject, overrideKey, overrideValue)=>{ if (overrideValue !== undefined) { baseObject[overrideKey] = overrideValue; } }; const overrideConfigProperties = (baseObject, overrideObject)=>{ if (overrideObject) { for(const key in overrideObject){ overrideProperty(baseObject, key, overrideObject[key]); } } }; const mergeConfigProperties = (baseObject, mergeObject)=>{ if (mergeObject) { for(const key in mergeObject){ const mergeValue = mergeObject[key]; if (mergeValue !== undefined) { baseObject[key] = (baseObject[key] || []).concat(mergeValue); } } } }; const extendTailwindMerge = (configExtension, ...createConfig)=>typeof configExtension === 'function' ? createTailwindMerge(getDefaultConfig, configExtension, ...createConfig) : createTailwindMerge(()=>mergeConfigs(getDefaultConfig(), configExtension), ...createConfig); const twMerge = /*#__PURE__*/ createTailwindMerge(getDefaultConfig); ; //# sourceMappingURL=bundle-mjs.mjs.map }), "[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; function _interop_require_default(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports._ = _interop_require_default; }), "[project]/node_modules/next/dist/shared/lib/image-blur-svg.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; /** * A shared function, used on both client and server, to generate a SVG blur placeholder. */ 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 }), "[project]/node_modules/next/dist/shared/lib/image-config.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "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' ], maximumRedirects: 3, dangerouslyAllowLocalIP: false, dangerouslyAllowSVG: false, contentSecurityPolicy: `script-src 'none'; frame-src 'none'; sandbox;`, contentDispositionType: 'attachment', localPatterns: undefined, remotePatterns: [], qualities: [ 75 ], unoptimized: false }; //# sourceMappingURL=image-config.js.map }), "[project]/node_modules/next/dist/shared/lib/get-img-props.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "getImgProps", { enumerable: true, get: function() { return getImgProps; } }); const _warnonce = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/utils/warn-once.js [app-ssr] (ecmascript)"); const _imageblursvg = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/image-blur-svg.js [app-ssr] (ecmascript)"); const _imageconfig = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/image-config.js [app-ssr] (ecmascript)"); const VALID_LOADING_VALUES = [ 'lazy', 'eager', undefined ]; // Object-fit values that are not valid background-size values const INVALID_BACKGROUND_SIZE_VALUES = [ '-moz-initial', 'fill', 'none', 'scale-down', undefined ]; function isStaticRequire(src) { return src.default !== undefined; } function isStaticImageData(src) { return src.src !== undefined; } function isStaticImport(src) { return !!src && typeof src === 'object' && (isStaticRequire(src) || isStaticImageData(src)); } const allImgs = new Map(); let perfObserver; function getInt(x) { if (typeof x === 'undefined') { return x; } if (typeof x === 'number') { return Number.isFinite(x) ? x : NaN; } if (typeof x === 'string' && /^[0-9]+$/.test(x)) { return parseInt(x, 10); } return NaN; } function getWidths({ deviceSizes, allSizes }, width, sizes) { if (sizes) { // Find all the "vw" percent sizes used in the sizes prop const viewportWidthRe = /(^|\s)(1?\d?\d)vw/g; const percentSizes = []; for(let match; match = viewportWidthRe.exec(sizes); match){ percentSizes.push(parseInt(match[2])); } if (percentSizes.length) { const smallestRatio = Math.min(...percentSizes) * 0.01; return { widths: allSizes.filter((s)=>s >= deviceSizes[0] * smallestRatio), kind: 'w' }; } return { widths: allSizes, kind: 'w' }; } if (typeof width !== 'number') { return { widths: deviceSizes, kind: 'w' }; } const widths = [ ...new Set(// > are actually 3x in the green color, but only 1.5x in the red and // > blue colors. Showing a 3x resolution image in the app vs a 2x // > resolution image will be visually the same, though the 3x image // > takes significantly more data. Even true 3x resolution screens are // > wasteful as the human eye cannot see that level of detail without // > something like a magnifying glass. // https://blog.twitter.com/engineering/en_us/topics/infrastructure/2019/capping-image-fidelity-on-ultra-high-resolution-devices.html [ width, width * 2 /*, width * 3*/ ].map((w)=>allSizes.find((p)=>p >= w) || allSizes[allSizes.length - 1])) ]; return { widths, kind: 'x' }; } function generateImgAttrs({ config, src, unoptimized, width, quality, sizes, loader }) { if (unoptimized) { return { src, srcSet: undefined, sizes: undefined }; } const { widths, kind } = getWidths(config, width, sizes); const last = widths.length - 1; return { sizes: !sizes && kind === 'w' ? '100vw' : sizes, srcSet: widths.map((w, i)=>`${loader({ config, src, quality, width: w })} ${kind === 'w' ? w : i + 1}${kind}`).join(', '), // It's intended to keep `src` the last attribute because React updates // attributes in order. If we keep `src` the first one, Safari will // immediately start to fetch `src`, before `sizes` and `srcSet` are even // updated by React. That causes multiple unnecessary requests if `srcSet` // and `sizes` are defined. // This bug cannot be reproduced in Chrome or Firefox. src: loader({ config, src, quality, width: widths[last] }) }; } function getImgProps({ src, sizes, unoptimized = false, priority = false, preload = false, loading, className, quality, width, height, fill = false, style, overrideSrc, onLoad, onLoadingComplete, placeholder = 'empty', blurDataURL, fetchPriority, decoding = 'async', layout, objectFit, objectPosition, lazyBoundary, lazyRoot, ...rest }, _state) { const { imgConf, showAltText, blurComplete, defaultLoader } = _state; let config; let c = imgConf || _imageconfig.imageConfigDefault; if ('allSizes' in c) { config = c; } else { const allSizes = [ ...c.deviceSizes, ...c.imageSizes ].sort((a, b)=>a - b); const deviceSizes = c.deviceSizes.sort((a, b)=>a - b); const qualities = c.qualities?.sort((a, b)=>a - b); config = { ...c, allSizes, deviceSizes, qualities }; } if (typeof defaultLoader === 'undefined') { throw Object.defineProperty(new Error('images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config'), "__NEXT_ERROR_CODE", { value: "E163", enumerable: false, configurable: true }); } let loader = rest.loader || defaultLoader; // Remove property so it's not spread on element delete rest.loader; delete rest.srcSet; // This special value indicates that the user // didn't define a "loader" prop or "loader" config. const isDefaultLoader = '__next_img_default' in loader; if (isDefaultLoader) { if (config.loader === 'custom') { throw Object.defineProperty(new Error(`Image with src "${src}" is missing "loader" prop.` + `\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader`), "__NEXT_ERROR_CODE", { value: "E252", enumerable: false, configurable: true }); } } else { // The user defined a "loader" prop or config. // Since the config object is internal only, we // must not pass it to the user-defined "loader". const customImageLoader = loader; loader = (obj)=>{ const { config: _, ...opts } = obj; return customImageLoader(opts); }; } if (layout) { if (layout === 'fill') { fill = true; } const layoutToStyle = { intrinsic: { maxWidth: '100%', height: 'auto' }, responsive: { width: '100%', height: 'auto' } }; const layoutToSizes = { responsive: '100vw', fill: '100vw' }; const layoutStyle = layoutToStyle[layout]; if (layoutStyle) { style = { ...style, ...layoutStyle }; } const layoutSizes = layoutToSizes[layout]; if (layoutSizes && !sizes) { sizes = layoutSizes; } } let staticSrc = ''; let widthInt = getInt(width); let heightInt = getInt(height); let blurWidth; let blurHeight; if (isStaticImport(src)) { const staticImageData = isStaticRequire(src) ? src.default : src; if (!staticImageData.src) { throw Object.defineProperty(new Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(staticImageData)}`), "__NEXT_ERROR_CODE", { value: "E460", enumerable: false, configurable: true }); } if (!staticImageData.height || !staticImageData.width) { throw Object.defineProperty(new Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(staticImageData)}`), "__NEXT_ERROR_CODE", { value: "E48", enumerable: false, configurable: true }); } blurWidth = staticImageData.blurWidth; blurHeight = staticImageData.blurHeight; blurDataURL = blurDataURL || staticImageData.blurDataURL; staticSrc = staticImageData.src; if (!fill) { if (!widthInt && !heightInt) { widthInt = staticImageData.width; heightInt = staticImageData.height; } else if (widthInt && !heightInt) { const ratio = widthInt / staticImageData.width; heightInt = Math.round(staticImageData.height * ratio); } else if (!widthInt && heightInt) { const ratio = heightInt / staticImageData.height; widthInt = Math.round(staticImageData.width * ratio); } } } src = typeof src === 'string' ? src : staticSrc; let isLazy = !priority && !preload && (loading === 'lazy' || typeof loading === 'undefined'); if (!src || src.startsWith('data:') || src.startsWith('blob:')) { // https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs unoptimized = true; isLazy = false; } if (config.unoptimized) { unoptimized = true; } if (isDefaultLoader && !config.dangerouslyAllowSVG && src.split('?', 1)[0].endsWith('.svg')) { // Special case to make svg serve as-is to avoid proxying // through the built-in Image Optimization API. unoptimized = true; } const qualityInt = getInt(quality); if ("TURBOPACK compile-time truthy", 1) { if (config.output === 'export' && isDefaultLoader && !unoptimized) { throw Object.defineProperty(new Error(`Image Optimization using the default loader is not compatible with \`{ output: 'export' }\`. Possible solutions: - Remove \`{ output: 'export' }\` and run "next start" to run server mode including the Image Optimization API. - Configure \`{ images: { unoptimized: true } }\` in \`next.config.js\` to disable the Image Optimization API. Read more: https://nextjs.org/docs/messages/export-image-api`), "__NEXT_ERROR_CODE", { value: "E500", enumerable: false, configurable: true }); } if (!src) { // React doesn't show the stack trace and there's // no `src` to help identify which image, so we // instead console.error(ref) during mount. unoptimized = true; } else { if (fill) { if (width) { throw Object.defineProperty(new Error(`Image with src "${src}" has both "width" and "fill" properties. Only one should be used.`), "__NEXT_ERROR_CODE", { value: "E96", enumerable: false, configurable: true }); } if (height) { throw Object.defineProperty(new Error(`Image with src "${src}" has both "height" and "fill" properties. Only one should be used.`), "__NEXT_ERROR_CODE", { value: "E115", enumerable: false, configurable: true }); } if (style?.position && style.position !== 'absolute') { throw Object.defineProperty(new Error(`Image with src "${src}" has both "fill" and "style.position" properties. Images with "fill" always use position absolute - it cannot be modified.`), "__NEXT_ERROR_CODE", { value: "E216", enumerable: false, configurable: true }); } if (style?.width && style.width !== '100%') { throw Object.defineProperty(new Error(`Image with src "${src}" has both "fill" and "style.width" properties. Images with "fill" always use width 100% - it cannot be modified.`), "__NEXT_ERROR_CODE", { value: "E73", enumerable: false, configurable: true }); } if (style?.height && style.height !== '100%') { throw Object.defineProperty(new Error(`Image with src "${src}" has both "fill" and "style.height" properties. Images with "fill" always use height 100% - it cannot be modified.`), "__NEXT_ERROR_CODE", { value: "E404", enumerable: false, configurable: true }); } } else { if (typeof widthInt === 'undefined') { throw Object.defineProperty(new Error(`Image with src "${src}" is missing required "width" property.`), "__NEXT_ERROR_CODE", { value: "E451", enumerable: false, configurable: true }); } else if (isNaN(widthInt)) { throw Object.defineProperty(new Error(`Image with src "${src}" has invalid "width" property. Expected a numeric value in pixels but received "${width}".`), "__NEXT_ERROR_CODE", { value: "E66", enumerable: false, configurable: true }); } if (typeof heightInt === 'undefined') { throw Object.defineProperty(new Error(`Image with src "${src}" is missing required "height" property.`), "__NEXT_ERROR_CODE", { value: "E397", enumerable: false, configurable: true }); } else if (isNaN(heightInt)) { throw Object.defineProperty(new Error(`Image with src "${src}" has invalid "height" property. Expected a numeric value in pixels but received "${height}".`), "__NEXT_ERROR_CODE", { value: "E444", enumerable: false, configurable: true }); } // eslint-disable-next-line no-control-regex if (/^[\x00-\x20]/.test(src)) { throw Object.defineProperty(new Error(`Image with src "${src}" cannot start with a space or control character. Use src.trimStart() to remove it or encodeURIComponent(src) to keep it.`), "__NEXT_ERROR_CODE", { value: "E176", enumerable: false, configurable: true }); } // eslint-disable-next-line no-control-regex if (/[\x00-\x20]$/.test(src)) { throw Object.defineProperty(new Error(`Image with src "${src}" cannot end with a space or control character. Use src.trimEnd() to remove it or encodeURIComponent(src) to keep it.`), "__NEXT_ERROR_CODE", { value: "E21", enumerable: false, configurable: true }); } } } if (!VALID_LOADING_VALUES.includes(loading)) { throw Object.defineProperty(new Error(`Image with src "${src}" has invalid "loading" property. Provided "${loading}" should be one of ${VALID_LOADING_VALUES.map(String).join(',')}.`), "__NEXT_ERROR_CODE", { value: "E357", enumerable: false, configurable: true }); } if (priority && loading === 'lazy') { throw Object.defineProperty(new Error(`Image with src "${src}" has both "priority" and "loading='lazy'" properties. Only one should be used.`), "__NEXT_ERROR_CODE", { value: "E218", enumerable: false, configurable: true }); } if (preload && loading === 'lazy') { throw Object.defineProperty(new Error(`Image with src "${src}" has both "preload" and "loading='lazy'" properties. Only one should be used.`), "__NEXT_ERROR_CODE", { value: "E803", enumerable: false, configurable: true }); } if (preload && priority) { throw Object.defineProperty(new Error(`Image with src "${src}" has both "preload" and "priority" properties. Only "preload" should be used.`), "__NEXT_ERROR_CODE", { value: "E802", enumerable: false, configurable: true }); } if (placeholder !== 'empty' && placeholder !== 'blur' && !placeholder.startsWith('data:image/')) { throw Object.defineProperty(new Error(`Image with src "${src}" has invalid "placeholder" property "${placeholder}".`), "__NEXT_ERROR_CODE", { value: "E431", enumerable: false, configurable: true }); } if (placeholder !== 'empty') { if (widthInt && heightInt && widthInt * heightInt < 1600) { (0, _warnonce.warnOnce)(`Image with src "${src}" is smaller than 40x40. Consider removing the "placeholder" property to improve performance.`); } } if (qualityInt && config.qualities && !config.qualities.includes(qualityInt)) { (0, _warnonce.warnOnce)(`Image with src "${src}" is using quality "${qualityInt}" which is not configured in images.qualities [${config.qualities.join(', ')}]. Please update your config to [${[ ...config.qualities, qualityInt ].sort().join(', ')}].` + `\nRead more: https://nextjs.org/docs/messages/next-image-unconfigured-qualities`); } if (placeholder === 'blur' && !blurDataURL) { const VALID_BLUR_EXT = [ 'jpeg', 'png', 'webp', 'avif' ] // should match next-image-loader ; throw Object.defineProperty(new Error(`Image with src "${src}" has "placeholder='blur'" property but is missing the "blurDataURL" property. Possible solutions: - Add a "blurDataURL" property, the contents should be a small Data URL to represent the image - Change the "src" property to a static import with one of the supported file types: ${VALID_BLUR_EXT.join(',')} (animated images not supported) - Remove the "placeholder" property, effectively no blur effect Read more: https://nextjs.org/docs/messages/placeholder-blur-data-url`), "__NEXT_ERROR_CODE", { value: "E371", enumerable: false, configurable: true }); } if ('ref' in rest) { (0, _warnonce.warnOnce)(`Image with src "${src}" is using unsupported "ref" property. Consider using the "onLoad" property instead.`); } if (!unoptimized && !isDefaultLoader) { const urlStr = loader({ config, src, width: widthInt || 400, quality: qualityInt || 75 }); let url; try { url = new URL(urlStr); } catch (err) {} if (urlStr === src || url && url.pathname === src && !url.search) { (0, _warnonce.warnOnce)(`Image with src "${src}" has a "loader" property that does not implement width. Please implement it or use the "unoptimized" property instead.` + `\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader-width`); } } if (onLoadingComplete) { (0, _warnonce.warnOnce)(`Image with src "${src}" is using deprecated "onLoadingComplete" property. Please use the "onLoad" property instead.`); } for (const [legacyKey, legacyValue] of Object.entries({ layout, objectFit, objectPosition, lazyBoundary, lazyRoot })){ if (legacyValue) { (0, _warnonce.warnOnce)(`Image with src "${src}" has legacy prop "${legacyKey}". Did you forget to run the codemod?` + `\nRead more: https://nextjs.org/docs/messages/next-image-upgrade-to-13`); } } if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; } const imgStyle = Object.assign(fill ? { position: 'absolute', height: '100%', width: '100%', left: 0, top: 0, right: 0, bottom: 0, objectFit, objectPosition } : {}, showAltText ? {} : { color: 'transparent' }, style); const backgroundImage = !blurComplete && placeholder !== 'empty' ? placeholder === 'blur' ? `url("data:image/svg+xml;charset=utf-8,${(0, _imageblursvg.getImageBlurSvg)({ widthInt, heightInt, blurWidth, blurHeight, blurDataURL: blurDataURL || '', objectFit: imgStyle.objectFit })}")` : `url("${placeholder}")` // assume `data:image/` : null; const backgroundSize = !INVALID_BACKGROUND_SIZE_VALUES.includes(imgStyle.objectFit) ? imgStyle.objectFit : imgStyle.objectFit === 'fill' ? '100% 100%' // the background-size equivalent of `fill` : 'cover'; let placeholderStyle = backgroundImage ? { backgroundSize, backgroundPosition: imgStyle.objectPosition || '50% 50%', backgroundRepeat: 'no-repeat', backgroundImage } : {}; if ("TURBOPACK compile-time truthy", 1) { if (placeholderStyle.backgroundImage && placeholder === 'blur' && blurDataURL?.startsWith('/')) { // During `next dev`, we don't want to generate blur placeholders with webpack // because it can delay starting the dev server. Instead, `next-image-loader.js` // will inline a special url to lazily generate the blur placeholder at request time. placeholderStyle.backgroundImage = `url("${blurDataURL}")`; } } const imgAttributes = generateImgAttrs({ config, src, unoptimized, width: widthInt, quality: qualityInt, sizes, loader }); const loadingFinal = isLazy ? 'lazy' : loading; if ("TURBOPACK compile-time truthy", 1) { if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; } const props = { ...rest, loading: loadingFinal, fetchPriority, width: widthInt, height: heightInt, decoding, className, style: { ...imgStyle, ...placeholderStyle }, sizes: imgAttributes.sizes, srcSet: imgAttributes.srcSet, src: overrideSrc || imgAttributes.src }; const meta = { unoptimized, preload: preload || priority, placeholder, fill }; return { props, meta }; } //# sourceMappingURL=get-img-props.js.map }), "[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-dom.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; module.exports = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/module.compiled.js [app-ssr] (ecmascript)").vendored['react-ssr'].ReactDOM; //# sourceMappingURL=react-dom.js.map }), "[project]/node_modules/next/dist/shared/lib/side-effect.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function() { return SideEffect; } }); const _react = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"); const isServer = ("TURBOPACK compile-time value", "undefined") === 'undefined'; const useClientOnlyLayoutEffect = ("TURBOPACK compile-time truthy", 1) ? ()=>{} : "TURBOPACK unreachable"; const useClientOnlyEffect = ("TURBOPACK compile-time truthy", 1) ? ()=>{} : "TURBOPACK unreachable"; 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 ("TURBOPACK compile-time truthy", 1) { 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 }), "[project]/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/head-manager-context.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; module.exports = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/module.compiled.js [app-ssr] (ecmascript)").vendored['contexts'].HeadManagerContext; //# sourceMappingURL=head-manager-context.js.map }), "[project]/node_modules/next/dist/shared/lib/head.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "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 = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-ssr] (ecmascript)"); const _interop_require_wildcard = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs [app-ssr] (ecmascript)"); const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js [app-ssr] (ecmascript)"); const _react = /*#__PURE__*/ _interop_require_wildcard._(__turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)")); const _sideeffect = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/side-effect.js [app-ssr] (ecmascript)")); const _headmanagercontextsharedruntime = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/head-manager-context.js [app-ssr] (ecmascript)"); const _warnonce = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/utils/warn-once.js [app-ssr] (ecmascript)"); 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(_react.default.Children.toArray(child.props.children).reduce((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 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 ("TURBOPACK compile-time truthy", 1) { // 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 }), "[project]/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/image-config-context.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; module.exports = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/module.compiled.js [app-ssr] (ecmascript)").vendored['contexts'].ImageConfigContext; //# sourceMappingURL=image-config-context.js.map }), "[project]/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/router-context.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; module.exports = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/module.compiled.js [app-ssr] (ecmascript)").vendored['contexts'].RouterContext; //# sourceMappingURL=router-context.js.map }), "[project]/node_modules/next/dist/shared/lib/find-closest-quality.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "findClosestQuality", { enumerable: true, get: function() { return findClosestQuality; } }); function findClosestQuality(quality, config) { const q = quality || 75; if (!config?.qualities?.length) { return q; } return config.qualities.reduce((prev, cur)=>Math.abs(cur - q) < Math.abs(prev - q) ? cur : prev, 0); } //# sourceMappingURL=find-closest-quality.js.map }), "[project]/node_modules/next/dist/compiled/picomatch/index.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { (()=>{ "use strict"; var t = { 170: (t, e, u)=>{ const n = u(510); const isWindows = ()=>{ if (typeof navigator !== "undefined" && navigator.platform) { const t = navigator.platform.toLowerCase(); return t === "win32" || t === "windows"; } if (typeof process !== "undefined" && process.platform) { return process.platform === "win32"; } return false; }; function picomatch(t, e, u = false) { if (e && (e.windows === null || e.windows === undefined)) { e = { ...e, windows: isWindows() }; } return n(t, e, u); } Object.assign(picomatch, n); t.exports = picomatch; }, 154: (t)=>{ const e = "\\\\/"; const u = `[^${e}]`; const n = "\\."; const o = "\\+"; const s = "\\?"; const r = "\\/"; const a = "(?=.)"; const i = "[^/]"; const c = `(?:${r}|$)`; const p = `(?:^|${r})`; const l = `${n}{1,2}${c}`; const f = `(?!${n})`; const A = `(?!${p}${l})`; const _ = `(?!${n}{0,1}${c})`; const R = `(?!${l})`; const E = `[^.${r}]`; const h = `${i}*?`; const g = "/"; const b = { DOT_LITERAL: n, PLUS_LITERAL: o, QMARK_LITERAL: s, SLASH_LITERAL: r, ONE_CHAR: a, QMARK: i, END_ANCHOR: c, DOTS_SLASH: l, NO_DOT: f, NO_DOTS: A, NO_DOT_SLASH: _, NO_DOTS_SLASH: R, QMARK_NO_DOT: E, STAR: h, START_ANCHOR: p, SEP: g }; const C = { ...b, SLASH_LITERAL: `[${e}]`, QMARK: u, STAR: `${u}*?`, DOTS_SLASH: `${n}{1,2}(?:[${e}]|$)`, NO_DOT: `(?!${n})`, NO_DOTS: `(?!(?:^|[${e}])${n}{1,2}(?:[${e}]|$))`, NO_DOT_SLASH: `(?!${n}{0,1}(?:[${e}]|$))`, NO_DOTS_SLASH: `(?!${n}{1,2}(?:[${e}]|$))`, QMARK_NO_DOT: `[^.${e}]`, START_ANCHOR: `(?:^|[${e}])`, END_ANCHOR: `(?:[${e}]|$)`, SEP: "\\" }; const y = { alnum: "a-zA-Z0-9", alpha: "a-zA-Z", ascii: "\\x00-\\x7F", blank: " \\t", cntrl: "\\x00-\\x1F\\x7F", digit: "0-9", graph: "\\x21-\\x7E", lower: "a-z", print: "\\x20-\\x7E ", punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~", space: " \\t\\r\\n\\v\\f", upper: "A-Z", word: "A-Za-z0-9_", xdigit: "A-Fa-f0-9" }; t.exports = { MAX_LENGTH: 1024 * 64, POSIX_REGEX_SOURCE: y, REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, REPLACEMENTS: { "***": "*", "**/**": "**", "**/**/**": "**" }, CHAR_0: 48, CHAR_9: 57, CHAR_UPPERCASE_A: 65, CHAR_LOWERCASE_A: 97, CHAR_UPPERCASE_Z: 90, CHAR_LOWERCASE_Z: 122, CHAR_LEFT_PARENTHESES: 40, CHAR_RIGHT_PARENTHESES: 41, CHAR_ASTERISK: 42, CHAR_AMPERSAND: 38, CHAR_AT: 64, CHAR_BACKWARD_SLASH: 92, CHAR_CARRIAGE_RETURN: 13, CHAR_CIRCUMFLEX_ACCENT: 94, CHAR_COLON: 58, CHAR_COMMA: 44, CHAR_DOT: 46, CHAR_DOUBLE_QUOTE: 34, CHAR_EQUAL: 61, CHAR_EXCLAMATION_MARK: 33, CHAR_FORM_FEED: 12, CHAR_FORWARD_SLASH: 47, CHAR_GRAVE_ACCENT: 96, CHAR_HASH: 35, CHAR_HYPHEN_MINUS: 45, CHAR_LEFT_ANGLE_BRACKET: 60, CHAR_LEFT_CURLY_BRACE: 123, CHAR_LEFT_SQUARE_BRACKET: 91, CHAR_LINE_FEED: 10, CHAR_NO_BREAK_SPACE: 160, CHAR_PERCENT: 37, CHAR_PLUS: 43, CHAR_QUESTION_MARK: 63, CHAR_RIGHT_ANGLE_BRACKET: 62, CHAR_RIGHT_CURLY_BRACE: 125, CHAR_RIGHT_SQUARE_BRACKET: 93, CHAR_SEMICOLON: 59, CHAR_SINGLE_QUOTE: 39, CHAR_SPACE: 32, CHAR_TAB: 9, CHAR_UNDERSCORE: 95, CHAR_VERTICAL_LINE: 124, CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, extglobChars (t) { return { "!": { type: "negate", open: "(?:(?!(?:", close: `))${t.STAR})` }, "?": { type: "qmark", open: "(?:", close: ")?" }, "+": { type: "plus", open: "(?:", close: ")+" }, "*": { type: "star", open: "(?:", close: ")*" }, "@": { type: "at", open: "(?:", close: ")" } }; }, globChars (t) { return t === true ? C : b; } }; }, 697: (t, e, u)=>{ const n = u(154); const o = u(96); const { MAX_LENGTH: s, POSIX_REGEX_SOURCE: r, REGEX_NON_SPECIAL_CHARS: a, REGEX_SPECIAL_CHARS_BACKREF: i, REPLACEMENTS: c } = n; const expandRange = (t, e)=>{ if (typeof e.expandRange === "function") { return e.expandRange(...t, e); } t.sort(); const u = `[${t.join("-")}]`; try { new RegExp(u); } catch (e) { return t.map((t)=>o.escapeRegex(t)).join(".."); } return u; }; const syntaxError = (t, e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`; const parse = (t, e)=>{ if (typeof t !== "string") { throw new TypeError("Expected a string"); } t = c[t] || t; const u = { ...e }; const p = typeof u.maxLength === "number" ? Math.min(s, u.maxLength) : s; let l = t.length; if (l > p) { throw new SyntaxError(`Input length: ${l}, exceeds maximum allowed length: ${p}`); } const f = { type: "bos", value: "", output: u.prepend || "" }; const A = [ f ]; const _ = u.capture ? "" : "?:"; const R = n.globChars(u.windows); const E = n.extglobChars(R); const { DOT_LITERAL: h, PLUS_LITERAL: g, SLASH_LITERAL: b, ONE_CHAR: C, DOTS_SLASH: y, NO_DOT: $, NO_DOT_SLASH: x, NO_DOTS_SLASH: S, QMARK: H, QMARK_NO_DOT: v, STAR: d, START_ANCHOR: L } = R; const globstar = (t)=>`(${_}(?:(?!${L}${t.dot ? y : h}).)*?)`; const T = u.dot ? "" : $; const O = u.dot ? H : v; let k = u.bash === true ? globstar(u) : d; if (u.capture) { k = `(${k})`; } if (typeof u.noext === "boolean") { u.noextglob = u.noext; } const m = { input: t, index: -1, start: 0, dot: u.dot === true, consumed: "", output: "", prefix: "", backtrack: false, negated: false, brackets: 0, braces: 0, parens: 0, quotes: 0, globstar: false, tokens: A }; t = o.removePrefix(t, m); l = t.length; const w = []; const N = []; const I = []; let B = f; let G; const eos = ()=>m.index === l - 1; const D = m.peek = (e = 1)=>t[m.index + e]; const M = m.advance = ()=>t[++m.index] || ""; const remaining = ()=>t.slice(m.index + 1); const consume = (t = "", e = 0)=>{ m.consumed += t; m.index += e; }; const append = (t)=>{ m.output += t.output != null ? t.output : t.value; consume(t.value); }; const negate = ()=>{ let t = 1; while(D() === "!" && (D(2) !== "(" || D(3) === "?")){ M(); m.start++; t++; } if (t % 2 === 0) { return false; } m.negated = true; m.start++; return true; }; const increment = (t)=>{ m[t]++; I.push(t); }; const decrement = (t)=>{ m[t]--; I.pop(); }; const push = (t)=>{ if (B.type === "globstar") { const e = m.braces > 0 && (t.type === "comma" || t.type === "brace"); const u = t.extglob === true || w.length && (t.type === "pipe" || t.type === "paren"); if (t.type !== "slash" && t.type !== "paren" && !e && !u) { m.output = m.output.slice(0, -B.output.length); B.type = "star"; B.value = "*"; B.output = k; m.output += B.output; } } if (w.length && t.type !== "paren") { w[w.length - 1].inner += t.value; } if (t.value || t.output) append(t); if (B && B.type === "text" && t.type === "text") { B.output = (B.output || B.value) + t.value; B.value += t.value; return; } t.prev = B; A.push(t); B = t; }; const extglobOpen = (t, e)=>{ const n = { ...E[e], conditions: 1, inner: "" }; n.prev = B; n.parens = m.parens; n.output = m.output; const o = (u.capture ? "(" : "") + n.open; increment("parens"); push({ type: t, value: e, output: m.output ? "" : C }); push({ type: "paren", extglob: true, value: M(), output: o }); w.push(n); }; const extglobClose = (t)=>{ let n = t.close + (u.capture ? ")" : ""); let o; if (t.type === "negate") { let s = k; if (t.inner && t.inner.length > 1 && t.inner.includes("/")) { s = globstar(u); } if (s !== k || eos() || /^\)+$/.test(remaining())) { n = t.close = `)$))${s}`; } if (t.inner.includes("*") && (o = remaining()) && /^\.[^\\/.]+$/.test(o)) { const u = parse(o, { ...e, fastpaths: false }).output; n = t.close = `)${u})${s})`; } if (t.prev.type === "bos") { m.negatedExtglob = true; } } push({ type: "paren", extglob: true, value: G, output: n }); decrement("parens"); }; if (u.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(t)) { let n = false; let s = t.replace(i, (t, e, u, o, s, r)=>{ if (o === "\\") { n = true; return t; } if (o === "?") { if (e) { return e + o + (s ? H.repeat(s.length) : ""); } if (r === 0) { return O + (s ? H.repeat(s.length) : ""); } return H.repeat(u.length); } if (o === ".") { return h.repeat(u.length); } if (o === "*") { if (e) { return e + o + (s ? k : ""); } return k; } return e ? t : `\\${t}`; }); if (n === true) { if (u.unescape === true) { s = s.replace(/\\/g, ""); } else { s = s.replace(/\\+/g, (t)=>t.length % 2 === 0 ? "\\\\" : t ? "\\" : ""); } } if (s === t && u.contains === true) { m.output = t; return m; } m.output = o.wrapOutput(s, m, e); return m; } while(!eos()){ G = M(); if (G === "\0") { continue; } if (G === "\\") { const t = D(); if (t === "/" && u.bash !== true) { continue; } if (t === "." || t === ";") { continue; } if (!t) { G += "\\"; push({ type: "text", value: G }); continue; } const e = /^\\+/.exec(remaining()); let n = 0; if (e && e[0].length > 2) { n = e[0].length; m.index += n; if (n % 2 !== 0) { G += "\\"; } } if (u.unescape === true) { G = M(); } else { G += M(); } if (m.brackets === 0) { push({ type: "text", value: G }); continue; } } if (m.brackets > 0 && (G !== "]" || B.value === "[" || B.value === "[^")) { if (u.posix !== false && G === ":") { const t = B.value.slice(1); if (t.includes("[")) { B.posix = true; if (t.includes(":")) { const t = B.value.lastIndexOf("["); const e = B.value.slice(0, t); const u = B.value.slice(t + 2); const n = r[u]; if (n) { B.value = e + n; m.backtrack = true; M(); if (!f.output && A.indexOf(B) === 1) { f.output = C; } continue; } } } } if (G === "[" && D() !== ":" || G === "-" && D() === "]") { G = `\\${G}`; } if (G === "]" && (B.value === "[" || B.value === "[^")) { G = `\\${G}`; } if (u.posix === true && G === "!" && B.value === "[") { G = "^"; } B.value += G; append({ value: G }); continue; } if (m.quotes === 1 && G !== '"') { G = o.escapeRegex(G); B.value += G; append({ value: G }); continue; } if (G === '"') { m.quotes = m.quotes === 1 ? 0 : 1; if (u.keepQuotes === true) { push({ type: "text", value: G }); } continue; } if (G === "(") { increment("parens"); push({ type: "paren", value: G }); continue; } if (G === ")") { if (m.parens === 0 && u.strictBrackets === true) { throw new SyntaxError(syntaxError("opening", "(")); } const t = w[w.length - 1]; if (t && m.parens === t.parens + 1) { extglobClose(w.pop()); continue; } push({ type: "paren", value: G, output: m.parens ? ")" : "\\)" }); decrement("parens"); continue; } if (G === "[") { if (u.nobracket === true || !remaining().includes("]")) { if (u.nobracket !== true && u.strictBrackets === true) { throw new SyntaxError(syntaxError("closing", "]")); } G = `\\${G}`; } else { increment("brackets"); } push({ type: "bracket", value: G }); continue; } if (G === "]") { if (u.nobracket === true || B && B.type === "bracket" && B.value.length === 1) { push({ type: "text", value: G, output: `\\${G}` }); continue; } if (m.brackets === 0) { if (u.strictBrackets === true) { throw new SyntaxError(syntaxError("opening", "[")); } push({ type: "text", value: G, output: `\\${G}` }); continue; } decrement("brackets"); const t = B.value.slice(1); if (B.posix !== true && t[0] === "^" && !t.includes("/")) { G = `/${G}`; } B.value += G; append({ value: G }); if (u.literalBrackets === false || o.hasRegexChars(t)) { continue; } const e = o.escapeRegex(B.value); m.output = m.output.slice(0, -B.value.length); if (u.literalBrackets === true) { m.output += e; B.value = e; continue; } B.value = `(${_}${e}|${B.value})`; m.output += B.value; continue; } if (G === "{" && u.nobrace !== true) { increment("braces"); const t = { type: "brace", value: G, output: "(", outputIndex: m.output.length, tokensIndex: m.tokens.length }; N.push(t); push(t); continue; } if (G === "}") { const t = N[N.length - 1]; if (u.nobrace === true || !t) { push({ type: "text", value: G, output: G }); continue; } let e = ")"; if (t.dots === true) { const t = A.slice(); const n = []; for(let e = t.length - 1; e >= 0; e--){ A.pop(); if (t[e].type === "brace") { break; } if (t[e].type !== "dots") { n.unshift(t[e].value); } } e = expandRange(n, u); m.backtrack = true; } if (t.comma !== true && t.dots !== true) { const u = m.output.slice(0, t.outputIndex); const n = m.tokens.slice(t.tokensIndex); t.value = t.output = "\\{"; G = e = "\\}"; m.output = u; for (const t of n){ m.output += t.output || t.value; } } push({ type: "brace", value: G, output: e }); decrement("braces"); N.pop(); continue; } if (G === "|") { if (w.length > 0) { w[w.length - 1].conditions++; } push({ type: "text", value: G }); continue; } if (G === ",") { let t = G; const e = N[N.length - 1]; if (e && I[I.length - 1] === "braces") { e.comma = true; t = "|"; } push({ type: "comma", value: G, output: t }); continue; } if (G === "/") { if (B.type === "dot" && m.index === m.start + 1) { m.start = m.index + 1; m.consumed = ""; m.output = ""; A.pop(); B = f; continue; } push({ type: "slash", value: G, output: b }); continue; } if (G === ".") { if (m.braces > 0 && B.type === "dot") { if (B.value === ".") B.output = h; const t = N[N.length - 1]; B.type = "dots"; B.output += G; B.value += G; t.dots = true; continue; } if (m.braces + m.parens === 0 && B.type !== "bos" && B.type !== "slash") { push({ type: "text", value: G, output: h }); continue; } push({ type: "dot", value: G, output: h }); continue; } if (G === "?") { const t = B && B.value === "("; if (!t && u.noextglob !== true && D() === "(" && D(2) !== "?") { extglobOpen("qmark", G); continue; } if (B && B.type === "paren") { const t = D(); let e = G; if (B.value === "(" && !/[!=<:]/.test(t) || t === "<" && !/<([!=]|\w+>)/.test(remaining())) { e = `\\${G}`; } push({ type: "text", value: G, output: e }); continue; } if (u.dot !== true && (B.type === "slash" || B.type === "bos")) { push({ type: "qmark", value: G, output: v }); continue; } push({ type: "qmark", value: G, output: H }); continue; } if (G === "!") { if (u.noextglob !== true && D() === "(") { if (D(2) !== "?" || !/[!=<:]/.test(D(3))) { extglobOpen("negate", G); continue; } } if (u.nonegate !== true && m.index === 0) { negate(); continue; } } if (G === "+") { if (u.noextglob !== true && D() === "(" && D(2) !== "?") { extglobOpen("plus", G); continue; } if (B && B.value === "(" || u.regex === false) { push({ type: "plus", value: G, output: g }); continue; } if (B && (B.type === "bracket" || B.type === "paren" || B.type === "brace") || m.parens > 0) { push({ type: "plus", value: G }); continue; } push({ type: "plus", value: g }); continue; } if (G === "@") { if (u.noextglob !== true && D() === "(" && D(2) !== "?") { push({ type: "at", extglob: true, value: G, output: "" }); continue; } push({ type: "text", value: G }); continue; } if (G !== "*") { if (G === "$" || G === "^") { G = `\\${G}`; } const t = a.exec(remaining()); if (t) { G += t[0]; m.index += t[0].length; } push({ type: "text", value: G }); continue; } if (B && (B.type === "globstar" || B.star === true)) { B.type = "star"; B.star = true; B.value += G; B.output = k; m.backtrack = true; m.globstar = true; consume(G); continue; } let e = remaining(); if (u.noextglob !== true && /^\([^?]/.test(e)) { extglobOpen("star", G); continue; } if (B.type === "star") { if (u.noglobstar === true) { consume(G); continue; } const n = B.prev; const o = n.prev; const s = n.type === "slash" || n.type === "bos"; const r = o && (o.type === "star" || o.type === "globstar"); if (u.bash === true && (!s || e[0] && e[0] !== "/")) { push({ type: "star", value: G, output: "" }); continue; } const a = m.braces > 0 && (n.type === "comma" || n.type === "brace"); const i = w.length && (n.type === "pipe" || n.type === "paren"); if (!s && n.type !== "paren" && !a && !i) { push({ type: "star", value: G, output: "" }); continue; } while(e.slice(0, 3) === "/**"){ const u = t[m.index + 4]; if (u && u !== "/") { break; } e = e.slice(3); consume("/**", 3); } if (n.type === "bos" && eos()) { B.type = "globstar"; B.value += G; B.output = globstar(u); m.output = B.output; m.globstar = true; consume(G); continue; } if (n.type === "slash" && n.prev.type !== "bos" && !r && eos()) { m.output = m.output.slice(0, -(n.output + B.output).length); n.output = `(?:${n.output}`; B.type = "globstar"; B.output = globstar(u) + (u.strictSlashes ? ")" : "|$)"); B.value += G; m.globstar = true; m.output += n.output + B.output; consume(G); continue; } if (n.type === "slash" && n.prev.type !== "bos" && e[0] === "/") { const t = e[1] !== void 0 ? "|$" : ""; m.output = m.output.slice(0, -(n.output + B.output).length); n.output = `(?:${n.output}`; B.type = "globstar"; B.output = `${globstar(u)}${b}|${b}${t})`; B.value += G; m.output += n.output + B.output; m.globstar = true; consume(G + M()); push({ type: "slash", value: "/", output: "" }); continue; } if (n.type === "bos" && e[0] === "/") { B.type = "globstar"; B.value += G; B.output = `(?:^|${b}|${globstar(u)}${b})`; m.output = B.output; m.globstar = true; consume(G + M()); push({ type: "slash", value: "/", output: "" }); continue; } m.output = m.output.slice(0, -B.output.length); B.type = "globstar"; B.output = globstar(u); B.value += G; m.output += B.output; m.globstar = true; consume(G); continue; } const n = { type: "star", value: G, output: k }; if (u.bash === true) { n.output = ".*?"; if (B.type === "bos" || B.type === "slash") { n.output = T + n.output; } push(n); continue; } if (B && (B.type === "bracket" || B.type === "paren") && u.regex === true) { n.output = G; push(n); continue; } if (m.index === m.start || B.type === "slash" || B.type === "dot") { if (B.type === "dot") { m.output += x; B.output += x; } else if (u.dot === true) { m.output += S; B.output += S; } else { m.output += T; B.output += T; } if (D() !== "*") { m.output += C; B.output += C; } } push(n); } while(m.brackets > 0){ if (u.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]")); m.output = o.escapeLast(m.output, "["); decrement("brackets"); } while(m.parens > 0){ if (u.strictBrackets === true) throw new SyntaxError(syntaxError("closing", ")")); m.output = o.escapeLast(m.output, "("); decrement("parens"); } while(m.braces > 0){ if (u.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "}")); m.output = o.escapeLast(m.output, "{"); decrement("braces"); } if (u.strictSlashes !== true && (B.type === "star" || B.type === "bracket")) { push({ type: "maybe_slash", value: "", output: `${b}?` }); } if (m.backtrack === true) { m.output = ""; for (const t of m.tokens){ m.output += t.output != null ? t.output : t.value; if (t.suffix) { m.output += t.suffix; } } } return m; }; parse.fastpaths = (t, e)=>{ const u = { ...e }; const r = typeof u.maxLength === "number" ? Math.min(s, u.maxLength) : s; const a = t.length; if (a > r) { throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${r}`); } t = c[t] || t; const { DOT_LITERAL: i, SLASH_LITERAL: p, ONE_CHAR: l, DOTS_SLASH: f, NO_DOT: A, NO_DOTS: _, NO_DOTS_SLASH: R, STAR: E, START_ANCHOR: h } = n.globChars(u.windows); const g = u.dot ? _ : A; const b = u.dot ? R : A; const C = u.capture ? "" : "?:"; const y = { negated: false, prefix: "" }; let $ = u.bash === true ? ".*?" : E; if (u.capture) { $ = `(${$})`; } const globstar = (t)=>{ if (t.noglobstar === true) return $; return `(${C}(?:(?!${h}${t.dot ? f : i}).)*?)`; }; const create = (t)=>{ switch(t){ case "*": return `${g}${l}${$}`; case ".*": return `${i}${l}${$}`; case "*.*": return `${g}${$}${i}${l}${$}`; case "*/*": return `${g}${$}${p}${l}${b}${$}`; case "**": return g + globstar(u); case "**/*": return `(?:${g}${globstar(u)}${p})?${b}${l}${$}`; case "**/*.*": return `(?:${g}${globstar(u)}${p})?${b}${$}${i}${l}${$}`; case "**/.*": return `(?:${g}${globstar(u)}${p})?${i}${l}${$}`; default: { const e = /^(.*?)\.(\w+)$/.exec(t); if (!e) return; const u = create(e[1]); if (!u) return; return u + i + e[2]; } } }; const x = o.removePrefix(t, y); let S = create(x); if (S && u.strictSlashes !== true) { S += `${p}?`; } return S; }; t.exports = parse; }, 510: (t, e, u)=>{ const n = u(716); const o = u(697); const s = u(96); const r = u(154); const isObject = (t)=>t && typeof t === "object" && !Array.isArray(t); const picomatch = (t, e, u = false)=>{ if (Array.isArray(t)) { const n = t.map((t)=>picomatch(t, e, u)); const arrayMatcher = (t)=>{ for (const e of n){ const u = e(t); if (u) return u; } return false; }; return arrayMatcher; } const n = isObject(t) && t.tokens && t.input; if (t === "" || typeof t !== "string" && !n) { throw new TypeError("Expected pattern to be a non-empty string"); } const o = e || {}; const s = o.windows; const r = n ? picomatch.compileRe(t, e) : picomatch.makeRe(t, e, false, true); const a = r.state; delete r.state; let isIgnored = ()=>false; if (o.ignore) { const t = { ...e, ignore: null, onMatch: null, onResult: null }; isIgnored = picomatch(o.ignore, t, u); } const matcher = (u, n = false)=>{ const { isMatch: i, match: c, output: p } = picomatch.test(u, r, e, { glob: t, posix: s }); const l = { glob: t, state: a, regex: r, posix: s, input: u, output: p, match: c, isMatch: i }; if (typeof o.onResult === "function") { o.onResult(l); } if (i === false) { l.isMatch = false; return n ? l : false; } if (isIgnored(u)) { if (typeof o.onIgnore === "function") { o.onIgnore(l); } l.isMatch = false; return n ? l : false; } if (typeof o.onMatch === "function") { o.onMatch(l); } return n ? l : true; }; if (u) { matcher.state = a; } return matcher; }; picomatch.test = (t, e, u, { glob: n, posix: o } = {})=>{ if (typeof t !== "string") { throw new TypeError("Expected input to be a string"); } if (t === "") { return { isMatch: false, output: "" }; } const r = u || {}; const a = r.format || (o ? s.toPosixSlashes : null); let i = t === n; let c = i && a ? a(t) : t; if (i === false) { c = a ? a(t) : t; i = c === n; } if (i === false || r.capture === true) { if (r.matchBase === true || r.basename === true) { i = picomatch.matchBase(t, e, u, o); } else { i = e.exec(c); } } return { isMatch: Boolean(i), match: i, output: c }; }; picomatch.matchBase = (t, e, u)=>{ const n = e instanceof RegExp ? e : picomatch.makeRe(e, u); return n.test(s.basename(t)); }; picomatch.isMatch = (t, e, u)=>picomatch(e, u)(t); picomatch.parse = (t, e)=>{ if (Array.isArray(t)) return t.map((t)=>picomatch.parse(t, e)); return o(t, { ...e, fastpaths: false }); }; picomatch.scan = (t, e)=>n(t, e); picomatch.compileRe = (t, e, u = false, n = false)=>{ if (u === true) { return t.output; } const o = e || {}; const s = o.contains ? "" : "^"; const r = o.contains ? "" : "$"; let a = `${s}(?:${t.output})${r}`; if (t && t.negated === true) { a = `^(?!${a}).*$`; } const i = picomatch.toRegex(a, e); if (n === true) { i.state = t; } return i; }; picomatch.makeRe = (t, e = {}, u = false, n = false)=>{ if (!t || typeof t !== "string") { throw new TypeError("Expected a non-empty string"); } let s = { negated: false, fastpaths: true }; if (e.fastpaths !== false && (t[0] === "." || t[0] === "*")) { s.output = o.fastpaths(t, e); } if (!s.output) { s = o(t, e); } return picomatch.compileRe(s, e, u, n); }; picomatch.toRegex = (t, e)=>{ try { const u = e || {}; return new RegExp(t, u.flags || (u.nocase ? "i" : "")); } catch (t) { if (e && e.debug === true) throw t; return /$^/; } }; picomatch.constants = r; t.exports = picomatch; }, 716: (t, e, u)=>{ const n = u(96); const { CHAR_ASTERISK: o, CHAR_AT: s, CHAR_BACKWARD_SLASH: r, CHAR_COMMA: a, CHAR_DOT: i, CHAR_EXCLAMATION_MARK: c, CHAR_FORWARD_SLASH: p, CHAR_LEFT_CURLY_BRACE: l, CHAR_LEFT_PARENTHESES: f, CHAR_LEFT_SQUARE_BRACKET: A, CHAR_PLUS: _, CHAR_QUESTION_MARK: R, CHAR_RIGHT_CURLY_BRACE: E, CHAR_RIGHT_PARENTHESES: h, CHAR_RIGHT_SQUARE_BRACKET: g } = u(154); const isPathSeparator = (t)=>t === p || t === r; const depth = (t)=>{ if (t.isPrefix !== true) { t.depth = t.isGlobstar ? Infinity : 1; } }; const scan = (t, e)=>{ const u = e || {}; const b = t.length - 1; const C = u.parts === true || u.scanToEnd === true; const y = []; const $ = []; const x = []; let S = t; let H = -1; let v = 0; let d = 0; let L = false; let T = false; let O = false; let k = false; let m = false; let w = false; let N = false; let I = false; let B = false; let G = false; let D = 0; let M; let P; let K = { value: "", depth: 0, isGlob: false }; const eos = ()=>H >= b; const peek = ()=>S.charCodeAt(H + 1); const advance = ()=>{ M = P; return S.charCodeAt(++H); }; while(H < b){ P = advance(); let t; if (P === r) { N = K.backslashes = true; P = advance(); if (P === l) { w = true; } continue; } if (w === true || P === l) { D++; while(eos() !== true && (P = advance())){ if (P === r) { N = K.backslashes = true; advance(); continue; } if (P === l) { D++; continue; } if (w !== true && P === i && (P = advance()) === i) { L = K.isBrace = true; O = K.isGlob = true; G = true; if (C === true) { continue; } break; } if (w !== true && P === a) { L = K.isBrace = true; O = K.isGlob = true; G = true; if (C === true) { continue; } break; } if (P === E) { D--; if (D === 0) { w = false; L = K.isBrace = true; G = true; break; } } } if (C === true) { continue; } break; } if (P === p) { y.push(H); $.push(K); K = { value: "", depth: 0, isGlob: false }; if (G === true) continue; if (M === i && H === v + 1) { v += 2; continue; } d = H + 1; continue; } if (u.noext !== true) { const t = P === _ || P === s || P === o || P === R || P === c; if (t === true && peek() === f) { O = K.isGlob = true; k = K.isExtglob = true; G = true; if (P === c && H === v) { B = true; } if (C === true) { while(eos() !== true && (P = advance())){ if (P === r) { N = K.backslashes = true; P = advance(); continue; } if (P === h) { O = K.isGlob = true; G = true; break; } } continue; } break; } } if (P === o) { if (M === o) m = K.isGlobstar = true; O = K.isGlob = true; G = true; if (C === true) { continue; } break; } if (P === R) { O = K.isGlob = true; G = true; if (C === true) { continue; } break; } if (P === A) { while(eos() !== true && (t = advance())){ if (t === r) { N = K.backslashes = true; advance(); continue; } if (t === g) { T = K.isBracket = true; O = K.isGlob = true; G = true; break; } } if (C === true) { continue; } break; } if (u.nonegate !== true && P === c && H === v) { I = K.negated = true; v++; continue; } if (u.noparen !== true && P === f) { O = K.isGlob = true; if (C === true) { while(eos() !== true && (P = advance())){ if (P === f) { N = K.backslashes = true; P = advance(); continue; } if (P === h) { G = true; break; } } continue; } break; } if (O === true) { G = true; if (C === true) { continue; } break; } } if (u.noext === true) { k = false; O = false; } let U = S; let X = ""; let F = ""; if (v > 0) { X = S.slice(0, v); S = S.slice(v); d -= v; } if (U && O === true && d > 0) { U = S.slice(0, d); F = S.slice(d); } else if (O === true) { U = ""; F = S; } else { U = S; } if (U && U !== "" && U !== "/" && U !== S) { if (isPathSeparator(U.charCodeAt(U.length - 1))) { U = U.slice(0, -1); } } if (u.unescape === true) { if (F) F = n.removeBackslashes(F); if (U && N === true) { U = n.removeBackslashes(U); } } const Q = { prefix: X, input: t, start: v, base: U, glob: F, isBrace: L, isBracket: T, isGlob: O, isExtglob: k, isGlobstar: m, negated: I, negatedExtglob: B }; if (u.tokens === true) { Q.maxDepth = 0; if (!isPathSeparator(P)) { $.push(K); } Q.tokens = $; } if (u.parts === true || u.tokens === true) { let e; for(let n = 0; n < y.length; n++){ const o = e ? e + 1 : v; const s = y[n]; const r = t.slice(o, s); if (u.tokens) { if (n === 0 && v !== 0) { $[n].isPrefix = true; $[n].value = X; } else { $[n].value = r; } depth($[n]); Q.maxDepth += $[n].depth; } if (n !== 0 || r !== "") { x.push(r); } e = s; } if (e && e + 1 < t.length) { const n = t.slice(e + 1); x.push(n); if (u.tokens) { $[$.length - 1].value = n; depth($[$.length - 1]); Q.maxDepth += $[$.length - 1].depth; } } Q.slashes = y; Q.parts = x; } return Q; }; t.exports = scan; }, 96: (t, e, u)=>{ const { REGEX_BACKSLASH: n, REGEX_REMOVE_BACKSLASH: o, REGEX_SPECIAL_CHARS: s, REGEX_SPECIAL_CHARS_GLOBAL: r } = u(154); e.isObject = (t)=>t !== null && typeof t === "object" && !Array.isArray(t); e.hasRegexChars = (t)=>s.test(t); e.isRegexChar = (t)=>t.length === 1 && e.hasRegexChars(t); e.escapeRegex = (t)=>t.replace(r, "\\$1"); e.toPosixSlashes = (t)=>t.replace(n, "/"); e.removeBackslashes = (t)=>t.replace(o, (t)=>t === "\\" ? "" : t); e.escapeLast = (t, u, n)=>{ const o = t.lastIndexOf(u, n); if (o === -1) return t; if (t[o - 1] === "\\") return e.escapeLast(t, u, o - 1); return `${t.slice(0, o)}\\${t.slice(o)}`; }; e.removePrefix = (t, e = {})=>{ let u = t; if (u.startsWith("./")) { u = u.slice(2); e.prefix = "./"; } return u; }; e.wrapOutput = (t, e = {}, u = {})=>{ const n = u.contains ? "" : "^"; const o = u.contains ? "" : "$"; let s = `${n}(?:${t})${o}`; if (e.negated === true) { s = `(?:^(?!${s}).*$)`; } return s; }; e.basename = (t, { windows: e } = {})=>{ const u = t.split(e ? /[\\/]/ : "/"); const n = u[u.length - 1]; if (n === "") { return u[u.length - 2]; } return n; }; } }; var e = {}; function __nccwpck_require__(u) { var n = e[u]; if (n !== undefined) { return n.exports; } var o = e[u] = { exports: {} }; var s = true; try { t[u](o, o.exports, __nccwpck_require__); s = false; } finally{ if (s) delete e[u]; } return o.exports; } if (typeof __nccwpck_require__ !== "undefined") __nccwpck_require__.ab = ("TURBOPACK compile-time value", "/ROOT/node_modules/next/dist/compiled/picomatch") + "/"; var u = __nccwpck_require__(170); module.exports = u; })(); }), "[project]/node_modules/next/dist/shared/lib/match-local-pattern.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "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 = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/picomatch/index.js [app-ssr] (ecmascript)"); 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 }), "[project]/node_modules/next/dist/shared/lib/match-remote-pattern.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "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 = __turbopack_context__.r("[project]/node_modules/next/dist/compiled/picomatch/index.js [app-ssr] (ecmascript)"); 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 }), "[project]/node_modules/next/dist/shared/lib/image-loader.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function() { return _default; } }); const _findclosestquality = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/find-closest-quality.js [app-ssr] (ecmascript)"); function defaultLoader({ config, src, width, quality }) { if (src.startsWith('/') && src.includes('?') && config.localPatterns?.length === 1 && config.localPatterns[0].pathname === '**' && config.localPatterns[0].search === '') { throw Object.defineProperty(new Error(`Image with src "${src}" is using a query string which is not configured in images.localPatterns.` + `\nRead more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`), "__NEXT_ERROR_CODE", { value: "E871", enumerable: false, configurable: true }); } if ("TURBOPACK compile-time truthy", 1) { const missingValues = []; // these should always be provided but make sure they are if (!src) missingValues.push('src'); if (!width) missingValues.push('width'); if (missingValues.length > 0) { throw Object.defineProperty(new Error(`Next Image Optimization requires ${missingValues.join(', ')} to be provided. Make sure you pass them as props to the \`next/image\` component. Received: ${JSON.stringify({ src, width, quality })}`), "__NEXT_ERROR_CODE", { value: "E188", enumerable: false, configurable: true }); } if (src.startsWith('//')) { throw Object.defineProperty(new Error(`Failed to parse src "${src}" on \`next/image\`, protocol-relative URL (//) must be changed to an absolute URL (http:// or https://)`), "__NEXT_ERROR_CODE", { value: "E360", enumerable: false, configurable: true }); } if (src.startsWith('/') && config.localPatterns) { if ("TURBOPACK compile-time truthy", 1) { // We use dynamic require because this should only error in development const { hasLocalMatch } = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/match-local-pattern.js [app-ssr] (ecmascript)"); if (!hasLocalMatch(config.localPatterns, src)) { throw Object.defineProperty(new Error(`Invalid src prop (${src}) on \`next/image\` does not match \`images.localPatterns\` configured in your \`next.config.js\`\n` + `See more info: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`), "__NEXT_ERROR_CODE", { value: "E426", enumerable: false, configurable: true }); } } } if (!src.startsWith('/') && (config.domains || config.remotePatterns)) { let parsedSrc; try { parsedSrc = new URL(src); } catch (err) { console.error(err); throw Object.defineProperty(new Error(`Failed to parse src "${src}" on \`next/image\`, if using relative image it must start with a leading slash "/" or be an absolute URL (http:// or https://)`), "__NEXT_ERROR_CODE", { value: "E63", enumerable: false, configurable: true }); } if ("TURBOPACK compile-time truthy", 1) { // We use dynamic require because this should only error in development const { hasRemoteMatch } = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/match-remote-pattern.js [app-ssr] (ecmascript)"); if (!hasRemoteMatch(config.domains, config.remotePatterns, parsedSrc)) { throw Object.defineProperty(new Error(`Invalid src prop (${src}) on \`next/image\`, hostname "${parsedSrc.hostname}" is not configured under images in your \`next.config.js\`\n` + `See more info: https://nextjs.org/docs/messages/next-image-unconfigured-host`), "__NEXT_ERROR_CODE", { value: "E231", enumerable: false, configurable: true }); } } } } const q = (0, _findclosestquality.findClosestQuality)(quality, config); return `${config.path}?url=${encodeURIComponent(src)}&w=${width}&q=${q}${src.startsWith('/_next/static/media/') && ("TURBOPACK compile-time value", false) ? "TURBOPACK unreachable" : ''}`; } // We use this to determine if the import is the default loader // or a custom loader defined by the user in next.config.js defaultLoader.__next_img_default = true; const _default = defaultLoader; //# sourceMappingURL=image-loader.js.map }), "[project]/node_modules/next/dist/client/image-component.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "Image", { enumerable: true, get: function() { return Image; } }); const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-ssr] (ecmascript)"); const _interop_require_wildcard = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs [app-ssr] (ecmascript)"); const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js [app-ssr] (ecmascript)"); const _react = /*#__PURE__*/ _interop_require_wildcard._(__turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)")); const _reactdom = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-dom.js [app-ssr] (ecmascript)")); const _head = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/head.js [app-ssr] (ecmascript)")); const _getimgprops = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/get-img-props.js [app-ssr] (ecmascript)"); const _imageconfig = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/image-config.js [app-ssr] (ecmascript)"); const _imageconfigcontextsharedruntime = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/image-config-context.js [app-ssr] (ecmascript)"); const _warnonce = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/utils/warn-once.js [app-ssr] (ecmascript)"); const _routercontextsharedruntime = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/router-context.js [app-ssr] (ecmascript)"); const _imageloader = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/image-loader.js [app-ssr] (ecmascript)")); const _usemergedref = __turbopack_context__.r("[project]/node_modules/next/dist/client/use-merged-ref.js [app-ssr] (ecmascript)"); // This is replaced by webpack define plugin const configEnv = ("TURBOPACK compile-time value", { "deviceSizes": ("TURBOPACK compile-time value", [ ("TURBOPACK compile-time value", 640), ("TURBOPACK compile-time value", 750), ("TURBOPACK compile-time value", 828), ("TURBOPACK compile-time value", 1080), ("TURBOPACK compile-time value", 1200), ("TURBOPACK compile-time value", 1920), ("TURBOPACK compile-time value", 2048), ("TURBOPACK compile-time value", 3840) ]), "imageSizes": ("TURBOPACK compile-time value", [ ("TURBOPACK compile-time value", 32), ("TURBOPACK compile-time value", 48), ("TURBOPACK compile-time value", 64), ("TURBOPACK compile-time value", 96), ("TURBOPACK compile-time value", 128), ("TURBOPACK compile-time value", 256), ("TURBOPACK compile-time value", 384) ]), "qualities": ("TURBOPACK compile-time value", [ ("TURBOPACK compile-time value", 75) ]), "path": ("TURBOPACK compile-time value", "/_next/image"), "loader": ("TURBOPACK compile-time value", "default"), "dangerouslyAllowSVG": ("TURBOPACK compile-time value", false), "unoptimized": ("TURBOPACK compile-time value", true), "domains": ("TURBOPACK compile-time value", []), "remotePatterns": ("TURBOPACK compile-time value", []), "localPatterns": ("TURBOPACK compile-time value", [ ("TURBOPACK compile-time value", { "pathname": ("TURBOPACK compile-time value", "**"), "search": ("TURBOPACK compile-time value", "") }) ]) }); if ("TURBOPACK compile-time truthy", 1) { ; globalThis.__NEXT_IMAGE_IMPORTED = true; } // See https://stackoverflow.com/q/39777833/266535 for why we use this ref // handler instead of the img's onLoad attribute. function handleLoading(img, placeholder, onLoadRef, onLoadingCompleteRef, setBlurComplete, unoptimized, sizesInput) { const src = img?.src; if (!img || img['data-loaded-src'] === src) { return; } img['data-loaded-src'] = src; const p = 'decode' in img ? img.decode() : Promise.resolve(); p.catch(()=>{}).then(()=>{ if (!img.parentElement || !img.isConnected) { // Exit early in case of race condition: // - onload() is called // - decode() is called but incomplete // - unmount is called // - decode() completes return; } if (placeholder !== 'empty') { setBlurComplete(true); } if (onLoadRef?.current) { // Since we don't have the SyntheticEvent here, // we must create one with the same shape. // See https://reactjs.org/docs/events.html const event = new Event('load'); Object.defineProperty(event, 'target', { writable: false, value: img }); let prevented = false; let stopped = false; onLoadRef.current({ ...event, nativeEvent: event, currentTarget: img, target: img, isDefaultPrevented: ()=>prevented, isPropagationStopped: ()=>stopped, persist: ()=>{}, preventDefault: ()=>{ prevented = true; event.preventDefault(); }, stopPropagation: ()=>{ stopped = true; event.stopPropagation(); } }); } if (onLoadingCompleteRef?.current) { onLoadingCompleteRef.current(img); } if ("TURBOPACK compile-time truthy", 1) { const origSrc = new URL(src, 'http://n').searchParams.get('url') || src; if (img.getAttribute('data-nimg') === 'fill') { if (!unoptimized && (!sizesInput || sizesInput === '100vw')) { let widthViewportRatio = img.getBoundingClientRect().width / window.innerWidth; if (widthViewportRatio < 0.6) { if (sizesInput === '100vw') { (0, _warnonce.warnOnce)(`Image with src "${origSrc}" has "fill" prop and "sizes" prop of "100vw", but image is not rendered at full viewport width. Please adjust "sizes" to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes`); } else { (0, _warnonce.warnOnce)(`Image with src "${origSrc}" has "fill" but is missing "sizes" prop. Please add it to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes`); } } } if (img.parentElement) { const { position } = window.getComputedStyle(img.parentElement); const valid = [ 'absolute', 'fixed', 'relative' ]; if (!valid.includes(position)) { (0, _warnonce.warnOnce)(`Image with src "${origSrc}" has "fill" and parent element with invalid "position". Provided "${position}" should be one of ${valid.map(String).join(',')}.`); } } if (img.height === 0) { (0, _warnonce.warnOnce)(`Image with src "${origSrc}" has "fill" and a height value of 0. This is likely because the parent element of the image has not been styled to have a set height.`); } } const heightModified = img.height.toString() !== img.getAttribute('height'); const widthModified = img.width.toString() !== img.getAttribute('width'); if (heightModified && !widthModified || !heightModified && widthModified) { (0, _warnonce.warnOnce)(`Image with src "${origSrc}" has either width or height modified, but not the other. If you use CSS to change the size of your image, also include the styles 'width: "auto"' or 'height: "auto"' to maintain the aspect ratio.`); } } }); } function getDynamicProps(fetchPriority) { if (Boolean(_react.use)) { // In React 19.0.0 or newer, we must use camelCase // prop to avoid "Warning: Invalid DOM property". // See https://github.com/facebook/react/pull/25927 return { fetchPriority }; } // In React 18.2.0 or older, we must use lowercase prop // to avoid "Warning: Invalid DOM property". return { fetchpriority: fetchPriority }; } const ImageElement = /*#__PURE__*/ (0, _react.forwardRef)(({ src, srcSet, sizes, height, width, decoding, className, style, fetchPriority, placeholder, loading, unoptimized, fill, onLoadRef, onLoadingCompleteRef, setBlurComplete, setShowAltText, sizesInput, onLoad, onError, ...rest }, forwardedRef)=>{ const ownRef = (0, _react.useCallback)((img)=>{ if (!img) { return; } if (onError) { // If the image has an error before react hydrates, then the error is lost. // The workaround is to wait until the image is mounted which is after hydration, // then we set the src again to trigger the error handler (if there was an error). // eslint-disable-next-line no-self-assign img.src = img.src; } if ("TURBOPACK compile-time truthy", 1) { if (!src) { console.error(`Image is missing required "src" property:`, img); } if (img.getAttribute('alt') === null) { console.error(`Image is missing required "alt" property. Please add Alternative Text to describe the image for screen readers and search engines.`); } } if (img.complete) { handleLoading(img, placeholder, onLoadRef, onLoadingCompleteRef, setBlurComplete, unoptimized, sizesInput); } }, [ src, placeholder, onLoadRef, onLoadingCompleteRef, setBlurComplete, onError, unoptimized, sizesInput ]); const ref = (0, _usemergedref.useMergedRef)(forwardedRef, ownRef); return /*#__PURE__*/ (0, _jsxruntime.jsx)("img", { ...rest, ...getDynamicProps(fetchPriority), // It's intended to keep `loading` before `src` because React updates // props in order which causes Safari/Firefox to not lazy load properly. // See https://github.com/facebook/react/issues/25883 loading: loading, width: width, height: height, decoding: decoding, "data-nimg": fill ? 'fill' : '1', className: className, style: style, // It's intended to keep `src` the last attribute because React updates // attributes in order. If we keep `src` the first one, Safari will // immediately start to fetch `src`, before `sizes` and `srcSet` are even // updated by React. That causes multiple unnecessary requests if `srcSet` // and `sizes` are defined. // This bug cannot be reproduced in Chrome or Firefox. sizes: sizes, srcSet: srcSet, src: src, ref: ref, onLoad: (event)=>{ const img = event.currentTarget; handleLoading(img, placeholder, onLoadRef, onLoadingCompleteRef, setBlurComplete, unoptimized, sizesInput); }, onError: (event)=>{ // if the real image fails to load, this will ensure "alt" is visible setShowAltText(true); if (placeholder !== 'empty') { // If the real image fails to load, this will still remove the placeholder. setBlurComplete(true); } if (onError) { onError(event); } } }); }); function ImagePreload({ isAppRouter, imgAttributes }) { const opts = { as: 'image', imageSrcSet: imgAttributes.srcSet, imageSizes: imgAttributes.sizes, crossOrigin: imgAttributes.crossOrigin, referrerPolicy: imgAttributes.referrerPolicy, ...getDynamicProps(imgAttributes.fetchPriority) }; if (isAppRouter && _reactdom.default.preload) { _reactdom.default.preload(imgAttributes.src, opts); return null; } return /*#__PURE__*/ (0, _jsxruntime.jsx)(_head.default, { children: /*#__PURE__*/ (0, _jsxruntime.jsx)("link", { rel: "preload", // Note how we omit the `href` attribute, as it would only be relevant // for browsers that do not support `imagesrcset`, and in those cases // it would cause the incorrect image to be preloaded. // // https://html.spec.whatwg.org/multipage/semantics.html#attr-link-imagesrcset href: imgAttributes.srcSet ? undefined : imgAttributes.src, ...opts }, '__nimg-' + imgAttributes.src + imgAttributes.srcSet + imgAttributes.sizes) }); } const Image = /*#__PURE__*/ (0, _react.forwardRef)((props, forwardedRef)=>{ const pagesRouter = (0, _react.useContext)(_routercontextsharedruntime.RouterContext); // We're in the app directory if there is no pages router. const isAppRouter = !pagesRouter; const configContext = (0, _react.useContext)(_imageconfigcontextsharedruntime.ImageConfigContext); const config = (0, _react.useMemo)(()=>{ const c = configEnv || configContext || _imageconfig.imageConfigDefault; const allSizes = [ ...c.deviceSizes, ...c.imageSizes ].sort((a, b)=>a - b); const deviceSizes = c.deviceSizes.sort((a, b)=>a - b); const qualities = c.qualities?.sort((a, b)=>a - b); return { ...c, allSizes, deviceSizes, qualities, // During the SSR, configEnv (__NEXT_IMAGE_OPTS) does not include // security sensitive configs like `localPatterns`, which is needed // during the server render to ensure it's validated. Therefore use // configContext, which holds the config from the server for validation. localPatterns: ("TURBOPACK compile-time truthy", 1) ? configContext?.localPatterns : "TURBOPACK unreachable" }; }, [ configContext ]); const { onLoad, onLoadingComplete } = props; const onLoadRef = (0, _react.useRef)(onLoad); (0, _react.useEffect)(()=>{ onLoadRef.current = onLoad; }, [ onLoad ]); const onLoadingCompleteRef = (0, _react.useRef)(onLoadingComplete); (0, _react.useEffect)(()=>{ onLoadingCompleteRef.current = onLoadingComplete; }, [ onLoadingComplete ]); const [blurComplete, setBlurComplete] = (0, _react.useState)(false); const [showAltText, setShowAltText] = (0, _react.useState)(false); const { props: imgAttributes, meta: imgMeta } = (0, _getimgprops.getImgProps)(props, { defaultLoader: _imageloader.default, imgConf: config, blurComplete, showAltText }); return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, { children: [ /*#__PURE__*/ (0, _jsxruntime.jsx)(ImageElement, { ...imgAttributes, unoptimized: imgMeta.unoptimized, placeholder: imgMeta.placeholder, fill: imgMeta.fill, onLoadRef: onLoadRef, onLoadingCompleteRef: onLoadingCompleteRef, setBlurComplete: setBlurComplete, setShowAltText: setShowAltText, sizesInput: props.sizes, ref: forwardedRef }), imgMeta.preload ? /*#__PURE__*/ (0, _jsxruntime.jsx)(ImagePreload, { isAppRouter: isAppRouter, imgAttributes: imgAttributes }) : null ] }); }); 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=image-component.js.map }), "[project]/node_modules/next/dist/shared/lib/image-external.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { default: null, getImageProps: 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; }, getImageProps: function() { return getImageProps; } }); const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [app-ssr] (ecmascript)"); const _getimgprops = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/get-img-props.js [app-ssr] (ecmascript)"); const _imagecomponent = __turbopack_context__.r("[project]/node_modules/next/dist/client/image-component.js [app-ssr] (ecmascript)"); const _imageloader = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/image-loader.js [app-ssr] (ecmascript)")); function getImageProps(imgProps) { const { props } = (0, _getimgprops.getImgProps)(imgProps, { defaultLoader: _imageloader.default, // This is replaced by webpack define plugin imgConf: ("TURBOPACK compile-time value", { "deviceSizes": ("TURBOPACK compile-time value", [ ("TURBOPACK compile-time value", 640), ("TURBOPACK compile-time value", 750), ("TURBOPACK compile-time value", 828), ("TURBOPACK compile-time value", 1080), ("TURBOPACK compile-time value", 1200), ("TURBOPACK compile-time value", 1920), ("TURBOPACK compile-time value", 2048), ("TURBOPACK compile-time value", 3840) ]), "imageSizes": ("TURBOPACK compile-time value", [ ("TURBOPACK compile-time value", 32), ("TURBOPACK compile-time value", 48), ("TURBOPACK compile-time value", 64), ("TURBOPACK compile-time value", 96), ("TURBOPACK compile-time value", 128), ("TURBOPACK compile-time value", 256), ("TURBOPACK compile-time value", 384) ]), "qualities": ("TURBOPACK compile-time value", [ ("TURBOPACK compile-time value", 75) ]), "path": ("TURBOPACK compile-time value", "/_next/image"), "loader": ("TURBOPACK compile-time value", "default"), "dangerouslyAllowSVG": ("TURBOPACK compile-time value", false), "unoptimized": ("TURBOPACK compile-time value", true), "domains": ("TURBOPACK compile-time value", []), "remotePatterns": ("TURBOPACK compile-time value", []), "localPatterns": ("TURBOPACK compile-time value", [ ("TURBOPACK compile-time value", { "pathname": ("TURBOPACK compile-time value", "**"), "search": ("TURBOPACK compile-time value", "") }) ]) }) }); // Normally we don't care about undefined props because we pass to JSX, // but this exported function could be used by the end user for anything // so we delete undefined props to clean it up a little. for (const [key, value] of Object.entries(props)){ if (value === undefined) { delete props[key]; } } return { props }; } const _default = _imagecomponent.Image; //# sourceMappingURL=image-external.js.map }), "[project]/node_modules/next/image.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { module.exports = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/image-external.js [app-ssr] (ecmascript)"); }), "[project]/node_modules/next/dist/esm/client/components/router-reducer/router-reducer-types.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "ACTION_HMR_REFRESH", ()=>ACTION_HMR_REFRESH, "ACTION_NAVIGATE", ()=>ACTION_NAVIGATE, "ACTION_REFRESH", ()=>ACTION_REFRESH, "ACTION_RESTORE", ()=>ACTION_RESTORE, "ACTION_SERVER_ACTION", ()=>ACTION_SERVER_ACTION, "ACTION_SERVER_PATCH", ()=>ACTION_SERVER_PATCH, "PrefetchKind", ()=>PrefetchKind ]); const ACTION_REFRESH = 'refresh'; const ACTION_NAVIGATE = 'navigate'; const ACTION_RESTORE = 'restore'; const ACTION_SERVER_PATCH = 'server-patch'; const ACTION_HMR_REFRESH = 'hmr-refresh'; const ACTION_SERVER_ACTION = 'server-action'; var PrefetchKind = /*#__PURE__*/ function(PrefetchKind) { PrefetchKind["AUTO"] = "auto"; PrefetchKind["FULL"] = "full"; PrefetchKind["TEMPORARY"] = "temporary"; return PrefetchKind; }({}); //# sourceMappingURL=router-reducer-types.js.map }), "[project]/node_modules/next/dist/esm/client/components/app-router-headers.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "ACTION_HEADER", ()=>ACTION_HEADER, "FLIGHT_HEADERS", ()=>FLIGHT_HEADERS, "NEXT_ACTION_NOT_FOUND_HEADER", ()=>NEXT_ACTION_NOT_FOUND_HEADER, "NEXT_DID_POSTPONE_HEADER", ()=>NEXT_DID_POSTPONE_HEADER, "NEXT_HMR_REFRESH_HASH_COOKIE", ()=>NEXT_HMR_REFRESH_HASH_COOKIE, "NEXT_HMR_REFRESH_HEADER", ()=>NEXT_HMR_REFRESH_HEADER, "NEXT_HTML_REQUEST_ID_HEADER", ()=>NEXT_HTML_REQUEST_ID_HEADER, "NEXT_IS_PRERENDER_HEADER", ()=>NEXT_IS_PRERENDER_HEADER, "NEXT_REQUEST_ID_HEADER", ()=>NEXT_REQUEST_ID_HEADER, "NEXT_REWRITTEN_PATH_HEADER", ()=>NEXT_REWRITTEN_PATH_HEADER, "NEXT_REWRITTEN_QUERY_HEADER", ()=>NEXT_REWRITTEN_QUERY_HEADER, "NEXT_ROUTER_PREFETCH_HEADER", ()=>NEXT_ROUTER_PREFETCH_HEADER, "NEXT_ROUTER_SEGMENT_PREFETCH_HEADER", ()=>NEXT_ROUTER_SEGMENT_PREFETCH_HEADER, "NEXT_ROUTER_STALE_TIME_HEADER", ()=>NEXT_ROUTER_STALE_TIME_HEADER, "NEXT_ROUTER_STATE_TREE_HEADER", ()=>NEXT_ROUTER_STATE_TREE_HEADER, "NEXT_RSC_UNION_QUERY", ()=>NEXT_RSC_UNION_QUERY, "NEXT_URL", ()=>NEXT_URL, "RSC_CONTENT_TYPE_HEADER", ()=>RSC_CONTENT_TYPE_HEADER, "RSC_HEADER", ()=>RSC_HEADER ]); const RSC_HEADER = 'rsc'; const ACTION_HEADER = 'next-action'; const NEXT_ROUTER_STATE_TREE_HEADER = 'next-router-state-tree'; const NEXT_ROUTER_PREFETCH_HEADER = 'next-router-prefetch'; const NEXT_ROUTER_SEGMENT_PREFETCH_HEADER = 'next-router-segment-prefetch'; const NEXT_HMR_REFRESH_HEADER = 'next-hmr-refresh'; const NEXT_HMR_REFRESH_HASH_COOKIE = '__next_hmr_refresh_hash__'; const NEXT_URL = 'next-url'; const RSC_CONTENT_TYPE_HEADER = 'text/x-component'; const FLIGHT_HEADERS = [ RSC_HEADER, NEXT_ROUTER_STATE_TREE_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_HMR_REFRESH_HEADER, NEXT_ROUTER_SEGMENT_PREFETCH_HEADER ]; const NEXT_RSC_UNION_QUERY = '_rsc'; const NEXT_ROUTER_STALE_TIME_HEADER = 'x-nextjs-stale-time'; const NEXT_DID_POSTPONE_HEADER = 'x-nextjs-postponed'; const NEXT_REWRITTEN_PATH_HEADER = 'x-nextjs-rewritten-path'; const NEXT_REWRITTEN_QUERY_HEADER = 'x-nextjs-rewritten-query'; const NEXT_IS_PRERENDER_HEADER = 'x-nextjs-prerender'; const NEXT_ACTION_NOT_FOUND_HEADER = 'x-nextjs-action-not-found'; const NEXT_REQUEST_ID_HEADER = 'x-nextjs-request-id'; const NEXT_HTML_REQUEST_ID_HEADER = 'x-nextjs-html-request-id'; //# sourceMappingURL=app-router-headers.js.map }), "[project]/node_modules/next/dist/esm/shared/lib/is-thenable.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; /** * Check to see if a value is Thenable. * * @param promise the maybe-thenable value * @returns true if the value is thenable */ __turbopack_context__.s([ "isThenable", ()=>isThenable ]); function isThenable(promise) { return promise !== null && typeof promise === 'object' && 'then' in promise && typeof promise.then === 'function'; } //# sourceMappingURL=is-thenable.js.map }), "[project]/node_modules/next/dist/esm/next-devtools/userspace/use-app-dev-rendering-indicator.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "useAppDevRenderingIndicator", ()=>useAppDevRenderingIndicator ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$next$2d$devtools$2f$dev$2d$overlay$2e$shim$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/next-devtools/dev-overlay.shim.js [app-ssr] (ecmascript)"); 'use client'; ; ; const useAppDevRenderingIndicator = ()=>{ const [isPending, startTransition] = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useTransition"])(); (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useEffect"])(()=>{ if (isPending) { __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$next$2d$devtools$2f$dev$2d$overlay$2e$shim$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["dispatcher"].renderingIndicatorShow(); } else { __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$next$2d$devtools$2f$dev$2d$overlay$2e$shim$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["dispatcher"].renderingIndicatorHide(); } }, [ isPending ]); return startTransition; }; //# sourceMappingURL=use-app-dev-rendering-indicator.js.map }), "[project]/node_modules/next/dist/esm/client/components/use-action-queue.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "dispatchAppRouterAction", ()=>dispatchAppRouterAction, "useActionQueue", ()=>useActionQueue ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$is$2d$thenable$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/shared/lib/is-thenable.js [app-ssr] (ecmascript)"); ; ; // The app router state lives outside of React, so we can import the dispatch // method directly wherever we need it, rather than passing it around via props // or context. let dispatch = null; function dispatchAppRouterAction(action) { if (dispatch === null) { throw Object.defineProperty(new Error('Internal Next.js error: Router action dispatched before initialization.'), "__NEXT_ERROR_CODE", { value: "E668", enumerable: false, configurable: true }); } dispatch(action); } const __DEV__ = ("TURBOPACK compile-time value", "development") !== 'production'; const promisesWithDebugInfo = ("TURBOPACK compile-time truthy", 1) ? new WeakMap() : "TURBOPACK unreachable"; function useActionQueue(actionQueue) { const [state, setState] = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"].useState(actionQueue.state); // Because of a known issue that requires to decode Flight streams inside the // render phase, we have to be a bit clever and assign the dispatch method to // a module-level variable upon initialization. The useState hook in this // module only exists to synchronize state that lives outside of React. // Ideally, what we'd do instead is pass the state as a prop to root.render; // this is conceptually how we're modeling the app router state, despite the // weird implementation details. if ("TURBOPACK compile-time truthy", 1) { const { useAppDevRenderingIndicator } = __turbopack_context__.r("[project]/node_modules/next/dist/esm/next-devtools/userspace/use-app-dev-rendering-indicator.js [app-ssr] (ecmascript)"); // eslint-disable-next-line react-hooks/rules-of-hooks const appDevRenderingIndicator = useAppDevRenderingIndicator(); dispatch = (action)=>{ appDevRenderingIndicator(()=>{ actionQueue.dispatch(action, setState); }); }; } else //TURBOPACK unreachable ; // When navigating to a non-prefetched route, then App Router state will be // blocked until the server responds. We need to transfer the `_debugInfo` // from the underlying Flight response onto the top-level promise that is // passed to React (via `use`) so that the latency is accurately represented // in the React DevTools. const stateWithDebugInfo = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useMemo"])(()=>{ if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; if ((0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$is$2d$thenable$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["isThenable"])(state)) { // useMemo can't be used to cache a Promise since the memoized value is thrown // away when we suspend. So we use a WeakMap to cache the Promise with debug info. let promiseWithDebugInfo = promisesWithDebugInfo.get(state); if (promiseWithDebugInfo === undefined) { const debugInfo = []; promiseWithDebugInfo = Promise.resolve(state).then((asyncState)=>{ if (asyncState.debugInfo !== null) { debugInfo.push(...asyncState.debugInfo); } return asyncState; }); promiseWithDebugInfo._debugInfo = debugInfo; promisesWithDebugInfo.set(state, promiseWithDebugInfo); } return promiseWithDebugInfo; } return state; }, [ state ]); return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$is$2d$thenable$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["isThenable"])(stateWithDebugInfo) ? (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["use"])(stateWithDebugInfo) : stateWithDebugInfo; } //# sourceMappingURL=use-action-queue.js.map }), "[project]/node_modules/next/dist/esm/client/app-call-server.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "callServer", ()=>callServer ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$router$2d$reducer$2f$router$2d$reducer$2d$types$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/router-reducer/router-reducer-types.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$use$2d$action$2d$queue$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/use-action-queue.js [app-ssr] (ecmascript)"); ; ; ; async function callServer(actionId, actionArgs) { return new Promise((resolve, reject)=>{ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["startTransition"])(()=>{ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$use$2d$action$2d$queue$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["dispatchAppRouterAction"])({ type: __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$router$2d$reducer$2f$router$2d$reducer$2d$types$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["ACTION_SERVER_ACTION"], actionId, actionArgs, resolve, reject }); }); }); } //# sourceMappingURL=app-call-server.js.map }), "[project]/node_modules/next/dist/esm/client/app-find-source-map-url.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "findSourceMapURL", ()=>findSourceMapURL ]); const basePath = ("TURBOPACK compile-time value", "") || ''; const pathname = `${basePath}/__nextjs_source-map`; const findSourceMapURL = ("TURBOPACK compile-time truthy", 1) ? function findSourceMapURL(filename) { if (filename === '') { return null; } if (filename.startsWith(document.location.origin) && filename.includes('/_next/static')) { // This is a request for a client chunk. This can only happen when // using Turbopack. In this case, since we control how those source // maps are generated, we can safely assume that the sourceMappingURL // is relative to the filename, with an added `.map` extension. The // browser can just request this file, and it gets served through the // normal dev server, without the need to route this through // the `/__nextjs_source-map` dev middleware. return `${filename}.map`; } const url = new URL(pathname, document.location.origin); url.searchParams.set('filename', filename); return url.href; } : "TURBOPACK unreachable"; //# sourceMappingURL=app-find-source-map-url.js.map }), "[project]/node_modules/next/dist/esm/shared/lib/segment.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "DEFAULT_SEGMENT_KEY", ()=>DEFAULT_SEGMENT_KEY, "PAGE_SEGMENT_KEY", ()=>PAGE_SEGMENT_KEY, "addSearchParamsIfPageSegment", ()=>addSearchParamsIfPageSegment, "computeSelectedLayoutSegment", ()=>computeSelectedLayoutSegment, "getSegmentValue", ()=>getSegmentValue, "getSelectedLayoutSegmentPath", ()=>getSelectedLayoutSegmentPath, "isGroupSegment", ()=>isGroupSegment, "isParallelRouteSegment", ()=>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__'; //# sourceMappingURL=segment.js.map }), "[project]/node_modules/next/dist/esm/shared/lib/segment-cache/segment-value-encoding.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "HEAD_REQUEST_KEY", ()=>HEAD_REQUEST_KEY, "ROOT_SEGMENT_REQUEST_KEY", ()=>ROOT_SEGMENT_REQUEST_KEY, "appendSegmentRequestKeyPart", ()=>appendSegmentRequestKeyPart, "convertSegmentPathToStaticExportFilename", ()=>convertSegmentPathToStaticExportFilename, "createSegmentRequestKeyPart", ()=>createSegmentRequestKeyPart ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$segment$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/shared/lib/segment.js [app-ssr] (ecmascript)"); ; const ROOT_SEGMENT_REQUEST_KEY = ''; const HEAD_REQUEST_KEY = '/_head'; function createSegmentRequestKeyPart(segment) { if (typeof segment === 'string') { if (segment.startsWith(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$segment$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["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 __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$segment$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["PAGE_SEGMENT_KEY"]; } const safeName = // 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 }), "[project]/node_modules/next/dist/esm/client/route-params.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "doesStaticSegmentAppearInURL", ()=>doesStaticSegmentAppearInURL, "getCacheKeyForDynamicParam", ()=>getCacheKeyForDynamicParam, "getParamValueFromCacheKey", ()=>getParamValueFromCacheKey, "getRenderedPathname", ()=>getRenderedPathname, "getRenderedSearch", ()=>getRenderedSearch, "parseDynamicParamFromURLPart", ()=>parseDynamicParamFromURLPart, "urlSearchParamsToParsedUrlQuery", ()=>urlSearchParamsToParsedUrlQuery, "urlToUrlWithoutFlightMarker", ()=>urlToUrlWithoutFlightMarker ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$segment$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/shared/lib/segment.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$segment$2d$cache$2f$segment$2d$value$2d$encoding$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/shared/lib/segment-cache/segment-value-encoding.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/app-router-headers.js [app-ssr] (ecmascript)"); ; ; ; function getRenderedSearch(response) { // If the server performed a rewrite, the search params used to render the // page will be different from the params in the request URL. In this case, // the response will include a header that gives the rewritten search query. const rewrittenQuery = response.headers.get(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["NEXT_REWRITTEN_QUERY_HEADER"]); if (rewrittenQuery !== null) { return rewrittenQuery === '' ? '' : '?' + rewrittenQuery; } // If the header is not present, there was no rewrite, so we use the search // query of the response URL. return urlToUrlWithoutFlightMarker(new URL(response.url)).search; } function getRenderedPathname(response) { // If the server performed a rewrite, the pathname used to render the // page will be different from the pathname in the request URL. In this case, // the response will include a header that gives the rewritten pathname. const rewrittenPath = response.headers.get(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["NEXT_REWRITTEN_PATH_HEADER"]); return rewrittenPath ?? urlToUrlWithoutFlightMarker(new URL(response.url)).pathname; } function parseDynamicParamFromURLPart(paramType, pathnameParts, partIndex) { // This needs to match the behavior in get-dynamic-param.ts. switch(paramType){ // Catchalls case 'c': { // Catchalls receive all the remaining URL parts. If there are no // remaining pathname parts, return an empty array. return partIndex < pathnameParts.length ? pathnameParts.slice(partIndex).map((s)=>encodeURIComponent(s)) : []; } // Catchall intercepted case 'ci(..)(..)': case 'ci(.)': case 'ci(..)': case 'ci(...)': { const prefix = paramType.length - 2; return partIndex < pathnameParts.length ? pathnameParts.slice(partIndex).map((s, i)=>{ if (i === 0) { return encodeURIComponent(s.slice(prefix)); } return encodeURIComponent(s); }) : []; } // Optional catchalls case 'oc': { // Optional catchalls receive all the remaining URL parts, unless this is // the end of the pathname, in which case they return null. return partIndex < pathnameParts.length ? pathnameParts.slice(partIndex).map((s)=>encodeURIComponent(s)) : null; } // Dynamic case 'd': { if (partIndex >= pathnameParts.length) { // The route tree expected there to be more parts in the URL than there // actually are. This could happen if the x-nextjs-rewritten-path header // is incorrectly set, or potentially due to bug in Next.js. TODO: // Should this be a hard error? During a prefetch, we can just abort. // During a client navigation, we could trigger a hard refresh. But if // it happens during initial render, we don't really have any // recovery options. return ''; } return encodeURIComponent(pathnameParts[partIndex]); } // Dynamic intercepted case 'di(..)(..)': case 'di(.)': case 'di(..)': case 'di(...)': { const prefix = paramType.length - 2; if (partIndex >= pathnameParts.length) { // The route tree expected there to be more parts in the URL than there // actually are. This could happen if the x-nextjs-rewritten-path header // is incorrectly set, or potentially due to bug in Next.js. TODO: // Should this be a hard error? During a prefetch, we can just abort. // During a client navigation, we could trigger a hard refresh. But if // it happens during initial render, we don't really have any // recovery options. return ''; } return encodeURIComponent(pathnameParts[partIndex].slice(prefix)); } default: paramType; return ''; } } function doesStaticSegmentAppearInURL(segment) { // This is not a parameterized segment; however, we need to determine // whether or not this segment appears in the URL. For example, this route // groups do not appear in the URL, so they should be skipped. Any other // special cases must be handled here. // TODO: Consider encoding this directly into the router tree instead of // inferring it on the client based on the segment type. Something like // a `doesAppearInURL` flag in FlightRouterState. if (segment === __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$segment$2d$cache$2f$segment$2d$value$2d$encoding$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["ROOT_SEGMENT_REQUEST_KEY"] || // For some reason, the loader tree sometimes includes extra __PAGE__ // "layouts" when part of a parallel route. But it's not a leaf node. // Otherwise, we wouldn't need this special case because pages are // always leaf nodes. // TODO: Investigate why the loader produces these fake page segments. segment.startsWith(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$segment$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["PAGE_SEGMENT_KEY"]) || // Route groups. segment[0] === '(' && segment.endsWith(')') || segment === __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$segment$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["DEFAULT_SEGMENT_KEY"] || segment === '/_not-found') { return false; } else { // All other segment types appear in the URL return true; } } function getCacheKeyForDynamicParam(paramValue, renderedSearch) { // This needs to match the logic in get-dynamic-param.ts, until we're able to // unify the various implementations so that these are always computed on // the client. if (typeof paramValue === 'string') { // TODO: Refactor or remove this helper function to accept a string rather // than the whole segment type. Also we can probably just append the // search string instead of turning it into JSON. const pageSegmentWithSearchParams = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$segment$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["addSearchParamsIfPageSegment"])(paramValue, Object.fromEntries(new URLSearchParams(renderedSearch))); return pageSegmentWithSearchParams; } else if (paramValue === null) { return ''; } else { return paramValue.join('/'); } } function urlToUrlWithoutFlightMarker(url) { const urlWithoutFlightParameters = new URL(url); urlWithoutFlightParameters.searchParams.delete(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["NEXT_RSC_UNION_QUERY"]); if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; return urlWithoutFlightParameters; } function getParamValueFromCacheKey(paramCacheKey, paramType) { // Turn the cache key string sent by the server (as part of FlightRouterState) // into a value that can be passed to `useParams` and client components. const isCatchAll = paramType === 'c' || paramType === 'oc'; if (isCatchAll) { // Catch-all param keys are a concatenation of the path segments. // See equivalent logic in `getSelectedParams`. // TODO: We should just pass the array directly, rather than concatenate // it to a string and then split it back to an array. It needs to be an // array in some places, like when passing a key React, but we can convert // it at runtime in those places. return paramCacheKey.split('/'); } return paramCacheKey; } function urlSearchParamsToParsedUrlQuery(searchParams) { // Converts a URLSearchParams object to the same type used by the server when // creating search params props, i.e. the type returned by Node's // "querystring" module. const result = {}; for (const [key, value] of searchParams.entries()){ if (result[key] === undefined) { result[key] = value; } else if (Array.isArray(result[key])) { result[key].push(value); } else { result[key] = [ result[key], value ]; } } return result; } //# sourceMappingURL=route-params.js.map }), "[project]/node_modules/next/dist/esm/client/components/router-reducer/create-href-from-url.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "createHrefFromUrl", ()=>createHrefFromUrl ]); function createHrefFromUrl(url, includeHash = true) { return url.pathname + url.search + (includeHash ? url.hash : ''); } //# sourceMappingURL=create-href-from-url.js.map }), "[project]/node_modules/next/dist/esm/client/flight-data-helpers.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "createInitialRSCPayloadFromFallbackPrerender", ()=>createInitialRSCPayloadFromFallbackPrerender, "getFlightDataPartsFromPath", ()=>getFlightDataPartsFromPath, "getNextFlightSegmentPath", ()=>getNextFlightSegmentPath, "normalizeFlightData", ()=>normalizeFlightData, "prepareFlightRouterStateForRequest", ()=>prepareFlightRouterStateForRequest ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$segment$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/shared/lib/segment.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$route$2d$params$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/route-params.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$router$2d$reducer$2f$create$2d$href$2d$from$2d$url$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/router-reducer/create-href-from-url.js [app-ssr] (ecmascript)"); ; ; ; function getFlightDataPartsFromPath(flightDataPath) { // Pick the last 4 items from the `FlightDataPath` to get the [tree, seedData, viewport, isHeadPartial]. const flightDataPathLength = 4; // tree, seedData, and head are *always* the last three items in the `FlightDataPath`. const [tree, seedData, head, isHeadPartial] = flightDataPath.slice(-flightDataPathLength); // The `FlightSegmentPath` is everything except the last three items. For a root render, it won't be present. const segmentPath = flightDataPath.slice(0, -flightDataPathLength); return { // TODO: Unify these two segment path helpers. We are inconsistently pushing an empty segment ("") // to the start of the segment path in some places which makes it hard to use solely the segment path. // Look for "// TODO-APP: remove ''" in the codebase. pathToSegment: segmentPath.slice(0, -1), segmentPath, // if the `FlightDataPath` corresponds with the root, there'll be no segment path, // in which case we default to ''. segment: segmentPath[segmentPath.length - 1] ?? '', tree, seedData, head, isHeadPartial, isRootRender: flightDataPath.length === flightDataPathLength }; } function createInitialRSCPayloadFromFallbackPrerender(response, fallbackInitialRSCPayload) { // This is a static fallback page. In order to hydrate the page, we need to // parse the client params from the URL, but to account for the possibility // that the page was rewritten, we need to check the response headers // for x-nextjs-rewritten-path or x-nextjs-rewritten-query headers. Since // we can't access the headers of the initial document response, the client // performs a fetch request to the current location. Since it's possible that // the fetch request will be dynamically rewritten to a different path than // the initial document, this fetch request delivers _all_ the hydration data // for the page; it was not inlined into the document, like it normally // would be. // // TODO: Consider treating the case where fetch is rewritten to a different // path from the document as a special deopt case. We should optimistically // assume this won't happen, inline the data into the document, and perform // a minimal request (like a HEAD or range request) to verify that the // response matches. Tricky to get right because we need to account for // all the different deployment environments we support, like output: // "export" mode, where we currently don't assume that custom response // headers are present. // Patch the Flight data sent by the server with the correct params parsed // from the URL + response object. const renderedPathname = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$route$2d$params$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["getRenderedPathname"])(response); const renderedSearch = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$route$2d$params$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["getRenderedSearch"])(response); const canonicalUrl = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$router$2d$reducer$2f$create$2d$href$2d$from$2d$url$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["createHrefFromUrl"])(new URL(location.href)); const originalFlightDataPath = fallbackInitialRSCPayload.f[0]; const originalFlightRouterState = originalFlightDataPath[0]; return { b: fallbackInitialRSCPayload.b, c: canonicalUrl.split('/'), q: renderedSearch, i: fallbackInitialRSCPayload.i, f: [ [ fillInFallbackFlightRouterState(originalFlightRouterState, renderedPathname, renderedSearch), originalFlightDataPath[1], originalFlightDataPath[2], originalFlightDataPath[2] ] ], m: fallbackInitialRSCPayload.m, G: fallbackInitialRSCPayload.G, S: fallbackInitialRSCPayload.S }; } function fillInFallbackFlightRouterState(flightRouterState, renderedPathname, renderedSearch) { const pathnameParts = renderedPathname.split('/').filter((p)=>p !== ''); const index = 0; return fillInFallbackFlightRouterStateImpl(flightRouterState, renderedSearch, pathnameParts, index); } function fillInFallbackFlightRouterStateImpl(flightRouterState, renderedSearch, pathnameParts, pathnamePartsIndex) { const originalSegment = flightRouterState[0]; let newSegment; let doesAppearInURL; if (typeof originalSegment === 'string') { newSegment = originalSegment; doesAppearInURL = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$route$2d$params$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["doesStaticSegmentAppearInURL"])(originalSegment); } else { const paramName = originalSegment[0]; const paramType = originalSegment[2]; const paramValue = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$route$2d$params$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["parseDynamicParamFromURLPart"])(paramType, pathnameParts, pathnamePartsIndex); const cacheKey = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$route$2d$params$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["getCacheKeyForDynamicParam"])(paramValue, renderedSearch); newSegment = [ paramName, cacheKey, paramType ]; doesAppearInURL = true; } // Only increment the index if the segment appears in the URL. If it's a // "virtual" segment, like a route group, it remains the same. const childPathnamePartsIndex = doesAppearInURL ? pathnamePartsIndex + 1 : pathnamePartsIndex; const children = flightRouterState[1]; const newChildren = {}; for(let key in children){ const childFlightRouterState = children[key]; newChildren[key] = fillInFallbackFlightRouterStateImpl(childFlightRouterState, renderedSearch, pathnameParts, childPathnamePartsIndex); } const newState = [ newSegment, newChildren, null, flightRouterState[3], flightRouterState[4] ]; return newState; } function getNextFlightSegmentPath(flightSegmentPath) { // Since `FlightSegmentPath` is a repeated tuple of `Segment` and `ParallelRouteKey`, we slice off two items // to get the next segment path. return flightSegmentPath.slice(2); } function normalizeFlightData(flightData) { // FlightData can be a string when the server didn't respond with a proper flight response, // or when a redirect happens, to signal to the client that it needs to perform an MPA navigation. if (typeof flightData === 'string') { return flightData; } return flightData.map((flightDataPath)=>getFlightDataPartsFromPath(flightDataPath)); } function prepareFlightRouterStateForRequest(flightRouterState, isHmrRefresh) { // HMR requests need the complete, unmodified state for proper functionality if (isHmrRefresh) { return encodeURIComponent(JSON.stringify(flightRouterState)); } return encodeURIComponent(JSON.stringify(stripClientOnlyDataFromFlightRouterState(flightRouterState))); } /** * Recursively strips client-only data from FlightRouterState while preserving * server-needed information for proper rendering decisions. */ function stripClientOnlyDataFromFlightRouterState(flightRouterState) { const [segment, parallelRoutes, _url, refreshMarker, isRootLayout, hasLoadingBoundary] = flightRouterState; // __PAGE__ segments are always fetched from the server, so there's // no need to send them up const cleanedSegment = stripSearchParamsFromPageSegment(segment); // Recursively process parallel routes const cleanedParallelRoutes = {}; for (const [key, childState] of Object.entries(parallelRoutes)){ cleanedParallelRoutes[key] = stripClientOnlyDataFromFlightRouterState(childState); } const result = [ cleanedSegment, cleanedParallelRoutes, null, shouldPreserveRefreshMarker(refreshMarker) ? refreshMarker : null ]; // Append optional fields if present if (isRootLayout !== undefined) { result[4] = isRootLayout; } if (hasLoadingBoundary !== undefined) { result[5] = hasLoadingBoundary; } return result; } /** * Strips search parameters from __PAGE__ segments to prevent sensitive * client-side data from being sent to the server. */ function stripSearchParamsFromPageSegment(segment) { if (typeof segment === 'string' && segment.startsWith(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$segment$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["PAGE_SEGMENT_KEY"] + '?')) { return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$segment$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["PAGE_SEGMENT_KEY"]; } return segment; } /** * Determines whether the refresh marker should be sent to the server * Client-only markers like 'refresh' are stripped, while server-needed markers * like 'refetch' and 'inside-shared-layout' are preserved. */ function shouldPreserveRefreshMarker(refreshMarker) { return Boolean(refreshMarker && refreshMarker !== 'refresh'); } //# sourceMappingURL=flight-data-helpers.js.map }), "[project]/node_modules/next/dist/esm/client/app-build-id.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; // This gets assigned as a side-effect during app initialization. Because it // represents the build used to create the JS bundle, it should never change // after being set, so we store it in a global variable. // // When performing RSC requests, if the incoming data has a different build ID, // we perform an MPA navigation/refresh to load the updated build and ensure // that the client and server in sync. // Starts as an empty string. In practice, because setAppBuildId is called // during initialization before hydration starts, this will always get // reassigned to the actual build ID before it's ever needed by a navigation. // If for some reasons it didn't, due to a bug or race condition, then on // navigation the build comparision would fail and trigger an MPA navigation. __turbopack_context__.s([ "getAppBuildId", ()=>getAppBuildId, "setAppBuildId", ()=>setAppBuildId ]); let globalBuildId = ''; function setAppBuildId(buildId) { globalBuildId = buildId; } function getAppBuildId() { return globalBuildId; } //# sourceMappingURL=app-build-id.js.map }), "[project]/node_modules/next/dist/esm/shared/lib/hash.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; // 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. __turbopack_context__.s([ "djb2Hash", ()=>djb2Hash, "hexHash", ()=>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 }), "[project]/node_modules/next/dist/esm/shared/lib/router/utils/cache-busting-search-param.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "computeCacheBustingSearchParam", ()=>computeCacheBustingSearchParam ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$hash$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/shared/lib/hash.js [app-ssr] (ecmascript)"); ; function computeCacheBustingSearchParam(prefetchHeader, segmentPrefetchHeader, stateTreeHeader, nextUrlHeader) { if ((prefetchHeader === undefined || prefetchHeader === '0') && segmentPrefetchHeader === undefined && stateTreeHeader === undefined && nextUrlHeader === undefined) { return ''; } return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$hash$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["hexHash"])([ prefetchHeader || '0', segmentPrefetchHeader || '0', stateTreeHeader || '0', nextUrlHeader || '0' ].join(',')); } //# sourceMappingURL=cache-busting-search-param.js.map }), "[project]/node_modules/next/dist/esm/client/components/router-reducer/set-cache-busting-search-param.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "setCacheBustingSearchParam", ()=>setCacheBustingSearchParam, "setCacheBustingSearchParamWithHash", ()=>setCacheBustingSearchParamWithHash ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$cache$2d$busting$2d$search$2d$param$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/shared/lib/router/utils/cache-busting-search-param.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/app-router-headers.js [app-ssr] (ecmascript)"); 'use client'; ; ; const setCacheBustingSearchParam = (url, headers)=>{ const uniqueCacheKey = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$cache$2d$busting$2d$search$2d$param$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["computeCacheBustingSearchParam"])(headers[__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["NEXT_ROUTER_PREFETCH_HEADER"]], headers[__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["NEXT_ROUTER_SEGMENT_PREFETCH_HEADER"]], headers[__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["NEXT_ROUTER_STATE_TREE_HEADER"]], headers[__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["NEXT_URL"]]); setCacheBustingSearchParamWithHash(url, uniqueCacheKey); }; const setCacheBustingSearchParamWithHash = (url, hash)=>{ /** * Note that we intentionally do not use `url.searchParams.set` here: * * const url = new URL('https://example.com/search?q=custom%20spacing'); * url.searchParams.set('_rsc', 'abc123'); * console.log(url.toString()); // Outputs: https://example.com/search?q=custom+spacing&_rsc=abc123 * ^ <--- this is causing confusion * This is in fact intended based on https://url.spec.whatwg.org/#interface-urlsearchparams, but * we want to preserve the %20 as %20 if that's what the user passed in, hence the custom * logic below. */ const existingSearch = url.search; const rawQuery = existingSearch.startsWith('?') ? existingSearch.slice(1) : existingSearch; // Always remove any existing cache busting param and add a fresh one to ensure // we have the correct value based on current request headers const pairs = rawQuery.split('&').filter((pair)=>pair && !pair.startsWith(`${__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["NEXT_RSC_UNION_QUERY"]}=`)); if (hash.length > 0) { pairs.push(`${__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["NEXT_RSC_UNION_QUERY"]}=${hash}`); } else { pairs.push(`${__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["NEXT_RSC_UNION_QUERY"]}`); } url.search = pairs.length ? `?${pairs.join('&')}` : ''; }; //# sourceMappingURL=set-cache-busting-search-param.js.map }), "[project]/node_modules/next/dist/esm/client/components/router-reducer/fetch-server-response.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "createFetch", ()=>createFetch, "createFromNextReadableStream", ()=>createFromNextReadableStream, "fetchServerResponse", ()=>fetchServerResponse ]); // TODO: Explicitly import from client.browser // eslint-disable-next-line import/no-extraneous-dependencies var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$server$2d$dom$2d$turbopack$2d$client$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-server-dom-turbopack-client.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/app-router-headers.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$app$2d$call$2d$server$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/app-call-server.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$app$2d$find$2d$source$2d$map$2d$url$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/app-find-source-map-url.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$router$2d$reducer$2f$router$2d$reducer$2d$types$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/router-reducer/router-reducer-types.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$flight$2d$data$2d$helpers$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/flight-data-helpers.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$app$2d$build$2d$id$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/app-build-id.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$router$2d$reducer$2f$set$2d$cache$2d$busting$2d$search$2d$param$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/router-reducer/set-cache-busting-search-param.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$route$2d$params$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/route-params.js [app-ssr] (ecmascript)"); 'use client'; ; ; ; ; ; ; ; ; ; const createFromReadableStream = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$server$2d$dom$2d$turbopack$2d$client$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["createFromReadableStream"]; const createFromFetch = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$server$2d$dom$2d$turbopack$2d$client$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["createFromFetch"]; let createDebugChannel; if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; function doMpaNavigation(url) { return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$route$2d$params$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["urlToUrlWithoutFlightMarker"])(new URL(url, location.origin)).toString(); } let isPageUnloading = false; if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; async function fetchServerResponse(url, options) { const { flightRouterState, nextUrl, prefetchKind } = options; const headers = { // Enable flight response [__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["RSC_HEADER"]]: '1', // Provide the current router state [__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["NEXT_ROUTER_STATE_TREE_HEADER"]]: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$flight$2d$data$2d$helpers$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["prepareFlightRouterStateForRequest"])(flightRouterState, options.isHmrRefresh) }; /** * Three cases: * - `prefetchKind` is `undefined`, it means it's a normal navigation, so we want to prefetch the page data fully * - `prefetchKind` is `full` - we want to prefetch the whole page so same as above * - `prefetchKind` is `auto` - if the page is dynamic, prefetch the page data partially, if static prefetch the page data fully */ if (prefetchKind === __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$router$2d$reducer$2f$router$2d$reducer$2d$types$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["PrefetchKind"].AUTO) { headers[__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["NEXT_ROUTER_PREFETCH_HEADER"]] = '1'; } if (("TURBOPACK compile-time value", "development") === 'development' && options.isHmrRefresh) { headers[__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["NEXT_HMR_REFRESH_HEADER"]] = '1'; } if (nextUrl) { headers[__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["NEXT_URL"]] = nextUrl; } // In static export mode, we need to modify the URL to request the .txt file, // but we should preserve the original URL for the canonical URL and error handling. const originalUrl = url; try { // When creating a "temporary" prefetch (the "on-demand" prefetch that gets created on navigation, if one doesn't exist) // we send the request with a "high" priority as it's in response to a user interaction that could be blocking a transition. // Otherwise, all other prefetches are sent with a "low" priority. // We use "auto" for in all other cases to match the existing default, as this function is shared outside of prefetching. const fetchPriority = prefetchKind ? prefetchKind === __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$router$2d$reducer$2f$router$2d$reducer$2d$types$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["PrefetchKind"].TEMPORARY ? 'high' : 'low' : 'auto'; if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; // Typically, during a navigation, we decode the response using Flight's // `createFromFetch` API, which accepts a `fetch` promise. // TODO: Remove this check once the old PPR flag is removed const isLegacyPPR = ("TURBOPACK compile-time value", false) && !("TURBOPACK compile-time value", false); const shouldImmediatelyDecode = !isLegacyPPR; const res = await createFetch(url, headers, fetchPriority, shouldImmediatelyDecode); const responseUrl = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$route$2d$params$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["urlToUrlWithoutFlightMarker"])(new URL(res.url)); const canonicalUrl = res.redirected ? responseUrl : originalUrl; const contentType = res.headers.get('content-type') || ''; const interception = !!res.headers.get('vary')?.includes(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["NEXT_URL"]); const postponed = !!res.headers.get(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["NEXT_DID_POSTPONE_HEADER"]); const staleTimeHeaderSeconds = res.headers.get(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["NEXT_ROUTER_STALE_TIME_HEADER"]); const staleTime = staleTimeHeaderSeconds !== null ? parseInt(staleTimeHeaderSeconds, 10) * 1000 : -1; let isFlightResponse = contentType.startsWith(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["RSC_CONTENT_TYPE_HEADER"]); if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; // If fetch returns something different than flight response handle it like a mpa navigation // If the fetch was not 200, we also handle it like a mpa navigation if (!isFlightResponse || !res.ok || !res.body) { // in case the original URL came with a hash, preserve it before redirecting to the new URL if (url.hash) { responseUrl.hash = url.hash; } return doMpaNavigation(responseUrl.toString()); } // We may navigate to a page that requires a different Webpack runtime. // In prod, every page will have the same Webpack runtime. // In dev, the Webpack runtime is minimal for each page. // We need to ensure the Webpack runtime is updated before executing client-side JS of the new page. // TODO: This needs to happen in the Flight Client. // Or Webpack needs to include the runtime update in the Flight response as // a blocking script. if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; let flightResponsePromise = res.flightResponse; if (flightResponsePromise === null) { // Typically, `createFetch` would have already started decoding the // Flight response. If it hasn't, though, we need to decode it now. // TODO: This should only be reachable if legacy PPR is enabled (i.e. PPR // without Cache Components). Remove this branch once legacy PPR // is deleted. const flightStream = postponed ? createUnclosingPrefetchStream(res.body) : res.body; flightResponsePromise = createFromNextReadableStream(flightStream, headers); } const flightResponse = await flightResponsePromise; if ((0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$app$2d$build$2d$id$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["getAppBuildId"])() !== flightResponse.b) { return doMpaNavigation(res.url); } const normalizedFlightData = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$flight$2d$data$2d$helpers$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["normalizeFlightData"])(flightResponse.f); if (typeof normalizedFlightData === 'string') { return doMpaNavigation(normalizedFlightData); } return { flightData: normalizedFlightData, canonicalUrl: canonicalUrl, renderedSearch: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$route$2d$params$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["getRenderedSearch"])(res), couldBeIntercepted: interception, prerendered: flightResponse.S, postponed, staleTime, debugInfo: flightResponsePromise._debugInfo ?? null }; } catch (err) { if (!isPageUnloading) { console.error(`Failed to fetch RSC payload for ${originalUrl}. Falling back to browser navigation.`, err); } // If fetch fails handle it like a mpa navigation // TODO-APP: Add a test for the case where a CORS request fails, e.g. external url redirect coming from the response. // See https://github.com/vercel/next.js/issues/43605#issuecomment-1451617521 for a reproduction. return originalUrl.toString(); } } async function createFetch(url, headers, fetchPriority, shouldImmediatelyDecode, signal) { // TODO: In output: "export" mode, the headers do nothing. Omit them (and the // cache busting search param) from the request so they're // maximally cacheable. if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; if ("TURBOPACK compile-time truthy", 1) { if (self.__next_r) { headers[__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["NEXT_HTML_REQUEST_ID_HEADER"]] = self.__next_r; } // Create a new request ID for the server action request. The server uses // this to tag debug information sent via WebSocket to the client, which // then routes those chunks to the debug channel associated with this ID. headers[__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["NEXT_REQUEST_ID_HEADER"]] = crypto.getRandomValues(new Uint32Array(1))[0].toString(16); } const fetchOptions = { // Backwards compat for older browsers. `same-origin` is the default in modern browsers. credentials: 'same-origin', headers, priority: fetchPriority || undefined, signal }; // `fetchUrl` is slightly different from `url` because we add a cache-busting // search param to it. This should not leak outside of this function, so we // track them separately. let fetchUrl = new URL(url); (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$router$2d$reducer$2f$set$2d$cache$2d$busting$2d$search$2d$param$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["setCacheBustingSearchParam"])(fetchUrl, headers); let fetchPromise = fetch(fetchUrl, fetchOptions); // Immediately pass the fetch promise to the Flight client so that the debug // info includes the latency from the client to the server. The internal timer // in React starts as soon as `createFromFetch` is called. // // The only case where we don't do this is during a prefetch, because we have // to do some extra processing of the response stream (see // `createUnclosingPrefetchStream`). But this is fine, because a top-level // prefetch response never blocks a navigation; if it hasn't already been // written into the cache by the time the navigation happens, the router will // go straight to a dynamic request. let flightResponsePromise = shouldImmediatelyDecode ? createFromNextFetch(fetchPromise, headers) : null; let browserResponse = await fetchPromise; // If the server responds with a redirect (e.g. 307), and the redirected // location does not contain the cache busting search param set in the // original request, the response is likely invalid — when following the // redirect, the browser forwards the request headers, but since the cache // busting search param is missing, the server will reject the request due to // a mismatch. // // Ideally, we would be able to intercept the redirect response and perform it // manually, instead of letting the browser automatically follow it, but this // is not allowed by the fetch API. // // So instead, we must "replay" the redirect by fetching the new location // again, but this time we'll append the cache busting search param to prevent // a mismatch. // // TODO: We can optimize Next.js's built-in middleware APIs by returning a // custom status code, to prevent the browser from automatically following it. // // This does not affect Server Action-based redirects; those are encoded // differently, as part of the Flight body. It only affects redirects that // occur in a middleware or a third-party proxy. let redirected = browserResponse.redirected; if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; // Remove the cache busting search param from the response URL, to prevent it // from leaking outside of this function. const responseUrl = new URL(browserResponse.url, fetchUrl); responseUrl.searchParams.delete(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$app$2d$router$2d$headers$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["NEXT_RSC_UNION_QUERY"]); const rscResponse = { url: responseUrl.href, // This is true if any redirects occurred, either automatically by the // browser, or manually by us. So it's different from // `browserResponse.redirected`, which only tells us whether the browser // followed a redirect, and only for the last response in the chain. redirected, // These can be copied from the last browser response we received. We // intentionally only expose the subset of fields that are actually used // elsewhere in the codebase. ok: browserResponse.ok, headers: browserResponse.headers, body: browserResponse.body, status: browserResponse.status, // This is the exact promise returned by `createFromFetch`. It contains // debug information that we need to transfer to any derived promises that // are later rendered by React. flightResponse: flightResponsePromise }; return rscResponse; } function createFromNextReadableStream(flightStream, requestHeaders) { return createFromReadableStream(flightStream, { callServer: __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$app$2d$call$2d$server$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["callServer"], findSourceMapURL: __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$app$2d$find$2d$source$2d$map$2d$url$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["findSourceMapURL"], debugChannel: createDebugChannel && createDebugChannel(requestHeaders) }); } function createFromNextFetch(promiseForResponse, requestHeaders) { return createFromFetch(promiseForResponse, { callServer: __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$app$2d$call$2d$server$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["callServer"], findSourceMapURL: __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$app$2d$find$2d$source$2d$map$2d$url$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["findSourceMapURL"], debugChannel: createDebugChannel && createDebugChannel(requestHeaders) }); } function createUnclosingPrefetchStream(originalFlightStream) { // When PPR is enabled, prefetch streams may contain references that never // resolve, because that's how we encode dynamic data access. In the decoded // object returned by the Flight client, these are reified into hanging // promises that suspend during render, which is effectively what we want. // The UI resolves when it switches to the dynamic data stream // (via useDeferredValue(dynamic, static)). // // However, the Flight implementation currently errors if the server closes // the response before all the references are resolved. As a cheat to work // around this, we wrap the original stream in a new stream that never closes, // and therefore doesn't error. const reader = originalFlightStream.getReader(); return new ReadableStream({ async pull (controller) { while(true){ const { done, value } = await reader.read(); if (!done) { // Pass to the target stream and keep consuming the Flight response // from the server. controller.enqueue(value); continue; } // The server stream has closed. Exit, but intentionally do not close // the target stream. return; } } }); } //# sourceMappingURL=fetch-server-response.js.map }), "[project]/node_modules/next/dist/esm/client/components/unresolved-thenable.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; /** * Create a "Thenable" that does not resolve. This is used to suspend indefinitely when data is not available yet. */ __turbopack_context__.s([ "unresolvedThenable", ()=>unresolvedThenable ]); const unresolvedThenable = { then: ()=>{} }; //# sourceMappingURL=unresolved-thenable.js.map }), "[project]/node_modules/next/dist/esm/client/components/navigation-untracked.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "useUntrackedPathname", ()=>useUntrackedPathname ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$hooks$2d$client$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/hooks-client-context.js [app-ssr] (ecmascript)"); ; ; /** * This checks to see if the current render has any unknown route parameters that * would cause the pathname to be dynamic. It's used to trigger a different * render path in the error boundary. * * @returns true if there are any unknown route parameters, false otherwise */ function hasFallbackRouteParams() { if ("TURBOPACK compile-time truthy", 1) { // AsyncLocalStorage should not be included in the client bundle. const { workUnitAsyncStorage } = __turbopack_context__.r("[externals]/next/dist/server/app-render/work-unit-async-storage.external.js [external] (next/dist/server/app-render/work-unit-async-storage.external.js, cjs)"); const workUnitStore = workUnitAsyncStorage.getStore(); if (!workUnitStore) return false; switch(workUnitStore.type){ case 'prerender': case 'prerender-client': case 'prerender-ppr': const fallbackParams = workUnitStore.fallbackRouteParams; return fallbackParams ? fallbackParams.size > 0 : false; case 'prerender-legacy': case 'request': case 'prerender-runtime': case 'cache': case 'private-cache': case 'unstable-cache': break; default: workUnitStore; } return false; } //TURBOPACK unreachable ; } function useUntrackedPathname() { // If there are any unknown route parameters we would typically throw // an error, but this internal method allows us to return a null value instead // for components that do not propagate the pathname to the static shell (like // the error boundary). if (hasFallbackRouteParams()) { return null; } // This shouldn't cause any issues related to conditional rendering because // the environment will be consistent for the render. // eslint-disable-next-line react-hooks/rules-of-hooks return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useContext"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$hooks$2d$client$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["PathnameContext"]); } //# sourceMappingURL=navigation-untracked.js.map }), "[project]/node_modules/next/dist/esm/client/components/http-access-fallback/http-access-fallback.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "HTTPAccessErrorStatus", ()=>HTTPAccessErrorStatus, "HTTP_ERROR_FALLBACK_ERROR_CODE", ()=>HTTP_ERROR_FALLBACK_ERROR_CODE, "getAccessFallbackErrorTypeByStatus", ()=>getAccessFallbackErrorTypeByStatus, "getAccessFallbackHTTPStatus", ()=>getAccessFallbackHTTPStatus, "isHTTPAccessFallbackError", ()=>isHTTPAccessFallbackError ]); const HTTPAccessErrorStatus = { NOT_FOUND: 404, FORBIDDEN: 403, UNAUTHORIZED: 401 }; const ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus)); const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'; function isHTTPAccessFallbackError(error) { if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { return false; } const [prefix, httpStatus] = error.digest.split(';'); return prefix === HTTP_ERROR_FALLBACK_ERROR_CODE && ALLOWED_CODES.has(Number(httpStatus)); } function getAccessFallbackHTTPStatus(error) { const httpStatus = error.digest.split(';')[1]; return Number(httpStatus); } function getAccessFallbackErrorTypeByStatus(status) { switch(status){ case 401: return 'unauthorized'; case 403: return 'forbidden'; case 404: return 'not-found'; default: return; } } //# sourceMappingURL=http-access-fallback.js.map }), "[project]/node_modules/next/dist/esm/client/components/redirect-status-code.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "RedirectStatusCode", ()=>RedirectStatusCode ]); var RedirectStatusCode = /*#__PURE__*/ function(RedirectStatusCode) { RedirectStatusCode[RedirectStatusCode["SeeOther"] = 303] = "SeeOther"; RedirectStatusCode[RedirectStatusCode["TemporaryRedirect"] = 307] = "TemporaryRedirect"; RedirectStatusCode[RedirectStatusCode["PermanentRedirect"] = 308] = "PermanentRedirect"; return RedirectStatusCode; }({}); //# sourceMappingURL=redirect-status-code.js.map }), "[project]/node_modules/next/dist/esm/client/components/redirect-error.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "REDIRECT_ERROR_CODE", ()=>REDIRECT_ERROR_CODE, "RedirectType", ()=>RedirectType, "isRedirectError", ()=>isRedirectError ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$redirect$2d$status$2d$code$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/redirect-status-code.js [app-ssr] (ecmascript)"); ; const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'; var RedirectType = /*#__PURE__*/ function(RedirectType) { RedirectType["push"] = "push"; RedirectType["replace"] = "replace"; return RedirectType; }({}); function isRedirectError(error) { if (typeof error !== 'object' || error === null || !('digest' in error) || typeof error.digest !== 'string') { return false; } const digest = error.digest.split(';'); const [errorCode, type] = digest; const destination = digest.slice(2, -2).join(';'); const status = digest.at(-2); const statusCode = Number(status); return errorCode === REDIRECT_ERROR_CODE && (type === 'replace' || type === 'push') && typeof destination === 'string' && !isNaN(statusCode) && statusCode in __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$redirect$2d$status$2d$code$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["RedirectStatusCode"]; } //# sourceMappingURL=redirect-error.js.map }), "[project]/node_modules/next/dist/esm/client/components/is-next-router-error.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "isNextRouterError", ()=>isNextRouterError ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$http$2d$access$2d$fallback$2f$http$2d$access$2d$fallback$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/http-access-fallback/http-access-fallback.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$redirect$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/redirect-error.js [app-ssr] (ecmascript)"); ; ; function isNextRouterError(error) { return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$redirect$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["isRedirectError"])(error) || (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$http$2d$access$2d$fallback$2f$http$2d$access$2d$fallback$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["isHTTPAccessFallbackError"])(error); } //# sourceMappingURL=is-next-router-error.js.map }), "[project]/node_modules/next/dist/esm/client/components/nav-failure-handler.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "handleHardNavError", ()=>handleHardNavError, "useNavFailureHandler", ()=>useNavFailureHandler ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$router$2d$reducer$2f$create$2d$href$2d$from$2d$url$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/router-reducer/create-href-from-url.js [app-ssr] (ecmascript)"); ; ; function handleHardNavError(error) { if (error && ("TURBOPACK compile-time value", "undefined") !== 'undefined' && window.next.__pendingUrl && (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$router$2d$reducer$2f$create$2d$href$2d$from$2d$url$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["createHrefFromUrl"])(new URL(window.location.href)) !== (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$router$2d$reducer$2f$create$2d$href$2d$from$2d$url$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["createHrefFromUrl"])(window.next.__pendingUrl)) //TURBOPACK unreachable ; return false; } function useNavFailureHandler() { if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; } //# sourceMappingURL=nav-failure-handler.js.map }), "[project]/node_modules/next/dist/esm/client/components/handle-isr-error.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "HandleISRError", ()=>HandleISRError ]); const workAsyncStorage = ("TURBOPACK compile-time truthy", 1) ? __turbopack_context__.r("[externals]/next/dist/server/app-render/work-async-storage.external.js [external] (next/dist/server/app-render/work-async-storage.external.js, cjs)").workAsyncStorage : "TURBOPACK unreachable"; function HandleISRError({ error }) { if (workAsyncStorage) { const store = workAsyncStorage.getStore(); if (store?.isStaticGeneration) { if (error) { console.error(error); } throw error; } } return null; } //# sourceMappingURL=handle-isr-error.js.map }), "[project]/node_modules/next/dist/esm/shared/lib/router/utils/html-bots.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; // 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) __turbopack_context__.s([ "HTML_LIMITED_BOT_UA_RE", ()=>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 }), "[project]/node_modules/next/dist/esm/shared/lib/router/utils/is-bot.js [app-ssr] (ecmascript) <locals>", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "HTML_LIMITED_BOT_UA_RE_STRING", ()=>HTML_LIMITED_BOT_UA_RE_STRING, "getBotType", ()=>getBotType, "isBot", ()=>isBot ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$html$2d$bots$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/shared/lib/router/utils/html-bots.js [app-ssr] (ecmascript)"); ; // 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 = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$html$2d$bots$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["HTML_LIMITED_BOT_UA_RE"].source; ; function isDomBotUA(userAgent) { return HEADLESS_BROWSER_BOT_UA_RE.test(userAgent); } function isHtmlLimitedBotUA(userAgent) { return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$html$2d$bots$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["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 }), "[project]/node_modules/next/dist/esm/client/components/error-boundary.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "ErrorBoundary", ()=>ErrorBoundary, "ErrorBoundaryHandler", ()=>ErrorBoundaryHandler ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$navigation$2d$untracked$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/navigation-untracked.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$is$2d$next$2d$router$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/is-next-router-error.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$nav$2d$failure$2d$handler$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/nav-failure-handler.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$handle$2d$isr$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/handle-isr-error.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$is$2d$bot$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__$3c$locals$3e$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/shared/lib/router/utils/is-bot.js [app-ssr] (ecmascript) <locals>"); 'use client'; ; ; ; ; ; ; ; const isBotUserAgent = ("TURBOPACK compile-time value", "undefined") !== 'undefined' && (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$is$2d$bot$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__$3c$locals$3e$__["isBot"])(window.navigator.userAgent); class ErrorBoundaryHandler extends __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"].Component { constructor(props){ super(props), this.reset = ()=>{ this.setState({ error: null }); }; this.state = { error: null, previousPathname: this.props.pathname }; } static getDerivedStateFromError(error) { if ((0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$is$2d$next$2d$router$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["isNextRouterError"])(error)) { // Re-throw if an expected internal Next.js router error occurs // this means it should be handled by a different boundary (such as a NotFound boundary in a parent segment) throw error; } return { error }; } static getDerivedStateFromProps(props, state) { const { error } = state; // if we encounter an error while // a navigation is pending we shouldn't render // the error boundary and instead should fallback // to a hard navigation to attempt recovering if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; /** * Handles reset of the error boundary when a navigation happens. * Ensures the error boundary does not stay enabled when navigating to a new page. * Approach of setState in render is safe as it checks the previous pathname and then overrides * it as outlined in https://react.dev/reference/react/useState#storing-information-from-previous-renders */ if (props.pathname !== state.previousPathname && state.error) { return { error: null, previousPathname: props.pathname }; } return { error: state.error, previousPathname: props.pathname }; } // Explicit type is needed to avoid the generated `.d.ts` having a wide return type that could be specific to the `@types/react` version. render() { //When it's bot request, segment level error boundary will keep rendering the children, // the final error will be caught by the root error boundary and determine wether need to apply graceful degrade. if (this.state.error && !isBotUserAgent) { return /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxs"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["Fragment"], { children: [ /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$handle$2d$isr$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["HandleISRError"], { error: this.state.error }), this.props.errorStyles, this.props.errorScripts, /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])(this.props.errorComponent, { error: this.state.error, reset: this.reset }) ] }); } return this.props.children; } } function ErrorBoundary({ errorComponent, errorStyles, errorScripts, children }) { // When we're rendering the missing params shell, this will return null. This // is because we won't be rendering any not found boundaries or error // boundaries for the missing params shell. When this runs on the client // (where these errors can occur), we will get the correct pathname. const pathname = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$navigation$2d$untracked$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useUntrackedPathname"])(); if (errorComponent) { return /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])(ErrorBoundaryHandler, { pathname: pathname, errorComponent: errorComponent, errorStyles: errorStyles, errorScripts: errorScripts, children: children }); } return /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["Fragment"], { children: children }); } //# sourceMappingURL=error-boundary.js.map }), "[project]/node_modules/next/dist/esm/client/components/match-segments.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "matchSegment", ()=>matchSegment ]); const matchSegment = (existingSegment, segment)=>{ // segment is either Array or string if (typeof existingSegment === 'string') { if (typeof segment === 'string') { // Common case: segment is just a string return existingSegment === segment; } return false; } if (typeof segment === 'string') { return false; } return existingSegment[0] === segment[0] && existingSegment[1] === segment[1]; }; //# sourceMappingURL=match-segments.js.map }), "[project]/node_modules/next/dist/esm/shared/lib/utils/warn-once.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "warnOnce", ()=>warnOnce ]); let warnOnce = (_)=>{}; if ("TURBOPACK compile-time truthy", 1) { const warnings = new Set(); warnOnce = (msg)=>{ if (!warnings.has(msg)) { console.warn(msg); } warnings.add(msg); }; } ; //# sourceMappingURL=warn-once.js.map }), "[project]/node_modules/next/dist/esm/shared/lib/router/utils/disable-smooth-scroll.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "disableSmoothScrollDuringRouteTransition", ()=>disableSmoothScrollDuringRouteTransition ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$utils$2f$warn$2d$once$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/shared/lib/utils/warn-once.js [app-ssr] (ecmascript)"); ; function disableSmoothScrollDuringRouteTransition(fn, options = {}) { // if only the hash is changed, we don't need to disable smooth scrolling // we only care to prevent smooth scrolling when navigating to a new page to avoid jarring UX if (options.onlyHashChange) { fn(); return; } const htmlElement = document.documentElement; const hasDataAttribute = htmlElement.dataset.scrollBehavior === 'smooth'; if (!hasDataAttribute) { // Warn if smooth scrolling is detected but no data attribute is present if (("TURBOPACK compile-time value", "development") === 'development' && getComputedStyle(htmlElement).scrollBehavior === 'smooth') { (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$utils$2f$warn$2d$once$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["warnOnce"])('Detected `scroll-behavior: smooth` on the `<html>` element. To disable smooth scrolling during route transitions, ' + 'add `data-scroll-behavior="smooth"` to your <html> element. ' + 'Learn more: https://nextjs.org/docs/messages/missing-data-scroll-behavior'); } // No smooth scrolling configured, run directly without style manipulation fn(); return; } // Proceed with temporarily disabling smooth scrolling const existing = htmlElement.style.scrollBehavior; htmlElement.style.scrollBehavior = 'auto'; if (!options.dontForceLayout) { // In Chrome-based browsers we need to force reflow before calling `scrollTo`. // Otherwise it will not pickup the change in scrollBehavior // More info here: https://github.com/vercel/next.js/issues/40719#issuecomment-1336248042 htmlElement.getClientRects(); } fn(); htmlElement.style.scrollBehavior = existing; } //# sourceMappingURL=disable-smooth-scroll.js.map }), "[project]/node_modules/next/dist/esm/client/components/readonly-url-search-params.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; /** * ReadonlyURLSearchParams implementation shared between client and server. * This file is intentionally not marked as 'use client' or 'use server' * so it can be imported by both environments. */ /** @internal */ __turbopack_context__.s([ "ReadonlyURLSearchParams", ()=>ReadonlyURLSearchParams ]); class ReadonlyURLSearchParamsError extends Error { constructor(){ super('Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams'); } } class ReadonlyURLSearchParams extends URLSearchParams { /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */ append() { throw new ReadonlyURLSearchParamsError(); } /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */ delete() { throw new ReadonlyURLSearchParamsError(); } /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */ set() { throw new ReadonlyURLSearchParamsError(); } /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */ sort() { throw new ReadonlyURLSearchParamsError(); } } //# sourceMappingURL=readonly-url-search-params.js.map }), "[project]/node_modules/next/dist/esm/client/components/unrecognized-action-error.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "UnrecognizedActionError", ()=>UnrecognizedActionError, "unstable_isUnrecognizedActionError", ()=>unstable_isUnrecognizedActionError ]); class UnrecognizedActionError extends Error { constructor(...args){ super(...args); this.name = 'UnrecognizedActionError'; } } function unstable_isUnrecognizedActionError(error) { return !!(error && typeof error === 'object' && error instanceof UnrecognizedActionError); } //# sourceMappingURL=unrecognized-action-error.js.map }), "[project]/node_modules/next/dist/esm/client/components/redirect.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "getRedirectError", ()=>getRedirectError, "getRedirectStatusCodeFromError", ()=>getRedirectStatusCodeFromError, "getRedirectTypeFromError", ()=>getRedirectTypeFromError, "getURLFromRedirectError", ()=>getURLFromRedirectError, "permanentRedirect", ()=>permanentRedirect, "redirect", ()=>redirect ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$redirect$2d$status$2d$code$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/redirect-status-code.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$redirect$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/redirect-error.js [app-ssr] (ecmascript)"); ; ; const actionAsyncStorage = ("TURBOPACK compile-time truthy", 1) ? __turbopack_context__.r("[externals]/next/dist/server/app-render/action-async-storage.external.js [external] (next/dist/server/app-render/action-async-storage.external.js, cjs)").actionAsyncStorage : "TURBOPACK unreachable"; function getRedirectError(url, type, statusCode = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$redirect$2d$status$2d$code$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["RedirectStatusCode"].TemporaryRedirect) { const error = Object.defineProperty(new Error(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$redirect$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["REDIRECT_ERROR_CODE"]), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.digest = `${__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$redirect$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["REDIRECT_ERROR_CODE"]};${type};${url};${statusCode};`; return error; } function redirect(/** The URL to redirect to */ url, type) { type ??= actionAsyncStorage?.getStore()?.isAction ? __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$redirect$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["RedirectType"].push : __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$redirect$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["RedirectType"].replace; throw getRedirectError(url, type, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$redirect$2d$status$2d$code$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["RedirectStatusCode"].TemporaryRedirect); } function permanentRedirect(/** The URL to redirect to */ url, type = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$redirect$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["RedirectType"].replace) { throw getRedirectError(url, type, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$redirect$2d$status$2d$code$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["RedirectStatusCode"].PermanentRedirect); } function getURLFromRedirectError(error) { if (!(0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$redirect$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["isRedirectError"])(error)) return null; // Slices off the beginning of the digest that contains the code and the // separating ';'. return error.digest.split(';').slice(2, -2).join(';'); } function getRedirectTypeFromError(error) { if (!(0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$redirect$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["isRedirectError"])(error)) { throw Object.defineProperty(new Error('Not a redirect error'), "__NEXT_ERROR_CODE", { value: "E260", enumerable: false, configurable: true }); } return error.digest.split(';', 2)[1]; } function getRedirectStatusCodeFromError(error) { if (!(0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$redirect$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["isRedirectError"])(error)) { throw Object.defineProperty(new Error('Not a redirect error'), "__NEXT_ERROR_CODE", { value: "E260", enumerable: false, configurable: true }); } return Number(error.digest.split(';').at(-2)); } //# sourceMappingURL=redirect.js.map }), "[project]/node_modules/next/dist/esm/client/components/not-found.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "notFound", ()=>notFound ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$http$2d$access$2d$fallback$2f$http$2d$access$2d$fallback$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/http-access-fallback/http-access-fallback.js [app-ssr] (ecmascript)"); ; /** * This function allows you to render the [not-found.js file](https://nextjs.org/docs/app/api-reference/file-conventions/not-found) * within a route segment as well as inject a tag. * * `notFound()` can be used in * [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components), * [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and * [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations). * * - In a Server Component, this will insert a `<meta name="robots" content="noindex" />` meta tag and set the status code to 404. * - In a Route Handler or Server Action, it will serve a 404 to the caller. * * Read more: [Next.js Docs: `notFound`](https://nextjs.org/docs/app/api-reference/functions/not-found) */ const DIGEST = `${__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$http$2d$access$2d$fallback$2f$http$2d$access$2d$fallback$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["HTTP_ERROR_FALLBACK_ERROR_CODE"]};404`; function notFound() { const error = Object.defineProperty(new Error(DIGEST), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.digest = DIGEST; throw error; } //# sourceMappingURL=not-found.js.map }), "[project]/node_modules/next/dist/esm/client/components/forbidden.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "forbidden", ()=>forbidden ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$http$2d$access$2d$fallback$2f$http$2d$access$2d$fallback$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/http-access-fallback/http-access-fallback.js [app-ssr] (ecmascript)"); ; // TODO: Add `forbidden` docs /** * @experimental * This function allows you to render the [forbidden.js file](https://nextjs.org/docs/app/api-reference/file-conventions/forbidden) * within a route segment as well as inject a tag. * * `forbidden()` can be used in * [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components), * [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and * [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations). * * Read more: [Next.js Docs: `forbidden`](https://nextjs.org/docs/app/api-reference/functions/forbidden) */ const DIGEST = `${__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$http$2d$access$2d$fallback$2f$http$2d$access$2d$fallback$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["HTTP_ERROR_FALLBACK_ERROR_CODE"]};403`; function forbidden() { if ("TURBOPACK compile-time truthy", 1) { throw Object.defineProperty(new Error(`\`forbidden()\` is experimental and only allowed to be enabled when \`experimental.authInterrupts\` is enabled.`), "__NEXT_ERROR_CODE", { value: "E488", enumerable: false, configurable: true }); } const error = Object.defineProperty(new Error(DIGEST), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.digest = DIGEST; throw error; } //# sourceMappingURL=forbidden.js.map }), "[project]/node_modules/next/dist/esm/client/components/unauthorized.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "unauthorized", ()=>unauthorized ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$http$2d$access$2d$fallback$2f$http$2d$access$2d$fallback$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/http-access-fallback/http-access-fallback.js [app-ssr] (ecmascript)"); ; // TODO: Add `unauthorized` docs /** * @experimental * This function allows you to render the [unauthorized.js file](https://nextjs.org/docs/app/api-reference/file-conventions/unauthorized) * within a route segment as well as inject a tag. * * `unauthorized()` can be used in * [Server Components](https://nextjs.org/docs/app/building-your-application/rendering/server-components), * [Route Handlers](https://nextjs.org/docs/app/building-your-application/routing/route-handlers), and * [Server Actions](https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions-and-mutations). * * * Read more: [Next.js Docs: `unauthorized`](https://nextjs.org/docs/app/api-reference/functions/unauthorized) */ const DIGEST = `${__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$http$2d$access$2d$fallback$2f$http$2d$access$2d$fallback$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["HTTP_ERROR_FALLBACK_ERROR_CODE"]};401`; function unauthorized() { if ("TURBOPACK compile-time truthy", 1) { throw Object.defineProperty(new Error(`\`unauthorized()\` is experimental and only allowed to be used when \`experimental.authInterrupts\` is enabled.`), "__NEXT_ERROR_CODE", { value: "E411", enumerable: false, configurable: true }); } const error = Object.defineProperty(new Error(DIGEST), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.digest = DIGEST; throw error; } //# sourceMappingURL=unauthorized.js.map }), "[project]/node_modules/next/dist/esm/server/dynamic-rendering-utils.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "isHangingPromiseRejectionError", ()=>isHangingPromiseRejectionError, "makeDevtoolsIOAwarePromise", ()=>makeDevtoolsIOAwarePromise, "makeHangingPromise", ()=>makeHangingPromise ]); function isHangingPromiseRejectionError(err) { if (typeof err !== 'object' || err === null || !('digest' in err)) { return false; } return err.digest === HANGING_PROMISE_REJECTION; } const HANGING_PROMISE_REJECTION = 'HANGING_PROMISE_REJECTION'; class HangingPromiseRejectionError extends Error { constructor(route, expression){ super(`During prerendering, ${expression} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${expression} to a different context by using \`setTimeout\`, \`after\`, or similar functions you may observe this error and you should handle it in that context. This occurred at route "${route}".`), this.route = route, this.expression = expression, this.digest = HANGING_PROMISE_REJECTION; } } const abortListenersBySignal = new WeakMap(); function makeHangingPromise(signal, route, expression) { if (signal.aborted) { return Promise.reject(new HangingPromiseRejectionError(route, expression)); } else { const hangingPromise = new Promise((_, reject)=>{ const boundRejection = reject.bind(null, new HangingPromiseRejectionError(route, expression)); let currentListeners = abortListenersBySignal.get(signal); if (currentListeners) { currentListeners.push(boundRejection); } else { const listeners = [ boundRejection ]; abortListenersBySignal.set(signal, listeners); signal.addEventListener('abort', ()=>{ for(let i = 0; i < listeners.length; i++){ listeners[i](); } }, { once: true }); } }); // We are fine if no one actually awaits this promise. We shouldn't consider this an unhandled rejection so // we attach a noop catch handler here to suppress this warning. If you actually await somewhere or construct // your own promise out of it you'll need to ensure you handle the error when it rejects. hangingPromise.catch(ignoreReject); return hangingPromise; } } function ignoreReject() {} function makeDevtoolsIOAwarePromise(underlying, requestStore, stage) { if (requestStore.stagedRendering) { // We resolve each stage in a timeout, so React DevTools will pick this up as IO. return requestStore.stagedRendering.delayUntilStage(stage, undefined, underlying); } // in React DevTools if we resolve in a setTimeout we will observe // the promise resolution as something that can suspend a boundary or root. return new Promise((resolve)=>{ // Must use setTimeout to be considered IO React DevTools. setImmediate will not work. setTimeout(()=>{ resolve(underlying); }, 0); }); } //# sourceMappingURL=dynamic-rendering-utils.js.map }), "[project]/node_modules/next/dist/esm/server/lib/router-utils/is-postpone.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "isPostpone", ()=>isPostpone ]); const REACT_POSTPONE_TYPE = Symbol.for('react.postpone'); function isPostpone(error) { return typeof error === 'object' && error !== null && error.$$typeof === REACT_POSTPONE_TYPE; } //# sourceMappingURL=is-postpone.js.map }), "[project]/node_modules/next/dist/esm/shared/lib/lazy-dynamic/bailout-to-csr.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; // This has to be a shared module which is shared between client component error boundary and dynamic component __turbopack_context__.s([ "BailoutToCSRError", ()=>BailoutToCSRError, "isBailoutToCSRError", ()=>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 }), "[project]/node_modules/next/dist/esm/client/components/hooks-server-context.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "DynamicServerError", ()=>DynamicServerError, "isDynamicServerError", ()=>isDynamicServerError ]); const DYNAMIC_ERROR_CODE = 'DYNAMIC_SERVER_USAGE'; class DynamicServerError extends Error { constructor(description){ super(`Dynamic server usage: ${description}`), this.description = description, this.digest = DYNAMIC_ERROR_CODE; } } function isDynamicServerError(err) { if (typeof err !== 'object' || err === null || !('digest' in err) || typeof err.digest !== 'string') { return false; } return err.digest === DYNAMIC_ERROR_CODE; } //# sourceMappingURL=hooks-server-context.js.map }), "[project]/node_modules/next/dist/esm/client/components/static-generation-bailout.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "StaticGenBailoutError", ()=>StaticGenBailoutError, "isStaticGenBailoutError", ()=>isStaticGenBailoutError ]); const NEXT_STATIC_GEN_BAILOUT = 'NEXT_STATIC_GEN_BAILOUT'; class StaticGenBailoutError extends Error { constructor(...args){ super(...args), this.code = NEXT_STATIC_GEN_BAILOUT; } } function isStaticGenBailoutError(error) { if (typeof error !== 'object' || error === null || !('code' in error)) { return false; } return error.code === NEXT_STATIC_GEN_BAILOUT; } //# sourceMappingURL=static-generation-bailout.js.map }), "[project]/node_modules/next/dist/esm/lib/framework/boundary-constants.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "METADATA_BOUNDARY_NAME", ()=>METADATA_BOUNDARY_NAME, "OUTLET_BOUNDARY_NAME", ()=>OUTLET_BOUNDARY_NAME, "ROOT_LAYOUT_BOUNDARY_NAME", ()=>ROOT_LAYOUT_BOUNDARY_NAME, "VIEWPORT_BOUNDARY_NAME", ()=>VIEWPORT_BOUNDARY_NAME ]); const METADATA_BOUNDARY_NAME = '__next_metadata_boundary__'; const VIEWPORT_BOUNDARY_NAME = '__next_viewport_boundary__'; const OUTLET_BOUNDARY_NAME = '__next_outlet_boundary__'; const ROOT_LAYOUT_BOUNDARY_NAME = '__next_root_layout_boundary__'; //# sourceMappingURL=boundary-constants.js.map }), "[project]/node_modules/next/dist/esm/lib/scheduler.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; /** * Schedules a function to be called on the next tick after the other promises * have been resolved. * * @param cb the function to schedule */ __turbopack_context__.s([ "atLeastOneTask", ()=>atLeastOneTask, "scheduleImmediate", ()=>scheduleImmediate, "scheduleOnNextTick", ()=>scheduleOnNextTick, "waitAtLeastOneReactRenderTask", ()=>waitAtLeastOneReactRenderTask ]); const scheduleOnNextTick = (cb)=>{ // We use Promise.resolve().then() here so that the operation is scheduled at // the end of the promise job queue, we then add it to the next process tick // to ensure it's evaluated afterwards. // // This was inspired by the implementation of the DataLoader interface: https://github.com/graphql/dataloader/blob/d336bd15282664e0be4b4a657cb796f09bafbc6b/src/index.js#L213-L255 // Promise.resolve().then(()=>{ if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; else { process.nextTick(cb); } }); }; const scheduleImmediate = (cb)=>{ if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; else { setImmediate(cb); } }; function atLeastOneTask() { return new Promise((resolve)=>scheduleImmediate(resolve)); } function waitAtLeastOneReactRenderTask() { if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; else { return new Promise((r)=>setImmediate(r)); } } //# sourceMappingURL=scheduler.js.map }), "[project]/node_modules/next/dist/esm/shared/lib/invariant-error.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "InvariantError", ()=>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 }), "[project]/node_modules/next/dist/esm/shared/lib/promise-with-resolvers.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "createPromiseWithResolvers", ()=>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 }), "[project]/node_modules/next/dist/esm/server/app-render/staged-rendering.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "RenderStage", ()=>RenderStage, "StagedRenderingController", ()=>StagedRenderingController ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/shared/lib/invariant-error.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$promise$2d$with$2d$resolvers$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/shared/lib/promise-with-resolvers.js [app-ssr] (ecmascript)"); ; ; var RenderStage = /*#__PURE__*/ function(RenderStage) { RenderStage[RenderStage["Static"] = 1] = "Static"; RenderStage[RenderStage["Runtime"] = 2] = "Runtime"; RenderStage[RenderStage["Dynamic"] = 3] = "Dynamic"; return RenderStage; }({}); class StagedRenderingController { constructor(abortSignal = null){ this.abortSignal = abortSignal; this.currentStage = 1; this.runtimeStagePromise = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$promise$2d$with$2d$resolvers$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["createPromiseWithResolvers"])(); this.dynamicStagePromise = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$promise$2d$with$2d$resolvers$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["createPromiseWithResolvers"])(); if (abortSignal) { abortSignal.addEventListener('abort', ()=>{ const { reason } = abortSignal; if (this.currentStage < 2) { this.runtimeStagePromise.promise.catch(ignoreReject) // avoid unhandled rejections ; this.runtimeStagePromise.reject(reason); } if (this.currentStage < 3) { this.dynamicStagePromise.promise.catch(ignoreReject) // avoid unhandled rejections ; this.dynamicStagePromise.reject(reason); } }, { once: true }); } } advanceStage(stage) { // If we're already at the target stage or beyond, do nothing. // (this can happen e.g. if sync IO advanced us to the dynamic stage) if (this.currentStage >= stage) { return; } this.currentStage = stage; // Note that we might be going directly from Static to Dynamic, // so we need to resolve the runtime stage as well. if (stage >= 2) { this.runtimeStagePromise.resolve(); } if (stage >= 3) { this.dynamicStagePromise.resolve(); } } getStagePromise(stage) { switch(stage){ case 2: { return this.runtimeStagePromise.promise; } case 3: { return this.dynamicStagePromise.promise; } default: { stage; throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["InvariantError"](`Invalid render stage: ${stage}`), "__NEXT_ERROR_CODE", { value: "E881", enumerable: false, configurable: true }); } } } waitForStage(stage) { return this.getStagePromise(stage); } delayUntilStage(stage, displayName, resolvedValue) { const ioTriggerPromise = this.getStagePromise(stage); const promise = makeDevtoolsIOPromiseFromIOTrigger(ioTriggerPromise, displayName, resolvedValue); // Analogously to `makeHangingPromise`, we might reject this promise if the signal is invoked. // (e.g. in the case where we don't want want the render to proceed to the dynamic stage and abort it). // We shouldn't consider this an unhandled rejection, so we attach a noop catch handler here to suppress this warning. if (this.abortSignal) { promise.catch(ignoreReject); } return promise; } } function ignoreReject() {} // TODO(restart-on-cache-miss): the layering of `delayUntilStage`, // `makeDevtoolsIOPromiseFromIOTrigger` and and `makeDevtoolsIOAwarePromise` // is confusing, we should clean it up. function makeDevtoolsIOPromiseFromIOTrigger(ioTrigger, displayName, resolvedValue) { // If we create a `new Promise` and give it a displayName // (with no userspace code above us in the stack) // React Devtools will use it as the IO cause when determining "suspended by". // In particular, it should shadow any inner IO that resolved/rejected the promise // (in case of staged rendering, this will be the `setTimeout` that triggers the relevant stage) const promise = new Promise((resolve, reject)=>{ ioTrigger.then(resolve.bind(null, resolvedValue), reject); }); if (displayName !== undefined) { // @ts-expect-error promise.displayName = displayName; } return promise; } //# sourceMappingURL=staged-rendering.js.map }), "[project]/node_modules/next/dist/esm/server/app-render/dynamic-rendering.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; /** * The functions provided by this module are used to communicate certain properties * about the currently running code so that Next.js can make decisions on how to handle * the current execution in different rendering modes such as pre-rendering, resuming, and SSR. * * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering. * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of * Dynamic indications. * * The first is simply an intention to be dynamic. unstable_noStore is an example of this where * the currently executing code simply declares that the current scope is dynamic but if you use it * inside unstable_cache it can still be cached. This type of indication can be removed if we ever * make the default dynamic to begin with because the only way you would ever be static is inside * a cache scope which this indication does not affect. * * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic * because it means that it is inappropriate to cache this at all. using a dynamic data source inside * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should * read that data outside the cache and pass it in as an argument to the cached function. */ // Once postpone is in stable we should switch to importing the postpone export directly __turbopack_context__.s([ "Postpone", ()=>Postpone, "PreludeState", ()=>PreludeState, "abortAndThrowOnSynchronousRequestDataAccess", ()=>abortAndThrowOnSynchronousRequestDataAccess, "abortOnSynchronousPlatformIOAccess", ()=>abortOnSynchronousPlatformIOAccess, "accessedDynamicData", ()=>accessedDynamicData, "annotateDynamicAccess", ()=>annotateDynamicAccess, "consumeDynamicAccess", ()=>consumeDynamicAccess, "createDynamicTrackingState", ()=>createDynamicTrackingState, "createDynamicValidationState", ()=>createDynamicValidationState, "createHangingInputAbortSignal", ()=>createHangingInputAbortSignal, "createRenderInBrowserAbortSignal", ()=>createRenderInBrowserAbortSignal, "delayUntilRuntimeStage", ()=>delayUntilRuntimeStage, "formatDynamicAPIAccesses", ()=>formatDynamicAPIAccesses, "getFirstDynamicReason", ()=>getFirstDynamicReason, "isDynamicPostpone", ()=>isDynamicPostpone, "isPrerenderInterruptedError", ()=>isPrerenderInterruptedError, "logDisallowedDynamicError", ()=>logDisallowedDynamicError, "markCurrentScopeAsDynamic", ()=>markCurrentScopeAsDynamic, "postponeWithTracking", ()=>postponeWithTracking, "throwIfDisallowedDynamic", ()=>throwIfDisallowedDynamic, "throwToInterruptStaticGeneration", ()=>throwToInterruptStaticGeneration, "trackAllowedDynamicAccess", ()=>trackAllowedDynamicAccess, "trackDynamicDataInDynamicRender", ()=>trackDynamicDataInDynamicRender, "trackSynchronousPlatformIOAccessInDev", ()=>trackSynchronousPlatformIOAccessInDev, "useDynamicRouteParams", ()=>useDynamicRouteParams, "useDynamicSearchParams", ()=>useDynamicSearchParams ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$hooks$2d$server$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/hooks-server-context.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$static$2d$generation$2d$bailout$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/static-generation-bailout.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$externals$5d2f$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js__$5b$external$5d$__$28$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js$2c$__cjs$29$__ = __turbopack_context__.i("[externals]/next/dist/server/app-render/work-unit-async-storage.external.js [external] (next/dist/server/app-render/work-unit-async-storage.external.js, cjs)"); var __TURBOPACK__imported__module__$5b$externals$5d2f$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2e$external$2e$js__$5b$external$5d$__$28$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2e$external$2e$js$2c$__cjs$29$__ = __turbopack_context__.i("[externals]/next/dist/server/app-render/work-async-storage.external.js [external] (next/dist/server/app-render/work-async-storage.external.js, cjs)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$dynamic$2d$rendering$2d$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/server/dynamic-rendering-utils.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$framework$2f$boundary$2d$constants$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/lib/framework/boundary-constants.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$scheduler$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/lib/scheduler.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$lazy$2d$dynamic$2f$bailout$2d$to$2d$csr$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/shared/lib/lazy-dynamic/bailout-to-csr.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/shared/lib/invariant-error.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$staged$2d$rendering$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/server/app-render/staged-rendering.js [app-ssr] (ecmascript)"); ; ; ; ; ; ; ; ; ; ; ; const hasPostpone = typeof __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"].unstable_postpone === 'function'; function createDynamicTrackingState(isDebugDynamicAccesses) { return { isDebugDynamicAccesses, dynamicAccesses: [], syncDynamicErrorWithStack: null }; } function createDynamicValidationState() { return { hasSuspenseAboveBody: false, hasDynamicMetadata: false, hasDynamicViewport: false, hasAllowedDynamic: false, dynamicErrors: [] }; } function getFirstDynamicReason(trackingState) { var _trackingState_dynamicAccesses_; return (_trackingState_dynamicAccesses_ = trackingState.dynamicAccesses[0]) == null ? void 0 : _trackingState_dynamicAccesses_.expression; } function markCurrentScopeAsDynamic(store, workUnitStore, expression) { if (workUnitStore) { switch(workUnitStore.type){ case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return; case 'private-cache': // A private cache scope is already dynamic by definition. return; case 'prerender-legacy': case 'prerender-ppr': case 'request': break; default: workUnitStore; } } // If we're forcing dynamic rendering or we're forcing static rendering, we // don't need to do anything here because the entire page is already dynamic // or it's static and it should not throw or postpone here. if (store.forceDynamic || store.forceStatic) return; if (store.dynamicShouldError) { throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$static$2d$generation$2d$bailout$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["StaticGenBailoutError"](`Route ${store.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E553", enumerable: false, configurable: true }); } if (workUnitStore) { switch(workUnitStore.type){ case 'prerender-ppr': return postponeWithTracking(store.route, expression, workUnitStore.dynamicTracking); case 'prerender-legacy': workUnitStore.revalidate = 0; // We aren't prerendering, but we are generating a static page. We need // to bail out of static generation. const err = Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$hooks$2d$server$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["DynamicServerError"](`Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { value: "E550", enumerable: false, configurable: true }); store.dynamicUsageDescription = expression; store.dynamicUsageStack = err.stack; throw err; case 'request': if ("TURBOPACK compile-time truthy", 1) { workUnitStore.usedDynamic = true; } break; default: workUnitStore; } } } function throwToInterruptStaticGeneration(expression, store, prerenderStore) { // We aren't prerendering but we are generating a static page. We need to bail out of static generation const err = Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$hooks$2d$server$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["DynamicServerError"](`Route ${store.route} couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", { value: "E558", enumerable: false, configurable: true }); prerenderStore.revalidate = 0; store.dynamicUsageDescription = expression; store.dynamicUsageStack = err.stack; throw err; } function trackDynamicDataInDynamicRender(workUnitStore) { switch(workUnitStore.type){ case 'cache': case 'unstable-cache': // Inside cache scopes, marking a scope as dynamic has no effect, // because the outer cache scope creates a cache boundary. This is // subtly different from reading a dynamic data source, which is // forbidden inside a cache scope. return; case 'private-cache': // A private cache scope is already dynamic by definition. return; case 'prerender': case 'prerender-runtime': case 'prerender-legacy': case 'prerender-ppr': case 'prerender-client': break; case 'request': if ("TURBOPACK compile-time truthy", 1) { workUnitStore.usedDynamic = true; } break; default: workUnitStore; } } function abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) { const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`; const error = createPrerenderInterruptedError(reason); prerenderStore.controller.abort(error); const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } } function abortOnSynchronousPlatformIOAccess(route, expression, errorWithStack, prerenderStore) { const dynamicTracking = prerenderStore.dynamicTracking; abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack; } } } function trackSynchronousPlatformIOAccessInDev(requestStore) { // We don't actually have a controller to abort but we do the semantic equivalent by // advancing the request store out of the prerender stage if (requestStore.stagedRendering) { // TODO: error for sync IO in the runtime stage // (which is not currently covered by the validation render in `spawnDynamicValidationInDev`) requestStore.stagedRendering.advanceStage(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$staged$2d$rendering$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["RenderStage"].Dynamic); } } function abortAndThrowOnSynchronousRequestDataAccess(route, expression, errorWithStack, prerenderStore) { const prerenderSignal = prerenderStore.controller.signal; if (prerenderSignal.aborted === false) { // TODO it would be better to move this aborted check into the callsite so we can avoid making // the error object when it isn't relevant to the aborting of the prerender however // since we need the throw semantics regardless of whether we abort it is easier to land // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer // to ideal implementation abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore); // It is important that we set this tracking value after aborting. Aborts are executed // synchronously except for the case where you abort during render itself. By setting this // value late we can use it to determine if any of the aborted tasks are the task that // called the sync IO expression in the first place. const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { if (dynamicTracking.syncDynamicErrorWithStack === null) { dynamicTracking.syncDynamicErrorWithStack = errorWithStack; } } } throw createPrerenderInterruptedError(`Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`); } function Postpone({ reason, route }) { const prerenderStore = __TURBOPACK__imported__module__$5b$externals$5d2f$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js__$5b$external$5d$__$28$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js$2c$__cjs$29$__["workUnitAsyncStorage"].getStore(); const dynamicTracking = prerenderStore && prerenderStore.type === 'prerender-ppr' ? prerenderStore.dynamicTracking : null; postponeWithTracking(route, reason, dynamicTracking); } function postponeWithTracking(route, expression, dynamicTracking) { assertPostpone(); if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ // When we aren't debugging, we don't need to create another error for the // stack trace. stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"].unstable_postpone(createPostponeReason(route, expression)); } function createPostponeReason(route, expression) { return `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` + `React throws this special object to indicate where. It should not be caught by ` + `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`; } function isDynamicPostpone(err) { if (typeof err === 'object' && err !== null && typeof err.message === 'string') { return isDynamicPostponeReason(err.message); } return false; } function isDynamicPostponeReason(reason) { return reason.includes('needs to bail out of prerendering at this point because it used') && reason.includes('Learn more: https://nextjs.org/docs/messages/ppr-caught-error'); } if (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) { throw Object.defineProperty(new Error('Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'), "__NEXT_ERROR_CODE", { value: "E296", enumerable: false, configurable: true }); } const NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED'; function createPrerenderInterruptedError(message) { const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.digest = NEXT_PRERENDER_INTERRUPTED; return error; } function isPrerenderInterruptedError(error) { return typeof error === 'object' && error !== null && error.digest === NEXT_PRERENDER_INTERRUPTED && 'name' in error && 'message' in error && error instanceof Error; } function accessedDynamicData(dynamicAccesses) { return dynamicAccesses.length > 0; } function consumeDynamicAccess(serverDynamic, clientDynamic) { // We mutate because we only call this once we are no longer writing // to the dynamicTrackingState and it's more efficient than creating a new // array. serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses); return serverDynamic.dynamicAccesses; } function formatDynamicAPIAccesses(dynamicAccesses) { return dynamicAccesses.filter((access)=>typeof access.stack === 'string' && access.stack.length > 0).map(({ expression, stack })=>{ stack = stack.split('\n') // Remove the "Error: " prefix from the first line of the stack trace as // well as the first 4 lines of the stack trace which is the distance // from the user code and the `new Error().stack` call. .slice(4).filter((line)=>{ // Exclude Next.js internals from the stack trace. if (line.includes('node_modules/next/')) { return false; } // Exclude anonymous functions from the stack trace. if (line.includes(' (<anonymous>)')) { return false; } // Exclude Node.js internals from the stack trace. if (line.includes(' (node:')) { return false; } return true; }).join('\n'); return `Dynamic API Usage Debug - ${expression}:\n${stack}`; }); } function assertPostpone() { if (!hasPostpone) { throw Object.defineProperty(new Error(`Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`), "__NEXT_ERROR_CODE", { value: "E224", enumerable: false, configurable: true }); } } function createRenderInBrowserAbortSignal() { const controller = new AbortController(); controller.abort(Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$lazy$2d$dynamic$2f$bailout$2d$to$2d$csr$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["BailoutToCSRError"]('Render in Browser'), "__NEXT_ERROR_CODE", { value: "E721", enumerable: false, configurable: true })); return controller.signal; } function createHangingInputAbortSignal(workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-runtime': const controller = new AbortController(); if (workUnitStore.cacheSignal) { // If we have a cacheSignal it means we're in a prospective render. If // the input we're waiting on is coming from another cache, we do want // to wait for it so that we can resolve this cache entry too. workUnitStore.cacheSignal.inputReady().then(()=>{ controller.abort(); }); } else { // Otherwise we're in the final render and we should already have all // our caches filled. // If the prerender uses stages, we have wait until the runtime stage, // at which point all runtime inputs will be resolved. // (otherwise, a runtime prerender might consider `cookies()` hanging // even though they'd resolve in the next task.) // // We might still be waiting on some microtasks so we // wait one tick before giving up. When we give up, we still want to // render the content of this cache as deeply as we can so that we can // suspend as deeply as possible in the tree or not at all if we don't // end up waiting for the input. const runtimeStagePromise = (0, __TURBOPACK__imported__module__$5b$externals$5d2f$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js__$5b$external$5d$__$28$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js$2c$__cjs$29$__["getRuntimeStagePromise"])(workUnitStore); if (runtimeStagePromise) { runtimeStagePromise.then(()=>(0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$scheduler$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["scheduleOnNextTick"])(()=>controller.abort())); } else { (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$scheduler$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["scheduleOnNextTick"])(()=>controller.abort()); } } return controller.signal; case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': case 'request': case 'cache': case 'private-cache': case 'unstable-cache': return undefined; default: workUnitStore; } } function annotateDynamicAccess(expression, prerenderStore) { const dynamicTracking = prerenderStore.dynamicTracking; if (dynamicTracking) { dynamicTracking.dynamicAccesses.push({ stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined, expression }); } } function useDynamicRouteParams(expression) { const workStore = __TURBOPACK__imported__module__$5b$externals$5d2f$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2e$external$2e$js__$5b$external$5d$__$28$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2e$external$2e$js$2c$__cjs$29$__["workAsyncStorage"].getStore(); const workUnitStore = __TURBOPACK__imported__module__$5b$externals$5d2f$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js__$5b$external$5d$__$28$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js$2c$__cjs$29$__["workUnitAsyncStorage"].getStore(); if (workStore && workUnitStore) { switch(workUnitStore.type){ case 'prerender-client': case 'prerender': { const fallbackParams = workUnitStore.fallbackRouteParams; if (fallbackParams && fallbackParams.size > 0) { // We are in a prerender with cacheComponents semantics. We are going to // hang here and never resolve. This will cause the currently // rendering component to effectively be a dynamic hole. __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"].use((0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$dynamic$2d$rendering$2d$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["makeHangingPromise"])(workUnitStore.renderSignal, workStore.route, expression)); } break; } case 'prerender-ppr': { const fallbackParams = workUnitStore.fallbackRouteParams; if (fallbackParams && fallbackParams.size > 0) { return postponeWithTracking(workStore.route, expression, workUnitStore.dynamicTracking); } break; } case 'prerender-runtime': throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["InvariantError"](`\`${expression}\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E771", enumerable: false, configurable: true }); case 'cache': case 'private-cache': throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["InvariantError"](`\`${expression}\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E745", enumerable: false, configurable: true }); case 'prerender-legacy': case 'request': case 'unstable-cache': break; default: workUnitStore; } } } function useDynamicSearchParams(expression) { const workStore = __TURBOPACK__imported__module__$5b$externals$5d2f$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2e$external$2e$js__$5b$external$5d$__$28$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2e$external$2e$js$2c$__cjs$29$__["workAsyncStorage"].getStore(); const workUnitStore = __TURBOPACK__imported__module__$5b$externals$5d2f$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js__$5b$external$5d$__$28$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js$2c$__cjs$29$__["workUnitAsyncStorage"].getStore(); if (!workStore) { // We assume pages router context and just return return; } if (!workUnitStore) { (0, __TURBOPACK__imported__module__$5b$externals$5d2f$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js__$5b$external$5d$__$28$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js$2c$__cjs$29$__["throwForMissingRequestStore"])(expression); } switch(workUnitStore.type){ case 'prerender-client': { __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"].use((0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$dynamic$2d$rendering$2d$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["makeHangingPromise"])(workUnitStore.renderSignal, workStore.route, expression)); break; } case 'prerender-legacy': case 'prerender-ppr': { if (workStore.forceStatic) { return; } throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$lazy$2d$dynamic$2f$bailout$2d$to$2d$csr$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["BailoutToCSRError"](expression), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } case 'prerender': case 'prerender-runtime': throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["InvariantError"](`\`${expression}\` was called from a Server Component. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E795", enumerable: false, configurable: true }); case 'cache': case 'unstable-cache': case 'private-cache': throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["InvariantError"](`\`${expression}\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", { value: "E745", enumerable: false, configurable: true }); case 'request': return; default: workUnitStore; } } const hasSuspenseRegex = /\n\s+at Suspense \(<anonymous>\)/; // Common implicit body tags that React will treat as body when placed directly in html const bodyAndImplicitTags = 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6'; // Detects when RootLayoutBoundary (our framework marker component) appears // after Suspense in the component stack, indicating the root layout is wrapped // within a Suspense boundary. Ensures no body/html/implicit-body components are in between. // // Example matches: // at Suspense (<anonymous>) // at __next_root_layout_boundary__ (<anonymous>) // // Or with other components in between (but not body/html/implicit-body): // at Suspense (<anonymous>) // at SomeComponent (<anonymous>) // at __next_root_layout_boundary__ (<anonymous>) const hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(`\\n\\s+at Suspense \\(<anonymous>\\)(?:(?!\\n\\s+at (?:${bodyAndImplicitTags}) \\(<anonymous>\\))[\\s\\S])*?\\n\\s+at ${__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$framework$2f$boundary$2d$constants$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["ROOT_LAYOUT_BOUNDARY_NAME"]} \\([^\\n]*\\)`); const hasMetadataRegex = new RegExp(`\\n\\s+at ${__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$framework$2f$boundary$2d$constants$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["METADATA_BOUNDARY_NAME"]}[\\n\\s]`); const hasViewportRegex = new RegExp(`\\n\\s+at ${__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$framework$2f$boundary$2d$constants$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["VIEWPORT_BOUNDARY_NAME"]}[\\n\\s]`); const hasOutletRegex = new RegExp(`\\n\\s+at ${__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$framework$2f$boundary$2d$constants$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["OUTLET_BOUNDARY_NAME"]}[\\n\\s]`); function trackAllowedDynamicAccess(workStore, componentStack, dynamicValidation, clientDynamic) { if (hasOutletRegex.test(componentStack)) { // We don't need to track that this is dynamic. It is only so when something else is also dynamic. return; } else if (hasMetadataRegex.test(componentStack)) { dynamicValidation.hasDynamicMetadata = true; return; } else if (hasViewportRegex.test(componentStack)) { dynamicValidation.hasDynamicViewport = true; return; } else if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) { // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule. // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering. dynamicValidation.hasAllowedDynamic = true; dynamicValidation.hasSuspenseAboveBody = true; return; } else if (hasSuspenseRegex.test(componentStack)) { // this error had a Suspense boundary above it so we don't need to report it as a source // of disallowed dynamicValidation.hasAllowedDynamic = true; return; } else if (clientDynamic.syncDynamicErrorWithStack) { // This task was the task that called the sync error. dynamicValidation.dynamicErrors.push(clientDynamic.syncDynamicErrorWithStack); return; } else { const message = `Route "${workStore.route}": Uncached data was accessed outside of ` + '<Suspense>. This delays the entire page from rendering, resulting in a ' + 'slow user experience. Learn more: ' + 'https://nextjs.org/docs/messages/blocking-route'; const error = createErrorWithComponentOrOwnerStack(message, componentStack); dynamicValidation.dynamicErrors.push(error); return; } } /** * In dev mode, we prefer using the owner stack, otherwise the provided * component stack is used. */ function createErrorWithComponentOrOwnerStack(message, componentStack) { const ownerStack = ("TURBOPACK compile-time value", "development") !== 'production' && __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"].captureOwnerStack ? __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"].captureOwnerStack() : null; const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); error.stack = error.name + ': ' + message + (ownerStack ?? componentStack); return error; } var PreludeState = /*#__PURE__*/ function(PreludeState) { PreludeState[PreludeState["Full"] = 0] = "Full"; PreludeState[PreludeState["Empty"] = 1] = "Empty"; PreludeState[PreludeState["Errored"] = 2] = "Errored"; return PreludeState; }({}); function logDisallowedDynamicError(workStore, error) { console.error(error); if (!workStore.dev) { if (workStore.hasReadableErrorStacks) { console.error(`To get a more detailed stack trace and pinpoint the issue, start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error.`); } else { console.error(`To get a more detailed stack trace and pinpoint the issue, try one of the following: - Start the app in development mode by running \`next dev\`, then open "${workStore.route}" in your browser to investigate the error. - Rerun the production build with \`next build --debug-prerender\` to generate better stack traces.`); } } } function throwIfDisallowedDynamic(workStore, prelude, dynamicValidation, serverDynamic) { if (serverDynamic.syncDynamicErrorWithStack) { logDisallowedDynamicError(workStore, serverDynamic.syncDynamicErrorWithStack); throw new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$static$2d$generation$2d$bailout$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["StaticGenBailoutError"](); } if (prelude !== 0) { if (dynamicValidation.hasSuspenseAboveBody) { // This route has opted into allowing fully dynamic rendering // by including a Suspense boundary above the body. In this case // a lack of a shell is not considered disallowed so we simply return return; } // We didn't have any sync bailouts but there may be user code which // blocked the root. We would have captured these during the prerender // and can log them here and then terminate the build/validating render const dynamicErrors = dynamicValidation.dynamicErrors; if (dynamicErrors.length > 0) { for(let i = 0; i < dynamicErrors.length; i++){ logDisallowedDynamicError(workStore, dynamicErrors[i]); } throw new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$static$2d$generation$2d$bailout$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["StaticGenBailoutError"](); } // If we got this far then the only other thing that could be blocking // the root is dynamic Viewport. If this is dynamic then // you need to opt into that by adding a Suspense boundary above the body // to indicate your are ok with fully dynamic rendering. if (dynamicValidation.hasDynamicViewport) { console.error(`Route "${workStore.route}" has a \`generateViewport\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) without explicitly allowing fully dynamic rendering. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-viewport`); throw new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$static$2d$generation$2d$bailout$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["StaticGenBailoutError"](); } if (prelude === 1) { // If we ever get this far then we messed up the tracking of invalid dynamic. // We still adhere to the constraint that you must produce a shell but invite the // user to report this as a bug in Next.js. console.error(`Route "${workStore.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`); throw new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$static$2d$generation$2d$bailout$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["StaticGenBailoutError"](); } } else { if (dynamicValidation.hasAllowedDynamic === false && dynamicValidation.hasDynamicMetadata) { console.error(`Route "${workStore.route}" has a \`generateMetadata\` that depends on Request data (\`cookies()\`, etc...) or uncached external data (\`fetch(...)\`, etc...) when the rest of the route does not. See more info here: https://nextjs.org/docs/messages/next-prerender-dynamic-metadata`); throw new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$static$2d$generation$2d$bailout$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["StaticGenBailoutError"](); } } } function delayUntilRuntimeStage(prerenderStore, result) { if (prerenderStore.runtimeStagePromise) { return prerenderStore.runtimeStagePromise.then(()=>result); } return result; } //# sourceMappingURL=dynamic-rendering.js.map }), "[project]/node_modules/next/dist/esm/client/components/unstable-rethrow.server.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "unstable_rethrow", ()=>unstable_rethrow ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$dynamic$2d$rendering$2d$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/server/dynamic-rendering-utils.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$router$2d$utils$2f$is$2d$postpone$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/server/lib/router-utils/is-postpone.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$lazy$2d$dynamic$2f$bailout$2d$to$2d$csr$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/shared/lib/lazy-dynamic/bailout-to-csr.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$is$2d$next$2d$router$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/is-next-router-error.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$dynamic$2d$rendering$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/server/app-render/dynamic-rendering.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$hooks$2d$server$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/hooks-server-context.js [app-ssr] (ecmascript)"); ; ; ; ; ; ; function unstable_rethrow(error) { if ((0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$is$2d$next$2d$router$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["isNextRouterError"])(error) || (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$lazy$2d$dynamic$2f$bailout$2d$to$2d$csr$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["isBailoutToCSRError"])(error) || (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$hooks$2d$server$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["isDynamicServerError"])(error) || (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$dynamic$2d$rendering$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["isDynamicPostpone"])(error) || (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$lib$2f$router$2d$utils$2f$is$2d$postpone$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["isPostpone"])(error) || (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$dynamic$2d$rendering$2d$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["isHangingPromiseRejectionError"])(error) || (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$dynamic$2d$rendering$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["isPrerenderInterruptedError"])(error)) { throw error; } if (error instanceof Error && 'cause' in error) { unstable_rethrow(error.cause); } } //# sourceMappingURL=unstable-rethrow.server.js.map }), "[project]/node_modules/next/dist/esm/client/components/unstable-rethrow.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; /** * This function should be used to rethrow internal Next.js errors so that they can be handled by the framework. * When wrapping an API that uses errors to interrupt control flow, you should use this function before you do any error handling. * This function will rethrow the error if it is a Next.js error so it can be handled, otherwise it will do nothing. * * Read more: [Next.js Docs: `unstable_rethrow`](https://nextjs.org/docs/app/api-reference/functions/unstable_rethrow) */ __turbopack_context__.s([ "unstable_rethrow", ()=>unstable_rethrow ]); const unstable_rethrow = ("TURBOPACK compile-time truthy", 1) ? __turbopack_context__.r("[project]/node_modules/next/dist/esm/client/components/unstable-rethrow.server.js [app-ssr] (ecmascript)").unstable_rethrow : "TURBOPACK unreachable"; //# sourceMappingURL=unstable-rethrow.js.map }), "[project]/node_modules/next/dist/esm/client/components/navigation.react-server.js [app-ssr] (ecmascript) <locals>", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "unstable_isUnrecognizedActionError", ()=>unstable_isUnrecognizedActionError ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$readonly$2d$url$2d$search$2d$params$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/readonly-url-search-params.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$redirect$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/redirect.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$redirect$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/redirect-error.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$not$2d$found$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/not-found.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$forbidden$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/forbidden.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$unauthorized$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/unauthorized.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$unstable$2d$rethrow$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/unstable-rethrow.js [app-ssr] (ecmascript)"); ; function unstable_isUnrecognizedActionError() { throw Object.defineProperty(new Error('`unstable_isUnrecognizedActionError` can only be used on the client.'), "__NEXT_ERROR_CODE", { value: "E776", enumerable: false, configurable: true }); } ; ; ; ; ; ; ; //# sourceMappingURL=navigation.react-server.js.map }), "[project]/node_modules/next/dist/esm/client/components/navigation.js [app-ssr] (ecmascript) <locals>", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "useParams", ()=>useParams, "usePathname", ()=>usePathname, "useRouter", ()=>useRouter, "useSearchParams", ()=>useSearchParams, "useSelectedLayoutSegment", ()=>useSelectedLayoutSegment, "useSelectedLayoutSegments", ()=>useSelectedLayoutSegments ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$app$2d$router$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/app-router-context.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$hooks$2d$client$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/hooks-client-context.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$segment$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/shared/lib/segment.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$readonly$2d$url$2d$search$2d$params$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/readonly-url-search-params.js [app-ssr] (ecmascript)"); // Client components API var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$server$2d$inserted$2d$html$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/server-inserted-html.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$unrecognized$2d$action$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/unrecognized-action-error.js [app-ssr] (ecmascript)"); // Shared components APIs var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$navigation$2e$react$2d$server$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__$3c$locals$3e$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/navigation.react-server.js [app-ssr] (ecmascript) <locals>"); //# sourceMappingURL=navigation.js.map ; ; ; ; ; const useDynamicRouteParams = ("TURBOPACK compile-time truthy", 1) ? __turbopack_context__.r("[project]/node_modules/next/dist/esm/server/app-render/dynamic-rendering.js [app-ssr] (ecmascript)").useDynamicRouteParams : "TURBOPACK unreachable"; const useDynamicSearchParams = ("TURBOPACK compile-time truthy", 1) ? __turbopack_context__.r("[project]/node_modules/next/dist/esm/server/app-render/dynamic-rendering.js [app-ssr] (ecmascript)").useDynamicSearchParams : "TURBOPACK unreachable"; function useSearchParams() { useDynamicSearchParams?.('useSearchParams()'); const searchParams = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useContext"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$hooks$2d$client$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["SearchParamsContext"]); // In the case where this is `null`, the compat types added in // `next-env.d.ts` will add a new overload that changes the return type to // include `null`. const readonlySearchParams = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useMemo"])(()=>{ if (!searchParams) { // When the router is not ready in pages, we won't have the search params // available. return null; } return new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$readonly$2d$url$2d$search$2d$params$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["ReadonlyURLSearchParams"](searchParams); }, [ searchParams ]); // Instrument with Suspense DevTools (dev-only) if (("TURBOPACK compile-time value", "development") !== 'production' && 'use' in __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"]) { const navigationPromises = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["use"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$hooks$2d$client$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["NavigationPromisesContext"]); if (navigationPromises) { return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["use"])(navigationPromises.searchParams); } } return readonlySearchParams; } function usePathname() { useDynamicRouteParams?.('usePathname()'); // In the case where this is `null`, the compat types added in `next-env.d.ts` // will add a new overload that changes the return type to include `null`. const pathname = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useContext"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$hooks$2d$client$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["PathnameContext"]); // Instrument with Suspense DevTools (dev-only) if (("TURBOPACK compile-time value", "development") !== 'production' && 'use' in __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"]) { const navigationPromises = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["use"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$hooks$2d$client$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["NavigationPromisesContext"]); if (navigationPromises) { return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["use"])(navigationPromises.pathname); } } return pathname; } ; function useRouter() { const router = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useContext"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$app$2d$router$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["AppRouterContext"]); if (router === null) { throw Object.defineProperty(new Error('invariant expected app router to be mounted'), "__NEXT_ERROR_CODE", { value: "E238", enumerable: false, configurable: true }); } return router; } function useParams() { useDynamicRouteParams?.('useParams()'); const params = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useContext"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$hooks$2d$client$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["PathParamsContext"]); // Instrument with Suspense DevTools (dev-only) if (("TURBOPACK compile-time value", "development") !== 'production' && 'use' in __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"]) { const navigationPromises = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["use"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$hooks$2d$client$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["NavigationPromisesContext"]); if (navigationPromises) { return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["use"])(navigationPromises.params); } } return params; } function useSelectedLayoutSegments(parallelRouteKey = 'children') { useDynamicRouteParams?.('useSelectedLayoutSegments()'); const context = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useContext"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$app$2d$router$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["LayoutRouterContext"]); // @ts-expect-error This only happens in `pages`. Type is overwritten in navigation.d.ts if (!context) return null; // Instrument with Suspense DevTools (dev-only) if (("TURBOPACK compile-time value", "development") !== 'production' && 'use' in __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"]) { const navigationPromises = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["use"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$hooks$2d$client$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["NavigationPromisesContext"]); if (navigationPromises) { const promise = navigationPromises.selectedLayoutSegmentsPromises?.get(parallelRouteKey); if (promise) { // We should always have a promise here, but if we don't, it's not worth erroring over. // We just won't be able to instrument it, but can still provide the value. return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["use"])(promise); } } } return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$segment$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["getSelectedLayoutSegmentPath"])(context.parentTree, parallelRouteKey); } function useSelectedLayoutSegment(parallelRouteKey = 'children') { useDynamicRouteParams?.('useSelectedLayoutSegment()'); const navigationPromises = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useContext"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$hooks$2d$client$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["NavigationPromisesContext"]); const selectedLayoutSegments = useSelectedLayoutSegments(parallelRouteKey); // Instrument with Suspense DevTools (dev-only) if (("TURBOPACK compile-time value", "development") !== 'production' && navigationPromises && 'use' in __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"]) { const promise = navigationPromises.selectedLayoutSegmentPromises?.get(parallelRouteKey); if (promise) { // We should always have a promise here, but if we don't, it's not worth erroring over. // We just won't be able to instrument it, but can still provide the value. return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["use"])(promise); } } return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$segment$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["computeSelectedLayoutSegment"])(selectedLayoutSegments, parallelRouteKey); } ; ; }), "[project]/node_modules/next/dist/esm/client/components/redirect-boundary.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "RedirectBoundary", ()=>RedirectBoundary, "RedirectErrorBoundary", ()=>RedirectErrorBoundary ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$navigation$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__$3c$locals$3e$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/navigation.js [app-ssr] (ecmascript) <locals>"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$redirect$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/redirect.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$redirect$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/redirect-error.js [app-ssr] (ecmascript)"); 'use client'; ; ; ; ; ; function HandleRedirect({ redirect, reset, redirectType }) { const router = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$navigation$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__$3c$locals$3e$__["useRouter"])(); (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useEffect"])(()=>{ __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"].startTransition(()=>{ if (redirectType === __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$redirect$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["RedirectType"].push) { router.push(redirect, {}); } else { router.replace(redirect, {}); } reset(); }); }, [ redirect, redirectType, reset, router ]); return null; } class RedirectErrorBoundary extends __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"].Component { constructor(props){ super(props); this.state = { redirect: null, redirectType: null }; } static getDerivedStateFromError(error) { if ((0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$redirect$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["isRedirectError"])(error)) { const url = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$redirect$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["getURLFromRedirectError"])(error); const redirectType = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$redirect$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["getRedirectTypeFromError"])(error); if ('handled' in error) { // The redirect was already handled. We'll still catch the redirect error // so that we can remount the subtree, but we don't actually need to trigger the // router.push. return { redirect: null, redirectType: null }; } return { redirect: url, redirectType }; } // Re-throw if error is not for redirect throw error; } // Explicit type is needed to avoid the generated `.d.ts` having a wide return type that could be specific to the `@types/react` version. render() { const { redirect, redirectType } = this.state; if (redirect !== null && redirectType !== null) { return /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])(HandleRedirect, { redirect: redirect, redirectType: redirectType, reset: ()=>this.setState({ redirect: null }) }); } return this.props.children; } } function RedirectBoundary({ children }) { const router = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$navigation$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__$3c$locals$3e$__["useRouter"])(); return /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])(RedirectErrorBoundary, { router: router, children: children }); } //# sourceMappingURL=redirect-boundary.js.map }), "[project]/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "HTTPAccessFallbackBoundary", ()=>HTTPAccessFallbackBoundary ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js [app-ssr] (ecmascript)"); /** * HTTPAccessFallbackBoundary is a boundary that catches errors and renders a * fallback component for HTTP errors. * * It receives the status code, and determine if it should render fallbacks for few HTTP 4xx errors. * * e.g. 404 * 404 represents not found, and the fallback component pair contains the component and its styles. * */ var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$navigation$2d$untracked$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/navigation-untracked.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$http$2d$access$2d$fallback$2f$http$2d$access$2d$fallback$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/http-access-fallback/http-access-fallback.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$utils$2f$warn$2d$once$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/shared/lib/utils/warn-once.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$app$2d$router$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/app-router-context.js [app-ssr] (ecmascript)"); 'use client'; ; ; ; ; ; ; class HTTPAccessFallbackErrorBoundary extends __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"].Component { constructor(props){ super(props); this.state = { triggeredStatus: undefined, previousPathname: props.pathname }; } componentDidCatch() { if (("TURBOPACK compile-time value", "development") === 'development' && this.props.missingSlots && this.props.missingSlots.size > 0 && // A missing children slot is the typical not-found case, so no need to warn !this.props.missingSlots.has('children')) { let warningMessage = 'No default component was found for a parallel route rendered on this page. Falling back to nearest NotFound boundary.\n' + 'Learn more: https://nextjs.org/docs/app/building-your-application/routing/parallel-routes#defaultjs\n\n'; const formattedSlots = Array.from(this.props.missingSlots).sort((a, b)=>a.localeCompare(b)).map((slot)=>`@${slot}`).join(', '); warningMessage += 'Missing slots: ' + formattedSlots; (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$utils$2f$warn$2d$once$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["warnOnce"])(warningMessage); } } static getDerivedStateFromError(error) { if ((0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$http$2d$access$2d$fallback$2f$http$2d$access$2d$fallback$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["isHTTPAccessFallbackError"])(error)) { const httpStatus = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$http$2d$access$2d$fallback$2f$http$2d$access$2d$fallback$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["getAccessFallbackHTTPStatus"])(error); return { triggeredStatus: httpStatus }; } // Re-throw if error is not for 404 throw error; } static getDerivedStateFromProps(props, state) { /** * Handles reset of the error boundary when a navigation happens. * Ensures the error boundary does not stay enabled when navigating to a new page. * Approach of setState in render is safe as it checks the previous pathname and then overrides * it as outlined in https://react.dev/reference/react/useState#storing-information-from-previous-renders */ if (props.pathname !== state.previousPathname && state.triggeredStatus) { return { triggeredStatus: undefined, previousPathname: props.pathname }; } return { triggeredStatus: state.triggeredStatus, previousPathname: props.pathname }; } render() { const { notFound, forbidden, unauthorized, children } = this.props; const { triggeredStatus } = this.state; const errorComponents = { [__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$http$2d$access$2d$fallback$2f$http$2d$access$2d$fallback$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["HTTPAccessErrorStatus"].NOT_FOUND]: notFound, [__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$http$2d$access$2d$fallback$2f$http$2d$access$2d$fallback$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["HTTPAccessErrorStatus"].FORBIDDEN]: forbidden, [__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$http$2d$access$2d$fallback$2f$http$2d$access$2d$fallback$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["HTTPAccessErrorStatus"].UNAUTHORIZED]: unauthorized }; if (triggeredStatus) { const isNotFound = triggeredStatus === __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$http$2d$access$2d$fallback$2f$http$2d$access$2d$fallback$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["HTTPAccessErrorStatus"].NOT_FOUND && notFound; const isForbidden = triggeredStatus === __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$http$2d$access$2d$fallback$2f$http$2d$access$2d$fallback$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["HTTPAccessErrorStatus"].FORBIDDEN && forbidden; const isUnauthorized = triggeredStatus === __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$http$2d$access$2d$fallback$2f$http$2d$access$2d$fallback$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["HTTPAccessErrorStatus"].UNAUTHORIZED && unauthorized; // If there's no matched boundary in this layer, keep throwing the error by rendering the children if (!(isNotFound || isForbidden || isUnauthorized)) { return children; } return /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxs"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["Fragment"], { children: [ /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])("meta", { name: "robots", content: "noindex" }), ("TURBOPACK compile-time value", "development") === 'development' && /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])("meta", { name: "boundary-next-error", content: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$http$2d$access$2d$fallback$2f$http$2d$access$2d$fallback$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["getAccessFallbackErrorTypeByStatus"])(triggeredStatus) }), errorComponents[triggeredStatus] ] }); } return children; } } function HTTPAccessFallbackBoundary({ notFound, forbidden, unauthorized, children }) { // When we're rendering the missing params shell, this will return null. This // is because we won't be rendering any not found boundaries or error // boundaries for the missing params shell. When this runs on the client // (where these error can occur), we will get the correct pathname. const pathname = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$navigation$2d$untracked$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useUntrackedPathname"])(); const missingSlots = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useContext"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$app$2d$router$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["MissingSlotContext"]); const hasErrorFallback = !!(notFound || forbidden || unauthorized); if (hasErrorFallback) { return /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])(HTTPAccessFallbackErrorBoundary, { pathname: pathname, notFound: notFound, forbidden: forbidden, unauthorized: unauthorized, missingSlots: missingSlots, children: children }); } return /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["Fragment"], { children: children }); } //# sourceMappingURL=error-boundary.js.map }), "[project]/node_modules/next/dist/esm/client/components/router-reducer/create-router-cache-key.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "createRouterCacheKey", ()=>createRouterCacheKey ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$segment$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/shared/lib/segment.js [app-ssr] (ecmascript)"); ; function createRouterCacheKey(segment, withoutSearchParameters = false) { // if the segment is an array, it means it's a dynamic segment // for example, ['lang', 'en', 'd']. We need to convert it to a string to store it as a cache node key. if (Array.isArray(segment)) { return `${segment[0]}|${segment[1]}|${segment[2]}`; } // Page segments might have search parameters, ie __PAGE__?foo=bar // When `withoutSearchParameters` is true, we only want to return the page segment if (withoutSearchParameters && segment.startsWith(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$segment$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["PAGE_SEGMENT_KEY"])) { return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$segment$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["PAGE_SEGMENT_KEY"]; } return segment; } //# sourceMappingURL=create-router-cache-key.js.map }), "[project]/node_modules/next/dist/esm/shared/lib/page-path/ensure-leading-slash.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; /** * 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. */ __turbopack_context__.s([ "ensureLeadingSlash", ()=>ensureLeadingSlash ]); function ensureLeadingSlash(path) { return path.startsWith('/') ? path : `/${path}`; } //# sourceMappingURL=ensure-leading-slash.js.map }), "[project]/node_modules/next/dist/esm/shared/lib/router/utils/app-paths.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "normalizeAppPath", ()=>normalizeAppPath, "normalizeRscURL", ()=>normalizeRscURL ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$page$2d$path$2f$ensure$2d$leading$2d$slash$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/shared/lib/page-path/ensure-leading-slash.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$segment$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/shared/lib/segment.js [app-ssr] (ecmascript)"); ; ; function normalizeAppPath(route) { return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$page$2d$path$2f$ensure$2d$leading$2d$slash$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["ensureLeadingSlash"])(route.split('/').reduce((pathname, segment, index, segments)=>{ // Empty segments are ignored. if (!segment) { return pathname; } // Groups are ignored. if ((0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$segment$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["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 normalizeRscURL(url) { return url.replace(/\.rsc($|\?)/, '$1'); } //# sourceMappingURL=app-paths.js.map }), "[project]/node_modules/next/dist/esm/shared/lib/router/utils/interception-routes.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "INTERCEPTION_ROUTE_MARKERS", ()=>INTERCEPTION_ROUTE_MARKERS, "extractInterceptionRouteInformation", ()=>extractInterceptionRouteInformation, "isInterceptionRouteAppPath", ()=>isInterceptionRouteAppPath ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$app$2d$paths$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/shared/lib/router/utils/app-paths.js [app-ssr] (ecmascript)"); ; 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, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$app$2d$paths$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["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 }), "[project]/node_modules/next/dist/esm/client/components/router-reducer/reducers/has-interception-route-in-current-tree.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "hasInterceptionRouteInCurrentTree", ()=>hasInterceptionRouteInCurrentTree ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$interception$2d$routes$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/shared/lib/router/utils/interception-routes.js [app-ssr] (ecmascript)"); ; function hasInterceptionRouteInCurrentTree([segment, parallelRoutes]) { // If we have a dynamic segment, it's marked as an interception route by the presence of the `i` suffix. if (Array.isArray(segment) && (segment[2] === 'di(..)(..)' || segment[2] === 'ci(..)(..)' || segment[2] === 'di(.)' || segment[2] === 'ci(.)' || segment[2] === 'di(..)' || segment[2] === 'ci(..)' || segment[2] === 'di(...)' || segment[2] === 'ci(...)')) { return true; } // If segment is not an array, apply the existing string-based check if (typeof segment === 'string' && (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$interception$2d$routes$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["isInterceptionRouteAppPath"])(segment)) { return true; } // Iterate through parallelRoutes if they exist if (parallelRoutes) { for(const key in parallelRoutes){ if (hasInterceptionRouteInCurrentTree(parallelRoutes[key])) { return true; } } } return false; } //# sourceMappingURL=has-interception-route-in-current-tree.js.map }), "[project]/node_modules/next/dist/esm/client/components/bfcache.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "useRouterBFCache", ()=>useRouterBFCache ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"); ; // When the flag is disabled, only track the currently active tree const MAX_BF_CACHE_ENTRIES = ("TURBOPACK compile-time falsy", 0) ? "TURBOPACK unreachable" : 1; function useRouterBFCache(activeTree, activeStateKey) { // The currently active entry. The entries form a linked list, sorted in // order of most recently active. This allows us to reuse parts of the list // without cloning, unless there's a reordering or removal. // TODO: Once we start tracking back/forward history at each route level, // we should use the history order instead. In other words, when traversing // to an existing entry as a result of a popstate event, we should maintain // the existing order instead of moving it to the front of the list. I think // an initial implementation of this could be to pass an incrementing id // to history.pushState/replaceState, then use that here for ordering. const [prevActiveEntry, setPrevActiveEntry] = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useState"])(()=>{ const initialEntry = { tree: activeTree, stateKey: activeStateKey, next: null }; return initialEntry; }); if (prevActiveEntry.tree === activeTree) { // Fast path. The active tree hasn't changed, so we can reuse the // existing state. return prevActiveEntry; } // The route tree changed. Note that this doesn't mean that the tree changed // *at this level* — the change may be due to a child route. Either way, we // need to either add or update the router tree in the bfcache. // // The rest of the code looks more complicated than it actually is because we // can't mutate the state in place; we have to copy-on-write. // Create a new entry for the active cache key. This is the head of the new // linked list. const newActiveEntry = { tree: activeTree, stateKey: activeStateKey, next: null }; // We need to append the old list onto the new list. If the head of the new // list was already present in the cache, then we'll need to clone everything // that came before it. Then we can reuse the rest. let n = 1; let oldEntry = prevActiveEntry; let clonedEntry = newActiveEntry; while(oldEntry !== null && n < MAX_BF_CACHE_ENTRIES){ if (oldEntry.stateKey === activeStateKey) { // Fast path. This entry in the old list that corresponds to the key that // is now active. We've already placed a clone of this entry at the front // of the new list. We can reuse the rest of the old list without cloning. // NOTE: We don't need to worry about eviction in this case because we // haven't increased the size of the cache, and we assume the max size // is constant across renders. If we were to change it to a dynamic limit, // then the implementation would need to account for that. clonedEntry.next = oldEntry.next; break; } else { // Clone the entry and append it to the list. n++; const entry = { tree: oldEntry.tree, stateKey: oldEntry.stateKey, next: null }; clonedEntry.next = entry; clonedEntry = entry; } oldEntry = oldEntry.next; } setPrevActiveEntry(newActiveEntry); return newActiveEntry; } //# sourceMappingURL=bfcache.js.map }), "[project]/node_modules/next/dist/esm/client/components/navigation-devtools.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "createLayoutSegmentPromises", ()=>createLayoutSegmentPromises, "createNestedLayoutNavigationPromises", ()=>createNestedLayoutNavigationPromises, "createRootNavigationPromises", ()=>createRootNavigationPromises ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$hooks$2d$client$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/hooks-client-context.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$segment$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/shared/lib/segment.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$readonly$2d$url$2d$search$2d$params$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/readonly-url-search-params.js [app-ssr] (ecmascript)"); ; ; ; const layoutSegmentPromisesCache = new WeakMap(); function createLayoutSegmentPromises(tree) { if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; // Check if we already have cached promises for this tree const cached = layoutSegmentPromisesCache.get(tree); if (cached) { return cached; } // Create new promises and cache them const segmentPromises = new Map(); const segmentsPromises = new Map(); const parallelRoutes = tree[1]; for (const parallelRouteKey of Object.keys(parallelRoutes)){ const segments = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$segment$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["getSelectedLayoutSegmentPath"])(tree, parallelRouteKey); // Use the shared logic to compute the segment value const segment = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$segment$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["computeSelectedLayoutSegment"])(segments, parallelRouteKey); segmentPromises.set(parallelRouteKey, (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$hooks$2d$client$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["createDevToolsInstrumentedPromise"])('useSelectedLayoutSegment', segment)); segmentsPromises.set(parallelRouteKey, (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$hooks$2d$client$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["createDevToolsInstrumentedPromise"])('useSelectedLayoutSegments', segments)); } const result = { selectedLayoutSegmentPromises: segmentPromises, selectedLayoutSegmentsPromises: segmentsPromises }; // Cache the result for future renders layoutSegmentPromisesCache.set(tree, result); return result; } const rootNavigationPromisesCache = new WeakMap(); function createRootNavigationPromises(tree, pathname, searchParams, pathParams) { if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; // Create stable cache keys from the values const searchParamsString = searchParams.toString(); const pathParamsString = JSON.stringify(pathParams); const cacheKey = `${pathname}:${searchParamsString}:${pathParamsString}`; // Get or create the cache for this tree let treeCache = rootNavigationPromisesCache.get(tree); if (!treeCache) { treeCache = new Map(); rootNavigationPromisesCache.set(tree, treeCache); } // Check if we have cached promises for this combination const cached = treeCache.get(cacheKey); if (cached) { return cached; } const readonlySearchParams = new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$readonly$2d$url$2d$search$2d$params$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["ReadonlyURLSearchParams"](searchParams); const layoutSegmentPromises = createLayoutSegmentPromises(tree); const promises = { pathname: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$hooks$2d$client$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["createDevToolsInstrumentedPromise"])('usePathname', pathname), searchParams: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$hooks$2d$client$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["createDevToolsInstrumentedPromise"])('useSearchParams', readonlySearchParams), params: (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$hooks$2d$client$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["createDevToolsInstrumentedPromise"])('useParams', pathParams), ...layoutSegmentPromises }; treeCache.set(cacheKey, promises); return promises; } const nestedLayoutPromisesCache = new WeakMap(); function createNestedLayoutNavigationPromises(tree, parentNavPromises) { if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; const parallelRoutes = tree[1]; const parallelRouteKeys = Object.keys(parallelRoutes); // Only create promises if there are parallel routes at this level if (parallelRouteKeys.length === 0) { return null; } // Get or create the cache for this tree let treeCache = nestedLayoutPromisesCache.get(tree); if (!treeCache) { treeCache = new Map(); nestedLayoutPromisesCache.set(tree, treeCache); } // Check if we have cached promises for this parent combination const cached = treeCache.get(parentNavPromises); if (cached) { return cached; } // Create merged promises const layoutSegmentPromises = createLayoutSegmentPromises(tree); const promises = { ...parentNavPromises, ...layoutSegmentPromises }; treeCache.set(parentNavPromises, promises); return promises; } //# sourceMappingURL=navigation-devtools.js.map }), "[project]/node_modules/next/dist/esm/next-devtools/userspace/app/segment-explorer-node.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE", ()=>SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE, "SegmentBoundaryTriggerNode", ()=>SegmentBoundaryTriggerNode, "SegmentStateProvider", ()=>SegmentStateProvider, "SegmentViewNode", ()=>SegmentViewNode, "SegmentViewStateNode", ()=>SegmentViewStateNode, "useSegmentState", ()=>useSegmentState ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$next$2d$devtools$2f$dev$2d$overlay$2e$shim$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/next-devtools/dev-overlay.shim.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$not$2d$found$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/not-found.js [app-ssr] (ecmascript)"); 'use client'; ; ; ; ; ; const SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE = 'NEXT_DEVTOOLS_SIMULATED_ERROR'; function SegmentTrieNode({ type, pagePath }) { const { boundaryType, setBoundaryType } = useSegmentState(); const nodeState = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useMemo"])(()=>{ return { type, pagePath, boundaryType, setBoundaryType }; }, [ type, pagePath, boundaryType, setBoundaryType ]); // Use `useLayoutEffect` to ensure the state is updated during suspense. // `useEffect` won't work as the state is preserved during suspense. (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useLayoutEffect"])(()=>{ __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$next$2d$devtools$2f$dev$2d$overlay$2e$shim$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["dispatcher"].segmentExplorerNodeAdd(nodeState); return ()=>{ __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$next$2d$devtools$2f$dev$2d$overlay$2e$shim$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["dispatcher"].segmentExplorerNodeRemove(nodeState); }; }, [ nodeState ]); return null; } function NotFoundSegmentNode() { (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$not$2d$found$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["notFound"])(); } function ErrorSegmentNode() { throw Object.defineProperty(new Error(SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE), "__NEXT_ERROR_CODE", { value: "E394", enumerable: false, configurable: true }); } const forever = new Promise(()=>{}); function LoadingSegmentNode() { (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["use"])(forever); return null; } function SegmentViewStateNode({ page }) { (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useLayoutEffect"])(()=>{ __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$next$2d$devtools$2f$dev$2d$overlay$2e$shim$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["dispatcher"].segmentExplorerUpdateRouteState(page); return ()=>{ __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$next$2d$devtools$2f$dev$2d$overlay$2e$shim$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["dispatcher"].segmentExplorerUpdateRouteState(''); }; }, [ page ]); return null; } function SegmentBoundaryTriggerNode() { const { boundaryType } = useSegmentState(); let segmentNode = null; if (boundaryType === 'loading') { segmentNode = /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])(LoadingSegmentNode, {}); } else if (boundaryType === 'not-found') { segmentNode = /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])(NotFoundSegmentNode, {}); } else if (boundaryType === 'error') { segmentNode = /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])(ErrorSegmentNode, {}); } return segmentNode; } function SegmentViewNode({ type, pagePath, children }) { const segmentNode = /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])(SegmentTrieNode, { type: type, pagePath: pagePath }, type); return /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxs"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["Fragment"], { children: [ segmentNode, children ] }); } const SegmentStateContext = /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["createContext"])({ boundaryType: null, setBoundaryType: ()=>{} }); function SegmentStateProvider({ children }) { const [boundaryType, setBoundaryType] = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useState"])(null); const [errorBoundaryKey, setErrorBoundaryKey] = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useState"])(0); const reloadBoundary = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useCallback"])(()=>setErrorBoundaryKey((prev)=>prev + 1), []); const setBoundaryTypeAndReload = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useCallback"])((type)=>{ if (type === null) { reloadBoundary(); } setBoundaryType(type); }, [ reloadBoundary ]); return /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])(SegmentStateContext.Provider, { value: { boundaryType, setBoundaryType: setBoundaryTypeAndReload }, children: children }, errorBoundaryKey); } function useSegmentState() { return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useContext"])(SegmentStateContext); } //# sourceMappingURL=segment-explorer-node.js.map }), "[project]/node_modules/next/dist/esm/client/components/layout-router.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "default", ()=>OuterLayoutRouter ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$router$2d$reducer$2f$router$2d$reducer$2d$types$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/router-reducer/router-reducer-types.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$dom$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-dom.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$app$2d$router$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/app-router-context.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$router$2d$reducer$2f$fetch$2d$server$2d$response$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/router-reducer/fetch-server-response.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$unresolved$2d$thenable$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/unresolved-thenable.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$error$2d$boundary$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/error-boundary.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$match$2d$segments$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/match-segments.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$disable$2d$smooth$2d$scroll$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/shared/lib/router/utils/disable-smooth-scroll.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$redirect$2d$boundary$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/redirect-boundary.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$http$2d$access$2d$fallback$2f$error$2d$boundary$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$router$2d$reducer$2f$create$2d$router$2d$cache$2d$key$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/router-reducer/create-router-cache-key.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$router$2d$reducer$2f$reducers$2f$has$2d$interception$2d$route$2d$in$2d$current$2d$tree$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/router-reducer/reducers/has-interception-route-in-current-tree.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$use$2d$action$2d$queue$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/use-action-queue.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$bfcache$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/bfcache.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$app$2d$paths$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/shared/lib/router/utils/app-paths.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$hooks$2d$client$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/hooks-client-context.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$route$2d$params$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/route-params.js [app-ssr] (ecmascript)"); 'use client'; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; /** * Add refetch marker to router state at the point of the current layout segment. * This ensures the response returned is not further down than the current layout segment. */ function walkAddRefetch(segmentPathToWalk, treeToRecreate) { if (segmentPathToWalk) { const [segment, parallelRouteKey] = segmentPathToWalk; const isLast = segmentPathToWalk.length === 2; if ((0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$match$2d$segments$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["matchSegment"])(treeToRecreate[0], segment)) { if (treeToRecreate[1].hasOwnProperty(parallelRouteKey)) { if (isLast) { const subTree = walkAddRefetch(undefined, treeToRecreate[1][parallelRouteKey]); return [ treeToRecreate[0], { ...treeToRecreate[1], [parallelRouteKey]: [ subTree[0], subTree[1], subTree[2], 'refetch' ] } ]; } return [ treeToRecreate[0], { ...treeToRecreate[1], [parallelRouteKey]: walkAddRefetch(segmentPathToWalk.slice(2), treeToRecreate[1][parallelRouteKey]) } ]; } } } return treeToRecreate; } const __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$dom$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"].__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; // TODO-APP: Replace with new React API for finding dom nodes without a `ref` when available /** * Wraps ReactDOM.findDOMNode with additional logic to hide React Strict Mode warning */ function findDOMNode(instance) { // Tree-shake for server bundle if ("TURBOPACK compile-time truthy", 1) return null; //TURBOPACK unreachable ; // __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode is null during module init. // We need to lazily reference it. const internal_reactDOMfindDOMNode = undefined; } const rectProperties = [ 'bottom', 'height', 'left', 'right', 'top', 'width', 'x', 'y' ]; /** * Check if a HTMLElement is hidden or fixed/sticky position */ function shouldSkipElement(element) { // we ignore fixed or sticky positioned elements since they'll likely pass the "in-viewport" check // and will result in a situation we bail on scroll because of something like a fixed nav, // even though the actual page content is offscreen if ([ 'sticky', 'fixed' ].includes(getComputedStyle(element).position)) { return true; } // Uses `getBoundingClientRect` to check if the element is hidden instead of `offsetParent` // because `offsetParent` doesn't consider document/body const rect = element.getBoundingClientRect(); return rectProperties.every((item)=>rect[item] === 0); } /** * Check if the top corner of the HTMLElement is in the viewport. */ function topOfElementInViewport(element, viewportHeight) { const rect = element.getBoundingClientRect(); return rect.top >= 0 && rect.top <= viewportHeight; } /** * Find the DOM node for a hash fragment. * If `top` the page has to scroll to the top of the page. This mirrors the browser's behavior. * If the hash fragment is an id, the page has to scroll to the element with that id. * If the hash fragment is a name, the page has to scroll to the first element with that name. */ function getHashFragmentDomNode(hashFragment) { // If the hash fragment is `top` the page has to scroll to the top of the page. if (hashFragment === 'top') { return document.body; } // If the hash fragment is an id, the page has to scroll to the element with that id. return document.getElementById(hashFragment) ?? // If the hash fragment is a name, the page has to scroll to the first element with that name. document.getElementsByName(hashFragment)[0]; } class InnerScrollAndFocusHandler extends __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["default"].Component { componentDidMount() { this.handlePotentialScroll(); } componentDidUpdate() { // Because this property is overwritten in handlePotentialScroll it's fine to always run it when true as it'll be set to false for subsequent renders. if (this.props.focusAndScrollRef.apply) { this.handlePotentialScroll(); } } render() { return this.props.children; } constructor(...args){ super(...args), this.handlePotentialScroll = ()=>{ // Handle scroll and focus, it's only applied once in the first useEffect that triggers that changed. const { focusAndScrollRef, segmentPath } = this.props; if (focusAndScrollRef.apply) { // segmentPaths is an array of segment paths that should be scrolled to // if the current segment path is not in the array, the scroll is not applied // unless the array is empty, in which case the scroll is always applied if (focusAndScrollRef.segmentPaths.length !== 0 && !focusAndScrollRef.segmentPaths.some((scrollRefSegmentPath)=>segmentPath.every((segment, index)=>(0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$match$2d$segments$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["matchSegment"])(segment, scrollRefSegmentPath[index])))) { return; } let domNode = null; const hashFragment = focusAndScrollRef.hashFragment; if (hashFragment) { domNode = getHashFragmentDomNode(hashFragment); } // `findDOMNode` is tricky because it returns just the first child if the component is a fragment. // This already caused a bug where the first child was a <link/> in head. if (!domNode) { domNode = findDOMNode(this); } // If there is no DOM node this layout-router level is skipped. It'll be handled higher-up in the tree. if (!(domNode instanceof Element)) { return; } // Verify if the element is a HTMLElement and if we want to consider it for scroll behavior. // If the element is skipped, try to select the next sibling and try again. while(!(domNode instanceof HTMLElement) || shouldSkipElement(domNode)){ if ("TURBOPACK compile-time truthy", 1) { if (domNode.parentElement?.localName === 'head') { // TODO: We enter this state when metadata was rendered as part of the page or via Next.js. // This is always a bug in Next.js and caused by React hoisting metadata. // We need to replace `findDOMNode` in favor of Fragment Refs (when available) so that we can skip over metadata. } } // No siblings found that match the criteria are found, so handle scroll higher up in the tree instead. if (domNode.nextElementSibling === null) { return; } domNode = domNode.nextElementSibling; } // State is mutated to ensure that the focus and scroll is applied only once. focusAndScrollRef.apply = false; focusAndScrollRef.hashFragment = null; focusAndScrollRef.segmentPaths = []; (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$disable$2d$smooth$2d$scroll$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["disableSmoothScrollDuringRouteTransition"])(()=>{ // In case of hash scroll, we only need to scroll the element into view if (hashFragment) { ; domNode.scrollIntoView(); return; } // Store the current viewport height because reading `clientHeight` causes a reflow, // and it won't change during this function. const htmlElement = document.documentElement; const viewportHeight = htmlElement.clientHeight; // If the element's top edge is already in the viewport, exit early. if (topOfElementInViewport(domNode, viewportHeight)) { return; } // Otherwise, try scrolling go the top of the document to be backward compatible with pages // scrollIntoView() called on `<html/>` element scrolls horizontally on chrome and firefox (that shouldn't happen) // We could use it to scroll horizontally following RTL but that also seems to be broken - it will always scroll left // scrollLeft = 0 also seems to ignore RTL and manually checking for RTL is too much hassle so we will scroll just vertically htmlElement.scrollTop = 0; // Scroll to domNode if domNode is not in viewport when scrolled to top of document if (!topOfElementInViewport(domNode, viewportHeight)) { // Scroll into view doesn't scroll horizontally by default when not needed ; domNode.scrollIntoView(); } }, { // We will force layout by querying domNode position dontForceLayout: true, onlyHashChange: focusAndScrollRef.onlyHashChange }); // Mutate after scrolling so that it can be read by `disableSmoothScrollDuringRouteTransition` focusAndScrollRef.onlyHashChange = false; // Set focus on the element domNode.focus(); } }; } } function ScrollAndFocusHandler({ segmentPath, children }) { const context = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useContext"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$app$2d$router$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["GlobalLayoutRouterContext"]); if (!context) { throw Object.defineProperty(new Error('invariant global layout router not mounted'), "__NEXT_ERROR_CODE", { value: "E473", enumerable: false, configurable: true }); } return /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])(InnerScrollAndFocusHandler, { segmentPath: segmentPath, focusAndScrollRef: context.focusAndScrollRef, children: children }); } /** * InnerLayoutRouter handles rendering the provided segment based on the cache. */ function InnerLayoutRouter({ tree, segmentPath, debugNameContext, cacheNode, params, url, isActive }) { const context = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useContext"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$app$2d$router$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["GlobalLayoutRouterContext"]); const parentNavPromises = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useContext"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$hooks$2d$client$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["NavigationPromisesContext"]); if (!context) { throw Object.defineProperty(new Error('invariant global layout router not mounted'), "__NEXT_ERROR_CODE", { value: "E473", enumerable: false, configurable: true }); } const { tree: fullTree } = context; // `rsc` represents the renderable node for this segment. // If this segment has a `prefetchRsc`, it's the statically prefetched data. // We should use that on initial render instead of `rsc`. Then we'll switch // to `rsc` when the dynamic response streams in. // // If no prefetch data is available, then we go straight to rendering `rsc`. const resolvedPrefetchRsc = cacheNode.prefetchRsc !== null ? cacheNode.prefetchRsc : cacheNode.rsc; // We use `useDeferredValue` to handle switching between the prefetched and // final values. The second argument is returned on initial render, then it // re-renders with the first argument. const rsc = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useDeferredValue"])(cacheNode.rsc, resolvedPrefetchRsc); // `rsc` is either a React node or a promise for a React node, except we // special case `null` to represent that this segment's data is missing. If // it's a promise, we need to unwrap it so we can determine whether or not the // data is missing. const resolvedRsc = typeof rsc === 'object' && rsc !== null && typeof rsc.then === 'function' ? (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["use"])(rsc) : rsc; if (!resolvedRsc) { // The data for this segment is not available, and there's no pending // navigation that will be able to fulfill it. We need to fetch more from // the server and patch the cache. // Only fetch data for the active segment. Inactive segments (rendered // offscreen for bfcache) should not trigger fetches. if (isActive) { // Check if there's already a pending request. let lazyData = cacheNode.lazyData; if (lazyData === null) { /** * Router state with refetch marker added */ // TODO-APP: remove '' const refetchTree = walkAddRefetch([ '', ...segmentPath ], fullTree); const includeNextUrl = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$router$2d$reducer$2f$reducers$2f$has$2d$interception$2d$route$2d$in$2d$current$2d$tree$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["hasInterceptionRouteInCurrentTree"])(fullTree); const navigatedAt = Date.now(); cacheNode.lazyData = lazyData = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$router$2d$reducer$2f$fetch$2d$server$2d$response$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["fetchServerResponse"])(new URL(url, location.origin), { flightRouterState: refetchTree, nextUrl: includeNextUrl ? // the next-url after a navigation, but we want the same // interception route to be matched that used the last // next-url. context.previousNextUrl || context.nextUrl : null }).then((serverResponse)=>{ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["startTransition"])(()=>{ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$use$2d$action$2d$queue$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["dispatchAppRouterAction"])({ type: __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$router$2d$reducer$2f$router$2d$reducer$2d$types$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["ACTION_SERVER_PATCH"], previousTree: fullTree, serverResponse, navigatedAt }); }); return serverResponse; }); // Suspend while waiting for lazyData to resolve (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["use"])(lazyData); } } // Suspend infinitely as `changeByServerResponse` will cause a different part of the tree to be rendered. // A falsey `resolvedRsc` indicates missing data -- we should not commit that branch, and we need to wait for the data to arrive. (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["use"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$unresolved$2d$thenable$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["unresolvedThenable"]); } // If we get to this point, then we know we have something we can render. let content = resolvedRsc; // In dev, we create a NavigationPromisesContext containing the instrumented promises that provide // `useSelectedLayoutSegment` and `useSelectedLayoutSegments`. // Promises are cached outside of render to survive suspense retries. let navigationPromises = null; if ("TURBOPACK compile-time truthy", 1) { const { createNestedLayoutNavigationPromises } = __turbopack_context__.r("[project]/node_modules/next/dist/esm/client/components/navigation-devtools.js [app-ssr] (ecmascript)"); navigationPromises = createNestedLayoutNavigationPromises(tree, parentNavPromises); } if (navigationPromises) { content = /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$hooks$2d$client$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["NavigationPromisesContext"].Provider, { value: navigationPromises, children: resolvedRsc }); } const subtree = /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$app$2d$router$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["LayoutRouterContext"].Provider, { value: { parentTree: tree, parentCacheNode: cacheNode, parentSegmentPath: segmentPath, parentParams: params, debugNameContext: debugNameContext, // TODO-APP: overriding of url for parallel routes url: url, isActive: isActive }, children: content }); // Ensure root layout is not wrapped in a div as the root layout renders `<html>` return subtree; } /** * Renders suspense boundary with the provided "loading" property as the fallback. * If no loading property is provided it renders the children without a suspense boundary. */ function LoadingBoundary({ name, loading, children }) { // If loading is a promise, unwrap it. This happens in cases where we haven't // yet received the loading data from the server — which includes whether or // not this layout has a loading component at all. // // It's OK to suspend here instead of inside the fallback because this // promise will resolve simultaneously with the data for the segment itself. // So it will never suspend for longer than it would have if we didn't use // a Suspense fallback at all. let loadingModuleData; if (typeof loading === 'object' && loading !== null && typeof loading.then === 'function') { const promiseForLoading = loading; loadingModuleData = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["use"])(promiseForLoading); } else { loadingModuleData = loading; } if (loadingModuleData) { const loadingRsc = loadingModuleData[0]; const loadingStyles = loadingModuleData[1]; const loadingScripts = loadingModuleData[2]; return /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["Suspense"], { name: name, fallback: /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxs"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["Fragment"], { children: [ loadingStyles, loadingScripts, loadingRsc ] }), children: children }); } return /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["Fragment"], { children: children }); } function OuterLayoutRouter({ parallelRouterKey, error, errorStyles, errorScripts, templateStyles, templateScripts, template, notFound, forbidden, unauthorized, segmentViewBoundaries }) { const context = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useContext"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$app$2d$router$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["LayoutRouterContext"]); if (!context) { throw Object.defineProperty(new Error('invariant expected layout router to be mounted'), "__NEXT_ERROR_CODE", { value: "E56", enumerable: false, configurable: true }); } const { parentTree, parentCacheNode, parentSegmentPath, parentParams, url, isActive, debugNameContext } = context; // Get the CacheNode for this segment by reading it from the parent segment's // child map. const parentParallelRoutes = parentCacheNode.parallelRoutes; let segmentMap = parentParallelRoutes.get(parallelRouterKey); // If the parallel router cache node does not exist yet, create it. // This writes to the cache when there is no item in the cache yet. It never *overwrites* existing cache items which is why it's safe in concurrent mode. if (!segmentMap) { segmentMap = new Map(); parentParallelRoutes.set(parallelRouterKey, segmentMap); } const parentTreeSegment = parentTree[0]; const segmentPath = parentSegmentPath === null ? // the code. We should clean this up. [ parallelRouterKey ] : parentSegmentPath.concat([ parentTreeSegment, parallelRouterKey ]); // The "state" key of a segment is the one passed to React — it represents the // identity of the UI tree. Whenever the state key changes, the tree is // recreated and the state is reset. In the App Router model, search params do // not cause state to be lost, so two segments with the same segment path but // different search params should have the same state key. // // The "cache" key of a segment, however, *does* include the search params, if // it's possible that the segment accessed the search params on the server. // (This only applies to page segments; layout segments cannot access search // params on the server.) const activeTree = parentTree[1][parallelRouterKey]; const activeSegment = activeTree[0]; const activeStateKey = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$router$2d$reducer$2f$create$2d$router$2d$cache$2d$key$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["createRouterCacheKey"])(activeSegment, true) // no search params ; // At each level of the route tree, not only do we render the currently // active segment — we also render the last N segments that were active at // this level inside a hidden <Activity> boundary, to preserve their state // if or when the user navigates to them again. // // bfcacheEntry is a linked list of FlightRouterStates. let bfcacheEntry = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$bfcache$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useRouterBFCache"])(activeTree, activeStateKey); let children = []; do { const tree = bfcacheEntry.tree; const stateKey = bfcacheEntry.stateKey; const segment = tree[0]; const cacheKey = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$router$2d$reducer$2f$create$2d$router$2d$cache$2d$key$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["createRouterCacheKey"])(segment); // Read segment path from the parallel router cache node. let cacheNode = segmentMap.get(cacheKey); if (cacheNode === undefined) { // When data is not available during rendering client-side we need to fetch // it from the server. const newLazyCacheNode = { lazyData: null, rsc: null, prefetchRsc: null, head: null, prefetchHead: null, parallelRoutes: new Map(), loading: null, navigatedAt: -1 }; // Flight data fetch kicked off during render and put into the cache. cacheNode = newLazyCacheNode; segmentMap.set(cacheKey, newLazyCacheNode); } /* - Error boundary - Only renders error boundary if error component is provided. - Rendered for each segment to ensure they have their own error state. - When gracefully degrade for bots, skip rendering error boundary. - Loading boundary - Only renders suspense boundary if loading components is provided. - Rendered for each segment to ensure they have their own loading state. - Passed to the router during rendering to ensure it can be immediately rendered when suspending on a Flight fetch. */ let segmentBoundaryTriggerNode = null; let segmentViewStateNode = null; if ("TURBOPACK compile-time truthy", 1) { const { SegmentBoundaryTriggerNode, SegmentViewStateNode } = __turbopack_context__.r("[project]/node_modules/next/dist/esm/next-devtools/userspace/app/segment-explorer-node.js [app-ssr] (ecmascript)"); const pagePrefix = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$router$2f$utils$2f$app$2d$paths$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["normalizeAppPath"])(url); segmentViewStateNode = /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])(SegmentViewStateNode, { page: pagePrefix }, pagePrefix); segmentBoundaryTriggerNode = /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["Fragment"], { children: /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])(SegmentBoundaryTriggerNode, {}) }); } let params = parentParams; if (Array.isArray(segment)) { // This segment contains a route param. Accumulate these as we traverse // down the router tree. The result represents the set of params that // the layout/page components are permitted to access below this point. const paramName = segment[0]; const paramCacheKey = segment[1]; const paramType = segment[2]; const paramValue = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$route$2d$params$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["getParamValueFromCacheKey"])(paramCacheKey, paramType); if (paramValue !== null) { params = { ...parentParams, [paramName]: paramValue }; } } const debugName = getBoundaryDebugNameFromSegment(segment); // `debugNameContext` represents the nearest non-"virtual" parent segment. // `getBoundaryDebugNameFromSegment` returns undefined for virtual segments. // So if `debugName` is undefined, the context is passed through unchanged. const childDebugNameContext = debugName ?? debugNameContext; // In practical terms, clicking this name in the Suspense DevTools // should select the child slots of that layout. // // So the name we apply to the Activity boundary is actually based on // the nearest parent segments. // // We skip over "virtual" parents, i.e. ones inserted by Next.js that // don't correspond to application-defined code. const isVirtual = debugName === undefined; const debugNameToDisplay = isVirtual ? undefined : debugNameContext; // TODO: The loading module data for a segment is stored on the parent, then // applied to each of that parent segment's parallel route slots. In the // simple case where there's only one parallel route (the `children` slot), // this is no different from if the loading module data where stored on the // child directly. But I'm not sure this actually makes sense when there are // multiple parallel routes. It's not a huge issue because you always have // the option to define a narrower loading boundary for a particular slot. But // this sort of smells like an implementation accident to me. const loadingModuleData = parentCacheNode.loading; let child = /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxs"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$app$2d$router$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["TemplateContext"].Provider, { value: /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxs"])(ScrollAndFocusHandler, { segmentPath: segmentPath, children: [ /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$error$2d$boundary$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["ErrorBoundary"], { errorComponent: error, errorStyles: errorStyles, errorScripts: errorScripts, children: /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])(LoadingBoundary, { name: debugNameToDisplay, loading: loadingModuleData, children: /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$http$2d$access$2d$fallback$2f$error$2d$boundary$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["HTTPAccessFallbackBoundary"], { notFound: notFound, forbidden: forbidden, unauthorized: unauthorized, children: /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxs"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$redirect$2d$boundary$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["RedirectBoundary"], { children: [ /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])(InnerLayoutRouter, { url: url, tree: tree, params: params, cacheNode: cacheNode, segmentPath: segmentPath, debugNameContext: childDebugNameContext, isActive: isActive && stateKey === activeStateKey }), segmentBoundaryTriggerNode ] }) }) }) }), segmentViewStateNode ] }), children: [ templateStyles, templateScripts, template ] }, stateKey); if ("TURBOPACK compile-time truthy", 1) { const { SegmentStateProvider } = __turbopack_context__.r("[project]/node_modules/next/dist/esm/next-devtools/userspace/app/segment-explorer-node.js [app-ssr] (ecmascript)"); child = /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsxs"])(SegmentStateProvider, { children: [ child, segmentViewBoundaries ] }, stateKey); } if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; children.push(child); bfcacheEntry = bfcacheEntry.next; }while (bfcacheEntry !== null) return children; } function getBoundaryDebugNameFromSegment(segment) { if (segment === '/') { // Reached the root return '/'; } if (typeof segment === 'string') { if (isVirtualLayout(segment)) { return undefined; } else { return segment + '/'; } } const paramCacheKey = segment[1]; return paramCacheKey + '/'; } function isVirtualLayout(segment) { return(// in a more special way instead of checking the name, to distinguish them // from app-defined groups. segment === '(slot)'); } //# sourceMappingURL=layout-router.js.map }), "[project]/node_modules/next/dist/esm/client/components/render-from-template-context.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "default", ()=>RenderFromTemplateContext ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$app$2d$router$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/app-router-context.js [app-ssr] (ecmascript)"); 'use client'; ; ; ; function RenderFromTemplateContext() { const children = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["useContext"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$app$2d$router$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["TemplateContext"]); return /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["Fragment"], { children: children }); } //# sourceMappingURL=render-from-template-context.js.map }), "[project]/node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "ReflectAdapter", ()=>ReflectAdapter ]); class ReflectAdapter { static get(target, prop, receiver) { const value = Reflect.get(target, prop, receiver); if (typeof value === 'function') { return value.bind(target); } return value; } static set(target, prop, value, receiver) { return Reflect.set(target, prop, value, receiver); } static has(target, prop) { return Reflect.has(target, prop); } static deleteProperty(target, prop) { return Reflect.deleteProperty(target, prop); } } //# sourceMappingURL=reflect.js.map }), "[project]/node_modules/next/dist/esm/server/create-deduped-by-callsite-server-error-logger.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "createDedupedByCallsiteServerErrorLoggerDev", ()=>createDedupedByCallsiteServerErrorLoggerDev ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"); ; const errorRef = { current: null }; // React.cache is currently only available in canary/experimental React channels. const cache = typeof __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["cache"] === 'function' ? __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["cache"] : (fn)=>fn; // When Cache Components is enabled, we record these as errors so that they // are captured by the dev overlay as it's more critical to fix these // when enabled. const logErrorOrWarn = ("TURBOPACK compile-time falsy", 0) ? "TURBOPACK unreachable" : console.warn; // We don't want to dedupe across requests. // The developer might've just attempted to fix the warning so we should warn again if it still happens. const flushCurrentErrorIfNew = cache((key)=>{ try { logErrorOrWarn(errorRef.current); } finally{ errorRef.current = null; } }); function createDedupedByCallsiteServerErrorLoggerDev(getMessage) { return function logDedupedError(...args) { const message = getMessage(...args); if ("TURBOPACK compile-time truthy", 1) { var _stack; const callStackFrames = (_stack = new Error().stack) == null ? void 0 : _stack.split('\n'); if (callStackFrames === undefined || callStackFrames.length < 4) { logErrorOrWarn(message); } else { // Error: // logDedupedError // asyncApiBeingAccessedSynchronously // <userland callsite> // TODO: This breaks if sourcemaps with ignore lists are enabled. const key = callStackFrames[4]; errorRef.current = message; flushCurrentErrorIfNew(key); } } else //TURBOPACK unreachable ; }; } //# sourceMappingURL=create-deduped-by-callsite-server-error-logger.js.map }), "[project]/node_modules/next/dist/esm/shared/lib/utils/reflect-utils.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; // 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.ಠ_ಠ` __turbopack_context__.s([ "describeHasCheckingStringProperty", ()=>describeHasCheckingStringProperty, "describeStringPropertyAccess", ()=>describeStringPropertyAccess, "wellKnownProperties", ()=>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' ]); //# sourceMappingURL=reflect-utils.js.map }), "[project]/node_modules/next/dist/esm/server/request/utils.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "isRequestAPICallableInsideAfter", ()=>isRequestAPICallableInsideAfter, "throwForSearchParamsAccessInUseCache", ()=>throwForSearchParamsAccessInUseCache, "throwWithStaticGenerationBailoutErrorWithDynamicError", ()=>throwWithStaticGenerationBailoutErrorWithDynamicError ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$static$2d$generation$2d$bailout$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/components/static-generation-bailout.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$externals$5d2f$next$2f$dist$2f$server$2f$app$2d$render$2f$after$2d$task$2d$async$2d$storage$2e$external$2e$js__$5b$external$5d$__$28$next$2f$dist$2f$server$2f$app$2d$render$2f$after$2d$task$2d$async$2d$storage$2e$external$2e$js$2c$__cjs$29$__ = __turbopack_context__.i("[externals]/next/dist/server/app-render/after-task-async-storage.external.js [external] (next/dist/server/app-render/after-task-async-storage.external.js, cjs)"); ; ; function throwWithStaticGenerationBailoutErrorWithDynamicError(route, expression) { throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$components$2f$static$2d$generation$2d$bailout$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["StaticGenBailoutError"](`Route ${route} with \`dynamic = "error"\` couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", { value: "E543", enumerable: false, configurable: true }); } function throwForSearchParamsAccessInUseCache(workStore, constructorOpt) { const error = Object.defineProperty(new Error(`Route ${workStore.route} used \`searchParams\` inside "use cache". Accessing dynamic request data inside a cache scope is not supported. If you need some search params inside a cached function await \`searchParams\` outside of the cached function and pass only the required search params as arguments to the cached function. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`), "__NEXT_ERROR_CODE", { value: "E842", enumerable: false, configurable: true }); Error.captureStackTrace(error, constructorOpt); workStore.invalidDynamicUsageError ??= error; throw error; } function isRequestAPICallableInsideAfter() { const afterTaskStore = __TURBOPACK__imported__module__$5b$externals$5d2f$next$2f$dist$2f$server$2f$app$2d$render$2f$after$2d$task$2d$async$2d$storage$2e$external$2e$js__$5b$external$5d$__$28$next$2f$dist$2f$server$2f$app$2d$render$2f$after$2d$task$2d$async$2d$storage$2e$external$2e$js$2c$__cjs$29$__["afterTaskAsyncStorage"].getStore(); return (afterTaskStore == null ? void 0 : afterTaskStore.rootTaskSpawnPhase) === 'action'; } //# sourceMappingURL=utils.js.map }), "[project]/node_modules/next/dist/esm/server/request/search-params.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "createPrerenderSearchParamsForClientPage", ()=>createPrerenderSearchParamsForClientPage, "createSearchParamsFromClient", ()=>createSearchParamsFromClient, "createServerSearchParamsForMetadata", ()=>createServerSearchParamsForMetadata, "createServerSearchParamsForServerPage", ()=>createServerSearchParamsForServerPage, "makeErroringSearchParamsForUseCache", ()=>makeErroringSearchParamsForUseCache ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$dynamic$2d$rendering$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/server/app-render/dynamic-rendering.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$externals$5d2f$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js__$5b$external$5d$__$28$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js$2c$__cjs$29$__ = __turbopack_context__.i("[externals]/next/dist/server/app-render/work-unit-async-storage.external.js [external] (next/dist/server/app-render/work-unit-async-storage.external.js, cjs)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/shared/lib/invariant-error.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$dynamic$2d$rendering$2d$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/server/dynamic-rendering-utils.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$create$2d$deduped$2d$by$2d$callsite$2d$server$2d$error$2d$logger$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/server/create-deduped-by-callsite-server-error-logger.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$utils$2f$reflect$2d$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/shared/lib/utils/reflect-utils.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$request$2f$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/server/request/utils.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$staged$2d$rendering$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/server/app-render/staged-rendering.js [app-ssr] (ecmascript)"); ; ; ; ; ; ; ; ; ; function createSearchParamsFromClient(underlyingSearchParams, workStore) { const workUnitStore = __TURBOPACK__imported__module__$5b$externals$5d2f$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js__$5b$external$5d$__$28$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js$2c$__cjs$29$__["workUnitAsyncStorage"].getStore(); if (workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': return createStaticPrerenderSearchParams(workStore, workUnitStore); case 'prerender-runtime': throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["InvariantError"]('createSearchParamsFromClient should not be called in a runtime prerender.'), "__NEXT_ERROR_CODE", { value: "E769", enumerable: false, configurable: true }); case 'cache': case 'private-cache': case 'unstable-cache': throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["InvariantError"]('createSearchParamsFromClient should not be called in cache contexts.'), "__NEXT_ERROR_CODE", { value: "E739", enumerable: false, configurable: true }); case 'request': return createRenderSearchParams(underlyingSearchParams, workStore, workUnitStore); default: workUnitStore; } } (0, __TURBOPACK__imported__module__$5b$externals$5d2f$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js__$5b$external$5d$__$28$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js$2c$__cjs$29$__["throwInvariantForMissingStore"])(); } const createServerSearchParamsForMetadata = createServerSearchParamsForServerPage; function createServerSearchParamsForServerPage(underlyingSearchParams, workStore) { const workUnitStore = __TURBOPACK__imported__module__$5b$externals$5d2f$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js__$5b$external$5d$__$28$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js$2c$__cjs$29$__["workUnitAsyncStorage"].getStore(); if (workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': return createStaticPrerenderSearchParams(workStore, workUnitStore); case 'cache': case 'private-cache': case 'unstable-cache': throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["InvariantError"]('createServerSearchParamsForServerPage should not be called in cache contexts.'), "__NEXT_ERROR_CODE", { value: "E747", enumerable: false, configurable: true }); case 'prerender-runtime': return createRuntimePrerenderSearchParams(underlyingSearchParams, workUnitStore); case 'request': return createRenderSearchParams(underlyingSearchParams, workStore, workUnitStore); default: workUnitStore; } } (0, __TURBOPACK__imported__module__$5b$externals$5d2f$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js__$5b$external$5d$__$28$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js$2c$__cjs$29$__["throwInvariantForMissingStore"])(); } function createPrerenderSearchParamsForClientPage(workStore) { if (workStore.forceStatic) { // When using forceStatic we override all other logic and always just return an empty // dictionary object. return Promise.resolve({}); } const workUnitStore = __TURBOPACK__imported__module__$5b$externals$5d2f$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js__$5b$external$5d$__$28$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js$2c$__cjs$29$__["workUnitAsyncStorage"].getStore(); if (workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-client': // We're prerendering in a mode that aborts (cacheComponents) and should stall // the promise to ensure the RSC side is considered dynamic return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$dynamic$2d$rendering$2d$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["makeHangingPromise"])(workUnitStore.renderSignal, workStore.route, '`searchParams`'); case 'prerender-runtime': throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["InvariantError"]('createPrerenderSearchParamsForClientPage should not be called in a runtime prerender.'), "__NEXT_ERROR_CODE", { value: "E768", enumerable: false, configurable: true }); case 'cache': case 'private-cache': case 'unstable-cache': throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["InvariantError"]('createPrerenderSearchParamsForClientPage should not be called in cache contexts.'), "__NEXT_ERROR_CODE", { value: "E746", enumerable: false, configurable: true }); case 'prerender-ppr': case 'prerender-legacy': case 'request': return Promise.resolve({}); default: workUnitStore; } } (0, __TURBOPACK__imported__module__$5b$externals$5d2f$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js__$5b$external$5d$__$28$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js$2c$__cjs$29$__["throwInvariantForMissingStore"])(); } function createStaticPrerenderSearchParams(workStore, prerenderStore) { if (workStore.forceStatic) { // When using forceStatic we override all other logic and always just return an empty // dictionary object. return Promise.resolve({}); } switch(prerenderStore.type){ case 'prerender': case 'prerender-client': // We are in a cacheComponents (PPR or otherwise) prerender return makeHangingSearchParams(workStore, prerenderStore); case 'prerender-ppr': case 'prerender-legacy': // We are in a legacy static generation and need to interrupt the // prerender when search params are accessed. return makeErroringSearchParams(workStore, prerenderStore); default: return prerenderStore; } } function createRuntimePrerenderSearchParams(underlyingSearchParams, workUnitStore) { return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$dynamic$2d$rendering$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["delayUntilRuntimeStage"])(workUnitStore, makeUntrackedSearchParams(underlyingSearchParams)); } function createRenderSearchParams(underlyingSearchParams, workStore, requestStore) { if (workStore.forceStatic) { // When using forceStatic we override all other logic and always just return an empty // dictionary object. return Promise.resolve({}); } else { if ("TURBOPACK compile-time truthy", 1) { // Semantically we only need the dev tracking when running in `next dev` // but since you would never use next dev with production NODE_ENV we use this // as a proxy so we can statically exclude this code from production builds. return makeUntrackedSearchParamsWithDevWarnings(underlyingSearchParams, workStore, requestStore); } else //TURBOPACK unreachable ; } } const CachedSearchParams = new WeakMap(); const CachedSearchParamsForUseCache = new WeakMap(); function makeHangingSearchParams(workStore, prerenderStore) { const cachedSearchParams = CachedSearchParams.get(prerenderStore); if (cachedSearchParams) { return cachedSearchParams; } const promise = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$dynamic$2d$rendering$2d$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["makeHangingPromise"])(prerenderStore.renderSignal, workStore.route, '`searchParams`'); const proxiedPromise = new Proxy(promise, { get (target, prop, receiver) { if (Object.hasOwn(promise, prop)) { // The promise has this property directly. we must return it. // We know it isn't a dynamic access because it can only be something // that was previously written to the promise and thus not an underlying searchParam value return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["ReflectAdapter"].get(target, prop, receiver); } switch(prop){ case 'then': { const expression = '`await searchParams`, `searchParams.then`, or similar'; (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$dynamic$2d$rendering$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["annotateDynamicAccess"])(expression, prerenderStore); return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["ReflectAdapter"].get(target, prop, receiver); } case 'status': { const expression = '`use(searchParams)`, `searchParams.status`, or similar'; (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$dynamic$2d$rendering$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["annotateDynamicAccess"])(expression, prerenderStore); return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["ReflectAdapter"].get(target, prop, receiver); } default: { return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["ReflectAdapter"].get(target, prop, receiver); } } } }); CachedSearchParams.set(prerenderStore, proxiedPromise); return proxiedPromise; } function makeErroringSearchParams(workStore, prerenderStore) { const cachedSearchParams = CachedSearchParams.get(workStore); if (cachedSearchParams) { return cachedSearchParams; } const underlyingSearchParams = {}; // For search params we don't construct a ReactPromise because we want to interrupt // rendering on any property access that was not set from outside and so we only want // to have properties like value and status if React sets them. const promise = Promise.resolve(underlyingSearchParams); const proxiedPromise = new Proxy(promise, { get (target, prop, receiver) { if (Object.hasOwn(promise, prop)) { // The promise has this property directly. we must return it. // We know it isn't a dynamic access because it can only be something // that was previously written to the promise and thus not an underlying searchParam value return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["ReflectAdapter"].get(target, prop, receiver); } if (typeof prop === 'string' && prop === 'then') { const expression = '`await searchParams`, `searchParams.then`, or similar'; if (workStore.dynamicShouldError) { (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$request$2f$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["throwWithStaticGenerationBailoutErrorWithDynamicError"])(workStore.route, expression); } else if (prerenderStore.type === 'prerender-ppr') { // PPR Prerender (no cacheComponents) (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$dynamic$2d$rendering$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["postponeWithTracking"])(workStore.route, expression, prerenderStore.dynamicTracking); } else { // Legacy Prerender (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$dynamic$2d$rendering$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["throwToInterruptStaticGeneration"])(expression, workStore, prerenderStore); } } return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["ReflectAdapter"].get(target, prop, receiver); } }); CachedSearchParams.set(workStore, proxiedPromise); return proxiedPromise; } function makeErroringSearchParamsForUseCache(workStore) { const cachedSearchParams = CachedSearchParamsForUseCache.get(workStore); if (cachedSearchParams) { return cachedSearchParams; } const promise = Promise.resolve({}); const proxiedPromise = new Proxy(promise, { get: function get(target, prop, receiver) { if (Object.hasOwn(promise, prop)) { // The promise has this property directly. we must return it. We know it // isn't a dynamic access because it can only be something that was // previously written to the promise and thus not an underlying // searchParam value return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["ReflectAdapter"].get(target, prop, receiver); } if (typeof prop === 'string' && (prop === 'then' || !__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$utils$2f$reflect$2d$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["wellKnownProperties"].has(prop))) { (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$request$2f$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["throwForSearchParamsAccessInUseCache"])(workStore, get); } return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["ReflectAdapter"].get(target, prop, receiver); } }); CachedSearchParamsForUseCache.set(workStore, proxiedPromise); return proxiedPromise; } function makeUntrackedSearchParams(underlyingSearchParams) { const cachedSearchParams = CachedSearchParams.get(underlyingSearchParams); if (cachedSearchParams) { return cachedSearchParams; } const promise = Promise.resolve(underlyingSearchParams); CachedSearchParams.set(underlyingSearchParams, promise); return promise; } function makeUntrackedSearchParamsWithDevWarnings(underlyingSearchParams, workStore, requestStore) { if (requestStore.asyncApiPromises) { // Do not cache the resulting promise. If we do, we'll only show the first "awaited at" // across all segments that receive searchParams. return makeUntrackedSearchParamsWithDevWarningsImpl(underlyingSearchParams, workStore, requestStore); } else { const cachedSearchParams = CachedSearchParams.get(underlyingSearchParams); if (cachedSearchParams) { return cachedSearchParams; } const promise = makeUntrackedSearchParamsWithDevWarningsImpl(underlyingSearchParams, workStore, requestStore); CachedSearchParams.set(requestStore, promise); return promise; } } function makeUntrackedSearchParamsWithDevWarningsImpl(underlyingSearchParams, workStore, requestStore) { const promiseInitialized = { current: false }; const proxiedUnderlying = instrumentSearchParamsObjectWithDevWarnings(underlyingSearchParams, workStore, promiseInitialized); let promise; if (requestStore.asyncApiPromises) { // We wrap each instance of searchParams in a `new Promise()`. // This is important when all awaits are in third party which would otherwise // track all the way to the internal params. const sharedSearchParamsParent = requestStore.asyncApiPromises.sharedSearchParamsParent; promise = new Promise((resolve, reject)=>{ sharedSearchParamsParent.then(()=>resolve(proxiedUnderlying), reject); }); // @ts-expect-error promise.displayName = 'searchParams'; } else { promise = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$dynamic$2d$rendering$2d$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["makeDevtoolsIOAwarePromise"])(proxiedUnderlying, requestStore, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$staged$2d$rendering$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["RenderStage"].Runtime); } promise.then(()=>{ promiseInitialized.current = true; }, // is aborted before it can reach the runtime stage. // In that case, we have to prevent an unhandled rejection from the promise // created by this `.then()` call. // This does not affect the `promiseInitialized` logic above, // because `proxiedUnderlying` will not be used to resolve the promise, // so there's no risk of any of its properties being accessed and triggering // an undesireable warning. ignoreReject); return instrumentSearchParamsPromiseWithDevWarnings(underlyingSearchParams, promise, workStore); } function ignoreReject() {} function instrumentSearchParamsObjectWithDevWarnings(underlyingSearchParams, workStore, promiseInitialized) { // We have an unfortunate sequence of events that requires this initialization logic. We want to instrument the underlying // searchParams object to detect if you are accessing values in dev. This is used for warnings and for things like the static prerender // indicator. However when we pass this proxy to our Promise.resolve() below the VM checks if the resolved value is a promise by looking // at the `.then` property. To our dynamic tracking logic this is indistinguishable from a `then` searchParam and so we would normally trigger // dynamic tracking. However we know that this .then is not real dynamic access, it's just how thenables resolve in sequence. So we introduce // this initialization concept so we omit the dynamic check until after we've constructed our resolved promise. return new Proxy(underlyingSearchParams, { get (target, prop, receiver) { if (typeof prop === 'string' && promiseInitialized.current) { if (workStore.dynamicShouldError) { const expression = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$utils$2f$reflect$2d$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["describeStringPropertyAccess"])('searchParams', prop); (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$request$2f$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["throwWithStaticGenerationBailoutErrorWithDynamicError"])(workStore.route, expression); } } return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["ReflectAdapter"].get(target, prop, receiver); }, has (target, prop) { if (typeof prop === 'string') { if (workStore.dynamicShouldError) { const expression = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$utils$2f$reflect$2d$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["describeHasCheckingStringProperty"])('searchParams', prop); (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$request$2f$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["throwWithStaticGenerationBailoutErrorWithDynamicError"])(workStore.route, expression); } } return Reflect.has(target, prop); }, ownKeys (target) { if (workStore.dynamicShouldError) { const expression = '`{...searchParams}`, `Object.keys(searchParams)`, or similar'; (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$request$2f$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["throwWithStaticGenerationBailoutErrorWithDynamicError"])(workStore.route, expression); } return Reflect.ownKeys(target); } }); } function instrumentSearchParamsPromiseWithDevWarnings(underlyingSearchParams, promise, workStore) { // Track which properties we should warn for. const proxiedProperties = new Set(); Object.keys(underlyingSearchParams).forEach((prop)=>{ if (__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$utils$2f$reflect$2d$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["wellKnownProperties"].has(prop)) { // These properties cannot be shadowed because they need to be the // true underlying value for Promises to work correctly at runtime } else { proxiedProperties.add(prop); } }); return new Proxy(promise, { get (target, prop, receiver) { if (prop === 'then' && workStore.dynamicShouldError) { const expression = '`searchParams.then`'; (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$request$2f$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["throwWithStaticGenerationBailoutErrorWithDynamicError"])(workStore.route, expression); } if (typeof prop === 'string') { if (!__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$utils$2f$reflect$2d$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["wellKnownProperties"].has(prop) && (proxiedProperties.has(prop) || // We are accessing a property that doesn't exist on the promise nor // the underlying searchParams. Reflect.has(target, prop) === false)) { const expression = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$utils$2f$reflect$2d$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["describeStringPropertyAccess"])('searchParams', prop); warnForSyncAccess(workStore.route, expression); } } return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["ReflectAdapter"].get(target, prop, receiver); }, set (target, prop, value, receiver) { if (typeof prop === 'string') { proxiedProperties.delete(prop); } return Reflect.set(target, prop, value, receiver); }, has (target, prop) { if (typeof prop === 'string') { if (!__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$utils$2f$reflect$2d$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["wellKnownProperties"].has(prop) && (proxiedProperties.has(prop) || // We are accessing a property that doesn't exist on the promise nor // the underlying searchParams. Reflect.has(target, prop) === false)) { const expression = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$utils$2f$reflect$2d$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["describeHasCheckingStringProperty"])('searchParams', prop); warnForSyncAccess(workStore.route, expression); } } return Reflect.has(target, prop); }, ownKeys (target) { const expression = '`Object.keys(searchParams)` or similar'; warnForSyncAccess(workStore.route, expression); return Reflect.ownKeys(target); } }); } const warnForSyncAccess = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$create$2d$deduped$2d$by$2d$callsite$2d$server$2d$error$2d$logger$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["createDedupedByCallsiteServerErrorLoggerDev"])(createSearchAccessError); function createSearchAccessError(route, expression) { const prefix = route ? `Route "${route}" ` : 'This route '; return Object.defineProperty(new Error(`${prefix}used ${expression}. ` + `\`searchParams\` is a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. ` + `Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`), "__NEXT_ERROR_CODE", { value: "E848", enumerable: false, configurable: true }); } //# sourceMappingURL=search-params.js.map }), "[project]/node_modules/next/dist/esm/server/request/params.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "createParamsFromClient", ()=>createParamsFromClient, "createPrerenderParamsForClientSegment", ()=>createPrerenderParamsForClientSegment, "createServerParamsForMetadata", ()=>createServerParamsForMetadata, "createServerParamsForRoute", ()=>createServerParamsForRoute, "createServerParamsForServerSegment", ()=>createServerParamsForServerSegment ]); var __TURBOPACK__imported__module__$5b$externals$5d2f$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2e$external$2e$js__$5b$external$5d$__$28$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2e$external$2e$js$2c$__cjs$29$__ = __turbopack_context__.i("[externals]/next/dist/server/app-render/work-async-storage.external.js [external] (next/dist/server/app-render/work-async-storage.external.js, cjs)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/server/web/spec-extension/adapters/reflect.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$dynamic$2d$rendering$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/server/app-render/dynamic-rendering.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$externals$5d2f$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js__$5b$external$5d$__$28$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js$2c$__cjs$29$__ = __turbopack_context__.i("[externals]/next/dist/server/app-render/work-unit-async-storage.external.js [external] (next/dist/server/app-render/work-unit-async-storage.external.js, cjs)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/shared/lib/invariant-error.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$utils$2f$reflect$2d$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/shared/lib/utils/reflect-utils.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$dynamic$2d$rendering$2d$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/server/dynamic-rendering-utils.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$create$2d$deduped$2d$by$2d$callsite$2d$server$2d$error$2d$logger$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/server/create-deduped-by-callsite-server-error-logger.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$externals$5d2f$next$2f$dist$2f$server$2f$app$2d$render$2f$dynamic$2d$access$2d$async$2d$storage$2e$external$2e$js__$5b$external$5d$__$28$next$2f$dist$2f$server$2f$app$2d$render$2f$dynamic$2d$access$2d$async$2d$storage$2e$external$2e$js$2c$__cjs$29$__ = __turbopack_context__.i("[externals]/next/dist/server/app-render/dynamic-access-async-storage.external.js [external] (next/dist/server/app-render/dynamic-access-async-storage.external.js, cjs)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$staged$2d$rendering$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/server/app-render/staged-rendering.js [app-ssr] (ecmascript)"); ; ; ; ; ; ; ; ; ; ; function createParamsFromClient(underlyingParams, workStore) { const workUnitStore = __TURBOPACK__imported__module__$5b$externals$5d2f$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js__$5b$external$5d$__$28$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js$2c$__cjs$29$__["workUnitAsyncStorage"].getStore(); if (workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': return createStaticPrerenderParams(underlyingParams, workStore, workUnitStore); case 'cache': case 'private-cache': case 'unstable-cache': throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["InvariantError"]('createParamsFromClient should not be called in cache contexts.'), "__NEXT_ERROR_CODE", { value: "E736", enumerable: false, configurable: true }); case 'prerender-runtime': throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["InvariantError"]('createParamsFromClient should not be called in a runtime prerender.'), "__NEXT_ERROR_CODE", { value: "E770", enumerable: false, configurable: true }); case 'request': if ("TURBOPACK compile-time truthy", 1) { // Semantically we only need the dev tracking when running in `next dev` // but since you would never use next dev with production NODE_ENV we use this // as a proxy so we can statically exclude this code from production builds. const devFallbackParams = workUnitStore.devFallbackParams; return createRenderParamsInDev(underlyingParams, devFallbackParams, workStore, workUnitStore); } else //TURBOPACK unreachable ; default: workUnitStore; } } (0, __TURBOPACK__imported__module__$5b$externals$5d2f$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js__$5b$external$5d$__$28$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js$2c$__cjs$29$__["throwInvariantForMissingStore"])(); } const createServerParamsForMetadata = createServerParamsForServerSegment; function createServerParamsForRoute(underlyingParams, workStore) { const workUnitStore = __TURBOPACK__imported__module__$5b$externals$5d2f$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js__$5b$external$5d$__$28$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js$2c$__cjs$29$__["workUnitAsyncStorage"].getStore(); if (workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': return createStaticPrerenderParams(underlyingParams, workStore, workUnitStore); case 'cache': case 'private-cache': case 'unstable-cache': throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["InvariantError"]('createServerParamsForRoute should not be called in cache contexts.'), "__NEXT_ERROR_CODE", { value: "E738", enumerable: false, configurable: true }); case 'prerender-runtime': return createRuntimePrerenderParams(underlyingParams, workUnitStore); case 'request': if ("TURBOPACK compile-time truthy", 1) { // Semantically we only need the dev tracking when running in `next dev` // but since you would never use next dev with production NODE_ENV we use this // as a proxy so we can statically exclude this code from production builds. const devFallbackParams = workUnitStore.devFallbackParams; return createRenderParamsInDev(underlyingParams, devFallbackParams, workStore, workUnitStore); } else //TURBOPACK unreachable ; default: workUnitStore; } } (0, __TURBOPACK__imported__module__$5b$externals$5d2f$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js__$5b$external$5d$__$28$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js$2c$__cjs$29$__["throwInvariantForMissingStore"])(); } function createServerParamsForServerSegment(underlyingParams, workStore) { const workUnitStore = __TURBOPACK__imported__module__$5b$externals$5d2f$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js__$5b$external$5d$__$28$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js$2c$__cjs$29$__["workUnitAsyncStorage"].getStore(); if (workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-client': case 'prerender-ppr': case 'prerender-legacy': return createStaticPrerenderParams(underlyingParams, workStore, workUnitStore); case 'cache': case 'private-cache': case 'unstable-cache': throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["InvariantError"]('createServerParamsForServerSegment should not be called in cache contexts.'), "__NEXT_ERROR_CODE", { value: "E743", enumerable: false, configurable: true }); case 'prerender-runtime': return createRuntimePrerenderParams(underlyingParams, workUnitStore); case 'request': if ("TURBOPACK compile-time truthy", 1) { // Semantically we only need the dev tracking when running in `next dev` // but since you would never use next dev with production NODE_ENV we use this // as a proxy so we can statically exclude this code from production builds. const devFallbackParams = workUnitStore.devFallbackParams; return createRenderParamsInDev(underlyingParams, devFallbackParams, workStore, workUnitStore); } else //TURBOPACK unreachable ; default: workUnitStore; } } (0, __TURBOPACK__imported__module__$5b$externals$5d2f$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js__$5b$external$5d$__$28$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js$2c$__cjs$29$__["throwInvariantForMissingStore"])(); } function createPrerenderParamsForClientSegment(underlyingParams) { const workStore = __TURBOPACK__imported__module__$5b$externals$5d2f$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2e$external$2e$js__$5b$external$5d$__$28$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$async$2d$storage$2e$external$2e$js$2c$__cjs$29$__["workAsyncStorage"].getStore(); if (!workStore) { throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["InvariantError"]('Missing workStore in createPrerenderParamsForClientSegment'), "__NEXT_ERROR_CODE", { value: "E773", enumerable: false, configurable: true }); } const workUnitStore = __TURBOPACK__imported__module__$5b$externals$5d2f$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js__$5b$external$5d$__$28$next$2f$dist$2f$server$2f$app$2d$render$2f$work$2d$unit$2d$async$2d$storage$2e$external$2e$js$2c$__cjs$29$__["workUnitAsyncStorage"].getStore(); if (workUnitStore) { switch(workUnitStore.type){ case 'prerender': case 'prerender-client': const fallbackParams = workUnitStore.fallbackRouteParams; if (fallbackParams) { for(let key in underlyingParams){ if (fallbackParams.has(key)) { // This params object has one or more fallback params, so we need // to consider the awaiting of this params object "dynamic". Since // we are in cacheComponents mode we encode this as a promise that never // resolves. return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$dynamic$2d$rendering$2d$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["makeHangingPromise"])(workUnitStore.renderSignal, workStore.route, '`params`'); } } } break; case 'cache': case 'private-cache': case 'unstable-cache': throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["InvariantError"]('createPrerenderParamsForClientSegment should not be called in cache contexts.'), "__NEXT_ERROR_CODE", { value: "E734", enumerable: false, configurable: true }); case 'prerender-ppr': case 'prerender-legacy': case 'prerender-runtime': case 'request': break; default: workUnitStore; } } // We're prerendering in a mode that does not abort. We resolve the promise without // any tracking because we're just transporting a value from server to client where the tracking // will be applied. return Promise.resolve(underlyingParams); } function createStaticPrerenderParams(underlyingParams, workStore, prerenderStore) { switch(prerenderStore.type){ case 'prerender': case 'prerender-client': { const fallbackParams = prerenderStore.fallbackRouteParams; if (fallbackParams) { for(const key in underlyingParams){ if (fallbackParams.has(key)) { // This params object has one or more fallback params, so we need // to consider the awaiting of this params object "dynamic". Since // we are in cacheComponents mode we encode this as a promise that never // resolves. return makeHangingParams(underlyingParams, workStore, prerenderStore); } } } break; } case 'prerender-ppr': { const fallbackParams = prerenderStore.fallbackRouteParams; if (fallbackParams) { for(const key in underlyingParams){ if (fallbackParams.has(key)) { return makeErroringParams(underlyingParams, fallbackParams, workStore, prerenderStore); } } } break; } case 'prerender-legacy': break; default: prerenderStore; } return makeUntrackedParams(underlyingParams); } function createRuntimePrerenderParams(underlyingParams, workUnitStore) { return (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$dynamic$2d$rendering$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["delayUntilRuntimeStage"])(workUnitStore, makeUntrackedParams(underlyingParams)); } function createRenderParamsInProd(underlyingParams) { return makeUntrackedParams(underlyingParams); } function createRenderParamsInDev(underlyingParams, devFallbackParams, workStore, requestStore) { let hasFallbackParams = false; if (devFallbackParams) { for(let key in underlyingParams){ if (devFallbackParams.has(key)) { hasFallbackParams = true; break; } } } return makeDynamicallyTrackedParamsWithDevWarnings(underlyingParams, hasFallbackParams, workStore, requestStore); } const CachedParams = new WeakMap(); const fallbackParamsProxyHandler = { get: function get(target, prop, receiver) { if (prop === 'then' || prop === 'catch' || prop === 'finally') { const originalMethod = __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["ReflectAdapter"].get(target, prop, receiver); return ({ [prop]: (...args)=>{ const store = __TURBOPACK__imported__module__$5b$externals$5d2f$next$2f$dist$2f$server$2f$app$2d$render$2f$dynamic$2d$access$2d$async$2d$storage$2e$external$2e$js__$5b$external$5d$__$28$next$2f$dist$2f$server$2f$app$2d$render$2f$dynamic$2d$access$2d$async$2d$storage$2e$external$2e$js$2c$__cjs$29$__["dynamicAccessAsyncStorage"].getStore(); if (store) { store.abortController.abort(Object.defineProperty(new Error(`Accessed fallback \`params\` during prerendering.`), "__NEXT_ERROR_CODE", { value: "E691", enumerable: false, configurable: true })); } return new Proxy(originalMethod.apply(target, args), fallbackParamsProxyHandler); } })[prop]; } return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["ReflectAdapter"].get(target, prop, receiver); } }; function makeHangingParams(underlyingParams, workStore, prerenderStore) { const cachedParams = CachedParams.get(underlyingParams); if (cachedParams) { return cachedParams; } const promise = new Proxy((0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$dynamic$2d$rendering$2d$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["makeHangingPromise"])(prerenderStore.renderSignal, workStore.route, '`params`'), fallbackParamsProxyHandler); CachedParams.set(underlyingParams, promise); return promise; } function makeErroringParams(underlyingParams, fallbackParams, workStore, prerenderStore) { const cachedParams = CachedParams.get(underlyingParams); if (cachedParams) { return cachedParams; } const augmentedUnderlying = { ...underlyingParams }; // We don't use makeResolvedReactPromise here because params // supports copying with spread and we don't want to unnecessarily // instrument the promise with spreadable properties of ReactPromise. const promise = Promise.resolve(augmentedUnderlying); CachedParams.set(underlyingParams, promise); Object.keys(underlyingParams).forEach((prop)=>{ if (__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$utils$2f$reflect$2d$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["wellKnownProperties"].has(prop)) { // These properties cannot be shadowed because they need to be the // true underlying value for Promises to work correctly at runtime } else { if (fallbackParams.has(prop)) { Object.defineProperty(augmentedUnderlying, prop, { get () { const expression = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$utils$2f$reflect$2d$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["describeStringPropertyAccess"])('params', prop); // In most dynamic APIs we also throw if `dynamic = "error"` however // for params is only dynamic when we're generating a fallback shell // and even when `dynamic = "error"` we still support generating dynamic // fallback shells // TODO remove this comment when cacheComponents is the default since there // will be no `dynamic = "error"` if (prerenderStore.type === 'prerender-ppr') { // PPR Prerender (no cacheComponents) (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$dynamic$2d$rendering$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["postponeWithTracking"])(workStore.route, expression, prerenderStore.dynamicTracking); } else { // Legacy Prerender (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$dynamic$2d$rendering$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["throwToInterruptStaticGeneration"])(expression, workStore, prerenderStore); } }, enumerable: true }); } } }); return promise; } function makeUntrackedParams(underlyingParams) { const cachedParams = CachedParams.get(underlyingParams); if (cachedParams) { return cachedParams; } const promise = Promise.resolve(underlyingParams); CachedParams.set(underlyingParams, promise); return promise; } function makeDynamicallyTrackedParamsWithDevWarnings(underlyingParams, hasFallbackParams, workStore, requestStore) { if (requestStore.asyncApiPromises && hasFallbackParams) { // We wrap each instance of params in a `new Promise()`, because deduping // them across requests doesn't work anyway and this let us show each // await a different set of values. This is important when all awaits // are in third party which would otherwise track all the way to the // internal params. const sharedParamsParent = requestStore.asyncApiPromises.sharedParamsParent; const promise = new Promise((resolve, reject)=>{ sharedParamsParent.then(()=>resolve(underlyingParams), reject); }); // @ts-expect-error promise.displayName = 'params'; return instrumentParamsPromiseWithDevWarnings(underlyingParams, promise, workStore); } const cachedParams = CachedParams.get(underlyingParams); if (cachedParams) { return cachedParams; } // We don't use makeResolvedReactPromise here because params // supports copying with spread and we don't want to unnecessarily // instrument the promise with spreadable properties of ReactPromise. const promise = hasFallbackParams ? (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$dynamic$2d$rendering$2d$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["makeDevtoolsIOAwarePromise"])(underlyingParams, requestStore, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$app$2d$render$2f$staged$2d$rendering$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["RenderStage"].Runtime) : Promise.resolve(underlyingParams); const proxiedPromise = instrumentParamsPromiseWithDevWarnings(underlyingParams, promise, workStore); CachedParams.set(underlyingParams, proxiedPromise); return proxiedPromise; } function instrumentParamsPromiseWithDevWarnings(underlyingParams, promise, workStore) { // Track which properties we should warn for. const proxiedProperties = new Set(); Object.keys(underlyingParams).forEach((prop)=>{ if (__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$utils$2f$reflect$2d$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["wellKnownProperties"].has(prop)) { // These properties cannot be shadowed because they need to be the // true underlying value for Promises to work correctly at runtime } else { proxiedProperties.add(prop); } }); return new Proxy(promise, { get (target, prop, receiver) { if (typeof prop === 'string') { if (proxiedProperties.has(prop)) { const expression = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$utils$2f$reflect$2d$utils$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["describeStringPropertyAccess"])('params', prop); warnForSyncAccess(workStore.route, expression); } } return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["ReflectAdapter"].get(target, prop, receiver); }, set (target, prop, value, receiver) { if (typeof prop === 'string') { proxiedProperties.delete(prop); } return __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$web$2f$spec$2d$extension$2f$adapters$2f$reflect$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["ReflectAdapter"].set(target, prop, value, receiver); }, ownKeys (target) { const expression = '`...params` or similar expression'; warnForSyncAccess(workStore.route, expression); return Reflect.ownKeys(target); } }); } const warnForSyncAccess = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$server$2f$create$2d$deduped$2d$by$2d$callsite$2d$server$2d$error$2d$logger$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["createDedupedByCallsiteServerErrorLoggerDev"])(createParamsAccessError); function createParamsAccessError(route, expression) { const prefix = route ? `Route "${route}" ` : 'This route '; return Object.defineProperty(new Error(`${prefix}used ${expression}. ` + `\`params\` is a Promise and must be unwrapped with \`await\` or \`React.use()\` before accessing its properties. ` + `Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`), "__NEXT_ERROR_CODE", { value: "E834", enumerable: false, configurable: true }); } //# sourceMappingURL=params.js.map }), "[project]/node_modules/next/dist/esm/client/components/client-page.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "ClientPageRoot", ()=>ClientPageRoot ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/shared/lib/invariant-error.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$app$2d$router$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/app-router-context.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$route$2d$params$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/client/route-params.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$hooks$2d$client$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/hooks-client-context.js [app-ssr] (ecmascript)"); 'use client'; ; ; ; ; ; ; function ClientPageRoot({ Component, serverProvidedParams }) { let searchParams; let params; if (serverProvidedParams !== null) { searchParams = serverProvidedParams.searchParams; params = serverProvidedParams.params; } else { // When Cache Components is enabled, the server does not pass the params as // props; they are parsed on the client and passed via context. const layoutRouterContext = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["use"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$app$2d$router$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["LayoutRouterContext"]); params = layoutRouterContext !== null ? layoutRouterContext.parentParams : {}; // This is an intentional behavior change: when Cache Components is enabled, // client segments receive the "canonical" search params, not the // rewritten ones. Users should either call useSearchParams directly or pass // the rewritten ones in from a Server Component. // TODO: Log a deprecation error when this object is accessed searchParams = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$client$2f$route$2d$params$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["urlSearchParamsToParsedUrlQuery"])((0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["use"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$hooks$2d$client$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["SearchParamsContext"])); } if ("TURBOPACK compile-time truthy", 1) { const { workAsyncStorage } = __turbopack_context__.r("[externals]/next/dist/server/app-render/work-async-storage.external.js [external] (next/dist/server/app-render/work-async-storage.external.js, cjs)"); let clientSearchParams; let clientParams; // We are going to instrument the searchParams prop with tracking for the // appropriate context. We wrap differently in prerendering vs rendering const store = workAsyncStorage.getStore(); if (!store) { throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["InvariantError"]('Expected workStore to exist when handling searchParams in a client Page.'), "__NEXT_ERROR_CODE", { value: "E564", enumerable: false, configurable: true }); } const { createSearchParamsFromClient } = __turbopack_context__.r("[project]/node_modules/next/dist/esm/server/request/search-params.js [app-ssr] (ecmascript)"); clientSearchParams = createSearchParamsFromClient(searchParams, store); const { createParamsFromClient } = __turbopack_context__.r("[project]/node_modules/next/dist/esm/server/request/params.js [app-ssr] (ecmascript)"); clientParams = createParamsFromClient(params, store); return /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])(Component, { params: clientParams, searchParams: clientSearchParams }); } else //TURBOPACK unreachable ; } //# sourceMappingURL=client-page.js.map }), "[project]/node_modules/next/dist/esm/client/components/client-segment.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "ClientSegmentRoot", ()=>ClientSegmentRoot ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/shared/lib/invariant-error.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$app$2d$router$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/app-router-context.js [app-ssr] (ecmascript)"); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js [app-ssr] (ecmascript)"); 'use client'; ; ; ; ; function ClientSegmentRoot({ Component, slots, serverProvidedParams }) { let params; if (serverProvidedParams !== null) { params = serverProvidedParams.params; } else { // When Cache Components is enabled, the server does not pass the params // as props; they are parsed on the client and passed via context. const layoutRouterContext = (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["use"])(__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$contexts$2f$app$2d$router$2d$context$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["LayoutRouterContext"]); params = layoutRouterContext !== null ? layoutRouterContext.parentParams : {}; } if ("TURBOPACK compile-time truthy", 1) { const { workAsyncStorage } = __turbopack_context__.r("[externals]/next/dist/server/app-render/work-async-storage.external.js [external] (next/dist/server/app-render/work-async-storage.external.js, cjs)"); let clientParams; // We are going to instrument the searchParams prop with tracking for the // appropriate context. We wrap differently in prerendering vs rendering const store = workAsyncStorage.getStore(); if (!store) { throw Object.defineProperty(new __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$shared$2f$lib$2f$invariant$2d$error$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["InvariantError"]('Expected workStore to exist when handling params in a client segment such as a Layout or Template.'), "__NEXT_ERROR_CODE", { value: "E600", enumerable: false, configurable: true }); } const { createParamsFromClient } = __turbopack_context__.r("[project]/node_modules/next/dist/esm/server/request/params.js [app-ssr] (ecmascript)"); clientParams = createParamsFromClient(params, store); return /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])(Component, { ...slots, params: clientParams }); } else //TURBOPACK unreachable ; } //# sourceMappingURL=client-segment.js.map }), "[project]/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "IconMark", ()=>IconMark ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js [app-ssr] (ecmascript)"); 'use client'; ; const IconMark = ()=>{ if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; return /*#__PURE__*/ (0, __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$server$2f$route$2d$modules$2f$app$2d$page$2f$vendored$2f$ssr$2f$react$2d$jsx$2d$runtime$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["jsx"])("meta", { name: "\xabnxt-icon\xbb" }); }; //# sourceMappingURL=icon-mark.js.map }), "[project]/node_modules/next/dist/esm/lib/framework/boundary-components.js [app-ssr] (ecmascript)", ((__turbopack_context__) => { "use strict"; __turbopack_context__.s([ "MetadataBoundary", ()=>MetadataBoundary, "OutletBoundary", ()=>OutletBoundary, "RootLayoutBoundary", ()=>RootLayoutBoundary, "ViewportBoundary", ()=>ViewportBoundary ]); var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$framework$2f$boundary$2d$constants$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__ = __turbopack_context__.i("[project]/node_modules/next/dist/esm/lib/framework/boundary-constants.js [app-ssr] (ecmascript)"); 'use client'; ; // We use a namespace object to allow us to recover the name of the function // at runtime even when production bundling/minification is used. const NameSpace = { [__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$framework$2f$boundary$2d$constants$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["METADATA_BOUNDARY_NAME"]]: function({ children }) { return children; }, [__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$framework$2f$boundary$2d$constants$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["VIEWPORT_BOUNDARY_NAME"]]: function({ children }) { return children; }, [__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$framework$2f$boundary$2d$constants$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["OUTLET_BOUNDARY_NAME"]]: function({ children }) { return children; }, [__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$framework$2f$boundary$2d$constants$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["ROOT_LAYOUT_BOUNDARY_NAME"]]: function({ children }) { return children; } }; const MetadataBoundary = // so it retains the name inferred from the namespace object NameSpace[__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$framework$2f$boundary$2d$constants$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["METADATA_BOUNDARY_NAME"].slice(0)]; const ViewportBoundary = // so it retains the name inferred from the namespace object NameSpace[__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$framework$2f$boundary$2d$constants$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["VIEWPORT_BOUNDARY_NAME"].slice(0)]; const OutletBoundary = // so it retains the name inferred from the namespace object NameSpace[__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$framework$2f$boundary$2d$constants$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["OUTLET_BOUNDARY_NAME"].slice(0)]; const RootLayoutBoundary = // so it retains the name inferred from the namespace object NameSpace[__TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$esm$2f$lib$2f$framework$2f$boundary$2d$constants$2e$js__$5b$app$2d$ssr$5d$__$28$ecmascript$29$__["ROOT_LAYOUT_BOUNDARY_NAME"].slice(0)]; //# sourceMappingURL=boundary-components.js.map }), "[project]/node_modules/next/dist/client/components/handle-isr-error.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "HandleISRError", { enumerable: true, get: function() { return HandleISRError; } }); const workAsyncStorage = ("TURBOPACK compile-time truthy", 1) ? __turbopack_context__.r("[externals]/next/dist/server/app-render/work-async-storage.external.js [external] (next/dist/server/app-render/work-async-storage.external.js, cjs)").workAsyncStorage : "TURBOPACK unreachable"; function HandleISRError({ error }) { if (workAsyncStorage) { const store = workAsyncStorage.getStore(); if (store?.isStaticGeneration) { if (error) { console.error(error); } throw error; } } return null; } 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=handle-isr-error.js.map }), "[project]/node_modules/next/dist/client/components/builtin/global-error.js [app-ssr] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, // supplied custom global error signatures. "default", { enumerable: true, get: function() { return _default; } }); const _jsxruntime = __turbopack_context__.r("[project]/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js [app-ssr] (ecmascript)"); const _handleisrerror = __turbopack_context__.r("[project]/node_modules/next/dist/client/components/handle-isr-error.js [app-ssr] (ecmascript)"); const styles = { error: { // https://github.com/sindresorhus/modern-normalize/blob/main/modern-normalize.css#L38-L52 fontFamily: 'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"', height: '100vh', textAlign: 'center', display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center' }, text: { fontSize: '14px', fontWeight: 400, lineHeight: '28px', margin: '0 8px' } }; function DefaultGlobalError({ error }) { const digest = error?.digest; return /*#__PURE__*/ (0, _jsxruntime.jsxs)("html", { id: "__next_error__", children: [ /*#__PURE__*/ (0, _jsxruntime.jsx)("head", {}), /*#__PURE__*/ (0, _jsxruntime.jsxs)("body", { children: [ /*#__PURE__*/ (0, _jsxruntime.jsx)(_handleisrerror.HandleISRError, { error: error }), /*#__PURE__*/ (0, _jsxruntime.jsx)("div", { style: styles.error, children: /*#__PURE__*/ (0, _jsxruntime.jsxs)("div", { children: [ /*#__PURE__*/ (0, _jsxruntime.jsxs)("h2", { style: styles.text, children: [ "Application error: a ", digest ? 'server' : 'client', "-side exception has occurred while loading ", window.location.hostname, " (see the", ' ', digest ? 'server logs' : 'browser console', " for more information)." ] }), digest ? /*#__PURE__*/ (0, _jsxruntime.jsx)("p", { style: styles.text, children: `Digest: ${digest}` }) : null ] }) }) ] }) ] }); } const _default = DefaultGlobalError; 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=global-error.js.map }), ]; //# sourceMappingURL=node_modules_a37a5ecd._.js.map