next 16.2.0-canary.3 → 16.2.0-canary.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.build-commit +1 -1
- package/dist/bin/next +2 -2
- package/dist/build/index.js +3 -3
- package/dist/build/swc/index.js +1 -1
- package/dist/build/webpack-config.js +3 -3
- package/dist/bundle-analyzer/404.html +2 -2
- package/dist/bundle-analyzer/__next.__PAGE__.txt +1 -1
- package/dist/bundle-analyzer/__next._full.txt +1 -1
- package/dist/bundle-analyzer/__next._head.txt +1 -1
- package/dist/bundle-analyzer/__next._index.txt +1 -1
- package/dist/bundle-analyzer/__next._tree.txt +1 -1
- package/dist/bundle-analyzer/_not-found/__next._full.txt +1 -1
- package/dist/bundle-analyzer/_not-found/__next._head.txt +1 -1
- package/dist/bundle-analyzer/_not-found/__next._index.txt +1 -1
- package/dist/bundle-analyzer/_not-found/__next._not-found.__PAGE__.txt +1 -1
- package/dist/bundle-analyzer/_not-found/__next._not-found.txt +1 -1
- package/dist/bundle-analyzer/_not-found/__next._tree.txt +1 -1
- package/dist/bundle-analyzer/_not-found.html +2 -2
- package/dist/bundle-analyzer/_not-found.txt +1 -1
- package/dist/bundle-analyzer/index.html +2 -2
- package/dist/bundle-analyzer/index.txt +1 -1
- package/dist/client/app-bootstrap.js +1 -1
- package/dist/client/index.js +1 -1
- package/dist/compiled/next-devtools/index.js +1 -1
- package/dist/compiled/next-devtools/index.js.map +1 -1
- package/dist/compiled/next-server/pages-api-turbo.runtime.dev.js +1 -1
- package/dist/compiled/next-server/pages-api-turbo.runtime.dev.js.map +1 -1
- package/dist/compiled/next-server/pages-api.runtime.dev.js +1 -1
- package/dist/compiled/next-server/pages-api.runtime.dev.js.map +1 -1
- package/dist/compiled/next-server/pages-api.runtime.prod.js +1 -1
- package/dist/compiled/next-server/pages-api.runtime.prod.js.map +1 -1
- package/dist/compiled/next-server/pages-turbo.runtime.dev.js +1 -1
- package/dist/compiled/next-server/pages-turbo.runtime.dev.js.map +1 -1
- package/dist/compiled/next-server/pages.runtime.dev.js +1 -1
- package/dist/compiled/next-server/pages.runtime.dev.js.map +1 -1
- package/dist/compiled/next-server/pages.runtime.prod.js +1 -1
- package/dist/compiled/next-server/pages.runtime.prod.js.map +1 -1
- package/dist/compiled/next-server/server.runtime.prod.js +3 -3
- package/dist/esm/build/index.js +3 -3
- package/dist/esm/build/swc/index.js +1 -1
- package/dist/esm/build/webpack-config.js +3 -3
- package/dist/esm/client/app-bootstrap.js +1 -1
- package/dist/esm/client/index.js +1 -1
- package/dist/esm/server/dev/hot-reloader-turbopack.js +1 -1
- package/dist/esm/server/dev/hot-reloader-webpack.js +1 -1
- package/dist/esm/server/lib/app-info-log.js +1 -1
- package/dist/esm/server/lib/start-server.js +1 -1
- package/dist/esm/shared/lib/errors/canary-only-config-error.js +1 -1
- package/dist/next-devtools/dev-overlay/container/runtime-error/component-stack-pseudo-html.d.ts +1 -1
- package/dist/next-devtools/dev-overlay/container/runtime-error/index.d.ts +1 -1
- package/dist/server/dev/hot-reloader-turbopack.js +1 -1
- package/dist/server/dev/hot-reloader-webpack.js +1 -1
- package/dist/server/lib/app-info-log.js +1 -1
- package/dist/server/lib/start-server.js +1 -1
- package/dist/shared/lib/errors/canary-only-config-error.js +1 -1
- package/dist/telemetry/anonymous-meta.js +1 -1
- package/dist/telemetry/events/session-stopped.js +2 -2
- package/dist/telemetry/events/version.js +2 -2
- package/package.json +15 -15
- /package/dist/bundle-analyzer/_next/static/{vqBmkiN1gbFNhqb3DnuBm → NznUAmmDe1yhNc92YDwJZ}/_buildManifest.js +0 -0
- /package/dist/bundle-analyzer/_next/static/{vqBmkiN1gbFNhqb3DnuBm → NznUAmmDe1yhNc92YDwJZ}/_clientMiddlewareManifest.json +0 -0
- /package/dist/bundle-analyzer/_next/static/{vqBmkiN1gbFNhqb3DnuBm → NznUAmmDe1yhNc92YDwJZ}/_ssgManifest.js +0 -0
|
@@ -10,7 +10,7 @@ You can debug event listener operations by running Next.js with \`NEXT_UNHANDLED
|
|
|
10
10
|
|
|
11
11
|
You can silence warnings related to this behavior by running Next.js with \`NEXT_UNHANDLED_REJECTION_FILTER=silent\` environment variable.
|
|
12
12
|
|
|
13
|
-
You can debug event listener operations by running Next.js with \`NEXT_UNHANDLED_REJECTION_FILTER=debug\` environment variable.`),eO(),p.call(process))}),process.listeners=eC(f,function(e){return"unhandledRejection"===e?(null==t||t("Retrieving all 'unhandledRejection' listeners."),[eT,...ex]):f.call(process,e)}),e_=!0}();let eS=require("next/dist/server/app-render/work-async-storage.external.js");var eN=r("../../node_modules/.pnpm/react@19.3.0-canary-b546603b-20260121/node_modules/react/index.js");new WeakMap;class ej extends Error{constructor(e,t){super(`Invariant: ${e.endsWith(".")?e:e+"."} This is a bug in Next.js.`,t),this.name="InvariantError"}}function eA(e,t,r,n){let i,s,a=n.dynamicTracking;(i=Object.defineProperty(Error(`Route ${e} needs to bail out of prerendering at this point because it used ${t}.`),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})).digest="NEXT_PRERENDER_INTERRUPTED",n.controller.abort(i),(s=n.dynamicTracking)&&s.dynamicAccesses.push({stack:s.isDebugDynamicAccesses?Error().stack:void 0,expression:t}),a&&null===a.syncDynamicErrorWithStack&&(a.syncDynamicErrorWithStack=r)}if(eN.unstable_postpone,!1===("Route %%% needs to bail out of prerendering at this point because it used ^^^. 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".includes("needs to bail out of prerendering at this point because it used")&&"Route %%% needs to bail out of prerendering at this point because it used ^^^. 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".includes("Learn more: https://nextjs.org/docs/messages/ppr-caught-error")))throw Object.defineProperty(Error("Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E296",enumerable:!1,configurable:!0});function eD(e,t){let r=B.workUnitAsyncStorage.getStore(),n=eS.workAsyncStorage.getStore();if(r&&n)switch(r.type){case"prerender":case"prerender-runtime":if(!1===r.controller.signal.aborted){let i;switch(t){case"time":i=`Route "${n.route}" used ${e} before accessing either uncached data (e.g. \`fetch()\`) or Request data (e.g. \`cookies()\`, \`headers()\`, \`connection()\`, and \`searchParams\`). Accessing the current time in a Server Component requires reading one of these data sources first. Alternatively, consider moving this expression into a Client Component or Cache Component. See more info here: https://nextjs.org/docs/messages/next-prerender-current-time`;break;case"random":i=`Route "${n.route}" used ${e} before accessing either uncached data (e.g. \`fetch()\`) or Request data (e.g. \`cookies()\`, \`headers()\`, \`connection()\`, and \`searchParams\`). Accessing random values synchronously in a Server Component requires reading one of these data sources first. Alternatively, consider moving this expression into a Client Component or Cache Component. See more info here: https://nextjs.org/docs/messages/next-prerender-random`;break;case"crypto":i=`Route "${n.route}" used ${e} before accessing either uncached data (e.g. \`fetch()\`) or Request data (e.g. \`cookies()\`, \`headers()\`, \`connection()\`, and \`searchParams\`). Accessing random cryptographic values synchronously in a Server Component requires reading one of these data sources first. Alternatively, consider moving this expression into a Client Component or Cache Component. See more info here: https://nextjs.org/docs/messages/next-prerender-crypto`;break;default:throw Object.defineProperty(new ej("Unknown expression type in abortOnSynchronousPlatformIOAccess."),"__NEXT_ERROR_CODE",{value:"E526",enumerable:!1,configurable:!0})}eA(n.route,e,Object.defineProperty(Error(i),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0}),r)}break;case"prerender-client":if(!1===r.controller.signal.aborted){let i;switch(t){case"time":i=`Route "${n.route}" used ${e} inside a Client Component without a Suspense boundary above it. See more info here: https://nextjs.org/docs/messages/next-prerender-current-time-client`;break;case"random":i=`Route "${n.route}" used ${e} inside a Client Component without a Suspense boundary above it. See more info here: https://nextjs.org/docs/messages/next-prerender-random-client`;break;case"crypto":i=`Route "${n.route}" used ${e} inside a Client Component without a Suspense boundary above it. See more info here: https://nextjs.org/docs/messages/next-prerender-crypto-client`;break;default:throw Object.defineProperty(new ej("Unknown expression type in abortOnSynchronousPlatformIOAccess."),"__NEXT_ERROR_CODE",{value:"E526",enumerable:!1,configurable:!0})}eA(n.route,e,Object.defineProperty(Error(i),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0}),r)}}}RegExp(`\\n\\s+at Suspense \\(<anonymous>\\)(?:(?!\\n\\s+at (?:body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6) \\(<anonymous>\\))[\\s\\S])*?\\n\\s+at __next_root_layout_boundary__ \\([^\\n]*\\)`),RegExp(`\\n\\s+at __next_metadata_boundary__[\\n\\s]`),RegExp(`\\n\\s+at __next_viewport_boundary__[\\n\\s]`),RegExp(`\\n\\s+at __next_outlet_boundary__[\\n\\s]`),require("next/dist/server/runtime-reacts.external.js");let e$="`Math.random()`";try{let e=Math.random;Math.random=(function(){return eD(e$,"random"),e.apply(null,arguments)}).bind(null),Object.defineProperty(Math.random,"name",{value:"random"})}catch{console.error(`Failed to install ${e$} extension. When using \`cacheComponents\` calling this function will not correctly trigger dynamic behavior.`)}try{let e,t,r,n;Date=(v=Date,(e=Object.getOwnPropertyDescriptors(v)).now.value=(b=v.now,({now:function(){return eD("`Date.now()`","time"),b()}})["now".slice()].bind(null)),t=Reflect.apply,r=Reflect.construct,n=Object.defineProperties(function(){return new.target===void 0?(eD("`Date()`","time"),t(v,void 0,arguments)):(0==arguments.length&&eD("`new Date()`","time"),r(v,arguments,new.target))},e),Object.defineProperty(v.prototype,"constructor",{value:n}),n)}catch{console.error("Failed to install `Date` class extension. When using `cacheComponents`, APIs that read the current time will not correctly trigger dynamic behavior.")}m="undefined"==typeof crypto?r("node:crypto").webcrypto:crypto;let ek="`crypto.getRandomValues()`";try{let e=m.getRandomValues;m.getRandomValues=function(){return eD(ek,"crypto"),e.apply(m,arguments)}}catch{console.error(`Failed to install ${ek} extension. When using \`cacheComponents\` calling this function will not correctly trigger dynamic behavior.`)}try{let e=m.randomUUID;m.randomUUID=function(){return eD("`crypto.randomUUID()`","crypto"),e.apply(m,arguments)}}catch{console.error(`Failed to install ${ek} extension. When using \`cacheComponents\` calling this function will not correctly trigger dynamic behavior.`)}{let e=r("node:crypto"),t="`require('node:crypto').randomUUID()`";try{let r=e.randomUUID;e.randomUUID=function(){return eD(t,"random"),r.apply(this,arguments)}}catch{console.error(`Failed to install ${t} extension. When using \`cacheComponents\` calling this function will not correctly trigger dynamic behavior.`)}let n="`require('node:crypto').randomBytes(size)`";try{let t=e.randomBytes;e.randomBytes=function(){return"function"!=typeof arguments[1]&&eD(n,"random"),t.apply(this,arguments)}}catch{console.error(`Failed to install ${n} extension. When using \`cacheComponents\` calling this function without a callback argument will not correctly trigger dynamic behavior.`)}let i="`require('node:crypto').randomFillSync(...)`";try{let t=e.randomFillSync;e.randomFillSync=function(){return eD(i,"random"),t.apply(this,arguments)}}catch{console.error(`Failed to install ${i} extension. When using \`cacheComponents\` calling this function will not correctly trigger dynamic behavior.`)}try{let t=e.randomInt;e.randomInt=function(){return"function"!=typeof arguments[2]&&eD("`require('node:crypto').randomInt(min, max)`","random"),t.apply(this,arguments)}}catch{console.error(`Failed to install ${n} extension. When using \`cacheComponents\` calling this function without a callback argument will not correctly trigger dynamic behavior.`)}let s="`require('node:crypto').generatePrimeSync(...)`";try{let t=e.generatePrimeSync;e.generatePrimeSync=function(){return eD(s,"random"),t.apply(this,arguments)}}catch{console.error(`Failed to install ${s} extension. When using \`cacheComponents\` calling this function will not correctly trigger dynamic behavior.`)}let a="`require('node:crypto').generateKeyPairSync(...)`";try{let t=e.generateKeyPairSync;e.generateKeyPairSync=function(){return eD(a,"random"),t.apply(this,arguments)}}catch{console.error(`Failed to install ${a} extension. When using \`cacheComponents\` calling this function will not correctly trigger dynamic behavior.`)}let o="`require('node:crypto').generateKeySync(...)`";try{let t=e.generateKeySync;e.generateKeySync=function(){return eD(o,"random"),t.apply(this,arguments)}}catch{console.error(`Failed to install ${o} extension. When using \`cacheComponents\` calling this function will not correctly trigger dynamic behavior.`)}}require("next/dist/server/node-environment-extensions/fast-set-immediate.external.js");let eI=r("path"),eM=r("module"),eL=eM.prototype.require,eq=eM._resolveFilename,eH=require.resolve,eF=new Map;!function(e=[]){for(let[t,r]of e)eF.set(t,r)}(Object.entries({"styled-jsx":eI.dirname(eH("styled-jsx/package.json")),"styled-jsx/style":eH("styled-jsx/style"),"styled-jsx/style.js":eH("styled-jsx/style")}).map(([e,t])=>[e,eH(t)])),eM._resolveFilename=(function(e,t,r,n,i,s){let a=t.get(r);return a&&(r=a),e.call(eM,r,n,i,s)}).bind(null,eq,eF),eM.prototype.require=function(e){return e.endsWith(".shared-runtime")?eL.call(this,`next/dist/server/route-modules/pages/vendored/contexts/${eI.basename(e,".shared-runtime")}`):eL.call(this,e)},r("./dist/esm/server/node-polyfill-crypto.js"),"undefined"!=typeof performance&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class ez extends Error{}class eU extends Error{}class eX extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class eW extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}var eB=r("./dist/compiled/path-to-regexp/index.js");let eG="_NEXTSEP_";function eV(e){return"string"==typeof e&&!!(/\/\(\.{1,3}\):[^/\s]+/.test(e)||/:[a-zA-Z_][a-zA-Z0-9_]*:[a-zA-Z_][a-zA-Z0-9_]*/.test(e))}function eK(e){let t=e;return(t=t.replace(/(\([^)]*\)):([^/\s]+)/g,`$1${eG}:$2`)).replace(/:([^:/\s)]+)(?=:)/g,`:$1${eG}`)}function eY(e){return e.replace(RegExp(`\\)${eG}`,"g"),")")}function eJ(e,t,r){if("string"!=typeof e)return(0,eB.pathToRegexp)(e,t,r);let n=eV(e),i=n?eK(e):e;try{return(0,eB.pathToRegexp)(i,t,r)}catch(i){if(!n)try{let n=eK(e);return(0,eB.pathToRegexp)(n,t,r)}catch(e){}throw i}}function eQ(e,t){let r=eV(e),n=r?eK(e):e;try{let e=(0,eB.compile)(n,t);if(r)return t=>eY(e(t));return e}catch(n){if(!r)try{let r=eK(e),n=(0,eB.compile)(r,t);return e=>eY(n(e))}catch(e){}throw n}}function eZ({re:e,groups:t}){var r;return r=r=>{let n=e.exec(r);if(!n)return!1;let i=e=>{try{return decodeURIComponent(e)}catch{throw Object.defineProperty(new ez("failed to decode param"),"__NEXT_ERROR_CODE",{value:"E528",enumerable:!1,configurable:!0})}},s={};for(let[e,r]of Object.entries(t)){let t=n[r.pos];void 0!==t&&(r.repeat?s[e]=t.split("/").map(e=>i(e)):s[e]=i(t))}return s},e=>{let t=r(e);if(!t)return!1;let n={};for(let[e,r]of Object.entries(t))"string"==typeof r?n[e]=r.replace(RegExp(`^${eG}`),""):Array.isArray(r)?n[e]=r.map(e=>"string"==typeof e?e.replace(RegExp(`^${eG}`),""):e):n[e]=r;return n}}let e0=Symbol.for("NextInternalRequestMeta");function e1(e,t){let r=e[e0]||{};return"string"==typeof t?r[t]:r}function e4(e,t,r){let n=e1(e);return n[t]=r,e[e0]=n,n}function e2(e,t){let r=e1(e);return delete r[t],e[e0]=r,r}r("./dist/esm/shared/lib/modern-browserslist-target.js");let e3="/_not-found",e8=`${e3}/page`,e6="pages-manifest.json",e9="app-paths-manifest.json",e5="server";[...process?.features?.typescript?["next.config.mts"]:[]];let e7=["/_document","/_app","/_error"];Symbol("polyfills");let te=["/500"];function tt(e,t){let r=A().join(e,t);return ed().existsSync(r)||(r=A().join(e,"src",t),ed().existsSync(r))?r:null}class tr{static get(e,t,r){let n=Reflect.get(e,t,r);return"function"==typeof n?n.bind(e):n}static set(e,t,r,n){return Reflect.set(e,t,r,n)}static has(e,t){return Reflect.has(e,t)}static deleteProperty(e,t){return Reflect.deleteProperty(e,t)}}class tn extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers")}static callable(){throw new tn}}class ti extends Headers{constructor(e){super(),this.headers=new Proxy(e,{get(t,r,n){if("symbol"==typeof r)return tr.get(t,r,n);let i=r.toLowerCase(),s=Object.keys(e).find(e=>e.toLowerCase()===i);if(void 0!==s)return tr.get(t,s,n)},set(t,r,n,i){if("symbol"==typeof r)return tr.set(t,r,n,i);let s=r.toLowerCase(),a=Object.keys(e).find(e=>e.toLowerCase()===s);return tr.set(t,a??r,n,i)},has(t,r){if("symbol"==typeof r)return tr.has(t,r);let n=r.toLowerCase(),i=Object.keys(e).find(e=>e.toLowerCase()===n);return void 0!==i&&tr.has(t,i)},deleteProperty(t,r){if("symbol"==typeof r)return tr.deleteProperty(t,r);let n=r.toLowerCase(),i=Object.keys(e).find(e=>e.toLowerCase()===n);return void 0===i||tr.deleteProperty(t,i)}})}static seal(e){return new Proxy(e,{get(e,t,r){switch(t){case"append":case"delete":case"set":return tn.callable;default:return tr.get(e,t,r)}}})}merge(e){return Array.isArray(e)?e.join(", "):e}static from(e){return e instanceof Headers?e:new ti(e)}append(e,t){let r=this.headers[e];"string"==typeof r?this.headers[e]=[r,t]:Array.isArray(r)?r.push(t):this.headers[e]=t}delete(e){delete this.headers[e]}get(e){let t=this.headers[e];return void 0!==t?this.merge(t):null}has(e){return void 0!==this.headers[e]}set(e,t){this.headers[e]=t}forEach(e,t){for(let[r,n]of this.entries())e.call(t,n,r,this)}*entries(){for(let e of Object.keys(this.headers)){let t=e.toLowerCase(),r=this.get(t);yield[t,r]}}*keys(){for(let e of Object.keys(this.headers)){let t=e.toLowerCase();yield t}}*values(){for(let e of Object.keys(this.headers)){let t=this.get(e);yield t}}[Symbol.iterator](){return this.entries()}}let ts="text/html; charset=utf-8",ta="nxtP",to="nxtI",tl="x-matched-path",tc=".segments",tu=".segment.rsc",td=".rsc",th=".json",tp=".meta",tf="x-next-cache-tags",tm="x-next-revalidated-tags",tg={shared:"shared",reactServerComponents:"rsc",serverSideRendering:"ssr",actionBrowser:"action-browser",apiNode:"api-node",apiEdge:"api-edge",middleware:"middleware",instrument:"instrument",edgeAsset:"edge-asset",appPagesBrowser:"app-pages-browser",pagesDirBrowser:"pages-dir-browser",pagesDirEdge:"pages-dir-edge",pagesDirNode:"pages-dir-node"};({...tg,GROUP:{builtinReact:[tg.reactServerComponents,tg.actionBrowser],serverOnly:[tg.reactServerComponents,tg.actionBrowser,tg.instrument,tg.middleware],neutralTarget:[tg.apiNode,tg.apiEdge],clientOnly:[tg.serverSideRendering,tg.appPagesBrowser],bundled:[tg.reactServerComponents,tg.actionBrowser,tg.serverSideRendering,tg.appPagesBrowser,tg.shared,tg.instrument,tg.middleware],appPages:[tg.reactServerComponents,tg.serverSideRendering,tg.appPagesBrowser,tg.actionBrowser]}});let ty=require("next/dist/server/lib/trace/tracer");var tv=((E=tv||{}).handleRequest="BaseServer.handleRequest",E.run="BaseServer.run",E.pipe="BaseServer.pipe",E.getStaticHTML="BaseServer.getStaticHTML",E.render="BaseServer.render",E.renderToResponseWithComponents="BaseServer.renderToResponseWithComponents",E.renderToResponse="BaseServer.renderToResponse",E.renderToHTML="BaseServer.renderToHTML",E.renderError="BaseServer.renderError",E.renderErrorToResponse="BaseServer.renderErrorToResponse",E.renderErrorToHTML="BaseServer.renderErrorToHTML",E.render404="BaseServer.render404",E),tb=((_=tb||{}).loadDefaultErrorComponents="LoadComponents.loadDefaultErrorComponents",_.loadComponents="LoadComponents.loadComponents",_),tE=((x=tE||{}).compression="NextNodeServer.compression",x.getBuildId="NextNodeServer.getBuildId",x.createComponentTree="NextNodeServer.createComponentTree",x.clientComponentLoading="NextNodeServer.clientComponentLoading",x.getLayoutOrPageModule="NextNodeServer.getLayoutOrPageModule",x.generateStaticRoutes="NextNodeServer.generateStaticRoutes",x.generateFsStaticRoutes="NextNodeServer.generateFsStaticRoutes",x.generatePublicRoutes="NextNodeServer.generatePublicRoutes",x.generateImageRoutes="NextNodeServer.generateImageRoutes.route",x.sendRenderResult="NextNodeServer.sendRenderResult",x.proxyRequest="NextNodeServer.proxyRequest",x.runApi="NextNodeServer.runApi",x.render="NextNodeServer.render",x.renderHTML="NextNodeServer.renderHTML",x.imageOptimizer="NextNodeServer.imageOptimizer",x.getPagePath="NextNodeServer.getPagePath",x.getRoutesManifest="NextNodeServer.getRoutesManifest",x.findPageComponents="NextNodeServer.findPageComponents",x.getFontManifest="NextNodeServer.getFontManifest",x.getServerComponentManifest="NextNodeServer.getServerComponentManifest",x.getRequestHandler="NextNodeServer.getRequestHandler",x.renderToHTML="NextNodeServer.renderToHTML",x.renderError="NextNodeServer.renderError",x.renderErrorToHTML="NextNodeServer.renderErrorToHTML",x.render404="NextNodeServer.render404",x.startResponse="NextNodeServer.startResponse",x.route="route",x.onProxyReq="onProxyReq",x.apiResolver="apiResolver",x.internalFetch="internalFetch",x);Symbol("__next_preview_data");let t_=Symbol("__prerender_bypass");var tx=((w={})[w.SeeOther=303]="SeeOther",w[w.TemporaryRedirect=307]="TemporaryRedirect",w[w.PermanentRedirect=308]="PermanentRedirect",w);function tw(e){return function(){let{cookie:t}=e;if(!t)return{};let{parse:n}=r("./dist/compiled/cookie/index.js");return n(Array.isArray(t)?t.join("; "):t)}}class tR{constructor(e,t,r){this.method=e,this.url=t,this.body=r}get cookies(){return this._cookies?this._cookies:this._cookies=tw(this.headers)()}}class tC{constructor(e){this.destination=e}redirect(e,t){return this.setHeader("Location",e),this.statusCode=t,t===tx.PermanentRedirect&&this.setHeader("Refresh",`0;url=${e}`),this}}class tP extends tR{static #e=T=e0;constructor(e){var t;super(e.method.toUpperCase(),e.url,e),this._req=e,this.headers=this._req.headers,this.fetchMetrics=null==(t=this._req)?void 0:t.fetchMetrics,this[T]=this._req[e0]||{},this.streaming=!1}get originalRequest(){return this._req[e0]=this[e0],this._req.url=this.url,this._req.cookies=this.cookies,this._req}set originalRequest(e){this._req=e}stream(){if(this.streaming)throw Object.defineProperty(Error("Invariant: NodeNextRequest.stream() can only be called once"),"__NEXT_ERROR_CODE",{value:"E467",enumerable:!1,configurable:!0});return this.streaming=!0,new ReadableStream({start:e=>{this._req.on("data",t=>{e.enqueue(new Uint8Array(t))}),this._req.on("end",()=>{e.close()}),this._req.on("error",t=>{e.error(t)})}})}}class tO extends tC{get originalResponse(){return t_ in this&&(this._res[t_]=this[t_]),this._res}constructor(e){super(e),this._res=e,this.textBody=void 0}get sent(){return this._res.finished||this._res.headersSent}get statusCode(){return this._res.statusCode}set statusCode(e){this._res.statusCode=e}get statusMessage(){return this._res.statusMessage}set statusMessage(e){this._res.statusMessage=e}setHeader(e,t){return this._res.setHeader(e,t),this}removeHeader(e){return this._res.removeHeader(e),this}getHeaderValues(e){let t=this._res.getHeader(e);if(void 0!==t)return(Array.isArray(t)?t:[t]).map(e=>e.toString())}hasHeader(e){return this._res.hasHeader(e)}getHeader(e){let t=this.getHeaderValues(e);return Array.isArray(t)?t.join(","):void 0}getHeaders(){return this._res.getHeaders()}appendHeader(e,t){let r=this.getHeaderValues(e)??[];return r.includes(t)||this._res.setHeader(e,[...r,t]),this}body(e){return this.textBody=e,this}send(){this._res.end(this.textBody)}onClose(e){this.originalResponse.on("close",e)}}var tT=r("./dist/compiled/fresh/index.js"),tS=r.n(tT);async function tN({req:e,res:t,result:r,generateEtags:n,poweredByHeader:i,cacheControl:s}){if(t.finished||t.headersSent)return;i&&r.contentType===ts&&t.setHeader("X-Powered-By","Next.js"),s&&!t.getHeader("Cache-Control")&&t.setHeader("Cache-Control",function({revalidate:e,expire:t}){let r="number"==typeof e&&void 0!==t&&e<t?`, stale-while-revalidate=${t-e}`:"";return 0===e?"private, no-cache, no-store, max-age=0, must-revalidate":"number"==typeof e?`s-maxage=${e}${r}`:`s-maxage=31536000${r}`}(s));let a=r.isDynamic?null:r.toUnchunkedString();if(n&&null!==a){let r=((e,t=!1)=>(t?'W/"':'"')+(e=>{let t=e.length,r=0,n=0,i=8997,s=0,a=33826,o=0,l=40164,c=0,u=52210;for(;r<t;)i^=e.charCodeAt(r++),n=435*i,s=435*a,o=435*l,c=435*u,o+=i<<8,c+=a<<8,s+=n>>>16,i=65535&n,o+=s>>>16,a=65535&s,u=c+(o>>>16)&65535,l=65535&o;return(15&u)*0x1000000000000+0x100000000*l+65536*a+(i^u>>4)})(e).toString(36)+e.length.toString(36)+'"')(a);if(r&&t.setHeader("ETag",r),tS()(e.headers,{etag:r})&&(t.statusCode=304,t.end(),1))return}(!t.getHeader("Content-Type")&&r.contentType&&t.setHeader("Content-Type",r.contentType),a&&t.setHeader("Content-Length",Buffer.byteLength(a)),"HEAD"===e.method)?t.end(null):null!==a?t.end(a):await r.pipeToNodeResponse(t)}function tj(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function tA(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function tD(e){if(e.startsWith("/"))return function(e,t,r=!0){let n=new URL("http://n"),i=e.startsWith(".")?new URL("http://n"):n,{pathname:s,searchParams:a,search:o,hash:l,href:c,origin:u}=e.startsWith("/")?new URL(`${i.protocol}//${i.host}${e}`):new URL(e,i);if(u!==n.origin)throw Object.defineProperty(Error(`invariant: invalid relative URL, router received ${e}`),"__NEXT_ERROR_CODE",{value:"E159",enumerable:!1,configurable:!0});return{auth:null,host:null,hostname:null,pathname:s,port:null,protocol:null,query:r?tj(a):void 0,search:o,hash:l,href:c.slice(u.length),slashes:null}}(e);let t=new URL(e),r=t.username,n=t.password,i=r?n?`${r}:${n}`:r:null,s=t.pathname,a=t.search;return{auth:i,hash:t.hash,hostname:t.hostname,href:t.href,pathname:s,port:t.port,protocol:t.protocol,query:tj(t.searchParams),search:a,origin:t.origin,slashes:"//"===t.href.slice(t.protocol.length,t.protocol.length+2)}}let t$={wait:es(Q("○")),error:et(Q("⨯")),warn:en(Q("⚠")),ready:"▲",info:es(Q(" ")),event:er(Q("✓")),trace:ei(Q("\xbb"))},tk={log:"log",warn:"warn",error:"error"};function tI(e,...t){(""===t[0]||void 0===t[0])&&1===t.length&&t.shift();let r=e in tk?tk[e]:"log",n=t$[e];0===t.length?console[r](""):1===t.length&&"string"==typeof t[0]?console[r](n+" "+t[0]):console[r](n,...t)}function tM(e){console.log(e)}function tL(...e){tI("wait",...e)}function tq(...e){tI("error",...e)}function tH(...e){tI("warn",...e)}function tF(...e){tI("ready",...e)}function tz(...e){tI("info",...e)}function tU(...e){tI("event",...e)}function tX(...e){tI("trace",...e)}let tW=new M(1e4,e=>e.length);function tB(...e){let t=e.join(" ");tW.has(t)||(tW.set(t,t),tH(...e))}let tG=new M(1e4,e=>e.length);function tV(...e){let t=e.join(" ");tG.has(t)||(tG.set(t,t),tq(...e))}var tK=r("os"),tY=r.n(tK);let tJ="100 MB";function tQ(e){let t=r("./dist/compiled/bytes/index.js").parse(e??tJ);return null===t||isNaN(t)||t<1?void 0:t}Object.freeze({env:{},webpack:null,typescript:{ignoreBuildErrors:!1,tsconfigPath:void 0},typedRoutes:!1,distDir:".next",cleanDistDir:!0,assetPrefix:"",cacheHandler:process.env.NEXT_CACHE_HANDLER_PATH,cacheMaxMemorySize:0x3200000,configOrigin:"default",useFileSystemPublicRoutes:!0,generateBuildId:()=>null,generateEtags:!0,pageExtensions:["tsx","ts","jsx","js"],poweredByHeader:!0,compress:!0,images:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1,customCacheHandler:!1},devIndicators:{position:"bottom-left"},onDemandEntries:{maxInactiveAge:6e4,pagesBufferLength:5},basePath:"",sassOptions:{},trailingSlash:!1,i18n:null,productionBrowserSourceMaps:!1,excludeDefaultMomentLocales:!0,reactProductionProfiling:!1,reactStrictMode:null,reactMaxHeadersLength:6e3,httpAgentOptions:{keepAlive:!0},logging:{},compiler:{},expireTime:process.env.NEXT_PRIVATE_CDN_CONSUMED_SWR_CACHE_CONTROL?void 0:31536e3,staticPageGenerationTimeout:60,output:process.env.NEXT_PRIVATE_STANDALONE?"standalone":void 0,modularizeImports:void 0,outputFileTracingRoot:process.env.NEXT_PRIVATE_OUTPUT_TRACE_ROOT||"",allowedDevOrigins:void 0,enablePrerenderSourceMaps:void 0,cacheComponents:!1,cacheLife:{default:{stale:void 0,revalidate:900,expire:0xfffffffe},seconds:{stale:30,revalidate:1,expire:60},minutes:{stale:300,revalidate:60,expire:3600},hours:{stale:300,revalidate:3600,expire:86400},days:{stale:300,revalidate:86400,expire:604800},weeks:{stale:300,revalidate:604800,expire:2592e3},max:{stale:300,revalidate:2592e3,expire:31536e3}},cacheHandlers:{default:process.env.NEXT_DEFAULT_CACHE_HANDLER_PATH,remote:process.env.NEXT_REMOTE_CACHE_HANDLER_PATH,static:process.env.NEXT_STATIC_CACHE_HANDLER_PATH},experimental:{adapterPath:process.env.NEXT_ADAPTER_PATH||void 0,useSkewCookie:!1,cssChunking:!0,multiZoneDraftMode:!1,appNavFailHandling:!1,prerenderEarlyExit:!0,serverMinification:!0,linkNoTouchStart:!1,caseSensitiveRoutes:!1,clientParamParsingOrigins:void 0,dynamicOnHover:!1,preloadEntriesOnStart:!0,clientRouterFilter:!0,clientRouterFilterRedirects:!1,fetchCacheKeyPrefix:"",proxyPrefetch:"flexible",optimisticClientCache:!0,manualClientBasePath:!1,cpus:Math.max(1,(Number(process.env.CIRCLE_NODE_TOTAL)||(tY().cpus()||{length:1}).length)-1),memoryBasedWorkersCount:!1,imgOptConcurrency:null,imgOptTimeoutInSeconds:7,imgOptMaxInputPixels:0xfff8001,imgOptSequentialRead:null,imgOptSkipMetadata:null,isrFlushToDisk:!0,workerThreads:!1,proxyTimeout:void 0,optimizeCss:!1,nextScriptWorkers:!1,scrollRestoration:!1,externalDir:!1,disableOptimizedLoading:!1,gzipSize:!0,craCompat:!1,esmExternals:!0,fullySpecified:!1,swcTraceProfiling:!1,forceSwcTransforms:!1,swcPlugins:void 0,largePageDataBytes:128e3,disablePostcssPresetEnv:void 0,urlImports:void 0,typedEnv:!1,clientTraceMetadata:void 0,parallelServerCompiles:!1,parallelServerBuildTraces:!1,ppr:!1,authInterrupts:!1,webpackBuildWorker:void 0,webpackMemoryOptimizations:!1,optimizeServerReact:!0,strictRouteTypes:!1,viewTransition:!1,removeUncaughtErrorAndRejectionListeners:!1,validateRSCRequestHeaders:!!(process.env.__NEXT_TEST_MODE||!(!"16.2.0-canary.3".includes("canary")&&!process.env.__NEXT_TEST_MODE&&!process.env.NEXT_PRIVATE_LOCAL_DEV)),staleTimes:{dynamic:0,static:300},allowDevelopmentBuild:void 0,reactDebugChannel:!1,staticGenerationRetryCount:void 0,serverComponentsHmrCache:!0,staticGenerationMaxConcurrency:8,staticGenerationMinPagesPerWorker:25,transitionIndicator:!1,gestureTransition:!1,inlineCss:!1,useCache:void 0,slowModuleDetection:void 0,globalNotFound:!1,browserDebugInfoInTerminal:"warn",lockDistDir:!0,isolatedDevBuild:!0,proxyClientMaxBodySize:0xa00000,hideLogsAfterAbort:!1,mcpServer:!0,turbopackFileSystemCacheForDev:!0,turbopackFileSystemCacheForBuild:!1,turbopackInferModuleSideEffects:!0,devCacheControlNoCache:!1},htmlLimitedBots:void 0,bundlePagesRouterDependencies:!1});let tZ="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",t0=`(${tZ}[.]){3}${tZ}`,t1="(?:[0-9a-fA-F]{1,4})",t4=RegExp(`^((?:${t1}:){7}(?:${t1}|:)|(?:${t1}:){6}(?:${t0}|:${t1}|:)|(?:${t1}:){5}(?::${t0}|(:${t1}){1,2}|:)|(?:${t1}:){4}(?:(:${t1}){0,1}:${t0}|(:${t1}){1,3}|:)|(?:${t1}:){3}(?:(:${t1}){0,2}:${t0}|(:${t1}){1,4}|:)|(?:${t1}:){2}(?:(:${t1}){0,3}:${t0}|(:${t1}){1,5}|:)|(?:${t1}:){1}(?:(:${t1}){0,4}:${t0}|(:${t1}){1,6}|:)|(?::((?::${t1}){0,5}:${t0}|(?::${t1}){1,7}|:)))(%[0-9a-zA-Z-.:]{1,})?$`);function t2(e){return e.startsWith("/")?e:`/${e}`}function t3(e){return t2(e.split("/").reduce((e,t,r,n)=>t?"("===t[0]&&t.endsWith(")")||"@"===t[0]||("page"===t||"route"===t)&&r===n.length-1?e:`${e}/${t}`:e,""))}function t8(e){return e.replace(/\.rsc($|\?)/,"$1")}let t6=["(..)(..)","(.)","(..)","(...)"];function t9(e){return void 0!==e.split("/").find(e=>t6.find(t=>e.startsWith(t)))}let t5=/\/[^/]*\[[^/]+\][^/]*(?=\/|$)/,t7=/\/\[[^/]+\](?=\/|$)/;function re(e,t=!0){return(t9(e)&&(e=function(e){let t,r,n;for(let i of e.split("/"))if(r=t6.find(e=>i.startsWith(e))){[t,n]=e.split(r,2);break}if(!t||!r||!n)throw Object.defineProperty(Error(`Invalid interception route: ${e}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`),"__NEXT_ERROR_CODE",{value:"E269",enumerable:!1,configurable:!0});switch(t=t3(t),r){case"(.)":n="/"===t?`/${n}`:t+"/"+n;break;case"(..)":if("/"===t)throw Object.defineProperty(Error(`Invalid interception route: ${e}. Cannot use (..) marker at the root level, use (.) instead.`),"__NEXT_ERROR_CODE",{value:"E207",enumerable:!1,configurable:!0});n=t.split("/").slice(0,-1).concat(n).join("/");break;case"(...)":n="/"+n;break;case"(..)(..)":let i=t.split("/");if(i.length<=2)throw Object.defineProperty(Error(`Invalid interception route: ${e}. Cannot use (..)(..) marker at the root level or one level up.`),"__NEXT_ERROR_CODE",{value:"E486",enumerable:!1,configurable:!0});n=i.slice(0,-2).concat(n).join("/");break;default:throw Object.defineProperty(Error("Invariant: unexpected marker"),"__NEXT_ERROR_CODE",{value:"E112",enumerable:!1,configurable:!0})}return{interceptingRoute:t,interceptedRoute:n}}(e).interceptedRoute),t)?t7.test(e):t5.test(e)}let rt=/[\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,rr=/Googlebot(?!-)|Googlebot$/i,rn=rt.source;function ri(){}new Uint8Array([60,104,116,109,108]),new Uint8Array([60,98,111,100,121]),new Uint8Array([60,47,104,101,97,100,62]),new Uint8Array([60,47,98,111,100,121,62]),new Uint8Array([60,47,104,116,109,108,62]),new Uint8Array([60,47,98,111,100,121,62,60,47,104,116,109,108,62]),new Uint8Array([60,109,101,116,97,32,110,97,109,101,61,34,194,171,110,120,116,45,105,99,111,110,194,187,34]);let rs=new TextEncoder;function ra(e){return new ReadableStream({start(t){t.enqueue(rs.encode(e)),t.close()}})}function ro(e){return new ReadableStream({start(t){t.enqueue(e),t.close()}})}async function rl(e,t){let r=new TextDecoder("utf-8",{fatal:!0}),n="";for await(let i of e){if(null==t?void 0:t.aborted)return n;n+=r.decode(i,{stream:!0})}return n+r.decode()}function rc(e){var t,r,n,i,s,a=[],o=0;function l(){for(;o<e.length&&/\s/.test(e.charAt(o));)o+=1;return o<e.length}for(;o<e.length;){for(t=o,s=!1;l();)if(","===(r=e.charAt(o))){for(n=o,o+=1,l(),i=o;o<e.length&&"="!==(r=e.charAt(o))&&";"!==r&&","!==r;)o+=1;o<e.length&&"="===e.charAt(o)?(s=!0,o=i,a.push(e.substring(t,n)),t=o):o=n+1}else o+=1;(!s||o>=e.length)&&a.push(e.substring(t,e.length))}return a}function ru(e){let t={},r=[];if(e)for(let[n,i]of e.entries())"set-cookie"===n.toLowerCase()?(r.push(...rc(i)),t[n]=1===r.length?r[0]:r):t[n]=i;return t}function rd(e){try{return String(new URL(String(e)))}catch(t){throw Object.defineProperty(Error(`URL is malformed "${String(e)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`,{cause:t}),"__NEXT_ERROR_CODE",{value:"E61",enumerable:!1,configurable:!0})}}function rh(e){for(let t of[ta,to])if(e!==t&&e.startsWith(t))return e.substring(t.length);return null}function rp(e){return e.replace(/\/$/,"")||"/"}function rf(e){let t=e.indexOf("#"),r=e.indexOf("?"),n=r>-1&&(t<0||r<t);return n||t>-1?{pathname:e.substring(0,n?r:t),query:n?e.substring(r,t>-1?t:void 0):"",hash:t>-1?e.slice(t):""}:{pathname:e,query:"",hash:""}}function rm(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:n,hash:i}=rf(e);return`${t}${r}${n}${i}`}function rg(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:n,hash:i}=rf(e);return`${r}${t}${n}${i}`}function ry(e,t){if("string"!=typeof e)return!1;let{pathname:r}=rf(e);return r===t||r.startsWith(t+"/")}function rv(e,t){let r;if(t?.host&&!Array.isArray(t.host))r=t.host.toString().split(":",1)[0];else{if(!e.hostname)return;r=e.hostname}return r.toLowerCase()}let rb=new WeakMap;function rE(e,t){let r;if(!t)return{pathname:e};let n=rb.get(t);n||(n=t.map(e=>e.toLowerCase()),rb.set(t,n));let i=e.split("/",2);if(!i[1])return{pathname:e};let s=i[1].toLowerCase(),a=n.indexOf(s);return a<0?{pathname:e}:(r=t[a],{pathname:e=e.slice(r.length+1)||"/",detectedLocale:r})}function r_(e,t){if(!ry(e,t))return e;let r=e.slice(t.length);return r.startsWith("/")?r:`/${r}`}function rx(e,t){let{basePath:r,i18n:n,trailingSlash:i}=t.nextConfig??{},s={pathname:e,trailingSlash:"/"!==e?e.endsWith("/"):i};r&&ry(s.pathname,r)&&(s.pathname=r_(s.pathname,r),s.basePath=r);let a=s.pathname;if(s.pathname.startsWith("/_next/data/")&&s.pathname.endsWith(".json")){let e=s.pathname.replace(/^\/_next\/data\//,"").replace(/\.json$/,"").split("/");s.buildId=e[0],a="index"!==e[1]?`/${e.slice(1).join("/")}`:"/",!0===t.parseData&&(s.pathname=a)}if(n){let e=t.i18nProvider?t.i18nProvider.analyze(s.pathname):rE(s.pathname,n.locales);s.locale=e.detectedLocale,s.pathname=e.pathname??s.pathname,!e.detectedLocale&&s.buildId&&(e=t.i18nProvider?t.i18nProvider.analyze(a):rE(a,n.locales)).detectedLocale&&(s.locale=e.detectedLocale)}return s}let rw=/(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;function rR(e,t){return new URL(String(e).replace(rw,"localhost"),t&&String(t).replace(rw,"localhost"))}let rC=Symbol("NextURLInternal");class rP{constructor(e,t,r){let n,i;"object"==typeof t&&"pathname"in t||"string"==typeof t?(n=t,i=r||{}):i=r||t||{},this[rC]={url:rR(e,n??i.base),options:i,basePath:""},this.analyze()}analyze(){var e,t,r,n,i;let s=rx(this[rC].url.pathname,{nextConfig:this[rC].options.nextConfig,parseData:!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE,i18nProvider:this[rC].options.i18nProvider}),a=rv(this[rC].url,this[rC].options.headers);this[rC].domainLocale=this[rC].options.i18nProvider?this[rC].options.i18nProvider.detectDomainLocale(a):function(e,t,r){if(e){for(let n of(r&&(r=r.toLowerCase()),e))if(t===n.domain?.split(":",1)[0].toLowerCase()||r===n.defaultLocale.toLowerCase()||n.locales?.some(e=>e.toLowerCase()===r))return n}}(null==(t=this[rC].options.nextConfig)||null==(e=t.i18n)?void 0:e.domains,a);let o=(null==(r=this[rC].domainLocale)?void 0:r.defaultLocale)||(null==(i=this[rC].options.nextConfig)||null==(n=i.i18n)?void 0:n.defaultLocale);this[rC].url.pathname=s.pathname,this[rC].defaultLocale=o,this[rC].basePath=s.basePath??"",this[rC].buildId=s.buildId,this[rC].locale=s.locale??o,this[rC].trailingSlash=s.trailingSlash}formatPathname(){var e;let t;return t=function(e,t,r,n){if(!t||t===r)return e;let i=e.toLowerCase();return!n&&(ry(i,"/api")||ry(i,`/${t.toLowerCase()}`))?e:rm(e,`/${t}`)}((e={basePath:this[rC].basePath,buildId:this[rC].buildId,defaultLocale:this[rC].options.forceLocale?void 0:this[rC].defaultLocale,locale:this[rC].locale,pathname:this[rC].url.pathname,trailingSlash:this[rC].trailingSlash}).pathname,e.locale,e.buildId?void 0:e.defaultLocale,e.ignorePrefix),(e.buildId||!e.trailingSlash)&&(t=rp(t)),e.buildId&&(t=rg(rm(t,`/_next/data/${e.buildId}`),"/"===e.pathname?"index.json":".json")),t=rm(t,e.basePath),!e.buildId&&e.trailingSlash?t.endsWith("/")?t:rg(t,"/"):rp(t)}formatSearch(){return this[rC].url.search}get buildId(){return this[rC].buildId}set buildId(e){this[rC].buildId=e}get locale(){return this[rC].locale??""}set locale(e){var t,r;if(!this[rC].locale||!(null==(r=this[rC].options.nextConfig)||null==(t=r.i18n)?void 0:t.locales.includes(e)))throw Object.defineProperty(TypeError(`The NextURL configuration includes no locale "${e}"`),"__NEXT_ERROR_CODE",{value:"E597",enumerable:!1,configurable:!0});this[rC].locale=e}get defaultLocale(){return this[rC].defaultLocale}get domainLocale(){return this[rC].domainLocale}get searchParams(){return this[rC].url.searchParams}get host(){return this[rC].url.host}set host(e){this[rC].url.host=e}get hostname(){return this[rC].url.hostname}set hostname(e){this[rC].url.hostname=e}get port(){return this[rC].url.port}set port(e){this[rC].url.port=e}get protocol(){return this[rC].url.protocol}set protocol(e){this[rC].url.protocol=e}get href(){let e=this.formatPathname(),t=this.formatSearch();return`${this.protocol}//${this.host}${e}${t}${this.hash}`}set href(e){this[rC].url=rR(e),this.analyze()}get origin(){return this[rC].url.origin}get pathname(){return this[rC].url.pathname}set pathname(e){this[rC].url.pathname=e}get hash(){return this[rC].url.hash}set hash(e){this[rC].url.hash=e}get search(){return this[rC].url.search}set search(e){this[rC].url.search=e}get password(){return this[rC].url.password}set password(e){this[rC].url.password=e}get username(){return this[rC].url.username}set username(e){this[rC].url.username=e}get basePath(){return this[rC].basePath}set basePath(e){this[rC].basePath=e.startsWith("/")?e:`/${e}`}toString(){return this.href}toJSON(){return this.href}[Symbol.for("edge-runtime.inspect.custom")](){return{href:this.href,origin:this.origin,protocol:this.protocol,username:this.username,password:this.password,host:this.host,hostname:this.hostname,port:this.port,pathname:this.pathname,search:this.search,searchParams:this.searchParams,hash:this.hash}}clone(){return new rP(String(this),this[rC].options)}}class rO extends Error{constructor({page:e}){super(`The middleware "${e}" accepts an async API directly with the form:
|
|
13
|
+
You can debug event listener operations by running Next.js with \`NEXT_UNHANDLED_REJECTION_FILTER=debug\` environment variable.`),eO(),p.call(process))}),process.listeners=eC(f,function(e){return"unhandledRejection"===e?(null==t||t("Retrieving all 'unhandledRejection' listeners."),[eT,...ex]):f.call(process,e)}),e_=!0}();let eS=require("next/dist/server/app-render/work-async-storage.external.js");var eN=r("../../node_modules/.pnpm/react@19.3.0-canary-b546603b-20260121/node_modules/react/index.js");new WeakMap;class ej extends Error{constructor(e,t){super(`Invariant: ${e.endsWith(".")?e:e+"."} This is a bug in Next.js.`,t),this.name="InvariantError"}}function eA(e,t,r,n){let i,s,a=n.dynamicTracking;(i=Object.defineProperty(Error(`Route ${e} needs to bail out of prerendering at this point because it used ${t}.`),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})).digest="NEXT_PRERENDER_INTERRUPTED",n.controller.abort(i),(s=n.dynamicTracking)&&s.dynamicAccesses.push({stack:s.isDebugDynamicAccesses?Error().stack:void 0,expression:t}),a&&null===a.syncDynamicErrorWithStack&&(a.syncDynamicErrorWithStack=r)}if(eN.unstable_postpone,!1===("Route %%% needs to bail out of prerendering at this point because it used ^^^. 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".includes("needs to bail out of prerendering at this point because it used")&&"Route %%% needs to bail out of prerendering at this point because it used ^^^. 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".includes("Learn more: https://nextjs.org/docs/messages/ppr-caught-error")))throw Object.defineProperty(Error("Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E296",enumerable:!1,configurable:!0});function eD(e,t){let r=B.workUnitAsyncStorage.getStore(),n=eS.workAsyncStorage.getStore();if(r&&n)switch(r.type){case"prerender":case"prerender-runtime":if(!1===r.controller.signal.aborted){let i;switch(t){case"time":i=`Route "${n.route}" used ${e} before accessing either uncached data (e.g. \`fetch()\`) or Request data (e.g. \`cookies()\`, \`headers()\`, \`connection()\`, and \`searchParams\`). Accessing the current time in a Server Component requires reading one of these data sources first. Alternatively, consider moving this expression into a Client Component or Cache Component. See more info here: https://nextjs.org/docs/messages/next-prerender-current-time`;break;case"random":i=`Route "${n.route}" used ${e} before accessing either uncached data (e.g. \`fetch()\`) or Request data (e.g. \`cookies()\`, \`headers()\`, \`connection()\`, and \`searchParams\`). Accessing random values synchronously in a Server Component requires reading one of these data sources first. Alternatively, consider moving this expression into a Client Component or Cache Component. See more info here: https://nextjs.org/docs/messages/next-prerender-random`;break;case"crypto":i=`Route "${n.route}" used ${e} before accessing either uncached data (e.g. \`fetch()\`) or Request data (e.g. \`cookies()\`, \`headers()\`, \`connection()\`, and \`searchParams\`). Accessing random cryptographic values synchronously in a Server Component requires reading one of these data sources first. Alternatively, consider moving this expression into a Client Component or Cache Component. See more info here: https://nextjs.org/docs/messages/next-prerender-crypto`;break;default:throw Object.defineProperty(new ej("Unknown expression type in abortOnSynchronousPlatformIOAccess."),"__NEXT_ERROR_CODE",{value:"E526",enumerable:!1,configurable:!0})}eA(n.route,e,Object.defineProperty(Error(i),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0}),r)}break;case"prerender-client":if(!1===r.controller.signal.aborted){let i;switch(t){case"time":i=`Route "${n.route}" used ${e} inside a Client Component without a Suspense boundary above it. See more info here: https://nextjs.org/docs/messages/next-prerender-current-time-client`;break;case"random":i=`Route "${n.route}" used ${e} inside a Client Component without a Suspense boundary above it. See more info here: https://nextjs.org/docs/messages/next-prerender-random-client`;break;case"crypto":i=`Route "${n.route}" used ${e} inside a Client Component without a Suspense boundary above it. See more info here: https://nextjs.org/docs/messages/next-prerender-crypto-client`;break;default:throw Object.defineProperty(new ej("Unknown expression type in abortOnSynchronousPlatformIOAccess."),"__NEXT_ERROR_CODE",{value:"E526",enumerable:!1,configurable:!0})}eA(n.route,e,Object.defineProperty(Error(i),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0}),r)}}}RegExp(`\\n\\s+at Suspense \\(<anonymous>\\)(?:(?!\\n\\s+at (?:body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6) \\(<anonymous>\\))[\\s\\S])*?\\n\\s+at __next_root_layout_boundary__ \\([^\\n]*\\)`),RegExp(`\\n\\s+at __next_metadata_boundary__[\\n\\s]`),RegExp(`\\n\\s+at __next_viewport_boundary__[\\n\\s]`),RegExp(`\\n\\s+at __next_outlet_boundary__[\\n\\s]`),require("next/dist/server/runtime-reacts.external.js");let e$="`Math.random()`";try{let e=Math.random;Math.random=(function(){return eD(e$,"random"),e.apply(null,arguments)}).bind(null),Object.defineProperty(Math.random,"name",{value:"random"})}catch{console.error(`Failed to install ${e$} extension. When using \`cacheComponents\` calling this function will not correctly trigger dynamic behavior.`)}try{let e,t,r,n;Date=(v=Date,(e=Object.getOwnPropertyDescriptors(v)).now.value=(b=v.now,({now:function(){return eD("`Date.now()`","time"),b()}})["now".slice()].bind(null)),t=Reflect.apply,r=Reflect.construct,n=Object.defineProperties(function(){return new.target===void 0?(eD("`Date()`","time"),t(v,void 0,arguments)):(0==arguments.length&&eD("`new Date()`","time"),r(v,arguments,new.target))},e),Object.defineProperty(v.prototype,"constructor",{value:n}),n)}catch{console.error("Failed to install `Date` class extension. When using `cacheComponents`, APIs that read the current time will not correctly trigger dynamic behavior.")}m="undefined"==typeof crypto?r("node:crypto").webcrypto:crypto;let ek="`crypto.getRandomValues()`";try{let e=m.getRandomValues;m.getRandomValues=function(){return eD(ek,"crypto"),e.apply(m,arguments)}}catch{console.error(`Failed to install ${ek} extension. When using \`cacheComponents\` calling this function will not correctly trigger dynamic behavior.`)}try{let e=m.randomUUID;m.randomUUID=function(){return eD("`crypto.randomUUID()`","crypto"),e.apply(m,arguments)}}catch{console.error(`Failed to install ${ek} extension. When using \`cacheComponents\` calling this function will not correctly trigger dynamic behavior.`)}{let e=r("node:crypto"),t="`require('node:crypto').randomUUID()`";try{let r=e.randomUUID;e.randomUUID=function(){return eD(t,"random"),r.apply(this,arguments)}}catch{console.error(`Failed to install ${t} extension. When using \`cacheComponents\` calling this function will not correctly trigger dynamic behavior.`)}let n="`require('node:crypto').randomBytes(size)`";try{let t=e.randomBytes;e.randomBytes=function(){return"function"!=typeof arguments[1]&&eD(n,"random"),t.apply(this,arguments)}}catch{console.error(`Failed to install ${n} extension. When using \`cacheComponents\` calling this function without a callback argument will not correctly trigger dynamic behavior.`)}let i="`require('node:crypto').randomFillSync(...)`";try{let t=e.randomFillSync;e.randomFillSync=function(){return eD(i,"random"),t.apply(this,arguments)}}catch{console.error(`Failed to install ${i} extension. When using \`cacheComponents\` calling this function will not correctly trigger dynamic behavior.`)}try{let t=e.randomInt;e.randomInt=function(){return"function"!=typeof arguments[2]&&eD("`require('node:crypto').randomInt(min, max)`","random"),t.apply(this,arguments)}}catch{console.error(`Failed to install ${n} extension. When using \`cacheComponents\` calling this function without a callback argument will not correctly trigger dynamic behavior.`)}let s="`require('node:crypto').generatePrimeSync(...)`";try{let t=e.generatePrimeSync;e.generatePrimeSync=function(){return eD(s,"random"),t.apply(this,arguments)}}catch{console.error(`Failed to install ${s} extension. When using \`cacheComponents\` calling this function will not correctly trigger dynamic behavior.`)}let a="`require('node:crypto').generateKeyPairSync(...)`";try{let t=e.generateKeyPairSync;e.generateKeyPairSync=function(){return eD(a,"random"),t.apply(this,arguments)}}catch{console.error(`Failed to install ${a} extension. When using \`cacheComponents\` calling this function will not correctly trigger dynamic behavior.`)}let o="`require('node:crypto').generateKeySync(...)`";try{let t=e.generateKeySync;e.generateKeySync=function(){return eD(o,"random"),t.apply(this,arguments)}}catch{console.error(`Failed to install ${o} extension. When using \`cacheComponents\` calling this function will not correctly trigger dynamic behavior.`)}}require("next/dist/server/node-environment-extensions/fast-set-immediate.external.js");let eI=r("path"),eM=r("module"),eL=eM.prototype.require,eq=eM._resolveFilename,eH=require.resolve,eF=new Map;!function(e=[]){for(let[t,r]of e)eF.set(t,r)}(Object.entries({"styled-jsx":eI.dirname(eH("styled-jsx/package.json")),"styled-jsx/style":eH("styled-jsx/style"),"styled-jsx/style.js":eH("styled-jsx/style")}).map(([e,t])=>[e,eH(t)])),eM._resolveFilename=(function(e,t,r,n,i,s){let a=t.get(r);return a&&(r=a),e.call(eM,r,n,i,s)}).bind(null,eq,eF),eM.prototype.require=function(e){return e.endsWith(".shared-runtime")?eL.call(this,`next/dist/server/route-modules/pages/vendored/contexts/${eI.basename(e,".shared-runtime")}`):eL.call(this,e)},r("./dist/esm/server/node-polyfill-crypto.js"),"undefined"!=typeof performance&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class ez extends Error{}class eU extends Error{}class eX extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class eW extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}var eB=r("./dist/compiled/path-to-regexp/index.js");let eG="_NEXTSEP_";function eV(e){return"string"==typeof e&&!!(/\/\(\.{1,3}\):[^/\s]+/.test(e)||/:[a-zA-Z_][a-zA-Z0-9_]*:[a-zA-Z_][a-zA-Z0-9_]*/.test(e))}function eK(e){let t=e;return(t=t.replace(/(\([^)]*\)):([^/\s]+)/g,`$1${eG}:$2`)).replace(/:([^:/\s)]+)(?=:)/g,`:$1${eG}`)}function eY(e){return e.replace(RegExp(`\\)${eG}`,"g"),")")}function eJ(e,t,r){if("string"!=typeof e)return(0,eB.pathToRegexp)(e,t,r);let n=eV(e),i=n?eK(e):e;try{return(0,eB.pathToRegexp)(i,t,r)}catch(i){if(!n)try{let n=eK(e);return(0,eB.pathToRegexp)(n,t,r)}catch(e){}throw i}}function eQ(e,t){let r=eV(e),n=r?eK(e):e;try{let e=(0,eB.compile)(n,t);if(r)return t=>eY(e(t));return e}catch(n){if(!r)try{let r=eK(e),n=(0,eB.compile)(r,t);return e=>eY(n(e))}catch(e){}throw n}}function eZ({re:e,groups:t}){var r;return r=r=>{let n=e.exec(r);if(!n)return!1;let i=e=>{try{return decodeURIComponent(e)}catch{throw Object.defineProperty(new ez("failed to decode param"),"__NEXT_ERROR_CODE",{value:"E528",enumerable:!1,configurable:!0})}},s={};for(let[e,r]of Object.entries(t)){let t=n[r.pos];void 0!==t&&(r.repeat?s[e]=t.split("/").map(e=>i(e)):s[e]=i(t))}return s},e=>{let t=r(e);if(!t)return!1;let n={};for(let[e,r]of Object.entries(t))"string"==typeof r?n[e]=r.replace(RegExp(`^${eG}`),""):Array.isArray(r)?n[e]=r.map(e=>"string"==typeof e?e.replace(RegExp(`^${eG}`),""):e):n[e]=r;return n}}let e0=Symbol.for("NextInternalRequestMeta");function e1(e,t){let r=e[e0]||{};return"string"==typeof t?r[t]:r}function e4(e,t,r){let n=e1(e);return n[t]=r,e[e0]=n,n}function e2(e,t){let r=e1(e);return delete r[t],e[e0]=r,r}r("./dist/esm/shared/lib/modern-browserslist-target.js");let e3="/_not-found",e8=`${e3}/page`,e6="pages-manifest.json",e5="app-paths-manifest.json",e9="server";[...process?.features?.typescript?["next.config.mts"]:[]];let e7=["/_document","/_app","/_error"];Symbol("polyfills");let te=["/500"];function tt(e,t){let r=A().join(e,t);return ed().existsSync(r)||(r=A().join(e,"src",t),ed().existsSync(r))?r:null}class tr{static get(e,t,r){let n=Reflect.get(e,t,r);return"function"==typeof n?n.bind(e):n}static set(e,t,r,n){return Reflect.set(e,t,r,n)}static has(e,t){return Reflect.has(e,t)}static deleteProperty(e,t){return Reflect.deleteProperty(e,t)}}class tn extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers")}static callable(){throw new tn}}class ti extends Headers{constructor(e){super(),this.headers=new Proxy(e,{get(t,r,n){if("symbol"==typeof r)return tr.get(t,r,n);let i=r.toLowerCase(),s=Object.keys(e).find(e=>e.toLowerCase()===i);if(void 0!==s)return tr.get(t,s,n)},set(t,r,n,i){if("symbol"==typeof r)return tr.set(t,r,n,i);let s=r.toLowerCase(),a=Object.keys(e).find(e=>e.toLowerCase()===s);return tr.set(t,a??r,n,i)},has(t,r){if("symbol"==typeof r)return tr.has(t,r);let n=r.toLowerCase(),i=Object.keys(e).find(e=>e.toLowerCase()===n);return void 0!==i&&tr.has(t,i)},deleteProperty(t,r){if("symbol"==typeof r)return tr.deleteProperty(t,r);let n=r.toLowerCase(),i=Object.keys(e).find(e=>e.toLowerCase()===n);return void 0===i||tr.deleteProperty(t,i)}})}static seal(e){return new Proxy(e,{get(e,t,r){switch(t){case"append":case"delete":case"set":return tn.callable;default:return tr.get(e,t,r)}}})}merge(e){return Array.isArray(e)?e.join(", "):e}static from(e){return e instanceof Headers?e:new ti(e)}append(e,t){let r=this.headers[e];"string"==typeof r?this.headers[e]=[r,t]:Array.isArray(r)?r.push(t):this.headers[e]=t}delete(e){delete this.headers[e]}get(e){let t=this.headers[e];return void 0!==t?this.merge(t):null}has(e){return void 0!==this.headers[e]}set(e,t){this.headers[e]=t}forEach(e,t){for(let[r,n]of this.entries())e.call(t,n,r,this)}*entries(){for(let e of Object.keys(this.headers)){let t=e.toLowerCase(),r=this.get(t);yield[t,r]}}*keys(){for(let e of Object.keys(this.headers)){let t=e.toLowerCase();yield t}}*values(){for(let e of Object.keys(this.headers)){let t=this.get(e);yield t}}[Symbol.iterator](){return this.entries()}}let ts="text/html; charset=utf-8",ta="nxtP",to="nxtI",tl="x-matched-path",tc=".segments",tu=".segment.rsc",td=".rsc",th=".json",tp=".meta",tf="x-next-cache-tags",tm="x-next-revalidated-tags",tg={shared:"shared",reactServerComponents:"rsc",serverSideRendering:"ssr",actionBrowser:"action-browser",apiNode:"api-node",apiEdge:"api-edge",middleware:"middleware",instrument:"instrument",edgeAsset:"edge-asset",appPagesBrowser:"app-pages-browser",pagesDirBrowser:"pages-dir-browser",pagesDirEdge:"pages-dir-edge",pagesDirNode:"pages-dir-node"};({...tg,GROUP:{builtinReact:[tg.reactServerComponents,tg.actionBrowser],serverOnly:[tg.reactServerComponents,tg.actionBrowser,tg.instrument,tg.middleware],neutralTarget:[tg.apiNode,tg.apiEdge],clientOnly:[tg.serverSideRendering,tg.appPagesBrowser],bundled:[tg.reactServerComponents,tg.actionBrowser,tg.serverSideRendering,tg.appPagesBrowser,tg.shared,tg.instrument,tg.middleware],appPages:[tg.reactServerComponents,tg.serverSideRendering,tg.appPagesBrowser,tg.actionBrowser]}});let ty=require("next/dist/server/lib/trace/tracer");var tv=((E=tv||{}).handleRequest="BaseServer.handleRequest",E.run="BaseServer.run",E.pipe="BaseServer.pipe",E.getStaticHTML="BaseServer.getStaticHTML",E.render="BaseServer.render",E.renderToResponseWithComponents="BaseServer.renderToResponseWithComponents",E.renderToResponse="BaseServer.renderToResponse",E.renderToHTML="BaseServer.renderToHTML",E.renderError="BaseServer.renderError",E.renderErrorToResponse="BaseServer.renderErrorToResponse",E.renderErrorToHTML="BaseServer.renderErrorToHTML",E.render404="BaseServer.render404",E),tb=((_=tb||{}).loadDefaultErrorComponents="LoadComponents.loadDefaultErrorComponents",_.loadComponents="LoadComponents.loadComponents",_),tE=((x=tE||{}).compression="NextNodeServer.compression",x.getBuildId="NextNodeServer.getBuildId",x.createComponentTree="NextNodeServer.createComponentTree",x.clientComponentLoading="NextNodeServer.clientComponentLoading",x.getLayoutOrPageModule="NextNodeServer.getLayoutOrPageModule",x.generateStaticRoutes="NextNodeServer.generateStaticRoutes",x.generateFsStaticRoutes="NextNodeServer.generateFsStaticRoutes",x.generatePublicRoutes="NextNodeServer.generatePublicRoutes",x.generateImageRoutes="NextNodeServer.generateImageRoutes.route",x.sendRenderResult="NextNodeServer.sendRenderResult",x.proxyRequest="NextNodeServer.proxyRequest",x.runApi="NextNodeServer.runApi",x.render="NextNodeServer.render",x.renderHTML="NextNodeServer.renderHTML",x.imageOptimizer="NextNodeServer.imageOptimizer",x.getPagePath="NextNodeServer.getPagePath",x.getRoutesManifest="NextNodeServer.getRoutesManifest",x.findPageComponents="NextNodeServer.findPageComponents",x.getFontManifest="NextNodeServer.getFontManifest",x.getServerComponentManifest="NextNodeServer.getServerComponentManifest",x.getRequestHandler="NextNodeServer.getRequestHandler",x.renderToHTML="NextNodeServer.renderToHTML",x.renderError="NextNodeServer.renderError",x.renderErrorToHTML="NextNodeServer.renderErrorToHTML",x.render404="NextNodeServer.render404",x.startResponse="NextNodeServer.startResponse",x.route="route",x.onProxyReq="onProxyReq",x.apiResolver="apiResolver",x.internalFetch="internalFetch",x);Symbol("__next_preview_data");let t_=Symbol("__prerender_bypass");var tx=((w={})[w.SeeOther=303]="SeeOther",w[w.TemporaryRedirect=307]="TemporaryRedirect",w[w.PermanentRedirect=308]="PermanentRedirect",w);function tw(e){return function(){let{cookie:t}=e;if(!t)return{};let{parse:n}=r("./dist/compiled/cookie/index.js");return n(Array.isArray(t)?t.join("; "):t)}}class tR{constructor(e,t,r){this.method=e,this.url=t,this.body=r}get cookies(){return this._cookies?this._cookies:this._cookies=tw(this.headers)()}}class tC{constructor(e){this.destination=e}redirect(e,t){return this.setHeader("Location",e),this.statusCode=t,t===tx.PermanentRedirect&&this.setHeader("Refresh",`0;url=${e}`),this}}class tP extends tR{static #e=T=e0;constructor(e){var t;super(e.method.toUpperCase(),e.url,e),this._req=e,this.headers=this._req.headers,this.fetchMetrics=null==(t=this._req)?void 0:t.fetchMetrics,this[T]=this._req[e0]||{},this.streaming=!1}get originalRequest(){return this._req[e0]=this[e0],this._req.url=this.url,this._req.cookies=this.cookies,this._req}set originalRequest(e){this._req=e}stream(){if(this.streaming)throw Object.defineProperty(Error("Invariant: NodeNextRequest.stream() can only be called once"),"__NEXT_ERROR_CODE",{value:"E467",enumerable:!1,configurable:!0});return this.streaming=!0,new ReadableStream({start:e=>{this._req.on("data",t=>{e.enqueue(new Uint8Array(t))}),this._req.on("end",()=>{e.close()}),this._req.on("error",t=>{e.error(t)})}})}}class tO extends tC{get originalResponse(){return t_ in this&&(this._res[t_]=this[t_]),this._res}constructor(e){super(e),this._res=e,this.textBody=void 0}get sent(){return this._res.finished||this._res.headersSent}get statusCode(){return this._res.statusCode}set statusCode(e){this._res.statusCode=e}get statusMessage(){return this._res.statusMessage}set statusMessage(e){this._res.statusMessage=e}setHeader(e,t){return this._res.setHeader(e,t),this}removeHeader(e){return this._res.removeHeader(e),this}getHeaderValues(e){let t=this._res.getHeader(e);if(void 0!==t)return(Array.isArray(t)?t:[t]).map(e=>e.toString())}hasHeader(e){return this._res.hasHeader(e)}getHeader(e){let t=this.getHeaderValues(e);return Array.isArray(t)?t.join(","):void 0}getHeaders(){return this._res.getHeaders()}appendHeader(e,t){let r=this.getHeaderValues(e)??[];return r.includes(t)||this._res.setHeader(e,[...r,t]),this}body(e){return this.textBody=e,this}send(){this._res.end(this.textBody)}onClose(e){this.originalResponse.on("close",e)}}var tT=r("./dist/compiled/fresh/index.js"),tS=r.n(tT);async function tN({req:e,res:t,result:r,generateEtags:n,poweredByHeader:i,cacheControl:s}){if(t.finished||t.headersSent)return;i&&r.contentType===ts&&t.setHeader("X-Powered-By","Next.js"),s&&!t.getHeader("Cache-Control")&&t.setHeader("Cache-Control",function({revalidate:e,expire:t}){let r="number"==typeof e&&void 0!==t&&e<t?`, stale-while-revalidate=${t-e}`:"";return 0===e?"private, no-cache, no-store, max-age=0, must-revalidate":"number"==typeof e?`s-maxage=${e}${r}`:`s-maxage=31536000${r}`}(s));let a=r.isDynamic?null:r.toUnchunkedString();if(n&&null!==a){let r=((e,t=!1)=>(t?'W/"':'"')+(e=>{let t=e.length,r=0,n=0,i=8997,s=0,a=33826,o=0,l=40164,c=0,u=52210;for(;r<t;)i^=e.charCodeAt(r++),n=435*i,s=435*a,o=435*l,c=435*u,o+=i<<8,c+=a<<8,s+=n>>>16,i=65535&n,o+=s>>>16,a=65535&s,u=c+(o>>>16)&65535,l=65535&o;return(15&u)*0x1000000000000+0x100000000*l+65536*a+(i^u>>4)})(e).toString(36)+e.length.toString(36)+'"')(a);if(r&&t.setHeader("ETag",r),tS()(e.headers,{etag:r})&&(t.statusCode=304,t.end(),1))return}(!t.getHeader("Content-Type")&&r.contentType&&t.setHeader("Content-Type",r.contentType),a&&t.setHeader("Content-Length",Buffer.byteLength(a)),"HEAD"===e.method)?t.end(null):null!==a?t.end(a):await r.pipeToNodeResponse(t)}function tj(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function tA(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function tD(e){if(e.startsWith("/"))return function(e,t,r=!0){let n=new URL("http://n"),i=e.startsWith(".")?new URL("http://n"):n,{pathname:s,searchParams:a,search:o,hash:l,href:c,origin:u}=e.startsWith("/")?new URL(`${i.protocol}//${i.host}${e}`):new URL(e,i);if(u!==n.origin)throw Object.defineProperty(Error(`invariant: invalid relative URL, router received ${e}`),"__NEXT_ERROR_CODE",{value:"E159",enumerable:!1,configurable:!0});return{auth:null,host:null,hostname:null,pathname:s,port:null,protocol:null,query:r?tj(a):void 0,search:o,hash:l,href:c.slice(u.length),slashes:null}}(e);let t=new URL(e),r=t.username,n=t.password,i=r?n?`${r}:${n}`:r:null,s=t.pathname,a=t.search;return{auth:i,hash:t.hash,hostname:t.hostname,href:t.href,pathname:s,port:t.port,protocol:t.protocol,query:tj(t.searchParams),search:a,origin:t.origin,slashes:"//"===t.href.slice(t.protocol.length,t.protocol.length+2)}}let t$={wait:es(Q("○")),error:et(Q("⨯")),warn:en(Q("⚠")),ready:"▲",info:es(Q(" ")),event:er(Q("✓")),trace:ei(Q("\xbb"))},tk={log:"log",warn:"warn",error:"error"};function tI(e,...t){(""===t[0]||void 0===t[0])&&1===t.length&&t.shift();let r=e in tk?tk[e]:"log",n=t$[e];0===t.length?console[r](""):1===t.length&&"string"==typeof t[0]?console[r](n+" "+t[0]):console[r](n,...t)}function tM(e){console.log(e)}function tL(...e){tI("wait",...e)}function tq(...e){tI("error",...e)}function tH(...e){tI("warn",...e)}function tF(...e){tI("ready",...e)}function tz(...e){tI("info",...e)}function tU(...e){tI("event",...e)}function tX(...e){tI("trace",...e)}let tW=new M(1e4,e=>e.length);function tB(...e){let t=e.join(" ");tW.has(t)||(tW.set(t,t),tH(...e))}let tG=new M(1e4,e=>e.length);function tV(...e){let t=e.join(" ");tG.has(t)||(tG.set(t,t),tq(...e))}var tK=r("os"),tY=r.n(tK);let tJ="100 MB";function tQ(e){let t=r("./dist/compiled/bytes/index.js").parse(e??tJ);return null===t||isNaN(t)||t<1?void 0:t}Object.freeze({env:{},webpack:null,typescript:{ignoreBuildErrors:!1,tsconfigPath:void 0},typedRoutes:!1,distDir:".next",cleanDistDir:!0,assetPrefix:"",cacheHandler:process.env.NEXT_CACHE_HANDLER_PATH,cacheMaxMemorySize:0x3200000,configOrigin:"default",useFileSystemPublicRoutes:!0,generateBuildId:()=>null,generateEtags:!0,pageExtensions:["tsx","ts","jsx","js"],poweredByHeader:!0,compress:!0,images:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1,customCacheHandler:!1},devIndicators:{position:"bottom-left"},onDemandEntries:{maxInactiveAge:6e4,pagesBufferLength:5},basePath:"",sassOptions:{},trailingSlash:!1,i18n:null,productionBrowserSourceMaps:!1,excludeDefaultMomentLocales:!0,reactProductionProfiling:!1,reactStrictMode:null,reactMaxHeadersLength:6e3,httpAgentOptions:{keepAlive:!0},logging:{},compiler:{},expireTime:process.env.NEXT_PRIVATE_CDN_CONSUMED_SWR_CACHE_CONTROL?void 0:31536e3,staticPageGenerationTimeout:60,output:process.env.NEXT_PRIVATE_STANDALONE?"standalone":void 0,modularizeImports:void 0,outputFileTracingRoot:process.env.NEXT_PRIVATE_OUTPUT_TRACE_ROOT||"",allowedDevOrigins:void 0,enablePrerenderSourceMaps:void 0,cacheComponents:!1,cacheLife:{default:{stale:void 0,revalidate:900,expire:0xfffffffe},seconds:{stale:30,revalidate:1,expire:60},minutes:{stale:300,revalidate:60,expire:3600},hours:{stale:300,revalidate:3600,expire:86400},days:{stale:300,revalidate:86400,expire:604800},weeks:{stale:300,revalidate:604800,expire:2592e3},max:{stale:300,revalidate:2592e3,expire:31536e3}},cacheHandlers:{default:process.env.NEXT_DEFAULT_CACHE_HANDLER_PATH,remote:process.env.NEXT_REMOTE_CACHE_HANDLER_PATH,static:process.env.NEXT_STATIC_CACHE_HANDLER_PATH},experimental:{adapterPath:process.env.NEXT_ADAPTER_PATH||void 0,useSkewCookie:!1,cssChunking:!0,multiZoneDraftMode:!1,appNavFailHandling:!1,prerenderEarlyExit:!0,serverMinification:!0,linkNoTouchStart:!1,caseSensitiveRoutes:!1,clientParamParsingOrigins:void 0,dynamicOnHover:!1,preloadEntriesOnStart:!0,clientRouterFilter:!0,clientRouterFilterRedirects:!1,fetchCacheKeyPrefix:"",proxyPrefetch:"flexible",optimisticClientCache:!0,manualClientBasePath:!1,cpus:Math.max(1,(Number(process.env.CIRCLE_NODE_TOTAL)||(tY().cpus()||{length:1}).length)-1),memoryBasedWorkersCount:!1,imgOptConcurrency:null,imgOptTimeoutInSeconds:7,imgOptMaxInputPixels:0xfff8001,imgOptSequentialRead:null,imgOptSkipMetadata:null,isrFlushToDisk:!0,workerThreads:!1,proxyTimeout:void 0,optimizeCss:!1,nextScriptWorkers:!1,scrollRestoration:!1,externalDir:!1,disableOptimizedLoading:!1,gzipSize:!0,craCompat:!1,esmExternals:!0,fullySpecified:!1,swcTraceProfiling:!1,forceSwcTransforms:!1,swcPlugins:void 0,largePageDataBytes:128e3,disablePostcssPresetEnv:void 0,urlImports:void 0,typedEnv:!1,clientTraceMetadata:void 0,parallelServerCompiles:!1,parallelServerBuildTraces:!1,ppr:!1,authInterrupts:!1,webpackBuildWorker:void 0,webpackMemoryOptimizations:!1,optimizeServerReact:!0,strictRouteTypes:!1,viewTransition:!1,removeUncaughtErrorAndRejectionListeners:!1,validateRSCRequestHeaders:!!(process.env.__NEXT_TEST_MODE||!(!"16.2.0-canary.5".includes("canary")&&!process.env.__NEXT_TEST_MODE&&!process.env.NEXT_PRIVATE_LOCAL_DEV)),staleTimes:{dynamic:0,static:300},allowDevelopmentBuild:void 0,reactDebugChannel:!1,staticGenerationRetryCount:void 0,serverComponentsHmrCache:!0,staticGenerationMaxConcurrency:8,staticGenerationMinPagesPerWorker:25,transitionIndicator:!1,gestureTransition:!1,inlineCss:!1,useCache:void 0,slowModuleDetection:void 0,globalNotFound:!1,browserDebugInfoInTerminal:"warn",lockDistDir:!0,isolatedDevBuild:!0,proxyClientMaxBodySize:0xa00000,hideLogsAfterAbort:!1,mcpServer:!0,turbopackFileSystemCacheForDev:!0,turbopackFileSystemCacheForBuild:!1,turbopackInferModuleSideEffects:!0,devCacheControlNoCache:!1},htmlLimitedBots:void 0,bundlePagesRouterDependencies:!1});let tZ="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",t0=`(${tZ}[.]){3}${tZ}`,t1="(?:[0-9a-fA-F]{1,4})",t4=RegExp(`^((?:${t1}:){7}(?:${t1}|:)|(?:${t1}:){6}(?:${t0}|:${t1}|:)|(?:${t1}:){5}(?::${t0}|(:${t1}){1,2}|:)|(?:${t1}:){4}(?:(:${t1}){0,1}:${t0}|(:${t1}){1,3}|:)|(?:${t1}:){3}(?:(:${t1}){0,2}:${t0}|(:${t1}){1,4}|:)|(?:${t1}:){2}(?:(:${t1}){0,3}:${t0}|(:${t1}){1,5}|:)|(?:${t1}:){1}(?:(:${t1}){0,4}:${t0}|(:${t1}){1,6}|:)|(?::((?::${t1}){0,5}:${t0}|(?::${t1}){1,7}|:)))(%[0-9a-zA-Z-.:]{1,})?$`);function t2(e){return e.startsWith("/")?e:`/${e}`}function t3(e){return t2(e.split("/").reduce((e,t,r,n)=>t?"("===t[0]&&t.endsWith(")")||"@"===t[0]||("page"===t||"route"===t)&&r===n.length-1?e:`${e}/${t}`:e,""))}function t8(e){return e.replace(/\.rsc($|\?)/,"$1")}let t6=["(..)(..)","(.)","(..)","(...)"];function t5(e){return void 0!==e.split("/").find(e=>t6.find(t=>e.startsWith(t)))}let t9=/\/[^/]*\[[^/]+\][^/]*(?=\/|$)/,t7=/\/\[[^/]+\](?=\/|$)/;function re(e,t=!0){return(t5(e)&&(e=function(e){let t,r,n;for(let i of e.split("/"))if(r=t6.find(e=>i.startsWith(e))){[t,n]=e.split(r,2);break}if(!t||!r||!n)throw Object.defineProperty(Error(`Invalid interception route: ${e}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`),"__NEXT_ERROR_CODE",{value:"E269",enumerable:!1,configurable:!0});switch(t=t3(t),r){case"(.)":n="/"===t?`/${n}`:t+"/"+n;break;case"(..)":if("/"===t)throw Object.defineProperty(Error(`Invalid interception route: ${e}. Cannot use (..) marker at the root level, use (.) instead.`),"__NEXT_ERROR_CODE",{value:"E207",enumerable:!1,configurable:!0});n=t.split("/").slice(0,-1).concat(n).join("/");break;case"(...)":n="/"+n;break;case"(..)(..)":let i=t.split("/");if(i.length<=2)throw Object.defineProperty(Error(`Invalid interception route: ${e}. Cannot use (..)(..) marker at the root level or one level up.`),"__NEXT_ERROR_CODE",{value:"E486",enumerable:!1,configurable:!0});n=i.slice(0,-2).concat(n).join("/");break;default:throw Object.defineProperty(Error("Invariant: unexpected marker"),"__NEXT_ERROR_CODE",{value:"E112",enumerable:!1,configurable:!0})}return{interceptingRoute:t,interceptedRoute:n}}(e).interceptedRoute),t)?t7.test(e):t9.test(e)}let rt=/[\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,rr=/Googlebot(?!-)|Googlebot$/i,rn=rt.source;function ri(){}new Uint8Array([60,104,116,109,108]),new Uint8Array([60,98,111,100,121]),new Uint8Array([60,47,104,101,97,100,62]),new Uint8Array([60,47,98,111,100,121,62]),new Uint8Array([60,47,104,116,109,108,62]),new Uint8Array([60,47,98,111,100,121,62,60,47,104,116,109,108,62]),new Uint8Array([60,109,101,116,97,32,110,97,109,101,61,34,194,171,110,120,116,45,105,99,111,110,194,187,34]);let rs=new TextEncoder;function ra(e){return new ReadableStream({start(t){t.enqueue(rs.encode(e)),t.close()}})}function ro(e){return new ReadableStream({start(t){t.enqueue(e),t.close()}})}async function rl(e,t){let r=new TextDecoder("utf-8",{fatal:!0}),n="";for await(let i of e){if(null==t?void 0:t.aborted)return n;n+=r.decode(i,{stream:!0})}return n+r.decode()}function rc(e){var t,r,n,i,s,a=[],o=0;function l(){for(;o<e.length&&/\s/.test(e.charAt(o));)o+=1;return o<e.length}for(;o<e.length;){for(t=o,s=!1;l();)if(","===(r=e.charAt(o))){for(n=o,o+=1,l(),i=o;o<e.length&&"="!==(r=e.charAt(o))&&";"!==r&&","!==r;)o+=1;o<e.length&&"="===e.charAt(o)?(s=!0,o=i,a.push(e.substring(t,n)),t=o):o=n+1}else o+=1;(!s||o>=e.length)&&a.push(e.substring(t,e.length))}return a}function ru(e){let t={},r=[];if(e)for(let[n,i]of e.entries())"set-cookie"===n.toLowerCase()?(r.push(...rc(i)),t[n]=1===r.length?r[0]:r):t[n]=i;return t}function rd(e){try{return String(new URL(String(e)))}catch(t){throw Object.defineProperty(Error(`URL is malformed "${String(e)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`,{cause:t}),"__NEXT_ERROR_CODE",{value:"E61",enumerable:!1,configurable:!0})}}function rh(e){for(let t of[ta,to])if(e!==t&&e.startsWith(t))return e.substring(t.length);return null}function rp(e){return e.replace(/\/$/,"")||"/"}function rf(e){let t=e.indexOf("#"),r=e.indexOf("?"),n=r>-1&&(t<0||r<t);return n||t>-1?{pathname:e.substring(0,n?r:t),query:n?e.substring(r,t>-1?t:void 0):"",hash:t>-1?e.slice(t):""}:{pathname:e,query:"",hash:""}}function rm(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:n,hash:i}=rf(e);return`${t}${r}${n}${i}`}function rg(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:n,hash:i}=rf(e);return`${r}${t}${n}${i}`}function ry(e,t){if("string"!=typeof e)return!1;let{pathname:r}=rf(e);return r===t||r.startsWith(t+"/")}function rv(e,t){let r;if(t?.host&&!Array.isArray(t.host))r=t.host.toString().split(":",1)[0];else{if(!e.hostname)return;r=e.hostname}return r.toLowerCase()}let rb=new WeakMap;function rE(e,t){let r;if(!t)return{pathname:e};let n=rb.get(t);n||(n=t.map(e=>e.toLowerCase()),rb.set(t,n));let i=e.split("/",2);if(!i[1])return{pathname:e};let s=i[1].toLowerCase(),a=n.indexOf(s);return a<0?{pathname:e}:(r=t[a],{pathname:e=e.slice(r.length+1)||"/",detectedLocale:r})}function r_(e,t){if(!ry(e,t))return e;let r=e.slice(t.length);return r.startsWith("/")?r:`/${r}`}function rx(e,t){let{basePath:r,i18n:n,trailingSlash:i}=t.nextConfig??{},s={pathname:e,trailingSlash:"/"!==e?e.endsWith("/"):i};r&&ry(s.pathname,r)&&(s.pathname=r_(s.pathname,r),s.basePath=r);let a=s.pathname;if(s.pathname.startsWith("/_next/data/")&&s.pathname.endsWith(".json")){let e=s.pathname.replace(/^\/_next\/data\//,"").replace(/\.json$/,"").split("/");s.buildId=e[0],a="index"!==e[1]?`/${e.slice(1).join("/")}`:"/",!0===t.parseData&&(s.pathname=a)}if(n){let e=t.i18nProvider?t.i18nProvider.analyze(s.pathname):rE(s.pathname,n.locales);s.locale=e.detectedLocale,s.pathname=e.pathname??s.pathname,!e.detectedLocale&&s.buildId&&(e=t.i18nProvider?t.i18nProvider.analyze(a):rE(a,n.locales)).detectedLocale&&(s.locale=e.detectedLocale)}return s}let rw=/(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;function rR(e,t){return new URL(String(e).replace(rw,"localhost"),t&&String(t).replace(rw,"localhost"))}let rC=Symbol("NextURLInternal");class rP{constructor(e,t,r){let n,i;"object"==typeof t&&"pathname"in t||"string"==typeof t?(n=t,i=r||{}):i=r||t||{},this[rC]={url:rR(e,n??i.base),options:i,basePath:""},this.analyze()}analyze(){var e,t,r,n,i;let s=rx(this[rC].url.pathname,{nextConfig:this[rC].options.nextConfig,parseData:!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE,i18nProvider:this[rC].options.i18nProvider}),a=rv(this[rC].url,this[rC].options.headers);this[rC].domainLocale=this[rC].options.i18nProvider?this[rC].options.i18nProvider.detectDomainLocale(a):function(e,t,r){if(e){for(let n of(r&&(r=r.toLowerCase()),e))if(t===n.domain?.split(":",1)[0].toLowerCase()||r===n.defaultLocale.toLowerCase()||n.locales?.some(e=>e.toLowerCase()===r))return n}}(null==(t=this[rC].options.nextConfig)||null==(e=t.i18n)?void 0:e.domains,a);let o=(null==(r=this[rC].domainLocale)?void 0:r.defaultLocale)||(null==(i=this[rC].options.nextConfig)||null==(n=i.i18n)?void 0:n.defaultLocale);this[rC].url.pathname=s.pathname,this[rC].defaultLocale=o,this[rC].basePath=s.basePath??"",this[rC].buildId=s.buildId,this[rC].locale=s.locale??o,this[rC].trailingSlash=s.trailingSlash}formatPathname(){var e;let t;return t=function(e,t,r,n){if(!t||t===r)return e;let i=e.toLowerCase();return!n&&(ry(i,"/api")||ry(i,`/${t.toLowerCase()}`))?e:rm(e,`/${t}`)}((e={basePath:this[rC].basePath,buildId:this[rC].buildId,defaultLocale:this[rC].options.forceLocale?void 0:this[rC].defaultLocale,locale:this[rC].locale,pathname:this[rC].url.pathname,trailingSlash:this[rC].trailingSlash}).pathname,e.locale,e.buildId?void 0:e.defaultLocale,e.ignorePrefix),(e.buildId||!e.trailingSlash)&&(t=rp(t)),e.buildId&&(t=rg(rm(t,`/_next/data/${e.buildId}`),"/"===e.pathname?"index.json":".json")),t=rm(t,e.basePath),!e.buildId&&e.trailingSlash?t.endsWith("/")?t:rg(t,"/"):rp(t)}formatSearch(){return this[rC].url.search}get buildId(){return this[rC].buildId}set buildId(e){this[rC].buildId=e}get locale(){return this[rC].locale??""}set locale(e){var t,r;if(!this[rC].locale||!(null==(r=this[rC].options.nextConfig)||null==(t=r.i18n)?void 0:t.locales.includes(e)))throw Object.defineProperty(TypeError(`The NextURL configuration includes no locale "${e}"`),"__NEXT_ERROR_CODE",{value:"E597",enumerable:!1,configurable:!0});this[rC].locale=e}get defaultLocale(){return this[rC].defaultLocale}get domainLocale(){return this[rC].domainLocale}get searchParams(){return this[rC].url.searchParams}get host(){return this[rC].url.host}set host(e){this[rC].url.host=e}get hostname(){return this[rC].url.hostname}set hostname(e){this[rC].url.hostname=e}get port(){return this[rC].url.port}set port(e){this[rC].url.port=e}get protocol(){return this[rC].url.protocol}set protocol(e){this[rC].url.protocol=e}get href(){let e=this.formatPathname(),t=this.formatSearch();return`${this.protocol}//${this.host}${e}${t}${this.hash}`}set href(e){this[rC].url=rR(e),this.analyze()}get origin(){return this[rC].url.origin}get pathname(){return this[rC].url.pathname}set pathname(e){this[rC].url.pathname=e}get hash(){return this[rC].url.hash}set hash(e){this[rC].url.hash=e}get search(){return this[rC].url.search}set search(e){this[rC].url.search=e}get password(){return this[rC].url.password}set password(e){this[rC].url.password=e}get username(){return this[rC].url.username}set username(e){this[rC].url.username=e}get basePath(){return this[rC].basePath}set basePath(e){this[rC].basePath=e.startsWith("/")?e:`/${e}`}toString(){return this.href}toJSON(){return this.href}[Symbol.for("edge-runtime.inspect.custom")](){return{href:this.href,origin:this.origin,protocol:this.protocol,username:this.username,password:this.password,host:this.host,hostname:this.hostname,port:this.port,pathname:this.pathname,search:this.search,searchParams:this.searchParams,hash:this.hash}}clone(){return new rP(String(this),this[rC].options)}}class rO extends Error{constructor({page:e}){super(`The middleware "${e}" accepts an async API directly with the form:
|
|
14
14
|
|
|
15
15
|
export function middleware(request, event) {
|
|
16
16
|
return NextResponse.redirect('/new-location')
|
|
@@ -21,6 +21,6 @@ You can debug event listener operations by running Next.js with \`NEXT_UNHANDLED
|
|
|
21
21
|
Read more: https://nextjs.org/docs/messages/middleware-request-page
|
|
22
22
|
`)}}class rS extends Error{constructor(){super(`The request.ua has been removed in favour of \`userAgent\` function.
|
|
23
23
|
Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent
|
|
24
|
-
`)}}var rN=r("./dist/compiled/@edge-runtime/cookies/index.js");let rj=Symbol("internal request");class rA extends Request{constructor(e,t={}){const r="string"!=typeof e&&"url"in e?e.url:String(e);rd(r),t.body&&"half"!==t.duplex&&(t.duplex="half"),e instanceof Request?super(e,t):super(r,t);const n=new rP(r,{headers:ru(this.headers),nextConfig:t.nextConfig});this[rj]={cookies:new rN.RequestCookies(this.headers),nextUrl:n,url:process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE?r:n.toString()}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,nextUrl:this.nextUrl,url:this.url,bodyUsed:this.bodyUsed,cache:this.cache,credentials:this.credentials,destination:this.destination,headers:Object.fromEntries(this.headers),integrity:this.integrity,keepalive:this.keepalive,method:this.method,mode:this.mode,redirect:this.redirect,referrer:this.referrer,referrerPolicy:this.referrerPolicy,signal:this.signal}}get cookies(){return this[rj].cookies}get nextUrl(){return this[rj].nextUrl}get page(){throw new rT}get ua(){throw new rS}get url(){return this[rj].url}}let rD="ResponseAborted";class r$ extends Error{constructor(...e){super(...e),this.name=rD}}class rk{constructor(){let e,t;this.promise=new Promise((r,n)=>{e=r,t=n}),this.resolve=e,this.reject=t}}let rI=0,rM=0,rL=0;function rq(e){return(null==e?void 0:e.name)==="AbortError"||(null==e?void 0:e.name)===rD}async function rH(e,t,r){try{var n;let i,{errored:s,destroyed:a}=t;if(s||a)return;let o=(n=t,i=new AbortController,n.once("close",()=>{n.writableFinished||i.abort(new r$)}),i),l=function(e,t){let r=!1,n=new rk;function i(){n.resolve()}e.on("drain",i),e.once("close",()=>{e.off("drain",i),n.resolve()});let s=new rk;return e.once("finish",()=>{s.resolve()}),new WritableStream({write:async t=>{if(!r){if(r=!0,"performance"in globalThis&&process.env.NEXT_OTEL_PERFORMANCE_PREFIX){let e=function(e={}){let t=0===rI?void 0:{clientComponentLoadStart:rI,clientComponentLoadTimes:rM,clientComponentLoadCount:rL};return e.reset&&(rI=0,rM=0,rL=0),t}();e&&performance.measure(`${process.env.NEXT_OTEL_PERFORMANCE_PREFIX}:next-client-component-loading`,{start:e.clientComponentLoadStart,end:e.clientComponentLoadStart+e.clientComponentLoadTimes})}e.flushHeaders(),(0,ty.getTracer)().trace(tE.startResponse,{spanName:"start response"},()=>void 0)}try{let r=e.write(t);"flush"in e&&"function"==typeof e.flush&&e.flush(),r||(await n.promise,n=new rk)}catch(t){throw e.end(),Object.defineProperty(Error("failed to write chunk to response",{cause:t}),"__NEXT_ERROR_CODE",{value:"E321",enumerable:!1,configurable:!0})}},abort:t=>{e.writableFinished||e.destroy(t)},close:async()=>{if(t&&await t,!e.writableFinished)return e.end(),s.promise}})}(t,r);await e.pipeTo(l,{signal:o.signal})}catch(e){if(rq(e))return;throw Object.defineProperty(Error("failed to pipe response",{cause:e}),"__NEXT_ERROR_CODE",{value:"E180",enumerable:!1,configurable:!0})}}class rF{static #e=this.EMPTY=new rF(null,{metadata:{},contentType:null});static fromStatic(e,t){return new rF(e,{metadata:{},contentType:t})}constructor(e,{contentType:t,waitUntil:r,metadata:n}){this.response=e,this.contentType=t,this.metadata=n,this.waitUntil=r}assignMetadata(e){Object.assign(this.metadata,e)}get isNull(){return null===this.response}get isDynamic(){return"string"!=typeof this.response}toUnchunkedString(e=!1){if(null===this.response)return"";if("string"!=typeof this.response){if(!e)throw Object.defineProperty(new ej("dynamic responses cannot be unchunked. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E732",enumerable:!1,configurable:!0});return rl(this.readable)}return this.response}get readable(){return null===this.response?new ReadableStream({start(e){e.close()}}):"string"==typeof this.response?ra(this.response):Buffer.isBuffer(this.response)?ro(this.response):Array.isArray(this.response)?function(...e){if(0===e.length)return new ReadableStream({start(e){e.close()}});if(1===e.length)return e[0];let{readable:t,writable:r}=new TransformStream,n=e[0].pipeTo(r,{preventClose:!0}),i=1;for(;i<e.length-1;i++){let t=e[i];n=n.then(()=>t.pipeTo(r,{preventClose:!0}))}let s=e[i];return(n=n.then(()=>s.pipeTo(r))).catch(ri),t}(...this.response):this.response}coerce(){return null===this.response?[]:"string"==typeof this.response?[ra(this.response)]:Array.isArray(this.response)?this.response:Buffer.isBuffer(this.response)?[ro(this.response)]:[this.response]}unshift(e){this.response=this.coerce(),this.response.unshift(e)}push(e){this.response=this.coerce(),this.response.push(e)}async pipeTo(e){try{await this.readable.pipeTo(e,{preventClose:!0}),this.waitUntil&&await this.waitUntil,await e.close()}catch(t){if(rq(t))return void await e.abort(t);throw t}}async pipeToNodeResponse(e){await rH(this.readable,e,this.waitUntil)}}function rz(e){return e.replace(/\\/g,"/")}function rU(e){let t=rz(e);return t.startsWith("/index/")&&!re(t)?t.slice(6):"/index"!==t?t:"/"}function rX(e,t){let r=[],n=(0,eB.pathToRegexp)(e,r,{delimiter:"/",sensitive:"boolean"==typeof t?.sensitive&&t.sensitive,strict:t?.strict}),i=(0,eB.regexpToFunction)(t?.regexModifier?new RegExp(t.regexModifier(n.source),n.flags):n,r);return(e,n)=>{if("string"!=typeof e)return!1;let s=i(e);if(!s)return!1;if(t?.removeUnnamedParams)for(let e of r)"number"==typeof e.name&&delete s.params[e.name];return{...n,...s.params}}}let rW=/[|\\{}()[\]^$+*?.-]/,rB=/[|\\{}()[\]^$+*?.-]/g;function rG(e){return rW.test(e)?e.replace(rB,"\\$&"):e}let rV=/^([^[]*)\[((?:\[[^\]]*\])|[^\]]+)\](.*)$/;function rK(e){let t=e.startsWith("[")&&e.endsWith("]");t&&(e=e.slice(1,-1));let r=e.startsWith("...");return r&&(e=e.slice(3)),{key:e,repeat:r,optional:t}}function rY(e,{includeSuffix:t=!1,includePrefix:r=!1,excludeOptionalTrailingSlash:n=!1}={}){let{parameterizedRoute:i,groups:s}=function(e,t,r){let n={},i=1,s=[];for(let a of rp(e).slice(1).split("/")){let e=t6.find(e=>a.startsWith(e)),o=a.match(rV);if(e&&o&&o[2]){let{key:t,optional:r,repeat:a}=rK(o[2]);n[t]={pos:i++,repeat:a,optional:r},s.push(`/${rG(e)}([^/]+?)`)}else if(o&&o[2]){let{key:e,repeat:t,optional:a}=rK(o[2]);n[e]={pos:i++,repeat:t,optional:a},r&&o[1]&&s.push(`/${rG(o[1])}`);let l=t?a?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)";r&&o[1]&&(l=l.substring(1)),s.push(l)}else s.push(`/${rG(a)}`);t&&o&&o[3]&&s.push(rG(o[3]))}return{parameterizedRoute:s.join(""),groups:n}}(e,t,r),a=i;return n||(a+="(?:/)?"),{re:RegExp(`^${a}$`),groups:s}}function rJ({interceptionMarker:e,getSafeRouteKey:t,segment:r,routeKeys:n,keyPrefix:i,backreferenceDuplicateKeys:s}){let a,{key:o,optional:l,repeat:c}=rK(r),u=o.replace(/\W/g,"");i&&(u=`${i}${u}`);let d=!1;(0===u.length||u.length>30)&&(d=!0),isNaN(parseInt(u.slice(0,1)))||(d=!0),d&&(u=t());let h=u in n;i?n[u]=`${i}${o}`:n[u]=o;let p=e?rG(e):"";return a=h&&s?`\\k<${u}>`:c?`(?<${u}>.+?)`:`(?<${u}>[^/]+?)`,{key:o,pattern:l?`(?:/${p}${a})?`:`/${p}${a}`,cleanedKey:u,optional:l,repeat:c}}function rQ(e){return e.replace(/__ESC_COLON_/gi,":")}function rZ(e,t,r=[],n=[]){let i={},s=r=>{let n,s=r.key;switch(r.type){case"header":s=s.toLowerCase(),n=e.headers[s];break;case"cookie":n="cookies"in e?e.cookies[r.key]:tw(e.headers)()[r.key];break;case"query":n=t[s];break;case"host":{let{host:t}=e?.headers||{};n=t?.split(":",1)[0].toLowerCase()}}if(!r.value&&n)return i[function(e){let t="";for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);(n>64&&n<91||n>96&&n<123)&&(t+=e[r])}return t}(s)]=n,!0;if(n){let e=RegExp(`^${r.value}$`),t=Array.isArray(n)?n.slice(-1)[0].match(e):n.match(e);if(t)return Array.isArray(t)&&(t.groups?Object.keys(t.groups).forEach(e=>{i[e]=t.groups[e]}):"host"===r.type&&t[0]&&(i.host=t[0])),!0}return!1};return!(!r.every(e=>s(e))||n.some(e=>s(e)))&&i}function r0(e,t){if(!e.includes(":"))return e;for(let r of Object.keys(t))e.includes(`:${r}`)&&(e=e.replace(RegExp(`:${r}\\*`,"g"),`:${r}--ESCAPED_PARAM_ASTERISKS`).replace(RegExp(`:${r}\\?`,"g"),`:${r}--ESCAPED_PARAM_QUESTION`).replace(RegExp(`:${r}\\+`,"g"),`:${r}--ESCAPED_PARAM_PLUS`).replace(RegExp(`:${r}(?!\\w)`,"g"),`--ESCAPED_PARAM_COLON${r}`));return e=e.replace(/(:|\*|\?|\+|\(|\)|\{|\})/g,"\\$1").replace(/--ESCAPED_PARAM_PLUS/g,"+").replace(/--ESCAPED_PARAM_COLON/g,":").replace(/--ESCAPED_PARAM_QUESTION/g,"?").replace(/--ESCAPED_PARAM_ASTERISKS/g,"*"),eQ(`/${e}`,{validate:!1})(t).slice(1)}function r1(e){try{return decodeURIComponent(e)}catch{return e}}let r4=/https?|ftp|gopher|file/;function r2(e,t){for(let r in delete e.nextInternalLocale,e){let n=r!==ta&&r.startsWith(ta),i=r!==to&&r.startsWith(to);(n||i||t.includes(r))&&delete e[r]}}function r3(e){return"object"==typeof e&&null!==e&&"name"in e&&"message"in e}function r8(e){let t;return r3(e)?e:Object.defineProperty(Error(!function(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);return null===t||t.hasOwnProperty("isPrototypeOf")}(e)?e+"":(t=new WeakSet,JSON.stringify(e,(e,r)=>{if("object"==typeof r&&null!==r){if(t.has(r))return"[Circular]";t.add(r)}return r}))),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}let r6="next-action",r9="next-router-state-tree",r5="next-router-prefetch",r7="next-router-segment-prefetch",ne="next-url",nt=["rsc",r9,r5,"next-hmr-refresh",r7],nr="_rsc";class nn{constructor(e){this.provider=e}normalize(e){return this.provider.analyze(e).pathname}}class ni{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e="/"){let t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);let r=t.map(t=>this.children.get(t)._smoosh(`${e}${t}/`)).reduce((e,t)=>[...e,...t],[]);if(null!==this.slugName&&r.push(...this.children.get("[]")._smoosh(`${e}[${this.slugName}]/`)),!this.placeholder){let t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw Object.defineProperty(Error(`You cannot define a route with the same specificity as a optional catch-all route ("${t}" and "${t}[[...${this.optionalRestSlugName}]]").`),"__NEXT_ERROR_CODE",{value:"E458",enumerable:!1,configurable:!0});r.unshift(t)}return null!==this.restSlugName&&r.push(...this.children.get("[...]")._smoosh(`${e}[...${this.restSlugName}]/`)),null!==this.optionalRestSlugName&&r.push(...this.children.get("[[...]]")._smoosh(`${e}[[...${this.optionalRestSlugName}]]/`)),r}_insert(e,t,r){if(0===e.length){this.placeholder=!1;return}if(r)throw Object.defineProperty(Error("Catch-all must be the last part of the URL."),"__NEXT_ERROR_CODE",{value:"E392",enumerable:!1,configurable:!0});let n=e[0];if(n.startsWith("[")&&n.endsWith("]")){let s=n.slice(1,-1),a=!1;if(s.startsWith("[")&&s.endsWith("]")&&(s=s.slice(1,-1),a=!0),s.startsWith("…"))throw Object.defineProperty(Error(`Detected a three-dot character ('…') at ('${s}'). Did you mean ('...')?`),"__NEXT_ERROR_CODE",{value:"E147",enumerable:!1,configurable:!0});if(s.startsWith("...")&&(s=s.substring(3),r=!0),s.startsWith("[")||s.endsWith("]"))throw Object.defineProperty(Error(`Segment names may not start or end with extra brackets ('${s}').`),"__NEXT_ERROR_CODE",{value:"E421",enumerable:!1,configurable:!0});if(s.startsWith("."))throw Object.defineProperty(Error(`Segment names may not start with erroneous periods ('${s}').`),"__NEXT_ERROR_CODE",{value:"E288",enumerable:!1,configurable:!0});function i(e,r){if(null!==e&&e!==r)throw Object.defineProperty(Error(`You cannot use different slug names for the same dynamic path ('${e}' !== '${r}').`),"__NEXT_ERROR_CODE",{value:"E337",enumerable:!1,configurable:!0});t.forEach(e=>{if(e===r)throw Object.defineProperty(Error(`You cannot have the same slug name "${r}" repeat within a single dynamic path`),"__NEXT_ERROR_CODE",{value:"E247",enumerable:!1,configurable:!0});if(e.replace(/\W/g,"")===n.replace(/\W/g,""))throw Object.defineProperty(Error(`You cannot have the slug names "${e}" and "${r}" differ only by non-word symbols within a single dynamic path`),"__NEXT_ERROR_CODE",{value:"E499",enumerable:!1,configurable:!0})}),t.push(r)}if(r)if(a){if(null!=this.restSlugName)throw Object.defineProperty(Error(`You cannot use both an required and optional catch-all route at the same level ("[...${this.restSlugName}]" and "${e[0]}" ).`),"__NEXT_ERROR_CODE",{value:"E299",enumerable:!1,configurable:!0});i(this.optionalRestSlugName,s),this.optionalRestSlugName=s,n="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Object.defineProperty(Error(`You cannot use both an optional and required catch-all route at the same level ("[[...${this.optionalRestSlugName}]]" and "${e[0]}").`),"__NEXT_ERROR_CODE",{value:"E300",enumerable:!1,configurable:!0});i(this.restSlugName,s),this.restSlugName=s,n="[...]"}else{if(a)throw Object.defineProperty(Error(`Optional route parameters are not yet supported ("${e[0]}").`),"__NEXT_ERROR_CODE",{value:"E435",enumerable:!1,configurable:!0});i(this.slugName,s),this.slugName=s,n="[]"}}this.children.has(n)||this.children.set(n,new ni),this.children.get(n)._insert(e.slice(1),t,r)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}class ns{constructor(e){this.definition=e,re(e.pathname)&&(this.dynamic=eZ(rY(e.pathname)))}get identity(){return this.definition.pathname}get isDynamic(){return void 0!==this.dynamic}match(e){let t=this.test(e);return t?{definition:this.definition,params:t.params}:null}test(e){if(this.dynamic){let t=this.dynamic(e);return t?{params:t}:null}return e===this.definition.pathname?{}:null}}class na extends ns{get identity(){var e;return`${this.definition.pathname}?__nextLocale=${null==(e=this.definition.i18n)?void 0:e.locale}`}match(e,t){var r,n;let i=this.test(e,t);return i?{definition:this.definition,params:i.params,detectedLocale:(null==t||null==(r=t.i18n)?void 0:r.detectedLocale)??(null==(n=this.definition.i18n)?void 0:n.locale)}:null}test(e,t){return this.definition.i18n&&(null==t?void 0:t.i18n)?this.definition.i18n.locale&&t.i18n.detectedLocale&&this.definition.i18n.locale!==t.i18n.detectedLocale?null:super.test(t.i18n.pathname):super.test(e)}}class no{get compilationID(){return this.providers.length}async waitTillReady(){this.waitTillReadyPromise&&(await this.waitTillReadyPromise,delete this.waitTillReadyPromise)}async reload(){let{promise:e,resolve:t,reject:r}=new rk;this.waitTillReadyPromise=e;let n=this.compilationID;try{let e,t=[],r=await Promise.all(this.providers.map(e=>e.matchers())),i=new Map,s={};for(let e of r)for(let r of e){r.duplicated&&delete r.duplicated;let e=i.get(r.definition.pathname);if(e){let t=s[r.definition.pathname]??[e];t.push(r),s[r.definition.pathname]=t,e.duplicated=t,r.duplicated=t}t.push(r),i.set(r.definition.pathname,r)}if(this.matchers.duplicates=s,this.previousMatchers.length===t.length&&this.previousMatchers.every((e,r)=>e===t[r]))return;this.previousMatchers=t,this.matchers.static=t.filter(e=>!e.isDynamic);let a=t.filter(e=>e.isDynamic),o=new Map,l=[];for(let e=0;e<a.length;e++){let t=a[e].definition.pathname,r=o.get(t)??[];r.push(e),1===r.length&&(o.set(t,r),l.push(t))}let c=(e=new ni,l.forEach(t=>e.insert(t)),e.smoosh()),u=[];for(let e of c){let t=o.get(e);if(!Array.isArray(t))throw Object.defineProperty(Error("Invariant: expected to find identity in indexes map"),"__NEXT_ERROR_CODE",{value:"E271",enumerable:!1,configurable:!0});let r=t.map(e=>a[e]);u.push(...r)}if(this.matchers.dynamic=u,this.compilationID!==n)throw Object.defineProperty(Error("Invariant: expected compilation to finish before new matchers were added, possible missing await"),"__NEXT_ERROR_CODE",{value:"E242",enumerable:!1,configurable:!0})}catch(e){r(e)}finally{this.lastCompilationID=n,t()}}push(e){this.providers.push(e)}async test(e,t){return null!==await this.match(e,t)}async match(e,t){for await(let r of this.matchAll(e,t))return r;return null}validate(e,t,r){var n;return t instanceof na?t.match(e,r):(null==(n=r.i18n)?void 0:n.inferredFromDefault)?t.match(r.i18n.pathname):t.match(e)}async *matchAll(e,t){if(this.lastCompilationID!==this.compilationID)throw Object.defineProperty(Error("Invariant: expected routes to have been loaded before match"),"__NEXT_ERROR_CODE",{value:"E235",enumerable:!1,configurable:!0});if(!re(e=t2(e)))for(let r of this.matchers.static){let n=this.validate(e,r,t);n&&(yield n)}if(null==t?void 0:t.skipDynamic)return null;for(let r of this.matchers.dynamic){let n=this.validate(e,r,t);n&&(yield n)}return null}constructor(){this.providers=[],this.matchers={static:[],dynamic:[],duplicates:{}},this.lastCompilationID=this.compilationID,this.previousMatchers=[]}}class nl{constructor(e=[]){this.normalizers=e}push(e){this.normalizers.push(e)}normalize(e){return this.normalizers.reduce((e,t)=>t.normalize(e),e)}}var nc=r("./dist/esm/shared/lib/isomorphic/path.js"),nu=r.n(nc);class nd{constructor(...e){this.prefix=nu().posix.join(...e)}normalize(e){return nu().posix.join(this.prefix,e)}}function nh(e){let t=/^\/index(\/|$)/.test(e)&&!re(e)?`/index${e}`:"/"===e?"/index":t2(e);{let{posix:e}=r("path"),n=e.normalize(t);if(n!==t)throw new eU(`Requested and resolved page mismatch: ${t} ${n}`)}return t}class np{normalize(e){return e.replace(/%5F/g,"_")}}class nf extends nd{constructor(){super("app")}normalize(e){return super.normalize(nh(e))}}class nm extends nd{constructor(e){super(e,e5)}normalize(e){return super.normalize(e)}}function ng(e){return e.endsWith("/route")}let ny=["ico","jpg","jpeg","png","svg"],nv=["jpg","jpeg","png"],nb=["jpg","jpeg","png","gif"],nE=["jpg","jpeg","png","gif"],n_=(e,t)=>t&&0!==t.length?`(?:\\.(${e.join("|")})|(\\.(${t.join("|")})))`:`(\\.(?:${e.join("|")}))`,nx=/^[\\/]favicon\.ico$/,nw=/^[\\/]robots\.txt$/,nR=/^[\\/]manifest\.json$/,nC=/^[\\/]manifest\.webmanifest$/,nP=/[\\/]sitemap\.xml$/,nO=new Map;function nT(e){return{normalize:e}}class nS extends nl{constructor(){super([nT(t3),new np])}normalize(e){return super.normalize(e)}}class nN{constructor(e){this.filename=new nm(e),this.pathname=new nS,this.bundlePath=new nf}}var nj=((R={}).PAGES="PAGES",R.PAGES_API="PAGES_API",R.APP_PAGE="APP_PAGE",R.APP_ROUTE="APP_ROUTE",R.IMAGE="IMAGE",R);class nA extends ns{get identity(){return`${this.definition.pathname}?__nextPage=${this.definition.page}`}}class nD{constructor(e){this.loader=e,this.cached=[]}async matchers(){let e=await this.loader.load();if(!e)return[];if(this.data&&this.loader.compare(this.data,e))return this.cached;this.data=e;let t=await this.transform(e);return this.cached=t,t}}class n$ extends nD{constructor(e,t){super({load:async()=>t.load(e),compare:(e,t)=>e===t})}}class nk extends n${constructor(e,t){super(e9,t),this.normalizers=new nN(e)}async transform(e){let t=Object.keys(e).filter(e=>e.endsWith("/page")),r={};for(let e of t){let t=this.normalizers.pathname.normalize(e);t in r?r[t].push(e):r[t]=[e]}let n=[];for(let[t,i]of Object.entries(r)){let r=i[0],s=this.normalizers.filename.normalize(e[r]),a=this.normalizers.bundlePath.normalize(r);n.push(new nA({kind:nj.APP_PAGE,pathname:t,page:r,bundlePath:a,filename:s,appPaths:i}))}return n}}class nI extends ns{}class nM extends n${constructor(e,t){super(e9,t),this.normalizers=new nN(e)}async transform(e){let t=Object.keys(e).filter(e=>ng(e)),r=[];for(let n of t){let t=this.normalizers.filename.normalize(e[n]),i=this.normalizers.pathname.normalize(n),s=this.normalizers.bundlePath.normalize(n);r.push(new nI({kind:nj.APP_ROUTE,pathname:i,page:n,bundlePath:s,filename:t}))}return r}}function nL(e){return"/api"===e||!!(null==e?void 0:e.startsWith("/api/"))}class nq extends ns{}class nH extends na{}class nF extends nl{constructor(){super([nT(nh),new nd("pages")])}normalize(e){return super.normalize(e)}}class nz extends nd{constructor(e){super(e,e5)}normalize(e){return super.normalize(e)}}class nU{constructor(e){this.filename=new nz(e),this.bundlePath=new nF}}class nX extends n${constructor(e,t,r){super(e6,t),this.i18nProvider=r,this.normalizers=new nU(e)}async transform(e){let t=Object.keys(e).filter(e=>nL(e)),r=[];for(let n of t)if(this.i18nProvider){let{detectedLocale:t,pathname:i}=this.i18nProvider.analyze(n);r.push(new nH({kind:nj.PAGES_API,pathname:i,page:n,bundlePath:this.normalizers.bundlePath.normalize(n),filename:this.normalizers.filename.normalize(e[n]),i18n:{locale:t}}))}else r.push(new nq({kind:nj.PAGES_API,pathname:n,page:n,bundlePath:this.normalizers.bundlePath.normalize(n),filename:this.normalizers.filename.normalize(e[n])}));return r}}class nW extends ns{}class nB extends na{}class nG extends n${constructor(e,t,r){super(e6,t),this.i18nProvider=r,this.normalizers=new nU(e)}async transform(e){let t=Object.keys(e).filter(e=>!nL(e)).filter(e=>{var t;let r=(null==(t=this.i18nProvider)?void 0:t.analyze(e).pathname)??e;return!e7.includes(r)}),r=[];for(let n of t)if(this.i18nProvider){let{detectedLocale:t,pathname:i}=this.i18nProvider.analyze(n);r.push(new nB({kind:nj.PAGES,pathname:i,page:n,bundlePath:this.normalizers.bundlePath.normalize(n),filename:this.normalizers.filename.normalize(e[n]),i18n:{locale:t}}))}else r.push(new nW({kind:nj.PAGES,pathname:n,page:n,bundlePath:this.normalizers.bundlePath.normalize(n),filename:this.normalizers.filename.normalize(e[n])}));return r}}class nV{constructor(e){this.getter=e}load(e){return this.getter(e)}}class nK{constructor(e){var t;if(this.config=e,!e.locales.length)throw Object.defineProperty(Error("Invariant: No locales provided"),"__NEXT_ERROR_CODE",{value:"E510",enumerable:!1,configurable:!0});this.lowerCaseLocales=e.locales.map(e=>e.toLowerCase()),this.lowerCaseDomains=null==(t=e.domains)?void 0:t.map(e=>{var t;let r=e.domain.toLowerCase();return{defaultLocale:e.defaultLocale.toLowerCase(),hostname:r.split(":",1)[0],domain:r,locales:null==(t=e.locales)?void 0:t.map(e=>e.toLowerCase()),http:e.http}})}detectDomainLocale(e,t){if(e&&this.lowerCaseDomains&&this.config.domains){t&&(t=t.toLowerCase());for(let n=0;n<this.lowerCaseDomains.length;n++){var r;let i=this.lowerCaseDomains[n];if(i.hostname===e||(null==(r=i.locales)?void 0:r.some(e=>e===t)))return this.config.domains[n]}}}fromRequest(e,t){let r=e1(e,"locale");if(r){let e=this.analyze(t);e.detectedLocale&&(e.detectedLocale!==r&&console.warn(`The detected locale does not match the locale in the query. Expected to find '${r}' in '${t}' but found '${e.detectedLocale}'}`),t=e.pathname)}return{pathname:t,detectedLocale:r,inferredFromDefault:e1(e,"localeInferredFromDefault")??!1}}analyze(e,t={}){let r=t.defaultLocale,n="string"==typeof r,i=e.split("/",2);if(!i[1])return{detectedLocale:r,pathname:e,inferredFromDefault:n};let s=i[1].toLowerCase(),a=this.lowerCaseLocales.indexOf(s);return a<0||(r=this.config.locales[a],n=!1,e=e.slice(r.length+1)||"/"),{detectedLocale:r,pathname:e,inferredFromDefault:n}}}async function nY(e,t,r,n){{var i;t.statusCode=r.status,t.statusMessage=r.statusText;let s=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(i=r.headers)||i.forEach((e,r)=>{if("x-middleware-set-cookie"!==r.toLowerCase())if("set-cookie"===r.toLowerCase())for(let n of rc(e))t.appendHeader(r,n);else{let n=void 0!==t.getHeader(r);(s.includes(r.toLowerCase())||!n)&&t.appendHeader(r,e)}});let{originalResponse:a}=t;r.body&&"HEAD"!==e.method?await rH(r.body,a,n):a.end()}}let nJ=rX("/_next/data/:path*");class nQ{constructor(e){this.suffix=e}match(e){return!!e.endsWith(this.suffix)}normalize(e,t){return t||this.match(e)?e.substring(0,e.length-this.suffix.length):e}}class nZ extends nQ{constructor(){super(td)}}class n0{constructor(e){if(this.prefix=e,e.endsWith("/"))throw Object.defineProperty(Error(`PrefixPathnameNormalizer: prefix "${e}" should not end with a slash`),"__NEXT_ERROR_CODE",{value:"E219",enumerable:!1,configurable:!0})}match(e){return e===this.prefix||!!e.startsWith(this.prefix+"/")}normalize(e,t){return t||this.match(e)?e.length===this.prefix.length?"/":e.substring(this.prefix.length):e}}class n1{constructor(e){if(this.suffix=new nQ(".json"),!e)throw Object.defineProperty(Error("Invariant: buildID is required"),"__NEXT_ERROR_CODE",{value:"E200",enumerable:!1,configurable:!0});this.prefix=new n0(`/_next/data/${e}`)}match(e){return this.prefix.match(e)&&this.suffix.match(e)}normalize(e,t){return t||this.match(e)?(e=this.prefix.normalize(e,!0),rU(e=this.suffix.normalize(e,!0))):e}}function n4(e){return e.replace(/(?:\/index)?\/?$/,"")||"/"}Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});let n2=Symbol.for("@next/request-context");Symbol("response"),Symbol("passThrough"),Symbol("waitUntil");let n3=Symbol("internal response"),n8=new Set([301,302,303,307,308]);function n6(e,t){var r;if(null==e||null==(r=e.request)?void 0:r.headers){if(!(e.request.headers instanceof Headers))throw Object.defineProperty(Error("request.headers must be an instance of Headers"),"__NEXT_ERROR_CODE",{value:"E119",enumerable:!1,configurable:!0});let r=[];for(let[n,i]of e.request.headers)t.set("x-middleware-request-"+n,i),r.push(n);t.set("x-middleware-override-headers",r.join(","))}}class n9 extends Response{constructor(e,t={}){super(e,t);const r=this.headers,n=new Proxy(new rN.ResponseCookies(r),{get(e,n,i){switch(n){case"delete":case"set":return(...i)=>{let s=Reflect.apply(e[n],e,i),a=new Headers(r);return s instanceof rN.ResponseCookies&&r.set("x-middleware-set-cookie",s.getAll().map(e=>(0,rN.stringifyCookie)(e)).join(",")),n6(t,a),s};default:return tr.get(e,n,i)}}});this[n3]={cookies:n,url:t.url?new rP(t.url,{headers:ru(r),nextConfig:t.nextConfig}):void 0}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,url:this.url,body:this.body,bodyUsed:this.bodyUsed,headers:Object.fromEntries(this.headers),ok:this.ok,redirected:this.redirected,status:this.status,statusText:this.statusText,type:this.type}}get cookies(){return this[n3].cookies}static json(e,t){let r=Response.json(e,t);return new n9(r.body,r)}static redirect(e,t){let r="number"==typeof t?t:(null==t?void 0:t.status)??307;if(!n8.has(r))throw Object.defineProperty(RangeError('Failed to execute "redirect" on "response": Invalid status code'),"__NEXT_ERROR_CODE",{value:"E529",enumerable:!1,configurable:!0});let n="object"==typeof t?t:{},i=new Headers(null==n?void 0:n.headers);return i.set("Location",rd(e)),new n9(null,{...n,headers:i,status:r})}static rewrite(e,t){let r=new Headers(null==t?void 0:t.headers);return r.set("x-middleware-rewrite",rd(e)),n6(t,r),new n9(null,{...t,headers:r})}static next(e){let t=new Headers(null==e?void 0:e.headers);return t.set("x-middleware-next","1"),n6(e,t),new n9(null,{...e,headers:t})}}Symbol.for("next.mutated.cookies"),r("./dist/compiled/p-queue/index.js");let n5=require("next/dist/server/lib/incremental-cache/tags-manifest.external.js");function n7(e){if(0===e)return{get:()=>Promise.resolve(void 0),set:()=>Promise.resolve(),refreshTags:()=>Promise.resolve(),getExpiration:()=>Promise.resolve(0),updateTags:()=>Promise.resolve()};let t=new M(e,e=>e.size),r=new Map,n=process.env.NEXT_PRIVATE_DEBUG_CACHE?console.debug.bind(console,"DefaultCacheHandler:"):void 0;return{async get(e){let i=r.get(e);i&&(null==n||n("get",e,"pending"),await i);let s=t.get(e);if(!s){null==n||n("get",e,"not found");return}let a=s.entry;if(performance.timeOrigin+performance.now()>a.timestamp+1e3*a.revalidate){null==n||n("get",e,"expired");return}let o=a.revalidate;if((0,n5.areTagsExpired)(a.tags,a.timestamp)){null==n||n("get",e,"had expired tag");return}(0,n5.areTagsStale)(a.tags,a.timestamp)&&(null==n||n("get",e,"had stale tag"),o=-1);let[l,c]=a.value.tee();return a.value=c,null==n||n("get",e,"found",{tags:a.tags,timestamp:a.timestamp,expire:a.expire,revalidate:o}),{...a,revalidate:o,value:l}},async set(e,i){null==n||n("set",e,"start");let s=()=>{},a=new Promise(e=>{s=e});r.set(e,a);let o=await i,l=0;try{let[r,i]=o.value.tee();o.value=r;let s=i.getReader();for(let e;!(e=await s.read()).done;)l+=Buffer.from(e.value).byteLength;t.set(e,{entry:o,isErrored:!1,errorRetryCount:0,size:l}),null==n||n("set",e,"done")}catch(t){null==n||n("set",e,"failed",t)}finally{s(),r.delete(e)}},async refreshTags(){},async getExpiration(e){let t=Math.max(...e.map(e=>{let t=n5.tagsManifest.get(e);return t&&t.expired||0}),0);return null==n||n("getExpiration",{tags:e,expiration:t}),t},async updateTags(e,t){let r=Math.round(performance.timeOrigin+performance.now());for(let i of(null==n||n("updateTags",{tags:e,timestamp:r}),e)){let e=n5.tagsManifest.get(i)||{};if(t){let n={...e};n.stale=r,void 0!==t.expire&&(n.expired=r+1e3*t.expire),n5.tagsManifest.set(i,n)}else n5.tagsManifest.set(i,{...e,expired:r})}}}}let ie=process.env.NEXT_PRIVATE_DEBUG_CACHE?(e,...t)=>{console.log(`use-cache: ${e}`,...t)}:void 0,it=Symbol.for("@next/cache-handlers"),ir=Symbol.for("@next/cache-handlers-map"),ii=Symbol.for("@next/cache-handlers-set"),is=globalThis;require("next/dist/server/app-render/after-task-async-storage.external.js");class ia extends rA{constructor(e){super(e.input,e.init),this.sourcePage=e.page}get request(){throw Object.defineProperty(new rO({page:this.sourcePage}),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}respondWith(){throw Object.defineProperty(new rO({page:this.sourcePage}),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}waitUntil(){throw Object.defineProperty(new rO({page:this.sourcePage}),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}}let io=RegExp(`^(/.*)${tc}(/.*)${tu}$`);class il{match(e){return io.test(e)}extract(e){let t=e.match(io);return t?{originalPathname:t[1],segmentPath:t[2]}:null}normalize(e){let t=this.extract(e);return t?t.originalPathname:e}}let ic=require("next/dist/shared/lib/no-fallback-error.external.js"),iu={catchall:"c","catchall-intercepted-(..)(..)":"ci(..)(..)","catchall-intercepted-(.)":"ci(.)","catchall-intercepted-(..)":"ci(..)","catchall-intercepted-(...)":"ci(...)","optional-catchall":"oc",dynamic:"d","dynamic-intercepted-(..)(..)":"di(..)(..)","dynamic-intercepted-(.)":"di(.)","dynamic-intercepted-(..)":"di(..)","dynamic-intercepted-(...)":"di(...)"};class id extends Error{constructor(e){super(),this.innerError=e}}class ih{getServerComponentsHmrCache(){return this.nextConfig.experimental.serverComponentsHmrCache?globalThis.__serverComponentsHmrCache:void 0}constructor(e){var t,r;this.handleRSCRequest=(e,t,r)=>{var n,i;if(!r.pathname)return!1;if(null==(n=this.normalizers.segmentPrefetchRSC)?void 0:n.match(r.pathname)){let t=this.normalizers.segmentPrefetchRSC.extract(r.pathname);if(!t)return!1;let{originalPathname:n,segmentPath:i}=t;r.pathname=n,e.headers.rsc="1",e.headers[r5]="1",e.headers[r7]=i,e4(e,"isRSCRequest",!0),e4(e,"isPrefetchRSCRequest",!0),e4(e,"segmentPrefetchRSCRequest",i)}else if(null==(i=this.normalizers.rsc)?void 0:i.match(r.pathname))r.pathname=this.normalizers.rsc.normalize(r.pathname,!0),e.headers.rsc="1",e4(e,"isRSCRequest",!0);else if(e.headers["x-now-route-matches"]){var s=e.headers;for(let e of nt)delete s[e];return!1}else if("1"!==e.headers.rsc)return!1;else if(e4(e,"isRSCRequest",!0),"1"===e.headers[r5]){e4(e,"isPrefetchRSCRequest",!0);let t=e.headers[r7];"string"==typeof t&&e4(e,"segmentPrefetchRSCRequest",t)}if(e.url){let t=tD(e.url);t.pathname=r.pathname,e.url=(0,D.format)(t)}return!1},this.handleNextDataRequest=async(e,t,r)=>{var n,i;let s=await this.getMiddleware(),a="string"==typeof(n=r.pathname)&&nJ(n);if(!a||!a.path)return!1;if(a.path[0]!==this.buildId)return!e1(e,"middlewareInvoke")&&(await this.render404(e,t,r),!0);a.path.shift();let o=a.path[a.path.length-1];if("string"!=typeof o||!o.endsWith(".json"))return await this.render404(e,t,r),!0;let l=`/${a.path.join("/")}`;if(l=function(e,t=""){return e=e.replace(/\\/g,"/"),(e=t&&e.endsWith(t)?e.slice(0,-t.length):e).startsWith("/index/")&&!re(e)?e=e.slice(6):"/index"===e&&(e="/"),e}(l,".json"),s&&(this.nextConfig.trailingSlash&&!l.endsWith("/")&&(l+="/"),!this.nextConfig.trailingSlash&&l.length>1&&l.endsWith("/")&&(l=l.substring(0,l.length-1))),this.i18nProvider){let n=null==e||null==(i=e.headers.host)?void 0:i.split(":",1)[0].toLowerCase(),a=this.i18nProvider.detectDomainLocale(n),o=(null==a?void 0:a.defaultLocale)??this.i18nProvider.config.defaultLocale,c=this.i18nProvider.analyze(l);if(c.detectedLocale&&(l=c.pathname),e4(e,"locale",c.detectedLocale),e4(e,"defaultLocale",o),c.detectedLocale||e2(e,"localeInferredFromDefault"),!c.detectedLocale&&!s)return e4(e,"locale",o),await this.render404(e,t,r),!0}return r.pathname=l,e4(e,"isNextDataReq",!0),!1},this.handleNextImageRequest=()=>!1,this.handleCatchallRenderRequest=()=>!1,this.handleCatchallMiddlewareRequest=()=>!1,this.normalize=e=>{let t=[];for(let r of(this.normalizers.data&&t.push(this.normalizers.data),this.normalizers.segmentPrefetchRSC&&t.push(this.normalizers.segmentPrefetchRSC),this.normalizers.rsc&&t.push(this.normalizers.rsc),t))if(r.match(e))return r.normalize(e,!0);return e},this.normalizeAndAttachMetadata=async(e,t,r)=>{let n=await this.handleNextImageRequest(e,t,r);return!!(n||this.enabledDirectories.pages&&(n=await this.handleNextDataRequest(e,t,r)))||!1},this.prepared=!1,this.preparedPromise=null,this.customErrorNo404Warn=function(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}(()=>{tH(`You have added a custom /_error page without a custom /404 page. This prevents the 404 page from being auto statically optimized.
|
|
25
|
-
See here for info: https://nextjs.org/docs/messages/custom-error-no-custom-404`)});const{dir:n=".",quiet:i=!1,conf:s,dev:a=!1,minimalMode:o=!1,hostname:l,port:c,experimentalTestProxy:u}=e;if(this.experimentalTestProxy=u,this.serverOptions=e,this.dir=j.resolve(n),this.quiet=i,this.loadEnvConfig({dev:a,forceReload:!1}),this.nextConfig=s,this.nextConfig.experimental.runtimeServerDeploymentId){if(!process.env.NEXT_DEPLOYMENT_ID)throw Object.defineProperty(Error("process.env.NEXT_DEPLOYMENT_ID is missing but runtimeServerDeploymentId is enabled"),"__NEXT_ERROR_CODE",{value:"E970",enumerable:!1,configurable:!0});this.deploymentId=process.env.NEXT_DEPLOYMENT_ID}else{let e=this.nextConfig.experimental.useSkewCookie?"":this.nextConfig.deploymentId||"";this.deploymentId=e,process.env.NEXT_DEPLOYMENT_ID=e}this.hostname=l,this.hostname&&(this.fetchHostname=function(e){return t4.test(e)?`[${e}]`:e}(this.hostname)),this.port=c,this.distDir=j.join(this.dir,this.nextConfig.distDir),this.publicDir=this.getPublicDir(),this.hasStaticDir=!o&&this.getHasStaticDir(),this.i18nProvider=(null==(t=this.nextConfig.i18n)?void 0:t.locales)?new nK(this.nextConfig.i18n):void 0,this.localeNormalizer=this.i18nProvider?new nn(this.i18nProvider):void 0;const{assetPrefix:d,generateEtags:h}=this.nextConfig;this.buildId=this.getBuildId(),this.minimalMode=o||!!process.env.NEXT_PRIVATE_MINIMAL_MODE,this.enabledDirectories=this.getEnabledDirectories(a),this.isAppPPREnabled=this.enabledDirectories.app&&function(e){return void 0!==e&&("boolean"==typeof e?e:"incremental"===e)}(this.nextConfig.experimental.ppr),this.normalizers={rsc:this.enabledDirectories.app&&1?new nZ:void 0,segmentPrefetchRSC:new il,data:this.enabledDirectories.pages?new n1(this.buildId):void 0},this.nextFontManifest=this.getNextFontManifest(),this.renderOpts={dir:this.dir,supportsDynamicResponse:!0,trailingSlash:this.nextConfig.trailingSlash,poweredByHeader:this.nextConfig.poweredByHeader,generateEtags:h,previewProps:this.getPrerenderManifest().preview,basePath:this.nextConfig.basePath,images:this.nextConfig.images,optimizeCss:this.nextConfig.experimental.optimizeCss,nextConfigOutput:this.nextConfig.output,nextScriptWorkers:this.nextConfig.experimental.nextScriptWorkers,disableOptimizedLoading:this.nextConfig.experimental.disableOptimizedLoading,domainLocales:null==(r=this.nextConfig.i18n)?void 0:r.domains,distDir:this.distDir,serverComponents:this.enabledDirectories.app,cacheLifeProfiles:this.nextConfig.cacheLife,enableTainting:this.nextConfig.experimental.taint,crossOrigin:this.nextConfig.crossOrigin?this.nextConfig.crossOrigin:void 0,largePageDataBytes:this.nextConfig.experimental.largePageDataBytes,isExperimentalCompile:this.nextConfig.experimental.isExperimentalCompile,htmlLimitedBots:this.nextConfig.htmlLimitedBots,cacheComponents:this.nextConfig.cacheComponents??!1,experimental:{expireTime:this.nextConfig.expireTime,staleTimes:this.nextConfig.experimental.staleTimes,clientTraceMetadata:this.nextConfig.experimental.clientTraceMetadata,clientParamParsingOrigins:this.nextConfig.experimental.clientParamParsingOrigins,dynamicOnHover:this.nextConfig.experimental.dynamicOnHover??!1,optimisticRouting:this.nextConfig.experimental.optimisticRouting??!1,inlineCss:this.nextConfig.experimental.inlineCss??!1,authInterrupts:!!this.nextConfig.experimental.authInterrupts,maxPostponedStateSizeBytes:tQ(this.nextConfig.experimental.maxPostponedStateSize)},onInstrumentationRequestError:this.instrumentationOnRequestError.bind(this),reactMaxHeadersLength:this.nextConfig.reactMaxHeadersLength},this.pagesManifest=this.getPagesManifest(),this.appPathsManifest=this.getAppPathsManifest(),this.appPathRoutes=this.getAppPathRoutes(),this.interceptionRoutePatterns=this.getinterceptionRoutePatterns(),this.matchers=this.getRouteMatchers(),this.matchers.reload(),this.setAssetPrefix(d)}reloadMatchers(){return this.matchers.reload()}getRouteMatchers(){let e=new nV(e=>{switch(e){case e6:return this.getPagesManifest()??null;case e9:return this.getAppPathsManifest()??null;default:return null}}),t=new no;return t.push(new nG(this.distDir,e,this.i18nProvider)),t.push(new nX(this.distDir,e,this.i18nProvider)),this.enabledDirectories.app&&(t.push(new nk(this.distDir,e)),t.push(new nM(this.distDir,e))),t}async instrumentationOnRequestError(...e){let[t,r,n]=e;if(this.instrumentation)try{await (null==this.instrumentation.onRequestError?void 0:this.instrumentation.onRequestError.call(this.instrumentation,t,{path:r.url||"",method:r.method||"GET",headers:r instanceof ia?Object.fromEntries(r.headers.entries()):r.headers},n))}catch(e){console.error("Error in instrumentation.onRequestError:",e)}}logError(e){this.quiet||tq(e)}async handleRequest(e,t,r){await this.prepare();let n=e.method.toUpperCase(),i=(0,ty.getTracer)();return i.withPropagatedContext(e.headers,()=>i.trace(tv.handleRequest,{spanName:`${n}`,kind:ty.SpanKind.SERVER,attributes:{"http.method":n,"http.target":e.url}},async s=>this.handleRequestImpl(e,t,r).finally(()=>{if(!s)return;let r=e1(e,"isRSCRequest")??!1;s.setAttributes({"http.status_code":t.statusCode,"next.rsc":r}),t.statusCode&&t.statusCode>=500&&(s.setStatus({code:ty.SpanStatusCode.ERROR}),s.setAttribute("error.type",t.statusCode.toString()));let a=i.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==tv.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let o=a.get("next.route");if(o){let e=r?`RSC ${n} ${o}`:`${n} ${o}`;s.setAttributes({"next.route":o,"http.route":o,"next.span_name":e}),s.updateName(e)}else s.updateName(r?`RSC ${n}`:`${n}`)})))}async handleRequestImpl(e,t,r){try{var n,i,s,a,o,l,c,u,d,h;let p;await this.matchers.waitTillReady(),p=(h=t.originalResponse).setHeader.bind(h),h.setHeader=(t,r)=>{if("headersSent"in h&&h.headersSent)return h;if("set-cookie"===t.toLowerCase()){let t=e1(e,"middlewareCookie");t&&Array.isArray(r)&&r.every((e,r)=>e===t[r])||(r=[...new Set([...t||[],..."string"==typeof r?[r]:Array.isArray(r)?r:[]])])}return p(t,r)};let f=(e.url||"").split("?",1)[0];if(null==f?void 0:f.match(/(\\|\/\/)/)){let r,n=(r=e.url.split("?"))[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(r[1]?`?${r.slice(1).join("?")}`:"");t.redirect(n,308).body(n).send();return}if(!r||"object"!=typeof r){if(!e.url)throw Object.defineProperty(Error("Invariant: url can not be undefined"),"__NEXT_ERROR_CODE",{value:"E123",enumerable:!1,configurable:!0});r=tD(e.url)}if(!r.pathname)throw Object.defineProperty(Error("Invariant: pathname can't be empty"),"__NEXT_ERROR_CODE",{value:"E412",enumerable:!1,configurable:!0});"string"==typeof r.query&&(r.query=Object.fromEntries(new URLSearchParams(r.query)));let{originalRequest:m=null}=e,g=null==m?void 0:m.headers["x-forwarded-proto"],y=g?"https"===g:!!(null==m||null==(n=m.socket)?void 0:n.encrypted);e.headers["x-forwarded-host"]??=e.headers.host??this.hostname,e.headers["x-forwarded-port"]??=this.port?this.port.toString():y?"443":"80",e.headers["x-forwarded-proto"]??=y?"https":"http",e.headers["x-forwarded-for"]??=null==m||null==(i=m.socket)?void 0:i.remoteAddress,this.attachRequestMeta(e,r);let v=await this.handleRSCRequest(e,t,r);if(v)return;let b=null==(s=this.i18nProvider)?void 0:s.detectDomainLocale(rv(r,e.headers)),E=(null==b?void 0:b.defaultLocale)||(null==(a=this.nextConfig.i18n)?void 0:a.defaultLocale);e4(e,"defaultLocale",E);let _=tD(e.url.replace(/^\/+/,"/")),x=rx(_.pathname,{nextConfig:this.nextConfig,i18nProvider:this.i18nProvider});_.pathname=x.pathname,x.basePath&&(e.url=r_(e.url,this.nextConfig.basePath));let w="string"==typeof e.headers[tl];if(w)try{this.enabledDirectories.app&&(e.url.match(/^\/index($|\?)/)&&(e.url=e.url.replace(/^\/index/,"/")),r.pathname="/index"===r.pathname?"/":r.pathname);let{pathname:n}=new URL(function(e){let t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return new TextDecoder("utf-8").decode(t)}(e.headers[tl]),"http://localhost"),{pathname:i}=new URL(e.url,"http://localhost");if((null==(o=this.normalizers.data)?void 0:o.match(i))&&e4(e,"isNextDataReq",!0),this.isAppPPREnabled&&"1"===e.headers["next-resume"]&&"POST"===e.method){let r=this.nextConfig.experimental.maxPostponedStateSize??tJ,n=tQ(this.nextConfig.experimental.maxPostponedStateSize);if(void 0===n)throw Object.defineProperty(Error('maxPostponedStateSize must be a valid number (bytes) or filesize format string (e.g., "5mb")'),"__NEXT_ERROR_CODE",{value:"E977",enumerable:!1,configurable:!0});let i=[],s=0;for await(let a of e.body){if((s+=Buffer.byteLength(a))>n){t.statusCode=413;let e=`Postponed state exceeded ${r} limit. To configure the limit, see: https://nextjs.org/docs/app/api-reference/config/next-config-js/max-postponed-state-size`;t.body(e).send();return}i.push(a)}let a=Buffer.concat(i).toString("utf8");e4(e,"postponed",a)}if(e1(e,"isNextDataReq")&&e1(e,"postponed")){t.statusCode=422,t.send();return}n=this.normalize(n);let s=this.stripNextDataPath(i);n=rU(n);let a=null==(l=this.i18nProvider)?void 0:l.analyze(n,{defaultLocale:E});a&&(e4(e,"locale",a.detectedLocale),a.inferredFromDefault?e4(e,"localeInferredFromDefault",!0):e2(e,"localeInferredFromDefault"));let d=n,h=re(d),p={params:!1,hasValidParams:!1},f=await this.matchers.match(d,{i18n:a});!h&&f&&(d=f.definition.pathname,void 0!==f.params&&(h=!0,p.params=f.params,p.hasValidParams=!0)),a&&(n=a.pathname);let m=function({page:e,i18n:t,basePath:r,rewrites:n,pageIsDynamic:i,trailingSlash:s,caseSensitive:a}){let o,l,c;if(i){var u;let t,r;u={prefixRouteKeys:!1},r=(t=function(e,t,r,n,i,s={names:{},intercepted:{}}){let a,o=(a=0,()=>{let e="",t=++a;for(;t>0;)e+=String.fromCharCode(97+(t-1)%26),t=Math.floor((t-1)/26);return e}),l={},c=[],u=[];for(let a of(s=structuredClone(s),rp(e).slice(1).split("/"))){let e,d=t6.some(e=>a.startsWith(e)),h=a.match(rV),p=d?h?.[1]:void 0;if(p&&h?.[2]?(e=t?to:void 0,s.intercepted[h[2]]=p):e=h?.[2]&&s.intercepted[h[2]]?t?to:void 0:t?ta:void 0,p&&h&&h[2]){let{key:t,pattern:r,cleanedKey:n,repeat:a,optional:d}=rJ({getSafeRouteKey:o,interceptionMarker:p,segment:h[2],routeKeys:l,keyPrefix:e,backreferenceDuplicateKeys:i});c.push(r),u.push(`/${h[1]}:${s.names[t]??n}${a?d?"*":"+":""}`),s.names[t]??=n}else if(h&&h[2]){n&&h[1]&&(c.push(`/${rG(h[1])}`),u.push(`/${h[1]}`));let{key:t,pattern:r,cleanedKey:a,repeat:d,optional:p}=rJ({getSafeRouteKey:o,segment:h[2],routeKeys:l,keyPrefix:e,backreferenceDuplicateKeys:i}),f=r;n&&h[1]&&(f=f.substring(1)),c.push(f),u.push(`/:${s.names[t]??a}${d?p?"*":"+":""}`),s.names[t]??=a}else c.push(`/${rG(a)}`),u.push(`/${a}`);r&&h&&h[3]&&(c.push(rG(h[3])),u.push(h[3]))}return{namedParameterizedRoute:c.join(""),routeKeys:l,pathToRegexpPattern:u.join(""),reference:s}}(e,u.prefixRouteKeys,u.includeSuffix??!1,u.includePrefix??!1,u.backreferenceDuplicateKeys??!1,u.reference)).namedParameterizedRoute,u.excludeOptionalTrailingSlash||(r+="(?:/)?"),c=(l=eZ(o={...rY(e,u),namedRegex:`^${r}$`,routeKeys:t.routeKeys,pathToRegexpPattern:t.pathToRegexpPattern,reference:t.reference}))(e)}return{handleRewrites:function(o,c){let u=structuredClone(c),d={},h=u.pathname,p=n=>{let c=rX(n.source+(s?"(/)?":""),{removeUnnamedParams:!0,strict:!0,sensitive:!!a});if(!u.pathname)return!1;let p=c(u.pathname);if((n.has||n.missing)&&p){let e=rZ(o,u.query,n.has,n.missing);e?Object.assign(p,e):p=!1}if(p){let{parsedDestination:s,destQuery:a}=function(e){let t,r,n=function(e){let t=e.destination;for(let n of Object.keys({...e.params,...e.query}))if(n){var r;r=t,t=r.replace(RegExp(`:${rG(n)}`,"g"),`__ESC_COLON_${n}`)}let n=tD(t),i=n.pathname;i&&(i=rQ(i));let s=n.href;s&&(s=rQ(s));let a=n.hostname;a&&(a=rQ(a));let o=n.hash;o&&(o=rQ(o));let l=n.search;l&&(l=rQ(l));let c=n.origin;return c&&(c=rQ(c)),{...n,pathname:i,hostname:a,href:s,hash:o,search:l,origin:c}}(e),{hostname:i,query:s,search:a}=n,o=n.pathname;n.hash&&(o=`${o}${n.hash}`);let l=[],c=[];for(let e of(eJ(o,c),c))l.push(e.name);if(i){let e=[];for(let t of(eJ(i,e),e))l.push(t.name)}let u=eQ(o,{validate:!1});for(let[r,n]of(i&&(t=eQ(i,{validate:!1})),Object.entries(s)))Array.isArray(n)?s[r]=n.map(t=>r0(rQ(t),e.params)):"string"==typeof n&&(s[r]=r0(rQ(n),e.params));let d=Object.keys(e.params).filter(e=>"nextInternalLocale"!==e);if(e.appendParamsToQuery&&!d.some(e=>l.includes(e)))for(let t of d)t in s||(s[t]=e.params[t]);if(t9(o))for(let t of o.split("/")){let r=t6.find(e=>t.startsWith(e));if(r){"(..)(..)"===r?(e.params["0"]="(..)",e.params["1"]="(..)"):e.params["0"]=r;break}}try{let[i,s]=(r=u(e.params)).split("#",2);t&&(n.hostname=t(e.params)),n.pathname=i,n.hash=`${s?"#":""}${s||""}`,n.search=a?r0(a,e.params):""}catch(e){if(e.message.match(/Expected .*? to not repeat, but got an array/))throw Object.defineProperty(Error("To use a multi-match in the destination you must add `*` at the end of the param name to signify it should repeat. https://nextjs.org/docs/messages/invalid-multi-match"),"__NEXT_ERROR_CODE",{value:"E329",enumerable:!1,configurable:!0});throw e}return n.query={...e.query,...n.query},{newUrl:r,destQuery:s,parsedDestination:n}}({appendParamsToQuery:!0,destination:n.destination,params:p,query:u.query});if(s.protocol)return!0;if(Object.assign(d,a,p),Object.assign(u.query,s.query),delete s.query,Object.assign(u,s),!(h=u.pathname))return!1;if(r&&(h=h.replace(RegExp(`^${r}`),"")||"/"),t){let e=rE(h,t.locales);h=e.pathname,u.query.nextInternalLocale=e.detectedLocale||p.nextInternalLocale}if(h===e)return!0;if(i&&l){let e=l(h);if(e)return u.query={...u.query,...e},!0}}return!1};for(let e of n.beforeFiles||[])p(e);if(h!==e){let t,r=!1;for(let e of n.afterFiles||[])if(r=p(e))break;if(!r&&!((t=rp(h||""))===rp(e)||(null==l?void 0:l(t)))){for(let e of n.fallback||[])if(r=p(e))break}}return{rewriteParams:d,rewrittenParsedUrl:u}},defaultRouteRegex:o,dynamicRouteMatcher:l,defaultRouteMatches:c,normalizeQueryParams:function(e,t){for(let[r,n]of(delete e.nextInternalLocale,Object.entries(e))){let i=rh(r);i&&(delete e[r],t.add(i),void 0!==n&&(e[i]=Array.isArray(n)?n.map(e=>r1(e)):r1(n)))}},getParamsFromRouteMatches:function(e){if(!o)return null;let{groups:t,routeKeys:r}=o,n=eZ({re:{exec:e=>{let n=Object.fromEntries(new URLSearchParams(e));for(let[e,t]of Object.entries(n)){let r=rh(e);r&&(n[r]=t,delete n[e])}let i={};for(let e of Object.keys(r)){let s=r[e];if(!s)continue;let a=t[s],o=n[e];if(!a.optional&&!o)return null;i[a.pos]=o}return i}},groups:t})(e);return n||null},normalizeDynamicRouteParams:(e,t)=>{if(!o||!c)return{params:{},hasValidParams:!1};var r=o,n=c;let i={};for(let s of Object.keys(r.groups)){let a=e[s];"string"==typeof a?a=t8(a):Array.isArray(a)&&(a=a.map(t8));let o=n[s],l=r.groups[s].optional;if((Array.isArray(o)?o.some(e=>Array.isArray(a)?a.some(t=>t.includes(e)):null==a?void 0:a.includes(e)):null==a?void 0:a.includes(o))||void 0===a&&!(l&&t))return{params:{},hasValidParams:!1};l&&(!a||Array.isArray(a)&&1===a.length&&("index"===a[0]||a[0]===`[[...${s}]]`)||"index"===a||a===`[[...${s}]]`)&&(a=void 0,delete e[s]),a&&"string"==typeof a&&r.groups[s].repeat&&(a=a.split("/")),a&&(i[s]=a)}return{params:i,hasValidParams:!0}},normalizeCdnUrl:(e,t)=>(function(e,t){let r=function(e){let t=function(e){let t;try{t=new URL(e,"http://n")}catch{}return t}(e);if(!t)return;let r={};for(let e of t.searchParams.keys()){let n=t.searchParams.getAll(e);r[e]=n.length>1?n:n[0]}return{query:r,hash:t.hash,search:t.search,path:t.pathname,pathname:t.pathname,href:`${t.pathname}${t.search}${t.hash}`,host:"",hostname:"",auth:"",protocol:"",slashes:null,port:""}}(e.url);if(!r)return e.url;delete r.search,r2(r.query,t),e.url=function(e){let{auth:t,hostname:r}=e,n=e.protocol||"",i=e.pathname||"",s=e.hash||"",a=e.query||"",o=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?o=t+e.host:r&&(o=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(o+=":"+e.port)),a&&"object"==typeof a&&(a=String(function(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,tA(e));else t.set(r,tA(n));return t}(a)));let l=e.search||a&&`?${a}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||r4.test(n))&&!1!==o?(o="//"+(o||""),i&&"/"!==i[0]&&(i="/"+i)):o||(o=""),s&&"#"!==s[0]&&(s="#"+s),l&&"?"!==l[0]&&(l="?"+l),i=i.replace(/[?#]/g,encodeURIComponent),l=l.replace("#","%23"),`${n}${o}${i}${l}${s}`}(r)})(e,t),interpolateDynamicPath:(e,t)=>(function(e,t,r){if(!r)return e;for(let n of Object.keys(r.groups)){let i,{optional:s,repeat:a}=r.groups[n],o=`[${a?"...":""}${n}]`;s&&(o=`[${o}]`);let l=t[n];((i=Array.isArray(l)?l.map(e=>e&&encodeURIComponent(e)).join("/"):l?encodeURIComponent(l):"")||s)&&(e=e.replaceAll(o,i))}return e})(e,t,o),filterInternalQuery:(e,t)=>r2(e,t)}}({pageIsDynamic:h,page:d,i18n:this.nextConfig.i18n,basePath:this.nextConfig.basePath,rewrites:(null==(c=this.getRoutesManifest())?void 0:c.rewrites)||{beforeFiles:[],afterFiles:[],fallback:[]},caseSensitive:!!this.nextConfig.experimental.caseSensitiveRoutes});E&&!x.locale&&(r.pathname=`/${E}${r.pathname}`);let g={...r.query},y=r.pathname,{rewriteParams:b,rewrittenParsedUrl:w}=m.handleRewrites(e,r),R=Object.keys(b),C={...w.query},P=y!==w.pathname;P&&w.pathname&&e4(e,"rewrittenPathname",w.pathname);let O=new Set;for(let[e,t]of Object.entries(r.query)){let n=rh(e);n&&(delete r.query[e],O.add(n),void 0!==t&&(C[n]=Array.isArray(t)?t.map(e=>r1(e)):r1(t)))}if(h){let t={};if(p.hasValidParams||(p=m.normalizeDynamicRouteParams(C,!1)),!p.hasValidParams&&!re(s)){let e=null==m.dynamicRouteMatcher?void 0:m.dynamicRouteMatcher.call(m,s);e&&(m.normalizeDynamicRouteParams(e,!1),Object.assign(p.params,e),p.hasValidParams=!0)}if("/index"!==n&&!p.hasValidParams&&!re(n)){let e=null==m.dynamicRouteMatcher?void 0:m.dynamicRouteMatcher.call(m,n);if(e){let r=m.normalizeDynamicRouteParams(e,!1);r.hasValidParams&&(Object.assign(t,e),p=r)}}p.hasValidParams&&(t=p.params);let r=e.headers["x-now-route-matches"];if("string"==typeof r&&r&&re(n)&&!p.hasValidParams){let e=m.getParamsFromRouteMatches(r);e&&(p=m.normalizeDynamicRouteParams(e,!0)).hasValidParams&&(t=p.params)}if(!p.hasValidParams&&(p=m.normalizeDynamicRouteParams(C,!0)).hasValidParams&&(t=p.params),m.defaultRouteMatches&&s===d&&!p.hasValidParams&&(t=m.defaultRouteMatches,""===r&&e4(e,"renderFallbackShell",!0)),t){n=m.interpolateDynamicPath(d,t),e.url=m.interpolateDynamicPath(e.url,t);let r=e1(e,"segmentPrefetchRSCRequest");r&&re(r,!1)&&(r=m.interpolateDynamicPath(r,t),e.headers[r7]=r,e4(e,"segmentPrefetchRSCRequest",r))}}for(let t of((h||P)&&m.normalizeCdnUrl(e,[...R,...Object.keys((null==(u=m.defaultRouteRegex)?void 0:u.groups)||{})]),O))t in g||delete r.query[t];if(r.pathname=n,_.pathname=r.pathname,((null==f?void 0:f.definition.kind)===nj.PAGES||(null==f?void 0:f.definition.kind)===nj.PAGES_API)&&(r.query=C),v=await this.normalizeAndAttachMetadata(e,t,r))return}catch(r){if(r instanceof ez||r instanceof eU)return t.statusCode=400,this.renderError(null,e,t,"/_error",{});throw r}if(e4(e,"isLocaleDomain",!!b),x.locale&&(e.url=(0,D.format)(_),e4(e,"didStripLocale",!0)),!e1(e,"locale")&&(x.locale?e4(e,"locale",x.locale):E&&(e4(e,"locale",E),e4(e,"localeInferredFromDefault",!0))),!this.serverOptions.webServerConfig&&!e1(e,"incrementalCache")){let t=await this.getIncrementalCache({requestHeaders:Object.assign({},e.headers)});t.resetRequestCache(),e4(e,"incrementalCache",t),globalThis.__incrementalCache=t}e1(e,"serverComponentsHmrCache")||e4(e,"serverComponentsHmrCache",this.getServerComponentsHmrCache());let R=e1(e,"invokePath");if(!w&&R){let n=e1(e,"invokeStatus");if(n){let i=e1(e,"invokeQuery");i&&Object.assign(r.query,i),t.statusCode=n;let s=e1(e,"invokeError")||null;return this.renderError(s,e,t,"/_error",r.query)}let i=new URL(R||"/","http://n"),s=rx(i.pathname,{nextConfig:this.nextConfig,parseData:!1});s.locale&&e4(e,"locale",s.locale),r.pathname!==i.pathname&&(r.pathname=i.pathname,e4(e,"rewrittenPathname",s.pathname));let a=rE(r_(r.pathname,this.nextConfig.basePath||""),null==(d=this.nextConfig.i18n)?void 0:d.locales);for(let t of(a.detectedLocale&&e4(e,"locale",a.detectedLocale),r.pathname=a.pathname,Object.keys(r.query)))delete r.query[t];let o=e1(e,"invokeQuery");if(o&&Object.assign(r.query,o),v=await this.normalizeAndAttachMetadata(e,t,r))return;await this.handleCatchallRenderRequest(e,t,r);return}if(e1(e,"middlewareInvoke")){if((v=await this.normalizeAndAttachMetadata(e,t,r))||(v=await this.handleCatchallMiddlewareRequest(e,t,r)))return;let n=Error();throw n.result={response:new Response(null,{headers:{"x-middleware-next":"1"}})},n.bubble=!0,n}return!w&&x.basePath&&(r.pathname=r_(r.pathname,x.basePath)),t.statusCode=200,await this.run(e,t,r)}catch(r){if(r instanceof ic.NoFallbackError)throw r;if(r&&"object"==typeof r&&"ERR_INVALID_URL"===r.code||r instanceof ez||r instanceof eU)return t.statusCode=400,this.renderError(null,e,t,"/_error",{});throw r}}getRequestHandlerWithMetadata(e){let t=this.getRequestHandler();return(r,n,i)=>(r[e0]=e,t(r,n,i))}getRequestHandler(){return this.handleRequest.bind(this)}setAssetPrefix(e){this.nextConfig.assetPrefix=e?e.replace(/\/$/,""):""}async prepare(){if(!this.prepared)return this.instrumentation||(this.instrumentation=await this.loadInstrumentationModule()),null===this.preparedPromise&&(this.preparedPromise=this.prepareImpl().then(()=>{this.prepared=!0,this.preparedPromise=null})),this.preparedPromise}async prepareImpl(){}async loadInstrumentationModule(){}async close(){}getAppPathRoutes(){let e={};return Object.keys(this.appPathsManifest||{}).forEach(t=>{let r=t3(t);e[r]||(e[r]=[]),e[r].push(t)}),e}async run(e,t,r){return(0,ty.getTracer)().trace(tv.run,async()=>this.runImpl(e,t,r))}async runImpl(e,t,r){await this.handleCatchallRenderRequest(e,t,r)}async pipe(e,t){return(0,ty.getTracer)().trace(tv.pipe,async()=>this.pipeImpl(e,t))}async pipeImpl(e,t){let r,n=t.req.headers["user-agent"]||"",i={...t,renderOpts:{...this.renderOpts,supportsDynamicResponse:!this.renderOpts.botType,serveStreamingMetadata:(r=RegExp(this.nextConfig.htmlLimitedBots||rn,"i"),!(n&&r.test(n)))}},s=await e(i);if(null===s)return;let{req:a,res:o}=i,l=o.statusCode,{body:c}=s,{cacheControl:u}=s;if(!o.sent){let{generateEtags:e,poweredByHeader:t,dev:r}=this.renderOpts;r&&(o.setHeader("Cache-Control",this.nextConfig.experimental.devCacheControlNoCache?"no-cache, must-revalidate":"no-store, must-revalidate"),u=void 0),u&&void 0===u.expire&&(u.expire=this.nextConfig.expireTime),await this.sendRenderResult(a,o,{result:c,generateEtags:e,poweredByHeader:t,cacheControl:u}),o.statusCode=l}}async getStaticHTML(e,t){let r={...t,renderOpts:{...this.renderOpts,supportsDynamicResponse:!1}},n=await e(r);return null===n?null:n.body.toUnchunkedString()}async render(e,t,r,n={},i,s=!1){return(0,ty.getTracer)().trace(tv.render,async()=>this.renderImpl(e,t,r,n,i,s))}getWaitUntil(){let e,t=null==(e=globalThis[n2])?void 0:e.get();if(t)return t.waitUntil}getInternalWaitUntil(){}async renderImpl(e,t,r,n={},i,s=!1){var a;r.startsWith("/")||console.warn(`Cannot render page with path "${r}", did you mean "/${r}"?. See more info here: https://nextjs.org/docs/messages/render-no-starting-slash`),this.serverOptions.customServer&&"/index"===r&&!await this.hasPage("/index")&&(r="/");let o=e.headers["user-agent"]||"";return this.renderOpts.botType=function(e){return rr.test(e)?"dom":rt.test(e)?"html":void 0}(o),(a=r,e7.includes(a))?this.render404(e,t,i):this.pipe(e=>this.renderToResponse(e),{req:e,res:t,pathname:r,query:n})}async getStaticPaths({pathname:e}){var t;return{staticPaths:void 0,fallbackMode:function(e){if("string"==typeof e)return"PRERENDER";if(null===e)return"BLOCKING_STATIC_RENDER";if(!1===e)return"NOT_FOUND";if(void 0!==e)throw Object.defineProperty(Error(`Invalid fallback option: ${e}. Fallback option must be a string, null, undefined, or false.`),"__NEXT_ERROR_CODE",{value:"E285",enumerable:!1,configurable:!0})}(null==(t=this.getPrerenderManifest().dynamicRoutes[e])?void 0:t.fallback)}}async renderToResponseWithComponents(e,t){return(0,ty.getTracer)().trace(tv.renderToResponseWithComponents,async()=>this.renderToResponseWithComponentsImpl(e,t))}pathCouldBeIntercepted(e){return t9(e)||this.interceptionRoutePatterns.some(t=>t.test(e))}setVaryHeader(e,t,r,n){let i=`rsc, ${r9}, ${r5}, ${r7}`,s=e1(e,"isRSCRequest")??!1,a=!1;r&&this.pathCouldBeIntercepted(n)?(t.appendHeader("vary",`${i}, ${ne}`),a=!0):(r||s)&&t.appendHeader("vary",i),a||delete e.headers[ne]}async renderToResponseWithComponentsImpl({req:e,res:t,pathname:r,renderOpts:n},{components:i,query:s}){var a,o,l,c,u,d,h;let p,f,m,g,y,v,b;r===e3&&(r="/404");let E="/_error"===r,_="/404"===r||E&&404===t.statusCode,x="/500"===r||E&&500===t.statusCode,w=!0===i.isAppPath,R=!!i.getServerSideProps,C=(e.headers instanceof Headers?(m=e.headers.get(r6)??null,g=e.headers.get("content-type")):(m=e.headers[r6]??null,g=e.headers["content-type"]??null),y="POST"===e.method&&"application/x-www-form-urlencoded"===g,v=!!("POST"===e.method&&(null==g?void 0:g.startsWith("multipart/form-data"))),b=void 0!==m&&"string"==typeof m&&"POST"===e.method,{actionId:m,isURLEncodedAction:y,isMultipartAction:v,isFetchAction:b,isPossibleServerAction:!!(b||y||v)}).isPossibleServerAction,P=!!i.getStaticProps,O=e1(e,"isRSCRequest")??!1,T=tD(e.url||"").pathname||"/",S=e1(e,"rewrittenPathname")||T;this.setVaryHeader(e,t,w,S);let N=this.getPrerenderManifest();(null==p?void 0:p.includes(S))||e.headers["x-now-route-matches"]?P=!0:P||=!!N.routes[n4(r)];let j=!!(e1(e,"isNextDataReq")||e.headers["x-nextjs-data"]&&this.serverOptions.webServerConfig)&&(P||R);if(!P&&e.headers["x-middleware-prefetch"]&&!(_||"/_error"===r))return t.setHeader(tl,r),t.setHeader("x-middleware-skip","1"),t.setHeader("cache-control","private, no-cache, no-store, max-age=0, must-revalidate"),t.body("{}").send(),null;P&&e.headers[tl]&&e.url.startsWith("/_next/data")&&(e.url=this.stripNextDataPath(e.url));let A=e1(e,"locale");e.headers["x-nextjs-data"]&&(!t.statusCode||200===t.statusCode)&&t.setHeader("x-nextjs-matched-path",`${A?`/${A}`:""}${r}`),i.routeModule&&(f=i.routeModule);let D=this.isAppPPREnabled&&void 0!==f&&f.definition.kind===nj.APP_PAGE,$="1"===process.env.__NEXT_EXPERIMENTAL_STATIC_SHELL_DEBUGGING&&void 0!==s.__nextppronly&&D,k=D&&((null==(a=N.routes[r]??N.dynamicRoutes[r])?void 0:a.renderingMode)==="PARTIALLY_STATIC"||$&&!0===this.experimentalTestProxy)?e1(e,"postponed"):void 0;if(!_||j||O||(t.statusCode=404),te.includes(r)&&(t.statusCode=parseInt(r.slice(1),10)),!C&&!k&&!_&&!x&&"/_error"!==r&&"HEAD"!==e.method&&"GET"!==e.method&&("string"==typeof i.Component||P))return t.statusCode=405,t.setHeader("Allow",["GET","HEAD"]),t.body("Method Not Allowed").send(),null;if("string"==typeof i.Component)return{body:rF.fromStatic(i.Component,ts)};if(!0===n.supportsDynamicResponse){let t=(d=u=e.headers["user-agent"]||"",rr.test(d)||rt.test(u)),r="function"!=typeof(null==(o=i.Document)?void 0:o.getInitialProps)||"__NEXT_BUILTIN_DOCUMENT__"in i.Document;n.supportsDynamicResponse=!P&&!t&&r}if(!j&&w&&n.dev&&(n.supportsDynamicResponse=!0),P&&e.headers[tl]&&(S=T),T=rp(T),S=rp(S),this.localeNormalizer&&(S=this.localeNormalizer.normalize(S)),j&&(S=this.stripNextDataPath(S),T=this.stripNextDataPath(T)),(await this.getIncrementalCache({requestHeaders:Object.assign({},e.headers)})).resetRequestCache(),(null==f?void 0:f.isDev)&&re(r)&&(i.getStaticPaths||w)){let t;n.dev&&(t=process.hrtime.bigint());let s=await this.getStaticPaths({pathname:r,urlPathname:T,requestHeaders:e.headers,page:i.page,isAppPath:w});if(n.dev&&t&&(null==(l=s.staticPaths)?void 0:l.length)&&e4(e,"devGenerateStaticParamsDuration",process.hrtime.bigint()-t),w&&this.nextConfig.cacheComponents&&(null==(c=s.prerenderedRoutes)?void 0:c.length)){let t=null;for(let e of s.prerenderedRoutes){let r=e.fallbackRouteParams;if(!r||0===r.length){t=null;break}(null===t||r.length<t.length)&&(t=r)}t&&e4(e,"devFallbackParams",function(e){if(0===e.length)return null;let t=Math.random().toString(16).slice(2),r=new Map;for(let{paramName:n,paramType:i}of e)r.set(n,[`%%drp:${n}:${t}%%`,iu[i]]);return r}(t))}}if("OPTIONS"===e.method&&!_&&(!f||f.definition.kind!==nj.APP_ROUTE))return await nY(e,t,new Response(null,{status:400})),null;let I=e.originalRequest,M=t.originalResponse,L=tD(e1(e,"initURL")||e.url),q=L.pathname||"/";for(let e of[this.normalizers.segmentPrefetchRSC,this.normalizers.rsc])(null==e?void 0:e.match(q))&&(q=e.normalize(q));return E||(I.url=`${q}${L.search||""}`),h=e1(e),I[e0]=h,e4(I,"distDir",this.distDir),e4(I,"query",s),e4(I,"params",n.params),e4(I,"minimalMode",!0),n.err&&e4(I,"invokeError",n.err),await i.ComponentMod.handler(I,M,{waitUntil:this.getWaitUntil()}),null}stripNextDataPath(e,t=!0){return(e.includes(this.buildId)&&(e=rU(e.substring(e.indexOf(this.buildId)+this.buildId.length).replace(/\.json$/,""))),this.localeNormalizer&&t)?this.localeNormalizer.normalize(e):e}getOriginalAppPaths(e){if(this.enabledDirectories.app){var t;let r=null==(t=this.appPathRoutes)?void 0:t[e];return r||null}return null}async renderPageComponent(e,t){var r;let{query:n,pathname:i}=e,s=this.getOriginalAppPaths(i),a=Array.isArray(s),o=i;a&&(o=s[s.length-1]);let l=await this.findPageComponents({locale:e1(e.req,"locale"),page:o,query:n,params:e.renderOpts.params||{},isAppPath:a,sriEnabled:!!(null==(r=this.nextConfig.experimental.sri)?void 0:r.algorithm),appPaths:s,shouldEnsure:!1});if(l){(0,ty.getTracer)().setRootSpanAttribute("next.route",i);try{return await this.renderToResponseWithComponents(e,l)}catch(r){let e=r instanceof ic.NoFallbackError;if(!e||e&&t)throw r}}return!1}async renderToResponse(e){return(0,ty.getTracer)().trace(tv.renderToResponse,{spanName:"rendering page",attributes:{"next.route":e.pathname}},async()=>this.renderToResponseImpl(e))}async renderToResponseImpl(e){var t;let{req:r,res:n,query:i,pathname:s}=e,a=e1(e.req,"bubbleNoFallback")??!1;delete i[nr];let o={i18n:null==(t=this.i18nProvider)?void 0:t.fromRequest(r,s)},l=e1(e.req,"match"),c=!0;e1(e.req,"invokeOutput"),(null==l?void 0:l.definition.page.includes("/@"))&&(c=!1);try{for await(let t of c&&l?[l]:this.matchers.matchAll(s,o)){let r=await this.renderPageComponent({...e,pathname:t.definition.pathname,renderOpts:{...e.renderOpts,params:t.params}},a);if(!1!==r)return r}if(this.serverOptions.webServerConfig){e.pathname=this.serverOptions.webServerConfig.page;let t=await this.renderPageComponent(e,a);if(!1!==t)return t}}catch(i){let t=r8(i);if(i instanceof eW)throw console.error("Invariant: failed to load static page",JSON.stringify({page:s,url:e.req.url,matchedPath:e.req.headers[tl],initUrl:e1(e.req,"initURL"),didRewrite:!!e1(e.req,"rewrittenPathname"),rewrittenPathname:e1(e.req,"rewrittenPathname")},null,2)),t;if(t instanceof ic.NoFallbackError&&a)throw t;if(t instanceof ez||t instanceof eU)return n.statusCode=400,await this.renderErrorToResponse(e,t);n.statusCode=500,await this.hasPage("/500")&&(e4(e.req,"customErrorRender",!0),await this.renderErrorToResponse(e,t),e2(e.req,"customErrorRender"));let r=t instanceof id;if(!r)throw r3(t)&&(t.page=s),t;return await this.renderErrorToResponse(e,r?t.innerError:t)}if(await this.getMiddleware()&&e.req.headers["x-nextjs-data"]&&(!n.statusCode||200===n.statusCode||404===n.statusCode)){let e=e1(r,"locale");return n.setHeader("x-nextjs-matched-path",`${e?`/${e}`:""}${s}`),n.statusCode=200,n.setHeader("Content-Type","application/json; charset=utf-8"),n.body("{}"),n.send(),null}return n.statusCode=404,this.renderErrorToResponse(e,null)}async renderToHTML(e,t,r,n={}){return(0,ty.getTracer)().trace(tv.renderToHTML,async()=>this.renderToHTMLImpl(e,t,r,n))}async renderToHTMLImpl(e,t,r,n={}){return this.getStaticHTML(e=>this.renderToResponse(e),{req:e,res:t,pathname:r,query:n})}async renderError(e,t,r,n,i={},s=!0){return(0,ty.getTracer)().trace(tv.renderError,async()=>this.renderErrorImpl(e,t,r,n,i,s))}async renderErrorImpl(e,t,r,n,i={},s=!0){return s&&r.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),this.pipe(async t=>{let n=await this.renderErrorToResponse(t,e);if(500===r.statusCode)throw e;return n},{req:t,res:r,pathname:n,query:i})}async renderErrorToResponse(e,t){return(0,ty.getTracer)().trace(tv.renderErrorToResponse,async()=>this.renderErrorToResponseImpl(e,t))}async renderErrorToResponseImpl(e,t){let{res:r,query:n}=e;try{let i=null,s=404===r.statusCode,a=this.enabledDirectories.app;s&&(a&&(i=await this.findPageComponents({locale:e1(e.req,"locale"),page:e8,query:n,params:{},isAppPath:!0,shouldEnsure:!0,url:e.req.url})),!i&&await this.hasPage("/404")&&(i=await this.findPageComponents({locale:e1(e.req,"locale"),page:"/404",query:n,params:{},isAppPath:!1,shouldEnsure:!0,url:e.req.url})));let o=`/${r.statusCode}`;if(!e1(e.req,"customErrorRender")&&!i&&te.includes(o)&&(!i&&a&&(i=await this.findPageComponents({locale:e1(e.req,"locale"),page:o,query:n,params:{},isAppPath:!0,shouldEnsure:!0,url:e.req.url})),i=await this.findPageComponents({locale:e1(e.req,"locale"),page:o,query:n,params:{},isAppPath:!1,shouldEnsure:!0,url:e.req.url})),i||(i=await this.findPageComponents({locale:e1(e.req,"locale"),page:"/_error",query:n,params:{},isAppPath:!1,shouldEnsure:!0,url:e.req.url}),o="/_error"),!i)throw new id(Object.defineProperty(Error("missing required error components"),"__NEXT_ERROR_CODE",{value:"E60",enumerable:!1,configurable:!0}));i.components.routeModule?e4(e.req,"match",{definition:i.components.routeModule.definition,params:void 0}):e2(e.req,"match");try{return await this.renderToResponseWithComponents({...e,pathname:o,renderOpts:{...e.renderOpts,err:t}},i)}catch(e){if(e instanceof ic.NoFallbackError)throw Object.defineProperty(Error("invariant: failed to render error page"),"__NEXT_ERROR_CODE",{value:"E55",enumerable:!1,configurable:!0});throw e}}catch(a){let t=r8(a),i=t instanceof id;i||this.logError(t),r.statusCode=500;let s=await this.getFallbackErrorComponents(e.req.url);if(s)return e4(e.req,"match",{definition:s.routeModule.definition,params:void 0}),this.renderToResponseWithComponents({...e,pathname:"/_error",renderOpts:{...e.renderOpts,err:i?t.innerError:t}},{query:n,components:s});return{body:rF.fromStatic("Internal Server Error","text/plain")}}}async renderErrorToHTML(e,t,r,n,i={}){return this.getStaticHTML(t=>this.renderErrorToResponse(t,e),{req:t,res:r,pathname:n,query:i})}async render404(e,t,r,n=!0){let{pathname:i,query:s}=r||tD(e.url);return this.nextConfig.i18n&&(e1(e,"locale")||e4(e,"locale",this.nextConfig.i18n.defaultLocale),e4(e,"defaultLocale",this.nextConfig.i18n.defaultLocale)),t.statusCode=404,this.renderError(null,e,t,i,s,n)}}let ip=require("next/dist/server/load-manifest.external.js"),im=new M(1e3);function ig(e,t,r,n){let i,s=`${e}:${t}:${r}:${n}`,a=null==im?void 0:im.get(s);if(a)return a;let o=A().join(t,e5);n&&(i=(0,ip.loadManifest)(A().join(o,e9),!0));let l=(0,ip.loadManifest)(A().join(o,e6),!0);try{e=rU(nh(e))}catch(t){throw console.error(t),new eX(e)}let c=t=>{let n=t[e];if(!t[n]&&r){let i={};for(let e of Object.keys(t))i[rE(e,r).pathname]=l[e];n=i[e]}return n};return(i&&(a=c(i)),a||(a=c(l)),a)?(A().isAbsolute(a)||(a=A().join(o,a)),null==im||im.set(s,a),a):(null==im||im.set(s,null),null)}function iy(e,t,r,n){let i=ig(e,t,r,n);if(!i)throw new eX(e);return i}async function iv(e,t,r){let n=iy(e,t,void 0,r);return n.endsWith(".html")?eu.promises.readFile(n,"utf8").catch(t=>{throw new eW(e,t.message)}):require(n)}function ib(e){return e.default||e}async function iE(e){return new Promise(t=>setTimeout(t,e))}let i_=Symbol.for("next.server.manifests"),ix=globalThis;async function iw(e,t=3){for(;;)try{return(0,ip.loadManifest)(e)}catch(e){if(--t<=0)throw e;await iE(100)}}async function iR(e,t=3){try{return await iw(e,t)}catch(e){return}}async function iC(e,t=3){for(;;)try{return(0,ip.evalManifest)(e)}catch(e){if(--t<=0)throw e;await iE(100)}}async function iP(e,t,r){try{return(await iC(e,r)).__RSC_MANIFEST[t]}catch(e){return}}async function iO({distDir:e,page:t,isAppPath:r,isDev:n,sriEnabled:i,needsManifestsForLegacyReasons:s}){let a={},o={};if(r||([a,o]=await Promise.all([iv("/_document",e,!1),iv("/_app",e,!1)])),s){let s,l,c=n?3:1;s=(0,j.join)(e,"react-loadable-manifest.json");let u=(l=t.replace(/\/route$/,""),!(ng(t)&&function(e,t,r){if(!e||e.length<2)return!1;let n=rz(e),i=!!(nx.test(n)||nw.test(n)||nR.test(n)||nC.test(n)||nP.test(n))||(!!n.includes("robots")||!!n.includes("manifest")||!!n.includes("sitemap")||!!n.includes("icon")||!!n.includes("apple-icon")||!!n.includes("opengraph-image")||!!n.includes("twitter-image")||!!n.includes("favicon"))&&null;if(null!==i)return i;let s=function(e,t){let r=`${e.join(",")}|${t}`,n=nO.get(r);if(n)return n;let i=t?"$":"?$",s="\\d?"+(t?"":"(-\\w{6})?"),a=e.length>0?[...e,"txt"]:["txt"],o=e.length>0?[...e,"webmanifest","json"]:["webmanifest","json"],l=[RegExp(`^[\\\\/]robots${n_(a,null)}${i}`),RegExp(`^[\\\\/]manifest${n_(o,null)}${i}`),RegExp(`[\\\\/]sitemap${n_(["xml"],e)}${i}`),RegExp(`[\\\\/]icon${s}${n_(ny,e)}${i}`),RegExp(`[\\\\/]apple-icon${s}${n_(nv,e)}${i}`),RegExp(`[\\\\/]opengraph-image${s}${n_(nb,e)}${i}`),RegExp(`[\\\\/]twitter-image${s}${n_(nE,e)}${i}`)];return nO.set(r,l),l}(t,r);for(let e=0;e<s.length;e++)if(s[e].test(n))return!0;return!1}(l,[],!0))||"/robots.txt"===l||"/manifest.webmanifest"===l||!!l.endsWith("/sitemap.xml")),[d,h,p,f,m,g]=await Promise.all([iw((0,j.join)(e,"build-manifest.json"),c),iR(s,c),r||0?void 0:iw((0,j.join)(e,"dynamic-css-manifest.json"),c).catch(()=>void 0),r&&u?iP((0,j.join)(e,"server","app",t.replace(/%5F/g,"_")+"_client-reference-manifest.js"),t.replace(/%5F/g,"_"),c):void 0,r?iw((0,j.join)(e,"server","server-reference-manifest.json"),c).catch(()=>null):null,i?iw((0,j.join)(e,"server","subresource-integrity-manifest.json")).catch(()=>void 0):void 0]);m&&f&&function({page:e,clientReferenceManifest:t,serverActionsManifest:r}){let n=ix[i_];if(n)n.clientReferenceManifestsPerRoute.set(t3(e),t),n.serverActionsManifest=r;else{let n,i=new Map([[t3(e),t]]),s=(n=new Map,new Proxy({},{get(e,t){let r=eS.workAsyncStorage.getStore();switch(t){case"moduleLoading":case"entryCSSFiles":case"entryJSFiles":{if(!r)throw Object.defineProperty(new ej(`Cannot access "${t}" without a work store.`),"__NEXT_ERROR_CODE",{value:"E952",enumerable:!1,configurable:!0});let e=i.get(r.route);if(!e)throw Object.defineProperty(new ej(`The client reference manifest for route "${r.route}" does not exist.`),"__NEXT_ERROR_CODE",{value:"E951",enumerable:!1,configurable:!0});return e[t]}case"clientModules":case"rscModuleMapping":case"edgeRscModuleMapping":case"ssrModuleMapping":case"edgeSSRModuleMapping":{let e=n.get(t);!e&&(e=new Proxy({},{get(e,r){let n=eS.workAsyncStorage.getStore();if(n){let e=i.get(n.route);if(null==e?void 0:e[t][r])return e[t][r]}else for(let e of i.values()){let n=e[t][r];if(void 0!==n)return n}}}),n.set(t,e));return e}default:throw Object.defineProperty(new ej(`This is a proxied client reference manifest. The property "${String(t)}" is not handled.`),"__NEXT_ERROR_CODE",{value:"E953",enumerable:!1,configurable:!0})}}}));ix[i_]={clientReferenceManifestsPerRoute:i,proxiedClientReferenceManifest:s,serverActionsManifest:r,serverModuleMap:new Proxy({},{get:(e,t)=>{var r,n,i;let s,a=null==(n=function(){let e=ix[i_];if(!e)throw Object.defineProperty(new ej("The manifests singleton was not initialized."),"__NEXT_ERROR_CODE",{value:"E950",enumerable:!1,configurable:!0});return e}().serverActionsManifest.node)||null==(r=n[t])?void 0:r.workers;if(!a)return;let o=eS.workAsyncStorage.getStore();if(!(s=o?a[ry(i=o.page,"app")?i:"app"+i]:Object.values(a).at(0)))return;let{moduleId:l,async:c}=s;return{id:l,name:t,chunks:[],async:c}}})}}}({page:t,clientReferenceManifest:f,serverActionsManifest:m});let y=await iv(t,e,r),v=ib(y),b=ib(a),E=ib(o),{getServerSideProps:_,getStaticProps:x,getStaticPaths:w,routeModule:R}=y;return{App:E,Document:b,Component:v,buildManifest:d,subresourceIntegrityManifest:g,reactLoadableManifest:h||{},dynamicCssManifest:p,pageConfig:y.config||{},ComponentMod:y,getServerSideProps:_,getStaticProps:x,getStaticPaths:w,isAppPath:r,page:t,routeModule:R}}{let n=await iv(t,e,r),i=ib(n),s=ib(a),l=ib(o),{getServerSideProps:c,getStaticProps:u,getStaticPaths:d,routeModule:h}=n;return{App:l,Document:s,Component:i,pageConfig:n.config||{},ComponentMod:n,getServerSideProps:c,getStaticProps:u,getStaticPaths:d,isAppPath:r,page:t,routeModule:h}}}let iT=(0,ty.getTracer)().wrap(tb.loadComponents,iO);function iS(e){return(t,r,n)=>{for(let i of e)if(new RegExp(i.regexp).exec(t)){if((i.has||i.missing)&&!rZ(r,n,i.has,i.missing))continue;return!0}return!1}}var iN=r("../next-env/dist/index.js");let ij=require("stream");var iA=r.n(ij),iD=r("./dist/compiled/bytes/index.js"),i$=r.n(iD),ik=((C={}).APP_PAGE="APP_PAGE",C.APP_ROUTE="APP_ROUTE",C.PAGES="PAGES",C.FETCH="FETCH",C.REDIRECT="REDIRECT",C.IMAGE="IMAGE",C),iI=((P={}).APP_PAGE="APP_PAGE",P.APP_ROUTE="APP_ROUTE",P.PAGES="PAGES",P.FETCH="FETCH",P.IMAGE="IMAGE",P);function iM(e,t){if(!e)return t;let r=parseInt(e,10);return Number.isFinite(r)&&r>0?r:t}iM(process.env.NEXT_PRIVATE_RESPONSE_CACHE_TTL,1e4),iM(process.env.NEXT_PRIVATE_RESPONSE_CACHE_MAX_SIZE,150);class iL{constructor(e){this.fs=e,this.tasks=[]}findOrCreateTask(e){for(let t of this.tasks)if(t[0]===e)return t;let t=this.fs.mkdir(e);t.catch(()=>{});let r=[e,t,[]];return this.tasks.push(r),r}append(e,t){let r=this.findOrCreateTask(nu().dirname(e)),n=r[1].then(()=>this.fs.writeFile(e,t));n.catch(()=>{}),r[2].push(n)}wait(){return Promise.all(this.tasks.flatMap(e=>e[2]))}}let iq=require("next/dist/server/lib/incremental-cache/memory-cache.external.js");class iH{static #e=this.debug=!!process.env.NEXT_PRIVATE_DEBUG_CACHE;constructor(e){this.fs=e.fs,this.flushToDisk=e.flushToDisk,this.serverDistDir=e.serverDistDir,this.revalidatedTags=e.revalidatedTags,e.maxMemoryCacheSize?iH.memoryCache?iH.debug&&console.log("FileSystemCache: memory store already initialized"):(iH.debug&&console.log("FileSystemCache: using memory store for fetch cache"),iH.memoryCache=(0,iq.getMemoryCache)(e.maxMemoryCacheSize)):iH.debug&&console.log("FileSystemCache: not using memory store for fetch cache")}resetRequestCache(){}async revalidateTag(e,t){if(e="string"==typeof e?[e]:e,iH.debug&&console.log("FileSystemCache: revalidateTag",e,t),0===e.length)return;let r=Date.now();for(let n of e){let e=n5.tagsManifest.get(n)||{};if(t){let i={...e};i.stale=r,void 0!==t.expire&&(i.expired=r+1e3*t.expire),n5.tagsManifest.set(n,i)}else n5.tagsManifest.set(n,{...e,expired:r})}}async get(...e){var t,r,n,i,s,a,o,l,c;let[u,d]=e,{kind:h}=d,p=null==(t=iH.memoryCache)?void 0:t.get(u);if(iH.debug&&(h===iI.FETCH?console.log("FileSystemCache: get",u,d.tags,h,!!p):console.log("FileSystemCache: get",u,h,!!p)),!p)try{if(h===iI.APP_ROUTE){let e=this.getFilePath(`${u}.body`,iI.APP_ROUTE),t=await this.fs.readFile(e),{mtime:r}=await this.fs.stat(e),n=JSON.parse(await this.fs.readFile(e.replace(/\.body$/,tp),"utf8"));p={lastModified:r.getTime(),value:{kind:ik.APP_ROUTE,body:t,headers:n.headers,status:n.status}}}else{let e=this.getFilePath(h===iI.FETCH?u:`${u}.html`,h),t=await this.fs.readFile(e,"utf8"),{mtime:r}=await this.fs.stat(e);if(h===iI.FETCH){let{tags:e,fetchIdx:n,fetchUrl:i}=d;if(!this.flushToDisk)return null;let s=r.getTime(),l=JSON.parse(t);if(p={lastModified:s,value:l},(null==(a=p.value)?void 0:a.kind)===ik.FETCH){let t=null==(o=p.value)?void 0:o.tags;(null==e?void 0:e.every(e=>null==t?void 0:t.includes(e)))||(iH.debug&&console.log("FileSystemCache: tags vs storedTags mismatch",e,t),await this.set(u,p.value,{fetchCache:!0,tags:e,fetchIdx:n,fetchUrl:i}))}}else if(h===iI.APP_PAGE){let n,i,s;try{n=JSON.parse(await this.fs.readFile(e.replace(/\.html$/,tp),"utf8"))}catch{}if(null==n?void 0:n.segmentPaths){let e=new Map;i=e;let t=u+tc;await Promise.all(n.segmentPaths.map(async r=>{let n=this.getFilePath(t+r+tu,iI.APP_PAGE);try{e.set(r,await this.fs.readFile(n))}catch{}}))}d.isFallback||d.isRoutePPREnabled||(s=await this.fs.readFile(this.getFilePath(`${u}${td}`,iI.APP_PAGE))),p={lastModified:r.getTime(),value:{kind:ik.APP_PAGE,html:t,rscData:s,postponed:null==n?void 0:n.postponed,headers:null==n?void 0:n.headers,status:null==n?void 0:n.status,segmentData:i}}}else if(h===iI.PAGES){let e,n={};d.isFallback||(n=JSON.parse(await this.fs.readFile(this.getFilePath(`${u}${th}`,iI.PAGES),"utf8"))),p={lastModified:r.getTime(),value:{kind:ik.PAGES,html:t,pageData:n,headers:null==e?void 0:e.headers,status:null==e?void 0:e.status}}}else throw Object.defineProperty(Error(`Invariant: Unexpected route kind ${h} in file system cache.`),"__NEXT_ERROR_CODE",{value:"E445",enumerable:!1,configurable:!0})}p&&(null==(l=iH.memoryCache)||l.set(u,p))}catch{return null}if((null==p||null==(r=p.value)?void 0:r.kind)===ik.APP_PAGE||(null==p||null==(n=p.value)?void 0:n.kind)===ik.APP_ROUTE||(null==p||null==(i=p.value)?void 0:i.kind)===ik.PAGES){let e=null==(c=p.value.headers)?void 0:c[tf];if("string"==typeof e){let t=e.split(",");if(t.length>0&&(0,n5.areTagsExpired)(t,p.lastModified))return iH.debug&&console.log("FileSystemCache: expired tags",t),null}}else if((null==p||null==(s=p.value)?void 0:s.kind)===ik.FETCH){let e=d.kind===iI.FETCH?[...d.tags||[],...d.softTags||[]]:[];if(e.some(e=>this.revalidatedTags.includes(e)))return iH.debug&&console.log("FileSystemCache: was revalidated",e),null;if((0,n5.areTagsExpired)(e,p.lastModified))return iH.debug&&console.log("FileSystemCache: expired tags",e),null}return p??null}async set(e,t,r){var n;if(null==(n=iH.memoryCache)||n.set(e,{value:t,lastModified:Date.now()}),iH.debug&&console.log("FileSystemCache: set",e),!this.flushToDisk||!t)return;let i=new iL(this.fs);if(t.kind===ik.APP_ROUTE){let r=this.getFilePath(`${e}.body`,iI.APP_ROUTE);i.append(r,t.body);let n={headers:t.headers,status:t.status,postponed:void 0,segmentPaths:void 0};i.append(r.replace(/\.body$/,tp),JSON.stringify(n,null,2))}else if(t.kind===ik.PAGES||t.kind===ik.APP_PAGE){let n=t.kind===ik.APP_PAGE,s=this.getFilePath(`${e}.html`,n?iI.APP_PAGE:iI.PAGES);if(i.append(s,t.html),r.fetchCache||r.isFallback||r.isRoutePPREnabled||i.append(this.getFilePath(`${e}${n?td:th}`,n?iI.APP_PAGE:iI.PAGES),n?t.rscData:JSON.stringify(t.pageData)),(null==t?void 0:t.kind)===ik.APP_PAGE){let e;if(t.segmentData){e=[];let r=s.replace(/\.html$/,tc);for(let[n,s]of t.segmentData){e.push(n);let t=r+n+tu;i.append(t,s)}}let r={headers:t.headers,status:t.status,postponed:t.postponed,segmentPaths:e};i.append(s.replace(/\.html$/,tp),JSON.stringify(r))}}else if(t.kind===ik.FETCH){let n=this.getFilePath(e,iI.FETCH);i.append(n,JSON.stringify({...t,tags:r.fetchCache?r.tags:[]}))}await i.wait()}getFilePath(e,t){switch(t){case iI.FETCH:return nu().join(this.serverDistDir,"..","cache","fetch-cache",e);case iI.PAGES:return nu().join(this.serverDistDir,"pages",e);case iI.IMAGE:case iI.APP_PAGE:case iI.APP_ROUTE:return nu().join(this.serverDistDir,"app",e);default:throw Object.defineProperty(Error(`Unexpected file path kind: ${t}`),"__NEXT_ERROR_CODE",{value:"E479",enumerable:!1,configurable:!0})}}}let iF=require("next/dist/server/lib/incremental-cache/shared-cache-controls.external.js");class iz{static #e=this.debug=!!process.env.NEXT_PRIVATE_DEBUG_CACHE;constructor({fs:e,dev:t,flushToDisk:r,minimalMode:n,serverDistDir:i,requestHeaders:s,maxMemoryCacheSize:a,getPrerenderManifest:o,fetchCacheKeyPrefix:l,CurCacheHandler:c,allowedRevalidateHeaderKeys:u}){var d,h,p,f;this.locks=new Map,this.hasCustomCacheHandler=!!c;const m=Symbol.for("@next/cache-handlers"),g=globalThis;if(c)iz.debug&&console.log("IncrementalCache: using custom cache handler",c.name);else{const t=g[m];(null==t?void 0:t.FetchCache)?(c=t.FetchCache,iz.debug&&console.log("IncrementalCache: using global FetchCache cache handler")):e&&i&&(iz.debug&&console.log("IncrementalCache: using filesystem cache handler"),c=iH)}process.env.__NEXT_TEST_MAX_ISR_CACHE&&(a=parseInt(process.env.__NEXT_TEST_MAX_ISR_CACHE,10)),this.dev=t,this.disableForTestmode="true"===process.env.NEXT_PRIVATE_TEST_PROXY,this.minimalMode=n,this.requestHeaders=s,this.allowedRevalidateHeaderKeys=u,this.prerenderManifest=o(),this.cacheControls=new iF.SharedCacheControls(this.prerenderManifest),this.fetchCacheKeyPrefix=l;let y=[];s["x-prerender-revalidate"]===(null==(h=this.prerenderManifest)||null==(d=h.preview)?void 0:d.previewModeId)&&(this.isOnDemandRevalidate=!0),n&&(y=this.revalidatedTags=function(e,t){return"string"==typeof e[tm]&&e["x-next-revalidate-tag-token"]===t?e[tm].split(","):[]}(s,null==(f=this.prerenderManifest)||null==(p=f.preview)?void 0:p.previewModeId)),c&&(this.cacheHandler=new c({dev:t,fs:e,flushToDisk:r,serverDistDir:i,revalidatedTags:y,maxMemoryCacheSize:a,_requestHeaders:s,fetchCacheKeyPrefix:l}))}calculateRevalidate(e,t,r,n){if(r)return Math.floor(performance.timeOrigin+performance.now()-1e3);let i=this.cacheControls.get(n4(e)),s=i?i.revalidate:!n&&1;return"number"==typeof s?1e3*s+t:s}_getPathname(e,t){return t?e:nh(e)}resetRequestCache(){var e,t;null==(t=this.cacheHandler)||null==(e=t.resetRequestCache)||e.call(t)}async lock(e){for(;;){let t=this.locks.get(e);if(iz.debug&&console.log("IncrementalCache: lock get",e,!!t),!t)break;await t}let{resolve:t,promise:r}=new rk;return iz.debug&&console.log("IncrementalCache: successfully locked",e),this.locks.set(e,r),()=>{t(),this.locks.delete(e)}}async revalidateTag(e,t){var r;return null==(r=this.cacheHandler)?void 0:r.revalidateTag(e,t)}async generateCacheKey(e,t={}){let n=[],i=new TextEncoder,s=new TextDecoder;if(t.body)if(t.body instanceof Uint8Array)n.push(s.decode(t.body)),t._ogBody=t.body;else if("function"==typeof t.body.getReader){let e=t.body,r=[];try{await e.pipeTo(new WritableStream({write(e){"string"==typeof e?(r.push(i.encode(e)),n.push(e)):(r.push(e),n.push(s.decode(e,{stream:!0})))}})),n.push(s.decode());let a=r.reduce((e,t)=>e+t.length,0),o=new Uint8Array(a),l=0;for(let e of r)o.set(e,l),l+=e.length;t._ogBody=o}catch(e){console.error("Problem reading body",e)}}else if("function"==typeof t.body.keys){let e=t.body;for(let r of(t._ogBody=t.body,new Set([...e.keys()]))){let t=e.getAll(r);n.push(`${r}=${(await Promise.all(t.map(async e=>"string"==typeof e?e:await e.text()))).join(",")}`)}}else if("function"==typeof t.body.arrayBuffer){let e=t.body,r=await e.arrayBuffer();n.push(await e.text()),t._ogBody=new Blob([r],{type:e.type})}else"string"==typeof t.body&&(n.push(t.body),t._ogBody=t.body);let a="function"==typeof(t.headers||{}).keys?Object.fromEntries(t.headers):Object.assign({},t.headers);"traceparent"in a&&delete a.traceparent,"tracestate"in a&&delete a.tracestate;let o=JSON.stringify(["v3",this.fetchCacheKeyPrefix||"",e,t.method,a,t.mode,t.redirect,t.credentials,t.referrer,t.referrerPolicy,t.integrity,t.cache,n]);return r("crypto").createHash("sha256").update(o).digest("hex")}async get(e,t){var r,n,i,s,a,o,l;let c,u;if(t.kind===iI.FETCH){let r=B.workUnitAsyncStorage.getStore(),n=r?(0,B.getRenderResumeDataCache)(r):null;if(n){let r=n.fetch.get(e);if((null==r?void 0:r.kind)===ik.FETCH){let n=eS.workAsyncStorage.getStore();if(![...t.tags||[],...t.softTags||[]].some(e=>{var t,r;return(null==(t=this.revalidatedTags)?void 0:t.includes(e))||(null==n||null==(r=n.pendingRevalidatedTags)?void 0:r.some(t=>t.tag===e))}))return iz.debug&&console.log("IncrementalCache: rdc:hit",e),{isStale:!1,value:r};iz.debug&&console.log("IncrementalCache: rdc:revalidated-tag",e)}else iz.debug&&console.log("IncrementalCache: rdc:miss",e)}else iz.debug&&console.log("IncrementalCache: rdc:no-resume-data")}if(this.disableForTestmode||this.dev&&(t.kind!==iI.FETCH||"no-cache"===this.requestHeaders["cache-control"]))return null;e=this._getPathname(e,t.kind===iI.FETCH);let d=await (null==(r=this.cacheHandler)?void 0:r.get(e,t));if(t.kind===iI.FETCH){if(!d)return null;if((null==(i=d.value)?void 0:i.kind)!==ik.FETCH)throw Object.defineProperty(new ej(`Expected cached value for cache key ${JSON.stringify(e)} to be a "FETCH" kind, got ${JSON.stringify(null==(s=d.value)?void 0:s.kind)} instead.`),"__NEXT_ERROR_CODE",{value:"E653",enumerable:!1,configurable:!0});let r=eS.workAsyncStorage.getStore(),n=[...t.tags||[],...t.softTags||[]];if(n.some(e=>{var t,n;return(null==(t=this.revalidatedTags)?void 0:t.includes(e))||(null==r||null==(n=r.pendingRevalidatedTags)?void 0:n.some(t=>t.tag===e))}))return iz.debug&&console.log("IncrementalCache: expired tag",e),null;let a=B.workUnitAsyncStorage.getStore();if(a){let t=(0,B.getPrerenderResumeDataCache)(a);t&&(iz.debug&&console.log("IncrementalCache: rdc:set",e),t.fetch.set(e,d.value))}let o=t.revalidate||d.value.revalidate,l=(performance.timeOrigin+performance.now()-(d.lastModified||0))/1e3>o,c=d.value.data;return(0,n5.areTagsExpired)(n,d.lastModified)?null:((0,n5.areTagsStale)(n,d.lastModified)&&(l=!0),{isStale:l,value:{kind:ik.FETCH,data:c,revalidate:o}})}if((null==d||null==(n=d.value)?void 0:n.kind)===ik.FETCH)throw Object.defineProperty(new ej(`Expected cached value for cache key ${JSON.stringify(e)} not to be a ${JSON.stringify(t.kind)} kind, got "FETCH" instead.`),"__NEXT_ERROR_CODE",{value:"E652",enumerable:!1,configurable:!0});let h=null,p=this.cacheControls.get(n4(e));if((null==d?void 0:d.lastModified)===-1)c=-1,u=-31536e3;else{let r=performance.timeOrigin+performance.now(),n=(null==d?void 0:d.lastModified)||r;if(void 0===(c=!1!==(u=this.calculateRevalidate(e,n,this.dev??!1,t.isFallback))&&u<r||void 0)&&((null==d||null==(a=d.value)?void 0:a.kind)===ik.APP_PAGE||(null==d||null==(o=d.value)?void 0:o.kind)===ik.APP_ROUTE)){let e=null==(l=d.value.headers)?void 0:l[tf];if("string"==typeof e){let t=e.split(",");t.length>0&&((0,n5.areTagsExpired)(t,n)?c=-1:(0,n5.areTagsStale)(t,n)&&(c=!0))}}}return d&&(h={isStale:c,cacheControl:p,revalidateAfter:u,value:d.value}),!d&&this.prerenderManifest.notFoundRoutes.includes(e)&&(h={isStale:c,value:null,cacheControl:p,revalidateAfter:u},this.set(e,h.value,{...t,cacheControl:p})),h}async set(e,t,r){if((null==t?void 0:t.kind)===ik.FETCH){let r=B.workUnitAsyncStorage.getStore(),n=r?(0,B.getPrerenderResumeDataCache)(r):null;n&&(iz.debug&&console.log("IncrementalCache: rdc:set",e),n.fetch.set(e,t))}if(this.disableForTestmode||this.dev&&!r.fetchCache)return;e=this._getPathname(e,r.fetchCache);let n=JSON.stringify(t).length;if(r.fetchCache&&n>2097152&&!this.hasCustomCacheHandler&&!r.isImplicitBuildTimeCache){let t=`Failed to set Next.js data cache for ${r.fetchUrl||e}, items over 2MB can not be cached (${n} bytes)`;if(this.dev)throw Object.defineProperty(Error(t),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});console.warn(t);return}try{var i;!r.fetchCache&&r.cacheControl&&this.cacheControls.set(n4(e),r.cacheControl),await (null==(i=this.cacheHandler)?void 0:i.set(e,t,r))}catch(t){console.warn("Failed to update prerender cache for",e,t)}}}let iU=require("http"),iX=require("https"),iW={existsSync:ed().existsSync,readFile:ed().promises.readFile,readFileSync:ed().readFileSync,writeFile:(e,t)=>ed().promises.writeFile(e,t),mkdir:e=>ed().promises.mkdir(e,{recursive:!0}),stat:e=>ed().promises.stat(e)};class iB extends iA().Readable{constructor({url:e,headers:t,method:r,socket:n=null,readable:i}){super(),this.httpVersion="1.0",this.httpVersionMajor=1,this.httpVersionMinor=0,this.socket=new Proxy({},{get:(e,t)=>{if("encrypted"!==t&&"remoteAddress"!==t)throw Object.defineProperty(Error("Method not implemented"),"__NEXT_ERROR_CODE",{value:"E52",enumerable:!1,configurable:!0});if("remoteAddress"!==t)return!1}}),this.url=e,this.headers=t,this.method=r,i&&(this.bodyReadable=i,this.bodyReadable.on("end",()=>this.emit("end")),this.bodyReadable.on("close",()=>this.emit("close"))),n&&(this.socket=n)}get headersDistinct(){let e={};for(let[t,r]of Object.entries(this.headers))r&&(e[t]=Array.isArray(r)?r:[r]);return e}_read(e){if(this.bodyReadable)return this.bodyReadable._read(e);this.emit("end"),this.emit("close")}get connection(){return this.socket}get aborted(){throw Object.defineProperty(Error("Method not implemented"),"__NEXT_ERROR_CODE",{value:"E52",enumerable:!1,configurable:!0})}get complete(){throw Object.defineProperty(Error("Method not implemented"),"__NEXT_ERROR_CODE",{value:"E52",enumerable:!1,configurable:!0})}get trailers(){throw Object.defineProperty(Error("Method not implemented"),"__NEXT_ERROR_CODE",{value:"E52",enumerable:!1,configurable:!0})}get trailersDistinct(){throw Object.defineProperty(Error("Method not implemented"),"__NEXT_ERROR_CODE",{value:"E52",enumerable:!1,configurable:!0})}get rawTrailers(){throw Object.defineProperty(Error("Method not implemented"),"__NEXT_ERROR_CODE",{value:"E52",enumerable:!1,configurable:!0})}get rawHeaders(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}setTimeout(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}}class iG extends iA().Writable{constructor(e={}){super(),this.statusMessage="",this.finished=!1,this.headersSent=!1,this.buffers=[],this.statusCode=e.statusCode??200,this.socket=e.socket??null,this.headers=e.headers?function(e){let t=new Headers;for(let[r,n]of Object.entries(e))for(let e of Array.isArray(n)?n:[n])void 0!==e&&("number"==typeof e&&(e=e.toString()),t.append(r,e));return t}(e.headers):new Headers,this.headPromise=new Promise(e=>{this.headPromiseResolve=e}),this.hasStreamed=new Promise((e,t)=>{this.on("finish",()=>e(!0)),this.on("end",()=>e(!0)),this.on("error",e=>t(e))}).then(e=>(null==this.headPromiseResolve||this.headPromiseResolve.call(this),e)),e.resWriter&&(this.resWriter=e.resWriter)}appendHeader(e,t){for(let r of Array.isArray(t)?t:[t])this.headers.append(e,r);return this}get isSent(){return this.finished||this.headersSent}get connection(){return this.socket}write(e){return this.resWriter?this.resWriter(e):(this.buffers.push(Buffer.isBuffer(e)?e:Buffer.from(e)),!0)}end(){return this.finished=!0,super.end(...arguments)}_implicitHeader(){}_write(e,t,r){this.write(e),r()}writeHead(e,t,r){if(r||"string"==typeof t?"string"==typeof t&&t.length>0&&(this.statusMessage=t):r=t,r)if(Array.isArray(r))for(let e=0;e<r.length;e+=2)this.setHeader(r[e],r[e+1]);else for(let[e,t]of Object.entries(r))void 0!==t&&this.setHeader(e,t);return this.statusCode=e,this.headersSent=!0,null==this.headPromiseResolve||this.headPromiseResolve.call(this),this}hasHeader(e){return this.headers.has(e)}getHeader(e){return this.headers.get(e)??void 0}getHeaders(){return ru(this.headers)}getHeaderNames(){return Array.from(this.headers.keys())}setHeader(e,t){if(Array.isArray(t))for(let r of(this.headers.delete(e),t))this.headers.append(e,r);else"number"==typeof t?this.headers.set(e,t.toString()):this.headers.set(e,t);return this}removeHeader(e){this.headers.delete(e)}flushHeaders(){}get strictContentLength(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}writeEarlyHints(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}get req(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}assignSocket(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}detachSocket(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}writeContinue(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}writeProcessing(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}get upgrading(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}get chunkedEncoding(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}get shouldKeepAlive(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}get useChunkedEncodingByDefault(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}get sendDate(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}setTimeout(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}addTrailers(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}setHeaders(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}}let iV=(e,t)=>{let r=A().isAbsolute(t)?t:A().join(e,t);return(0,D.pathToFileURL)(r).toString()};function iK(e){var t,r;return(null==(r=e.has)||null==(t=r[0])?void 0:t.key)===ne}class iY{add(e){this.callbacks.push(e)}async runAll(){if(!this.callbacks.length)return;let e=this.callbacks;this.callbacks=[],await Promise.allSettled(e.map(async e=>e()))}constructor(){this.callbacks=[]}}let iJ=Symbol.for("react.postpone");function iQ(e){return"object"==typeof e&&null!==e&&e.$$typeof===iJ}class iZ{async load(e){return await require(e)}}let i0=require("next/dist/server/lib/router-utils/instrumentation-globals.external.js"),i1=Symbol.for("@next/router-server-methods"),i4=globalThis,i2=e=>import(e).then(e=>e.default||e),i3=new WeakMap;class i8 extends ih{constructor(e){var t,r,n;super(e),this.cleanupListeners=new iY,this.handleNextImageRequest=async(e,t,r)=>!(!r.pathname||!r.pathname.startsWith("/_next/image")||e1(e,"middlewareInvoke"))&&(t.statusCode=400,t.body("Bad Request").send(),!0),this.handleCatchallRenderRequest=async(e,t,r)=>{let{pathname:n,query:i}=r;if(!n)throw Object.defineProperty(Error("Invariant: pathname is undefined"),"__NEXT_ERROR_CODE",{value:"E409",enumerable:!1,configurable:!0});e4(e,"bubbleNoFallback",void 0),i4[i1]||(i4[i1]={});let s=(0,j.relative)(process.cwd(),this.dir);i4[i1][s]||(i4[i1][s]={render404:this.render404.bind(this)}),i4[i1][s].nextConfig=this.nextConfig;try{var a;n=rp(n);let s={i18n:null==(a=this.i18nProvider)?void 0:a.fromRequest(e,n)},o=await this.matchers.match(n,s);if(!o)return await this.render(e,t,n,i,r,!0),!0;for(let n of(e4(e,"match",o),this.getEdgeFunctionsPages()))if(n===o.definition.page){if("export"===this.nextConfig.output)return await this.render404(e,t,r),!0;delete i[nr];try{if(await this.runEdgeFunction({req:e,res:t,query:i,params:o.params,page:o.definition.page,match:o,appPaths:null}))return!0}catch(t){throw await this.instrumentationOnRequestError(t,e,{routePath:o.definition.page,routerKind:"Pages Router",routeType:"route",revalidateReason:void 0},!1),t}}if(o.definition.kind===nj.PAGES_API){if("export"===this.nextConfig.output)return await this.render404(e,t,r),!0;if(await this.handleApiRequest(e,t,i,o))return!0}return await this.render(e,t,n,i,r,!0),!0}catch(r){if(r instanceof ic.NoFallbackError)throw r;try{return this.logError(r),t.statusCode=500,await this.renderError(r,e,t,n,i),!0}catch{}throw r}},this.handleCatchallMiddlewareRequest=async(e,t,r)=>{let n,i=e1(e,"middlewareInvoke");if(!i)return!1;let s=()=>(e4(e,"middlewareInvoke",!0),t.body("").send(),!0),a=await this.getMiddleware();if(!a)return s();let o=tD(e1(e,"initURL")),l=rx(o.pathname,{nextConfig:this.nextConfig,i18nProvider:this.i18nProvider});o.pathname=l.pathname;let c=rp(r.pathname||""),u=c;try{u=decodeURIComponent(c)}catch{}if(!(a.match(c,e,o.query)||a.match(u,e,o.query)))return s();let d=!1;try{if(await this.ensureMiddleware(e.url),n=await this.runMiddleware({request:e,response:t,parsedUrl:o,parsed:r}),"response"in n){if(i)throw d=!0,Object.defineProperty(new ty.BubbledError(!0,n),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});for(let[e,r]of Object.entries(ru(n.response.headers)))"content-encoding"!==e&&void 0!==r&&t.setHeader(e,r);t.statusCode=n.response.status;let{originalResponse:e}=t;return n.response.body?await rH(n.response.body,e):e.end(),!0}}catch(i){if(d)throw i;if(r3(i)&&"ENOENT"===i.code)return await this.render404(e,t,r),!0;if(i instanceof ez)return t.statusCode=400,await this.renderError(i,e,t,r.pathname||""),!0;let n=r8(i);return console.error(n),t.statusCode=500,await this.renderError(n,e,t,r.pathname||""),!0}return n.finished},function(e){var t;(null==(t=e.experimental)?void 0:t.hideLogsAfterAbort)===!0?(0,ep.setAbortedLogsStyle)("hidden"):(0,ep.setAbortedLogsStyle)("dimmed")}(this.nextConfig);const i=e.dev??!1;if(this.isDev=i,this.sriEnabled=!!(null==(r=e.conf.experimental)||null==(t=r.sri)?void 0:t.algorithm),this.renderOpts.optimizeCss&&(process.env.__NEXT_OPTIMIZE_CSS=JSON.stringify(!0)),this.renderOpts.nextScriptWorkers&&(process.env.__NEXT_SCRIPT_WORKERS=JSON.stringify(!0)),e.dev,!e.dev){const{dynamicRoutes:e=[]}=this.getRoutesManifest()??{};this.dynamicRoutes=e.map(e=>{let t=rY(e.page);return{match:eZ(t),page:e.page,re:t.re}})}!function(e){if(!globalThis.__NEXT_HTTP_AGENT){if(!e)throw Object.defineProperty(Error("Expected config.httpAgentOptions to be an object"),"__NEXT_ERROR_CODE",{value:"E204",enumerable:!1,configurable:!0});globalThis.__NEXT_HTTP_AGENT_OPTIONS=e.httpAgentOptions,globalThis.__NEXT_HTTP_AGENT=new iU.Agent(e.httpAgentOptions),globalThis.__NEXT_HTTPS_AGENT=new iX.Agent(e.httpAgentOptions)}}(this.nextConfig),this.middlewareManifestPath=(0,j.join)(this.serverDistDir,"middleware-manifest.json"),e.dev||this.prepare().catch(e=>{console.error("Failed to prepare server",e)}),this.renderOpts.isExperimentalCompile&&function(e,t){let r={...function(){let e=[];for(let t in process.env)if(t.startsWith("NEXT_PUBLIC_")){let r=process.env[t];null!=r&&e.push([`process.env.${t}`,r])}return e.sort((e,t)=>e[0].localeCompare(t[0])),Object.fromEntries(e)}(),...function(e){let t={},r=e.env;for(let n in r){let i=r[n];null!=i&&(!function(e,t){let r=/^(?:NODE_.+)|^(?:__.+)$/i.test(t),n="NEXT_RUNTIME"===t;if(r||n)throw Object.defineProperty(Error(`The key "${t}" under "env" in ${e.configFileName||"config"} is not allowed. https://nextjs.org/docs/messages/env-key-not-allowed`),"__NEXT_ERROR_CODE",{value:"E967",enumerable:!1,configurable:!0})}(e,n),t[`process.env.${n}`]=i)}return t}(e),"process.env.NEXT_DEPLOYMENT_ID":t};for(let e in r){let t=e.split(".").pop()||"";process.env[t]||(process.env[t]=r[e]||"")}}(this.nextConfig,this.deploymentId||""),(null==(n=e.conf.experimental)?void 0:n.removeUncaughtErrorAndRejectionListeners)&&(process.removeAllListeners("uncaughtException"),process.removeAllListeners("unhandledRejection")),process.on("unhandledRejection",e=>{iQ(e)||console.error(e)}),process.on("rejectionHandled",()=>{}),process.on("uncaughtException",e=>{iQ(e)||console.error(e)})}async unstable_preloadEntries(){await this.prepare();let e=this.getAppPathsManifest(),t=this.getPagesManifest();for(let e of(await this.loadCustomCacheHandlers(),Object.keys(t||{})))try{await iT({distDir:this.distDir,page:e,isAppPath:!1,isDev:this.isDev,sriEnabled:this.sriEnabled,needsManifestsForLegacyReasons:!1})}catch(e){}for(let t of Object.keys(e||{}))try{let{ComponentMod:e}=await iT({distDir:this.distDir,page:t,isAppPath:!0,isDev:this.isDev,sriEnabled:this.sriEnabled,needsManifestsForLegacyReasons:!1});e.patchFetch()}catch(e){}}async handleUpgrade(){}async loadInstrumentationModule(){if(!this.serverOptions.dev)try{this.instrumentation=await (0,i0.getInstrumentationModule)(this.dir,this.nextConfig.distDir)}catch(e){if("MODULE_NOT_FOUND"!==e.code)throw Object.defineProperty(Error("An error occurred while loading the instrumentation hook",{cause:e}),"__NEXT_ERROR_CODE",{value:"E92",enumerable:!1,configurable:!0})}return this.instrumentation}async prepareImpl(){await super.prepareImpl(),await this.runInstrumentationHookIfAvailable()}async runInstrumentationHookIfAvailable(){await (0,i0.ensureInstrumentationRegistered)(this.dir,this.nextConfig.distDir)}loadEnvConfig({dev:e,forceReload:t}){(0,iN.loadEnvConfig)(this.dir,e,S,t,t?e=>{tz(`Reload env: ${e}`)}:void 0)}async loadCustomCacheHandlers(){let{cacheMaxMemorySize:e,cacheHandlers:t}=this.nextConfig;if(t&&function(e){if(is[ir])return null==ie||ie("cache handlers already initialized"),!1;if(null==ie||ie("initializing cache handlers"),is[ir]=new Map,is[it]){let t;is[it].DefaultCache?(null==ie||ie('setting "default" cache handler from symbol'),t=is[it].DefaultCache):(null==ie||ie('setting "default" cache handler from default'),t=n7(e)),is[ir].set("default",t),is[it].RemoteCache?(null==ie||ie('setting "remote" cache handler from symbol'),is[ir].set("remote",is[it].RemoteCache)):(null==ie||ie('setting "remote" cache handler from default'),is[ir].set("remote",t))}else{let t=n7(e);null==ie||ie('setting "default" cache handler from default'),is[ir].set("default",t),null==ie||ie('setting "remote" cache handler from default'),is[ir].set("remote",t)}return is[ii]=new Set(is[ir].values()),!0}(e)){for(let[e,n]of Object.entries(t))if(n){var r=ib(await i2(iV(this.distDir,n)));if(!is[ir]||!is[ii])throw Object.defineProperty(Error("Cache handlers not initialized"),"__NEXT_ERROR_CODE",{value:"E649",enumerable:!1,configurable:!0});null==ie||ie('setting cache handler for "%s"',e),is[ir].set(e,r),is[ii].add(r)}}}async getIncrementalCache({requestHeaders:e}){let t,{cacheHandler:r}=this.nextConfig;return r&&(t=ib(await i2(iV(this.distDir,r)))),await this.loadCustomCacheHandlers(),new iz({fs:this.getCacheFilesystem(),dev:!1,requestHeaders:e,allowedRevalidateHeaderKeys:this.nextConfig.experimental.allowedRevalidateHeaderKeys,minimalMode:!0,serverDistDir:this.serverDistDir,fetchCacheKeyPrefix:this.nextConfig.experimental.fetchCacheKeyPrefix,maxMemoryCacheSize:this.nextConfig.cacheMaxMemorySize,flushToDisk:!1,getPrerenderManifest:()=>this.getPrerenderManifest(),CurCacheHandler:t})}getPublicDir(){return(0,j.join)(this.dir,"public")}getHasStaticDir(){return ed().existsSync((0,j.join)(this.dir,"static"))}getPagesManifest(){return(0,ip.loadManifest)((0,j.join)(this.serverDistDir,e6))}getAppPathsManifest(){if(this.enabledDirectories.app)return(0,ip.loadManifest)((0,j.join)(this.serverDistDir,e9))}getinterceptionRoutePatterns(){if(!this.enabledDirectories.app)return[];let e=this.getRoutesManifest();return(null==e?void 0:e.rewrites.beforeFiles.filter(iK).map(e=>new RegExp(e.regex)))??[]}async hasPage(e){var t;return!!ig(e,this.distDir,null==(t=this.nextConfig.i18n)?void 0:t.locales,this.enabledDirectories.app)}getBuildId(){let e=(0,j.join)(this.distDir,"BUILD_ID");try{return ed().readFileSync(e,"utf8").trim()}catch(e){if("ENOENT"===e.code)throw Object.defineProperty(Error(`Could not find a production build in the '${this.distDir}' directory. Try building your app with 'next build' before starting the production server. https://nextjs.org/docs/messages/production-start-no-build-id`),"__NEXT_ERROR_CODE",{value:"E427",enumerable:!1,configurable:!0});throw e}}getEnabledDirectories(e){let t=e?this.dir:this.serverDistDir;return{app:!!tt(t,"app"),pages:!!tt(t,"pages")}}sendRenderResult(e,t,r){return tN({req:e.originalRequest,res:t.originalResponse,result:r.result,generateEtags:r.generateEtags,poweredByHeader:r.poweredByHeader,cacheControl:r.cacheControl})}async runApi(e,t,r,n){for(let i of this.getEdgeFunctionsPages())if(i===n.definition.pathname&&await this.runEdgeFunction({req:e,res:t,query:r,params:n.params,page:n.definition.pathname,appPaths:null}))return!0;let i=tD(e1(e,"initURL")||e.url);e.url=`${i.pathname}${i.search||""}`;let s=new iZ,a=await s.load(n.definition.filename);return e4(e.originalRequest,"relativeProjectDir",(0,j.relative)(process.cwd(),this.dir)),e4(e.originalRequest,"distDir",this.distDir),await a.handler(e.originalRequest,t.originalResponse,{waitUntil:this.getWaitUntil()}),!0}async renderHTML(e,t,r,n,i){return(0,ty.getTracer)().trace(tE.renderHTML,async()=>this.renderHTMLImpl(e,t,r,n,i))}async renderHTMLImpl(e,t,r,n,i){throw Object.defineProperty(Error("Invariant: renderHTML should not be called in minimal mode"),"__NEXT_ERROR_CODE",{value:"E472",enumerable:!1,configurable:!0})}async imageOptimizer(e,t,r,n){throw Object.defineProperty(Error("invariant: imageOptimizer should not be called in minimal mode"),"__NEXT_ERROR_CODE",{value:"E506",enumerable:!1,configurable:!0})}getPagePath(e,t){return iy(e,this.distDir,t,this.enabledDirectories.app)}async renderPageComponent(e,t){let r=this.getEdgeFunctionsPages()||[];if(r.length){let t=this.getOriginalAppPaths(e.pathname),n=Array.isArray(t),i=e.pathname;for(let s of(n&&(i=t[0]),r))if(s===i)return await this.runEdgeFunction({req:e.req,res:e.res,query:e.query,params:e.renderOpts.params,page:i,appPaths:t}),null}return super.renderPageComponent(e,t)}async findPageComponents({locale:e,page:t,query:r,params:n,isAppPath:i,url:s}){return(0,ty.getTracer)().trace(tE.findPageComponents,{spanName:"resolve page components",attributes:{"next.route":i?t3(t):t}},()=>this.findPageComponentsImpl({locale:e,page:t,query:r,params:n,isAppPath:i,url:s}))}async findPageComponentsImpl({locale:e,page:t,query:r,params:n,isAppPath:i,url:s}){let a=[t];for(let t of(e&&a.unshift(...a.map(t=>`/${e}${"/"===t?"":t}`)),a))try{let s=await iT({distDir:this.distDir,page:t,isAppPath:i,isDev:this.isDev,sriEnabled:this.sriEnabled,needsManifestsForLegacyReasons:!1});if(e&&"string"==typeof s.Component&&!t.startsWith(`/${e}/`)&&t!==`/${e}`)continue;return{components:s,query:{...!this.renderOpts.isExperimentalCompile&&s.getStaticProps?{}:r,...(i?{}:n)||{}}}}catch(e){if(!(e instanceof eX))throw e}return null}getNextFontManifest(){return(0,ip.loadManifest)((0,j.join)(this.distDir,"server","next-font-manifest.json"))}logErrorWithOriginalStack(e,t){throw Object.defineProperty(Error("Invariant: logErrorWithOriginalStack can only be called on the development server"),"__NEXT_ERROR_CODE",{value:"E6",enumerable:!1,configurable:!0})}async ensurePage(e){throw Object.defineProperty(Error("Invariant: ensurePage can only be called on the development server"),"__NEXT_ERROR_CODE",{value:"E291",enumerable:!1,configurable:!0})}async handleApiRequest(e,t,r,n){return this.runApi(e,t,r,n)}getCacheFilesystem(){return iW}normalizeReq(e){return e instanceof tP?e:new tP(e)}normalizeRes(e){return e instanceof tO?e:new tO(e)}getRequestHandler(){return this.makeRequestHandler()}getRequestHandlerWithMetadata(e){let t=this.makeRequestHandler();return(r,n,i)=>(r[e0]=e,t(r,n,i))}makeRequestHandler(){this.prepare().catch(e=>{console.error("Failed to prepare server",e)});let e=super.getRequestHandler();return(t,r,n)=>e(this.normalizeReq(t),this.normalizeRes(r),n)}async revalidate({urlPath:e,revalidateHeaders:t,opts:r}){let n=function({url:e,headers:t={},method:r="GET",bodyReadable:n,resWriter:i,socket:s=null}){return{req:new iB({url:e,headers:t,method:r,socket:s,readable:n}),res:new iG({socket:s,resWriter:i})}}({url:e,headers:t}),i=this.getRequestHandler();if(await i(new tP(n.req),new tO(n.res)),await n.res.hasStreamed,"REVALIDATED"!==n.res.getHeader("x-nextjs-cache")&&200!==n.res.statusCode&&!(404===n.res.statusCode&&r.unstable_onlyGenerated))throw Object.defineProperty(Error(`Invalid response ${n.res.statusCode}`),"__NEXT_ERROR_CODE",{value:"E175",enumerable:!1,configurable:!0})}async render(e,t,r,n,i,s=!1){return super.render(this.normalizeReq(e),this.normalizeRes(t),r,n,i,s)}async renderToHTML(e,t,r,n){return super.renderToHTML(this.normalizeReq(e),this.normalizeRes(t),r,n)}async renderErrorToResponseImpl(e,t){let{req:r,res:n,query:i}=e;return 404===n.statusCode&&this.enabledDirectories.app&&this.getEdgeFunctionsPages().includes(e8)?(await this.runEdgeFunction({req:r,res:n,query:i||{},params:{},page:e8,appPaths:null}),null):super.renderErrorToResponseImpl(e,t)}async renderError(e,t,r,n,i,s){return super.renderError(e,this.normalizeReq(t),this.normalizeRes(r),n,i,s)}async renderErrorToHTML(e,t,r,n,i){return super.renderErrorToHTML(e,this.normalizeReq(t),this.normalizeRes(r),n,i)}async render404(e,t,r,n){return super.render404(this.normalizeReq(e),this.normalizeRes(t),r,n)}getMiddlewareManifest(){return null}async getMiddleware(){var e,t;let r=this.getMiddlewareManifest(),n=null==r||null==(e=r.middleware)?void 0:e["/"];if(!n){let e=await this.loadNodeMiddleware();return e?{match:iS((null==(t=e.config)?void 0:t.matchers)||[{regexp:".*",originalSource:"/:path*"}]),page:"/"}:void 0}return{match:function(e){let t=i3.get(e);if(t)return t;if(!Array.isArray(e.matchers))throw Object.defineProperty(Error(`Invariant: invalid matchers for middleware ${JSON.stringify(e)}`),"__NEXT_ERROR_CODE",{value:"E257",enumerable:!1,configurable:!0});let r=iS(e.matchers);return i3.set(e,r),r}(n),page:"/"}}getEdgeFunctionsPages(){let e=this.getMiddlewareManifest();return e?Object.keys(e.functions):[]}getEdgeFunctionInfo(e){let t,r=this.getMiddlewareManifest();if(!r)return null;try{t=rU(nh(e.page))}catch(e){return null}let n=e.middleware?r.middleware[t]:r.functions[t];if(!n){if(!e.middleware)throw new eX(t);return null}return{name:n.name,paths:n.files.map(e=>(0,j.join)(this.distDir,e)),wasm:(n.wasm??[]).map(e=>({...e,filePath:(0,j.join)(this.distDir,e.filePath)})),assets:n.assets&&n.assets.map(e=>({...e,filePath:(0,j.join)(this.distDir,e.filePath)})),env:n.env}}async loadNodeMiddleware(){}async hasMiddleware(e){let t=this.getEdgeFunctionInfo({page:e,middleware:!0}),r=await this.loadNodeMiddleware();return!t&&!!r||!!(t&&t.paths.length>0)}async ensureMiddleware(e){}async ensureEdgeFunction(e){}async runMiddleware(e){throw Object.defineProperty(Error("invariant: runMiddleware should not be called in minimal mode"),"__NEXT_ERROR_CODE",{value:"E276",enumerable:!1,configurable:!0})}getPrerenderManifest(){return this._cachedPreviewManifest||(this._cachedPreviewManifest=(0,ip.loadManifest)((0,j.join)(this.distDir,"prerender-manifest.json"))),this._cachedPreviewManifest}getRoutesManifest(){return(0,ty.getTracer)().trace(tE.getRoutesManifest,()=>(0,ip.loadManifest)((0,j.join)(this.distDir,"routes-manifest.json")))}attachRequestMeta(e,t,r){var n,i,s;let a=(null==(n=e.headers["x-forwarded-proto"])?void 0:n.includes("https"))?"https":"http",o=this.fetchHostname&&this.port?`${a}://${this.fetchHostname}:${this.port}${e.url}`:this.nextConfig.experimental.trustHostHeader?`https://${e.headers.host||"localhost"}${e.url}`:e.url;if(e4(e,"initURL",o),e4(e,"initQuery",{...t.query}),e4(e,"initProtocol",a),!r){let t,r,n=null==(i=this.nextConfig.experimental)?void 0:i.proxyClientMaxBodySize;e4(e,"clonableBody",(s=e.originalRequest,t=null,r=new Promise((e,t)=>{s.on("end",e),s.on("error",t)}).catch(e=>({error:e})),{async finalize(){if(t){let e=await r;if(e&&"object"==typeof e&&e.error)throw e.error;!function(e,t){for(let r in t){let n=t[r];"function"==typeof n&&(n=n.bind(e)),e[r]=n}}(s,t),t=s}},cloneBodyStream(){let e=t??s,r=new ij.PassThrough,i=new ij.PassThrough,a=0,o=n??0xa00000,l=!1;return e.on("data",e=>{if(!l){if((a+=e.length)>o){l=!0;let e=s.url?` for ${s.url}`:"";console.warn(`Request body exceeded ${i$().format(o)}${e}. Only the first ${i$().format(o)} will be available unless configured. See https://nextjs.org/docs/app/api-reference/config/next-config-js/middlewareClientMaxBodySize for more details.`),r.push(null),i.push(null);return}r.push(e),i.push(e)}}),e.on("end",()=>{l||(r.push(null),i.push(null))}),t=i,r}}))}}async runEdgeFunction(e){throw Object.defineProperty(Error("Middleware is not supported in minimal mode. Please remove the `NEXT_MINIMAL` environment variable."),"__NEXT_ERROR_CODE",{value:"E58",enumerable:!1,configurable:!0})}get serverDistDir(){if(this._serverDistDir)return this._serverDistDir;let e=(0,j.join)(this.distDir,e5);return this._serverDistDir=e,e}async getFallbackErrorComponents(e){return null}async instrumentationOnRequestError(...e){await super.instrumentationOnRequestError(...e);{let[t,,,r]=e;r||this.logError(t)}}onServerClose(e){this.cleanupListeners.add(e)}async close(){await this.cleanupListeners.runAll()}getInternalWaitUntil(){return this.internalWaitUntil??=this.createInternalWaitUntil(),this.internalWaitUntil}createInternalWaitUntil(){throw Object.defineProperty(new ej("createInternalWaitUntil should never be called in minimal mode"),"__NEXT_ERROR_CODE",{value:"E540",enumerable:!1,configurable:!0})}}})(),module.exports=n})();
|
|
24
|
+
`)}}var rN=r("./dist/compiled/@edge-runtime/cookies/index.js");let rj=Symbol("internal request");class rA extends Request{constructor(e,t={}){const r="string"!=typeof e&&"url"in e?e.url:String(e);rd(r),t.body&&"half"!==t.duplex&&(t.duplex="half"),e instanceof Request?super(e,t):super(r,t);const n=new rP(r,{headers:ru(this.headers),nextConfig:t.nextConfig});this[rj]={cookies:new rN.RequestCookies(this.headers),nextUrl:n,url:process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE?r:n.toString()}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,nextUrl:this.nextUrl,url:this.url,bodyUsed:this.bodyUsed,cache:this.cache,credentials:this.credentials,destination:this.destination,headers:Object.fromEntries(this.headers),integrity:this.integrity,keepalive:this.keepalive,method:this.method,mode:this.mode,redirect:this.redirect,referrer:this.referrer,referrerPolicy:this.referrerPolicy,signal:this.signal}}get cookies(){return this[rj].cookies}get nextUrl(){return this[rj].nextUrl}get page(){throw new rT}get ua(){throw new rS}get url(){return this[rj].url}}let rD="ResponseAborted";class r$ extends Error{constructor(...e){super(...e),this.name=rD}}class rk{constructor(){let e,t;this.promise=new Promise((r,n)=>{e=r,t=n}),this.resolve=e,this.reject=t}}let rI=0,rM=0,rL=0;function rq(e){return(null==e?void 0:e.name)==="AbortError"||(null==e?void 0:e.name)===rD}async function rH(e,t,r){try{var n;let i,{errored:s,destroyed:a}=t;if(s||a)return;let o=(n=t,i=new AbortController,n.once("close",()=>{n.writableFinished||i.abort(new r$)}),i),l=function(e,t){let r=!1,n=new rk;function i(){n.resolve()}e.on("drain",i),e.once("close",()=>{e.off("drain",i),n.resolve()});let s=new rk;return e.once("finish",()=>{s.resolve()}),new WritableStream({write:async t=>{if(!r){if(r=!0,"performance"in globalThis&&process.env.NEXT_OTEL_PERFORMANCE_PREFIX){let e=function(e={}){let t=0===rI?void 0:{clientComponentLoadStart:rI,clientComponentLoadTimes:rM,clientComponentLoadCount:rL};return e.reset&&(rI=0,rM=0,rL=0),t}();e&&performance.measure(`${process.env.NEXT_OTEL_PERFORMANCE_PREFIX}:next-client-component-loading`,{start:e.clientComponentLoadStart,end:e.clientComponentLoadStart+e.clientComponentLoadTimes})}e.flushHeaders(),(0,ty.getTracer)().trace(tE.startResponse,{spanName:"start response"},()=>void 0)}try{let r=e.write(t);"flush"in e&&"function"==typeof e.flush&&e.flush(),r||(await n.promise,n=new rk)}catch(t){throw e.end(),Object.defineProperty(Error("failed to write chunk to response",{cause:t}),"__NEXT_ERROR_CODE",{value:"E321",enumerable:!1,configurable:!0})}},abort:t=>{e.writableFinished||e.destroy(t)},close:async()=>{if(t&&await t,!e.writableFinished)return e.end(),s.promise}})}(t,r);await e.pipeTo(l,{signal:o.signal})}catch(e){if(rq(e))return;throw Object.defineProperty(Error("failed to pipe response",{cause:e}),"__NEXT_ERROR_CODE",{value:"E180",enumerable:!1,configurable:!0})}}class rF{static #e=this.EMPTY=new rF(null,{metadata:{},contentType:null});static fromStatic(e,t){return new rF(e,{metadata:{},contentType:t})}constructor(e,{contentType:t,waitUntil:r,metadata:n}){this.response=e,this.contentType=t,this.metadata=n,this.waitUntil=r}assignMetadata(e){Object.assign(this.metadata,e)}get isNull(){return null===this.response}get isDynamic(){return"string"!=typeof this.response}toUnchunkedString(e=!1){if(null===this.response)return"";if("string"!=typeof this.response){if(!e)throw Object.defineProperty(new ej("dynamic responses cannot be unchunked. This is a bug in Next.js"),"__NEXT_ERROR_CODE",{value:"E732",enumerable:!1,configurable:!0});return rl(this.readable)}return this.response}get readable(){return null===this.response?new ReadableStream({start(e){e.close()}}):"string"==typeof this.response?ra(this.response):Buffer.isBuffer(this.response)?ro(this.response):Array.isArray(this.response)?function(...e){if(0===e.length)return new ReadableStream({start(e){e.close()}});if(1===e.length)return e[0];let{readable:t,writable:r}=new TransformStream,n=e[0].pipeTo(r,{preventClose:!0}),i=1;for(;i<e.length-1;i++){let t=e[i];n=n.then(()=>t.pipeTo(r,{preventClose:!0}))}let s=e[i];return(n=n.then(()=>s.pipeTo(r))).catch(ri),t}(...this.response):this.response}coerce(){return null===this.response?[]:"string"==typeof this.response?[ra(this.response)]:Array.isArray(this.response)?this.response:Buffer.isBuffer(this.response)?[ro(this.response)]:[this.response]}unshift(e){this.response=this.coerce(),this.response.unshift(e)}push(e){this.response=this.coerce(),this.response.push(e)}async pipeTo(e){try{await this.readable.pipeTo(e,{preventClose:!0}),this.waitUntil&&await this.waitUntil,await e.close()}catch(t){if(rq(t))return void await e.abort(t);throw t}}async pipeToNodeResponse(e){await rH(this.readable,e,this.waitUntil)}}function rz(e){return e.replace(/\\/g,"/")}function rU(e){let t=rz(e);return t.startsWith("/index/")&&!re(t)?t.slice(6):"/index"!==t?t:"/"}function rX(e,t){let r=[],n=(0,eB.pathToRegexp)(e,r,{delimiter:"/",sensitive:"boolean"==typeof t?.sensitive&&t.sensitive,strict:t?.strict}),i=(0,eB.regexpToFunction)(t?.regexModifier?new RegExp(t.regexModifier(n.source),n.flags):n,r);return(e,n)=>{if("string"!=typeof e)return!1;let s=i(e);if(!s)return!1;if(t?.removeUnnamedParams)for(let e of r)"number"==typeof e.name&&delete s.params[e.name];return{...n,...s.params}}}let rW=/[|\\{}()[\]^$+*?.-]/,rB=/[|\\{}()[\]^$+*?.-]/g;function rG(e){return rW.test(e)?e.replace(rB,"\\$&"):e}let rV=/^([^[]*)\[((?:\[[^\]]*\])|[^\]]+)\](.*)$/;function rK(e){let t=e.startsWith("[")&&e.endsWith("]");t&&(e=e.slice(1,-1));let r=e.startsWith("...");return r&&(e=e.slice(3)),{key:e,repeat:r,optional:t}}function rY(e,{includeSuffix:t=!1,includePrefix:r=!1,excludeOptionalTrailingSlash:n=!1}={}){let{parameterizedRoute:i,groups:s}=function(e,t,r){let n={},i=1,s=[];for(let a of rp(e).slice(1).split("/")){let e=t6.find(e=>a.startsWith(e)),o=a.match(rV);if(e&&o&&o[2]){let{key:t,optional:r,repeat:a}=rK(o[2]);n[t]={pos:i++,repeat:a,optional:r},s.push(`/${rG(e)}([^/]+?)`)}else if(o&&o[2]){let{key:e,repeat:t,optional:a}=rK(o[2]);n[e]={pos:i++,repeat:t,optional:a},r&&o[1]&&s.push(`/${rG(o[1])}`);let l=t?a?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)";r&&o[1]&&(l=l.substring(1)),s.push(l)}else s.push(`/${rG(a)}`);t&&o&&o[3]&&s.push(rG(o[3]))}return{parameterizedRoute:s.join(""),groups:n}}(e,t,r),a=i;return n||(a+="(?:/)?"),{re:RegExp(`^${a}$`),groups:s}}function rJ({interceptionMarker:e,getSafeRouteKey:t,segment:r,routeKeys:n,keyPrefix:i,backreferenceDuplicateKeys:s}){let a,{key:o,optional:l,repeat:c}=rK(r),u=o.replace(/\W/g,"");i&&(u=`${i}${u}`);let d=!1;(0===u.length||u.length>30)&&(d=!0),isNaN(parseInt(u.slice(0,1)))||(d=!0),d&&(u=t());let h=u in n;i?n[u]=`${i}${o}`:n[u]=o;let p=e?rG(e):"";return a=h&&s?`\\k<${u}>`:c?`(?<${u}>.+?)`:`(?<${u}>[^/]+?)`,{key:o,pattern:l?`(?:/${p}${a})?`:`/${p}${a}`,cleanedKey:u,optional:l,repeat:c}}function rQ(e){return e.replace(/__ESC_COLON_/gi,":")}function rZ(e,t,r=[],n=[]){let i={},s=r=>{let n,s=r.key;switch(r.type){case"header":s=s.toLowerCase(),n=e.headers[s];break;case"cookie":n="cookies"in e?e.cookies[r.key]:tw(e.headers)()[r.key];break;case"query":n=t[s];break;case"host":{let{host:t}=e?.headers||{};n=t?.split(":",1)[0].toLowerCase()}}if(!r.value&&n)return i[function(e){let t="";for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);(n>64&&n<91||n>96&&n<123)&&(t+=e[r])}return t}(s)]=n,!0;if(n){let e=RegExp(`^${r.value}$`),t=Array.isArray(n)?n.slice(-1)[0].match(e):n.match(e);if(t)return Array.isArray(t)&&(t.groups?Object.keys(t.groups).forEach(e=>{i[e]=t.groups[e]}):"host"===r.type&&t[0]&&(i.host=t[0])),!0}return!1};return!(!r.every(e=>s(e))||n.some(e=>s(e)))&&i}function r0(e,t){if(!e.includes(":"))return e;for(let r of Object.keys(t))e.includes(`:${r}`)&&(e=e.replace(RegExp(`:${r}\\*`,"g"),`:${r}--ESCAPED_PARAM_ASTERISKS`).replace(RegExp(`:${r}\\?`,"g"),`:${r}--ESCAPED_PARAM_QUESTION`).replace(RegExp(`:${r}\\+`,"g"),`:${r}--ESCAPED_PARAM_PLUS`).replace(RegExp(`:${r}(?!\\w)`,"g"),`--ESCAPED_PARAM_COLON${r}`));return e=e.replace(/(:|\*|\?|\+|\(|\)|\{|\})/g,"\\$1").replace(/--ESCAPED_PARAM_PLUS/g,"+").replace(/--ESCAPED_PARAM_COLON/g,":").replace(/--ESCAPED_PARAM_QUESTION/g,"?").replace(/--ESCAPED_PARAM_ASTERISKS/g,"*"),eQ(`/${e}`,{validate:!1})(t).slice(1)}function r1(e){try{return decodeURIComponent(e)}catch{return e}}let r4=/https?|ftp|gopher|file/;function r2(e,t){for(let r in delete e.nextInternalLocale,e){let n=r!==ta&&r.startsWith(ta),i=r!==to&&r.startsWith(to);(n||i||t.includes(r))&&delete e[r]}}function r3(e){return"object"==typeof e&&null!==e&&"name"in e&&"message"in e}function r8(e){let t;return r3(e)?e:Object.defineProperty(Error(!function(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);return null===t||t.hasOwnProperty("isPrototypeOf")}(e)?e+"":(t=new WeakSet,JSON.stringify(e,(e,r)=>{if("object"==typeof r&&null!==r){if(t.has(r))return"[Circular]";t.add(r)}return r}))),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}let r6="next-action",r5="next-router-state-tree",r9="next-router-prefetch",r7="next-router-segment-prefetch",ne="next-url",nt=["rsc",r5,r9,"next-hmr-refresh",r7],nr="_rsc";class nn{constructor(e){this.provider=e}normalize(e){return this.provider.analyze(e).pathname}}class ni{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e="/"){let t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);let r=t.map(t=>this.children.get(t)._smoosh(`${e}${t}/`)).reduce((e,t)=>[...e,...t],[]);if(null!==this.slugName&&r.push(...this.children.get("[]")._smoosh(`${e}[${this.slugName}]/`)),!this.placeholder){let t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw Object.defineProperty(Error(`You cannot define a route with the same specificity as a optional catch-all route ("${t}" and "${t}[[...${this.optionalRestSlugName}]]").`),"__NEXT_ERROR_CODE",{value:"E458",enumerable:!1,configurable:!0});r.unshift(t)}return null!==this.restSlugName&&r.push(...this.children.get("[...]")._smoosh(`${e}[...${this.restSlugName}]/`)),null!==this.optionalRestSlugName&&r.push(...this.children.get("[[...]]")._smoosh(`${e}[[...${this.optionalRestSlugName}]]/`)),r}_insert(e,t,r){if(0===e.length){this.placeholder=!1;return}if(r)throw Object.defineProperty(Error("Catch-all must be the last part of the URL."),"__NEXT_ERROR_CODE",{value:"E392",enumerable:!1,configurable:!0});let n=e[0];if(n.startsWith("[")&&n.endsWith("]")){let s=n.slice(1,-1),a=!1;if(s.startsWith("[")&&s.endsWith("]")&&(s=s.slice(1,-1),a=!0),s.startsWith("…"))throw Object.defineProperty(Error(`Detected a three-dot character ('…') at ('${s}'). Did you mean ('...')?`),"__NEXT_ERROR_CODE",{value:"E147",enumerable:!1,configurable:!0});if(s.startsWith("...")&&(s=s.substring(3),r=!0),s.startsWith("[")||s.endsWith("]"))throw Object.defineProperty(Error(`Segment names may not start or end with extra brackets ('${s}').`),"__NEXT_ERROR_CODE",{value:"E421",enumerable:!1,configurable:!0});if(s.startsWith("."))throw Object.defineProperty(Error(`Segment names may not start with erroneous periods ('${s}').`),"__NEXT_ERROR_CODE",{value:"E288",enumerable:!1,configurable:!0});function i(e,r){if(null!==e&&e!==r)throw Object.defineProperty(Error(`You cannot use different slug names for the same dynamic path ('${e}' !== '${r}').`),"__NEXT_ERROR_CODE",{value:"E337",enumerable:!1,configurable:!0});t.forEach(e=>{if(e===r)throw Object.defineProperty(Error(`You cannot have the same slug name "${r}" repeat within a single dynamic path`),"__NEXT_ERROR_CODE",{value:"E247",enumerable:!1,configurable:!0});if(e.replace(/\W/g,"")===n.replace(/\W/g,""))throw Object.defineProperty(Error(`You cannot have the slug names "${e}" and "${r}" differ only by non-word symbols within a single dynamic path`),"__NEXT_ERROR_CODE",{value:"E499",enumerable:!1,configurable:!0})}),t.push(r)}if(r)if(a){if(null!=this.restSlugName)throw Object.defineProperty(Error(`You cannot use both an required and optional catch-all route at the same level ("[...${this.restSlugName}]" and "${e[0]}" ).`),"__NEXT_ERROR_CODE",{value:"E299",enumerable:!1,configurable:!0});i(this.optionalRestSlugName,s),this.optionalRestSlugName=s,n="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Object.defineProperty(Error(`You cannot use both an optional and required catch-all route at the same level ("[[...${this.optionalRestSlugName}]]" and "${e[0]}").`),"__NEXT_ERROR_CODE",{value:"E300",enumerable:!1,configurable:!0});i(this.restSlugName,s),this.restSlugName=s,n="[...]"}else{if(a)throw Object.defineProperty(Error(`Optional route parameters are not yet supported ("${e[0]}").`),"__NEXT_ERROR_CODE",{value:"E435",enumerable:!1,configurable:!0});i(this.slugName,s),this.slugName=s,n="[]"}}this.children.has(n)||this.children.set(n,new ni),this.children.get(n)._insert(e.slice(1),t,r)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}class ns{constructor(e){this.definition=e,re(e.pathname)&&(this.dynamic=eZ(rY(e.pathname)))}get identity(){return this.definition.pathname}get isDynamic(){return void 0!==this.dynamic}match(e){let t=this.test(e);return t?{definition:this.definition,params:t.params}:null}test(e){if(this.dynamic){let t=this.dynamic(e);return t?{params:t}:null}return e===this.definition.pathname?{}:null}}class na extends ns{get identity(){var e;return`${this.definition.pathname}?__nextLocale=${null==(e=this.definition.i18n)?void 0:e.locale}`}match(e,t){var r,n;let i=this.test(e,t);return i?{definition:this.definition,params:i.params,detectedLocale:(null==t||null==(r=t.i18n)?void 0:r.detectedLocale)??(null==(n=this.definition.i18n)?void 0:n.locale)}:null}test(e,t){return this.definition.i18n&&(null==t?void 0:t.i18n)?this.definition.i18n.locale&&t.i18n.detectedLocale&&this.definition.i18n.locale!==t.i18n.detectedLocale?null:super.test(t.i18n.pathname):super.test(e)}}class no{get compilationID(){return this.providers.length}async waitTillReady(){this.waitTillReadyPromise&&(await this.waitTillReadyPromise,delete this.waitTillReadyPromise)}async reload(){let{promise:e,resolve:t,reject:r}=new rk;this.waitTillReadyPromise=e;let n=this.compilationID;try{let e,t=[],r=await Promise.all(this.providers.map(e=>e.matchers())),i=new Map,s={};for(let e of r)for(let r of e){r.duplicated&&delete r.duplicated;let e=i.get(r.definition.pathname);if(e){let t=s[r.definition.pathname]??[e];t.push(r),s[r.definition.pathname]=t,e.duplicated=t,r.duplicated=t}t.push(r),i.set(r.definition.pathname,r)}if(this.matchers.duplicates=s,this.previousMatchers.length===t.length&&this.previousMatchers.every((e,r)=>e===t[r]))return;this.previousMatchers=t,this.matchers.static=t.filter(e=>!e.isDynamic);let a=t.filter(e=>e.isDynamic),o=new Map,l=[];for(let e=0;e<a.length;e++){let t=a[e].definition.pathname,r=o.get(t)??[];r.push(e),1===r.length&&(o.set(t,r),l.push(t))}let c=(e=new ni,l.forEach(t=>e.insert(t)),e.smoosh()),u=[];for(let e of c){let t=o.get(e);if(!Array.isArray(t))throw Object.defineProperty(Error("Invariant: expected to find identity in indexes map"),"__NEXT_ERROR_CODE",{value:"E271",enumerable:!1,configurable:!0});let r=t.map(e=>a[e]);u.push(...r)}if(this.matchers.dynamic=u,this.compilationID!==n)throw Object.defineProperty(Error("Invariant: expected compilation to finish before new matchers were added, possible missing await"),"__NEXT_ERROR_CODE",{value:"E242",enumerable:!1,configurable:!0})}catch(e){r(e)}finally{this.lastCompilationID=n,t()}}push(e){this.providers.push(e)}async test(e,t){return null!==await this.match(e,t)}async match(e,t){for await(let r of this.matchAll(e,t))return r;return null}validate(e,t,r){var n;return t instanceof na?t.match(e,r):(null==(n=r.i18n)?void 0:n.inferredFromDefault)?t.match(r.i18n.pathname):t.match(e)}async *matchAll(e,t){if(this.lastCompilationID!==this.compilationID)throw Object.defineProperty(Error("Invariant: expected routes to have been loaded before match"),"__NEXT_ERROR_CODE",{value:"E235",enumerable:!1,configurable:!0});if(!re(e=t2(e)))for(let r of this.matchers.static){let n=this.validate(e,r,t);n&&(yield n)}if(null==t?void 0:t.skipDynamic)return null;for(let r of this.matchers.dynamic){let n=this.validate(e,r,t);n&&(yield n)}return null}constructor(){this.providers=[],this.matchers={static:[],dynamic:[],duplicates:{}},this.lastCompilationID=this.compilationID,this.previousMatchers=[]}}class nl{constructor(e=[]){this.normalizers=e}push(e){this.normalizers.push(e)}normalize(e){return this.normalizers.reduce((e,t)=>t.normalize(e),e)}}var nc=r("./dist/esm/shared/lib/isomorphic/path.js"),nu=r.n(nc);class nd{constructor(...e){this.prefix=nu().posix.join(...e)}normalize(e){return nu().posix.join(this.prefix,e)}}function nh(e){let t=/^\/index(\/|$)/.test(e)&&!re(e)?`/index${e}`:"/"===e?"/index":t2(e);{let{posix:e}=r("path"),n=e.normalize(t);if(n!==t)throw new eU(`Requested and resolved page mismatch: ${t} ${n}`)}return t}class np{normalize(e){return e.replace(/%5F/g,"_")}}class nf extends nd{constructor(){super("app")}normalize(e){return super.normalize(nh(e))}}class nm extends nd{constructor(e){super(e,e9)}normalize(e){return super.normalize(e)}}function ng(e){return e.endsWith("/route")}let ny=["ico","jpg","jpeg","png","svg"],nv=["jpg","jpeg","png"],nb=["jpg","jpeg","png","gif"],nE=["jpg","jpeg","png","gif"],n_=(e,t)=>t&&0!==t.length?`(?:\\.(${e.join("|")})|(\\.(${t.join("|")})))`:`(\\.(?:${e.join("|")}))`,nx=/^[\\/]favicon\.ico$/,nw=/^[\\/]robots\.txt$/,nR=/^[\\/]manifest\.json$/,nC=/^[\\/]manifest\.webmanifest$/,nP=/[\\/]sitemap\.xml$/,nO=new Map;function nT(e){return{normalize:e}}class nS extends nl{constructor(){super([nT(t3),new np])}normalize(e){return super.normalize(e)}}class nN{constructor(e){this.filename=new nm(e),this.pathname=new nS,this.bundlePath=new nf}}var nj=((R={}).PAGES="PAGES",R.PAGES_API="PAGES_API",R.APP_PAGE="APP_PAGE",R.APP_ROUTE="APP_ROUTE",R.IMAGE="IMAGE",R);class nA extends ns{get identity(){return`${this.definition.pathname}?__nextPage=${this.definition.page}`}}class nD{constructor(e){this.loader=e,this.cached=[]}async matchers(){let e=await this.loader.load();if(!e)return[];if(this.data&&this.loader.compare(this.data,e))return this.cached;this.data=e;let t=await this.transform(e);return this.cached=t,t}}class n$ extends nD{constructor(e,t){super({load:async()=>t.load(e),compare:(e,t)=>e===t})}}class nk extends n${constructor(e,t){super(e5,t),this.normalizers=new nN(e)}async transform(e){let t=Object.keys(e).filter(e=>e.endsWith("/page")),r={};for(let e of t){let t=this.normalizers.pathname.normalize(e);t in r?r[t].push(e):r[t]=[e]}let n=[];for(let[t,i]of Object.entries(r)){let r=i[0],s=this.normalizers.filename.normalize(e[r]),a=this.normalizers.bundlePath.normalize(r);n.push(new nA({kind:nj.APP_PAGE,pathname:t,page:r,bundlePath:a,filename:s,appPaths:i}))}return n}}class nI extends ns{}class nM extends n${constructor(e,t){super(e5,t),this.normalizers=new nN(e)}async transform(e){let t=Object.keys(e).filter(e=>ng(e)),r=[];for(let n of t){let t=this.normalizers.filename.normalize(e[n]),i=this.normalizers.pathname.normalize(n),s=this.normalizers.bundlePath.normalize(n);r.push(new nI({kind:nj.APP_ROUTE,pathname:i,page:n,bundlePath:s,filename:t}))}return r}}function nL(e){return"/api"===e||!!(null==e?void 0:e.startsWith("/api/"))}class nq extends ns{}class nH extends na{}class nF extends nl{constructor(){super([nT(nh),new nd("pages")])}normalize(e){return super.normalize(e)}}class nz extends nd{constructor(e){super(e,e9)}normalize(e){return super.normalize(e)}}class nU{constructor(e){this.filename=new nz(e),this.bundlePath=new nF}}class nX extends n${constructor(e,t,r){super(e6,t),this.i18nProvider=r,this.normalizers=new nU(e)}async transform(e){let t=Object.keys(e).filter(e=>nL(e)),r=[];for(let n of t)if(this.i18nProvider){let{detectedLocale:t,pathname:i}=this.i18nProvider.analyze(n);r.push(new nH({kind:nj.PAGES_API,pathname:i,page:n,bundlePath:this.normalizers.bundlePath.normalize(n),filename:this.normalizers.filename.normalize(e[n]),i18n:{locale:t}}))}else r.push(new nq({kind:nj.PAGES_API,pathname:n,page:n,bundlePath:this.normalizers.bundlePath.normalize(n),filename:this.normalizers.filename.normalize(e[n])}));return r}}class nW extends ns{}class nB extends na{}class nG extends n${constructor(e,t,r){super(e6,t),this.i18nProvider=r,this.normalizers=new nU(e)}async transform(e){let t=Object.keys(e).filter(e=>!nL(e)).filter(e=>{var t;let r=(null==(t=this.i18nProvider)?void 0:t.analyze(e).pathname)??e;return!e7.includes(r)}),r=[];for(let n of t)if(this.i18nProvider){let{detectedLocale:t,pathname:i}=this.i18nProvider.analyze(n);r.push(new nB({kind:nj.PAGES,pathname:i,page:n,bundlePath:this.normalizers.bundlePath.normalize(n),filename:this.normalizers.filename.normalize(e[n]),i18n:{locale:t}}))}else r.push(new nW({kind:nj.PAGES,pathname:n,page:n,bundlePath:this.normalizers.bundlePath.normalize(n),filename:this.normalizers.filename.normalize(e[n])}));return r}}class nV{constructor(e){this.getter=e}load(e){return this.getter(e)}}class nK{constructor(e){var t;if(this.config=e,!e.locales.length)throw Object.defineProperty(Error("Invariant: No locales provided"),"__NEXT_ERROR_CODE",{value:"E510",enumerable:!1,configurable:!0});this.lowerCaseLocales=e.locales.map(e=>e.toLowerCase()),this.lowerCaseDomains=null==(t=e.domains)?void 0:t.map(e=>{var t;let r=e.domain.toLowerCase();return{defaultLocale:e.defaultLocale.toLowerCase(),hostname:r.split(":",1)[0],domain:r,locales:null==(t=e.locales)?void 0:t.map(e=>e.toLowerCase()),http:e.http}})}detectDomainLocale(e,t){if(e&&this.lowerCaseDomains&&this.config.domains){t&&(t=t.toLowerCase());for(let n=0;n<this.lowerCaseDomains.length;n++){var r;let i=this.lowerCaseDomains[n];if(i.hostname===e||(null==(r=i.locales)?void 0:r.some(e=>e===t)))return this.config.domains[n]}}}fromRequest(e,t){let r=e1(e,"locale");if(r){let e=this.analyze(t);e.detectedLocale&&(e.detectedLocale!==r&&console.warn(`The detected locale does not match the locale in the query. Expected to find '${r}' in '${t}' but found '${e.detectedLocale}'}`),t=e.pathname)}return{pathname:t,detectedLocale:r,inferredFromDefault:e1(e,"localeInferredFromDefault")??!1}}analyze(e,t={}){let r=t.defaultLocale,n="string"==typeof r,i=e.split("/",2);if(!i[1])return{detectedLocale:r,pathname:e,inferredFromDefault:n};let s=i[1].toLowerCase(),a=this.lowerCaseLocales.indexOf(s);return a<0||(r=this.config.locales[a],n=!1,e=e.slice(r.length+1)||"/"),{detectedLocale:r,pathname:e,inferredFromDefault:n}}}async function nY(e,t,r,n){{var i;t.statusCode=r.status,t.statusMessage=r.statusText;let s=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(i=r.headers)||i.forEach((e,r)=>{if("x-middleware-set-cookie"!==r.toLowerCase())if("set-cookie"===r.toLowerCase())for(let n of rc(e))t.appendHeader(r,n);else{let n=void 0!==t.getHeader(r);(s.includes(r.toLowerCase())||!n)&&t.appendHeader(r,e)}});let{originalResponse:a}=t;r.body&&"HEAD"!==e.method?await rH(r.body,a,n):a.end()}}let nJ=rX("/_next/data/:path*");class nQ{constructor(e){this.suffix=e}match(e){return!!e.endsWith(this.suffix)}normalize(e,t){return t||this.match(e)?e.substring(0,e.length-this.suffix.length):e}}class nZ extends nQ{constructor(){super(td)}}class n0{constructor(e){if(this.prefix=e,e.endsWith("/"))throw Object.defineProperty(Error(`PrefixPathnameNormalizer: prefix "${e}" should not end with a slash`),"__NEXT_ERROR_CODE",{value:"E219",enumerable:!1,configurable:!0})}match(e){return e===this.prefix||!!e.startsWith(this.prefix+"/")}normalize(e,t){return t||this.match(e)?e.length===this.prefix.length?"/":e.substring(this.prefix.length):e}}class n1{constructor(e){if(this.suffix=new nQ(".json"),!e)throw Object.defineProperty(Error("Invariant: buildID is required"),"__NEXT_ERROR_CODE",{value:"E200",enumerable:!1,configurable:!0});this.prefix=new n0(`/_next/data/${e}`)}match(e){return this.prefix.match(e)&&this.suffix.match(e)}normalize(e,t){return t||this.match(e)?(e=this.prefix.normalize(e,!0),rU(e=this.suffix.normalize(e,!0))):e}}function n4(e){return e.replace(/(?:\/index)?\/?$/,"")||"/"}Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});let n2=Symbol.for("@next/request-context");Symbol("response"),Symbol("passThrough"),Symbol("waitUntil");let n3=Symbol("internal response"),n8=new Set([301,302,303,307,308]);function n6(e,t){var r;if(null==e||null==(r=e.request)?void 0:r.headers){if(!(e.request.headers instanceof Headers))throw Object.defineProperty(Error("request.headers must be an instance of Headers"),"__NEXT_ERROR_CODE",{value:"E119",enumerable:!1,configurable:!0});let r=[];for(let[n,i]of e.request.headers)t.set("x-middleware-request-"+n,i),r.push(n);t.set("x-middleware-override-headers",r.join(","))}}class n5 extends Response{constructor(e,t={}){super(e,t);const r=this.headers,n=new Proxy(new rN.ResponseCookies(r),{get(e,n,i){switch(n){case"delete":case"set":return(...i)=>{let s=Reflect.apply(e[n],e,i),a=new Headers(r);return s instanceof rN.ResponseCookies&&r.set("x-middleware-set-cookie",s.getAll().map(e=>(0,rN.stringifyCookie)(e)).join(",")),n6(t,a),s};default:return tr.get(e,n,i)}}});this[n3]={cookies:n,url:t.url?new rP(t.url,{headers:ru(r),nextConfig:t.nextConfig}):void 0}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,url:this.url,body:this.body,bodyUsed:this.bodyUsed,headers:Object.fromEntries(this.headers),ok:this.ok,redirected:this.redirected,status:this.status,statusText:this.statusText,type:this.type}}get cookies(){return this[n3].cookies}static json(e,t){let r=Response.json(e,t);return new n5(r.body,r)}static redirect(e,t){let r="number"==typeof t?t:(null==t?void 0:t.status)??307;if(!n8.has(r))throw Object.defineProperty(RangeError('Failed to execute "redirect" on "response": Invalid status code'),"__NEXT_ERROR_CODE",{value:"E529",enumerable:!1,configurable:!0});let n="object"==typeof t?t:{},i=new Headers(null==n?void 0:n.headers);return i.set("Location",rd(e)),new n5(null,{...n,headers:i,status:r})}static rewrite(e,t){let r=new Headers(null==t?void 0:t.headers);return r.set("x-middleware-rewrite",rd(e)),n6(t,r),new n5(null,{...t,headers:r})}static next(e){let t=new Headers(null==e?void 0:e.headers);return t.set("x-middleware-next","1"),n6(e,t),new n5(null,{...e,headers:t})}}Symbol.for("next.mutated.cookies"),r("./dist/compiled/p-queue/index.js");let n9=require("next/dist/server/lib/incremental-cache/tags-manifest.external.js");function n7(e){if(0===e)return{get:()=>Promise.resolve(void 0),set:()=>Promise.resolve(),refreshTags:()=>Promise.resolve(),getExpiration:()=>Promise.resolve(0),updateTags:()=>Promise.resolve()};let t=new M(e,e=>e.size),r=new Map,n=process.env.NEXT_PRIVATE_DEBUG_CACHE?console.debug.bind(console,"DefaultCacheHandler:"):void 0;return{async get(e){let i=r.get(e);i&&(null==n||n("get",e,"pending"),await i);let s=t.get(e);if(!s){null==n||n("get",e,"not found");return}let a=s.entry;if(performance.timeOrigin+performance.now()>a.timestamp+1e3*a.revalidate){null==n||n("get",e,"expired");return}let o=a.revalidate;if((0,n9.areTagsExpired)(a.tags,a.timestamp)){null==n||n("get",e,"had expired tag");return}(0,n9.areTagsStale)(a.tags,a.timestamp)&&(null==n||n("get",e,"had stale tag"),o=-1);let[l,c]=a.value.tee();return a.value=c,null==n||n("get",e,"found",{tags:a.tags,timestamp:a.timestamp,expire:a.expire,revalidate:o}),{...a,revalidate:o,value:l}},async set(e,i){null==n||n("set",e,"start");let s=()=>{},a=new Promise(e=>{s=e});r.set(e,a);let o=await i,l=0;try{let[r,i]=o.value.tee();o.value=r;let s=i.getReader();for(let e;!(e=await s.read()).done;)l+=Buffer.from(e.value).byteLength;t.set(e,{entry:o,isErrored:!1,errorRetryCount:0,size:l}),null==n||n("set",e,"done")}catch(t){null==n||n("set",e,"failed",t)}finally{s(),r.delete(e)}},async refreshTags(){},async getExpiration(e){let t=Math.max(...e.map(e=>{let t=n9.tagsManifest.get(e);return t&&t.expired||0}),0);return null==n||n("getExpiration",{tags:e,expiration:t}),t},async updateTags(e,t){let r=Math.round(performance.timeOrigin+performance.now());for(let i of(null==n||n("updateTags",{tags:e,timestamp:r}),e)){let e=n9.tagsManifest.get(i)||{};if(t){let n={...e};n.stale=r,void 0!==t.expire&&(n.expired=r+1e3*t.expire),n9.tagsManifest.set(i,n)}else n9.tagsManifest.set(i,{...e,expired:r})}}}}let ie=process.env.NEXT_PRIVATE_DEBUG_CACHE?(e,...t)=>{console.log(`use-cache: ${e}`,...t)}:void 0,it=Symbol.for("@next/cache-handlers"),ir=Symbol.for("@next/cache-handlers-map"),ii=Symbol.for("@next/cache-handlers-set"),is=globalThis;require("next/dist/server/app-render/after-task-async-storage.external.js");class ia extends rA{constructor(e){super(e.input,e.init),this.sourcePage=e.page}get request(){throw Object.defineProperty(new rO({page:this.sourcePage}),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}respondWith(){throw Object.defineProperty(new rO({page:this.sourcePage}),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}waitUntil(){throw Object.defineProperty(new rO({page:this.sourcePage}),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}}let io=RegExp(`^(/.*)${tc}(/.*)${tu}$`);class il{match(e){return io.test(e)}extract(e){let t=e.match(io);return t?{originalPathname:t[1],segmentPath:t[2]}:null}normalize(e){let t=this.extract(e);return t?t.originalPathname:e}}let ic=require("next/dist/shared/lib/no-fallback-error.external.js"),iu={catchall:"c","catchall-intercepted-(..)(..)":"ci(..)(..)","catchall-intercepted-(.)":"ci(.)","catchall-intercepted-(..)":"ci(..)","catchall-intercepted-(...)":"ci(...)","optional-catchall":"oc",dynamic:"d","dynamic-intercepted-(..)(..)":"di(..)(..)","dynamic-intercepted-(.)":"di(.)","dynamic-intercepted-(..)":"di(..)","dynamic-intercepted-(...)":"di(...)"};class id extends Error{constructor(e){super(),this.innerError=e}}class ih{getServerComponentsHmrCache(){return this.nextConfig.experimental.serverComponentsHmrCache?globalThis.__serverComponentsHmrCache:void 0}constructor(e){var t,r;this.handleRSCRequest=(e,t,r)=>{var n,i;if(!r.pathname)return!1;if(null==(n=this.normalizers.segmentPrefetchRSC)?void 0:n.match(r.pathname)){let t=this.normalizers.segmentPrefetchRSC.extract(r.pathname);if(!t)return!1;let{originalPathname:n,segmentPath:i}=t;r.pathname=n,e.headers.rsc="1",e.headers[r9]="1",e.headers[r7]=i,e4(e,"isRSCRequest",!0),e4(e,"isPrefetchRSCRequest",!0),e4(e,"segmentPrefetchRSCRequest",i)}else if(null==(i=this.normalizers.rsc)?void 0:i.match(r.pathname))r.pathname=this.normalizers.rsc.normalize(r.pathname,!0),e.headers.rsc="1",e4(e,"isRSCRequest",!0);else if(e.headers["x-now-route-matches"]){var s=e.headers;for(let e of nt)delete s[e];return!1}else if("1"!==e.headers.rsc)return!1;else if(e4(e,"isRSCRequest",!0),"1"===e.headers[r9]){e4(e,"isPrefetchRSCRequest",!0);let t=e.headers[r7];"string"==typeof t&&e4(e,"segmentPrefetchRSCRequest",t)}if(e.url){let t=tD(e.url);t.pathname=r.pathname,e.url=(0,D.format)(t)}return!1},this.handleNextDataRequest=async(e,t,r)=>{var n,i;let s=await this.getMiddleware(),a="string"==typeof(n=r.pathname)&&nJ(n);if(!a||!a.path)return!1;if(a.path[0]!==this.buildId)return!e1(e,"middlewareInvoke")&&(await this.render404(e,t,r),!0);a.path.shift();let o=a.path[a.path.length-1];if("string"!=typeof o||!o.endsWith(".json"))return await this.render404(e,t,r),!0;let l=`/${a.path.join("/")}`;if(l=function(e,t=""){return e=e.replace(/\\/g,"/"),(e=t&&e.endsWith(t)?e.slice(0,-t.length):e).startsWith("/index/")&&!re(e)?e=e.slice(6):"/index"===e&&(e="/"),e}(l,".json"),s&&(this.nextConfig.trailingSlash&&!l.endsWith("/")&&(l+="/"),!this.nextConfig.trailingSlash&&l.length>1&&l.endsWith("/")&&(l=l.substring(0,l.length-1))),this.i18nProvider){let n=null==e||null==(i=e.headers.host)?void 0:i.split(":",1)[0].toLowerCase(),a=this.i18nProvider.detectDomainLocale(n),o=(null==a?void 0:a.defaultLocale)??this.i18nProvider.config.defaultLocale,c=this.i18nProvider.analyze(l);if(c.detectedLocale&&(l=c.pathname),e4(e,"locale",c.detectedLocale),e4(e,"defaultLocale",o),c.detectedLocale||e2(e,"localeInferredFromDefault"),!c.detectedLocale&&!s)return e4(e,"locale",o),await this.render404(e,t,r),!0}return r.pathname=l,e4(e,"isNextDataReq",!0),!1},this.handleNextImageRequest=()=>!1,this.handleCatchallRenderRequest=()=>!1,this.handleCatchallMiddlewareRequest=()=>!1,this.normalize=e=>{let t=[];for(let r of(this.normalizers.data&&t.push(this.normalizers.data),this.normalizers.segmentPrefetchRSC&&t.push(this.normalizers.segmentPrefetchRSC),this.normalizers.rsc&&t.push(this.normalizers.rsc),t))if(r.match(e))return r.normalize(e,!0);return e},this.normalizeAndAttachMetadata=async(e,t,r)=>{let n=await this.handleNextImageRequest(e,t,r);return!!(n||this.enabledDirectories.pages&&(n=await this.handleNextDataRequest(e,t,r)))||!1},this.prepared=!1,this.preparedPromise=null,this.customErrorNo404Warn=function(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}(()=>{tH(`You have added a custom /_error page without a custom /404 page. This prevents the 404 page from being auto statically optimized.
|
|
25
|
+
See here for info: https://nextjs.org/docs/messages/custom-error-no-custom-404`)});const{dir:n=".",quiet:i=!1,conf:s,dev:a=!1,minimalMode:o=!1,hostname:l,port:c,experimentalTestProxy:u}=e;if(this.experimentalTestProxy=u,this.serverOptions=e,this.dir=j.resolve(n),this.quiet=i,this.loadEnvConfig({dev:a,forceReload:!1}),this.nextConfig=s,this.nextConfig.experimental.runtimeServerDeploymentId){if(!process.env.NEXT_DEPLOYMENT_ID)throw Object.defineProperty(Error("process.env.NEXT_DEPLOYMENT_ID is missing but runtimeServerDeploymentId is enabled"),"__NEXT_ERROR_CODE",{value:"E970",enumerable:!1,configurable:!0});this.deploymentId=process.env.NEXT_DEPLOYMENT_ID}else{let e=this.nextConfig.experimental.useSkewCookie?"":this.nextConfig.deploymentId||"";this.deploymentId=e,process.env.NEXT_DEPLOYMENT_ID=e}this.hostname=l,this.hostname&&(this.fetchHostname=function(e){return t4.test(e)?`[${e}]`:e}(this.hostname)),this.port=c,this.distDir=j.join(this.dir,this.nextConfig.distDir),this.publicDir=this.getPublicDir(),this.hasStaticDir=!o&&this.getHasStaticDir(),this.i18nProvider=(null==(t=this.nextConfig.i18n)?void 0:t.locales)?new nK(this.nextConfig.i18n):void 0,this.localeNormalizer=this.i18nProvider?new nn(this.i18nProvider):void 0;const{assetPrefix:d,generateEtags:h}=this.nextConfig;this.buildId=this.getBuildId(),this.minimalMode=o||!!process.env.NEXT_PRIVATE_MINIMAL_MODE,this.enabledDirectories=this.getEnabledDirectories(a),this.isAppPPREnabled=this.enabledDirectories.app&&function(e){return void 0!==e&&("boolean"==typeof e?e:"incremental"===e)}(this.nextConfig.experimental.ppr),this.normalizers={rsc:this.enabledDirectories.app&&1?new nZ:void 0,segmentPrefetchRSC:new il,data:this.enabledDirectories.pages?new n1(this.buildId):void 0},this.nextFontManifest=this.getNextFontManifest(),this.renderOpts={dir:this.dir,supportsDynamicResponse:!0,trailingSlash:this.nextConfig.trailingSlash,poweredByHeader:this.nextConfig.poweredByHeader,generateEtags:h,previewProps:this.getPrerenderManifest().preview,basePath:this.nextConfig.basePath,images:this.nextConfig.images,optimizeCss:this.nextConfig.experimental.optimizeCss,nextConfigOutput:this.nextConfig.output,nextScriptWorkers:this.nextConfig.experimental.nextScriptWorkers,disableOptimizedLoading:this.nextConfig.experimental.disableOptimizedLoading,domainLocales:null==(r=this.nextConfig.i18n)?void 0:r.domains,distDir:this.distDir,serverComponents:this.enabledDirectories.app,cacheLifeProfiles:this.nextConfig.cacheLife,enableTainting:this.nextConfig.experimental.taint,crossOrigin:this.nextConfig.crossOrigin?this.nextConfig.crossOrigin:void 0,largePageDataBytes:this.nextConfig.experimental.largePageDataBytes,isExperimentalCompile:this.nextConfig.experimental.isExperimentalCompile,htmlLimitedBots:this.nextConfig.htmlLimitedBots,cacheComponents:this.nextConfig.cacheComponents??!1,experimental:{expireTime:this.nextConfig.expireTime,staleTimes:this.nextConfig.experimental.staleTimes,clientTraceMetadata:this.nextConfig.experimental.clientTraceMetadata,clientParamParsingOrigins:this.nextConfig.experimental.clientParamParsingOrigins,dynamicOnHover:this.nextConfig.experimental.dynamicOnHover??!1,optimisticRouting:this.nextConfig.experimental.optimisticRouting??!1,inlineCss:this.nextConfig.experimental.inlineCss??!1,authInterrupts:!!this.nextConfig.experimental.authInterrupts,maxPostponedStateSizeBytes:tQ(this.nextConfig.experimental.maxPostponedStateSize)},onInstrumentationRequestError:this.instrumentationOnRequestError.bind(this),reactMaxHeadersLength:this.nextConfig.reactMaxHeadersLength},this.pagesManifest=this.getPagesManifest(),this.appPathsManifest=this.getAppPathsManifest(),this.appPathRoutes=this.getAppPathRoutes(),this.interceptionRoutePatterns=this.getinterceptionRoutePatterns(),this.matchers=this.getRouteMatchers(),this.matchers.reload(),this.setAssetPrefix(d)}reloadMatchers(){return this.matchers.reload()}getRouteMatchers(){let e=new nV(e=>{switch(e){case e6:return this.getPagesManifest()??null;case e5:return this.getAppPathsManifest()??null;default:return null}}),t=new no;return t.push(new nG(this.distDir,e,this.i18nProvider)),t.push(new nX(this.distDir,e,this.i18nProvider)),this.enabledDirectories.app&&(t.push(new nk(this.distDir,e)),t.push(new nM(this.distDir,e))),t}async instrumentationOnRequestError(...e){let[t,r,n]=e;if(this.instrumentation)try{await (null==this.instrumentation.onRequestError?void 0:this.instrumentation.onRequestError.call(this.instrumentation,t,{path:r.url||"",method:r.method||"GET",headers:r instanceof ia?Object.fromEntries(r.headers.entries()):r.headers},n))}catch(e){console.error("Error in instrumentation.onRequestError:",e)}}logError(e){this.quiet||tq(e)}async handleRequest(e,t,r){await this.prepare();let n=e.method.toUpperCase(),i=(0,ty.getTracer)();return i.withPropagatedContext(e.headers,()=>i.trace(tv.handleRequest,{spanName:`${n}`,kind:ty.SpanKind.SERVER,attributes:{"http.method":n,"http.target":e.url}},async s=>this.handleRequestImpl(e,t,r).finally(()=>{if(!s)return;let r=e1(e,"isRSCRequest")??!1;s.setAttributes({"http.status_code":t.statusCode,"next.rsc":r}),t.statusCode&&t.statusCode>=500&&(s.setStatus({code:ty.SpanStatusCode.ERROR}),s.setAttribute("error.type",t.statusCode.toString()));let a=i.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==tv.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let o=a.get("next.route");if(o){let e=r?`RSC ${n} ${o}`:`${n} ${o}`;s.setAttributes({"next.route":o,"http.route":o,"next.span_name":e}),s.updateName(e)}else s.updateName(r?`RSC ${n}`:`${n}`)})))}async handleRequestImpl(e,t,r){try{var n,i,s,a,o,l,c,u,d,h;let p;await this.matchers.waitTillReady(),p=(h=t.originalResponse).setHeader.bind(h),h.setHeader=(t,r)=>{if("headersSent"in h&&h.headersSent)return h;if("set-cookie"===t.toLowerCase()){let t=e1(e,"middlewareCookie");t&&Array.isArray(r)&&r.every((e,r)=>e===t[r])||(r=[...new Set([...t||[],..."string"==typeof r?[r]:Array.isArray(r)?r:[]])])}return p(t,r)};let f=(e.url||"").split("?",1)[0];if(null==f?void 0:f.match(/(\\|\/\/)/)){let r,n=(r=e.url.split("?"))[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(r[1]?`?${r.slice(1).join("?")}`:"");t.redirect(n,308).body(n).send();return}if(!r||"object"!=typeof r){if(!e.url)throw Object.defineProperty(Error("Invariant: url can not be undefined"),"__NEXT_ERROR_CODE",{value:"E123",enumerable:!1,configurable:!0});r=tD(e.url)}if(!r.pathname)throw Object.defineProperty(Error("Invariant: pathname can't be empty"),"__NEXT_ERROR_CODE",{value:"E412",enumerable:!1,configurable:!0});"string"==typeof r.query&&(r.query=Object.fromEntries(new URLSearchParams(r.query)));let{originalRequest:m=null}=e,g=null==m?void 0:m.headers["x-forwarded-proto"],y=g?"https"===g:!!(null==m||null==(n=m.socket)?void 0:n.encrypted);e.headers["x-forwarded-host"]??=e.headers.host??this.hostname,e.headers["x-forwarded-port"]??=this.port?this.port.toString():y?"443":"80",e.headers["x-forwarded-proto"]??=y?"https":"http",e.headers["x-forwarded-for"]??=null==m||null==(i=m.socket)?void 0:i.remoteAddress,this.attachRequestMeta(e,r);let v=await this.handleRSCRequest(e,t,r);if(v)return;let b=null==(s=this.i18nProvider)?void 0:s.detectDomainLocale(rv(r,e.headers)),E=(null==b?void 0:b.defaultLocale)||(null==(a=this.nextConfig.i18n)?void 0:a.defaultLocale);e4(e,"defaultLocale",E);let _=tD(e.url.replace(/^\/+/,"/")),x=rx(_.pathname,{nextConfig:this.nextConfig,i18nProvider:this.i18nProvider});_.pathname=x.pathname,x.basePath&&(e.url=r_(e.url,this.nextConfig.basePath));let w="string"==typeof e.headers[tl];if(w)try{this.enabledDirectories.app&&(e.url.match(/^\/index($|\?)/)&&(e.url=e.url.replace(/^\/index/,"/")),r.pathname="/index"===r.pathname?"/":r.pathname);let{pathname:n}=new URL(function(e){let t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return new TextDecoder("utf-8").decode(t)}(e.headers[tl]),"http://localhost"),{pathname:i}=new URL(e.url,"http://localhost");if((null==(o=this.normalizers.data)?void 0:o.match(i))&&e4(e,"isNextDataReq",!0),this.isAppPPREnabled&&"1"===e.headers["next-resume"]&&"POST"===e.method){let r=this.nextConfig.experimental.maxPostponedStateSize??tJ,n=tQ(this.nextConfig.experimental.maxPostponedStateSize);if(void 0===n)throw Object.defineProperty(Error('maxPostponedStateSize must be a valid number (bytes) or filesize format string (e.g., "5mb")'),"__NEXT_ERROR_CODE",{value:"E977",enumerable:!1,configurable:!0});let i=[],s=0;for await(let a of e.body){if((s+=Buffer.byteLength(a))>n){t.statusCode=413;let e=`Postponed state exceeded ${r} limit. To configure the limit, see: https://nextjs.org/docs/app/api-reference/config/next-config-js/max-postponed-state-size`;t.body(e).send();return}i.push(a)}let a=Buffer.concat(i).toString("utf8");e4(e,"postponed",a)}if(e1(e,"isNextDataReq")&&e1(e,"postponed")){t.statusCode=422,t.send();return}n=this.normalize(n);let s=this.stripNextDataPath(i);n=rU(n);let a=null==(l=this.i18nProvider)?void 0:l.analyze(n,{defaultLocale:E});a&&(e4(e,"locale",a.detectedLocale),a.inferredFromDefault?e4(e,"localeInferredFromDefault",!0):e2(e,"localeInferredFromDefault"));let d=n,h=re(d),p={params:!1,hasValidParams:!1},f=await this.matchers.match(d,{i18n:a});!h&&f&&(d=f.definition.pathname,void 0!==f.params&&(h=!0,p.params=f.params,p.hasValidParams=!0)),a&&(n=a.pathname);let m=function({page:e,i18n:t,basePath:r,rewrites:n,pageIsDynamic:i,trailingSlash:s,caseSensitive:a}){let o,l,c;if(i){var u;let t,r;u={prefixRouteKeys:!1},r=(t=function(e,t,r,n,i,s={names:{},intercepted:{}}){let a,o=(a=0,()=>{let e="",t=++a;for(;t>0;)e+=String.fromCharCode(97+(t-1)%26),t=Math.floor((t-1)/26);return e}),l={},c=[],u=[];for(let a of(s=structuredClone(s),rp(e).slice(1).split("/"))){let e,d=t6.some(e=>a.startsWith(e)),h=a.match(rV),p=d?h?.[1]:void 0;if(p&&h?.[2]?(e=t?to:void 0,s.intercepted[h[2]]=p):e=h?.[2]&&s.intercepted[h[2]]?t?to:void 0:t?ta:void 0,p&&h&&h[2]){let{key:t,pattern:r,cleanedKey:n,repeat:a,optional:d}=rJ({getSafeRouteKey:o,interceptionMarker:p,segment:h[2],routeKeys:l,keyPrefix:e,backreferenceDuplicateKeys:i});c.push(r),u.push(`/${h[1]}:${s.names[t]??n}${a?d?"*":"+":""}`),s.names[t]??=n}else if(h&&h[2]){n&&h[1]&&(c.push(`/${rG(h[1])}`),u.push(`/${h[1]}`));let{key:t,pattern:r,cleanedKey:a,repeat:d,optional:p}=rJ({getSafeRouteKey:o,segment:h[2],routeKeys:l,keyPrefix:e,backreferenceDuplicateKeys:i}),f=r;n&&h[1]&&(f=f.substring(1)),c.push(f),u.push(`/:${s.names[t]??a}${d?p?"*":"+":""}`),s.names[t]??=a}else c.push(`/${rG(a)}`),u.push(`/${a}`);r&&h&&h[3]&&(c.push(rG(h[3])),u.push(h[3]))}return{namedParameterizedRoute:c.join(""),routeKeys:l,pathToRegexpPattern:u.join(""),reference:s}}(e,u.prefixRouteKeys,u.includeSuffix??!1,u.includePrefix??!1,u.backreferenceDuplicateKeys??!1,u.reference)).namedParameterizedRoute,u.excludeOptionalTrailingSlash||(r+="(?:/)?"),c=(l=eZ(o={...rY(e,u),namedRegex:`^${r}$`,routeKeys:t.routeKeys,pathToRegexpPattern:t.pathToRegexpPattern,reference:t.reference}))(e)}return{handleRewrites:function(o,c){let u=structuredClone(c),d={},h=u.pathname,p=n=>{let c=rX(n.source+(s?"(/)?":""),{removeUnnamedParams:!0,strict:!0,sensitive:!!a});if(!u.pathname)return!1;let p=c(u.pathname);if((n.has||n.missing)&&p){let e=rZ(o,u.query,n.has,n.missing);e?Object.assign(p,e):p=!1}if(p){let{parsedDestination:s,destQuery:a}=function(e){let t,r,n=function(e){let t=e.destination;for(let n of Object.keys({...e.params,...e.query}))if(n){var r;r=t,t=r.replace(RegExp(`:${rG(n)}`,"g"),`__ESC_COLON_${n}`)}let n=tD(t),i=n.pathname;i&&(i=rQ(i));let s=n.href;s&&(s=rQ(s));let a=n.hostname;a&&(a=rQ(a));let o=n.hash;o&&(o=rQ(o));let l=n.search;l&&(l=rQ(l));let c=n.origin;return c&&(c=rQ(c)),{...n,pathname:i,hostname:a,href:s,hash:o,search:l,origin:c}}(e),{hostname:i,query:s,search:a}=n,o=n.pathname;n.hash&&(o=`${o}${n.hash}`);let l=[],c=[];for(let e of(eJ(o,c),c))l.push(e.name);if(i){let e=[];for(let t of(eJ(i,e),e))l.push(t.name)}let u=eQ(o,{validate:!1});for(let[r,n]of(i&&(t=eQ(i,{validate:!1})),Object.entries(s)))Array.isArray(n)?s[r]=n.map(t=>r0(rQ(t),e.params)):"string"==typeof n&&(s[r]=r0(rQ(n),e.params));let d=Object.keys(e.params).filter(e=>"nextInternalLocale"!==e);if(e.appendParamsToQuery&&!d.some(e=>l.includes(e)))for(let t of d)t in s||(s[t]=e.params[t]);if(t5(o))for(let t of o.split("/")){let r=t6.find(e=>t.startsWith(e));if(r){"(..)(..)"===r?(e.params["0"]="(..)",e.params["1"]="(..)"):e.params["0"]=r;break}}try{let[i,s]=(r=u(e.params)).split("#",2);t&&(n.hostname=t(e.params)),n.pathname=i,n.hash=`${s?"#":""}${s||""}`,n.search=a?r0(a,e.params):""}catch(e){if(e.message.match(/Expected .*? to not repeat, but got an array/))throw Object.defineProperty(Error("To use a multi-match in the destination you must add `*` at the end of the param name to signify it should repeat. https://nextjs.org/docs/messages/invalid-multi-match"),"__NEXT_ERROR_CODE",{value:"E329",enumerable:!1,configurable:!0});throw e}return n.query={...e.query,...n.query},{newUrl:r,destQuery:s,parsedDestination:n}}({appendParamsToQuery:!0,destination:n.destination,params:p,query:u.query});if(s.protocol)return!0;if(Object.assign(d,a,p),Object.assign(u.query,s.query),delete s.query,Object.assign(u,s),!(h=u.pathname))return!1;if(r&&(h=h.replace(RegExp(`^${r}`),"")||"/"),t){let e=rE(h,t.locales);h=e.pathname,u.query.nextInternalLocale=e.detectedLocale||p.nextInternalLocale}if(h===e)return!0;if(i&&l){let e=l(h);if(e)return u.query={...u.query,...e},!0}}return!1};for(let e of n.beforeFiles||[])p(e);if(h!==e){let t,r=!1;for(let e of n.afterFiles||[])if(r=p(e))break;if(!r&&!((t=rp(h||""))===rp(e)||(null==l?void 0:l(t)))){for(let e of n.fallback||[])if(r=p(e))break}}return{rewriteParams:d,rewrittenParsedUrl:u}},defaultRouteRegex:o,dynamicRouteMatcher:l,defaultRouteMatches:c,normalizeQueryParams:function(e,t){for(let[r,n]of(delete e.nextInternalLocale,Object.entries(e))){let i=rh(r);i&&(delete e[r],t.add(i),void 0!==n&&(e[i]=Array.isArray(n)?n.map(e=>r1(e)):r1(n)))}},getParamsFromRouteMatches:function(e){if(!o)return null;let{groups:t,routeKeys:r}=o,n=eZ({re:{exec:e=>{let n=Object.fromEntries(new URLSearchParams(e));for(let[e,t]of Object.entries(n)){let r=rh(e);r&&(n[r]=t,delete n[e])}let i={};for(let e of Object.keys(r)){let s=r[e];if(!s)continue;let a=t[s],o=n[e];if(!a.optional&&!o)return null;i[a.pos]=o}return i}},groups:t})(e);return n||null},normalizeDynamicRouteParams:(e,t)=>{if(!o||!c)return{params:{},hasValidParams:!1};var r=o,n=c;let i={};for(let s of Object.keys(r.groups)){let a=e[s];"string"==typeof a?a=t8(a):Array.isArray(a)&&(a=a.map(t8));let o=n[s],l=r.groups[s].optional;if((Array.isArray(o)?o.some(e=>Array.isArray(a)?a.some(t=>t.includes(e)):null==a?void 0:a.includes(e)):null==a?void 0:a.includes(o))||void 0===a&&!(l&&t))return{params:{},hasValidParams:!1};l&&(!a||Array.isArray(a)&&1===a.length&&("index"===a[0]||a[0]===`[[...${s}]]`)||"index"===a||a===`[[...${s}]]`)&&(a=void 0,delete e[s]),a&&"string"==typeof a&&r.groups[s].repeat&&(a=a.split("/")),a&&(i[s]=a)}return{params:i,hasValidParams:!0}},normalizeCdnUrl:(e,t)=>(function(e,t){let r=function(e){let t=function(e){let t;try{t=new URL(e,"http://n")}catch{}return t}(e);if(!t)return;let r={};for(let e of t.searchParams.keys()){let n=t.searchParams.getAll(e);r[e]=n.length>1?n:n[0]}return{query:r,hash:t.hash,search:t.search,path:t.pathname,pathname:t.pathname,href:`${t.pathname}${t.search}${t.hash}`,host:"",hostname:"",auth:"",protocol:"",slashes:null,port:""}}(e.url);if(!r)return e.url;delete r.search,r2(r.query,t),e.url=function(e){let{auth:t,hostname:r}=e,n=e.protocol||"",i=e.pathname||"",s=e.hash||"",a=e.query||"",o=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?o=t+e.host:r&&(o=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(o+=":"+e.port)),a&&"object"==typeof a&&(a=String(function(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,tA(e));else t.set(r,tA(n));return t}(a)));let l=e.search||a&&`?${a}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||r4.test(n))&&!1!==o?(o="//"+(o||""),i&&"/"!==i[0]&&(i="/"+i)):o||(o=""),s&&"#"!==s[0]&&(s="#"+s),l&&"?"!==l[0]&&(l="?"+l),i=i.replace(/[?#]/g,encodeURIComponent),l=l.replace("#","%23"),`${n}${o}${i}${l}${s}`}(r)})(e,t),interpolateDynamicPath:(e,t)=>(function(e,t,r){if(!r)return e;for(let n of Object.keys(r.groups)){let i,{optional:s,repeat:a}=r.groups[n],o=`[${a?"...":""}${n}]`;s&&(o=`[${o}]`);let l=t[n];((i=Array.isArray(l)?l.map(e=>e&&encodeURIComponent(e)).join("/"):l?encodeURIComponent(l):"")||s)&&(e=e.replaceAll(o,i))}return e})(e,t,o),filterInternalQuery:(e,t)=>r2(e,t)}}({pageIsDynamic:h,page:d,i18n:this.nextConfig.i18n,basePath:this.nextConfig.basePath,rewrites:(null==(c=this.getRoutesManifest())?void 0:c.rewrites)||{beforeFiles:[],afterFiles:[],fallback:[]},caseSensitive:!!this.nextConfig.experimental.caseSensitiveRoutes});E&&!x.locale&&(r.pathname=`/${E}${r.pathname}`);let g={...r.query},y=r.pathname,{rewriteParams:b,rewrittenParsedUrl:w}=m.handleRewrites(e,r),R=Object.keys(b),C={...w.query},P=y!==w.pathname;P&&w.pathname&&e4(e,"rewrittenPathname",w.pathname);let O=new Set;for(let[e,t]of Object.entries(r.query)){let n=rh(e);n&&(delete r.query[e],O.add(n),void 0!==t&&(C[n]=Array.isArray(t)?t.map(e=>r1(e)):r1(t)))}if(h){let t={};if(p.hasValidParams||(p=m.normalizeDynamicRouteParams(C,!1)),!p.hasValidParams&&!re(s)){let e=null==m.dynamicRouteMatcher?void 0:m.dynamicRouteMatcher.call(m,s);e&&(m.normalizeDynamicRouteParams(e,!1),Object.assign(p.params,e),p.hasValidParams=!0)}if("/index"!==n&&!p.hasValidParams&&!re(n)){let e=null==m.dynamicRouteMatcher?void 0:m.dynamicRouteMatcher.call(m,n);if(e){let r=m.normalizeDynamicRouteParams(e,!1);r.hasValidParams&&(Object.assign(t,e),p=r)}}p.hasValidParams&&(t=p.params);let r=e.headers["x-now-route-matches"];if("string"==typeof r&&r&&re(n)&&!p.hasValidParams){let e=m.getParamsFromRouteMatches(r);e&&(p=m.normalizeDynamicRouteParams(e,!0)).hasValidParams&&(t=p.params)}if(!p.hasValidParams&&(p=m.normalizeDynamicRouteParams(C,!0)).hasValidParams&&(t=p.params),m.defaultRouteMatches&&s===d&&!p.hasValidParams&&(t=m.defaultRouteMatches,""===r&&e4(e,"renderFallbackShell",!0)),t){n=m.interpolateDynamicPath(d,t),e.url=m.interpolateDynamicPath(e.url,t);let r=e1(e,"segmentPrefetchRSCRequest");r&&re(r,!1)&&(r=m.interpolateDynamicPath(r,t),e.headers[r7]=r,e4(e,"segmentPrefetchRSCRequest",r))}}for(let t of((h||P)&&m.normalizeCdnUrl(e,[...R,...Object.keys((null==(u=m.defaultRouteRegex)?void 0:u.groups)||{})]),O))t in g||delete r.query[t];if(r.pathname=n,_.pathname=r.pathname,((null==f?void 0:f.definition.kind)===nj.PAGES||(null==f?void 0:f.definition.kind)===nj.PAGES_API)&&(r.query=C),v=await this.normalizeAndAttachMetadata(e,t,r))return}catch(r){if(r instanceof ez||r instanceof eU)return t.statusCode=400,this.renderError(null,e,t,"/_error",{});throw r}if(e4(e,"isLocaleDomain",!!b),x.locale&&(e.url=(0,D.format)(_),e4(e,"didStripLocale",!0)),!e1(e,"locale")&&(x.locale?e4(e,"locale",x.locale):E&&(e4(e,"locale",E),e4(e,"localeInferredFromDefault",!0))),!this.serverOptions.webServerConfig&&!e1(e,"incrementalCache")){let t=await this.getIncrementalCache({requestHeaders:Object.assign({},e.headers)});t.resetRequestCache(),e4(e,"incrementalCache",t),globalThis.__incrementalCache=t}e1(e,"serverComponentsHmrCache")||e4(e,"serverComponentsHmrCache",this.getServerComponentsHmrCache());let R=e1(e,"invokePath");if(!w&&R){let n=e1(e,"invokeStatus");if(n){let i=e1(e,"invokeQuery");i&&Object.assign(r.query,i),t.statusCode=n;let s=e1(e,"invokeError")||null;return this.renderError(s,e,t,"/_error",r.query)}let i=new URL(R||"/","http://n"),s=rx(i.pathname,{nextConfig:this.nextConfig,parseData:!1});s.locale&&e4(e,"locale",s.locale),r.pathname!==i.pathname&&(r.pathname=i.pathname,e4(e,"rewrittenPathname",s.pathname));let a=rE(r_(r.pathname,this.nextConfig.basePath||""),null==(d=this.nextConfig.i18n)?void 0:d.locales);for(let t of(a.detectedLocale&&e4(e,"locale",a.detectedLocale),r.pathname=a.pathname,Object.keys(r.query)))delete r.query[t];let o=e1(e,"invokeQuery");if(o&&Object.assign(r.query,o),v=await this.normalizeAndAttachMetadata(e,t,r))return;await this.handleCatchallRenderRequest(e,t,r);return}if(e1(e,"middlewareInvoke")){if((v=await this.normalizeAndAttachMetadata(e,t,r))||(v=await this.handleCatchallMiddlewareRequest(e,t,r)))return;let n=Error();throw n.result={response:new Response(null,{headers:{"x-middleware-next":"1"}})},n.bubble=!0,n}return!w&&x.basePath&&(r.pathname=r_(r.pathname,x.basePath)),t.statusCode=200,await this.run(e,t,r)}catch(r){if(r instanceof ic.NoFallbackError)throw r;if(r&&"object"==typeof r&&"ERR_INVALID_URL"===r.code||r instanceof ez||r instanceof eU)return t.statusCode=400,this.renderError(null,e,t,"/_error",{});throw r}}getRequestHandlerWithMetadata(e){let t=this.getRequestHandler();return(r,n,i)=>(r[e0]=e,t(r,n,i))}getRequestHandler(){return this.handleRequest.bind(this)}setAssetPrefix(e){this.nextConfig.assetPrefix=e?e.replace(/\/$/,""):""}async prepare(){if(!this.prepared)return this.instrumentation||(this.instrumentation=await this.loadInstrumentationModule()),null===this.preparedPromise&&(this.preparedPromise=this.prepareImpl().then(()=>{this.prepared=!0,this.preparedPromise=null})),this.preparedPromise}async prepareImpl(){}async loadInstrumentationModule(){}async close(){}getAppPathRoutes(){let e={};return Object.keys(this.appPathsManifest||{}).forEach(t=>{let r=t3(t);e[r]||(e[r]=[]),e[r].push(t)}),e}async run(e,t,r){return(0,ty.getTracer)().trace(tv.run,async()=>this.runImpl(e,t,r))}async runImpl(e,t,r){await this.handleCatchallRenderRequest(e,t,r)}async pipe(e,t){return(0,ty.getTracer)().trace(tv.pipe,async()=>this.pipeImpl(e,t))}async pipeImpl(e,t){let r,n=t.req.headers["user-agent"]||"",i={...t,renderOpts:{...this.renderOpts,supportsDynamicResponse:!this.renderOpts.botType,serveStreamingMetadata:(r=RegExp(this.nextConfig.htmlLimitedBots||rn,"i"),!(n&&r.test(n)))}},s=await e(i);if(null===s)return;let{req:a,res:o}=i,l=o.statusCode,{body:c}=s,{cacheControl:u}=s;if(!o.sent){let{generateEtags:e,poweredByHeader:t,dev:r}=this.renderOpts;r&&(o.setHeader("Cache-Control",this.nextConfig.experimental.devCacheControlNoCache?"no-cache, must-revalidate":"no-store, must-revalidate"),u=void 0),u&&void 0===u.expire&&(u.expire=this.nextConfig.expireTime),await this.sendRenderResult(a,o,{result:c,generateEtags:e,poweredByHeader:t,cacheControl:u}),o.statusCode=l}}async getStaticHTML(e,t){let r={...t,renderOpts:{...this.renderOpts,supportsDynamicResponse:!1}},n=await e(r);return null===n?null:n.body.toUnchunkedString()}async render(e,t,r,n={},i,s=!1){return(0,ty.getTracer)().trace(tv.render,async()=>this.renderImpl(e,t,r,n,i,s))}getWaitUntil(){let e,t=null==(e=globalThis[n2])?void 0:e.get();if(t)return t.waitUntil}getInternalWaitUntil(){}async renderImpl(e,t,r,n={},i,s=!1){var a;r.startsWith("/")||console.warn(`Cannot render page with path "${r}", did you mean "/${r}"?. See more info here: https://nextjs.org/docs/messages/render-no-starting-slash`),this.serverOptions.customServer&&"/index"===r&&!await this.hasPage("/index")&&(r="/");let o=e.headers["user-agent"]||"";return this.renderOpts.botType=function(e){return rr.test(e)?"dom":rt.test(e)?"html":void 0}(o),(a=r,e7.includes(a))?this.render404(e,t,i):this.pipe(e=>this.renderToResponse(e),{req:e,res:t,pathname:r,query:n})}async getStaticPaths({pathname:e}){var t;return{staticPaths:void 0,fallbackMode:function(e){if("string"==typeof e)return"PRERENDER";if(null===e)return"BLOCKING_STATIC_RENDER";if(!1===e)return"NOT_FOUND";if(void 0!==e)throw Object.defineProperty(Error(`Invalid fallback option: ${e}. Fallback option must be a string, null, undefined, or false.`),"__NEXT_ERROR_CODE",{value:"E285",enumerable:!1,configurable:!0})}(null==(t=this.getPrerenderManifest().dynamicRoutes[e])?void 0:t.fallback)}}async renderToResponseWithComponents(e,t){return(0,ty.getTracer)().trace(tv.renderToResponseWithComponents,async()=>this.renderToResponseWithComponentsImpl(e,t))}pathCouldBeIntercepted(e){return t5(e)||this.interceptionRoutePatterns.some(t=>t.test(e))}setVaryHeader(e,t,r,n){let i=`rsc, ${r5}, ${r9}, ${r7}`,s=e1(e,"isRSCRequest")??!1,a=!1;r&&this.pathCouldBeIntercepted(n)?(t.appendHeader("vary",`${i}, ${ne}`),a=!0):(r||s)&&t.appendHeader("vary",i),a||delete e.headers[ne]}async renderToResponseWithComponentsImpl({req:e,res:t,pathname:r,renderOpts:n},{components:i,query:s}){var a,o,l,c,u,d,h;let p,f,m,g,y,v,b;r===e3&&(r="/404");let E="/_error"===r,_="/404"===r||E&&404===t.statusCode,x="/500"===r||E&&500===t.statusCode,w=!0===i.isAppPath,R=!!i.getServerSideProps,C=(e.headers instanceof Headers?(m=e.headers.get(r6)??null,g=e.headers.get("content-type")):(m=e.headers[r6]??null,g=e.headers["content-type"]??null),y="POST"===e.method&&"application/x-www-form-urlencoded"===g,v=!!("POST"===e.method&&(null==g?void 0:g.startsWith("multipart/form-data"))),b=void 0!==m&&"string"==typeof m&&"POST"===e.method,{actionId:m,isURLEncodedAction:y,isMultipartAction:v,isFetchAction:b,isPossibleServerAction:!!(b||y||v)}).isPossibleServerAction,P=!!i.getStaticProps,O=e1(e,"isRSCRequest")??!1,T=tD(e.url||"").pathname||"/",S=e1(e,"rewrittenPathname")||T;this.setVaryHeader(e,t,w,S);let N=this.getPrerenderManifest();(null==p?void 0:p.includes(S))||e.headers["x-now-route-matches"]?P=!0:P||=!!N.routes[n4(r)];let j=!!(e1(e,"isNextDataReq")||e.headers["x-nextjs-data"]&&this.serverOptions.webServerConfig)&&(P||R);if(!P&&e.headers["x-middleware-prefetch"]&&!(_||"/_error"===r))return t.setHeader(tl,r),t.setHeader("x-middleware-skip","1"),t.setHeader("cache-control","private, no-cache, no-store, max-age=0, must-revalidate"),t.body("{}").send(),null;P&&e.headers[tl]&&e.url.startsWith("/_next/data")&&(e.url=this.stripNextDataPath(e.url));let A=e1(e,"locale");e.headers["x-nextjs-data"]&&(!t.statusCode||200===t.statusCode)&&t.setHeader("x-nextjs-matched-path",`${A?`/${A}`:""}${r}`),i.routeModule&&(f=i.routeModule);let D=this.isAppPPREnabled&&void 0!==f&&f.definition.kind===nj.APP_PAGE,$="1"===process.env.__NEXT_EXPERIMENTAL_STATIC_SHELL_DEBUGGING&&void 0!==s.__nextppronly&&D,k=D&&((null==(a=N.routes[r]??N.dynamicRoutes[r])?void 0:a.renderingMode)==="PARTIALLY_STATIC"||$&&!0===this.experimentalTestProxy)?e1(e,"postponed"):void 0;if(!_||j||O||(t.statusCode=404),te.includes(r)&&(t.statusCode=parseInt(r.slice(1),10)),!C&&!k&&!_&&!x&&"/_error"!==r&&"HEAD"!==e.method&&"GET"!==e.method&&("string"==typeof i.Component||P))return t.statusCode=405,t.setHeader("Allow",["GET","HEAD"]),t.body("Method Not Allowed").send(),null;if("string"==typeof i.Component)return{body:rF.fromStatic(i.Component,ts)};if(!0===n.supportsDynamicResponse){let t=(d=u=e.headers["user-agent"]||"",rr.test(d)||rt.test(u)),r="function"!=typeof(null==(o=i.Document)?void 0:o.getInitialProps)||"__NEXT_BUILTIN_DOCUMENT__"in i.Document;n.supportsDynamicResponse=!P&&!t&&r}if(!j&&w&&n.dev&&(n.supportsDynamicResponse=!0),P&&e.headers[tl]&&(S=T),T=rp(T),S=rp(S),this.localeNormalizer&&(S=this.localeNormalizer.normalize(S)),j&&(S=this.stripNextDataPath(S),T=this.stripNextDataPath(T)),(await this.getIncrementalCache({requestHeaders:Object.assign({},e.headers)})).resetRequestCache(),(null==f?void 0:f.isDev)&&re(r)&&(i.getStaticPaths||w)){let t;n.dev&&(t=process.hrtime.bigint());let s=await this.getStaticPaths({pathname:r,urlPathname:T,requestHeaders:e.headers,page:i.page,isAppPath:w});if(n.dev&&t&&(null==(l=s.staticPaths)?void 0:l.length)&&e4(e,"devGenerateStaticParamsDuration",process.hrtime.bigint()-t),w&&this.nextConfig.cacheComponents&&(null==(c=s.prerenderedRoutes)?void 0:c.length)){let t=null;for(let e of s.prerenderedRoutes){let r=e.fallbackRouteParams;if(!r||0===r.length){t=null;break}(null===t||r.length<t.length)&&(t=r)}t&&e4(e,"devFallbackParams",function(e){if(0===e.length)return null;let t=Math.random().toString(16).slice(2),r=new Map;for(let{paramName:n,paramType:i}of e)r.set(n,[`%%drp:${n}:${t}%%`,iu[i]]);return r}(t))}}if("OPTIONS"===e.method&&!_&&(!f||f.definition.kind!==nj.APP_ROUTE))return await nY(e,t,new Response(null,{status:400})),null;let I=e.originalRequest,M=t.originalResponse,L=tD(e1(e,"initURL")||e.url),q=L.pathname||"/";for(let e of[this.normalizers.segmentPrefetchRSC,this.normalizers.rsc])(null==e?void 0:e.match(q))&&(q=e.normalize(q));return E||(I.url=`${q}${L.search||""}`),h=e1(e),I[e0]=h,e4(I,"distDir",this.distDir),e4(I,"query",s),e4(I,"params",n.params),e4(I,"minimalMode",!0),n.err&&e4(I,"invokeError",n.err),await i.ComponentMod.handler(I,M,{waitUntil:this.getWaitUntil()}),null}stripNextDataPath(e,t=!0){return(e.includes(this.buildId)&&(e=rU(e.substring(e.indexOf(this.buildId)+this.buildId.length).replace(/\.json$/,""))),this.localeNormalizer&&t)?this.localeNormalizer.normalize(e):e}getOriginalAppPaths(e){if(this.enabledDirectories.app){var t;let r=null==(t=this.appPathRoutes)?void 0:t[e];return r||null}return null}async renderPageComponent(e,t){var r;let{query:n,pathname:i}=e,s=this.getOriginalAppPaths(i),a=Array.isArray(s),o=i;a&&(o=s[s.length-1]);let l=await this.findPageComponents({locale:e1(e.req,"locale"),page:o,query:n,params:e.renderOpts.params||{},isAppPath:a,sriEnabled:!!(null==(r=this.nextConfig.experimental.sri)?void 0:r.algorithm),appPaths:s,shouldEnsure:!1});if(l){(0,ty.getTracer)().setRootSpanAttribute("next.route",i);try{return await this.renderToResponseWithComponents(e,l)}catch(r){let e=r instanceof ic.NoFallbackError;if(!e||e&&t)throw r}}return!1}async renderToResponse(e){return(0,ty.getTracer)().trace(tv.renderToResponse,{spanName:"rendering page",attributes:{"next.route":e.pathname}},async()=>this.renderToResponseImpl(e))}async renderToResponseImpl(e){var t;let{req:r,res:n,query:i,pathname:s}=e,a=e1(e.req,"bubbleNoFallback")??!1;delete i[nr];let o={i18n:null==(t=this.i18nProvider)?void 0:t.fromRequest(r,s)},l=e1(e.req,"match"),c=!0;e1(e.req,"invokeOutput"),(null==l?void 0:l.definition.page.includes("/@"))&&(c=!1);try{for await(let t of c&&l?[l]:this.matchers.matchAll(s,o)){let r=await this.renderPageComponent({...e,pathname:t.definition.pathname,renderOpts:{...e.renderOpts,params:t.params}},a);if(!1!==r)return r}if(this.serverOptions.webServerConfig){e.pathname=this.serverOptions.webServerConfig.page;let t=await this.renderPageComponent(e,a);if(!1!==t)return t}}catch(i){let t=r8(i);if(i instanceof eW)throw console.error("Invariant: failed to load static page",JSON.stringify({page:s,url:e.req.url,matchedPath:e.req.headers[tl],initUrl:e1(e.req,"initURL"),didRewrite:!!e1(e.req,"rewrittenPathname"),rewrittenPathname:e1(e.req,"rewrittenPathname")},null,2)),t;if(t instanceof ic.NoFallbackError&&a)throw t;if(t instanceof ez||t instanceof eU)return n.statusCode=400,await this.renderErrorToResponse(e,t);n.statusCode=500,await this.hasPage("/500")&&(e4(e.req,"customErrorRender",!0),await this.renderErrorToResponse(e,t),e2(e.req,"customErrorRender"));let r=t instanceof id;if(!r)throw r3(t)&&(t.page=s),t;return await this.renderErrorToResponse(e,r?t.innerError:t)}if(await this.getMiddleware()&&e.req.headers["x-nextjs-data"]&&(!n.statusCode||200===n.statusCode||404===n.statusCode)){let e=e1(r,"locale");return n.setHeader("x-nextjs-matched-path",`${e?`/${e}`:""}${s}`),n.statusCode=200,n.setHeader("Content-Type","application/json; charset=utf-8"),n.body("{}"),n.send(),null}return n.statusCode=404,this.renderErrorToResponse(e,null)}async renderToHTML(e,t,r,n={}){return(0,ty.getTracer)().trace(tv.renderToHTML,async()=>this.renderToHTMLImpl(e,t,r,n))}async renderToHTMLImpl(e,t,r,n={}){return this.getStaticHTML(e=>this.renderToResponse(e),{req:e,res:t,pathname:r,query:n})}async renderError(e,t,r,n,i={},s=!0){return(0,ty.getTracer)().trace(tv.renderError,async()=>this.renderErrorImpl(e,t,r,n,i,s))}async renderErrorImpl(e,t,r,n,i={},s=!0){return s&&r.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),this.pipe(async t=>{let n=await this.renderErrorToResponse(t,e);if(500===r.statusCode)throw e;return n},{req:t,res:r,pathname:n,query:i})}async renderErrorToResponse(e,t){return(0,ty.getTracer)().trace(tv.renderErrorToResponse,async()=>this.renderErrorToResponseImpl(e,t))}async renderErrorToResponseImpl(e,t){let{res:r,query:n}=e;try{let i=null,s=404===r.statusCode,a=this.enabledDirectories.app;s&&(a&&(i=await this.findPageComponents({locale:e1(e.req,"locale"),page:e8,query:n,params:{},isAppPath:!0,shouldEnsure:!0,url:e.req.url})),!i&&await this.hasPage("/404")&&(i=await this.findPageComponents({locale:e1(e.req,"locale"),page:"/404",query:n,params:{},isAppPath:!1,shouldEnsure:!0,url:e.req.url})));let o=`/${r.statusCode}`;if(!e1(e.req,"customErrorRender")&&!i&&te.includes(o)&&(!i&&a&&(i=await this.findPageComponents({locale:e1(e.req,"locale"),page:o,query:n,params:{},isAppPath:!0,shouldEnsure:!0,url:e.req.url})),i=await this.findPageComponents({locale:e1(e.req,"locale"),page:o,query:n,params:{},isAppPath:!1,shouldEnsure:!0,url:e.req.url})),i||(i=await this.findPageComponents({locale:e1(e.req,"locale"),page:"/_error",query:n,params:{},isAppPath:!1,shouldEnsure:!0,url:e.req.url}),o="/_error"),!i)throw new id(Object.defineProperty(Error("missing required error components"),"__NEXT_ERROR_CODE",{value:"E60",enumerable:!1,configurable:!0}));i.components.routeModule?e4(e.req,"match",{definition:i.components.routeModule.definition,params:void 0}):e2(e.req,"match");try{return await this.renderToResponseWithComponents({...e,pathname:o,renderOpts:{...e.renderOpts,err:t}},i)}catch(e){if(e instanceof ic.NoFallbackError)throw Object.defineProperty(Error("invariant: failed to render error page"),"__NEXT_ERROR_CODE",{value:"E55",enumerable:!1,configurable:!0});throw e}}catch(a){let t=r8(a),i=t instanceof id;i||this.logError(t),r.statusCode=500;let s=await this.getFallbackErrorComponents(e.req.url);if(s)return e4(e.req,"match",{definition:s.routeModule.definition,params:void 0}),this.renderToResponseWithComponents({...e,pathname:"/_error",renderOpts:{...e.renderOpts,err:i?t.innerError:t}},{query:n,components:s});return{body:rF.fromStatic("Internal Server Error","text/plain")}}}async renderErrorToHTML(e,t,r,n,i={}){return this.getStaticHTML(t=>this.renderErrorToResponse(t,e),{req:t,res:r,pathname:n,query:i})}async render404(e,t,r,n=!0){let{pathname:i,query:s}=r||tD(e.url);return this.nextConfig.i18n&&(e1(e,"locale")||e4(e,"locale",this.nextConfig.i18n.defaultLocale),e4(e,"defaultLocale",this.nextConfig.i18n.defaultLocale)),t.statusCode=404,this.renderError(null,e,t,i,s,n)}}let ip=require("next/dist/server/load-manifest.external.js"),im=new M(1e3);function ig(e,t,r,n){let i,s=`${e}:${t}:${r}:${n}`,a=null==im?void 0:im.get(s);if(a)return a;let o=A().join(t,e9);n&&(i=(0,ip.loadManifest)(A().join(o,e5),!0));let l=(0,ip.loadManifest)(A().join(o,e6),!0);try{e=rU(nh(e))}catch(t){throw console.error(t),new eX(e)}let c=t=>{let n=t[e];if(!t[n]&&r){let i={};for(let e of Object.keys(t))i[rE(e,r).pathname]=l[e];n=i[e]}return n};return(i&&(a=c(i)),a||(a=c(l)),a)?(A().isAbsolute(a)||(a=A().join(o,a)),null==im||im.set(s,a),a):(null==im||im.set(s,null),null)}function iy(e,t,r,n){let i=ig(e,t,r,n);if(!i)throw new eX(e);return i}async function iv(e,t,r){let n=iy(e,t,void 0,r);return n.endsWith(".html")?eu.promises.readFile(n,"utf8").catch(t=>{throw new eW(e,t.message)}):require(n)}function ib(e){return e.default||e}async function iE(e){return new Promise(t=>setTimeout(t,e))}let i_=Symbol.for("next.server.manifests"),ix=globalThis;async function iw(e,t=3){for(;;)try{return(0,ip.loadManifest)(e)}catch(e){if(--t<=0)throw e;await iE(100)}}async function iR(e,t=3){try{return await iw(e,t)}catch(e){return}}async function iC(e,t=3){for(;;)try{return(0,ip.evalManifest)(e)}catch(e){if(--t<=0)throw e;await iE(100)}}async function iP(e,t,r){try{return(await iC(e,r)).__RSC_MANIFEST[t]}catch(e){return}}async function iO({distDir:e,page:t,isAppPath:r,isDev:n,sriEnabled:i,needsManifestsForLegacyReasons:s}){let a={},o={};if(r||([a,o]=await Promise.all([iv("/_document",e,!1),iv("/_app",e,!1)])),s){let s,l,c=n?3:1;s=(0,j.join)(e,"react-loadable-manifest.json");let u=(l=t.replace(/\/route$/,""),!(ng(t)&&function(e,t,r){if(!e||e.length<2)return!1;let n=rz(e),i=!!(nx.test(n)||nw.test(n)||nR.test(n)||nC.test(n)||nP.test(n))||(!!n.includes("robots")||!!n.includes("manifest")||!!n.includes("sitemap")||!!n.includes("icon")||!!n.includes("apple-icon")||!!n.includes("opengraph-image")||!!n.includes("twitter-image")||!!n.includes("favicon"))&&null;if(null!==i)return i;let s=function(e,t){let r=`${e.join(",")}|${t}`,n=nO.get(r);if(n)return n;let i=t?"$":"?$",s="\\d?"+(t?"":"(-\\w{6})?"),a=e.length>0?[...e,"txt"]:["txt"],o=e.length>0?[...e,"webmanifest","json"]:["webmanifest","json"],l=[RegExp(`^[\\\\/]robots${n_(a,null)}${i}`),RegExp(`^[\\\\/]manifest${n_(o,null)}${i}`),RegExp(`[\\\\/]sitemap${n_(["xml"],e)}${i}`),RegExp(`[\\\\/]icon${s}${n_(ny,e)}${i}`),RegExp(`[\\\\/]apple-icon${s}${n_(nv,e)}${i}`),RegExp(`[\\\\/]opengraph-image${s}${n_(nb,e)}${i}`),RegExp(`[\\\\/]twitter-image${s}${n_(nE,e)}${i}`)];return nO.set(r,l),l}(t,r);for(let e=0;e<s.length;e++)if(s[e].test(n))return!0;return!1}(l,[],!0))||"/robots.txt"===l||"/manifest.webmanifest"===l||!!l.endsWith("/sitemap.xml")),[d,h,p,f,m,g]=await Promise.all([iw((0,j.join)(e,"build-manifest.json"),c),iR(s,c),r||0?void 0:iw((0,j.join)(e,"dynamic-css-manifest.json"),c).catch(()=>void 0),r&&u?iP((0,j.join)(e,"server","app",t.replace(/%5F/g,"_")+"_client-reference-manifest.js"),t.replace(/%5F/g,"_"),c):void 0,r?iw((0,j.join)(e,"server","server-reference-manifest.json"),c).catch(()=>null):null,i?iw((0,j.join)(e,"server","subresource-integrity-manifest.json")).catch(()=>void 0):void 0]);m&&f&&function({page:e,clientReferenceManifest:t,serverActionsManifest:r}){let n=ix[i_];if(n)n.clientReferenceManifestsPerRoute.set(t3(e),t),n.serverActionsManifest=r;else{let n,i=new Map([[t3(e),t]]),s=(n=new Map,new Proxy({},{get(e,t){let r=eS.workAsyncStorage.getStore();switch(t){case"moduleLoading":case"entryCSSFiles":case"entryJSFiles":{if(!r)throw Object.defineProperty(new ej(`Cannot access "${t}" without a work store.`),"__NEXT_ERROR_CODE",{value:"E952",enumerable:!1,configurable:!0});let e=i.get(r.route);if(!e)throw Object.defineProperty(new ej(`The client reference manifest for route "${r.route}" does not exist.`),"__NEXT_ERROR_CODE",{value:"E951",enumerable:!1,configurable:!0});return e[t]}case"clientModules":case"rscModuleMapping":case"edgeRscModuleMapping":case"ssrModuleMapping":case"edgeSSRModuleMapping":{let e=n.get(t);!e&&(e=new Proxy({},{get(e,r){let n=eS.workAsyncStorage.getStore();if(n){let e=i.get(n.route);if(null==e?void 0:e[t][r])return e[t][r]}else for(let e of i.values()){let n=e[t][r];if(void 0!==n)return n}}}),n.set(t,e));return e}default:throw Object.defineProperty(new ej(`This is a proxied client reference manifest. The property "${String(t)}" is not handled.`),"__NEXT_ERROR_CODE",{value:"E953",enumerable:!1,configurable:!0})}}}));ix[i_]={clientReferenceManifestsPerRoute:i,proxiedClientReferenceManifest:s,serverActionsManifest:r,serverModuleMap:new Proxy({},{get:(e,t)=>{var r,n,i;let s,a=null==(n=function(){let e=ix[i_];if(!e)throw Object.defineProperty(new ej("The manifests singleton was not initialized."),"__NEXT_ERROR_CODE",{value:"E950",enumerable:!1,configurable:!0});return e}().serverActionsManifest.node)||null==(r=n[t])?void 0:r.workers;if(!a)return;let o=eS.workAsyncStorage.getStore();if(!(s=o?a[ry(i=o.page,"app")?i:"app"+i]:Object.values(a).at(0)))return;let{moduleId:l,async:c}=s;return{id:l,name:t,chunks:[],async:c}}})}}}({page:t,clientReferenceManifest:f,serverActionsManifest:m});let y=await iv(t,e,r),v=ib(y),b=ib(a),E=ib(o),{getServerSideProps:_,getStaticProps:x,getStaticPaths:w,routeModule:R}=y;return{App:E,Document:b,Component:v,buildManifest:d,subresourceIntegrityManifest:g,reactLoadableManifest:h||{},dynamicCssManifest:p,pageConfig:y.config||{},ComponentMod:y,getServerSideProps:_,getStaticProps:x,getStaticPaths:w,isAppPath:r,page:t,routeModule:R}}{let n=await iv(t,e,r),i=ib(n),s=ib(a),l=ib(o),{getServerSideProps:c,getStaticProps:u,getStaticPaths:d,routeModule:h}=n;return{App:l,Document:s,Component:i,pageConfig:n.config||{},ComponentMod:n,getServerSideProps:c,getStaticProps:u,getStaticPaths:d,isAppPath:r,page:t,routeModule:h}}}let iT=(0,ty.getTracer)().wrap(tb.loadComponents,iO);function iS(e){return(t,r,n)=>{for(let i of e)if(new RegExp(i.regexp).exec(t)){if((i.has||i.missing)&&!rZ(r,n,i.has,i.missing))continue;return!0}return!1}}var iN=r("../next-env/dist/index.js");let ij=require("stream");var iA=r.n(ij),iD=r("./dist/compiled/bytes/index.js"),i$=r.n(iD),ik=((C={}).APP_PAGE="APP_PAGE",C.APP_ROUTE="APP_ROUTE",C.PAGES="PAGES",C.FETCH="FETCH",C.REDIRECT="REDIRECT",C.IMAGE="IMAGE",C),iI=((P={}).APP_PAGE="APP_PAGE",P.APP_ROUTE="APP_ROUTE",P.PAGES="PAGES",P.FETCH="FETCH",P.IMAGE="IMAGE",P);function iM(e,t){if(!e)return t;let r=parseInt(e,10);return Number.isFinite(r)&&r>0?r:t}iM(process.env.NEXT_PRIVATE_RESPONSE_CACHE_TTL,1e4),iM(process.env.NEXT_PRIVATE_RESPONSE_CACHE_MAX_SIZE,150);class iL{constructor(e){this.fs=e,this.tasks=[]}findOrCreateTask(e){for(let t of this.tasks)if(t[0]===e)return t;let t=this.fs.mkdir(e);t.catch(()=>{});let r=[e,t,[]];return this.tasks.push(r),r}append(e,t){let r=this.findOrCreateTask(nu().dirname(e)),n=r[1].then(()=>this.fs.writeFile(e,t));n.catch(()=>{}),r[2].push(n)}wait(){return Promise.all(this.tasks.flatMap(e=>e[2]))}}let iq=require("next/dist/server/lib/incremental-cache/memory-cache.external.js");class iH{static #e=this.debug=!!process.env.NEXT_PRIVATE_DEBUG_CACHE;constructor(e){this.fs=e.fs,this.flushToDisk=e.flushToDisk,this.serverDistDir=e.serverDistDir,this.revalidatedTags=e.revalidatedTags,e.maxMemoryCacheSize?iH.memoryCache?iH.debug&&console.log("FileSystemCache: memory store already initialized"):(iH.debug&&console.log("FileSystemCache: using memory store for fetch cache"),iH.memoryCache=(0,iq.getMemoryCache)(e.maxMemoryCacheSize)):iH.debug&&console.log("FileSystemCache: not using memory store for fetch cache")}resetRequestCache(){}async revalidateTag(e,t){if(e="string"==typeof e?[e]:e,iH.debug&&console.log("FileSystemCache: revalidateTag",e,t),0===e.length)return;let r=Date.now();for(let n of e){let e=n9.tagsManifest.get(n)||{};if(t){let i={...e};i.stale=r,void 0!==t.expire&&(i.expired=r+1e3*t.expire),n9.tagsManifest.set(n,i)}else n9.tagsManifest.set(n,{...e,expired:r})}}async get(...e){var t,r,n,i,s,a,o,l,c;let[u,d]=e,{kind:h}=d,p=null==(t=iH.memoryCache)?void 0:t.get(u);if(iH.debug&&(h===iI.FETCH?console.log("FileSystemCache: get",u,d.tags,h,!!p):console.log("FileSystemCache: get",u,h,!!p)),!p)try{if(h===iI.APP_ROUTE){let e=this.getFilePath(`${u}.body`,iI.APP_ROUTE),t=await this.fs.readFile(e),{mtime:r}=await this.fs.stat(e),n=JSON.parse(await this.fs.readFile(e.replace(/\.body$/,tp),"utf8"));p={lastModified:r.getTime(),value:{kind:ik.APP_ROUTE,body:t,headers:n.headers,status:n.status}}}else{let e=this.getFilePath(h===iI.FETCH?u:`${u}.html`,h),t=await this.fs.readFile(e,"utf8"),{mtime:r}=await this.fs.stat(e);if(h===iI.FETCH){let{tags:e,fetchIdx:n,fetchUrl:i}=d;if(!this.flushToDisk)return null;let s=r.getTime(),l=JSON.parse(t);if(p={lastModified:s,value:l},(null==(a=p.value)?void 0:a.kind)===ik.FETCH){let t=null==(o=p.value)?void 0:o.tags;(null==e?void 0:e.every(e=>null==t?void 0:t.includes(e)))||(iH.debug&&console.log("FileSystemCache: tags vs storedTags mismatch",e,t),await this.set(u,p.value,{fetchCache:!0,tags:e,fetchIdx:n,fetchUrl:i}))}}else if(h===iI.APP_PAGE){let n,i,s;try{n=JSON.parse(await this.fs.readFile(e.replace(/\.html$/,tp),"utf8"))}catch{}if(null==n?void 0:n.segmentPaths){let e=new Map;i=e;let t=u+tc;await Promise.all(n.segmentPaths.map(async r=>{let n=this.getFilePath(t+r+tu,iI.APP_PAGE);try{e.set(r,await this.fs.readFile(n))}catch{}}))}d.isFallback||d.isRoutePPREnabled||(s=await this.fs.readFile(this.getFilePath(`${u}${td}`,iI.APP_PAGE))),p={lastModified:r.getTime(),value:{kind:ik.APP_PAGE,html:t,rscData:s,postponed:null==n?void 0:n.postponed,headers:null==n?void 0:n.headers,status:null==n?void 0:n.status,segmentData:i}}}else if(h===iI.PAGES){let e,n={};d.isFallback||(n=JSON.parse(await this.fs.readFile(this.getFilePath(`${u}${th}`,iI.PAGES),"utf8"))),p={lastModified:r.getTime(),value:{kind:ik.PAGES,html:t,pageData:n,headers:null==e?void 0:e.headers,status:null==e?void 0:e.status}}}else throw Object.defineProperty(Error(`Invariant: Unexpected route kind ${h} in file system cache.`),"__NEXT_ERROR_CODE",{value:"E445",enumerable:!1,configurable:!0})}p&&(null==(l=iH.memoryCache)||l.set(u,p))}catch{return null}if((null==p||null==(r=p.value)?void 0:r.kind)===ik.APP_PAGE||(null==p||null==(n=p.value)?void 0:n.kind)===ik.APP_ROUTE||(null==p||null==(i=p.value)?void 0:i.kind)===ik.PAGES){let e=null==(c=p.value.headers)?void 0:c[tf];if("string"==typeof e){let t=e.split(",");if(t.length>0&&(0,n9.areTagsExpired)(t,p.lastModified))return iH.debug&&console.log("FileSystemCache: expired tags",t),null}}else if((null==p||null==(s=p.value)?void 0:s.kind)===ik.FETCH){let e=d.kind===iI.FETCH?[...d.tags||[],...d.softTags||[]]:[];if(e.some(e=>this.revalidatedTags.includes(e)))return iH.debug&&console.log("FileSystemCache: was revalidated",e),null;if((0,n9.areTagsExpired)(e,p.lastModified))return iH.debug&&console.log("FileSystemCache: expired tags",e),null}return p??null}async set(e,t,r){var n;if(null==(n=iH.memoryCache)||n.set(e,{value:t,lastModified:Date.now()}),iH.debug&&console.log("FileSystemCache: set",e),!this.flushToDisk||!t)return;let i=new iL(this.fs);if(t.kind===ik.APP_ROUTE){let r=this.getFilePath(`${e}.body`,iI.APP_ROUTE);i.append(r,t.body);let n={headers:t.headers,status:t.status,postponed:void 0,segmentPaths:void 0};i.append(r.replace(/\.body$/,tp),JSON.stringify(n,null,2))}else if(t.kind===ik.PAGES||t.kind===ik.APP_PAGE){let n=t.kind===ik.APP_PAGE,s=this.getFilePath(`${e}.html`,n?iI.APP_PAGE:iI.PAGES);if(i.append(s,t.html),r.fetchCache||r.isFallback||r.isRoutePPREnabled||i.append(this.getFilePath(`${e}${n?td:th}`,n?iI.APP_PAGE:iI.PAGES),n?t.rscData:JSON.stringify(t.pageData)),(null==t?void 0:t.kind)===ik.APP_PAGE){let e;if(t.segmentData){e=[];let r=s.replace(/\.html$/,tc);for(let[n,s]of t.segmentData){e.push(n);let t=r+n+tu;i.append(t,s)}}let r={headers:t.headers,status:t.status,postponed:t.postponed,segmentPaths:e};i.append(s.replace(/\.html$/,tp),JSON.stringify(r))}}else if(t.kind===ik.FETCH){let n=this.getFilePath(e,iI.FETCH);i.append(n,JSON.stringify({...t,tags:r.fetchCache?r.tags:[]}))}await i.wait()}getFilePath(e,t){switch(t){case iI.FETCH:return nu().join(this.serverDistDir,"..","cache","fetch-cache",e);case iI.PAGES:return nu().join(this.serverDistDir,"pages",e);case iI.IMAGE:case iI.APP_PAGE:case iI.APP_ROUTE:return nu().join(this.serverDistDir,"app",e);default:throw Object.defineProperty(Error(`Unexpected file path kind: ${t}`),"__NEXT_ERROR_CODE",{value:"E479",enumerable:!1,configurable:!0})}}}let iF=require("next/dist/server/lib/incremental-cache/shared-cache-controls.external.js");class iz{static #e=this.debug=!!process.env.NEXT_PRIVATE_DEBUG_CACHE;constructor({fs:e,dev:t,flushToDisk:r,minimalMode:n,serverDistDir:i,requestHeaders:s,maxMemoryCacheSize:a,getPrerenderManifest:o,fetchCacheKeyPrefix:l,CurCacheHandler:c,allowedRevalidateHeaderKeys:u}){var d,h,p,f;this.locks=new Map,this.hasCustomCacheHandler=!!c;const m=Symbol.for("@next/cache-handlers"),g=globalThis;if(c)iz.debug&&console.log("IncrementalCache: using custom cache handler",c.name);else{const t=g[m];(null==t?void 0:t.FetchCache)?(c=t.FetchCache,iz.debug&&console.log("IncrementalCache: using global FetchCache cache handler")):e&&i&&(iz.debug&&console.log("IncrementalCache: using filesystem cache handler"),c=iH)}process.env.__NEXT_TEST_MAX_ISR_CACHE&&(a=parseInt(process.env.__NEXT_TEST_MAX_ISR_CACHE,10)),this.dev=t,this.disableForTestmode="true"===process.env.NEXT_PRIVATE_TEST_PROXY,this.minimalMode=n,this.requestHeaders=s,this.allowedRevalidateHeaderKeys=u,this.prerenderManifest=o(),this.cacheControls=new iF.SharedCacheControls(this.prerenderManifest),this.fetchCacheKeyPrefix=l;let y=[];s["x-prerender-revalidate"]===(null==(h=this.prerenderManifest)||null==(d=h.preview)?void 0:d.previewModeId)&&(this.isOnDemandRevalidate=!0),n&&(y=this.revalidatedTags=function(e,t){return"string"==typeof e[tm]&&e["x-next-revalidate-tag-token"]===t?e[tm].split(","):[]}(s,null==(f=this.prerenderManifest)||null==(p=f.preview)?void 0:p.previewModeId)),c&&(this.cacheHandler=new c({dev:t,fs:e,flushToDisk:r,serverDistDir:i,revalidatedTags:y,maxMemoryCacheSize:a,_requestHeaders:s,fetchCacheKeyPrefix:l}))}calculateRevalidate(e,t,r,n){if(r)return Math.floor(performance.timeOrigin+performance.now()-1e3);let i=this.cacheControls.get(n4(e)),s=i?i.revalidate:!n&&1;return"number"==typeof s?1e3*s+t:s}_getPathname(e,t){return t?e:nh(e)}resetRequestCache(){var e,t;null==(t=this.cacheHandler)||null==(e=t.resetRequestCache)||e.call(t)}async lock(e){for(;;){let t=this.locks.get(e);if(iz.debug&&console.log("IncrementalCache: lock get",e,!!t),!t)break;await t}let{resolve:t,promise:r}=new rk;return iz.debug&&console.log("IncrementalCache: successfully locked",e),this.locks.set(e,r),()=>{t(),this.locks.delete(e)}}async revalidateTag(e,t){var r;return null==(r=this.cacheHandler)?void 0:r.revalidateTag(e,t)}async generateCacheKey(e,t={}){let n=[],i=new TextEncoder,s=new TextDecoder;if(t.body)if(t.body instanceof Uint8Array)n.push(s.decode(t.body)),t._ogBody=t.body;else if("function"==typeof t.body.getReader){let e=t.body,r=[];try{await e.pipeTo(new WritableStream({write(e){"string"==typeof e?(r.push(i.encode(e)),n.push(e)):(r.push(e),n.push(s.decode(e,{stream:!0})))}})),n.push(s.decode());let a=r.reduce((e,t)=>e+t.length,0),o=new Uint8Array(a),l=0;for(let e of r)o.set(e,l),l+=e.length;t._ogBody=o}catch(e){console.error("Problem reading body",e)}}else if("function"==typeof t.body.keys){let e=t.body;for(let r of(t._ogBody=t.body,new Set([...e.keys()]))){let t=e.getAll(r);n.push(`${r}=${(await Promise.all(t.map(async e=>"string"==typeof e?e:await e.text()))).join(",")}`)}}else if("function"==typeof t.body.arrayBuffer){let e=t.body,r=await e.arrayBuffer();n.push(await e.text()),t._ogBody=new Blob([r],{type:e.type})}else"string"==typeof t.body&&(n.push(t.body),t._ogBody=t.body);let a="function"==typeof(t.headers||{}).keys?Object.fromEntries(t.headers):Object.assign({},t.headers);"traceparent"in a&&delete a.traceparent,"tracestate"in a&&delete a.tracestate;let o=JSON.stringify(["v3",this.fetchCacheKeyPrefix||"",e,t.method,a,t.mode,t.redirect,t.credentials,t.referrer,t.referrerPolicy,t.integrity,t.cache,n]);return r("crypto").createHash("sha256").update(o).digest("hex")}async get(e,t){var r,n,i,s,a,o,l;let c,u;if(t.kind===iI.FETCH){let r=B.workUnitAsyncStorage.getStore(),n=r?(0,B.getRenderResumeDataCache)(r):null;if(n){let r=n.fetch.get(e);if((null==r?void 0:r.kind)===ik.FETCH){let n=eS.workAsyncStorage.getStore();if(![...t.tags||[],...t.softTags||[]].some(e=>{var t,r;return(null==(t=this.revalidatedTags)?void 0:t.includes(e))||(null==n||null==(r=n.pendingRevalidatedTags)?void 0:r.some(t=>t.tag===e))}))return iz.debug&&console.log("IncrementalCache: rdc:hit",e),{isStale:!1,value:r};iz.debug&&console.log("IncrementalCache: rdc:revalidated-tag",e)}else iz.debug&&console.log("IncrementalCache: rdc:miss",e)}else iz.debug&&console.log("IncrementalCache: rdc:no-resume-data")}if(this.disableForTestmode||this.dev&&(t.kind!==iI.FETCH||"no-cache"===this.requestHeaders["cache-control"]))return null;e=this._getPathname(e,t.kind===iI.FETCH);let d=await (null==(r=this.cacheHandler)?void 0:r.get(e,t));if(t.kind===iI.FETCH){if(!d)return null;if((null==(i=d.value)?void 0:i.kind)!==ik.FETCH)throw Object.defineProperty(new ej(`Expected cached value for cache key ${JSON.stringify(e)} to be a "FETCH" kind, got ${JSON.stringify(null==(s=d.value)?void 0:s.kind)} instead.`),"__NEXT_ERROR_CODE",{value:"E653",enumerable:!1,configurable:!0});let r=eS.workAsyncStorage.getStore(),n=[...t.tags||[],...t.softTags||[]];if(n.some(e=>{var t,n;return(null==(t=this.revalidatedTags)?void 0:t.includes(e))||(null==r||null==(n=r.pendingRevalidatedTags)?void 0:n.some(t=>t.tag===e))}))return iz.debug&&console.log("IncrementalCache: expired tag",e),null;let a=B.workUnitAsyncStorage.getStore();if(a){let t=(0,B.getPrerenderResumeDataCache)(a);t&&(iz.debug&&console.log("IncrementalCache: rdc:set",e),t.fetch.set(e,d.value))}let o=t.revalidate||d.value.revalidate,l=(performance.timeOrigin+performance.now()-(d.lastModified||0))/1e3>o,c=d.value.data;return(0,n9.areTagsExpired)(n,d.lastModified)?null:((0,n9.areTagsStale)(n,d.lastModified)&&(l=!0),{isStale:l,value:{kind:ik.FETCH,data:c,revalidate:o}})}if((null==d||null==(n=d.value)?void 0:n.kind)===ik.FETCH)throw Object.defineProperty(new ej(`Expected cached value for cache key ${JSON.stringify(e)} not to be a ${JSON.stringify(t.kind)} kind, got "FETCH" instead.`),"__NEXT_ERROR_CODE",{value:"E652",enumerable:!1,configurable:!0});let h=null,p=this.cacheControls.get(n4(e));if((null==d?void 0:d.lastModified)===-1)c=-1,u=-31536e3;else{let r=performance.timeOrigin+performance.now(),n=(null==d?void 0:d.lastModified)||r;if(void 0===(c=!1!==(u=this.calculateRevalidate(e,n,this.dev??!1,t.isFallback))&&u<r||void 0)&&((null==d||null==(a=d.value)?void 0:a.kind)===ik.APP_PAGE||(null==d||null==(o=d.value)?void 0:o.kind)===ik.APP_ROUTE)){let e=null==(l=d.value.headers)?void 0:l[tf];if("string"==typeof e){let t=e.split(",");t.length>0&&((0,n9.areTagsExpired)(t,n)?c=-1:(0,n9.areTagsStale)(t,n)&&(c=!0))}}}return d&&(h={isStale:c,cacheControl:p,revalidateAfter:u,value:d.value}),!d&&this.prerenderManifest.notFoundRoutes.includes(e)&&(h={isStale:c,value:null,cacheControl:p,revalidateAfter:u},this.set(e,h.value,{...t,cacheControl:p})),h}async set(e,t,r){if((null==t?void 0:t.kind)===ik.FETCH){let r=B.workUnitAsyncStorage.getStore(),n=r?(0,B.getPrerenderResumeDataCache)(r):null;n&&(iz.debug&&console.log("IncrementalCache: rdc:set",e),n.fetch.set(e,t))}if(this.disableForTestmode||this.dev&&!r.fetchCache)return;e=this._getPathname(e,r.fetchCache);let n=JSON.stringify(t).length;if(r.fetchCache&&n>2097152&&!this.hasCustomCacheHandler&&!r.isImplicitBuildTimeCache){let t=`Failed to set Next.js data cache for ${r.fetchUrl||e}, items over 2MB can not be cached (${n} bytes)`;if(this.dev)throw Object.defineProperty(Error(t),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});console.warn(t);return}try{var i;!r.fetchCache&&r.cacheControl&&this.cacheControls.set(n4(e),r.cacheControl),await (null==(i=this.cacheHandler)?void 0:i.set(e,t,r))}catch(t){console.warn("Failed to update prerender cache for",e,t)}}}let iU=require("http"),iX=require("https"),iW={existsSync:ed().existsSync,readFile:ed().promises.readFile,readFileSync:ed().readFileSync,writeFile:(e,t)=>ed().promises.writeFile(e,t),mkdir:e=>ed().promises.mkdir(e,{recursive:!0}),stat:e=>ed().promises.stat(e)};class iB extends iA().Readable{constructor({url:e,headers:t,method:r,socket:n=null,readable:i}){super(),this.httpVersion="1.0",this.httpVersionMajor=1,this.httpVersionMinor=0,this.socket=new Proxy({},{get:(e,t)=>{if("encrypted"!==t&&"remoteAddress"!==t)throw Object.defineProperty(Error("Method not implemented"),"__NEXT_ERROR_CODE",{value:"E52",enumerable:!1,configurable:!0});if("remoteAddress"!==t)return!1}}),this.url=e,this.headers=t,this.method=r,i&&(this.bodyReadable=i,this.bodyReadable.on("end",()=>this.emit("end")),this.bodyReadable.on("close",()=>this.emit("close"))),n&&(this.socket=n)}get headersDistinct(){let e={};for(let[t,r]of Object.entries(this.headers))r&&(e[t]=Array.isArray(r)?r:[r]);return e}_read(e){if(this.bodyReadable)return this.bodyReadable._read(e);this.emit("end"),this.emit("close")}get connection(){return this.socket}get aborted(){throw Object.defineProperty(Error("Method not implemented"),"__NEXT_ERROR_CODE",{value:"E52",enumerable:!1,configurable:!0})}get complete(){throw Object.defineProperty(Error("Method not implemented"),"__NEXT_ERROR_CODE",{value:"E52",enumerable:!1,configurable:!0})}get trailers(){throw Object.defineProperty(Error("Method not implemented"),"__NEXT_ERROR_CODE",{value:"E52",enumerable:!1,configurable:!0})}get trailersDistinct(){throw Object.defineProperty(Error("Method not implemented"),"__NEXT_ERROR_CODE",{value:"E52",enumerable:!1,configurable:!0})}get rawTrailers(){throw Object.defineProperty(Error("Method not implemented"),"__NEXT_ERROR_CODE",{value:"E52",enumerable:!1,configurable:!0})}get rawHeaders(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}setTimeout(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}}class iG extends iA().Writable{constructor(e={}){super(),this.statusMessage="",this.finished=!1,this.headersSent=!1,this.buffers=[],this.statusCode=e.statusCode??200,this.socket=e.socket??null,this.headers=e.headers?function(e){let t=new Headers;for(let[r,n]of Object.entries(e))for(let e of Array.isArray(n)?n:[n])void 0!==e&&("number"==typeof e&&(e=e.toString()),t.append(r,e));return t}(e.headers):new Headers,this.headPromise=new Promise(e=>{this.headPromiseResolve=e}),this.hasStreamed=new Promise((e,t)=>{this.on("finish",()=>e(!0)),this.on("end",()=>e(!0)),this.on("error",e=>t(e))}).then(e=>(null==this.headPromiseResolve||this.headPromiseResolve.call(this),e)),e.resWriter&&(this.resWriter=e.resWriter)}appendHeader(e,t){for(let r of Array.isArray(t)?t:[t])this.headers.append(e,r);return this}get isSent(){return this.finished||this.headersSent}get connection(){return this.socket}write(e){return this.resWriter?this.resWriter(e):(this.buffers.push(Buffer.isBuffer(e)?e:Buffer.from(e)),!0)}end(){return this.finished=!0,super.end(...arguments)}_implicitHeader(){}_write(e,t,r){this.write(e),r()}writeHead(e,t,r){if(r||"string"==typeof t?"string"==typeof t&&t.length>0&&(this.statusMessage=t):r=t,r)if(Array.isArray(r))for(let e=0;e<r.length;e+=2)this.setHeader(r[e],r[e+1]);else for(let[e,t]of Object.entries(r))void 0!==t&&this.setHeader(e,t);return this.statusCode=e,this.headersSent=!0,null==this.headPromiseResolve||this.headPromiseResolve.call(this),this}hasHeader(e){return this.headers.has(e)}getHeader(e){return this.headers.get(e)??void 0}getHeaders(){return ru(this.headers)}getHeaderNames(){return Array.from(this.headers.keys())}setHeader(e,t){if(Array.isArray(t))for(let r of(this.headers.delete(e),t))this.headers.append(e,r);else"number"==typeof t?this.headers.set(e,t.toString()):this.headers.set(e,t);return this}removeHeader(e){this.headers.delete(e)}flushHeaders(){}get strictContentLength(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}writeEarlyHints(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}get req(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}assignSocket(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}detachSocket(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}writeContinue(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}writeProcessing(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}get upgrading(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}get chunkedEncoding(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}get shouldKeepAlive(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}get useChunkedEncodingByDefault(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}get sendDate(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}setTimeout(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}addTrailers(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}setHeaders(){throw Object.defineProperty(Error("Method not implemented."),"__NEXT_ERROR_CODE",{value:"E41",enumerable:!1,configurable:!0})}}let iV=(e,t)=>{let r=A().isAbsolute(t)?t:A().join(e,t);return(0,D.pathToFileURL)(r).toString()};function iK(e){var t,r;return(null==(r=e.has)||null==(t=r[0])?void 0:t.key)===ne}class iY{add(e){this.callbacks.push(e)}async runAll(){if(!this.callbacks.length)return;let e=this.callbacks;this.callbacks=[],await Promise.allSettled(e.map(async e=>e()))}constructor(){this.callbacks=[]}}let iJ=Symbol.for("react.postpone");function iQ(e){return"object"==typeof e&&null!==e&&e.$$typeof===iJ}class iZ{async load(e){return await require(e)}}let i0=require("next/dist/server/lib/router-utils/instrumentation-globals.external.js"),i1=Symbol.for("@next/router-server-methods"),i4=globalThis,i2=e=>import(e).then(e=>e.default||e),i3=new WeakMap;class i8 extends ih{constructor(e){var t,r,n;super(e),this.cleanupListeners=new iY,this.handleNextImageRequest=async(e,t,r)=>!(!r.pathname||!r.pathname.startsWith("/_next/image")||e1(e,"middlewareInvoke"))&&(t.statusCode=400,t.body("Bad Request").send(),!0),this.handleCatchallRenderRequest=async(e,t,r)=>{let{pathname:n,query:i}=r;if(!n)throw Object.defineProperty(Error("Invariant: pathname is undefined"),"__NEXT_ERROR_CODE",{value:"E409",enumerable:!1,configurable:!0});e4(e,"bubbleNoFallback",void 0),i4[i1]||(i4[i1]={});let s=(0,j.relative)(process.cwd(),this.dir);i4[i1][s]||(i4[i1][s]={render404:this.render404.bind(this)}),i4[i1][s].nextConfig=this.nextConfig;try{var a;n=rp(n);let s={i18n:null==(a=this.i18nProvider)?void 0:a.fromRequest(e,n)},o=await this.matchers.match(n,s);if(!o)return await this.render(e,t,n,i,r,!0),!0;for(let n of(e4(e,"match",o),this.getEdgeFunctionsPages()))if(n===o.definition.page){if("export"===this.nextConfig.output)return await this.render404(e,t,r),!0;delete i[nr];try{if(await this.runEdgeFunction({req:e,res:t,query:i,params:o.params,page:o.definition.page,match:o,appPaths:null}))return!0}catch(t){throw await this.instrumentationOnRequestError(t,e,{routePath:o.definition.page,routerKind:"Pages Router",routeType:"route",revalidateReason:void 0},!1),t}}if(o.definition.kind===nj.PAGES_API){if("export"===this.nextConfig.output)return await this.render404(e,t,r),!0;if(await this.handleApiRequest(e,t,i,o))return!0}return await this.render(e,t,n,i,r,!0),!0}catch(r){if(r instanceof ic.NoFallbackError)throw r;try{return this.logError(r),t.statusCode=500,await this.renderError(r,e,t,n,i),!0}catch{}throw r}},this.handleCatchallMiddlewareRequest=async(e,t,r)=>{let n,i=e1(e,"middlewareInvoke");if(!i)return!1;let s=()=>(e4(e,"middlewareInvoke",!0),t.body("").send(),!0),a=await this.getMiddleware();if(!a)return s();let o=tD(e1(e,"initURL")),l=rx(o.pathname,{nextConfig:this.nextConfig,i18nProvider:this.i18nProvider});o.pathname=l.pathname;let c=rp(r.pathname||""),u=c;try{u=decodeURIComponent(c)}catch{}if(!(a.match(c,e,o.query)||a.match(u,e,o.query)))return s();let d=!1;try{if(await this.ensureMiddleware(e.url),n=await this.runMiddleware({request:e,response:t,parsedUrl:o,parsed:r}),"response"in n){if(i)throw d=!0,Object.defineProperty(new ty.BubbledError(!0,n),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});for(let[e,r]of Object.entries(ru(n.response.headers)))"content-encoding"!==e&&void 0!==r&&t.setHeader(e,r);t.statusCode=n.response.status;let{originalResponse:e}=t;return n.response.body?await rH(n.response.body,e):e.end(),!0}}catch(i){if(d)throw i;if(r3(i)&&"ENOENT"===i.code)return await this.render404(e,t,r),!0;if(i instanceof ez)return t.statusCode=400,await this.renderError(i,e,t,r.pathname||""),!0;let n=r8(i);return console.error(n),t.statusCode=500,await this.renderError(n,e,t,r.pathname||""),!0}return n.finished},function(e){var t;(null==(t=e.experimental)?void 0:t.hideLogsAfterAbort)===!0?(0,ep.setAbortedLogsStyle)("hidden"):(0,ep.setAbortedLogsStyle)("dimmed")}(this.nextConfig);const i=e.dev??!1;if(this.isDev=i,this.sriEnabled=!!(null==(r=e.conf.experimental)||null==(t=r.sri)?void 0:t.algorithm),this.renderOpts.optimizeCss&&(process.env.__NEXT_OPTIMIZE_CSS=JSON.stringify(!0)),this.renderOpts.nextScriptWorkers&&(process.env.__NEXT_SCRIPT_WORKERS=JSON.stringify(!0)),e.dev,!e.dev){const{dynamicRoutes:e=[]}=this.getRoutesManifest()??{};this.dynamicRoutes=e.map(e=>{let t=rY(e.page);return{match:eZ(t),page:e.page,re:t.re}})}!function(e){if(!globalThis.__NEXT_HTTP_AGENT){if(!e)throw Object.defineProperty(Error("Expected config.httpAgentOptions to be an object"),"__NEXT_ERROR_CODE",{value:"E204",enumerable:!1,configurable:!0});globalThis.__NEXT_HTTP_AGENT_OPTIONS=e.httpAgentOptions,globalThis.__NEXT_HTTP_AGENT=new iU.Agent(e.httpAgentOptions),globalThis.__NEXT_HTTPS_AGENT=new iX.Agent(e.httpAgentOptions)}}(this.nextConfig),this.middlewareManifestPath=(0,j.join)(this.serverDistDir,"middleware-manifest.json"),e.dev||this.prepare().catch(e=>{console.error("Failed to prepare server",e)}),this.renderOpts.isExperimentalCompile&&function(e,t){let r={...function(){let e=[];for(let t in process.env)if(t.startsWith("NEXT_PUBLIC_")){let r=process.env[t];null!=r&&e.push([`process.env.${t}`,r])}return e.sort((e,t)=>e[0].localeCompare(t[0])),Object.fromEntries(e)}(),...function(e){let t={},r=e.env;for(let n in r){let i=r[n];null!=i&&(!function(e,t){let r=/^(?:NODE_.+)|^(?:__.+)$/i.test(t),n="NEXT_RUNTIME"===t;if(r||n)throw Object.defineProperty(Error(`The key "${t}" under "env" in ${e.configFileName||"config"} is not allowed. https://nextjs.org/docs/messages/env-key-not-allowed`),"__NEXT_ERROR_CODE",{value:"E967",enumerable:!1,configurable:!0})}(e,n),t[`process.env.${n}`]=i)}return t}(e),"process.env.NEXT_DEPLOYMENT_ID":t};for(let e in r){let t=e.split(".").pop()||"";process.env[t]||(process.env[t]=r[e]||"")}}(this.nextConfig,this.deploymentId||""),(null==(n=e.conf.experimental)?void 0:n.removeUncaughtErrorAndRejectionListeners)&&(process.removeAllListeners("uncaughtException"),process.removeAllListeners("unhandledRejection")),process.on("unhandledRejection",e=>{iQ(e)||console.error(e)}),process.on("rejectionHandled",()=>{}),process.on("uncaughtException",e=>{iQ(e)||console.error(e)})}async unstable_preloadEntries(){await this.prepare();let e=this.getAppPathsManifest(),t=this.getPagesManifest();for(let e of(await this.loadCustomCacheHandlers(),Object.keys(t||{})))try{await iT({distDir:this.distDir,page:e,isAppPath:!1,isDev:this.isDev,sriEnabled:this.sriEnabled,needsManifestsForLegacyReasons:!1})}catch(e){}for(let t of Object.keys(e||{}))try{let{ComponentMod:e}=await iT({distDir:this.distDir,page:t,isAppPath:!0,isDev:this.isDev,sriEnabled:this.sriEnabled,needsManifestsForLegacyReasons:!1});e.patchFetch()}catch(e){}}async handleUpgrade(){}async loadInstrumentationModule(){if(!this.serverOptions.dev)try{this.instrumentation=await (0,i0.getInstrumentationModule)(this.dir,this.nextConfig.distDir)}catch(e){if("MODULE_NOT_FOUND"!==e.code)throw Object.defineProperty(Error("An error occurred while loading the instrumentation hook",{cause:e}),"__NEXT_ERROR_CODE",{value:"E92",enumerable:!1,configurable:!0})}return this.instrumentation}async prepareImpl(){await super.prepareImpl(),await this.runInstrumentationHookIfAvailable()}async runInstrumentationHookIfAvailable(){await (0,i0.ensureInstrumentationRegistered)(this.dir,this.nextConfig.distDir)}loadEnvConfig({dev:e,forceReload:t}){(0,iN.loadEnvConfig)(this.dir,e,S,t,t?e=>{tz(`Reload env: ${e}`)}:void 0)}async loadCustomCacheHandlers(){let{cacheMaxMemorySize:e,cacheHandlers:t}=this.nextConfig;if(t&&function(e){if(is[ir])return null==ie||ie("cache handlers already initialized"),!1;if(null==ie||ie("initializing cache handlers"),is[ir]=new Map,is[it]){let t;is[it].DefaultCache?(null==ie||ie('setting "default" cache handler from symbol'),t=is[it].DefaultCache):(null==ie||ie('setting "default" cache handler from default'),t=n7(e)),is[ir].set("default",t),is[it].RemoteCache?(null==ie||ie('setting "remote" cache handler from symbol'),is[ir].set("remote",is[it].RemoteCache)):(null==ie||ie('setting "remote" cache handler from default'),is[ir].set("remote",t))}else{let t=n7(e);null==ie||ie('setting "default" cache handler from default'),is[ir].set("default",t),null==ie||ie('setting "remote" cache handler from default'),is[ir].set("remote",t)}return is[ii]=new Set(is[ir].values()),!0}(e)){for(let[e,n]of Object.entries(t))if(n){var r=ib(await i2(iV(this.distDir,n)));if(!is[ir]||!is[ii])throw Object.defineProperty(Error("Cache handlers not initialized"),"__NEXT_ERROR_CODE",{value:"E649",enumerable:!1,configurable:!0});null==ie||ie('setting cache handler for "%s"',e),is[ir].set(e,r),is[ii].add(r)}}}async getIncrementalCache({requestHeaders:e}){let t,{cacheHandler:r}=this.nextConfig;return r&&(t=ib(await i2(iV(this.distDir,r)))),await this.loadCustomCacheHandlers(),new iz({fs:this.getCacheFilesystem(),dev:!1,requestHeaders:e,allowedRevalidateHeaderKeys:this.nextConfig.experimental.allowedRevalidateHeaderKeys,minimalMode:!0,serverDistDir:this.serverDistDir,fetchCacheKeyPrefix:this.nextConfig.experimental.fetchCacheKeyPrefix,maxMemoryCacheSize:this.nextConfig.cacheMaxMemorySize,flushToDisk:!1,getPrerenderManifest:()=>this.getPrerenderManifest(),CurCacheHandler:t})}getPublicDir(){return(0,j.join)(this.dir,"public")}getHasStaticDir(){return ed().existsSync((0,j.join)(this.dir,"static"))}getPagesManifest(){return(0,ip.loadManifest)((0,j.join)(this.serverDistDir,e6))}getAppPathsManifest(){if(this.enabledDirectories.app)return(0,ip.loadManifest)((0,j.join)(this.serverDistDir,e5))}getinterceptionRoutePatterns(){if(!this.enabledDirectories.app)return[];let e=this.getRoutesManifest();return(null==e?void 0:e.rewrites.beforeFiles.filter(iK).map(e=>new RegExp(e.regex)))??[]}async hasPage(e){var t;return!!ig(e,this.distDir,null==(t=this.nextConfig.i18n)?void 0:t.locales,this.enabledDirectories.app)}getBuildId(){let e=(0,j.join)(this.distDir,"BUILD_ID");try{return ed().readFileSync(e,"utf8").trim()}catch(e){if("ENOENT"===e.code)throw Object.defineProperty(Error(`Could not find a production build in the '${this.distDir}' directory. Try building your app with 'next build' before starting the production server. https://nextjs.org/docs/messages/production-start-no-build-id`),"__NEXT_ERROR_CODE",{value:"E427",enumerable:!1,configurable:!0});throw e}}getEnabledDirectories(e){let t=e?this.dir:this.serverDistDir;return{app:!!tt(t,"app"),pages:!!tt(t,"pages")}}sendRenderResult(e,t,r){return tN({req:e.originalRequest,res:t.originalResponse,result:r.result,generateEtags:r.generateEtags,poweredByHeader:r.poweredByHeader,cacheControl:r.cacheControl})}async runApi(e,t,r,n){for(let i of this.getEdgeFunctionsPages())if(i===n.definition.pathname&&await this.runEdgeFunction({req:e,res:t,query:r,params:n.params,page:n.definition.pathname,appPaths:null}))return!0;let i=tD(e1(e,"initURL")||e.url);e.url=`${i.pathname}${i.search||""}`;let s=new iZ,a=await s.load(n.definition.filename);return e4(e.originalRequest,"relativeProjectDir",(0,j.relative)(process.cwd(),this.dir)),e4(e.originalRequest,"distDir",this.distDir),await a.handler(e.originalRequest,t.originalResponse,{waitUntil:this.getWaitUntil()}),!0}async renderHTML(e,t,r,n,i){return(0,ty.getTracer)().trace(tE.renderHTML,async()=>this.renderHTMLImpl(e,t,r,n,i))}async renderHTMLImpl(e,t,r,n,i){throw Object.defineProperty(Error("Invariant: renderHTML should not be called in minimal mode"),"__NEXT_ERROR_CODE",{value:"E472",enumerable:!1,configurable:!0})}async imageOptimizer(e,t,r,n){throw Object.defineProperty(Error("invariant: imageOptimizer should not be called in minimal mode"),"__NEXT_ERROR_CODE",{value:"E506",enumerable:!1,configurable:!0})}getPagePath(e,t){return iy(e,this.distDir,t,this.enabledDirectories.app)}async renderPageComponent(e,t){let r=this.getEdgeFunctionsPages()||[];if(r.length){let t=this.getOriginalAppPaths(e.pathname),n=Array.isArray(t),i=e.pathname;for(let s of(n&&(i=t[0]),r))if(s===i)return await this.runEdgeFunction({req:e.req,res:e.res,query:e.query,params:e.renderOpts.params,page:i,appPaths:t}),null}return super.renderPageComponent(e,t)}async findPageComponents({locale:e,page:t,query:r,params:n,isAppPath:i,url:s}){return(0,ty.getTracer)().trace(tE.findPageComponents,{spanName:"resolve page components",attributes:{"next.route":i?t3(t):t}},()=>this.findPageComponentsImpl({locale:e,page:t,query:r,params:n,isAppPath:i,url:s}))}async findPageComponentsImpl({locale:e,page:t,query:r,params:n,isAppPath:i,url:s}){let a=[t];for(let t of(e&&a.unshift(...a.map(t=>`/${e}${"/"===t?"":t}`)),a))try{let s=await iT({distDir:this.distDir,page:t,isAppPath:i,isDev:this.isDev,sriEnabled:this.sriEnabled,needsManifestsForLegacyReasons:!1});if(e&&"string"==typeof s.Component&&!t.startsWith(`/${e}/`)&&t!==`/${e}`)continue;return{components:s,query:{...!this.renderOpts.isExperimentalCompile&&s.getStaticProps?{}:r,...(i?{}:n)||{}}}}catch(e){if(!(e instanceof eX))throw e}return null}getNextFontManifest(){return(0,ip.loadManifest)((0,j.join)(this.distDir,"server","next-font-manifest.json"))}logErrorWithOriginalStack(e,t){throw Object.defineProperty(Error("Invariant: logErrorWithOriginalStack can only be called on the development server"),"__NEXT_ERROR_CODE",{value:"E6",enumerable:!1,configurable:!0})}async ensurePage(e){throw Object.defineProperty(Error("Invariant: ensurePage can only be called on the development server"),"__NEXT_ERROR_CODE",{value:"E291",enumerable:!1,configurable:!0})}async handleApiRequest(e,t,r,n){return this.runApi(e,t,r,n)}getCacheFilesystem(){return iW}normalizeReq(e){return e instanceof tP?e:new tP(e)}normalizeRes(e){return e instanceof tO?e:new tO(e)}getRequestHandler(){return this.makeRequestHandler()}getRequestHandlerWithMetadata(e){let t=this.makeRequestHandler();return(r,n,i)=>(r[e0]=e,t(r,n,i))}makeRequestHandler(){this.prepare().catch(e=>{console.error("Failed to prepare server",e)});let e=super.getRequestHandler();return(t,r,n)=>e(this.normalizeReq(t),this.normalizeRes(r),n)}async revalidate({urlPath:e,revalidateHeaders:t,opts:r}){let n=function({url:e,headers:t={},method:r="GET",bodyReadable:n,resWriter:i,socket:s=null}){return{req:new iB({url:e,headers:t,method:r,socket:s,readable:n}),res:new iG({socket:s,resWriter:i})}}({url:e,headers:t}),i=this.getRequestHandler();if(await i(new tP(n.req),new tO(n.res)),await n.res.hasStreamed,"REVALIDATED"!==n.res.getHeader("x-nextjs-cache")&&200!==n.res.statusCode&&!(404===n.res.statusCode&&r.unstable_onlyGenerated))throw Object.defineProperty(Error(`Invalid response ${n.res.statusCode}`),"__NEXT_ERROR_CODE",{value:"E175",enumerable:!1,configurable:!0})}async render(e,t,r,n,i,s=!1){return super.render(this.normalizeReq(e),this.normalizeRes(t),r,n,i,s)}async renderToHTML(e,t,r,n){return super.renderToHTML(this.normalizeReq(e),this.normalizeRes(t),r,n)}async renderErrorToResponseImpl(e,t){let{req:r,res:n,query:i}=e;return 404===n.statusCode&&this.enabledDirectories.app&&this.getEdgeFunctionsPages().includes(e8)?(await this.runEdgeFunction({req:r,res:n,query:i||{},params:{},page:e8,appPaths:null}),null):super.renderErrorToResponseImpl(e,t)}async renderError(e,t,r,n,i,s){return super.renderError(e,this.normalizeReq(t),this.normalizeRes(r),n,i,s)}async renderErrorToHTML(e,t,r,n,i){return super.renderErrorToHTML(e,this.normalizeReq(t),this.normalizeRes(r),n,i)}async render404(e,t,r,n){return super.render404(this.normalizeReq(e),this.normalizeRes(t),r,n)}getMiddlewareManifest(){return null}async getMiddleware(){var e,t;let r=this.getMiddlewareManifest(),n=null==r||null==(e=r.middleware)?void 0:e["/"];if(!n){let e=await this.loadNodeMiddleware();return e?{match:iS((null==(t=e.config)?void 0:t.matchers)||[{regexp:".*",originalSource:"/:path*"}]),page:"/"}:void 0}return{match:function(e){let t=i3.get(e);if(t)return t;if(!Array.isArray(e.matchers))throw Object.defineProperty(Error(`Invariant: invalid matchers for middleware ${JSON.stringify(e)}`),"__NEXT_ERROR_CODE",{value:"E257",enumerable:!1,configurable:!0});let r=iS(e.matchers);return i3.set(e,r),r}(n),page:"/"}}getEdgeFunctionsPages(){let e=this.getMiddlewareManifest();return e?Object.keys(e.functions):[]}getEdgeFunctionInfo(e){let t,r=this.getMiddlewareManifest();if(!r)return null;try{t=rU(nh(e.page))}catch(e){return null}let n=e.middleware?r.middleware[t]:r.functions[t];if(!n){if(!e.middleware)throw new eX(t);return null}return{name:n.name,paths:n.files.map(e=>(0,j.join)(this.distDir,e)),wasm:(n.wasm??[]).map(e=>({...e,filePath:(0,j.join)(this.distDir,e.filePath)})),assets:n.assets&&n.assets.map(e=>({...e,filePath:(0,j.join)(this.distDir,e.filePath)})),env:n.env}}async loadNodeMiddleware(){}async hasMiddleware(e){let t=this.getEdgeFunctionInfo({page:e,middleware:!0}),r=await this.loadNodeMiddleware();return!t&&!!r||!!(t&&t.paths.length>0)}async ensureMiddleware(e){}async ensureEdgeFunction(e){}async runMiddleware(e){throw Object.defineProperty(Error("invariant: runMiddleware should not be called in minimal mode"),"__NEXT_ERROR_CODE",{value:"E276",enumerable:!1,configurable:!0})}getPrerenderManifest(){return this._cachedPreviewManifest||(this._cachedPreviewManifest=(0,ip.loadManifest)((0,j.join)(this.distDir,"prerender-manifest.json"))),this._cachedPreviewManifest}getRoutesManifest(){return(0,ty.getTracer)().trace(tE.getRoutesManifest,()=>(0,ip.loadManifest)((0,j.join)(this.distDir,"routes-manifest.json")))}attachRequestMeta(e,t,r){var n,i,s;let a=(null==(n=e.headers["x-forwarded-proto"])?void 0:n.includes("https"))?"https":"http",o=this.fetchHostname&&this.port?`${a}://${this.fetchHostname}:${this.port}${e.url}`:this.nextConfig.experimental.trustHostHeader?`https://${e.headers.host||"localhost"}${e.url}`:e.url;if(e4(e,"initURL",o),e4(e,"initQuery",{...t.query}),e4(e,"initProtocol",a),!r){let t,r,n=null==(i=this.nextConfig.experimental)?void 0:i.proxyClientMaxBodySize;e4(e,"clonableBody",(s=e.originalRequest,t=null,r=new Promise((e,t)=>{s.on("end",e),s.on("error",t)}).catch(e=>({error:e})),{async finalize(){if(t){let e=await r;if(e&&"object"==typeof e&&e.error)throw e.error;!function(e,t){for(let r in t){let n=t[r];"function"==typeof n&&(n=n.bind(e)),e[r]=n}}(s,t),t=s}},cloneBodyStream(){let e=t??s,r=new ij.PassThrough,i=new ij.PassThrough,a=0,o=n??0xa00000,l=!1;return e.on("data",e=>{if(!l){if((a+=e.length)>o){l=!0;let e=s.url?` for ${s.url}`:"";console.warn(`Request body exceeded ${i$().format(o)}${e}. Only the first ${i$().format(o)} will be available unless configured. See https://nextjs.org/docs/app/api-reference/config/next-config-js/middlewareClientMaxBodySize for more details.`),r.push(null),i.push(null);return}r.push(e),i.push(e)}}),e.on("end",()=>{l||(r.push(null),i.push(null))}),t=i,r}}))}}async runEdgeFunction(e){throw Object.defineProperty(Error("Middleware is not supported in minimal mode. Please remove the `NEXT_MINIMAL` environment variable."),"__NEXT_ERROR_CODE",{value:"E58",enumerable:!1,configurable:!0})}get serverDistDir(){if(this._serverDistDir)return this._serverDistDir;let e=(0,j.join)(this.distDir,e9);return this._serverDistDir=e,e}async getFallbackErrorComponents(e){return null}async instrumentationOnRequestError(...e){await super.instrumentationOnRequestError(...e);{let[t,,,r]=e;r||this.logError(t)}}onServerClose(e){this.cleanupListeners.add(e)}async close(){await this.cleanupListeners.runAll()}getInternalWaitUntil(){return this.internalWaitUntil??=this.createInternalWaitUntil(),this.internalWaitUntil}createInternalWaitUntil(){throw Object.defineProperty(new ej("createInternalWaitUntil should never be called in minimal mode"),"__NEXT_ERROR_CODE",{value:"E540",enumerable:!1,configurable:!0})}}})(),module.exports=n})();
|
|
26
26
|
//# sourceMappingURL=server.runtime.prod.js.map
|