securityos/node_modules/next/dist/compiled/next-server/app-route-turbo-experimenta...

15 lines
48 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(()=>{var e={"./dist/compiled/@edge-runtime/cookies/index.js":e=>{"use strict";var t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,o={};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,a]=[r.slice(0,e),r.slice(e+1)];try{t.set(n,decodeURIComponent(null!=a?a:"true"))}catch{}}return t}function l(e){var t,r;if(!e)return;let[[n,a],...o]=i(e),{domain:s,expires:l,httponly:d,maxage:h,path:f,samesite:p,secure:m,priority:g}=Object.fromEntries(o.map(([e,t])=>[e.toLowerCase(),t])),y={name:n,value:decodeURIComponent(a),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}(y)}((e,r)=>{for(var n in r)t(e,n,{get:r[n],enumerable:!0})})(o,{RequestCookies:()=>d,ResponseCookies:()=>h,parseCookie:()=>i,parseSetCookie:()=>l,stringifyCookie:()=>s}),e.exports=((e,o,s,i)=>{if(o&&"object"==typeof o||"function"==typeof o)for(let s of n(o))a.call(e,s)||void 0===s||t(e,s,{get:()=>o[s],enumerable:!(i=r(o,s))||i.enumerable});return e})(t({},"__esModule",{value:!0}),o);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 a=null!=(n=null!=(r=null==(t=e.getSetCookie)?void 0:t.call(e))?r:e.get("set-cookie"))?n:[],o=Array.isArray(a)?a:function(e){if(!e)return[];var t,r,n,a,o,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,o=!1;l();)if(","===(r=e.charAt(i))){for(n=i,i+=1,l(),a=i;i<e.length&&"="!==(r=e.charAt(i))&&";"!==r&&","!==r;)i+=1;i<e.length&&"="===e.charAt(i)?(o=!0,i=a,s.push(e.substring(t,n)),t=i):i=n+1}else i+=1;(!o||i>=e.length)&&s.push(e.substring(t,e.length))}return s}(a);for(let e of o){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,a=this._parsed;return a.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)}}(a,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 a={},o=t.split(n),s=(r||{}).decode||e,i=0;i<o.length;i++){var l=o[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==a[c]&&(a[c]=function(e,t){try{return t(e)}catch(t){return e}}(d,s))}}return a},t.serialize=function(e,t,n){var o=n||{},s=o.encode||r;if("function"!=typeof s)throw TypeError("option encode is invalid");if(!a.test(e))throw TypeError("argument name is invalid");var i=s(t);if(i&&!a.test(i))throw TypeError("argument val is invalid");var l=e+"="+i;if(null!=o.maxAge){var u=o.maxAge-0;if(isNaN(u)||!isFinite(u))throw TypeError("option maxAge is invalid");l+="; Max-Age="+Math.floor(u)}if(o.domain){if(!a.test(o.domain))throw TypeError("option domain is invalid");l+="; Domain="+o.domain}if(o.path){if(!a.test(o.path))throw TypeError("option path is invalid");l+="; Path="+o.path}if(o.expires){if("function"!=typeof o.expires.toUTCString)throw TypeError("option expires is invalid");l+="; Expires="+o.expires.toUTCString()}if(o.httpOnly&&(l+="; HttpOnly"),o.secure&&(l+="; Secure"),o.sameSite)switch("string"==typeof o.sameSite?o.sameSite.toLowerCase():o.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=/; */,a=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/})(),e.exports=t})()},"./dist/compiled/react-experimental/cjs/react.production.min.js":(e,t)=>{"use strict";/**
* @license React
* react.production.min.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var r=Symbol.for("react.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.debug_trace_mode"),g=Symbol.for("react.offscreen"),y=Symbol.for("react.cache"),v=Symbol.for("react.default_value"),b=Symbol.for("react.postpone"),S=Symbol.iterator,x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,_={};function C(e,t,r){this.props=e,this.context=t,this.refs=_,this.updater=r||x}function R(){}function P(e,t,r){this.props=e,this.context=t,this.refs=_,this.updater=r||x}C.prototype.isReactComponent={},C.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")},C.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},R.prototype=C.prototype;var E=P.prototype=new R;E.constructor=P,w(E,C.prototype),E.isPureReactComponent=!0;var T=Array.isArray,A=Object.prototype.hasOwnProperty,k={current:null},O={key:!0,ref:!0,__self:!0,__source:!0};function N(e,t,n){var a,o={},s=null,i=null;if(null!=t)for(a in void 0!==t.ref&&(i=t.ref),void 0!==t.key&&(s=""+t.key),t)A.call(t,a)&&!O.hasOwnProperty(a)&&(o[a]=t[a]);var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];o.children=u}if(e&&e.defaultProps)for(a in l=e.defaultProps)void 0===o[a]&&(o[a]=l[a]);return{$$typeof:r,type:e,key:s,ref:i,props:o,_owner:k.current}}function L(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}var $=/\/+/g;function j(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 M(e,t,a){if(null==e)return e;var o=[],s=0;return!function e(t,a,o,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?"."+j(h,0):s,T(i)?(o="",null!=t&&(o=t.replace($,"$&/")+"/"),e(i,a,o,"",function(e){return e})):null!=i&&(L(i)&&(l=i,u=o+(!i.key||h&&h.key===i.key?"":(""+i.key).replace($,"$&/")+"/")+t,i={$$typeof:r,type:l.type,key:u,ref:l.ref,props:l.props,_owner:l._owner}),a.push(i)),1;if(h=0,s=""===s?".":s+":",T(t))for(var f=0;f<t.length;f++){var p=s+j(d=t[f],f);h+=e(d,a,o,p,i)}else if("function"==typeof(p=null===(c=t)||"object"!=typeof c?null:"function"==typeof(c=S&&c[S]||c["@@iterator"])?c:null))for(t=p.call(t),f=0;!(d=t.next()).done;)p=s+j(d=d.value,f++),h+=e(d,a,o,p,i);else if("object"===d)throw Error("Objects are not valid as a React child (found: "+("[object Object]"===(a=String(t))?"object with keys {"+Object.keys(t).join(", ")+"}":a)+"). If you meant to render a collection of children, use an array instead.");return h}(e,o,"","",function(e){return t.call(a,e,s++)}),o}function I(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 H={current:null};function D(){return new WeakMap}function q(){return{s:0,v:void 0,o:null,p:null}}var U={current:null},B={transition:null},G={ReactCurrentDispatcher:U,ReactCurrentCache:H,ReactCurrentBatchConfig:B,ReactCurrentOwner:k,ContextRegistry:{}},F=G.ContextRegistry;t.Children={map:M,forEach:function(e,t,r){M(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return M(e,function(){t++}),t},toArray:function(e){return M(e,function(e){return e})||[]},only:function(e){if(!L(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=C,t.Fragment=a,t.Profiler=s,t.PureComponent=P,t.StrictMode=o,t.Suspense=d,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=G,t.cache=function(e){return function(){var t=H.current;if(!t)return e.apply(null,arguments);var r=t.getCacheForType(D);void 0===(t=r.get(e))&&(t=q(),r.set(e,t)),r=0;for(var n=arguments.length;r<n;r++){var a=arguments[r];if("function"==typeof a||"object"==typeof a&&null!==a){var o=t.o;null===o&&(t.o=o=new WeakMap),void 0===(t=o.get(a))&&(t=q(),o.set(a,t))}else null===(o=t.p)&&(t.p=o=new Map),void 0===(t=o.get(a))&&(t=q(),o.set(a,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 a=w({},e.props),o=e.key,s=e.ref,i=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,i=k.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)A.call(t,u)&&!O.hasOwnProperty(u)&&(a[u]=void 0===t[u]&&void 0!==l?l[u]:t[u])}var u=arguments.length-2;if(1===u)a.children=n;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];a.children=l}return{$$typeof:r,type:e.type,key:o,ref:s,props:a,_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=N,t.createFactory=function(e){var t=N.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.createServerContext=function(e,t){var r=!0;if(!F[e]){r=!1;var n={$$typeof:u,_currentValue:t,_currentValue2:t,_defaultValue:t,_threadCount:0,Provider:null,Consumer:null,_globalName:e};n.Provider={$$typeof:i,_context:n},F[e]=n}if((n=F[e])._defaultValue===v)n._defaultValue=t,n._currentValue===v&&(n._currentValue=t),n._currentValue2===v&&(n._currentValue2=t);else if(r)throw Error("ServerContext: "+e+" already defined");return n},t.experimental_useEffectEvent=function(e){return U.current.useEffectEvent(e)},t.experimental_useOptimistic=function(e,t){return U.current.useOptimistic(e,t)},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=L,t.lazy=function(e){return{$$typeof:p,_payload:{_status:-1,_result:e},_init:I}},t.memo=function(e,t){return{$$typeof:f,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=B.transition;B.transition={};try{e()}finally{B.transition=t}},t.unstable_Cache=y,t.unstable_DebugTracingMode=m,t.unstable_Offscreen=g,t.unstable_SuspenseList=h,t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.unstable_getCacheForType=function(e){var t=H.current;return t?t.getCacheForType(e):e()},t.unstable_getCacheSignal=function(){var e=H.current;return e?e.getCacheSignal():((e=new AbortController).abort(Error("This CacheSignal was requested outside React which means that it is immediately aborted.")),e.signal)},t.unstable_postpone=function(e){throw(e=Error(e)).$$typeof=b,e},t.unstable_useCacheRefresh=function(){return U.current.useCacheRefresh()},t.unstable_useMemoCache=function(e){return U.current.useMemoCache(e)},t.use=function(e){return U.current.use(e)},t.useCallback=function(e,t){return U.current.useCallback(e,t)},t.useContext=function(e){return U.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return U.current.useDeferredValue(e)},t.useEffect=function(e,t){return U.current.useEffect(e,t)},t.useId=function(){return U.current.useId()},t.useImperativeHandle=function(e,t,r){return U.current.useImperativeHandle(e,t,r)},t.useInsertionEffect=function(e,t){return U.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return U.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return U.current.useMemo(e,t)},t.useReducer=function(e,t,r){return U.current.useReducer(e,t,r)},t.useRef=function(e){return U.current.useRef(e)},t.useState=function(e){return U.current.useState(e)},t.useSyncExternalStore=function(e,t,r){return U.current.useSyncExternalStore(e,t,r)},t.useTransition=function(){return U.current.useTransition()},t.version="18.3.0-experimental-d900fadbf-20230929"},"./dist/compiled/react-experimental/index.js":(e,t,r)=>{"use strict";e.exports=r("./dist/compiled/react-experimental/cjs/react.production.min.js")}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.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:()=>ej,default:()=>eM});var e,t,a,o,s,i,l,u,c,d,h,f,p,m,g,y={};r.r(y),r.d(y,{DYNAMIC_ERROR_CODE:()=>eb,DynamicServerError:()=>eS});var v={};r.r(v),r.d(v,{cookies:()=>eT,draftMode:()=>eA,headers:()=>eE});var b={};r.r(b),r.d(b,{AppRouterContext:()=>eO,CacheStates:()=>g,GlobalLayoutRouterContext:()=>eL,LayoutRouterContext:()=>eN,TemplateContext:()=>e$});var S={};r.r(S),r.d(S,{appRouterContext:()=>b});class x{constructor({userland:e,definition:t}){this.userland=e,this.definition=t}}let w=[["RSC"],["Next-Router-State-Tree"],["Next-Router-Prefetch"]];class _{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 C extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers")}static callable(){throw new C}}class R extends Headers{constructor(e){super(),this.headers=new Proxy(e,{get(t,r,n){if("symbol"==typeof r)return _.get(t,r,n);let a=r.toLowerCase(),o=Object.keys(e).find(e=>e.toLowerCase()===a);if(void 0!==o)return _.get(t,o,n)},set(t,r,n,a){if("symbol"==typeof r)return _.set(t,r,n,a);let o=r.toLowerCase(),s=Object.keys(e).find(e=>e.toLowerCase()===o);return _.set(t,s??r,n,a)},has(t,r){if("symbol"==typeof r)return _.has(t,r);let n=r.toLowerCase(),a=Object.keys(e).find(e=>e.toLowerCase()===n);return void 0!==a&&_.has(t,a)},deleteProperty(t,r){if("symbol"==typeof r)return _.deleteProperty(t,r);let n=r.toLowerCase(),a=Object.keys(e).find(e=>e.toLowerCase()===n);return void 0===a||_.deleteProperty(t,a)}})}static seal(e){return new Proxy(e,{get(e,t,r){switch(t){case"append":case"delete":case"set":return C.callable;default:return _.get(e,t,r)}}})}merge(e){return Array.isArray(e)?e.join(", "):e}static from(e){return e instanceof Headers?e:new R(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 P=r("./dist/compiled/@edge-runtime/cookies/index.js");class E 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 E}}class T{static seal(e){return new Proxy(e,{get(e,t,r){switch(t){case"clear":case"delete":case"set":return E.callable;default:return _.get(e,t,r)}}})}}let A=Symbol.for("next.mutated.cookies");function k(e,t){let r=function(e){let t=e[A];return t&&Array.isArray(t)&&0!==t.length?t:[]}(t);if(0===r.length)return!1;let n=new P.ResponseCookies(e),a=n.getAll();for(let e of r)n.set(e);for(let e of a)n.set(e);return!0}class O{static wrap(e,t){let r=new P.ResponseCookies(new Headers);for(let t of e.getAll())r.set(t);let n=[],a=new Set,o=()=>{var e;let o=null==fetch.__nextGetStaticStore?void 0:null==(e=fetch.__nextGetStaticStore.call(fetch))?void 0:e.getStore();o&&(o.pathWasRevalidated=!0);let s=r.getAll();if(n=s.filter(e=>a.has(e.name)),t){let e=[];for(let t of n){let r=new P.ResponseCookies(new Headers);r.set(t),e.push(r.toString())}t(e)}};return new Proxy(r,{get(e,t,r){switch(t){case A:return n;case"delete":return function(...t){a.add("string"==typeof t[0]?t[0]:t[0].name);try{e.delete(...t)}finally{o()}};case"set":return function(...t){a.add("string"==typeof t[0]?t[0]:t[0].name);try{return e.set(...t)}finally{o()}};default:return _.get(e,t,r)}}})}}let N="_N_T_",L={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"};({...L,GROUP:{server:[L.reactServerComponents,L.actionBrowser,L.appMetadataRoute,L.appRouteHandler],nonClientServerTarget:[L.middleware,L.api],app:[L.reactServerComponents,L.actionBrowser,L.appMetadataRoute,L.appRouteHandler,L.serverSideRendering,L.appPagesBrowser]}});let $="__prerender_bypass";Symbol("__next_preview_data"),Symbol($);class j{constructor(e,t,r,n){var a;let o=e&&function(e,t){let r=R.from(e.headers),n=r.get("x-prerender-revalidate"),a=n===t.previewModeId,o=r.has("x-prerender-revalidate-if-generated");return{isOnDemandRevalidate:a,revalidateOnlyGenerated:o}}(t,e).isOnDemandRevalidate,s=null==(a=r.get($))?void 0:a.value;this.isEnabled=!!(!o&&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:$,value:this._previewModeId,httpOnly:!0,sameSite:"none",secure:!0,path:"/"})}disable(){this._mutableCookies.set({name:$,value:"",httpOnly:!0,sameSite:"none",secure:!0,path:"/",expires:new Date(0)})}}let M={wrap(e,{req:t,res:r,renderOpts:n},a){let o;function s(e){r&&r.setHeader("Set-Cookie",e)}n&&"previewProps"in n&&(o=n.previewProps);let i={},l={get headers(){return i.headers||(i.headers=function(e){let t=R.from(e);for(let e of w)t.delete(e.toString().toLowerCase());return R.seal(t)}(t.headers)),i.headers},get cookies(){return i.cookies||(i.cookies=function(e){let t=new P.RequestCookies(R.from(e));return T.seal(t)}(t.headers)),i.cookies},get mutableCookies(){return i.mutableCookies||(i.mutableCookies=function(e,t){let r=new P.RequestCookies(R.from(e));return O.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(o,t,this.cookies,this.mutableCookies)),i.draftMode}};return e.run(l,a,l)}},I={wrap(e,{urlPathname:t,renderOpts:r},n){let a=!r.supportsDynamicHTML&&!r.isDraftMode&&!r.isServerAction,o={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};return r.store=o,e.run(o,n,o)}};function H(){return new Response(null,{status:400})}function D(){return new Response(null,{status:405})}let q=["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"}(a||(a={})),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"}(o||(o={})),(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",(h||(h={})).generateMetadata="ResolveMetadata.generateMetadata";let U=require("next/dist/server/lib/trace/tracer"),{env:B,stdout:G}=(null==(f=globalThis)?void 0:f.process)??{},F=B&&!B.NO_COLOR&&(B.FORCE_COLOR||(null==G?void 0:G.isTTY)&&!B.CI&&"dumb"!==B.TERM),W=(e,t,r,n)=>{let a=e.substring(0,n)+r,o=e.substring(n+t.length),s=o.indexOf(t);return~s?a+W(o,t,r,s):a+o},V=(e,t,r=e)=>n=>{let a=""+n,o=a.indexOf(t,e.length);return~o?e+W(a,t,r,o)+t:e+a+t},z=F?V("\x1b[1m","\x1b[22m","\x1b[22m\x1b[1m"):String;F&&V("\x1b[2m","\x1b[22m","\x1b[22m\x1b[2m"),F&&V("\x1b[3m","\x1b[23m"),F&&V("\x1b[4m","\x1b[24m"),F&&V("\x1b[7m","\x1b[27m"),F&&V("\x1b[8m","\x1b[28m"),F&&V("\x1b[9m","\x1b[29m"),F&&V("\x1b[30m","\x1b[39m");let Y=F?V("\x1b[31m","\x1b[39m"):String,Z=F?V("\x1b[32m","\x1b[39m"):String,J=F?V("\x1b[33m","\x1b[39m"):String;F&&V("\x1b[34m","\x1b[39m");let X=F?V("\x1b[35m","\x1b[39m"):String;F&&V("\x1b[38;2;173;127;168m","\x1b[39m"),F&&V("\x1b[36m","\x1b[39m");let K=F?V("\x1b[37m","\x1b[39m"):String;F&&V("\x1b[90m","\x1b[39m"),F&&V("\x1b[40m","\x1b[49m"),F&&V("\x1b[41m","\x1b[49m"),F&&V("\x1b[42m","\x1b[49m"),F&&V("\x1b[43m","\x1b[49m"),F&&V("\x1b[44m","\x1b[49m"),F&&V("\x1b[45m","\x1b[49m"),F&&V("\x1b[46m","\x1b[49m"),F&&V("\x1b[47m","\x1b[49m");let Q={wait:K(z("○")),error:Y(z("")),warn:J(z("⚠")),ready:z("▲"),info:K(z(" ")),event:Z(z("✓")),trace:X(z("\xbb"))},ee={log:"log",warn:"warn",error:"error"},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=[];if(!e)return n;let{pagePath:a,urlPathname:o}=e;if(Array.isArray(e.tags)||(e.tags=[]),a){let r=et(a);for(let a of r)a=`${N}${a}`,(null==(t=e.tags)?void 0:t.includes(a))||e.tags.push(a),n.push(a)}if(o){let t=`${N}${o}`;(null==(r=e.tags)?void 0:r.includes(t))||e.tags.push(t),n.push(t)}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 ea(e){return e.replace(/\/$/,"")||"/"}function eo(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:a}=eo(e);return""+t+r+n+a}function ei(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:n,hash:a}=eo(e);return""+r+t+n+a}function el(e,t){if("string"!=typeof e)return!1;let{pathname:r}=eo(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,a;"object"==typeof t&&"pathname"in t||"string"==typeof t?(n=t,a=r||{}):a=r||t||{},this[eh]={url:ed(e,n??a.base),options:a,basePath:""},this.analyze()}analyze(){var e,t,r,n,a;let o=function(e,t){var r,n;let{basePath:a,i18n:o,trailingSlash:s}=null!=(r=t.nextConfig)?r:{},i={pathname:e,trailingSlash:"/"!==e?e.endsWith("/"):s};a&&el(i.pathname,a)&&(i.pathname=function(e,t){if(!el(e,t))return e;let r=e.slice(t.length);return r.startsWith("/")?r:"/"+r}(i.pathname,a),i.basePath=a);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(o){let e=t.i18nProvider?t.i18nProvider.analyze(i.pathname):eu(i.pathname,o.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,o.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(":")[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 o of(r&&(r=r.toLowerCase()),e)){var n,a;let e=null==(n=o.domain)?void 0:n.split(":")[0].toLowerCase();if(t===e||r===o.defaultLocale.toLowerCase()||(null==(a=o.locales)?void 0:a.some(e=>e.toLowerCase()===r)))return o}}(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==(a=this[eh].options.nextConfig)?void 0:null==(n=a.i18n)?void 0:n.defaultLocale);this[eh].url.pathname=o.pathname,this[eh].defaultLocale=i,this[eh].basePath=o.basePath??"",this[eh].buildId=o.buildId,this[eh].locale=o.locale??i,this[eh].trailingSlash=o.trailingSlash}formatPathname(){var e;let t;return t=function(e,t,r,n){if(!t||t===r)return e;let a=e.toLowerCase();return!n&&(el(a,"/api")||el(a,"/"+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=ea(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,"/"):ea(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,a]=e.digest.split(";",4);return"NEXT_REDIRECT"===t&&("replace"===r||"push"===r)&&"string"==typeof n&&("true"===a||"false"===a)}!function(e){e.push="push",e.replace="replace"}(p||(p={}));let ey=["HEAD","OPTIONS"],ev=["OPTIONS","POST","PUT","DELETE","PATCH"];!function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE"}(m||(m={}));let eb="DYNAMIC_SERVER_USAGE";class eS extends Error{constructor(e){super("Dynamic server usage: "+e),this.digest=eb}}let ex=require("next/dist/client/components/action-async-storage.external.js"),ew=require("next/dist/client/components/static-generation-async-storage.external.js");class e_ 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 eR=(e,t)=>{let r=ew.staticGenerationAsyncStorage.getStore();if(null==r?void 0:r.forceStatic)return!0;if(null==r?void 0:r.dynamicShouldError){var n;throw new e_(eC(e,{...t,dynamic:null!=(n=null==t?void 0:t.dynamic)?n:"error"}))}if(!r||(r.revalidate=0,(null==t?void 0:t.dynamic)||(r.staticPrefetchBailout=!0)),null==r?void 0:r.isStaticGeneration){let n=new eS(eC(e,{...t,link:"https://nextjs.org/docs/messages/dynamic-server-error"}));throw r.dynamicUsageDescription=e,r.dynamicUsageStack=n.stack,n}return!1};class eP{get isEnabled(){return this._provider.isEnabled}enable(){if(!eR("draftMode().enable()"))return this._provider.enable()}disable(){if(!eR("draftMode().disable()"))return this._provider.disable()}constructor(e){this._provider=e}}function eE(){if(eR("headers",{link:"https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering"}))return R.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(eR("cookies",{link:"https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering"}))return T.seal(new P.RequestCookies(new Headers({})));let e=em.requestAsyncStorage.getStore();if(!e)throw Error("Invariant: cookies() expects to have requestAsyncStorage, none available.");let t=ex.actionAsyncStorage.getStore();return t&&(t.isAction||t.isAppRoute)?e.mutableCookies:e.cookies}function eA(){let e=em.requestAsyncStorage.getStore();if(!e)throw Error("Invariant: draftMode() expects to have requestAsyncStorage, none available.");return new eP(e.draftMode)}var ek=r("./dist/compiled/react-experimental/index.js");!function(e){e.LAZY_INITIALIZED="LAZYINITIALIZED",e.DATA_FETCH="DATAFETCH",e.READY="READY"}(g||(g={}));let eO=ek.createContext(null),eN=ek.createContext(null),eL=ek.createContext(null),e$=ek.createContext(null);class ej extends x{static #e=this.sharedModules=S;static is(e){return e.definition.kind===m.APP_ROUTE}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=y,this.headerHooks=v,this.staticGenerationBailout=eR,this.actionAsyncStorage=ex.actionAsyncStorage,this.resolvedPagePath=r,this.nextConfigOutput=n,this.methods=function(e){let t=q.reduce((t,r)=>({...t,[r]:e[r]??D}),{}),r=new Set(q.filter(t=>e[t])),n=ey.filter(e=>!r.has(e));for(let a of n){if("HEAD"===a){if(!e.GET)break;t.HEAD=e.GET,r.add("HEAD");continue}if("OPTIONS"===a){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: ${a}`)}return t}(e),this.nonStaticMethods=function(e){let t=ev.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 q.includes(e)?this.methods[e]:H}async execute(e,t){let r=this.resolve(e.method),n={req:e};n.renderOpts={previewProps:t.prerenderManifest.preview};let a={urlPathname:e.nextUrl.pathname,renderOpts:t.renderOpts};a.renderOpts.fetchCache=this.userland.fetchCache;let s=await this.actionAsyncStorage.run({isAppRoute:!0},()=>M.wrap(this.requestAsyncStorage,n,()=>I.wrap(this.staticGenerationAsyncStorage,a,n=>{var a;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 a={},o=(e,t)=>{switch(t){case"search":return"";case"searchParams":return a.searchParams||(a.searchParams=new URLSearchParams),a.searchParams;case"url":case"href":return a.url||(a.url=ep(e)),a.url;case"toJSON":case"toString":return a.url||(a.url=ep(e)),a.toString||(a.toString=()=>a.url),a.toString;case"headers":return a.headers||(a.headers=new Headers),a.headers;case"cookies":return a.headers||(a.headers=new Headers),a.cookies||(a.cookies=new P.RequestCookies(a.headers)),a.cookies;case"clone":return a.url||(a.url=ep(e)),()=>new ef(a.url)}},s=new Proxy(e.nextUrl,{get(e,r){if(n(r),"force-static"===t&&"string"==typeof r){let t=o(e.href,r);if(void 0!==t)return t}let a=e[r];return"function"==typeof a?a.bind(e):a},set:(e,t,r)=>(n(t),e[t]=r,!0)}),i=e=>{switch(e){case"headers":r.headerHooks.headers();return;case"url":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=o(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),a=n.split(".").slice(0,-1).join(".");return a}(this.resolvedPagePath);return null==(a=(0,U.getTracer)().getRootSpanAttributes())||a.set("next.route",i),(0,U.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,a)=>{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==a?void 0:null==(s=a.method)?void 0:s.toUpperCase())||"GET",f=(null==(i=null==a?void 0:a.next)?void 0:i.internal)===!0;return await (0,U.getTracer)().trace(f?o.internalFetch:l.fetch,{kind:U.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 o;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==a?void 0:a[t]);if(!u||f||u.isDraftMode)return n(e,a);let m=t=>{var r,n,o;return void 0!==(null==a?void 0:null==(r=a.next)?void 0:r[t])?null==a?void 0:null==(n=a.next)?void 0:n[t]:h?null==(o=e.next)?void 0:o[t]:void 0},g=m("revalidate"),y=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(y))for(let e of(u.tags||(u.tags=[]),y))u.tags.includes(e)||u.tags.push(e);let v=er(u),b="only-cache"===u.fetchCache,S="force-cache"===u.fetchCache,x="default-cache"===u.fetchCache,w="default-no-store"===u.fetchCache,_="only-no-store"===u.fetchCache,C="force-no-store"===u.fetchCache,R=p("cache"),P="";"string"==typeof R&&void 0!==g&&(function(...e){(function(e,...t){(""===t[0]||void 0===t[0])&&1===t.length&&t.shift();let r=e in ee?ee[e]:"log",n=Q[e];0===t.length?console[r](""):console[r](" "+n,...t)})("warn",...e)}(`fetch for ${c} on ${u.urlPathname} specified "cache: ${R}" and "revalidate: ${g}", only one should be specified.`),R=void 0),"force-cache"===R&&(g=!1),["no-cache","no-store"].includes(R||"")&&(g=0,P=`cache: ${R}`),("number"==typeof g||!1===g)&&(l=g);let E=p("headers"),T="function"==typeof(null==E?void 0:E.get)?E:new Headers(E||{}),A=T.get("authorization")||T.get("cookie"),k=!["get","head"].includes((null==(o=p("method"))?void 0:o.toLowerCase())||"get"),O=(A||k)&&0===u.revalidate;if(C&&(l=0,P="fetchCache = force-no-store"),_){if("force-cache"===R||0===l)throw Error(`cache: 'force-cache' used on fetch for ${c} with 'export const fetchCache = 'only-no-store'`);l=0,P="fetchCache = only-no-store"}if(b&&"no-store"===R)throw Error(`cache: 'no-store' used on fetch for ${c} with 'export const fetchCache = 'only-cache'`);S&&(void 0===g||0===g)&&(P="fetchCache = force-cache",l=!1),void 0===l?x?(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))&&(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:a)}catch(t){console.error("Failed to generate cache key for",e)}let L=u.nextFetchId??1;u.nextFetchId=L+1;let $="number"!=typeof l?31536e3:l,j=async(t,r)=>{let o=["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 o)r[e]=t[e];e=new Request(t.url,r)}else if(a){let e=a;for(let t of(a={body:a._ogBody||a.body},o))a[t]=e[t]}let i={...a,next:{...null==a?void 0:a.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:$},{fetchCache:!0,revalidate:l,fetchUrl:c,fetchIdx:L,tags:y})}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,{fetchCache:!0,revalidate:l,fetchUrl:c,fetchIdx:L,tags:y,softTags:v});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)){let t;e.isStale&&(u.pendingRevalidates||(u.pendingRevalidates=[]),u.pendingRevalidates.push(j(!0).catch(console.error)));let r=e.value.data;t=Buffer.from(r.body,"base64").subarray(),en(u,{start:d,url:c,cacheReason:P,cacheStatus:"hit",status:r.status||200,method:(null==a?void 0:a.method)||"GET"});let n=new Response(t,{headers:r.headers,status:r.status});return Object.defineProperty(n,"url",{value:e.value.data.url}),n}}if(u.isStaticGeneration&&a&&"object"==typeof a){let t=a.cache;if("no-store"===t){u.revalidate=0;let t=`no-store fetch ${e}${u.urlPathname?` ${u.urlPathname}`:""}`,n=new r(t);u.dynamicUsageErr=n,u.dynamicUsageStack=n.stack,u.dynamicUsageDescription=t}let n="next"in a,o=a.next||{};if("number"==typeof o.revalidate&&(void 0===u.revalidate||"number"==typeof u.revalidate&&o.revalidate<u.revalidate)){let t=u.forceDynamic;if(t&&0===o.revalidate||(u.revalidate=o.revalidate),!t&&0===o.revalidate){let t=`revalidate: ${o.revalidate} fetch ${e}${u.urlPathname?` ${u.urlPathname}`:""}`,n=new r(t);u.dynamicUsageErr=n,u.dynamicUsageStack=n.stack,u.dynamicUsageDescription=t}}n&&delete a.next}return j(!1,i).finally(M)})},globalThis.fetch.__nextGetStaticStore=()=>t,globalThis.fetch.__nextPatched=!0}({serverHooks:this.serverHooks,staticGenerationAsyncStorage:this.staticGenerationAsyncStorage});let a=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(!(a 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(a.headers);if(k(e,i.mutableCookies))return new Response(a.body,{status:a.status,statusText:a.statusText,headers:e})}return a})})));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=ej})(),module.exports=n})();
//# sourceMappingURL=app-route-turbo-experimental.runtime.prod.js.map