UNPKG

next

Version:

The React Framework

19 lines 77.6 kB
(()=>{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,s={};function i(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}`,"partitioned"in e&&e.partitioned&&"Partitioned","priority"in e&&e.priority&&`Priority=${e.priority}`].filter(Boolean),n=`${e.name}=${encodeURIComponent(null!=(t=e.value)?t:"")}`;return 0===r.length?n:`${n}; ${r.join("; ")}`}function a(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],...s]=a(e),{domain:i,expires:l,httponly:d,maxage:h,path:p,samesite:f,secure:m,partitioned:g,priority:y}=Object.fromEntries(s.map(([e,t])=>[e.toLowerCase(),t]));return function(e){let t={};for(let r in e)e[r]&&(t[r]=e[r]);return t}({name:n,value:decodeURIComponent(o),domain:i,...l&&{expires:new Date(l)},...d&&{httpOnly:!0},..."string"==typeof h&&{maxAge:Number(h)},path:p,...f&&{sameSite:u.includes(t=(t=f).toLowerCase())?t:void 0},...m&&{secure:!0},...y&&{priority:c.includes(r=(r=y).toLowerCase())?r:void 0},...g&&{partitioned:!0}})}((e,r)=>{for(var n in r)t(e,n,{get:r[n],enumerable:!0})})(s,{RequestCookies:()=>d,ResponseCookies:()=>h,parseCookie:()=>a,parseSetCookie:()=>l,stringifyCookie:()=>i}),e.exports=((e,s,i,a)=>{if(s&&"object"==typeof s||"function"==typeof s)for(let l of n(s))o.call(e,l)||l===i||t(e,l,{get:()=>s[l],enumerable:!(a=r(s,l))||a.enumerable});return e})(t({},"__esModule",{value:!0}),s);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)for(let[e,r]of a(t))this._parsed.set(e,{name:e,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])=>i(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])=>i(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:[];for(let e of Array.isArray(o)?o:function(e){if(!e)return[];var t,r,n,o,s,i=[],a=0;function l(){for(;a<e.length&&/\s/.test(e.charAt(a));)a+=1;return a<e.length}for(;a<e.length;){for(t=a,s=!1;l();)if(","===(r=e.charAt(a))){for(n=a,a+=1,l(),o=a;a<e.length&&"="!==(r=e.charAt(a))&&";"!==r&&","!==r;)a+=1;a<e.length&&"="===e.charAt(a)?(s=!0,a=o,i.push(e.substring(t,n)),t=a):a=n+1}else a+=1;(!s||a>=e.length)&&i.push(e.substring(t,e.length))}return i}(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,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=i(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(i).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={},s=t.split(n),i=(r||{}).decode||e,a=0;a<s.length;a++){var l=s[a],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,i))}}return o},t.serialize=function(e,t,n){var s=n||{},i=s.encode||r;if("function"!=typeof i)throw TypeError("option encode is invalid");if(!o.test(e))throw TypeError("argument name is invalid");var a=i(t);if(a&&!o.test(a))throw TypeError("argument val is invalid");var l=e+"="+a;if(null!=s.maxAge){var u=s.maxAge-0;if(isNaN(u)||!isFinite(u))throw TypeError("option maxAge is invalid");l+="; Max-Age="+Math.floor(u)}if(s.domain){if(!o.test(s.domain))throw TypeError("option domain is invalid");l+="; Domain="+s.domain}if(s.path){if(!o.test(s.path))throw TypeError("option path is invalid");l+="; Path="+s.path}if(s.expires){if("function"!=typeof s.expires.toUTCString)throw TypeError("option expires is invalid");l+="; Expires="+s.expires.toUTCString()}if(s.httpOnly&&(l+="; HttpOnly"),s.secure&&(l+="; Secure"),s.sameSite)switch("string"==typeof s.sameSite?s.sameSite.toLowerCase():s.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/p-queue/index.js":e=>{(()=>{"use strict";var t={993:e=>{var t=Object.prototype.hasOwnProperty,r="~";function n(){}function o(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function s(e,t,n,s,i){if("function"!=typeof n)throw TypeError("The listener must be a function");var a=new o(n,s||e,i),l=r?r+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],a]:e._events[l].push(a):(e._events[l]=a,e._eventsCount++),e}function i(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),a.prototype.eventNames=function(){var e,n,o=[];if(0===this._eventsCount)return o;for(n in e=this._events)t.call(e,n)&&o.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},a.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,s=n.length,i=Array(s);o<s;o++)i[o]=n[o].fn;return i},a.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},a.prototype.emit=function(e,t,n,o,s,i){var a=r?r+e:e;if(!this._events[a])return!1;var l,u,c=this._events[a],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,o),!0;case 5:return c.fn.call(c.context,t,n,o,s),!0;case 6:return c.fn.call(c.context,t,n,o,s,i),!0}for(u=1,l=Array(d-1);u<d;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var h,p=c.length;for(u=0;u<p;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),d){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,n);break;case 4:c[u].fn.call(c[u].context,t,n,o);break;default:if(!l)for(h=1,l=Array(d-1);h<d;h++)l[h-1]=arguments[h];c[u].fn.apply(c[u].context,l)}}return!0},a.prototype.on=function(e,t,r){return s(this,e,t,r,!1)},a.prototype.once=function(e,t,r){return s(this,e,t,r,!0)},a.prototype.removeListener=function(e,t,n,o){var s=r?r+e:e;if(!this._events[s])return this;if(!t)return i(this,s),this;var a=this._events[s];if(a.fn)a.fn!==t||o&&!a.once||n&&a.context!==n||i(this,s);else{for(var l=0,u=[],c=a.length;l<c;l++)(a[l].fn!==t||o&&!a[l].once||n&&a[l].context!==n)&&u.push(a[l]);u.length?this._events[s]=1===u.length?u[0]:u:i(this,s)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&i(this,t)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,e.exports=a},213:e=>{e.exports=(e,t)=>(t=t||(()=>{}),e.then(e=>new Promise(e=>{e(t())}).then(()=>e),e=>new Promise(e=>{e(t())}).then(()=>{throw e})))},574:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){let n=0,o=e.length;for(;o>0;){let s=o/2|0,i=n+s;0>=r(e[i],t)?(n=++i,o-=s+1):o=s}return n}},821:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0});let n=r(574);t.default=class{constructor(){this._queue=[]}enqueue(e,t){let r={priority:(t=Object.assign({priority:0},t)).priority,run:e};if(this.size&&this._queue[this.size-1].priority>=t.priority){this._queue.push(r);return}let o=n.default(this._queue,r,(e,t)=>t.priority-e.priority);this._queue.splice(o,0,r)}dequeue(){let e=this._queue.shift();return null==e?void 0:e.run}filter(e){return this._queue.filter(t=>t.priority===e.priority).map(e=>e.run)}get size(){return this._queue.length}}},816:(e,t,r)=>{let n=r(213);class o extends Error{constructor(e){super(e),this.name="TimeoutError"}}let s=(e,t,r)=>new Promise((s,i)=>{if("number"!=typeof t||t<0)throw TypeError("Expected `milliseconds` to be a positive number");if(t===1/0){s(e);return}let a=setTimeout(()=>{if("function"==typeof r){try{s(r())}catch(e){i(e)}return}let n="string"==typeof r?r:`Promise timed out after ${t} milliseconds`,a=r instanceof Error?r:new o(n);"function"==typeof e.cancel&&e.cancel(),i(a)},t);n(e.then(s,i),()=>{clearTimeout(a)})});e.exports=s,e.exports.default=s,e.exports.TimeoutError=o}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var s=r[e]={exports:{}},i=!0;try{t[e](s,s.exports,n),i=!1}finally{i&&delete r[e]}return s.exports}n.ab=__dirname+"/";var o={};(()=>{Object.defineProperty(o,"__esModule",{value:!0});let e=n(993),t=n(816),r=n(821),s=()=>{},i=new t.TimeoutError;o.default=class extends e{constructor(e){var t,n,o,i;if(super(),this._intervalCount=0,this._intervalEnd=0,this._pendingCount=0,this._resolveEmpty=s,this._resolveIdle=s,!("number"==typeof(e=Object.assign({carryoverConcurrencyCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:r.default},e)).intervalCap&&e.intervalCap>=1))throw TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${null!==(n=null===(t=e.intervalCap)||void 0===t?void 0:t.toString())&&void 0!==n?n:""}\` (${typeof e.intervalCap})`);if(void 0===e.interval||!(Number.isFinite(e.interval)&&e.interval>=0))throw TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${null!==(i=null===(o=e.interval)||void 0===o?void 0:o.toString())&&void 0!==i?i:""}\` (${typeof e.interval})`);this._carryoverConcurrencyCount=e.carryoverConcurrencyCount,this._isIntervalIgnored=e.intervalCap===1/0||0===e.interval,this._intervalCap=e.intervalCap,this._interval=e.interval,this._queue=new e.queueClass,this._queueClass=e.queueClass,this.concurrency=e.concurrency,this._timeout=e.timeout,this._throwOnTimeout=!0===e.throwOnTimeout,this._isPaused=!1===e.autoStart}get _doesIntervalAllowAnother(){return this._isIntervalIgnored||this._intervalCount<this._intervalCap}get _doesConcurrentAllowAnother(){return this._pendingCount<this._concurrency}_next(){this._pendingCount--,this._tryToStartAnother(),this.emit("next")}_resolvePromises(){this._resolveEmpty(),this._resolveEmpty=s,0===this._pendingCount&&(this._resolveIdle(),this._resolveIdle=s,this.emit("idle"))}_onResumeInterval(){this._onInterval(),this._initializeIntervalIfNeeded(),this._timeoutId=void 0}_isIntervalPaused(){let e=Date.now();if(void 0===this._intervalId){let t=this._intervalEnd-e;if(!(t<0))return void 0===this._timeoutId&&(this._timeoutId=setTimeout(()=>{this._onResumeInterval()},t)),!0;this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0}return!1}_tryToStartAnother(){if(0===this._queue.size)return this._intervalId&&clearInterval(this._intervalId),this._intervalId=void 0,this._resolvePromises(),!1;if(!this._isPaused){let e=!this._isIntervalPaused();if(this._doesIntervalAllowAnother&&this._doesConcurrentAllowAnother){let t=this._queue.dequeue();return!!t&&(this.emit("active"),t(),e&&this._initializeIntervalIfNeeded(),!0)}}return!1}_initializeIntervalIfNeeded(){this._isIntervalIgnored||void 0!==this._intervalId||(this._intervalId=setInterval(()=>{this._onInterval()},this._interval),this._intervalEnd=Date.now()+this._interval)}_onInterval(){0===this._intervalCount&&0===this._pendingCount&&this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0),this._intervalCount=this._carryoverConcurrencyCount?this._pendingCount:0,this._processQueue()}_processQueue(){for(;this._tryToStartAnother(););}get concurrency(){return this._concurrency}set concurrency(e){if(!("number"==typeof e&&e>=1))throw TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this._concurrency=e,this._processQueue()}async add(e,r={}){return new Promise((n,o)=>{let s=async()=>{this._pendingCount++,this._intervalCount++;try{let s=void 0===this._timeout&&void 0===r.timeout?e():t.default(Promise.resolve(e()),void 0===r.timeout?this._timeout:r.timeout,()=>{(void 0===r.throwOnTimeout?this._throwOnTimeout:r.throwOnTimeout)&&o(i)});n(await s)}catch(e){o(e)}this._next()};this._queue.enqueue(s,r),this._tryToStartAnother(),this.emit("add")})}async addAll(e,t){return Promise.all(e.map(async e=>this.add(e,t)))}start(){return this._isPaused&&(this._isPaused=!1,this._processQueue()),this}pause(){this._isPaused=!0}clear(){this._queue=new this._queueClass}async onEmpty(){if(0!==this._queue.size)return new Promise(e=>{let t=this._resolveEmpty;this._resolveEmpty=()=>{t(),e()}})}async onIdle(){if(0!==this._pendingCount||0!==this._queue.size)return new Promise(e=>{let t=this._resolveIdle;this._resolveIdle=()=>{t(),e()}})}get size(){return this._queue.size}sizeBy(e){return this._queue.filter(e).length}get pending(){return this._pendingCount}get isPaused(){return this._isPaused}get timeout(){return this._timeout}set timeout(e){this._timeout=e}}})(),e.exports=o})()},"./dist/compiled/react/cjs/react.production.js":(e,t)=>{"use strict";/**
 * @license React
 * react.production.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.transitional.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),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"),p=Symbol.iterator,f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function y(e,t,r){this.props=e,this.context=t,this.refs=g,this.updater=r||f}function v(){}function b(e,t,r){this.props=e,this.context=t,this.refs=g,this.updater=r||f}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("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")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=y.prototype;var w=b.prototype=new v;w.constructor=b,m(w,y.prototype),w.isPureReactComponent=!0;var x=Array.isArray,S={H:null,A:null,T:null,S:null},_=Object.prototype.hasOwnProperty;function C(e,t,n,o,s,i){return{$$typeof:r,type:e,key:t,ref:void 0!==(n=i.ref)?n:null,props:i}}function R(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}var E=/\/+/g;function P(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 T(){}function k(e,t,o){if(null==e)return e;var s=[],i=0;return!function e(t,o,s,i,a){var l,u,c,d=typeof t;("undefined"===d||"boolean"===d)&&(t=null);var f=!1;if(null===t)f=!0;else switch(d){case"bigint":case"string":case"number":f=!0;break;case"object":switch(t.$$typeof){case r:case n:f=!0;break;case h:return e((f=t._init)(t._payload),o,s,i,a)}}if(f)return a=a(t),f=""===i?"."+P(t,0):i,x(a)?(s="",null!=f&&(s=f.replace(E,"$&/")+"/"),e(a,o,s,"",function(e){return e})):null!=a&&(R(a)&&(l=a,u=s+(null==a.key||t&&t.key===a.key?"":(""+a.key).replace(E,"$&/")+"/")+f,a=C(l.type,u,void 0,void 0,void 0,l.props)),o.push(a)),1;f=0;var m=""===i?".":i+":";if(x(t))for(var g=0;g<t.length;g++)d=m+P(i=t[g],g),f+=e(i,o,s,d,a);else if("function"==typeof(g=null===(c=t)||"object"!=typeof c?null:"function"==typeof(c=p&&c[p]||c["@@iterator"])?c:null))for(t=g.call(t),g=0;!(i=t.next()).done;)d=m+P(i=i.value,g++),f+=e(i,o,s,d,a);else if("object"===d){if("function"==typeof t.then)return e(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(T,T):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(t),o,s,i,a);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 f}(e,s,"","",function(e){return t.call(o,e,i++)}),s}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="function"==typeof reportError?reportError:function(e){if("object"==typeof process&&"function"==typeof process.emit){process.emit("uncaughtException",e);return}console.error(e)};function N(){}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(!R(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=y,t.Fragment=o,t.Profiler=i,t.PureComponent=b,t.StrictMode=s,t.Suspense=c,t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=S,t.act=function(){throw Error("act(...) is not supported in production builds of React.")},t.cache=function(e){return function(){return e.apply(null,arguments)}},t.cloneElement=function(e,t,r){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var n=m({},e.props),o=e.key,s=void 0;if(null!=t)for(i in void 0!==t.ref&&(s=void 0),void 0!==t.key&&(o=""+t.key),t)_.call(t,i)&&"key"!==i&&"__self"!==i&&"__source"!==i&&("ref"!==i||void 0!==t.ref)&&(n[i]=t[i]);var i=arguments.length-2;if(1===i)n.children=r;else if(1<i){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+2];n.children=a}return C(e.type,o,void 0,void 0,s,n)},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:a,_context:e},e},t.createElement=function(e,t,r){var n,o={},s=null;if(null!=t)for(n in void 0!==t.key&&(s=""+t.key),t)_.call(t,n)&&"key"!==n&&"__self"!==n&&"__source"!==n&&(o[n]=t[n]);var i=arguments.length-2;if(1===i)o.children=r;else if(1<i){for(var a=Array(i),l=0;l<i;l++)a[l]=arguments[l+2];o.children=a}if(e&&e.defaultProps)for(n in i=e.defaultProps)void 0===o[n]&&(o[n]=i[n]);return C(e,s,void 0,void 0,null,o)},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=R,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=S.T,r={};S.T=r;try{var n=e(),o=S.S;null!==o&&o(r,n),"object"==typeof n&&null!==n&&"function"==typeof n.then&&n.then(N,O)}catch(e){O(e)}finally{S.T=t}},t.unstable_useCacheRefresh=function(){return S.H.useCacheRefresh()},t.use=function(e){return S.H.use(e)},t.useActionState=function(e,t,r){return S.H.useActionState(e,t,r)},t.useCallback=function(e,t){return S.H.useCallback(e,t)},t.useContext=function(e){return S.H.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e,t){return S.H.useDeferredValue(e,t)},t.useEffect=function(e,t){return S.H.useEffect(e,t)},t.useId=function(){return S.H.useId()},t.useImperativeHandle=function(e,t,r){return S.H.useImperativeHandle(e,t,r)},t.useInsertionEffect=function(e,t){return S.H.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return S.H.useLayoutEffect(e,t)},t.useMemo=function(e,t){return S.H.useMemo(e,t)},t.useOptimistic=function(e,t){return S.H.useOptimistic(e,t)},t.useReducer=function(e,t,r){return S.H.useReducer(e,t,r)},t.useRef=function(e){return S.H.useRef(e)},t.useState=function(e){return S.H.useState(e)},t.useSyncExternalStore=function(e,t,r){return S.H.useSyncExternalStore(e,t,r)},t.useTransition=function(){return S.H.useTransition()},t.version="19.0.0-rc-66855b96-20241106"},"./dist/compiled/react/index.js":(e,t,r)=>{"use strict";e.exports=r("./dist/compiled/react/cjs/react.production.js")}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,r),s.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},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:()=>te,WrappedNextRouterError:()=>e5,default:()=>tt,hasNonStaticMethods:()=>tr,trackDynamic:()=>tg});var e,t,o,s,i,a,l,u,c,d,h,p,f,m,g,y,v,b,w={};r.r(w),r.d(w,{DynamicServerError:()=>es,isDynamicServerError:()=>ei});var x={};r.r(x),r.d(x,{AppRouterContext:()=>ez,GlobalLayoutRouterContext:()=>eQ,LayoutRouterContext:()=>eX,MissingSlotContext:()=>eJ,TemplateContext:()=>eV});var S={};r.r(S),r.d(S,{appRouterContext:()=>x});class _{constructor({userland:e,definition:t}){this.userland=e,this.definition=t}}let C="Next-Action",R=["RSC","Next-Router-State-Tree","Next-Router-Prefetch","Next-HMR-Refresh","Next-Router-Segment-Prefetch"];class E{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 P extends Error{constructor(){super("Headers cannot be modified. Read more: https://nextjs.org/docs/app/api-reference/functions/headers")}static callable(){throw new P}}class T extends Headers{constructor(e){super(),this.headers=new Proxy(e,{get(t,r,n){if("symbol"==typeof r)return E.get(t,r,n);let o=r.toLowerCase(),s=Object.keys(e).find(e=>e.toLowerCase()===o);if(void 0!==s)return E.get(t,s,n)},set(t,r,n,o){if("symbol"==typeof r)return E.set(t,r,n,o);let s=r.toLowerCase(),i=Object.keys(e).find(e=>e.toLowerCase()===s);return E.set(t,i??r,n,o)},has(t,r){if("symbol"==typeof r)return E.has(t,r);let n=r.toLowerCase(),o=Object.keys(e).find(e=>e.toLowerCase()===n);return void 0!==o&&E.has(t,o)},deleteProperty(t,r){if("symbol"==typeof r)return E.deleteProperty(t,r);let n=r.toLowerCase(),o=Object.keys(e).find(e=>e.toLowerCase()===n);return void 0===o||E.deleteProperty(t,o)}})}static seal(e){return new Proxy(e,{get(e,t,r){switch(t){case"append":case"delete":case"set":return P.callable;default:return E.get(e,t,r)}}})}merge(e){return Array.isArray(e)?e.join(", "):e}static from(e){return e instanceof Headers?e:new T(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 k=r("./dist/compiled/@edge-runtime/cookies/index.js");let A=require("next/dist/server/app-render/work-async-storage.external.js"),O=require("next/dist/server/app-render/work-unit-async-storage.external.js");class N 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#options")}static callable(){throw new N}}class I{static seal(e){return new Proxy(e,{get(e,t,r){switch(t){case"clear":case"delete":case"set":return N.callable;default:return E.get(e,t,r)}}})}}let $=Symbol.for("next.mutated.cookies");function j(e,t){let r=function(e){let t=e[$];return t&&Array.isArray(t)&&0!==t.length?t:[]}(t);if(0===r.length)return!1;let n=new k.ResponseCookies(e),o=n.getAll();for(let e of r)n.set(e);for(let e of o)n.set(e);return!0}class L{static wrap(e,t){let r=new k.ResponseCookies(new Headers);for(let t of e.getAll())r.set(t);let n=[],o=new Set,s=()=>{let e=A.workAsyncStorage.getStore();if(e&&(e.pathWasRevalidated=!0),n=r.getAll().filter(e=>o.has(e.name)),t){let e=[];for(let t of n){let r=new k.ResponseCookies(new Headers);r.set(t),e.push(r.toString())}t(e)}},i=new Proxy(r,{get(e,t,r){switch(t){case $:return n;case"delete":return function(...t){o.add("string"==typeof t[0]?t[0]:t[0].name);try{return e.delete(...t),i}finally{s()}};case"set":return function(...t){o.add("string"==typeof t[0]?t[0]:t[0].name);try{return e.set(...t),i}finally{s()}};default:return E.get(e,t,r)}}});return i}}function M(e){if("action"!==(0,O.getExpectedRequestStore)(e).phase)throw new N}let D="_N_T_",U={shared:"shared",reactServerComponents:"rsc",serverSideRendering:"ssr",actionBrowser:"action-browser",api:"api",middleware:"middleware",instrument:"instrument",edgeAsset:"edge-asset",appPagesBrowser:"app-pages-browser"};({...U,GROUP:{builtinReact:[U.reactServerComponents,U.actionBrowser],serverOnly:[U.reactServerComponents,U.actionBrowser,U.instrument,U.middleware],neutralTarget:[U.api],clientOnly:[U.serverSideRendering,U.appPagesBrowser],bundled:[U.reactServerComponents,U.actionBrowser,U.serverSideRendering,U.appPagesBrowser,U.shared,U.instrument],appPages:[U.reactServerComponents,U.serverSideRendering,U.appPagesBrowser,U.actionBrowser]}});let H=require("next/dist/server/lib/trace/tracer");(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.createComponentTree="NextNodeServer.createComponentTree",e.clientComponentLoading="NextNodeServer.clientComponentLoading",e.getLayoutOrPageModule="NextNodeServer.getLayoutOrPageModule",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.startResponse="NextNodeServer.startResponse",e.route="route",e.onProxyReq="onProxyReq",e.apiResolver="apiResolver",e.internalFetch="internalFetch"}(s||(s={})),(i||(i={})).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"}(a||(a={})),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={})),(p||(p={})).execute="Middleware.execute";let q="__prerender_bypass";Symbol("__next_preview_data"),Symbol(q);class G{constructor(e,t,r,n){var o;let s=e&&function(e,t){let r=T.from(e.headers);return{isOnDemandRevalidate:r.get("x-prerender-revalidate")===t.previewModeId,revalidateOnlyGenerated:r.has("x-prerender-revalidate-if-generated")}}(t,e).isOnDemandRevalidate,i=null==(o=r.get(q))?void 0:o.value;this.isEnabled=!!(!s&&i&&e&&i===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:q,value:this._previewModeId,httpOnly:!0,sameSite:"none",secure:!0,path:"/"})}disable(){this._mutableCookies.set({name:q,value:"",httpOnly:!0,sameSite:"none",secure:!0,path:"/",expires:new Date(0)})}}function B(e,t){if("x-middleware-set-cookie"in e.headers&&"string"==typeof e.headers["x-middleware-set-cookie"]){let r=e.headers["x-middleware-set-cookie"],n=new Headers;for(let e of function(e){var t,r,n,o,s,i=[],a=0;function l(){for(;a<e.length&&/\s/.test(e.charAt(a));)a+=1;return a<e.length}for(;a<e.length;){for(t=a,s=!1;l();)if(","===(r=e.charAt(a))){for(n=a,a+=1,l(),o=a;a<e.length&&"="!==(r=e.charAt(a))&&";"!==r&&","!==r;)a+=1;a<e.length&&"="===e.charAt(a)?(s=!0,a=o,i.push(e.substring(t,n)),t=a):a=n+1}else a+=1;(!s||a>=e.length)&&i.push(e.substring(t,e.length))}return i}(r))n.append("set-cookie",e);for(let e of new k.ResponseCookies(n).getAll())t.set(e)}}var W=r("./dist/compiled/p-queue/index.js"),F=r.n(W);class z extends Error{constructor(e,t){super("Invariant: "+(e.endsWith(".")?e:e+".")+" This is a bug in Next.js.",t),this.name="InvariantError"}}async function X(e,t){if(!e)return t();let r=Q(e);try{return await t()}finally{let t=function(e,t){let r=new Set(e.revalidatedTags),n=new Set(e.pendingRevalidateWrites);return{revalidatedTags:t.revalidatedTags.filter(e=>!r.has(e)),pendingRevalidates:Object.fromEntries(Object.entries(t.pendingRevalidates).filter(([t])=>!(t in e.pendingRevalidates))),pendingRevalidateWrites:t.pendingRevalidateWrites.filter(e=>!n.has(e))}}(r,Q(e));await V(e,t)}}function Q(e){return{revalidatedTags:e.revalidatedTags?[...e.revalidatedTags]:[],pendingRevalidates:{...e.pendingRevalidates},pendingRevalidateWrites:e.pendingRevalidateWrites?[...e.pendingRevalidateWrites]:[]}}async function V(e,{revalidatedTags:t,pendingRevalidates:r,pendingRevalidateWrites:n}){var o;return Promise.all([null==(o=e.incrementalCache)?void 0:o.revalidateTag(t),...Object.values(r),...n])}let J=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class Y{disable(){throw J}getStore(){}run(){throw J}exit(){throw J}enterWith(){throw J}static bind(e){return e}}let Z="undefined"!=typeof globalThis&&globalThis.AsyncLocalStorage;class K{constructor({waitUntil:e,onClose:t,onTaskError:r}){this.workUnitStores=new Set,this.waitUntil=e,this.onClose=t,this.onTaskError=r,this.callbackQueue=new(F()),this.callbackQueue.pause()}after(e){if(null!==e&&"object"==typeof e&&"then"in e&&"function"==typeof e.then)this.waitUntil||ee(),this.waitUntil(e.catch(e=>this.reportTaskError(e)));else if("function"==typeof e)this.addCallback(e);else throw Error("`unstable_after()`: Argument must be a promise or a function")}addCallback(e){var t;if(this.waitUntil||ee(),!this.onClose)throw new z("unstable_after: Missing `onClose` implementation");let r=O.workUnitAsyncStorage.getStore();if(!r)throw new z("Missing workUnitStore in AfterContext.addCallback");this.workUnitStores.add(r),this.runCallbacksOnClosePromise||(this.runCallbacksOnClosePromise=this.runCallbacksOnClose(),this.waitUntil(this.runCallbacksOnClosePromise));let n=(t=async()=>{try{await e()}catch(e){this.reportTaskError(e)}},Z?Z.bind(t):Y.bind(t));this.callbackQueue.add(n)}async runCallbacksOnClose(){return await new Promise(e=>this.onClose(e)),this.runCallbacks()}async runCallbacks(){if(0===this.callbackQueue.size)return;for(let e of this.workUnitStores)e.phase="after";let e=A.workAsyncStorage.getStore();if(!e)throw new z("Missing workStore in AfterContext.runCallbacks");return X(e,()=>(this.callbackQueue.start(),this.callbackQueue.onIdle()))}reportTaskError(e){if(console.error("An error occurred in a function passed to `unstable_after()`:",e),this.onTaskError)try{null==this.onTaskError||this.onTaskError.call(this,e)}catch(e){console.error(new z("`onTaskError` threw while handling an error thrown from an `unstable_after` task",{cause:e}))}}}function ee(){throw Error("`unstable_after()` will not work correctly, because `waitUntil` is not available in the current environment.")}let et=["GET","HEAD","OPTIONS","POST","PUT","DELETE","PATCH"],er=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};var en=r("./dist/compiled/react/index.js");let eo="DYNAMIC_SERVER_USAGE";class es extends Error{constructor(e){super("Dynamic server usage: "+e),this.description=e,this.digest=eo}}function ei(e){return"object"==typeof e&&null!==e&&"digest"in e&&"string"==typeof e.digest&&e.digest===eo}class ea extends Error{constructor(...e){super(...e),this.code="NEXT_STATIC_GEN_BAILOUT"}}let el="function"==typeof en.unstable_postpone;function eu(e){return{isDebugDynamicAccesses:e,dynamicAccesses:[],syncDynamicExpression:void 0,syncDynamicErrorWithStack:null}}function ec(e,t,r){if((!t||"cache"!==t.type&&"unstable-cache"!==t.type)&&!e.forceDynamic&&!e.forceStatic){if(e.dynamicShouldError)throw new ea(`Route ${e.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${r}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`);if(t){if("prerender-ppr"===t.type)ep(e.route,r,t.dynamicTracking);else if("prerender-legacy"===t.type){t.revalidate=0;let n=new es(`Route ${e.route} couldn't be rendered statically because it used ${r}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`);throw e.dynamicUsageDescription=r,e.dynamicUsageStack=n.stack,n}}}}function ed(e,t,r){let n=new es(`Route ${t.route} couldn't be rendered statically because it used \`${e}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`);throw r.revalidate=0,t.dynamicUsageDescription=e,t.dynamicUsageStack=n.stack,n}function eh(e,t,r,n){let o=n.dynamicTracking;throw o&&null===o.syncDynamicErrorWithStack&&(o.syncDynamicExpression=t,o.syncDynamicErrorWithStack=r,!0===n.validating&&(o.syncDynamicLogged=!0)),function(e,t,r){let n=em(`Route ${e} needs to bail out of prerendering at this point because it used ${t}.`);r.controller.abort(n);let o=r.dynamicTracking;o&&o.dynamicAccesses.push({stack:o.isDebugDynamicAccesses?Error().stack:void 0,expression:t})}(e,t,n),em(`Route ${e} needs to bail out of prerendering at this point because it used ${t}.`)}function ep(e,t,r){(function(){if(!el)throw Error("Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js")})(),r&&r.dynamicAccesses.push({stack:r.isDebugDynamicAccesses?Error().stack:void 0,expression:t}),en.unstable_postpone(ef(e,t))}function ef(e,t){return`Route ${e} 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`}if(!1===function(e){return e.includes("needs to bail out of prerendering at this point because it used")&&e.includes("Learn more: https://nextjs.org/docs/messages/ppr-caught-error")}(ef("%%%","^^^")))throw Error("Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js");function em(e){let t=Error(e);return t.digest="NEXT_PRERENDER_INTERRUPTED",t}function eg(e,t){let r=new Promise((r,n)=>{e.addEventListener("abort",()=>{n(Error(`During prerendering, ${t} rejects when the prerender is complete. Typically these errors are handled by React but if you move ${t} to a different context by using \`setTimeout\`, \`unstable_after\`, or similar functions you may observe this error and you should handle it in that context.`))},{once:!0})});return r.catch(ey),r}function ey(){}function ev(e){return e.replace(/\/$/,"")||"/"}function eb(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 ew(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:n,hash:o}=eb(e);return""+t+r+n+o}function ex(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:n,hash:o}=eb(e);return""+r+t+n+o}function eS(e,t){if("string"!=typeof e)return!1;let{pathname:r}=eb(e);return r===t||r.startsWith(t+"/")}function e_(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}}RegExp(`\\n\\s+at __next_metadata_boundary__[\\n\\s]`),RegExp(`\\n\\s+at __next_viewport_boundary__[\\n\\s]`),RegExp(`\\n\\s+at __next_outlet_boundary__[\\n\\s]`),function(e){e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.PAGES="PAGES",e.FETCH="FETCH",e.REDIRECT="REDIRECT",e.IMAGE="IMAGE"}(f||(f={})),function(e){e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.PAGES="PAGES",e.FETCH="FETCH",e.IMAGE="IMAGE"}(m||(m={})),new Uint8Array([60,104,116,109,108]),new Uint8Array([60,98,111,100,121]),new Uint8Array([60,47,104,101,97,100,62]),new Uint8Array([60,47,98,111,100,121,62]),new Uint8Array([60,47,104,116,109,108,62]),new Uint8Array([60,47,98,111,100,121,62,60,47,104,116,109,108,62]),new TextEncoder,Symbol.for("NextInternalRequestMeta");let eC=/(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;function eR(e,t){return new URL(String(e).replace(eC,"localhost"),t&&String(t).replace(eC,"localhost"))}let eE=Symbol("NextURLInternal");class eP{constructor(e,t,r){let n,o;"object"==typeof t&&"pathname"in t||"string"==typeof t?(n=t,o=r||{}):o=r||t||{},this[eE]={url:eR(e,n??o.base),options:o,basePath:""},this.analyze()}analyze(){var e,t,r,n,o;let s=function(e,t){var r,n;let{basePath:o,i18n:s,trailingSlash:i}=null!=(r=t.nextConfig)?r:{},a={pathname:e,trailingSlash:"/"!==e?e.endsWith("/"):i};o&&eS(a.pathname,o)&&(a.pathname=function(e,t){if(!eS(e,t))return e;let r=e.slice(t.length);return r.startsWith("/")?r:"/"+r}(a.pathname,o),a.basePath=o);let l=a.pathname;if(a.pathname.startsWith("/_next/data/")&&a.pathname.endsWith(".json")){let e=a.pathname.replace(/^\/_next\/data\//,"").replace(/\.json$/,"").split("/"),r=e[0];a.buildId=r,l="index"!==e[1]?"/"+e.slice(1).join("/"):"/",!0===t.parseData&&(a.pathname=l)}if(s){let e=t.i18nProvider?t.i18nProvider.analyze(a.pathname):e_(a.pathname,s.locales);a.locale=e.detectedLocale,a.pathname=null!=(n=e.pathname)?n:a.pathname,!e.detectedLocale&&a.buildId&&(e=t.i18nProvider?t.i18nProvider.analyze(l):e_(l,s.locales)).detectedLocale&&(a.locale=e.detectedLocale)}return a}(this[eE].url.pathname,{nextConfig:this[eE].options.nextConfig,parseData:!process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE,i18nProvider:this[eE].options.i18nProvider}),i=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[eE].url,this[eE].options.headers);this[eE].domainLocale=this[eE].options.i18nProvider?this[eE].options.i18nProvider.detectDomainLocale(i):function(e,t,r){if(e)for(let s of(r&&(r=r.toLowerCase()),e)){var n,o;if(t===(null==(n=s.domain)?void 0:n.split(":",1)[0].toLowerCase())||r===s.defaultLocale.toLowerCase()||(null==(o=s.locales)?void 0:o.some(e=>e.toLowerCase()===r)))return s}}(null==(t=this[eE].options.nextConfig)?void 0:null==(e=t.i18n)?void 0:e.domains,i);let a=(null==(r=this[eE].domainLocale)?void 0:r.defaultLocale)||(null==(o=this[eE].options.nextConfig)?void 0:null==(n=o.i18n)?void 0:n.defaultLocale);this[eE].url.pathname=s.pathname,this[eE].defaultLocale=a,this[eE].basePath=s.basePath??"",this[eE].buildId=s.buildId,this[eE].locale=s.locale??a,this[eE].trailingSlash=s.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&&(eS(o,"/api")||eS(o,"/"+t.toLowerCase()))?e:ew(e,"/"+t)}((e={basePath:this[eE].basePath,buildId:this[eE].buildId,defaultLocale:this[eE].options.forceLocale?void 0:this[eE].defaultLocale,locale:this[eE].locale,pathname:this[eE].url.pathname,trailingSlash:this[eE].trailingSlash}).pathname,e.locale,e.buildId?void 0:e.defaultLocale,e.ignorePrefix),(e.buildId||!e.trailingSlash)&&(t=ev(t)),e.buildId&&(t=ex(ew(t,"/_next/data/"+e.buildId),"/"===e.pathname?"index.json":".json")),t=ew(t,e.basePath),!e.buildId&&e.trailingSlash?t.endsWith("/")?t:ex(t,"/"):ev(t)}formatSearch(){return this[eE].url.search}get buildId(){return this[eE].buildId}set buildId(e){this[eE].buildId=e}get locale(){return this[eE].locale??""}set locale(e){var t,r;if(!this[eE].locale||!(null==(r=this[eE].options.nextConfig)?void 0:null==(t=r.i18n)?void 0:t.locales.includes(e)))throw TypeError(`The NextURL configuration includes no locale "${e}"`);this[eE].locale=e}get defaultLocale(){return this[eE].defaultLocale}get domainLocale(){return this[eE].domainLocale}get searchParams(){return this[eE].url.searchParams}get host(){return this[eE].url.host}set host(e){this[eE].url.host=e}get hostname(){return this[eE].url.hostname}set hostname(e){this[eE].url.hostname=e}get port(){return this[eE].url.port}set port(e){this[eE].url.port=e}get protocol(){return this[eE].url.protocol}set protocol(e){this[eE].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[eE].url=eR(e),this.analyze()}get origin(){return this[eE].url.origin}get pathname(){return this[eE].url.pathname}set pathname(e){this[eE].url.pathname=e}get hash(){return this[eE].url.hash}set hash(e){this[eE].url.hash=e}get search(){return this[eE].url.search}set search(e){this[eE].url.search=e}get password(){return this[eE].url.password}set password(e){this[eE].url.password=e}get username(){return this[eE].url.username}set username(e){this[eE].url.username=e}get basePath(){return this[eE].basePath}set basePath(e){this[eE].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 eP(String(this),this[eE].options)}}Symbol("internal request"),Request,Symbol.for("edge-runtime.inspect.custom"),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE",e.IMAGE="IMAGE"}(g||(g={}));let eT=e=>{setImmediate(e)},ek=Symbol.for("next-patch");function eA(e,t){var r;e&&(null==(r=e.requestEndedState)||!r.ended)&&(process.env.NEXT_DEBUG_BUILD||"1"===process.env.NEXT_SSG_FETCH_METRICS)&&e.isStaticGeneration&&(e.fetchMetrics??=[],e.fetchMetrics.push({...t,end:performance.timeOrigin+performance.now(),idx:e.nextFetchId||0}))}let{env:eO,stdout:eN}=(null==(y=globalThis)?void 0:y.process)??{},eI=eO&&!eO.NO_COLOR&&(eO.FORCE_COLOR||(null==eN?void 0:eN.isTTY)&&!eO.CI&&"dumb"!==eO.TERM),e$=(e,t,r,n)=>{let o=e.substring(0,n)+r,s=e.substring(n+t.length),i=s.indexOf(t);return~i?o+e$(s,t,r,i):o+s},ej=(e,t,r=e)=>eI?n=>{let o=""+n,s=o.indexOf(t,e.length);return~s?e+e$(o,t,r,s)+t:e+o+t}:String,eL=ej("\x1b[1m","\x1b[22m","\x1b[22m\x1b[1m");ej("\x1b[2m","\x1b[22m","\x1b[22m\x1b[2m"),ej("\x1b[3m","\x1b[23m"),ej("\x1b[4m","\x1b[24m"),ej("\x1b[7m","\x1b[27m"),ej("\x1b[8m","\x1b[28m"),ej("\x1b[9m","\x1b[29m"),ej("\x1b[30m","\x1b[39m");let eM=ej("\x1b[31m","\x1b[39m"),eD=ej("\x1b[32m","\x1b[39m"),eU=ej("\x1b[33m","\x1b[39m");ej("\x1b[34m","\x1b[39m");let eH=ej("\x1b[35m","\x1b[39m");ej("\x1b[38;2;173;127;168m","\x1b[39m"),ej("\x1b[36m","\x1b[39m");let eq=ej("\x1b[37m","\x1b[39m");ej("\x1b[90m","\x1b[39m"),ej("\x1b[40m","\x1b[49m"),ej("\x1b[41m","\x1b[49m"),ej("\x1b[42m","\x1b[49m"),ej("\x1b[43m","\x1b[49m"),ej("\x1b[44m","\x1b[49m"),ej("\x1b[45m","\x1b[49m"),ej("\x1b[46m","\x1b[49m"),ej("\x1b[47m","\x1b[49m"),eq(eL("○")),eM(eL("⨯")),eU(eL("⚠")),eq(eL(" ")),eD(eL("✓")),eH(eL("»"));let eG=["HEAD","OPTIONS"];function eB(){return new Response(null,{status:405})}function eW(e,t){let r;if("object"==typeof e&&null!==e&&"string"==typeof e.message){if(r=e.message,"string"==typeof e.stack){let n=e.stack,o=n.indexOf("\n");if(o>-1){let e=Error(`Route ${t} errored during the prospective render. These errors are normally ignored and may not prevent the route from prerendering but are logged here because build debugging is enabled.
          
Original Error: ${r}`);e.stack="Error: "+e.message+n.slice(o),console.error(e);return}}}else"string"==typeof e&&(r=e);if(r){console.error(`Route ${t} errored during the prospective render. These errors are normally ignored and may not prevent the route from prerendering but are logged here because build debugging is enabled. No stack was provided.
          
Original Message: ${r}`);return}console.error(`Route ${t} errored during the prospective render. These errors are normally ignored and may not prevent the route from prerendering but are logged here because build debugging is enabled. The thrown value is logged just following this message`),console.error(e)}let eF=require("next/dist/server/app-render/action-async-storage.external.js"),ez=en.createContext(null),eX=en.createContext(null),eQ=en.createContext(null),eV=en.createContext(null),eJ=en.createContext(new Set);class eY{constructor(){this.count=0,this.earlyListeners=[],this.listeners=[],this.tickPending=!1,this.taskPending=!1}noMorePendingCaches(){this.tickPending||(this.tickPending=!0,process.nextTick(()=>{if(this.tickPending=!1,0===this.count){for(let e=0;e<this.earlyListeners.length;e++)this.earlyListeners[e]();this.earlyListeners.length=0}})),this.taskPending||(this.taskPending=!0,setTimeout(()=>{if(this.taskPending=!1,0===this.count){for(let e=0;e<this.listeners.length;e++)this.listeners[e]();this.listeners.length=0}},0))}inputReady(){return new Promise(e=>{this.earlyListeners.push(e),0===this.count&&this.noMorePendingCaches()})}cacheReady(){return new Promise(e=>{this.listeners.push(e),0===this.count&&this.noMorePendingCaches()})}beginRead(){this.count++}endRead(){this.count--,0===this.count&&this.noMorePendingCaches()}}let eZ=/^[A-Za-z_$][A-Za-z0-9_$]*$/;function eK(e,t){return eZ.test(t)?`\`${e}.${t}\``:`\`${e}[${JSON.stringify(t)}]\``}let e0=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toString","valueOf","toLocaleString","then","catch","finally","status","displayName","toJSON","$$typeof","__esModule"]),e1={current:null},e4="function"==typeof en.cache?en.cache:e=>e,e2=process.env.__NEXT_DYNAMIC_IO?console.error:console.warn;function e9(e){return function(...t){e2(e(...t))}}e4(e=>{try{e2(e1.current)}finally{e1.current=null}});let e6=new WeakMap;function e3(e){let t=e6.get(e);if(t)return t;let r=Promise.resolve(e);return e6.set(e,r),Object.keys(e).forEach(t=>{e0.has(t)||(r[t]=e[t])}),r}function e8(e,t){let r=e?`Route "${e}" `:"This route ";return Error(`${r}used ${t}. \`params\` should be awaited before using its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`)}function e7(e){if("object"!=typeof e||null===e||!("digest"in e)||"string"!=typeof e.digest)return!1;let t=e.digest.split(";"),[r,n]=t,o=t.slice(2,-2).join(";"),s=Number(t.at(-2));return"NEXT_REDIRECT"===r&&("replace"===n||"push"===n)&&"string"==typeof o&&!isNaN(s)&&s in v}process.env.__NEXT_DISABLE_SYNC_DYNAMIC_API_WARNINGS||e9(e8),process.env.__NEXT_DISABLE_SYNC_DYNAMIC_API_WARNINGS||e9(function(e,t,r){let n=e?`Route "${e}" `:"This route ";return Error(`${n}used ${t}. \`params\` should be awaited before using its properties. The following properties were not available through enumeration because they conflict with builtin property names: ${function(e){switch(e.length){case 0:throw new z("Expected describeListOfPropertyNames to be called with a non-empty list of strings.");case 1:return`\`${e[0]}\``;case 2:return`\`${e[0]}\` and \`${e[1]}\``;default:{let t="";for(let r=0;r<e.length-1;r++)t+=`\`${e[r]}\`, `;return t+`, and \`${e[e.length-1]}\``}}}(r)}. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis`)}),function(e){e[e.SeeOther=303]="SeeOther",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.PermanentRedirect=308]="PermanentRedirect"}(v||(v={})),function(e){e.push="push",e.replace="replace"}(b||(b={}));class e5{constructor(e,t){this.error=e,this.headers=t}}class te extends _{static #e=this.sharedModules=S;constructor({userland:e,definition:t,resolvedPagePath:r,nextConfigOutput:n}){if(super({userland:e,definition:t}),this.workUnitAsyncStorage=O.workUnitAsyncStorage,this.workAsyncStorage=A.workAsyncStorage,this.serverHooks=w,this.actionAsyncStorage=eF.actionAsyncStorage,this.resolvedPagePath=r,this.nextConfigOutput=n,this.methods=function(e){let t=et.reduce((t,r)=>({...t,[r]:e[r]??eB}),{}),r=new Set(et.filter(t=>e[t]));for(let n of eG.filter(e=>!r.has(e))){if("HEAD"===n){e.GET&&(t.HEAD=e.GET,r.add("HEAD"));continue}if("OPTIONS"===n){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: ${n}`)}return t}(e),this.hasNonStaticMethods=tr(e),this.dynamic=this.userland.dynamic,"export"===this.nextConfigOutput){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`);if(!function(e){return"force-static"===e.dynamic||"error"===e.dynamic||!1===e.revalidate||void 0!==e.revalidate&&e.revalidate>0||"function"==typeof e.generateStaticParams}(this.userland)&&this.userland.GET)throw Error(`export const dynamic = "force-static"/export const revalidate not configured on route "${t.pathname}" with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export`);this.dynamic="error"}}resolve(e){return et.includes(e)?this.methods[e]:()=>new Response(null,{status:400})}async do(e,t,r,n,o,i,a){var u,c,d,h,p;let g;let y=r.isStaticGeneration,b=!!(null==(u=a.renderOpts.experimental)?void 0:u.dynamicIO);!function(e){if(!0===globalThis[ek])return;let t=function(e){let t=en.cache(e=>[]);return function(r,n){let o,s,i;if(n&&n.signal)return e(r,n);if("string"!=typeof r||n){let t="string"==typeof r||r instanceof URL?new Request(r,n):r;if("GET"!==t.method&&"HEAD"!==t.method||t.keepalive)return e(r,n);s=JSON.stringify([t.method,Array.from(t.headers.entries()),t.mode,t.redirect,t.credentials,t.referrer,t.referrerPolicy,t.integrity]),o=t.url}else s='["GET",[],null,"follow",null,null,null,null]',o=r;let a=t(o);if(0===a.length)i=e(r,n),a.push(s,i);else{for(let e=0,t=a.length;e<t;e+=2){let t=a[e],r=a[e+1];if(t===s)return(i=r).then(e=>e.clone())}i=e(r,n),a.push(s,i)}return i.then(e=>e.clone())}}(globalThis.fetch);globalThis.fetch=function(e,{workAsyncStorage:t,workUnitAsyncStorage:r}){let n=async(n,o)=>{var i,a;let u;try{(u=new URL(n instanceof Request?n.url:n)).username="",u.password=""}catch{u=void 0}let c=(null==u?void 0:u.href)??"",d=(null==o?void 0:null==(i=o.method)?void 0:i.toUpperCase())||"GET",h=(null==o?void 0:null==(a=o.next)?void 0:a.internal)===!0,p="1"===process.env.NEXT_OTEL_FETCH_DISABLED,g=h?void 0:performance.timeOrigin+performance.now(),y=t.getStore(),v=r.getStore(),b=v&&"prerender"===v.type?v.cacheSignal:null;b&&b.beginRead();let w=(0,H.getTracer)().trace(h?s.internalFetch:l.fetch,{hideSpan:p,kind:H.SpanKind.CLIENT,spanName:["fetch",d,c].filter(Boolean).join(" "),attributes:{"http.url":c,"http.method":d,"net.peer.name":null==u?void 0:u.hostname,"net.peer.port":(null==u?void 0:u.port)||void 0}},async()=>{var t;let r,s,i,a;if(h||!y||y.isDraftMode)return e(n,o);let l=n&&"object"==typeof n&&"string"==typeof n.method,u=e=>(null==o?void 0:o[e])||(l?n[e]:null),d=e=>{var t,r,s;return void 0!==(null==o?void 0:null==(t=o.next)?void 0:t[e])?null==o?void 0:null==(r=o.next)?void 0:r[e]:l?null==(s=n.next)?void 0:s[e]:void 0},p=d("revalidate"),w=function(e,t){let r=[],n=[];for(let o=0;o<e.length;o++){let s=e[o];if("string"!=typeof s?n.push({tag:s,reason:"invalid type, must be a string"}):s.length>256?n.push({tag:s,reason:"exceeded max length of 256"}):r.push(s),r.length>64){console.warn(`Warning: exceeded max tag count for ${t}, dropped tags:`,e.slice(o).join(", "));break}}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}(d("tags")||[],`fetch ${n.toString()}`),x=v&&("cache"===v.type||"prerender"===v.type||"prerender-ppr"===v.type||"prerender-legacy"===v.type)?v:void 0;if(x&&Array.isArray(w)){let e=x.tags??(x.tags=[]);for(let t of w)e.includes(t)||e.push(t)}let S=v&&"unstable-cache"!==v.type?v.implicitTags:[],_=v&&"unstable-cache"===v.type?"force-no-store":y.fetchCache,C=!!y.isUnstableNoStore,R=u("cache"),E="";"string"==typeof R&&void 0!==p&&("force-cache"===R&&0===p||"no-store"===R&&(p>0||!1===p))&&(r=`Specified "cache: ${R}" and "revalidate: ${p}", only one should be specified.`,R=void 0,p=void 0);let P="no-cache"===R||"no-store"===R||"force-no-store"===_||"only-no-store"===_,T=!_&&!R&&!p&&y.forceDynamic;"force-cache"===R&&void 0===p?p=!1:(null==v?void 0:v.type)!=="cache"&&(P||T)&&(p=0),("no-cache"===R||"no-store"===R)&&(E=`cache: ${R}`),a=function(e,t){try{let r;if(!1===e)r=4294967294;else if("number"==typeof e&&!isNaN(e)&&e>-1)r=e;else if(void 0!==e)throw Error(`Invalid revalidate value "${e}" on "${t}", must be a non-negative number or false`);return r}catch(e){if(e instanceof Error&&e.message.includes("Invalid revalidate"))throw e;return}}(p,y.route);let k=u("headers"),A="function"==typeof(null==k?void 0:k.get)?k:new Headers(k||{}),O=A.get("authorization")||A.get("cookie"),N=!["get","head"].includes((null==(t=u("method"))?void 0:t.toLowerCase())||"get"),I=void 0==_&&(void 0==R||"default"===R)&&void 0==p,$=I&&!y.isPrerendering||(O||N)&&x&&0===x.revalidate;if(I&&void 0!==v&&"prerender"===v.type)return b&&(b.endRead(),b=null),eg(v.renderSignal,"fetch()");switch(_){case"force-no-store":E="fetchCache = force-no-store";break;case"only-no-store":if("force-cache"===R||void 0!==a&&a>0)throw Error(`cache: 'force-cache' used on fetch for ${c} with 'export const fetchCache = 'only-no-store'`);E="fetchCache = only-no-store";break;case"only-cache":if("no-store"===R)throw Error(`cache: 'no-store' used on fetch for ${c} with 'export const fetchCache = 'only-cache'`);break;case"force-cache":(void 0===p||0===p)&&(E="fetchCache = force-cache",a=4294967294)}if(void 0===a?"default-cache"!==_||C?"default-no-store"===_?(a=0,E="fetchCache = default-no-store"):C?(a=0,E="noStore call"):$?(a=0,E="auto no cache"):(E="auto cache",a=x?x.revalidate:4294967294):(a=4294967294,E="fetchCache = default-cache"):E||(E=`revalidate: ${a}`),!(y.forceStatic&&0===a)&&!$&&x&&a<x.revalidate){if(0===a){if(v&&"prerender"===v.type)return b&&(b.endRead(),b=null),eg(v.renderSignal,"fetch()");ec(y,v,`revalidate: 0 fetch ${n} ${y.route}`)}x&&p===a&&(x.revalidate=a)}let j="number"==typeof a&&a>0,{incrementalCache:L}=y,M=void 0!==v&&"request"===v.type?v:void 0;if(L&&(j||(null==M?void 0:M.serverComponentsHmrCache)))try{s=await L.generateCacheKey(c,l?n:o)}catch(e){console.error("Failed to generate cache key for",n)}let D=y.nextFetchId??1;y.nextFetchId=D+1;let U=()=>Promise.resolve(),H=async(t,i)=>{let u=["cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","window","duplex",...t?[]:["signal"]];if(l){let e=n,t={body:e._ogBody||e.body};for(let r of u)t[r]=e[r];n=new Request(e.url,t)}else if(o){let{_ogBody:e,body:r,signal:n,...s}=o;o={...s,body:e||r,signal:t?void 0:n}}let d={...o,next:{...null==o?void 0:o.next,fetchType:"origin",fetchIdx:D}};return e(n,d).then(async e=>{if(!t&&g&&eA(y,{start:g,url:c,cacheReason:i||E,cacheStatus:0===a||i?"skip":"miss",cacheWarning:r,status:e.status,method:d.method||"GET"}),200===e.status&&L&&s&&(j||(null==M?void 0:M.serverComponentsHmrCache))){let t=a>=4294967294?31536e3:a,r=!(a>=4294967294)&&a;if(!v||"prerender"!==v.type)return e.clone().arrayBuffer().then(async n=>{var o;let i=Buffer.from(n),a={headers:Object.fromEntries(e.headers.entries()),body:i.toString("base64"),status:e.status,url:e.url};null==M||null==(o=M.serverComponentsHmrCache)||o.set(s,a),j&&await L.set(s,{kind:f.FETCH,data:a,revalidate:t},{fetchCache:!0,revalidate:r,fetchUrl:c,fetchIdx:D,tags:w})}).catch(e=>console.warn("Failed to set fetch cache",n,e)).finally(U),e;{let n=await e.arrayBuffer(),o={headers:Object.fromEntries(e.headers.entries()),body:Buffer.from(n).toString("base64"),status:e.status,url:e.url};return await L.set(s,{kind:f.FETCH,data:o,revalidate:t},{fetchCache:!0,revalidate:r,fetchUrl:c,fetchIdx:D,tags:w}),await U(),new Response(n,{headers:e.headers,status:e.status,statusText:e.statusText})}}return await U(),e})},q=!1,G=!1;if(s&&L){let e;if((null==M?void 0:M.isHmrRefresh)&&M.serverComponentsHmrCache&&(e=M.serverComponentsHmrCache.get(s),G=!0),j&&!e){U=await L.lock(s);let t=y.isOnDemandRevalidate?null:await L.get(s,{kind:m.FETCH,revalidate:a,fetchUrl:c,fetchIdx:D,tags:w,softTags:S,isFallback:!1});I&&v&&"prerender"===v.type&&await new Promise(e=>setImmediate(e)),t?await U():i="cache-control: no-cache (hard refresh)",(null==t?void 0:t.value)&&t.value.kind===f.FETCH&&(y.isRevalidate&&t.isStale?q=!0:(t.isStale&&(y.pendingRevalidates??={},y.pendingRevalidates[s]||(y.pendingRevalidates[s]=H(!0).catch(console.error).finally(()=>{y.pendingRevalidates??={},delete y.pendingRevalidates[s||""]}))),e=t.value.data))}if(e){g&&eA(y,{start:g,url:c,cacheReason:E,cacheStatus:G?"hmr":"hit",cacheWarning:r,status:e.status||200,method:(null==o?void 0:o.method)||"GET"});let t=new Response(Buffer.from(e.body,"base64"),{headers:e.headers,status:e.status});return Object.defineProperty(t,"url",{value:e.url}),t}}if(y.isStaticGeneration&&o&&"object"==typeof o){let{cache:e}=o;if("no-store"===e){if(v&&"prerender"===v.type)return b&&(b.endRead(),b=null),eg(v.renderSignal,"fetch()");ec(y,v,`no-store fetch ${n} ${y.route}`)}let t="next"in o,{next:r={}}=o;if("number"==typeof r.revalidate&&x&&r.revalidate<x.revalidate){if(0===r.revalidate){if(v&&"prerender"===v.type)return eg(v.renderSignal,"fetch()");ec(y,v,`revalidate: 0 fetch ${n} ${y.route}`)}y.forceStatic&&0===r.revalidate||(x.revalidate=r.revalidate)}t&&delete o.next}if(!s||!q)return H(!1,i);{let e=s;y.pendingRevalidates??={};let t=y.pendingRevalidates[e];if(t){let e=await t;return new Response(e.body,{headers:e.headers,status:e.status,statusText:e.statusText})}let r=H(!0,i),n=r.then(async e=>{let t=e.clone();return{body:await t.arrayBuffer(),headers:t.headers,status:t.status,statusText:t.statusText}}).finally(()=>{var t;(null==(t=y.pendingRevalidates)?void 0:t[e])&&delete y.pendingRevalidates[e]});return n.catch(()=>{}),y.pendingRevalidates[e]=n,r}});if(b)try{return await w}finally{b&&b.endRead()}return w};return n.__nextPatched=!0,n.__nextGetStaticStore=()=>t,n._nextOriginalFetch=e,globalThis[ek]=!0,n}(t,e)}({workAsyncStorage:this.workAsyncStorage,workUnitAsyncStorage:this.workUnitAsyncStorage});let w={params:a.params?function(e,t){let r=O.workUnitAsyncStorage.getStore();if(r)switch(r.type){case"prerender":case"prerender-ppr":case"prerender-legacy":return function(e,t,r){let n=t.fallbackRouteParams;if(n){let o=!1;for(let t in e)if(n.has(t)){o=!0;break}if(o)return"prerender"===r.type?function(e,t,r){let n=e6.get(e);if(n)return n;let o=eg(r.renderSignal,"`params`");return e6.set(e,o),Object.keys(e).forEach(e=>{e0.has(e)||Object.defineProperty(o,e,{get(){let n=eK("params",e),o=e8(t,n);eh(t,n,o,r)},set(t){Object.defineProperty(o,e,{value:t,writable:!0,enumerable:!0})},enumerable:!0,configurable:!0})}),o}(e,t.route,r):function(e,t,r,n){let o=e6.get(e);if(o)return o;let s={...e},i=Promise.resolve(s);return e6.set(e,i),Object.keys(e).forEach(o=>{e0.has(o)||(t.has(o)?(Object.defineProperty(s,o,{get(){let e=eK("params",o);"prerender-ppr"===n.type?ep(r.route,e,n.dynamicTracking):ed(e,r,n)},enumerable:!0}),Object.defineProperty(i,o,{get(){let e=eK("params",o);"prerender-ppr"===n.type?ep(r.route,e,n.dynamicTracking):ed(e,r,n)},set(e){Object.defineProperty(i,o,{value:e,writable:!0,enumerable:!0})},enumerable:!0,configurable:!0})):i[o]=e[o])}),i}(e,n,t,r)}return e3(e)}(e,t,r)}return e3(e)}(function(e){let t={};for(let[r,n]of Object.entries(e))void 0!==n&&(t[r]=n);return t}(a.params),r):void 0},x=null;try{if(y){let t=this.userland.revalidate,n=!1===t||void 0===t?4294967294:t;if(b){let t;let s=new AbortController,a=!1,l=new eY,u=eu(void 0),c=x={type:"prerender",phase:"action",implicitTags:o,renderSignal:s.signal,controller:s,cacheSignal:l,dynamicTracking:u,revalidate:n,expire:4294967294,stale:4294967294,tags:[...o],prerenderResumeDataCache:null};try{t=this.workUnitAsyncStorage.run(c,e,i,w)}catch(e){s.signal.aborted?a=!0:(process.env.NEXT_DEBUG_BUILD||process.env.__NEXT_VERBOSE_LOGGING)&&eW(e,r.route)}if("object"==typeof t&&null!==t&&"function"==typeof t.then&&t.then(()=>{},e=>{s.signal.aborted?a=!0:process.env.NEXT_DEBUG_BUILD&&eW(e,r.route)}),await l.cacheReady(),a){let e=(h=u,null==(p=h.dynamicAccesses[0])?void 0:p.expression);if(e)throw new es(`Route ${r.route} couldn't be rendered statically because it used \`${e}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`);throw console.error("Expected Next.js to keep track of reason for opting out of static rendering but one was not found. This is a bug in Next.js"),new es(`Route ${r.route} couldn't be rendered statically because it used a dynamic API. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`)}let d=new AbortController;u=eu(void 0);let f=x={type:"prerender",phase:"action",implicitTags:o,renderSignal:d.signal,controller:d,cacheSignal:null,dynamicTracking:u,revalidate:n,expire:4294967294,stale:4294967294,tags:[...o],prerenderResumeDataCache:null},m=!1;if(g=await new Promise((t,n)=>{eT(async()=>{try{let o=await this.workUnitAsyncStorage.run(f,e,i,w);if(m)return;if(!(o instanceof Response)){t(o);return}m=!0;let s=!1;o.arrayBuffer().then(e=>{s||(s=!0,t(new Response(e,{headers:o.headers,status:o.status,statusText:o.statusText})))},n),eT(()=>{s||(s=!0,d.abort(),n(tm(r.route)))})}catch(e){n(e)}}),eT(()=>{m||(m=!0,d.abort(),n(tm(r.route)))})}),d.signal.aborted)throw tm(r.route);d.abort()}else x={type:"prerender-legacy",phase:"action",implicitTags:o,revalidate:n,expire:4294967294,stale:4294967294,tags:[...o]},g=await O.workUnitAsyncStorage.run(x,e,i,w)}else g=await O.workUnitAsyncStorage.run(n,e,i,w)}catch(e){if(e7(e)){let r=e7(e)?e.digest.split(";").slice(2,-2).join(";"):null;if(!r)throw Error("Invariant: Unexpected redirect url format");let o=new Headers({Location:r});return"request"===n.type&&j(o,n.mutableCookies),new Response(null,{status:t.isAction?v.SeeOther:function(e){if(!e7(e))throw Error("Not a redirect error");return Number(e.digest.split(";").at(-2))}(e),headers:o})}if("object"==typeof e&&null!==e&&"digest"in e&&"NEXT_NOT_FOUND"===e.digest)return new Response(null,{status:404});throw e}if(!(g 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.`);a.renderOpts.fetchMetrics=r.fetchMetrics,a.renderOpts.pendingWaitUntil=Promise.all([null==(c=r.incrementalCache)?void 0:c.revalidateTag(r.revalidatedTags||[]),...Object.values(r.pendingRevalidates||{})]),x&&(a.renderOpts.collectedTags=null==(d=x.tags)?void 0:d.join(","),a.renderOpts.collectedRevalidate=x.revalidate,a.renderOpts.collectedExpire=x.expire,a.renderOpts.collectedStale=x.stale);let S=new Headers(g.headers);return"request"===n.type&&j(S,n.mutableCookies)?new Response(g.body,{status:g.status,statusText:g.statusText,headers:S}):g}async handle(e,t){var r;let n=this.resolve(e.method),o={fallbackRouteParams:null,page:this.definition.page,renderOpts:t.renderOpts};o.renderOpts.fetchCache=this.userland.fetchCache;let s={isAppRoute:!0,isAction:function(e){let t,r;e.headers instanceof Headers?(t=e.headers.get(C.toLowerCase())??null,r=e.headers.get("content-type")):(t=e.headers[C.toLowerCase()]??null,r=e.headers["content-type"]??null);let n=!!("POST"===e.method&&"application/x-www-form-urlencoded"===r),o=!!("POST"===e.method&&(null==r?void 0:r.startsWith("multipart/form-data"))),s=!!(void 0!==t&&"string"==typeof t&&"POST"===e.method);return{actionId:t,isURLEncodedAction:n,isMultipartAction:o,isFetchAction:s,isServerAction:!!(s||n||o)}}(e).isServerAction},i=function(e,t,r){let n=[];for(let t of er(e))t=`${D}${t}`,n.push(t);if(t.pathname){let e=`${D}${t.pathname}`;n.push(e)}return n}(this.definition.page,e.nextUrl,0),a=(r=e.nextUrl,function(e,t,r,n,o,s,i,a,l,u){function c(e){r&&r.setHeader("Set-Cookie",e)}let d={};return{type:"request",phase:e,implicitTags:o??[],url:{pathname:n.pathname,search:n.search??""},get headers(){return d.headers||(d.headers=function(e){let t=T.from(e);for(let e of R)t.delete(e.toLowerCase());return T.seal(t)}(t.headers)),d.headers},get cookies(){if(!d.cookies){let e=new k.RequestCookies(T.from(t.headers));B(t,e),d.cookies=I.seal(e)}return d.cookies},set cookies(value){d.cookies=value},get mutableCookies(){if(!d.mutableCookies){let e=function(e,t){let r=new k.RequestCookies(T.from(e));return L.wrap(r,t)}(t.headers,s||(r?c:void 0));B(t,e),d.mutableCookies=e}return d.mutableCookies},get userspaceMutableCookies(){if(!d.userspaceMutableCookies){let e=function(e){let t=new Proxy(e,{get(e,r,n){switch(r){case"delete":return function(...r){return M("cookies().delete"),e.delete(...r),t};case"set":return function(...r){return M("cookies().set"),e.set(...r),t};default:return E.get(e,r,n)}}});return t}(this.mutableCookies);d.userspaceMutableCookies=e}return d.userspaceMutableCookies},get draftMode(){return d.draftMode||(d.draftMode=new G(a,t,this.cookies,this.mutableCookies)),d.draftMode},renderResumeDataCache:i??null,devWarmupPrerenderResumeDataCache:null,isHmrRefresh:l,serverComponentsHmrCache:u||globalThis.__serverComponentsHmrCache}}("action",e,void 0,r,i,void 0,void 0,t.prerenderManifest.preview,!1,void 0)),l=function({page:e,fallbackRouteParams:t,renderOpts:r,requestEndedState:n,isPrefetchRequest:o}){var s;let i={isStaticGeneration:!r.supportsDynamicResponse&&!r.isDraftMode&&!r.isServerAction,page:e,fallbackRouteParams:t,route:(s=e.split("/").reduce((e,t,r,n)=>t?"("===t[0]&&t.endsWith(")")||"@"===t[0]||("page"===t||"route"===t)&&r===n.length-1?e:e+"/"+t:e,"")).startsWith("/")?s:"/"+s,incrementalCache:r.incrementalCache||globalThis.__incrementalCache,cacheLifeProfiles:r.cacheLifeProfiles,isRevalidate:r.isRevalidate,isPrerendering:r.nextExport,fetchCache:r.fetchCache,isOnDemandRevalidate:r.isOnDemandRevalidate,isDraftMode:r.isDraftMode,requestEndedState:n,isPrefetchRequest:o,buildId:r.buildId,reactLoadableManifest:(null==r?void 0:r.reactLoadableManifest)||{},assetPrefix:(null==r?void 0:r.assetPrefix)||"",afterContext:function(e){var t;if(!(null==e?void 0:null==(t=e.experimental)?void 0:t.after))return;let{waitUntil:r,onClose:n,onAfterTaskError:o}=e;return new K({waitUntil:r,onClose:n,onTaskError:o})}(r)};return r.store=i,i}(o),u=await this.actionAsyncStorage.run(s,()=>this.workUnitAsyncStorage.run(a,()=>this.workAsyncStorage.run(l,async()=>{if(this.hasNonStaticMethods&&l.isStaticGeneration){let e=new es("Route is configured with methods that cannot be statically generated.");throw l.dynamicUsageDescription=e.message,l.dynamicUsageStack=e.stack,e}let r=e;switch(this.dynamic){case"force-dynamic":l.forceDynamic=!0;break;case"force-static":l.forceStatic=!0,r=new Proxy(e,td);break;case"error":l.dynamicShouldError=!0,l.isStaticGeneration&&(r=new Proxy(e,tp));break;default:r=function(e,t){let r={get(e,n,o){switch(n){case"search":case"searchParams":case"url":case"href":case"toJSON":case"toString":case"origin":return tg(t,O.workUnitAsyncStorage.getStore(),`nextUrl.${n}`),E.get(e,n,o);case"clone":return e[ts]||(e[ts]=()=>new Proxy(e.clone(),r));default:return E.get(e,n,o)}}},n={get(e,o){switch(o){case"nextUrl":return e[tn]||(e[tn]=new Proxy(e.nextUrl,r));case"headers":case"cookies":case"url":case"body":case"blob":case"json":case"text":case"arrayBuffer":case"formData":return tg(t,O.workUnitAsyncStorage.getStore(),`request.${o}`),E.get(e,o,e);case"clone":return e[to]||(e[to]=()=>new Proxy(e.clone(),n));default:return E.get(e,o,e)}}};return new Proxy(e,n)}(e,l)}let o=function(e){let t="/app/";e.includes(t)||(t="\\app\\");let[,...r]=e.split(t);return(t[0]+r.join(t)).split(".").slice(0,-1).join(".")}(this.resolvedPagePath),u=(0,H.getTracer)();return u.setRootSpanAttribute("next.route",o),u.trace(d.runHandler,{spanName:`executing api route (app) ${o}`,attributes:{"next.route":o}},async()=>this.do(n,s,l,a,i,r,t))})));if(!(u instanceof Response))return new Response(null,{status:500});if(u.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"===u.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 u}}let tt=te;function tr(e){return!!e.POST||!!e.PUT||!!e.DELETE||!!e.PATCH||!!e.OPTIONS}let tn=Symbol("nextUrl"),to=Symbol("clone"),ts=Symbol("clone"),ti=Symbol("searchParams"),ta=Symbol("href"),tl=Symbol("toString"),tu=Symbol("headers"),tc=Symbol("cookies"),td={get(e,t,r){switch(t){case"headers":return e[tu]||(e[tu]=T.seal(new Headers({})));case"cookies":return e[tc]||(e[tc]=I.seal(new k.RequestCookies(new Headers({}))));case"nextUrl":return e[tn]||(e[tn]=new Proxy(e.nextUrl,th));case"url":return r.nextUrl.href;case"geo":case"ip":return;case"clone":return e[to]||(e[to]=()=>new Proxy(e.clone(),td));default:return E.get(e,t,r)}}},th={get(e,t,r){switch(t){case"search":return"";case"searchParams":return e[ti]||(e[ti]=new URLSearchParams);case"href":return e[ta]||(e[ta]=function(e){let t=new URL(e);return t.host="localhost:3000",t.search="",t.protocol="http",t}(e.href).href);case"toJSON":case"toString":return e[tl]||(e[tl]=()=>r.href);case"url":return;case"clone":return e[ts]||(e[ts]=()=>new Proxy(e.clone(),th));default:return E.get(e,t,r)}}},tp={get(e,t,r){switch(t){case"nextUrl":return e[tn]||(e[tn]=new Proxy(e.nextUrl,tf));case"headers":case"cookies":case"url":case"body":case"blob":case"json":case"text":case"arrayBuffer":case"formData":throw new ea(`Route ${e.nextUrl.pathname} with \`dynamic = "error"\` couldn't be rendered statically because it used \`request.${t}\`.`);case"clone":return e[to]||(e[to]=()=>new Proxy(e.clone(),tp));default:return E.get(e,t,r)}}},tf={get(e,t,r){switch(t){case"search":case"searchParams":case"url":case"href":case"toJSON":case"toString":case"origin":throw new ea(`Route ${e.pathname} with \`dynamic = "error"\` couldn't be rendered statically because it used \`nextUrl.${t}\`.`);case"clone":return e[ts]||(e[ts]=()=>new Proxy(e.clone(),tf));default:return E.get(e,t,r)}}};function tm(e){return new es(`Route ${e} couldn't be rendered statically because it used IO that was not cached. See more info here: https://nextjs.org/docs/messages/dynamic-io`)}function tg(e,t,r){if(t){if("cache"===t.type)throw Error(`Route ${e.route} used "${r}" inside "use cache". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "${r}" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`);if("unstable-cache"===t.type)throw Error(`Route ${e.route} used "${r}" inside a function cached with "unstable_cache(...)". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "${r}" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`)}if(e.dynamicShouldError)throw new ea(`Route ${e.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${r}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`);if(t){if("prerender"===t.type){let n=Error(`Route ${e.route} used ${r} without first calling \`await connection()\`. See more info here: https://nextjs.org/docs/messages/next-prerender-sync-request`);eh(e.route,r,n,t)}else if("prerender-ppr"===t.type)ep(e.route,r,t.dynamicTracking);else if("prerender-legacy"===t.type){t.revalidate=0;let n=new es(`Route ${e.route} couldn't be rendered statically because it used \`${r}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`);throw e.dynamicUsageDescription=r,e.dynamicUsageStack=n.stack,n}}}})(),module.exports=n})();
//# sourceMappingURL=app-route.runtime.prod.js.map