next
Version:
The React Framework
7 lines • 48.4 kB
JavaScript
(()=>{var e={"./dist/compiled/@edge-runtime/cookies/index.js":e=>{"use strict";var t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,a={};function s(e){var t;let r=["path"in e&&e.path&&`Path=${e.path}`,"expires"in e&&(e.expires||0===e.expires)&&`Expires=${("number"==typeof e.expires?new Date(e.expires):e.expires).toUTCString()}`,"maxAge"in e&&"number"==typeof e.maxAge&&`Max-Age=${e.maxAge}`,"domain"in e&&e.domain&&`Domain=${e.domain}`,"secure"in e&&e.secure&&"Secure","httpOnly"in e&&e.httpOnly&&"HttpOnly","sameSite"in e&&e.sameSite&&`SameSite=${e.sameSite}`,"priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean);return`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}; ${r.join("; ")}`}function i(e){let t=new Map;for(let r of e.split(/; */)){if(!r)continue;let e=r.indexOf("=");if(-1===e){t.set(r,"true");continue}let[n,o]=[r.slice(0,e),r.slice(e+1)];try{t.set(n,decodeURIComponent(null!=o?o:"true"))}catch{}}return t}function l(e){var t,r;if(!e)return;let[[n,o],...a]=i(e),{domain:s,expires:l,httponly:d,maxage:h,path:f,samesite:p,secure:m,priority:g}=Object.fromEntries(a.map(([e,t])=>[e.toLowerCase(),t])),v={name:n,value:decodeURIComponent(o),domain:s,...l&&{expires:new Date(l)},...d&&{httpOnly:!0},..."string"==typeof h&&{maxAge:Number(h)},path:f,...p&&{sameSite:u.includes(t=(t=p).toLowerCase())?t:void 0},...m&&{secure:!0},...g&&{priority:c.includes(r=(r=g).toLowerCase())?r:void 0}};return function(e){let t={};for(let r in e)e[r]&&(t[r]=e[r]);return t}(v)}((e,r)=>{for(var n in r)t(e,n,{get:r[n],enumerable:!0})})(a,{RequestCookies:()=>d,ResponseCookies:()=>h,parseCookie:()=>i,parseSetCookie:()=>l,stringifyCookie:()=>s}),e.exports=((e,a,s,i)=>{if(a&&"object"==typeof a||"function"==typeof a)for(let s of n(a))o.call(e,s)||void 0===s||t(e,s,{get:()=>a[s],enumerable:!(i=r(a,s))||i.enumerable});return e})(t({},"__esModule",{value:!0}),a);var u=["strict","lax","none"],c=["low","medium","high"],d=class{constructor(e){this._parsed=new Map,this._headers=e;let t=e.get("cookie");if(t){let e=i(t);for(let[t,r]of e)this._parsed.set(t,{name:t,value:r})}}[Symbol.iterator](){return this._parsed[Symbol.iterator]()}get size(){return this._parsed.size}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed);if(!e.length)return r.map(([e,t])=>t);let n="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(([e])=>e===n).map(([e,t])=>t)}has(e){return this._parsed.has(e)}set(...e){let[t,r]=1===e.length?[e[0].name,e[0].value]:e,n=this._parsed;return n.set(t,{name:t,value:r}),this._headers.set("cookie",Array.from(n).map(([e,t])=>s(t)).join("; ")),this}delete(e){let t=this._parsed,r=Array.isArray(e)?e.map(e=>t.delete(e)):t.delete(e);return this._headers.set("cookie",Array.from(t).map(([e,t])=>s(t)).join("; ")),r}clear(){return this.delete(Array.from(this._parsed.keys())),this}[Symbol.for("edge-runtime.inspect.custom")](){return`RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(e=>`${e.name}=${encodeURIComponent(e.value)}`).join("; ")}},h=class{constructor(e){var t,r,n;this._parsed=new Map,this._headers=e;let o=null!=(n=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?n:[],a=Array.isArray(o)?o:function(e){if(!e)return[];var t,r,n,o,a,s=[],i=0;function l(){for(;i<e.length&&/\s/.test(e.charAt(i));)i+=1;return i<e.length}for(;i<e.length;){for(t=i,a=!1;l();)if(","===(r=e.charAt(i))){for(n=i,i+=1,l(),o=i;i<e.length&&"="!==(r=e.charAt(i))&&";"!==r&&","!==r;)i+=1;i<e.length&&"="===e.charAt(i)?(a=!0,i=o,s.push(e.substring(t,n)),t=i):i=n+1}else i+=1;(!a||i>=e.length)&&s.push(e.substring(t,e.length))}return s}(o);for(let e of a){let t=l(e);t&&this._parsed.set(t.name,t)}}get(...e){let t="string"==typeof e[0]?e[0]:e[0].name;return this._parsed.get(t)}getAll(...e){var t;let r=Array.from(this._parsed.values());if(!e.length)return r;let n="string"==typeof e[0]?e[0]:null==(t=e[0])?void 0:t.name;return r.filter(e=>e.name===n)}has(e){return this._parsed.has(e)}set(...e){let[t,r,n]=1===e.length?[e[0].name,e[0].value,e[0]]:e,o=this._parsed;return o.set(t,function(e={name:"",value:""}){return"number"==typeof e.expires&&(e.expires=new Date(e.expires)),e.maxAge&&(e.expires=new Date(Date.now()+1e3*e.maxAge)),(null===e.path||void 0===e.path)&&(e.path="/"),e}({name:t,value:r,...n})),function(e,t){for(let[,r]of(t.delete("set-cookie"),e)){let e=s(r);t.append("set-cookie",e)}}(o,this._headers),this}delete(...e){let[t,r,n]="string"==typeof e[0]?[e[0]]:[e[0].name,e[0].path,e[0].domain];return this.set({name:t,path:r,domain:n,value:"",expires:new Date(0)})}[Symbol.for("edge-runtime.inspect.custom")](){return`ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`}toString(){return[...this._parsed.values()].map(s).join("; ")}}},"./dist/compiled/cookie/index.js":e=>{(()=>{"use strict";"undefined"!=typeof __nccwpck_require__&&(__nccwpck_require__.ab=__dirname+"/");var t={};(()=>{/*!
* cookie
* Copyright(c) 2012-2014 Roman Shtylman
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/t.parse=function(t,r){if("string"!=typeof t)throw TypeError("argument str must be a string");for(var o={},a=t.split(n),s=(r||{}).decode||e,i=0;i<a.length;i++){var l=a[i],u=l.indexOf("=");if(!(u<0)){var c=l.substr(0,u).trim(),d=l.substr(++u,l.length).trim();'"'==d[0]&&(d=d.slice(1,-1)),void 0==o[c]&&(o[c]=function(e,t){try{return t(e)}catch(t){return e}}(d,s))}}return o},t.serialize=function(e,t,n){var a=n||{},s=a.encode||r;if("function"!=typeof s)throw TypeError("option encode is invalid");if(!o.test(e))throw TypeError("argument name is invalid");var i=s(t);if(i&&!o.test(i))throw TypeError("argument val is invalid");var l=e+"="+i;if(null!=a.maxAge){var u=a.maxAge-0;if(isNaN(u)||!isFinite(u))throw TypeError("option maxAge is invalid");l+="; Max-Age="+Math.floor(u)}if(a.domain){if(!o.test(a.domain))throw TypeError("option domain is invalid");l+="; Domain="+a.domain}if(a.path){if(!o.test(a.path))throw TypeError("option path is invalid");l+="; Path="+a.path}if(a.expires){if("function"!=typeof a.expires.toUTCString)throw TypeError("option expires is invalid");l+="; Expires="+a.expires.toUTCString()}if(a.httpOnly&&(l+="; HttpOnly"),a.secure&&(l+="; Secure"),a.sameSite)switch("string"==typeof a.sameSite?a.sameSite.toLowerCase():a.sameSite){case!0:case"strict":l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"none":l+="; SameSite=None";break;default:throw TypeError("option sameSite is invalid")}return l};var e=decodeURIComponent,r=encodeURIComponent,n=/; */,o=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/})(),e.exports=t})()},"./dist/compiled/react/cjs/react.production.min.js":(e,t)=>{"use strict";var r=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.iterator,p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function v(e,t,r){this.props=e,this.context=t,this.refs=g,this.updater=r||p}function y(){}function b(e,t,r){this.props=e,this.context=t,this.refs=g,this.updater=r||p}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var x=b.prototype=new y;x.constructor=b,m(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray,w=Object.prototype.hasOwnProperty,R={current:null},C={key:!0,ref:!0,__self:!0,__source:!0};function _(e,t,n){var o,a={},s=null,i=null;if(null!=t)for(o in void 0!==t.ref&&(i=t.ref),void 0!==t.key&&(s=""+t.key),t)w.call(t,o)&&!C.hasOwnProperty(o)&&(a[o]=t[o]);var l=arguments.length-2;if(1===l)a.children=n;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];a.children=u}if(e&&e.defaultProps)for(o in l=e.defaultProps)void 0===a[o]&&(a[o]=l[o]);return{$$typeof:r,type:e,key:s,ref:i,props:a,_owner:R.current}}function P(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}var E=/\/+/g;function T(e,t){var r,n;return"object"==typeof e&&null!==e&&null!=e.key?(r=""+e.key,n={"=":"=0",":":"=2"},"$"+r.replace(/[=:]/g,function(e){return n[e]})):t.toString(36)}function k(e,t,o){if(null==e)return e;var a=[],s=0;return!function e(t,o,a,s,i){var l,u,c,d=typeof t;("undefined"===d||"boolean"===d)&&(t=null);var h=!1;if(null===t)h=!0;else switch(d){case"string":case"number":h=!0;break;case"object":switch(t.$$typeof){case r:case n:h=!0}}if(h)return i=i(h=t),t=""===s?"."+T(h,0):s,S(i)?(a="",null!=t&&(a=t.replace(E,"$&/")+"/"),e(i,o,a,"",function(e){return e})):null!=i&&(P(i)&&(l=i,u=a+(!i.key||h&&h.key===i.key?"":(""+i.key).replace(E,"$&/")+"/")+t,i={$$typeof:r,type:l.type,key:u,ref:l.ref,props:l.props,_owner:l._owner}),o.push(i)),1;if(h=0,s=""===s?".":s+":",S(t))for(var p=0;p<t.length;p++){var m=s+T(d=t[p],p);h+=e(d,o,a,m,i)}else if("function"==typeof(m=null===(c=t)||"object"!=typeof c?null:"function"==typeof(c=f&&c[f]||c["@@iterator"])?c:null))for(t=m.call(t),p=0;!(d=t.next()).done;)m=s+T(d=d.value,p++),h+=e(d,o,a,m,i);else if("object"===d)throw Error("Objects are not valid as a React child (found: "+("[object Object]"===(o=String(t))?"object with keys {"+Object.keys(t).join(", ")+"}":o)+"). If you meant to render a collection of children, use an array instead.");return h}(e,a,"","",function(e){return t.call(o,e,s++)}),a}function A(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){(0===e._status||-1===e._status)&&(e._status=1,e._result=t)},function(t){(0===e._status||-1===e._status)&&(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var O={current:null};function N(){return new WeakMap}function L(){return{s:0,v:void 0,o:null,p:null}}var j={current:null},I={transition:null};t.Children={map:k,forEach:function(e,t,r){k(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return k(e,function(){t++}),t},toArray:function(e){return k(e,function(e){return e})||[]},only:function(e){if(!P(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=o,t.Profiler=s,t.PureComponent=b,t.StrictMode=a,t.Suspense=c,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED={ReactCurrentDispatcher:j,ReactCurrentCache:O,ReactCurrentBatchConfig:I,ReactCurrentOwner:R},t.cache=function(e){return function(){var t=O.current;if(!t)return e.apply(null,arguments);var r=t.getCacheForType(N);void 0===(t=r.get(e))&&(t=L(),r.set(e,t)),r=0;for(var n=arguments.length;r<n;r++){var o=arguments[r];if("function"==typeof o||"object"==typeof o&&null!==o){var a=t.o;null===a&&(t.o=a=new WeakMap),void 0===(t=a.get(o))&&(t=L(),a.set(o,t))}else null===(a=t.p)&&(t.p=a=new Map),void 0===(t=a.get(o))&&(t=L(),a.set(o,t))}if(1===t.s)return t.v;if(2===t.s)throw t.v;try{var s=e.apply(null,arguments);return(r=t).s=1,r.v=s}catch(e){throw(s=t).s=2,s.v=e,e}}},t.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=m({},e.props),a=e.key,s=e.ref,i=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,i=R.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)w.call(t,u)&&!C.hasOwnProperty(u)&&(o[u]=void 0===t[u]&&void 0!==l?l[u]:t[u])}var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];o.children=l}return{$$typeof:r,type:e.type,key:a,ref:s,props:o,_owner:i}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:i,_context:e},e.Consumer=e},t.createElement=_,t.createFactory=function(e){var t=_.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=P,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:A}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=I.transition;I.transition={};try{e()}finally{I.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.unstable_useCacheRefresh=function(){return j.current.useCacheRefresh()},t.use=function(e){return j.current.use(e)},t.useCallback=function(e,t){return j.current.useCallback(e,t)},t.useContext=function(e){return j.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e,t){return j.current.useDeferredValue(e,t)},t.useEffect=function(e,t){return j.current.useEffect(e,t)},t.useId=function(){return j.current.useId()},t.useImperativeHandle=function(e,t,r){return j.current.useImperativeHandle(e,t,r)},t.useInsertionEffect=function(e,t){return j.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return j.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return j.current.useMemo(e,t)},t.useOptimistic=function(e,t){return j.current.useOptimistic(e,t)},t.useReducer=function(e,t,r){return j.current.useReducer(e,t,r)},t.useRef=function(e){return j.current.useRef(e)},t.useState=function(e){return j.current.useState(e)},t.useSyncExternalStore=function(e,t,r){return j.current.useSyncExternalStore(e,t,r)},t.useTransition=function(){return j.current.useTransition()},t.version="18.3.0-canary-2c338b16f-20231116"},"./dist/compiled/react/index.js":(e,t,r)=>{"use strict";e.exports=r("./dist/compiled/react/cjs/react.production.min.js")}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{AppRouteRouteModule:()=>eI,default:()=>eM});var e,t,o,a,s,i,l,u,c,d,h,f,p,m,g={};r.r(g),r.d(g,{DYNAMIC_ERROR_CODE:()=>eb,DynamicServerError:()=>ex});var v={};r.r(v),r.d(v,{cookies:()=>eT,draftMode:()=>ek,headers:()=>eE});var y={};r.r(y),r.d(y,{AppRouterContext:()=>eO,CacheStates:()=>m,GlobalLayoutRouterContext:()=>eL,LayoutRouterContext:()=>eN,TemplateContext:()=>ej});var b={};r.r(b),r.d(b,{appRouterContext:()=>y});class x{constructor({userland:e,definition:t}){this.userland=e,this.definition=t}}let S=[["RSC"],["Next-Router-State-Tree"],["Next-Router-Prefetch"]];class w{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 R extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers")}static callable(){throw new R}}class C extends Headers{constructor(e){super(),this.headers=new Proxy(e,{get(t,r,n){if("symbol"==typeof r)return w.get(t,r,n);let o=r.toLowerCase(),a=Object.keys(e).find(e=>e.toLowerCase()===o);if(void 0!==a)return w.get(t,a,n)},set(t,r,n,o){if("symbol"==typeof r)return w.set(t,r,n,o);let a=r.toLowerCase(),s=Object.keys(e).find(e=>e.toLowerCase()===a);return w.set(t,s??r,n,o)},has(t,r){if("symbol"==typeof r)return w.has(t,r);let n=r.toLowerCase(),o=Object.keys(e).find(e=>e.toLowerCase()===n);return void 0!==o&&w.has(t,o)},deleteProperty(t,r){if("symbol"==typeof r)return w.deleteProperty(t,r);let n=r.toLowerCase(),o=Object.keys(e).find(e=>e.toLowerCase()===n);return void 0===o||w.deleteProperty(t,o)}})}static seal(e){return new Proxy(e,{get(e,t,r){switch(t){case"append":case"delete":case"set":return R.callable;default:return w.get(e,t,r)}}})}merge(e){return Array.isArray(e)?e.join(", "):e}static from(e){return e instanceof Headers?e:new C(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()}}var _=r("./dist/compiled/@edge-runtime/cookies/index.js");class P extends Error{constructor(){super("Cookies can only be modified in a Server Action or Route Handler. Read more: https://nextjs.org/docs/app/api-reference/functions/cookies#cookiessetname-value-options")}static callable(){throw new P}}class E{static seal(e){return new Proxy(e,{get(e,t,r){switch(t){case"clear":case"delete":case"set":return P.callable;default:return w.get(e,t,r)}}})}}let T=Symbol.for("next.mutated.cookies");function k(e,t){let r=function(e){let t=e[T];return t&&Array.isArray(t)&&0!==t.length?t:[]}(t);if(0===r.length)return!1;let n=new _.ResponseCookies(e),o=n.getAll();for(let e of r)n.set(e);for(let e of o)n.set(e);return!0}class A{static wrap(e,t){let r=new _.ResponseCookies(new Headers);for(let t of e.getAll())r.set(t);let n=[],o=new Set,a=()=>{var e;let a=null==fetch.__nextGetStaticStore?void 0:null==(e=fetch.__nextGetStaticStore.call(fetch))?void 0:e.getStore();a&&(a.pathWasRevalidated=!0);let s=r.getAll();if(n=s.filter(e=>o.has(e.name)),t){let e=[];for(let t of n){let r=new _.ResponseCookies(new Headers);r.set(t),e.push(r.toString())}t(e)}};return new Proxy(r,{get(e,t,r){switch(t){case T:return n;case"delete":return function(...t){o.add("string"==typeof t[0]?t[0]:t[0].name);try{e.delete(...t)}finally{a()}};case"set":return function(...t){o.add("string"==typeof t[0]?t[0]:t[0].name);try{return e.set(...t)}finally{a()}};default:return w.get(e,t,r)}}})}}let O="_N_T_",N={shared:"shared",reactServerComponents:"rsc",serverSideRendering:"ssr",actionBrowser:"action-browser",api:"api",middleware:"middleware",edgeAsset:"edge-asset",appPagesBrowser:"app-pages-browser",appMetadataRoute:"app-metadata-route",appRouteHandler:"app-route-handler"};({...N,GROUP:{server:[N.reactServerComponents,N.actionBrowser,N.appMetadataRoute,N.appRouteHandler],nonClientServerTarget:[N.middleware,N.api],app:[N.reactServerComponents,N.actionBrowser,N.appMetadataRoute,N.appRouteHandler,N.serverSideRendering,N.appPagesBrowser]}});let L="__prerender_bypass";Symbol("__next_preview_data"),Symbol(L);class j{constructor(e,t,r,n){var o;let a=e&&function(e,t){let r=C.from(e.headers),n=r.get("x-prerender-revalidate"),o=n===t.previewModeId,a=r.has("x-prerender-revalidate-if-generated");return{isOnDemandRevalidate:o,revalidateOnlyGenerated:a}}(t,e).isOnDemandRevalidate,s=null==(o=r.get(L))?void 0:o.value;this.isEnabled=!!(!a&&s&&e&&s===e.previewModeId),this._previewModeId=null==e?void 0:e.previewModeId,this._mutableCookies=n}enable(){if(!this._previewModeId)throw Error("Invariant: previewProps missing previewModeId this should never happen");this._mutableCookies.set({name:L,value:this._previewModeId,httpOnly:!0,sameSite:"none",secure:!0,path:"/"})}disable(){this._mutableCookies.set({name:L,value:"",httpOnly:!0,sameSite:"none",secure:!0,path:"/",expires:new Date(0)})}}let I={wrap(e,{req:t,res:r,renderOpts:n},o){let a;function s(e){r&&r.setHeader("Set-Cookie",e)}n&&"previewProps"in n&&(a=n.previewProps);let i={},l={get headers(){return i.headers||(i.headers=function(e){let t=C.from(e);for(let e of S)t.delete(e.toString().toLowerCase());return C.seal(t)}(t.headers)),i.headers},get cookies(){return i.cookies||(i.cookies=function(e){let t=new _.RequestCookies(C.from(e));return E.seal(t)}(t.headers)),i.cookies},get mutableCookies(){return i.mutableCookies||(i.mutableCookies=function(e,t){let r=new _.RequestCookies(C.from(e));return A.wrap(r,t)}(t.headers,(null==n?void 0:n.onUpdateCookies)||(r?s:void 0))),i.mutableCookies},get draftMode(){return i.draftMode||(i.draftMode=new j(a,t,this.cookies,this.mutableCookies)),i.draftMode}};return e.run(l,o,l)}},M={wrap(e,{urlPathname:t,renderOpts:r,postpone:n},o){let a=!r.supportsDynamicHTML&&!r.isDraftMode&&!r.isServerAction,s={isStaticGeneration:a,urlPathname:t,pagePath:r.originalPathname,incrementalCache:r.incrementalCache||globalThis.__incrementalCache,isRevalidate:r.isRevalidate,isPrerendering:r.nextExport,fetchCache:r.fetchCache,isOnDemandRevalidate:r.isOnDemandRevalidate,isDraftMode:r.isDraftMode,experimental:r.experimental,postpone:n};return r.store=s,e.run(s,o,s)}};function $(){return new Response(null,{status:400})}function H(){return new Response(null,{status:405})}let D=["GET","HEAD","OPTIONS","POST","PUT","DELETE","PATCH"];(function(e){e.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||(e={})),function(e){e.loadDefaultErrorComponents="LoadComponents.loadDefaultErrorComponents",e.loadComponents="LoadComponents.loadComponents"}(t||(t={})),function(e){e.getRequestHandler="NextServer.getRequestHandler",e.getServer="NextServer.getServer",e.getServerRequestHandler="NextServer.getServerRequestHandler",e.createServer="createServer.createServer"}(o||(o={})),function(e){e.compression="NextNodeServer.compression",e.getBuildId="NextNodeServer.getBuildId",e.generateStaticRoutes="NextNodeServer.generateStaticRoutes",e.generateFsStaticRoutes="NextNodeServer.generateFsStaticRoutes",e.generatePublicRoutes="NextNodeServer.generatePublicRoutes",e.generateImageRoutes="NextNodeServer.generateImageRoutes.route",e.sendRenderResult="NextNodeServer.sendRenderResult",e.proxyRequest="NextNodeServer.proxyRequest",e.runApi="NextNodeServer.runApi",e.render="NextNodeServer.render",e.renderHTML="NextNodeServer.renderHTML",e.imageOptimizer="NextNodeServer.imageOptimizer",e.getPagePath="NextNodeServer.getPagePath",e.getRoutesManifest="NextNodeServer.getRoutesManifest",e.findPageComponents="NextNodeServer.findPageComponents",e.getFontManifest="NextNodeServer.getFontManifest",e.getServerComponentManifest="NextNodeServer.getServerComponentManifest",e.getRequestHandler="NextNodeServer.getRequestHandler",e.renderToHTML="NextNodeServer.renderToHTML",e.renderError="NextNodeServer.renderError",e.renderErrorToHTML="NextNodeServer.renderErrorToHTML",e.render404="NextNodeServer.render404",e.route="route",e.onProxyReq="onProxyReq",e.apiResolver="apiResolver",e.internalFetch="internalFetch"}(a||(a={})),(s||(s={})).startServer="startServer.startServer",function(e){e.getServerSideProps="Render.getServerSideProps",e.getStaticProps="Render.getStaticProps",e.renderToString="Render.renderToString",e.renderDocument="Render.renderDocument",e.createBodyResult="Render.createBodyResult"}(i||(i={})),function(e){e.renderToString="AppRender.renderToString",e.renderToReadableStream="AppRender.renderToReadableStream",e.getBodyResult="AppRender.getBodyResult",e.fetch="AppRender.fetch"}(l||(l={})),(u||(u={})).executeRoute="Router.executeRoute",(c||(c={})).runHandler="Node.runHandler",(d||(d={})).runHandler="AppRouteRouteHandlers.runHandler",function(e){e.generateMetadata="ResolveMetadata.generateMetadata",e.generateViewport="ResolveMetadata.generateViewport"}(h||(h={}));let q=require("next/dist/server/lib/trace/tracer"),{env:U,stdout:B}=(null==(f=globalThis)?void 0:f.process)??{},G=U&&!U.NO_COLOR&&(U.FORCE_COLOR||(null==B?void 0:B.isTTY)&&!U.CI&&"dumb"!==U.TERM),F=(e,t,r,n)=>{let o=e.substring(0,n)+r,a=e.substring(n+t.length),s=a.indexOf(t);return~s?o+F(a,t,r,s):o+a},W=(e,t,r=e)=>n=>{let o=""+n,a=o.indexOf(t,e.length);return~a?e+F(o,t,r,a)+t:e+o+t},z=G?W("\x1b[1m","\x1b[22m","\x1b[22m\x1b[1m"):String;G&&W("\x1b[2m","\x1b[22m","\x1b[22m\x1b[2m"),G&&W("\x1b[3m","\x1b[23m"),G&&W("\x1b[4m","\x1b[24m"),G&&W("\x1b[7m","\x1b[27m"),G&&W("\x1b[8m","\x1b[28m"),G&&W("\x1b[9m","\x1b[29m"),G&&W("\x1b[30m","\x1b[39m");let V=G?W("\x1b[31m","\x1b[39m"):String,Y=G?W("\x1b[32m","\x1b[39m"):String,Z=G?W("\x1b[33m","\x1b[39m"):String;G&&W("\x1b[34m","\x1b[39m");let J=G?W("\x1b[35m","\x1b[39m"):String;G&&W("\x1b[38;2;173;127;168m","\x1b[39m"),G&&W("\x1b[36m","\x1b[39m");let X=G?W("\x1b[37m","\x1b[39m"):String;G&&W("\x1b[90m","\x1b[39m"),G&&W("\x1b[40m","\x1b[49m"),G&&W("\x1b[41m","\x1b[49m"),G&&W("\x1b[42m","\x1b[49m"),G&&W("\x1b[43m","\x1b[49m"),G&&W("\x1b[44m","\x1b[49m"),G&&W("\x1b[45m","\x1b[49m"),G&&W("\x1b[46m","\x1b[49m"),G&&W("\x1b[47m","\x1b[49m");let K={wait:X(z("○")),error:V(z("⨯")),warn:Z(z("⚠")),ready:"▲",info:X(z(" ")),event:Y(z("✓")),trace:J(z("\xbb"))},Q={log:"log",warn:"warn",error:"error"};function ee(e,t){if(e.isStaticGeneration&&e.experimental.ppr){if(!e.postpone)throw Error("Invariant: PPR is enabled but the postpone API is unavailable");e.postponeWasTriggered=!0,e.postpone("This page needs to bail out of prerendering at this point because it used "+t+". 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")}}let et=e=>{let t=["/layout"];if(e.startsWith("/")){let r=e.split("/");for(let e=1;e<r.length+1;e++){let n=r.slice(0,e).join("/");n&&(n.endsWith("/page")||n.endsWith("/route")||(n=`${n}${n.endsWith("/")?"":"/"}layout`),t.push(n))}}return t};function er(e){var t,r;let n=[],{pagePath:o,urlPathname:a}=e;if(Array.isArray(e.tags)||(e.tags=[]),o){let r=et(o);for(let o of r)o=`${O}${o}`,(null==(t=e.tags)?void 0:t.includes(o))||e.tags.push(o),n.push(o)}if(a){let t=new URL(a,"http://n").pathname,o=`${O}${t}`;(null==(r=e.tags)?void 0:r.includes(o))||e.tags.push(o),n.push(o)}return n}function en(e,t){if(!e)return;e.fetchMetrics||(e.fetchMetrics=[]);let r=["url","status","method"];e.fetchMetrics.some(e=>r.every(r=>e[r]===t[r]))||e.fetchMetrics.push({url:t.url,cacheStatus:t.cacheStatus,cacheReason:t.cacheReason,status:t.status,method:t.method,start:t.start,end:Date.now(),idx:e.nextFetchId||0})}function eo(e){return e.replace(/\/$/,"")||"/"}function ea(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 es(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:n,hash:o}=ea(e);return""+t+r+n+o}function ei(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:n,hash:o}=ea(e);return""+r+t+n+o}function el(e,t){if("string"!=typeof e)return!1;let{pathname:r}=ea(e);return r===t||r.startsWith(t+"/")}function eu(e,t){let r;let n=e.split("/");return(t||[]).some(t=>!!n[1]&&n[1].toLowerCase()===t.toLowerCase()&&(r=t,n.splice(1,1),e=n.join("/")||"/",!0)),{pathname:e,detectedLocale:r}}let ec=/(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;function ed(e,t){return new URL(String(e).replace(ec,"localhost"),t&&String(t).replace(ec,"localhost"))}let eh=Symbol("NextURLInternal");class ef{constructor(e,t,r){let n,o;"object"==typeof t&&"pathname"in t||"string"==typeof t?(n=t,o=r||{}):o=r||t||{},this[eh]={url:ed(e,n??o.base),options:o,basePath:""},this.analyze()}analyze(){var e,t,r,n,o;let a=function(e,t){var r,n;let{basePath:o,i18n:a,trailingSlash:s}=null!=(r=t.nextConfig)?r:{},i={pathname:e,trailingSlash:"/"!==e?e.endsWith("/"):s};o&&el(i.pathname,o)&&(i.pathname=function(e,t){if(!el(e,t))return e;let r=e.slice(t.length);return r.startsWith("/")?r:"/"+r}(i.pathname,o),i.basePath=o);let l=i.pathname;if(i.pathname.startsWith("/_next/data/")&&i.pathname.endsWith(".json")){let e=i.pathname.replace(/^\/_next\/data\//,"").replace(/\.json$/,"").split("/"),r=e[0];i.buildId=r,l="index"!==e[1]?"/"+e.slice(1).join("/"):"/",!0===t.parseData&&(i.pathname=l)}if(a){let e=t.i18nProvider?t.i18nProvider.analyze(i.pathname):eu(i.pathname,a.locales);i.locale=e.detectedLocale,i.pathname=null!=(n=e.pathname)?n:i.pathname,!e.detectedLocale&&i.buildId&&(e=t.i18nProvider?t.i18nProvider.analyze(l):eu(l,a.locales)).detectedLocale&&(i.locale=e.detectedLocale)}return i}(this[eh].url.pathname,{nextConfig:this[eh].options.nextConfig,parseData:!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE,i18nProvider:this[eh].options.i18nProvider}),s=function(e,t){let r;if((null==t?void 0:t.host)&&!Array.isArray(t.host))r=t.host.toString().split(":",1)[0];else{if(!e.hostname)return;r=e.hostname}return r.toLowerCase()}(this[eh].url,this[eh].options.headers);this[eh].domainLocale=this[eh].options.i18nProvider?this[eh].options.i18nProvider.detectDomainLocale(s):function(e,t,r){if(e)for(let a of(r&&(r=r.toLowerCase()),e)){var n,o;let e=null==(n=a.domain)?void 0:n.split(":",1)[0].toLowerCase();if(t===e||r===a.defaultLocale.toLowerCase()||(null==(o=a.locales)?void 0:o.some(e=>e.toLowerCase()===r)))return a}}(null==(t=this[eh].options.nextConfig)?void 0:null==(e=t.i18n)?void 0:e.domains,s);let i=(null==(r=this[eh].domainLocale)?void 0:r.defaultLocale)||(null==(o=this[eh].options.nextConfig)?void 0:null==(n=o.i18n)?void 0:n.defaultLocale);this[eh].url.pathname=a.pathname,this[eh].defaultLocale=i,this[eh].basePath=a.basePath??"",this[eh].buildId=a.buildId,this[eh].locale=a.locale??i,this[eh].trailingSlash=a.trailingSlash}formatPathname(){var e;let t;return t=function(e,t,r,n){if(!t||t===r)return e;let o=e.toLowerCase();return!n&&(el(o,"/api")||el(o,"/"+t.toLowerCase()))?e:es(e,"/"+t)}((e={basePath:this[eh].basePath,buildId:this[eh].buildId,defaultLocale:this[eh].options.forceLocale?void 0:this[eh].defaultLocale,locale:this[eh].locale,pathname:this[eh].url.pathname,trailingSlash:this[eh].trailingSlash}).pathname,e.locale,e.buildId?void 0:e.defaultLocale,e.ignorePrefix),(e.buildId||!e.trailingSlash)&&(t=eo(t)),e.buildId&&(t=ei(es(t,"/_next/data/"+e.buildId),"/"===e.pathname?"index.json":".json")),t=es(t,e.basePath),!e.buildId&&e.trailingSlash?t.endsWith("/")?t:ei(t,"/"):eo(t)}formatSearch(){return this[eh].url.search}get buildId(){return this[eh].buildId}set buildId(e){this[eh].buildId=e}get locale(){return this[eh].locale??""}set locale(e){var t,r;if(!this[eh].locale||!(null==(r=this[eh].options.nextConfig)?void 0:null==(t=r.i18n)?void 0:t.locales.includes(e)))throw TypeError(`The NextURL configuration includes no locale "${e}"`);this[eh].locale=e}get defaultLocale(){return this[eh].defaultLocale}get domainLocale(){return this[eh].domainLocale}get searchParams(){return this[eh].url.searchParams}get host(){return this[eh].url.host}set host(e){this[eh].url.host=e}get hostname(){return this[eh].url.hostname}set hostname(e){this[eh].url.hostname=e}get port(){return this[eh].url.port}set port(e){this[eh].url.port=e}get protocol(){return this[eh].url.protocol}set protocol(e){this[eh].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[eh].url=ed(e),this.analyze()}get origin(){return this[eh].url.origin}get pathname(){return this[eh].url.pathname}set pathname(e){this[eh].url.pathname=e}get hash(){return this[eh].url.hash}set hash(e){this[eh].url.hash=e}get search(){return this[eh].url.search}set search(e){this[eh].url.search=e}get password(){return this[eh].url.password}set password(e){this[eh].url.password=e}get username(){return this[eh].url.username}set username(e){this[eh].url.username=e}get basePath(){return this[eh].basePath}set basePath(e){this[eh].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 ef(String(this),this[eh].options)}}function ep(e){let t=new URL(e);return t.host="localhost:3000",t.search="",t.protocol="http",t.toString()}let em=require("next/dist/client/components/request-async-storage.external.js");function eg(e){if("string"!=typeof(null==e?void 0:e.digest))return!1;let[t,r,n,o]=e.digest.split(";",4);return"NEXT_REDIRECT"===t&&("replace"===r||"push"===r)&&"string"==typeof n&&("true"===o||"false"===o)}!function(e){e.push="push",e.replace="replace"}(p||(p={}));let ev=["HEAD","OPTIONS"],ey=["OPTIONS","POST","PUT","DELETE","PATCH"],eb="DYNAMIC_SERVER_USAGE";class ex extends Error{constructor(e){super("Dynamic server usage: "+e),this.digest=eb}}let eS=require("next/dist/client/components/action-async-storage.external.js"),ew=require("next/dist/client/components/static-generation-async-storage.external.js");class eR extends Error{constructor(...e){super(...e),this.code="NEXT_STATIC_GEN_BAILOUT"}}function eC(e,t){let{dynamic:r,link:n}=t||{};return"Page"+(r?' with `dynamic = "'+r+'"`':"")+" couldn't be rendered statically because it used `"+e+"`."+(n?" See more info here: "+n:"")}let e_=(e,t)=>{let r=ew.staticGenerationAsyncStorage.getStore();if(!r)return!1;if(r.forceStatic)return!0;if(r.dynamicShouldError){var n;throw new eR(eC(e,{...t,dynamic:null!=(n=null==t?void 0:t.dynamic)?n:"error"}))}let o=eC(e,{...t,link:"https://nextjs.org/docs/messages/dynamic-server-error"});if(ee(r,e),r.revalidate=0,(null==t?void 0:t.dynamic)||(r.staticPrefetchBailout=!0),r.isStaticGeneration){let t=new ex(o);throw r.dynamicUsageDescription=e,r.dynamicUsageStack=t.stack,t}return!1};class eP{get isEnabled(){return this._provider.isEnabled}enable(){if(!e_("draftMode().enable()"))return this._provider.enable()}disable(){if(!e_("draftMode().disable()"))return this._provider.disable()}constructor(e){this._provider=e}}function eE(){if(e_("headers",{link:"https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering"}))return C.seal(new Headers({}));let e=em.requestAsyncStorage.getStore();if(!e)throw Error("Invariant: headers() expects to have requestAsyncStorage, none available.");return e.headers}function eT(){if(e_("cookies",{link:"https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering"}))return E.seal(new _.RequestCookies(new Headers({})));let e=em.requestAsyncStorage.getStore();if(!e)throw Error("Invariant: cookies() expects to have requestAsyncStorage, none available.");let t=eS.actionAsyncStorage.getStore();return t&&(t.isAction||t.isAppRoute)?e.mutableCookies:e.cookies}function ek(){let e=em.requestAsyncStorage.getStore();if(!e)throw Error("Invariant: draftMode() expects to have requestAsyncStorage, none available.");return new eP(e.draftMode)}var eA=r("./dist/compiled/react/index.js");!function(e){e.LAZY_INITIALIZED="LAZYINITIALIZED",e.DATA_FETCH="DATAFETCH",e.READY="READY"}(m||(m={}));let eO=eA.createContext(null),eN=eA.createContext(null),eL=eA.createContext(null),ej=eA.createContext(null);class eI extends x{static #e=this.sharedModules=b;constructor({userland:e,definition:t,resolvedPagePath:r,nextConfigOutput:n}){if(super({userland:e,definition:t}),this.requestAsyncStorage=em.requestAsyncStorage,this.staticGenerationAsyncStorage=ew.staticGenerationAsyncStorage,this.serverHooks=g,this.headerHooks=v,this.staticGenerationBailout=e_,this.actionAsyncStorage=eS.actionAsyncStorage,this.resolvedPagePath=r,this.nextConfigOutput=n,this.methods=function(e){let t=D.reduce((t,r)=>({...t,[r]:e[r]??H}),{}),r=new Set(D.filter(t=>e[t])),n=ev.filter(e=>!r.has(e));for(let o of n){if("HEAD"===o){if(!e.GET)break;t.HEAD=e.GET,r.add("HEAD");continue}if("OPTIONS"===o){let e=["OPTIONS",...r];!r.has("HEAD")&&r.has("GET")&&e.push("HEAD");let n={Allow:e.sort().join(", ")};t.OPTIONS=()=>new Response(null,{status:204,headers:n}),r.add("OPTIONS");continue}throw Error(`Invariant: should handle all automatic implementable methods, got method: ${o}`)}return t}(e),this.nonStaticMethods=function(e){let t=ey.filter(t=>e[t]);return 0!==t.length&&t}(e),this.dynamic=this.userland.dynamic,"export"===this.nextConfigOutput){if(this.dynamic&&"auto"!==this.dynamic){if("force-dynamic"===this.dynamic)throw Error(`export const dynamic = "force-dynamic" on page "${t.pathname}" cannot be used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export`)}else this.dynamic="error"}}resolve(e){return D.includes(e)?this.methods[e]:$}async execute(e,t){let r=this.resolve(e.method),n={req:e};n.renderOpts={previewProps:t.prerenderManifest.preview};let o={urlPathname:e.nextUrl.pathname,renderOpts:t.renderOpts};o.renderOpts.fetchCache=this.userland.fetchCache;let s=await this.actionAsyncStorage.run({isAppRoute:!0},()=>I.wrap(this.requestAsyncStorage,n,()=>M.wrap(this.staticGenerationAsyncStorage,o,n=>{var o;switch(this.nonStaticMethods&&this.staticGenerationBailout(`non-static methods used ${this.nonStaticMethods.join(", ")}`),this.dynamic){case"force-dynamic":n.forceDynamic=!0,this.staticGenerationBailout("force-dynamic",{dynamic:this.dynamic});break;case"force-static":n.forceStatic=!0;break;case"error":n.dynamicShouldError=!0}n.revalidate??=this.userland.revalidate??!1;let s=function(e,{dynamic:t},r){function n(e){switch(e){case"search":case"searchParams":case"toString":case"href":case"origin":r.staticGenerationBailout(`nextUrl.${e}`);return;default:return}}let o={},a=(e,t)=>{switch(t){case"search":return"";case"searchParams":return o.searchParams||(o.searchParams=new URLSearchParams),o.searchParams;case"url":case"href":return o.url||(o.url=ep(e)),o.url;case"toJSON":case"toString":return o.url||(o.url=ep(e)),o.toString||(o.toString=()=>o.url),o.toString;case"headers":return o.headers||(o.headers=new Headers),o.headers;case"cookies":return o.headers||(o.headers=new Headers),o.cookies||(o.cookies=new _.RequestCookies(o.headers)),o.cookies;case"clone":return o.url||(o.url=ep(e)),()=>new ef(o.url)}},s=new Proxy(e.nextUrl,{get(e,r){if(n(r),"force-static"===t&&"string"==typeof r){let t=a(e.href,r);if(void 0!==t)return t}let o=e[r];return"function"==typeof o?o.bind(e):o},set:(e,t,r)=>(n(t),e[t]=r,!0)}),i=e=>{switch(e){case"headers":r.headerHooks.headers();return;case"url":case"cookies":case"body":case"blob":case"json":case"text":case"arrayBuffer":case"formData":r.staticGenerationBailout(`request.${e}`);return;default:return}};return new Proxy(e,{get(e,r){if(i(r),"nextUrl"===r)return s;if("force-static"===t&&"string"==typeof r){let t=a(e.url,r);if(void 0!==t)return t}let n=e[r];return"function"==typeof n?n.bind(e):n},set:(e,t,r)=>(i(t),e[t]=r,!0)})}(e,{dynamic:this.dynamic},{headerHooks:this.headerHooks,serverHooks:this.serverHooks,staticGenerationBailout:this.staticGenerationBailout}),i=function(e){let t="/app/";e.includes(t)||(t="\\app\\");let[,...r]=e.split(t),n=t[0]+r.join(t),o=n.split(".").slice(0,-1).join(".");return o}(this.resolvedPagePath);return null==(o=(0,q.getTracer)().getRootSpanAttributes())||o.set("next.route",i),(0,q.getTracer)().trace(d.runHandler,{spanName:`executing api route (app) ${i}`,attributes:{"next.route":i}},async()=>{var e;!function({serverHooks:e,staticGenerationAsyncStorage:t}){if(globalThis._nextOriginalFetch||(globalThis._nextOriginalFetch=globalThis.fetch),globalThis.fetch.__nextPatched)return;let{DynamicServerError:r}=e,n=globalThis._nextOriginalFetch;globalThis.fetch=async(e,o)=>{var s,i;let u;try{(u=new URL(e instanceof Request?e.url:e)).username="",u.password=""}catch{u=void 0}let c=(null==u?void 0:u.href)??"",d=Date.now(),h=(null==o?void 0:null==(s=o.method)?void 0:s.toUpperCase())||"GET",f=(null==(i=null==o?void 0:o.next)?void 0:i.internal)===!0;return await (0,q.getTracer)().trace(f?a.internalFetch:l.fetch,{kind:q.SpanKind.CLIENT,spanName:["fetch",h,c].filter(Boolean).join(" "),attributes:{"http.url":c,"http.method":h,"net.peer.name":null==u?void 0:u.hostname,"net.peer.port":(null==u?void 0:u.port)||void 0}},async()=>{var a;let s,i,l;let u=t.getStore()||(null==fetch.__nextGetStaticStore?void 0:fetch.__nextGetStaticStore.call(fetch)),h=e&&"object"==typeof e&&"string"==typeof e.method,p=t=>(h?e[t]:null)||(null==o?void 0:o[t]);if(!u||f||u.isDraftMode)return n(e,o);let m=t=>{var r,n,a;return void 0!==(null==o?void 0:null==(r=o.next)?void 0:r[t])?null==o?void 0:null==(n=o.next)?void 0:n[t]:h?null==(a=e.next)?void 0:a[t]:void 0},g=m("revalidate"),v=function(e,t){let r=[],n=[];for(let t of e)"string"!=typeof t?n.push({tag:t,reason:"invalid type, must be a string"}):t.length>256?n.push({tag:t,reason:"exceeded max length of 256"}):r.push(t);if(n.length>0)for(let{tag:e,reason:r}of(console.warn(`Warning: invalid tags passed to ${t}: `),n))console.log(`tag: "${e}" ${r}`);return r}(m("tags")||[],`fetch ${e.toString()}`);if(Array.isArray(v))for(let e of(u.tags||(u.tags=[]),v))u.tags.includes(e)||u.tags.push(e);let y=er(u),b="only-cache"===u.fetchCache,x="force-cache"===u.fetchCache,S="default-cache"===u.fetchCache,w="default-no-store"===u.fetchCache,R="only-no-store"===u.fetchCache,C="force-no-store"===u.fetchCache,_=p("cache"),P="";"string"==typeof _&&void 0!==g&&(h&&"default"===_||function(...e){(function(e,...t){(""===t[0]||void 0===t[0])&&1===t.length&&t.shift();let r=e in Q?Q[e]:"log",n=K[e];0===t.length?console[r](""):console[r](" "+n,...t)})("warn",...e)}(`fetch for ${c} on ${u.urlPathname} specified "cache: ${_}" and "revalidate: ${g}", only one should be specified.`),_=void 0),"force-cache"===_?g=!1:("no-cache"===_||"no-store"===_||C||R)&&(g=0),("no-cache"===_||"no-store"===_)&&(P=`cache: ${_}`),("number"==typeof g||!1===g)&&(l=g);let E=p("headers"),T="function"==typeof(null==E?void 0:E.get)?E:new Headers(E||{}),k=T.get("authorization")||T.get("cookie"),A=!["get","head"].includes((null==(a=p("method"))?void 0:a.toLowerCase())||"get"),O=(k||A)&&0===u.revalidate;if(C&&(P="fetchCache = force-no-store"),R){if("force-cache"===_||void 0!==l&&(!1===l||l>0))throw Error(`cache: 'force-cache' used on fetch for ${c} with 'export const fetchCache = 'only-no-store'`);P="fetchCache = only-no-store"}if(b&&"no-store"===_)throw Error(`cache: 'no-store' used on fetch for ${c} with 'export const fetchCache = 'only-cache'`);x&&(void 0===g||0===g)&&(P="fetchCache = force-cache",l=!1),void 0===l?S?(l=!1,P="fetchCache = default-cache"):O?(l=0,P="auto no cache"):w?(l=0,P="fetchCache = default-no-store"):(P="auto cache",l="boolean"!=typeof u.revalidate&&void 0!==u.revalidate&&u.revalidate):P||(P=`revalidate: ${l}`),!O&&(void 0===u.revalidate||"number"==typeof l&&(!1===u.revalidate||"number"==typeof u.revalidate&&l<u.revalidate))&&(0===l&&ee(u,"revalidate: 0"),u.revalidate=l);let N="number"==typeof l&&l>0||!1===l;if(u.incrementalCache&&N)try{s=await u.incrementalCache.fetchCacheKey(c,h?e:o)}catch(t){console.error("Failed to generate cache key for",e)}let L=u.nextFetchId??1;u.nextFetchId=L+1;let j="number"!=typeof l?31536e3:l,I=async(t,r)=>{let a=["cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","window","duplex",...t?[]:["signal"]];if(h){let t=e,r={body:t._ogBody||t.body};for(let e of a)r[e]=t[e];e=new Request(t.url,r)}else if(o){let e=o;for(let t of(o={body:o._ogBody||o.body},a))o[t]=e[t]}let i={...o,next:{...null==o?void 0:o.next,fetchType:"origin",fetchIdx:L}};return n(e,i).then(async n=>{if(t||en(u,{start:d,url:c,cacheReason:r||P,cacheStatus:0===l||r?"skip":"miss",status:n.status,method:i.method||"GET"}),200===n.status&&u.incrementalCache&&s&&N){let t=Buffer.from(await n.arrayBuffer());try{await u.incrementalCache.set(s,{kind:"FETCH",data:{headers:Object.fromEntries(n.headers.entries()),body:t.toString("base64"),status:n.status,url:n.url},revalidate:j},{fetchCache:!0,revalidate:l,fetchUrl:c,fetchIdx:L,tags:v})}catch(t){console.warn("Failed to set fetch cache",e,t)}let r=new Response(t,{headers:new Headers(n.headers),status:n.status});return Object.defineProperty(r,"url",{value:n.url}),r}return n})},M=()=>Promise.resolve();if(s&&u.incrementalCache){M=await u.incrementalCache.lock(s);let e=u.isOnDemandRevalidate?null:await u.incrementalCache.get(s,{kindHint:"fetch",revalidate:l,fetchUrl:c,fetchIdx:L,tags:v,softTags:y});if(e?await M():i="cache-control: no-cache (hard refresh)",(null==e?void 0:e.value)&&"FETCH"===e.value.kind&&!(u.isRevalidate&&e.isStale)){e.isStale&&(u.pendingRevalidates||(u.pendingRevalidates=[]),u.pendingRevalidates.push(I(!0).catch(console.error)));let t=e.value.data;en(u,{start:d,url:c,cacheReason:P,cacheStatus:"hit",status:t.status||200,method:(null==o?void 0:o.method)||"GET"});let r=new Response(Buffer.from(t.body,"base64"),{headers:t.headers,status:t.status});return Object.defineProperty(r,"url",{value:e.value.data.url}),r}}if(u.isStaticGeneration&&o&&"object"==typeof o){let{cache:t}=o;if("no-store"===t){let t=`no-store fetch ${e}${u.urlPathname?` ${u.urlPathname}`:""}`,n=new r(t);u.dynamicUsageErr=n,u.dynamicUsageStack=n.stack,u.dynamicUsageDescription=t,ee(u,t),u.revalidate=0}let n="next"in o,{next:a={}}=o;if("number"==typeof a.revalidate&&(void 0===u.revalidate||"number"==typeof u.revalidate&&a.revalidate<u.revalidate)){let t=u.forceDynamic;if(!t&&0===a.revalidate){let t=`revalidate: 0 fetch ${e}${u.urlPathname?` ${u.urlPathname}`:""}`,n=new r(t);u.dynamicUsageErr=n,u.dynamicUsageStack=n.stack,u.dynamicUsageDescription=t,ee(u,t)}t&&0===a.revalidate||(u.revalidate=a.revalidate)}n&&delete o.next}return I(!1,i).finally(M)})},globalThis.fetch.__nextGetStaticStore=()=>t,globalThis.fetch.__nextPatched=!0}({serverHooks:this.serverHooks,staticGenerationAsyncStorage:this.staticGenerationAsyncStorage});let o=await r(s,{params:t.params?function(e){let t={};for(let[r,n]of Object.entries(e))void 0!==n&&(t[r]=n);return t}(t.params):void 0});if(!(o instanceof Response))throw Error(`No response is returned from route handler '${this.resolvedPagePath}'. Ensure you return a \`Response\` or a \`NextResponse\` in all branches of your handler.`);t.renderOpts.fetchMetrics=n.fetchMetrics,t.renderOpts.waitUntil=Promise.all(n.pendingRevalidates||[]),er(n),t.renderOpts.fetchTags=null==(e=n.tags)?void 0:e.join(",");let i=this.requestAsyncStorage.getStore();if(i&&i.mutableCookies){let e=new Headers(o.headers);if(k(e,i.mutableCookies))return new Response(o.body,{status:o.status,statusText:o.statusText,headers:e})}return o})})));if(!(s instanceof Response))return new Response(null,{status:500});if(s.headers.has("x-middleware-rewrite"))throw Error("NextResponse.rewrite() was used in a app route handler, this is not currently supported. Please remove the invocation to continue.");if("1"===s.headers.get("x-middleware-next"))throw Error("NextResponse.next() was used in a app route handler, this is not supported. See here for more info: https://nextjs.org/docs/messages/next-response-next-in-app-route-handler");return s}async handle(e,t){try{let r=await this.execute(e,t);return r}catch(t){let e=function(e){if(eg(e)){let t=eg(e)?e.digest.split(";",3)[2]:null;if(!t)throw Error("Invariant: Unexpected redirect url format");let r=function(e){if(!eg(e))throw Error("Not a redirect error");return"true"===e.digest.split(";",4)[3]?308:307}(e);return function(e,t,r){let n=new Headers({location:e});return k(n,t),new Response(null,{status:r,headers:n})}(t,e.mutableCookies,r)}return(null==e?void 0:e.digest)==="NEXT_NOT_FOUND"&&new Response(null,{status:404})}(t);if(!e)throw t;return e}}}let eM=eI})(),module.exports=n})();
//# sourceMappingURL=app-route-turbo.runtime.prod.js.map