@openuiai/next 16.0.1 → 16.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/bin/next +1 -1
  2. package/dist/build/index.js +3 -3
  3. package/dist/build/swc/index.js +1 -1
  4. package/dist/build/webpack-config.js +2 -2
  5. package/dist/client/app-bootstrap.js +1 -1
  6. package/dist/client/index.js +1 -1
  7. package/dist/compiled/next-server/pages-api.runtime.dev.js +1 -1
  8. package/dist/compiled/next-server/pages-api.runtime.dev.js.map +1 -1
  9. package/dist/compiled/next-server/pages.runtime.dev.js +1 -1
  10. package/dist/compiled/next-server/pages.runtime.dev.js.map +1 -1
  11. package/dist/compiled/next-server/server.runtime.prod.js +1 -1
  12. package/dist/compiled/next-server/server.runtime.prod.js.map +1 -1
  13. package/dist/esm/build/index.js +3 -3
  14. package/dist/esm/build/swc/index.js +1 -1
  15. package/dist/esm/build/webpack-config.js +2 -2
  16. package/dist/esm/client/app-bootstrap.js +1 -1
  17. package/dist/esm/client/index.js +1 -1
  18. package/dist/esm/server/dev/hot-reloader-webpack.js +1 -1
  19. package/dist/esm/server/lib/app-info-log.js +1 -1
  20. package/dist/esm/server/lib/start-server.js +1 -1
  21. package/dist/esm/server/require-hook.js +4 -0
  22. package/dist/esm/server/require-hook.js.map +1 -1
  23. package/dist/esm/shared/lib/errors/canary-only-config-error.js +1 -1
  24. package/dist/server/dev/hot-reloader-webpack.js +1 -1
  25. package/dist/server/lib/app-info-log.js +1 -1
  26. package/dist/server/lib/start-server.js +1 -1
  27. package/dist/server/require-hook.js +4 -0
  28. package/dist/server/require-hook.js.map +1 -1
  29. package/dist/shared/lib/errors/canary-only-config-error.js +1 -1
  30. package/dist/telemetry/anonymous-meta.js +1 -1
  31. package/dist/telemetry/events/session-stopped.js +2 -2
  32. package/dist/telemetry/events/version.js +2 -2
  33. package/package.json +1 -1
@@ -28,7 +28,7 @@ You can debug event listener operations by running Next.js with \`NEXT_UNHANDLED
28
28
 
29
29
  You can silence warnings related to this behavior by running Next.js with \`NEXT_UNHANDLED_REJECTION_FILTER=silent\` environment variable.
30
30
 
31
- You can debug event listener operations by running Next.js with \`NEXT_UNHANDLED_REJECTION_FILTER=debug\` environment variable.`),eE(),p.call(process))}),process.listeners=eb(f,function(e){return"unhandledRejection"===e?(null==t||t("Retrieving all 'unhandledRejection' listeners."),[ew,...ey]):f.call(process,e)}),eg=!0}();let eC=require("next/dist/server/app-render/work-async-storage.external.js");new WeakMap;class eR extends Error{constructor(e,t){super(`Invariant: ${e.endsWith(".")?e:e+"."} This is a bug in Next.js.`,t),this.name="InvariantError"}}function eP(e,t,r,n){let i=n.dynamicTracking,s=function(e){let t=Object.defineProperty(Error(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t.digest="NEXT_PRERENDER_INTERRUPTED",t}(`Route ${e} needs to bail out of prerendering at this point because it used ${t}.`);n.controller.abort(s);let a=n.dynamicTracking;a&&a.dynamicAccesses.push({stack:a.isDebugDynamicAccesses?Error().stack:void 0,expression:t}),i&&null===i.syncDynamicErrorWithStack&&(i.syncDynamicErrorWithStack=r)}if(r("../../node_modules/.pnpm/react@19.3.0-canary-2bcbf254-20251020/node_modules/react/index.js").unstable_postpone,!1===function(e){return e.includes("needs to bail out of prerendering at this point because it used")&&e.includes("Learn more: https://nextjs.org/docs/messages/ppr-caught-error")}("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"))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 eT(e,t){var r,n;let i=M.workUnitAsyncStorage.getStore(),s=eC.workAsyncStorage.getStore();if(i&&s)switch(i.type){case"prerender":case"prerender-runtime":if(!1===i.controller.signal.aborted){let n;switch(t){case"time":n=`Route "${s.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":n=`Route "${s.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":n=`Route "${s.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 eR("Unknown expression type in abortOnSynchronousPlatformIOAccess."),"__NEXT_ERROR_CODE",{value:"E526",enumerable:!1,configurable:!0})}eP(s.route,e,(r=Object.defineProperty(Error(n),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0}),r),i)}break;case"prerender-client":if(!1===i.controller.signal.aborted){let r;switch(t){case"time":r=`Route "${s.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":r=`Route "${s.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":r=`Route "${s.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 eR("Unknown expression type in abortOnSynchronousPlatformIOAccess."),"__NEXT_ERROR_CODE",{value:"E526",enumerable:!1,configurable:!0})}eP(s.route,e,(n=Object.defineProperty(Error(r),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0}),n),i)}}}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]`);let eO="`Math.random()`";try{let e=Math.random;Math.random=(function(){return eT(eO,"random"),e.apply(null,arguments)}).bind(null),Object.defineProperty(Math.random,"name",{value:"random"})}catch{console.error(`Failed to install ${eO} extension. When using \`cacheComponents\` calling this function will not correctly trigger dynamic behavior.`)}try{Date=function(e){var t;let r=Object.getOwnPropertyDescriptors(e);r.now.value=(t=e.now,({now:function(){return eT("`Date.now()`","time"),t()}})["now".slice()].bind(null));let n=Reflect.apply,i=Reflect.construct,s=Object.defineProperties(function(){return new.target===void 0?(eT("`Date()`","time"),n(e,void 0,arguments)):(0==arguments.length&&eT("`new Date()`","time"),i(e,arguments,new.target))},r);return Object.defineProperty(e.prototype,"constructor",{value:s}),s}(Date)}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 eS="`crypto.getRandomValues()`";try{let e=m.getRandomValues;m.getRandomValues=function(){return eT(eS,"crypto"),e.apply(m,arguments)}}catch{console.error(`Failed to install ${eS} extension. When using \`cacheComponents\` calling this function will not correctly trigger dynamic behavior.`)}try{let e=m.randomUUID;m.randomUUID=function(){return eT("`crypto.randomUUID()`","crypto"),e.apply(m,arguments)}}catch{console.error(`Failed to install ${eS} 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 eT(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]&&eT(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 eT(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]&&eT("`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 eT(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 eT(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 eT(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.`)}}let eI=r("path"),ek=r("module"),eA=ek.prototype.require,ej=ek._resolveFilename,eN=require.resolve,e$=new Map;!function(e=[]){for(let[t,r]of e)e$.set(t,r)}(Object.entries({"styled-jsx":eI.dirname(eN("styled-jsx/package.json")),"styled-jsx/style":eN("styled-jsx/style"),"styled-jsx/style.js":eN("styled-jsx/style"),react:eI.dirname(eN("next/dist/compiled/react/package.json")),"react-dom":eI.dirname(eN("next/dist/compiled/react-dom/package.json"))}).map(([e,t])=>[e,eN(t)])),ek._resolveFilename=(function(e,t,r,n,i,s){let a=t.get(r);return a&&(r=a),e.call(ek,r,n,i,s)}).bind(null,ej,e$),ek.prototype.require=function(e){return"string"==typeof e&&e.endsWith(".shared-runtime")?eA.call(this,`next/dist/server/route-modules/pages/vendored/contexts/${eI.basename(e,".shared-runtime")}`):eA.call(this,e)},r("./dist/esm/server/node-polyfill-crypto.js"),"undefined"!=typeof performance&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class eD extends Error{}class eM extends Error{}class eL extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class eZ extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}var eq=r("./dist/compiled/path-to-regexp/index.js");let eU="_NEXTSEP_";function ez(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 eF(e){let t=e;return(t=t.replace(/(\([^)]*\)):([^/\s]+)/g,`$1${eU}:$2`)).replace(/:([^:/\s)]+)(?=:)/g,`:$1${eU}`)}function eH(e){return e.replace(RegExp(`\\)${eU}`,"g"),")")}function eV(e,t,r){if("string"!=typeof e)return(0,eq.pathToRegexp)(e,t,r);let n=ez(e),i=n?eF(e):e;try{return(0,eq.pathToRegexp)(i,t,r)}catch(i){if(!n)try{let n=eF(e);return(0,eq.pathToRegexp)(n,t,r)}catch(e){}throw i}}function eW(e,t){let r=ez(e),n=r?eF(e):e;try{let e=(0,eq.compile)(n,t);if(r)return t=>eH(e(t));return e}catch(n){if(!r)try{let r=eF(e),n=(0,eq.compile)(r,t);return e=>eH(n(e))}catch(e){}throw n}}function eB({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 eD("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(`^${eU}`),""):Array.isArray(r)?n[e]=r.map(e=>"string"==typeof e?e.replace(RegExp(`^${eU}`),""):e):n[e]=r;return n}}let eX=Symbol.for("NextInternalRequestMeta");function eG(e,t){let r=e[eX]||{};return"string"==typeof t?r[t]:r}function eK(e,t,r){let n=eG(e);return n[t]=r,e[eX]=n,n}function eJ(e,t){let r=eG(e);return delete r[t],e[eX]=r,r}r("./dist/esm/shared/lib/modern-browserslist-target.js");let eY="/_not-found",eQ=`${eY}/page`,e0={client:"client",server:"server",edgeServer:"edge-server"};e0.client,e0.server,e0.edgeServer;let e1="pages-manifest.json",e4="app-paths-manifest.json",e2="server";[...process?.features?.typescript?["next.config.mts"]:[]];let e9=["/_document","/_app","/_error"];Symbol("polyfills");let e3=["/500"];function e8(e,t){let r=w().join(e,t);return er().existsSync(r)||(r=w().join(e,"src",t),er().existsSync(r))?r:null}class e5{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 e6 extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers")}static callable(){throw new e6}}class e7 extends Headers{constructor(e){super(),this.headers=new Proxy(e,{get(t,r,n){if("symbol"==typeof r)return e5.get(t,r,n);let i=r.toLowerCase(),s=Object.keys(e).find(e=>e.toLowerCase()===i);if(void 0!==s)return e5.get(t,s,n)},set(t,r,n,i){if("symbol"==typeof r)return e5.set(t,r,n,i);let s=r.toLowerCase(),a=Object.keys(e).find(e=>e.toLowerCase()===s);return e5.set(t,a??r,n,i)},has(t,r){if("symbol"==typeof r)return e5.has(t,r);let n=r.toLowerCase(),i=Object.keys(e).find(e=>e.toLowerCase()===n);return void 0!==i&&e5.has(t,i)},deleteProperty(t,r){if("symbol"==typeof r)return e5.deleteProperty(t,r);let n=r.toLowerCase(),i=Object.keys(e).find(e=>e.toLowerCase()===n);return void 0===i||e5.deleteProperty(t,i)}})}static seal(e){return new Proxy(e,{get(e,t,r){switch(t){case"append":case"delete":case"set":return e6.callable;default:return e5.get(e,t,r)}}})}merge(e){return Array.isArray(e)?e.join(", "):e}static from(e){return e instanceof Headers?e:new e7(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 te="text/html; charset=utf-8",tt="nxtP",tr="nxtI",tn="x-matched-path",ti=".prefetch.rsc",ts=".segments",ta=".segment.rsc",to=".rsc",tl=".json",tu=".meta",td="x-next-cache-tags",tc="x-next-revalidated-tags",th={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"};({...th,GROUP:{builtinReact:[th.reactServerComponents,th.actionBrowser],serverOnly:[th.reactServerComponents,th.actionBrowser,th.instrument,th.middleware],neutralTarget:[th.apiNode,th.apiEdge],clientOnly:[th.serverSideRendering,th.appPagesBrowser],bundled:[th.reactServerComponents,th.actionBrowser,th.serverSideRendering,th.appPagesBrowser,th.shared,th.instrument,th.middleware],appPages:[th.reactServerComponents,th.serverSideRendering,th.appPagesBrowser,th.actionBrowser]}});let tp=require("next/dist/server/lib/trace/tracer");Symbol("__next_preview_data");let tf=Symbol("__prerender_bypass");var tm=function(e){return e[e.SeeOther=303]="SeeOther",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.PermanentRedirect=308]="PermanentRedirect",e}({});function tg(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 ty{constructor(e,t,r){this.method=e,this.url=t,this.body=r}get cookies(){return this._cookies?this._cookies:this._cookies=tg(this.headers)()}}class tv{constructor(e){this.destination=e}redirect(e,t){return this.setHeader("Location",e),this.statusCode=t,t===tm.PermanentRedirect&&this.setHeader("Refresh",`0;url=${e}`),this}}class t_ extends ty{static #e=y=eX;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[y]=this._req[eX]||{},this.streaming=!1}get originalRequest(){return this._req[eX]=this[eX],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 tb extends tv{get originalResponse(){return tf in this&&(this._res[tf]=this[tf]),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 tx=r("./dist/compiled/fresh/index.js"),tE=r.n(tx);async function tw({req:e,res:t,result:r,generateEtags:n,poweredByHeader:i,cacheControl:s}){if(t.finished||t.headersSent)return;i&&r.contentType===te&&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,u=0,d=52210;for(;r<t;)i^=e.charCodeAt(r++),n=435*i,s=435*a,o=435*l,u=435*d,o+=i<<8,u+=a<<8,s+=n>>>16,i=65535&n,o+=s>>>16,a=65535&s,d=u+(o>>>16)&65535,l=65535&o;return(15&d)*0x1000000000000+0x100000000*l+65536*a+(i^d>>4)})(e).toString(36)+e.length.toString(36)+'"')(a);if(r&&t.setHeader("ETag",r),tE()(e.headers,{etag:r})&&(t.statusCode=304,t.end(),1))return}return(!t.getHeader("Content-Type")&&r.contentType&&t.setHeader("Content-Type",r.contentType),a&&t.setHeader("Content-Length",Buffer.byteLength(a)),"HEAD"===e.method)?void t.end(null):null!==a?void t.end(a):void await r.pipeToNodeResponse(t)}function tC(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 tR(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function tP(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:u,origin:d}=new URL(e,i);if(d!==n.origin)throw Object.defineProperty(Error(`invariant: invalid relative URL, router received ${e}`),"__NEXT_ERROR_CODE",{value:"E159",enumerable:!1,configurable:!0});return{pathname:s,query:r?tC(a):void 0,search:o,hash:l,href:u.slice(d.length),slashes:void 0}}(e);let t=new URL(e);return{hash:t.hash,hostname:t.hostname,href:t.href,pathname:t.pathname,port:t.port,protocol:t.protocol,query:tC(t.searchParams),search:t.search,origin:t.origin,slashes:"//"===t.href.slice(t.protocol.length,t.protocol.length+2)}}let tT={wait:G(F("○")),error:V(F("⨯")),warn:B(F("⚠")),ready:"▲",info:G(F(" ")),event:W(F("✓")),trace:X(F("\xbb"))},tO={log:"log",warn:"warn",error:"error"};function tS(e,...t){(""===t[0]||void 0===t[0])&&1===t.length&&t.shift();let r=e in tO?tO[e]:"log",n=tT[e];0===t.length?console[r](""):1===t.length&&"string"==typeof t[0]?console[r](" "+n+" "+t[0]):console[r](" "+n,...t)}function tI(...e){console.log(" "+e.join(" "))}function tk(...e){tS("wait",...e)}function tA(...e){tS("error",...e)}function tj(...e){tS("warn",...e)}function tN(...e){tS("ready",...e)}function t$(...e){tS("info",...e)}function tD(...e){tS("event",...e)}function tM(...e){tS("trace",...e)}let tL=new O(1e4,e=>e.length);function tZ(...e){let t=e.join(" ");tL.has(t)||(tL.set(t,t),tj(...e))}let tq=new O(1e4,e=>e.length);function tU(...e){let t=e.join(" ");tq.has(t)||(tq.set(t,t),tA(...e))}let tz="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",tF=`(${tz}[.]){3}${tz}`,tH="(?:[0-9a-fA-F]{1,4})",tV=RegExp(`^((?:${tH}:){7}(?:${tH}|:)|(?:${tH}:){6}(?:${tF}|:${tH}|:)|(?:${tH}:){5}(?::${tF}|(:${tH}){1,2}|:)|(?:${tH}:){4}(?:(:${tH}){0,1}:${tF}|(:${tH}){1,3}|:)|(?:${tH}:){3}(?:(:${tH}){0,2}:${tF}|(:${tH}){1,4}|:)|(?:${tH}:){2}(?:(:${tH}){0,3}:${tF}|(:${tH}){1,5}|:)|(?:${tH}:){1}(?:(:${tH}){0,4}:${tF}|(:${tH}){1,6}|:)|(?::((?::${tH}){0,5}:${tF}|(?::${tH}){1,7}|:)))(%[0-9a-zA-Z-.:]{1,})?$`);function tW(e){return e.startsWith("/")?e:`/${e}`}function tB(e){return tW(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 tX(e){return e.replace(/\.rsc($|\?)/,"$1")}let tG=["(..)(..)","(.)","(..)","(...)"];function tK(e){return void 0!==e.split("/").find(e=>tG.find(t=>e.startsWith(t)))}let tJ=/\/[^/]*\[[^/]+\][^/]*(?=\/|$)/,tY=/\/\[[^/]+\](?=\/|$)/;function tQ(e,t=!0){return(tK(e)&&(e=function(e){let t,r,n;for(let i of e.split("/"))if(r=tG.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=tB(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)?tY.test(e):tJ.test(e)}let t0=/[\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,t1=/Googlebot(?!-)|Googlebot$/i,t4=t0.source;function t2(){}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 t9=new TextEncoder;function t3(e){return new ReadableStream({start(t){t.enqueue(t9.encode(e)),t.close()}})}function t8(e){return new ReadableStream({start(t){t.enqueue(e),t.close()}})}async function t5(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 t6(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 t7(e){let t={},r=[];if(e)for(let[n,i]of e.entries())"set-cookie"===n.toLowerCase()?(r.push(...t6(i)),t[n]=1===r.length?r[0]:r):t[n]=i;return t}function re(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 rt(e){for(let t of[tt,tr])if(e!==t&&e.startsWith(t))return e.substring(t.length);return null}function rr(e){return e.replace(/\/$/,"")||"/"}function rn(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 ri(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:n,hash:i}=rn(e);return`${t}${r}${n}${i}`}function rs(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:n,hash:i}=rn(e);return`${r}${t}${n}${i}`}function ra(e,t){if("string"!=typeof e)return!1;let{pathname:r}=rn(e);return r===t||r.startsWith(t+"/")}function ro(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 rl=new WeakMap;function ru(e,t){let r;if(!t)return{pathname:e};let n=rl.get(t);n||(n=t.map(e=>e.toLowerCase()),rl.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 rd(e,t){if(!ra(e,t))return e;let r=e.slice(t.length);return r.startsWith("/")?r:`/${r}`}function rc(e,t){let{basePath:r,i18n:n,trailingSlash:i}=t.nextConfig??{},s={pathname:e,trailingSlash:"/"!==e?e.endsWith("/"):i};r&&ra(s.pathname,r)&&(s.pathname=rd(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):ru(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):ru(a,n.locales)).detectedLocale&&(s.locale=e.detectedLocale)}return s}let rh=/(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;function rp(e,t){return new URL(String(e).replace(rh,"localhost"),t&&String(t).replace(rh,"localhost"))}let rf=Symbol("NextURLInternal");class rm{constructor(e,t,r){let n,i;"object"==typeof t&&"pathname"in t||"string"==typeof t?(n=t,i=r||{}):i=r||t||{},this[rf]={url:rp(e,n??i.base),options:i,basePath:""},this.analyze()}analyze(){var e,t,r,n,i;let s=rc(this[rf].url.pathname,{nextConfig:this[rf].options.nextConfig,parseData:!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE,i18nProvider:this[rf].options.i18nProvider}),a=ro(this[rf].url,this[rf].options.headers);this[rf].domainLocale=this[rf].options.i18nProvider?this[rf].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[rf].options.nextConfig)||null==(e=t.i18n)?void 0:e.domains,a);let o=(null==(r=this[rf].domainLocale)?void 0:r.defaultLocale)||(null==(i=this[rf].options.nextConfig)||null==(n=i.i18n)?void 0:n.defaultLocale);this[rf].url.pathname=s.pathname,this[rf].defaultLocale=o,this[rf].basePath=s.basePath??"",this[rf].buildId=s.buildId,this[rf].locale=s.locale??o,this[rf].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&&(ra(i,"/api")||ra(i,`/${t.toLowerCase()}`))?e:ri(e,`/${t}`)}((e={basePath:this[rf].basePath,buildId:this[rf].buildId,defaultLocale:this[rf].options.forceLocale?void 0:this[rf].defaultLocale,locale:this[rf].locale,pathname:this[rf].url.pathname,trailingSlash:this[rf].trailingSlash}).pathname,e.locale,e.buildId?void 0:e.defaultLocale,e.ignorePrefix),(e.buildId||!e.trailingSlash)&&(t=rr(t)),e.buildId&&(t=rs(ri(t,`/_next/data/${e.buildId}`),"/"===e.pathname?"index.json":".json")),t=ri(t,e.basePath),!e.buildId&&e.trailingSlash?t.endsWith("/")?t:rs(t,"/"):rr(t)}formatSearch(){return this[rf].url.search}get buildId(){return this[rf].buildId}set buildId(e){this[rf].buildId=e}get locale(){return this[rf].locale??""}set locale(e){var t,r;if(!this[rf].locale||!(null==(r=this[rf].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[rf].locale=e}get defaultLocale(){return this[rf].defaultLocale}get domainLocale(){return this[rf].domainLocale}get searchParams(){return this[rf].url.searchParams}get host(){return this[rf].url.host}set host(e){this[rf].url.host=e}get hostname(){return this[rf].url.hostname}set hostname(e){this[rf].url.hostname=e}get port(){return this[rf].url.port}set port(e){this[rf].url.port=e}get protocol(){return this[rf].url.protocol}set protocol(e){this[rf].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[rf].url=rp(e),this.analyze()}get origin(){return this[rf].url.origin}get pathname(){return this[rf].url.pathname}set pathname(e){this[rf].url.pathname=e}get hash(){return this[rf].url.hash}set hash(e){this[rf].url.hash=e}get search(){return this[rf].url.search}set search(e){this[rf].url.search=e}get password(){return this[rf].url.password}set password(e){this[rf].url.password=e}get username(){return this[rf].url.username}set username(e){this[rf].url.username=e}get basePath(){return this[rf].basePath}set basePath(e){this[rf].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 rm(String(this),this[rf].options)}}class rg extends Error{constructor({page:e}){super(`The middleware "${e}" accepts an async API directly with the form:
31
+ You can debug event listener operations by running Next.js with \`NEXT_UNHANDLED_REJECTION_FILTER=debug\` environment variable.`),eE(),p.call(process))}),process.listeners=eb(f,function(e){return"unhandledRejection"===e?(null==t||t("Retrieving all 'unhandledRejection' listeners."),[ew,...ey]):f.call(process,e)}),eg=!0}();let eC=require("next/dist/server/app-render/work-async-storage.external.js");new WeakMap;class eR extends Error{constructor(e,t){super(`Invariant: ${e.endsWith(".")?e:e+"."} This is a bug in Next.js.`,t),this.name="InvariantError"}}function eP(e,t,r,n){let i=n.dynamicTracking,s=function(e){let t=Object.defineProperty(Error(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t.digest="NEXT_PRERENDER_INTERRUPTED",t}(`Route ${e} needs to bail out of prerendering at this point because it used ${t}.`);n.controller.abort(s);let a=n.dynamicTracking;a&&a.dynamicAccesses.push({stack:a.isDebugDynamicAccesses?Error().stack:void 0,expression:t}),i&&null===i.syncDynamicErrorWithStack&&(i.syncDynamicErrorWithStack=r)}if(r("../../node_modules/.pnpm/react@19.3.0-canary-2bcbf254-20251020/node_modules/react/index.js").unstable_postpone,!1===function(e){return e.includes("needs to bail out of prerendering at this point because it used")&&e.includes("Learn more: https://nextjs.org/docs/messages/ppr-caught-error")}("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"))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 eT(e,t){var r,n;let i=M.workUnitAsyncStorage.getStore(),s=eC.workAsyncStorage.getStore();if(i&&s)switch(i.type){case"prerender":case"prerender-runtime":if(!1===i.controller.signal.aborted){let n;switch(t){case"time":n=`Route "${s.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":n=`Route "${s.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":n=`Route "${s.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 eR("Unknown expression type in abortOnSynchronousPlatformIOAccess."),"__NEXT_ERROR_CODE",{value:"E526",enumerable:!1,configurable:!0})}eP(s.route,e,(r=Object.defineProperty(Error(n),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0}),r),i)}break;case"prerender-client":if(!1===i.controller.signal.aborted){let r;switch(t){case"time":r=`Route "${s.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":r=`Route "${s.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":r=`Route "${s.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 eR("Unknown expression type in abortOnSynchronousPlatformIOAccess."),"__NEXT_ERROR_CODE",{value:"E526",enumerable:!1,configurable:!0})}eP(s.route,e,(n=Object.defineProperty(Error(r),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0}),n),i)}}}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]`);let eO="`Math.random()`";try{let e=Math.random;Math.random=(function(){return eT(eO,"random"),e.apply(null,arguments)}).bind(null),Object.defineProperty(Math.random,"name",{value:"random"})}catch{console.error(`Failed to install ${eO} extension. When using \`cacheComponents\` calling this function will not correctly trigger dynamic behavior.`)}try{Date=function(e){var t;let r=Object.getOwnPropertyDescriptors(e);r.now.value=(t=e.now,({now:function(){return eT("`Date.now()`","time"),t()}})["now".slice()].bind(null));let n=Reflect.apply,i=Reflect.construct,s=Object.defineProperties(function(){return new.target===void 0?(eT("`Date()`","time"),n(e,void 0,arguments)):(0==arguments.length&&eT("`new Date()`","time"),i(e,arguments,new.target))},r);return Object.defineProperty(e.prototype,"constructor",{value:s}),s}(Date)}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 eS="`crypto.getRandomValues()`";try{let e=m.getRandomValues;m.getRandomValues=function(){return eT(eS,"crypto"),e.apply(m,arguments)}}catch{console.error(`Failed to install ${eS} extension. When using \`cacheComponents\` calling this function will not correctly trigger dynamic behavior.`)}try{let e=m.randomUUID;m.randomUUID=function(){return eT("`crypto.randomUUID()`","crypto"),e.apply(m,arguments)}}catch{console.error(`Failed to install ${eS} 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 eT(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]&&eT(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 eT(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]&&eT("`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 eT(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 eT(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 eT(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.`)}}let eI=r("path"),ek=r("module"),eA=ek.prototype.require,ej=ek._resolveFilename,eN=require.resolve,e$=new Map;!function(e=[]){for(let[t,r]of e)e$.set(t,r)}(Object.entries({"styled-jsx":eI.dirname(eN("styled-jsx/package.json")),"styled-jsx/style":eN("styled-jsx/style"),"styled-jsx/style.js":eN("styled-jsx/style"),react:eI.dirname(eN("next/dist/compiled/react/package.json")),"react-dom":eI.dirname(eN("next/dist/compiled/react-dom/package.json"))}).map(([e,t])=>[e,eN(t)])),ek._resolveFilename=(function(e,t,r,n,i,s){if("string"!=typeof r)return e.call(ek,r,n,i,s);let a=t.get(r);return a&&(r=a),e.call(ek,r,n,i,s)}).bind(null,ej,e$),ek.prototype.require=function(e){return"string"==typeof e&&e.endsWith(".shared-runtime")?eA.call(this,`next/dist/server/route-modules/pages/vendored/contexts/${eI.basename(e,".shared-runtime")}`):eA.call(this,e)},r("./dist/esm/server/node-polyfill-crypto.js"),"undefined"!=typeof performance&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class eD extends Error{}class eM extends Error{}class eL extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class eZ extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}var eq=r("./dist/compiled/path-to-regexp/index.js");let eU="_NEXTSEP_";function ez(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 eF(e){let t=e;return(t=t.replace(/(\([^)]*\)):([^/\s]+)/g,`$1${eU}:$2`)).replace(/:([^:/\s)]+)(?=:)/g,`:$1${eU}`)}function eH(e){return e.replace(RegExp(`\\)${eU}`,"g"),")")}function eV(e,t,r){if("string"!=typeof e)return(0,eq.pathToRegexp)(e,t,r);let n=ez(e),i=n?eF(e):e;try{return(0,eq.pathToRegexp)(i,t,r)}catch(i){if(!n)try{let n=eF(e);return(0,eq.pathToRegexp)(n,t,r)}catch(e){}throw i}}function eW(e,t){let r=ez(e),n=r?eF(e):e;try{let e=(0,eq.compile)(n,t);if(r)return t=>eH(e(t));return e}catch(n){if(!r)try{let r=eF(e),n=(0,eq.compile)(r,t);return e=>eH(n(e))}catch(e){}throw n}}function eB({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 eD("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(`^${eU}`),""):Array.isArray(r)?n[e]=r.map(e=>"string"==typeof e?e.replace(RegExp(`^${eU}`),""):e):n[e]=r;return n}}let eX=Symbol.for("NextInternalRequestMeta");function eG(e,t){let r=e[eX]||{};return"string"==typeof t?r[t]:r}function eK(e,t,r){let n=eG(e);return n[t]=r,e[eX]=n,n}function eJ(e,t){let r=eG(e);return delete r[t],e[eX]=r,r}r("./dist/esm/shared/lib/modern-browserslist-target.js");let eY="/_not-found",eQ=`${eY}/page`,e0={client:"client",server:"server",edgeServer:"edge-server"};e0.client,e0.server,e0.edgeServer;let e1="pages-manifest.json",e4="app-paths-manifest.json",e2="server";[...process?.features?.typescript?["next.config.mts"]:[]];let e9=["/_document","/_app","/_error"];Symbol("polyfills");let e3=["/500"];function e8(e,t){let r=w().join(e,t);return er().existsSync(r)||(r=w().join(e,"src",t),er().existsSync(r))?r:null}class e5{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 e6 extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers")}static callable(){throw new e6}}class e7 extends Headers{constructor(e){super(),this.headers=new Proxy(e,{get(t,r,n){if("symbol"==typeof r)return e5.get(t,r,n);let i=r.toLowerCase(),s=Object.keys(e).find(e=>e.toLowerCase()===i);if(void 0!==s)return e5.get(t,s,n)},set(t,r,n,i){if("symbol"==typeof r)return e5.set(t,r,n,i);let s=r.toLowerCase(),a=Object.keys(e).find(e=>e.toLowerCase()===s);return e5.set(t,a??r,n,i)},has(t,r){if("symbol"==typeof r)return e5.has(t,r);let n=r.toLowerCase(),i=Object.keys(e).find(e=>e.toLowerCase()===n);return void 0!==i&&e5.has(t,i)},deleteProperty(t,r){if("symbol"==typeof r)return e5.deleteProperty(t,r);let n=r.toLowerCase(),i=Object.keys(e).find(e=>e.toLowerCase()===n);return void 0===i||e5.deleteProperty(t,i)}})}static seal(e){return new Proxy(e,{get(e,t,r){switch(t){case"append":case"delete":case"set":return e6.callable;default:return e5.get(e,t,r)}}})}merge(e){return Array.isArray(e)?e.join(", "):e}static from(e){return e instanceof Headers?e:new e7(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 te="text/html; charset=utf-8",tt="nxtP",tr="nxtI",tn="x-matched-path",ti=".prefetch.rsc",ts=".segments",ta=".segment.rsc",to=".rsc",tl=".json",tu=".meta",td="x-next-cache-tags",tc="x-next-revalidated-tags",th={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"};({...th,GROUP:{builtinReact:[th.reactServerComponents,th.actionBrowser],serverOnly:[th.reactServerComponents,th.actionBrowser,th.instrument,th.middleware],neutralTarget:[th.apiNode,th.apiEdge],clientOnly:[th.serverSideRendering,th.appPagesBrowser],bundled:[th.reactServerComponents,th.actionBrowser,th.serverSideRendering,th.appPagesBrowser,th.shared,th.instrument,th.middleware],appPages:[th.reactServerComponents,th.serverSideRendering,th.appPagesBrowser,th.actionBrowser]}});let tp=require("next/dist/server/lib/trace/tracer");Symbol("__next_preview_data");let tf=Symbol("__prerender_bypass");var tm=function(e){return e[e.SeeOther=303]="SeeOther",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.PermanentRedirect=308]="PermanentRedirect",e}({});function tg(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 ty{constructor(e,t,r){this.method=e,this.url=t,this.body=r}get cookies(){return this._cookies?this._cookies:this._cookies=tg(this.headers)()}}class tv{constructor(e){this.destination=e}redirect(e,t){return this.setHeader("Location",e),this.statusCode=t,t===tm.PermanentRedirect&&this.setHeader("Refresh",`0;url=${e}`),this}}class t_ extends ty{static #e=y=eX;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[y]=this._req[eX]||{},this.streaming=!1}get originalRequest(){return this._req[eX]=this[eX],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 tb extends tv{get originalResponse(){return tf in this&&(this._res[tf]=this[tf]),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 tx=r("./dist/compiled/fresh/index.js"),tE=r.n(tx);async function tw({req:e,res:t,result:r,generateEtags:n,poweredByHeader:i,cacheControl:s}){if(t.finished||t.headersSent)return;i&&r.contentType===te&&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,u=0,d=52210;for(;r<t;)i^=e.charCodeAt(r++),n=435*i,s=435*a,o=435*l,u=435*d,o+=i<<8,u+=a<<8,s+=n>>>16,i=65535&n,o+=s>>>16,a=65535&s,d=u+(o>>>16)&65535,l=65535&o;return(15&d)*0x1000000000000+0x100000000*l+65536*a+(i^d>>4)})(e).toString(36)+e.length.toString(36)+'"')(a);if(r&&t.setHeader("ETag",r),tE()(e.headers,{etag:r})&&(t.statusCode=304,t.end(),1))return}return(!t.getHeader("Content-Type")&&r.contentType&&t.setHeader("Content-Type",r.contentType),a&&t.setHeader("Content-Length",Buffer.byteLength(a)),"HEAD"===e.method)?void t.end(null):null!==a?void t.end(a):void await r.pipeToNodeResponse(t)}function tC(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 tR(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function tP(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:u,origin:d}=new URL(e,i);if(d!==n.origin)throw Object.defineProperty(Error(`invariant: invalid relative URL, router received ${e}`),"__NEXT_ERROR_CODE",{value:"E159",enumerable:!1,configurable:!0});return{pathname:s,query:r?tC(a):void 0,search:o,hash:l,href:u.slice(d.length),slashes:void 0}}(e);let t=new URL(e);return{hash:t.hash,hostname:t.hostname,href:t.href,pathname:t.pathname,port:t.port,protocol:t.protocol,query:tC(t.searchParams),search:t.search,origin:t.origin,slashes:"//"===t.href.slice(t.protocol.length,t.protocol.length+2)}}let tT={wait:G(F("○")),error:V(F("⨯")),warn:B(F("⚠")),ready:"▲",info:G(F(" ")),event:W(F("✓")),trace:X(F("\xbb"))},tO={log:"log",warn:"warn",error:"error"};function tS(e,...t){(""===t[0]||void 0===t[0])&&1===t.length&&t.shift();let r=e in tO?tO[e]:"log",n=tT[e];0===t.length?console[r](""):1===t.length&&"string"==typeof t[0]?console[r](" "+n+" "+t[0]):console[r](" "+n,...t)}function tI(...e){console.log(" "+e.join(" "))}function tk(...e){tS("wait",...e)}function tA(...e){tS("error",...e)}function tj(...e){tS("warn",...e)}function tN(...e){tS("ready",...e)}function t$(...e){tS("info",...e)}function tD(...e){tS("event",...e)}function tM(...e){tS("trace",...e)}let tL=new O(1e4,e=>e.length);function tZ(...e){let t=e.join(" ");tL.has(t)||(tL.set(t,t),tj(...e))}let tq=new O(1e4,e=>e.length);function tU(...e){let t=e.join(" ");tq.has(t)||(tq.set(t,t),tA(...e))}let tz="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",tF=`(${tz}[.]){3}${tz}`,tH="(?:[0-9a-fA-F]{1,4})",tV=RegExp(`^((?:${tH}:){7}(?:${tH}|:)|(?:${tH}:){6}(?:${tF}|:${tH}|:)|(?:${tH}:){5}(?::${tF}|(:${tH}){1,2}|:)|(?:${tH}:){4}(?:(:${tH}){0,1}:${tF}|(:${tH}){1,3}|:)|(?:${tH}:){3}(?:(:${tH}){0,2}:${tF}|(:${tH}){1,4}|:)|(?:${tH}:){2}(?:(:${tH}){0,3}:${tF}|(:${tH}){1,5}|:)|(?:${tH}:){1}(?:(:${tH}){0,4}:${tF}|(:${tH}){1,6}|:)|(?::((?::${tH}){0,5}:${tF}|(?::${tH}){1,7}|:)))(%[0-9a-zA-Z-.:]{1,})?$`);function tW(e){return e.startsWith("/")?e:`/${e}`}function tB(e){return tW(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 tX(e){return e.replace(/\.rsc($|\?)/,"$1")}let tG=["(..)(..)","(.)","(..)","(...)"];function tK(e){return void 0!==e.split("/").find(e=>tG.find(t=>e.startsWith(t)))}let tJ=/\/[^/]*\[[^/]+\][^/]*(?=\/|$)/,tY=/\/\[[^/]+\](?=\/|$)/;function tQ(e,t=!0){return(tK(e)&&(e=function(e){let t,r,n;for(let i of e.split("/"))if(r=tG.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=tB(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)?tY.test(e):tJ.test(e)}let t0=/[\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,t1=/Googlebot(?!-)|Googlebot$/i,t4=t0.source;function t2(){}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 t9=new TextEncoder;function t3(e){return new ReadableStream({start(t){t.enqueue(t9.encode(e)),t.close()}})}function t8(e){return new ReadableStream({start(t){t.enqueue(e),t.close()}})}async function t5(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 t6(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 t7(e){let t={},r=[];if(e)for(let[n,i]of e.entries())"set-cookie"===n.toLowerCase()?(r.push(...t6(i)),t[n]=1===r.length?r[0]:r):t[n]=i;return t}function re(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 rt(e){for(let t of[tt,tr])if(e!==t&&e.startsWith(t))return e.substring(t.length);return null}function rr(e){return e.replace(/\/$/,"")||"/"}function rn(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 ri(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:n,hash:i}=rn(e);return`${t}${r}${n}${i}`}function rs(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:n,hash:i}=rn(e);return`${r}${t}${n}${i}`}function ra(e,t){if("string"!=typeof e)return!1;let{pathname:r}=rn(e);return r===t||r.startsWith(t+"/")}function ro(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 rl=new WeakMap;function ru(e,t){let r;if(!t)return{pathname:e};let n=rl.get(t);n||(n=t.map(e=>e.toLowerCase()),rl.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 rd(e,t){if(!ra(e,t))return e;let r=e.slice(t.length);return r.startsWith("/")?r:`/${r}`}function rc(e,t){let{basePath:r,i18n:n,trailingSlash:i}=t.nextConfig??{},s={pathname:e,trailingSlash:"/"!==e?e.endsWith("/"):i};r&&ra(s.pathname,r)&&(s.pathname=rd(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):ru(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):ru(a,n.locales)).detectedLocale&&(s.locale=e.detectedLocale)}return s}let rh=/(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;function rp(e,t){return new URL(String(e).replace(rh,"localhost"),t&&String(t).replace(rh,"localhost"))}let rf=Symbol("NextURLInternal");class rm{constructor(e,t,r){let n,i;"object"==typeof t&&"pathname"in t||"string"==typeof t?(n=t,i=r||{}):i=r||t||{},this[rf]={url:rp(e,n??i.base),options:i,basePath:""},this.analyze()}analyze(){var e,t,r,n,i;let s=rc(this[rf].url.pathname,{nextConfig:this[rf].options.nextConfig,parseData:!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE,i18nProvider:this[rf].options.i18nProvider}),a=ro(this[rf].url,this[rf].options.headers);this[rf].domainLocale=this[rf].options.i18nProvider?this[rf].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[rf].options.nextConfig)||null==(e=t.i18n)?void 0:e.domains,a);let o=(null==(r=this[rf].domainLocale)?void 0:r.defaultLocale)||(null==(i=this[rf].options.nextConfig)||null==(n=i.i18n)?void 0:n.defaultLocale);this[rf].url.pathname=s.pathname,this[rf].defaultLocale=o,this[rf].basePath=s.basePath??"",this[rf].buildId=s.buildId,this[rf].locale=s.locale??o,this[rf].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&&(ra(i,"/api")||ra(i,`/${t.toLowerCase()}`))?e:ri(e,`/${t}`)}((e={basePath:this[rf].basePath,buildId:this[rf].buildId,defaultLocale:this[rf].options.forceLocale?void 0:this[rf].defaultLocale,locale:this[rf].locale,pathname:this[rf].url.pathname,trailingSlash:this[rf].trailingSlash}).pathname,e.locale,e.buildId?void 0:e.defaultLocale,e.ignorePrefix),(e.buildId||!e.trailingSlash)&&(t=rr(t)),e.buildId&&(t=rs(ri(t,`/_next/data/${e.buildId}`),"/"===e.pathname?"index.json":".json")),t=ri(t,e.basePath),!e.buildId&&e.trailingSlash?t.endsWith("/")?t:rs(t,"/"):rr(t)}formatSearch(){return this[rf].url.search}get buildId(){return this[rf].buildId}set buildId(e){this[rf].buildId=e}get locale(){return this[rf].locale??""}set locale(e){var t,r;if(!this[rf].locale||!(null==(r=this[rf].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[rf].locale=e}get defaultLocale(){return this[rf].defaultLocale}get domainLocale(){return this[rf].domainLocale}get searchParams(){return this[rf].url.searchParams}get host(){return this[rf].url.host}set host(e){this[rf].url.host=e}get hostname(){return this[rf].url.hostname}set hostname(e){this[rf].url.hostname=e}get port(){return this[rf].url.port}set port(e){this[rf].url.port=e}get protocol(){return this[rf].url.protocol}set protocol(e){this[rf].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[rf].url=rp(e),this.analyze()}get origin(){return this[rf].url.origin}get pathname(){return this[rf].url.pathname}set pathname(e){this[rf].url.pathname=e}get hash(){return this[rf].url.hash}set hash(e){this[rf].url.hash=e}get search(){return this[rf].url.search}set search(e){this[rf].url.search=e}get password(){return this[rf].url.password}set password(e){this[rf].url.password=e}get username(){return this[rf].url.username}set username(e){this[rf].url.username=e}get basePath(){return this[rf].basePath}set basePath(e){this[rf].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 rm(String(this),this[rf].options)}}class rg extends Error{constructor({page:e}){super(`The middleware "${e}" accepts an async API directly with the form:
32
32
 
33
33
  export function middleware(request, event) {
34
34
  return NextResponse.redirect('/new-location')