rsnext/packages/next/compiled/send/index.js

80 lines
65 KiB
JavaScript
Raw Normal View History

(()=>{var __webpack_modules__={363:(module,__unused_webpack_exports,__nccwpck_require__)=>{
/*!
* depd
* Copyright(c) 2014-2017 Douglas Christopher Wilson
* MIT Licensed
*/
var callSiteToString=__nccwpck_require__(651).callSiteToString;var eventListenerCount=__nccwpck_require__(651).eventListenerCount;var relative=__nccwpck_require__(17).relative;module.exports=depd;var basePath=process.cwd();function containsNamespace(e,a){var t=e.split(/[ ,]+/);var i=String(a).toLowerCase();for(var n=0;n<t.length;n++){var r=t[n];if(r&&(r==="*"||r.toLowerCase()===i)){return true}}return false}function convertDataDescriptorToAccessor(e,a,t){var i=Object.getOwnPropertyDescriptor(e,a);var n=i.value;i.get=function getter(){return n};if(i.writable){i.set=function setter(e){return n=e}}delete i.value;delete i.writable;Object.defineProperty(e,a,i);return i}function createArgumentsString(e){var a="";for(var t=0;t<e;t++){a+=", arg"+t}return a.substr(2)}function createStackString(e){var a=this.name+": "+this.namespace;if(this.message){a+=" deprecated "+this.message}for(var t=0;t<e.length;t++){a+="\n at "+callSiteToString(e[t])}return a}function depd(e){if(!e){throw new TypeError("argument namespace is required")}var a=getStack();var t=callSiteLocation(a[1]);var i=t[0];function deprecate(e){log.call(deprecate,e)}deprecate._file=i;deprecate._ignored=isignored(e);deprecate._namespace=e;deprecate._traced=istraced(e);deprecate._warned=Object.create(null);deprecate.function=wrapfunction;deprecate.property=wrapproperty;return deprecate}function isignored(e){if(process.noDeprecation){return true}var a=process.env.NO_DEPRECATION||"";return containsNamespace(a,e)}function istraced(e){if(process.traceDeprecation){return true}var a=process.env.TRACE_DEPRECATION||"";return containsNamespace(a,e)}function log(e,a){var t=eventListenerCount(process,"deprecation")!==0;if(!t&&this._ignored){return}var i;var n;var r;var o;var p=0;var s=false;var c=getStack();var l=this._file;if(a){o=a;r=callSiteLocation(c[1]);r.name=o.name;l=r[0]}else{p=2;o=callSiteLocation(c[p]);r=o}for(;p<c.length;p++){i=callSiteLocation(c[p]);n=i[0];if(n===l){s=true}else if(n===this._file){l=this._file}else if(s){break}}var d=i?o.join(":")+"__"+i.join(":"):undefined;if(d!==undefined&&d in this._warned){return}this._warned[d]=true;var m=e;if(!m){m=r===o||!r.name?defaultMessage(o):defaultMessage(r)}if(t){var u=DeprecationError(this._namespace,m,c.slice(p));process.emit("deprecation",u);return}var v=process.stderr.isTTY?formatColor:formatPlain;var f=v.call(this,m,i,c.slice(p));process.stderr.write(f+"\n","utf8")}function callSiteLocation(e){var a=e.getFileName()||"<anonymous>";var t=e.getLineNumber();var i=e.getColumnNumber();if(e.isEval()){a=e.getEvalOrigin()+", "+a}var n=[a,t,i];n.callSite=e;n.name=e.getFunctionName();return n}function defaultMessage(e){var a=e.callSite;var t=e.name;if(!t){t="<anonymous@"+formatLocation(e)+">"}var i=a.getThis();var n=i&&a.getTypeName();if(n==="Object"){n=undefined}if(n==="Function"){n=i.name||n}return n&&a.getMethodName()?n+"."+t:t}function formatPlain(e,a,t){var i=(new Date).toUTCString();var n=i+" "+this._namespace+" deprecated "+e;if(this._traced){for(var r=0;r<t.length;r++){n+="\n at "+callSiteToString(t[r])}return n}if(a){n+=" at "+formatLocation(a)}return n}function formatColor(e,a,t){var i=""+this._namespace+""+" deprecated"+" "+e+"";if(this._traced){for(var n=0;n<t.length;n++){i+="\n at "+callSiteToString(t[n])+""}return i}if(a){i+=" "+formatLocation(a)+""}return i}function formatLocation(e){return relative(basePath,e[0])+":"+e[1]+":"+e[2]}function getStack(){var e=Error.stackTraceLimit;var a={};var t=Error.prepareStackTrace;Error.prepareStackTrace=prepareObjectStackTrace;Error.stackTraceLimit=Math.max(10,e);Error.captureStackTrace(a);var i=a.stack.slice(1);Error.prepareStackTrace=t;Error.stackTraceLimit=e;return i}function prepareObjectStackTrace(e,a){return a}function wrapfunction(fn,message){if(typeof fn!=="function"){throw new TypeError("argument fn must be a function")}var args=createArgumentsString(fn.length);var deprecate=this;var stack=getStack();var site=callSiteLocation(stack[1]);site.name=fn.name;var deprecatedfn=eval("(function ("+args+") {\n"+'
/*!
* depd
* Copyright(c) 2014 Douglas Christopher Wilson
* MIT Licensed
*/e.exports=callSiteToString;function callSiteFileLocation(e){var a;var t="";if(e.isNative()){t="native"}else if(e.isEval()){a=e.getScriptNameOrSourceURL();if(!a){t=e.getEvalOrigin()}}else{a=e.getFileName()}if(a){t+=a;var i=e.getLineNumber();if(i!=null){t+=":"+i;var n=e.getColumnNumber();if(n){t+=":"+n}}}return t||"unknown source"}function callSiteToString(e){var a=true;var t=callSiteFileLocation(e);var i=e.getFunctionName();var n=e.isConstructor();var r=!(e.isToplevel()||n);var o="";if(r){var p=e.getMethodName();var s=getConstructorName(e);if(i){if(s&&i.indexOf(s)!==0){o+=s+"."}o+=i;if(p&&i.lastIndexOf("."+p)!==i.length-p.length-1){o+=" [as "+p+"]"}}else{o+=s+"."+(p||"<anonymous>")}}else if(n){o+="new "+(i||"<anonymous>")}else if(i){o+=i}else{a=false;o+=t}if(a){o+=" ("+t+")"}return o}function getConstructorName(e){var a=e.receiver;return a.constructor&&a.constructor.name||null}},606:e=>{"use strict";
/*!
* depd
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/e.exports=eventListenerCount;function eventListenerCount(e,a){return e.listeners(a).length}},651:(e,a,t)=>{"use strict";
/*!
* depd
* Copyright(c) 2014-2015 Douglas Christopher Wilson
* MIT Licensed
*/var i=t(361).EventEmitter;lazyProperty(e.exports,"callSiteToString",(function callSiteToString(){var e=Error.stackTraceLimit;var a={};var i=Error.prepareStackTrace;function prepareObjectStackTrace(e,a){return a}Error.prepareStackTrace=prepareObjectStackTrace;Error.stackTraceLimit=2;Error.captureStackTrace(a);var n=a.stack.slice();Error.prepareStackTrace=i;Error.stackTraceLimit=e;return n[0].toString?toString:t(273)}));lazyProperty(e.exports,"eventListenerCount",(function eventListenerCount(){return i.listenerCount||t(606)}));function lazyProperty(e,a,t){function get(){var i=t();Object.defineProperty(e,a,{configurable:true,enumerable:true,value:i});return i}Object.defineProperty(e,a,{configurable:true,enumerable:true,get:get})}function toString(e){return e.toString()}},733:(e,a,t)=>{"use strict";
/*!
* destroy
* Copyright(c) 2014 Jonathan Ong
* MIT Licensed
*/var i=t(147).ReadStream;var n=t(781);e.exports=destroy;function destroy(e){if(e instanceof i){return destroyReadStream(e)}if(!(e instanceof n)){return e}if(typeof e.destroy==="function"){e.destroy()}return e}function destroyReadStream(e){e.destroy();if(typeof e.close==="function"){e.on("open",onOpenClose)}return e}function onOpenClose(){if(typeof this.fd==="number"){this.close()}}},719:e=>{"use strict";
/*!
* ee-first
* Copyright(c) 2014 Jonathan Ong
* MIT Licensed
*/e.exports=first;function first(e,a){if(!Array.isArray(e))throw new TypeError("arg must be an array of [ee, events...] arrays");var t=[];for(var i=0;i<e.length;i++){var n=e[i];if(!Array.isArray(n)||n.length<2)throw new TypeError("each array member must be [ee, events...]");var r=n[0];for(var o=1;o<n.length;o++){var p=n[o];var s=listener(p,callback);r.on(p,s);t.push({ee:r,event:p,fn:s})}}function callback(){cleanup();a.apply(null,arguments)}function cleanup(){var e;for(var a=0;a<t.length;a++){e=t[a];e.ee.removeListener(e.event,e.fn)}}function thunk(e){a=e}thunk.cancel=cleanup;return thunk}function listener(e,a){return function onevent(t){var i=new Array(arguments.length);var n=this;var r=e==="error"?t:null;for(var o=0;o<i.length;o++){i[o]=arguments[o]}a(r,n,e,i)}}},474:e=>{"use strict";
/*!
* encodeurl
* Copyright(c) 2016 Douglas Christopher Wilson
* MIT Licensed
*/e.exports=encodeUrl;var a=/(?:[^\x21\x25\x26-\x3B\x3D\x3F-\x5B\x5D\x5F\x61-\x7A\x7E]|%(?:[^0-9A-Fa-f]|[0-9A-Fa-f][^0-9A-Fa-f]|$))+/g;var t=/(^|[^\uD800-\uDBFF])[\uDC00-\uDFFF]|[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/g;var i="$1<>$2";function encodeUrl(e){return String(e).replace(t,i).replace(a,encodeURI)}},647:e=>{"use strict";
/*!
* escape-html
* Copyright(c) 2012-2013 TJ Holowaychuk
* Copyright(c) 2015 Andreas Lubbe
* Copyright(c) 2015 Tiancheng "Timothy" Gu
* MIT Licensed
*/var a=/["'&<>]/;e.exports=escapeHtml;function escapeHtml(e){var t=""+e;var i=a.exec(t);if(!i){return t}var n;var r="";var o=0;var p=0;for(o=i.index;o<t.length;o++){switch(t.charCodeAt(o)){case 34:n="&quot;";break;case 38:n="&amp;";break;case 39:n="&#39;";break;case 60:n="&lt;";break;case 62:n="&gt;";break;default:continue}if(p!==o){r+=t.substring(p,o)}p=o+1;r+=n}return p!==o?r+t.substring(p,o):r}},919:(e,a,t)=>{try{var i=t(837);if(typeof i.inherits!=="function")throw"";e.exports=i.inherits}catch(a){e.exports=t(526)}},526:e=>{if(typeof Object.create==="function"){e.exports=function inherits(e,a){if(a){e.super_=a;e.prototype=Object.create(a.prototype,{constructor:{value:e,enumerable:false,writable:true,configurable:true}})}}}else{e.exports=function inherits(e,a){if(a){e.super_=a;var TempCtor=function(){};TempCtor.prototype=a.prototype;e.prototype=new TempCtor;e.prototype.constructor=e}}}},983:(e,a,t)=>{var i=t(17);var n=t(147);function Mime(){this.types=Object.create(null);this.extensions=Object.create(null)}Mime.prototype.define=function(e){for(var a in e){var t=e[a];for(var i=0;i<t.length;i++){if(process.env.DEBUG_MIME&&this.types[t[i]]){console.warn((this._loading||"define()").replace(/.*\//,""),'changes "'+t[i]+'" extension type from '+this.types[t[i]]+" to "+a)}this.types[t[i]]=a}if(!this.extensions[a]){this.extensions[a]=t[0]}}};Mime.prototype.load=function(e){this._loading=e;var a={},t=n.readFileSync(e,"ascii"),i=t.split(/[\r\n]+/);i.forEach((function(e){var t=e.replace(/\s*#.*|^\s*|\s*$/g,"").split(/\s+/);a[t.shift()]=t}));this.define(a);this._loading=null};Mime.prototype.lookup=function(e,a){var t=e.replace(/^.*[\.\/\\]/,"").toLowerCase();return this.types[t]||a||this.default_type};Mime.prototype.extension=function(e){var a=e.match(/^\s*([^;\s]*)(?:;|\s|$)/)[1].toLowerCase();return this.extensions[a]};var r=new Mime;r.define(t(797));r.default_type=r.lookup("bin");r.Mime=Mime;r.charsets={lookup:function(e,a){return/^text\/|^application\/(javascript|json)/.test(e)?"UTF-8":a}};e.exports=r},844:(e,a,t)=>{"use strict";
/*!
* on-finished
* Copyright(c) 2013 Jonathan Ong
* Copyright(c) 2014 Douglas Christopher Wilson
* MIT Licensed
*/e.exports=onFinished;e.exports.isFinished=isFinished;var i=t(719);var n=typeof setImmediate==="function"?setImmediate:function(e){process.nextTick(e.bind.apply(e,arguments))};function onFinished(e,a){if(isFinished(e)!==false){n(a,null,e);return e}attachListener(e,a);return e}function isFinished(e){var a=e.socket;if(typeof e.finished==="boolean"){return Boolean(e.finished||a&&!a.writable)}if(typeof e.complete==="boolean"){return Boolean(e.upgrade||!a||!a.readable||e.complete&&!e.readable)}return undefined}function attachFinishedListener(e,a){var t;var n;var r=false;function onFinish(e){t.cancel();n.cancel();r=true;a(e)}t=n=i([[e,"end","finish"]],onFinish);function onSocket(a){e.removeListener("socket",onSocket);if(r)return;if(t!==n)return;n=i([[a,"error","close"]],onFinish)}if(e.socket){onSocket(e.socket);return}e.on("socket",onSocket);if(e.socket===undefined){patchAssignSocket(e,onSocket)}}function attachListener(e,a){var t=e.__onFinished;if(!t||!t.queue){t=e.__onFinished=createListener(e);attachFinishedListener(e,t)}t.queue.push(a)}function createListener(e){function listener(a){if(e.__onFinished===listener)e.__onFinished=null;if(!listener.queue)return;var t=listener.queue;listener.queue=null;for(var i=0;i<t.length;i++){t[i](a,e)}}listener.queue=[];return listener}function patchAssignSocket(e,a){var t=e.assignSocket;if(typeof t!=="function")return;e.assignSocket=function _assignSocket(e){t.call(this,e);a(e)}}},635:e=>{"use strict";
/*!
* range-parser
* Copyright(c) 2012-2014 TJ Holowaychuk
* Copyright(c) 2015-2016 Douglas Christopher Wilson
* MIT Licensed
*/e.exports=rangeParser;function rangeParser(e,a,t){if(typeof a!=="string"){throw new TypeError("argument str must be a string")}var i=a.indexOf("=");if(i===-1){return-2}var n=a.slice(i+1).split(",");var r=[];r.type=a.slice(0,i);for(var o=0;o<n.length;o++){var p=n[o].split("-");var s=parseInt(p[0],10);var c=parseInt(p[1],10);if(isNaN(s)){s=e-c;c=e-1}else if(isNaN(c)){c=e-1}if(c>e-1){c=e-1}if(isNaN(s)||isNaN(c)||s>c||s<0){continue}r.push({start:s,end:c})}if(r.length<1){return-1}return t&&t.combine?combineRanges(r):r}function combineRanges(e){var a=e.map(mapWithIndex).sort(sortByRangeStart);for(var t=0,i=1;i<a.length;i++){var n=a[i];var r=a[t];if(n.start>r.end+1){a[++t]=n}else if(n.end>r.end){r.end=n.end;r.index=Math.min(r.index,n.index)}}a.length=t+1;var o=a.sort(sortByRangeIndex).map(mapWithoutIndex);o.type=e.type;return o}function mapWithIndex(e,a){return{start:e.start,end:e.end,index:a}}function mapWithoutIndex(e){return{start:e.start,end:e.end}}function sortByRangeIndex(e,a){return e.index-a.index}function sortByRangeStart(e,a){return e.start-a.start}},134:(e,a,t)=>{"use strict";
/*!
* send
* Copyright(c) 2012 TJ Holowaychuk
* Copyright(c) 2014-2016 Douglas Christopher Wilson
* MIT Licensed
*/var i=t(993);var n=t(937)("send");var r=t(363)("send");var o=t(733);var p=t(474);var s=t(647);var c=t(865);var l=t(890);var d=t(147);var m=t(983);var u=t(442);var v=t(844);var f=t(635);var x=t(17);var g=t(342);var h=t(781);var b=t(837);var y=x.extname;var w=x.join;var k=x.normalize;var S=x.resolve;var _=x.sep;var j=/^ *bytes=/;var E=60*60*24*365*1e3;var C=/(?:^|[\\/])\.\.(?:[\\/]|$)/;e.exports=send;e.exports.mime=m;function send(e,a,t){return new SendStream(e,a,t)}function SendStream(e,a,t){h.call(this);var i=t||{};this.options=i;this.path=a;this.req=e;this._acceptRanges=i.acceptRanges!==undefined?Boolean(i.acceptRanges):true;this._cacheControl=i.cacheControl!==undefined?Boolean(i.cacheControl):true;this._etag=i.etag!==undefined?Boolean(i.etag):true;this._dotfiles=i.dotfiles!==undefined?i.dotfiles:"ignore";if(this._dotfiles!=="ignore"&&this._dotfiles!=="allow"&&this._dotfiles!=="deny"){throw new TypeError('dotfiles option must be "allow", "deny", or "ignore"')}this._hidden=Boolean(i.hidden);if(i.hidden!==undefined){r("hidden: use dotfiles: '"+(this._hidden?"allow":"ignore")+"' instead")}if(i.dotfiles===undefined){this._dotfiles=undefined}this._extensions=i.extensions!==undefined?normalizeList(i.extensions,"extensions option"):[];this._immutable=i.immutable!==undefined?Boolean(i.immutable):false;this._index=i.index!==undefined?normalizeList(i.index,"index option"):["index.html"];this._lastModified=i.lastModified!==undefined?Boolean(i.lastModified):true;this._maxage=i.maxAge||i.maxage;this._maxage=typeof this._maxage==="string"?u(this._maxage):Number(this._maxage);this._maxage=!isNaN(this._maxage)?Math.min(Math.max(0,this._maxage),E):0;this._root=i.root?S(i.root):null;if(!this._root&&i.from){this.from(i.from)}}b.inherits(SendStream,h);SendStream.prototype.etag=r.function((function etag(e){this._etag=Boolean(e);n("etag %s",this._etag);return this}),"send.etag: pass etag as option");SendStream.prototype.hidden=r.function((function hidden(e){this._hidden=Boolean(e);this._dotfiles=undefined;n("hidden %s",this._hidden);return this}),"send.hidden: use dotfiles option");SendStream.prototype.index=r.function((function index(e){var index=!e?[]:normalizeList(e,"paths argument");n("index %o",e);this._index=index;return this}),"send.index: pass index as option");SendStream.prototype.root=function root(e){this._root=S(String(e));n("root %s",this._root);return this};SendStream.prototype.from=r.function(SendStream.prototype.root,"send.from: pass root as option");SendStream.prototype.root=r.function(SendStream.prototype.root,"send.root: pass root as option");SendStream.prototype.maxage=r.function((function maxage(e){this._maxage=typeof e==="string"?u(e):Number(e);this._maxage=!isNaN(this._maxage)?Math.min(Math.max(0,this._maxage),E):0;n("max-age %d",this._maxage);return this}),"send.maxage: pass maxAge as option");SendStream.prototype.error=function error(e,a){if(hasListeners(this,"error")){return this.emit("error",i(e,a,{expose:false}))}var t=this.res;var n=g[e]||String(e);var r=createHtmlDocument("Error",s(n));clearHeaders(t);if(a&&a.headers){setHeaders(t,a.headers)}t.statusCode=e;t.setHeader("Content-Type","text/html; charset=UTF-8");t.setHeader("Content-Length",Buffer.byteLength(r));t.setHeader("Content-Security-Policy","default-src 'none'");t.setHeader("X-Content-Type-Options","nosniff");t.end(r)};SendStream.prototype.hasTrailingSlash=function hasTrailingSlash(){return this.path[this.path.length-1]==="/"};SendStream.prototype.isConditionalGET=function isConditionalGET(){return this.req.headers["if-match"]||this.req.headers["if-unmodified-since"]||this.req.headers["if-none-match"]||this.req.headers["if-modified-since"]};SendStream.prototype.isPreconditionFailure=function isPreconditionFailure(){var e=this.req;var a=this.res;var t=e.headers["if-match"];if(t){var i=a.getHeader("ETag");return!i||t!=="*"&&parseTokenList(t).every((function(e){return e!==i&&e!=="W/"+i&&"W/"+e!==i}))}var n=parseHttpDate(e.headers["if-unmodified-since"]);if(!isNaN(n)){var r=parseHttpDate(a.getHeader("Last-Modified"));return isNaN(r)||r>n}return false};Sen
/*!
* http-errors
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2016 Douglas Christopher Wilson
* MIT Licensed
*/var i=t(363)("http-errors");var n=t(728);var r=t(342);var o=t(919);var p=t(473);e.exports=createError;e.exports.HttpError=createHttpErrorConstructor();populateConstructorExports(e.exports,r.codes,e.exports.HttpError);function codeClass(e){return Number(String(e).charAt(0)+"00")}function createError(){var e;var a;var t=500;var n={};for(var o=0;o<arguments.length;o++){var p=arguments[o];if(p instanceof Error){e=p;t=e.status||e.statusCode||t;continue}switch(typeof p){case"string":a=p;break;case"number":t=p;if(o!==0){i("non-first-argument status code; replace with createError("+p+", ...)")}break;case"object":n=p;break}}if(typeof t==="number"&&(t<400||t>=600)){i("non-error status code; use only 4xx or 5xx status codes")}if(typeof t!=="number"||!r[t]&&(t<400||t>=600)){t=500}var s=createError[t]||createError[codeClass(t)];if(!e){e=s?new s(a):new Error(a||r[t]);Error.captureStackTrace(e,createError)}if(!s||!(e instanceof s)||e.status!==t){e.expose=t<500;e.status=e.statusCode=t}for(var c in n){if(c!=="status"&&c!=="statusCode"){e[c]=n[c]}}return e}function createHttpErrorConstructor(){function HttpError(){throw new TypeError("cannot construct abstract class")}o(HttpError,Error);return HttpError}function createClientErrorConstructor(e,a,t){var i=a.match(/Error$/)?a:a+"Error";function ClientError(e){var a=e!=null?e:r[t];var o=new Error(a);Error.captureStackTrace(o,ClientError);n(o,ClientError.prototype);Object.defineProperty(o,"message",{enumerable:true,configurable:true,value:a,writable:true});Object.defineProperty(o,"name",{enumerable:false,configurable:true,value:i,writable:true});return o}o(ClientError,e);nameFunc(ClientError,i);ClientError.prototype.status=t;ClientError.prototype.statusCode=t;ClientError.prototype.expose=true;return ClientError}function createServerErrorConstructor(e,a,t){var i=a.match(/Error$/)?a:a+"Error";function ServerError(e){var a=e!=null?e:r[t];var o=new Error(a);Error.captureStackTrace(o,ServerError);n(o,ServerError.prototype);Object.defineProperty(o,"message",{enumerable:true,configurable:true,value:a,writable:true});Object.defineProperty(o,"name",{enumerable:false,configurable:true,value:i,writable:true});return o}o(ServerError,e);nameFunc(ServerError,i);ServerError.prototype.status=t;ServerError.prototype.statusCode=t;ServerError.prototype.expose=false;return ServerError}function nameFunc(e,a){var t=Object.getOwnPropertyDescriptor(e,"name");if(t&&t.configurable){t.value=a;Object.defineProperty(e,"name",t)}}function populateConstructorExports(e,a,t){a.forEach((function forEachCode(a){var i;var n=p(r[a]);switch(codeClass(a)){case 400:i=createClientErrorConstructor(t,n,a);break;case 500:i=createServerErrorConstructor(t,n,a);break}if(i){e[a]=i;e[n]=i}}));e["I'mateapot"]=i.function(e.ImATeapot,'"I\'mateapot"; use "ImATeapot" instead')}},442:e=>{var a=1e3;var t=a*60;var i=t*60;var n=i*24;var r=n*7;var o=n*365.25;e.exports=function(e,a){a=a||{};var t=typeof e;if(t==="string"&&e.length>0){return parse(e)}else if(t==="number"&&isNaN(e)===false){return a.long?fmtLong(e):fmtShort(e)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function parse(e){e=String(e);if(e.length>100){return}var p=/^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!p){return}var s=parseFloat(p[1]);var c=(p[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return s*o;case"weeks":case"week":case"w":return s*r;case"days":case"day":case"d":return s*n;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*t;case"seconds":case"second":case"secs":case"sec":case"s":return s*a;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return undefined}}function fmtShort(e){var r=Math.abs(e);if(r>=n){return Math.round(e/n)+"d"}if(r>=i){return Math.round(e/i)+"h"}if(r>=t){return Math.round(e/t)+"m"}if(r>=a){return Math.round(e/a)+"s"}return e+"ms"}function fmtLong(e){var r=Mat
/*!
* statuses
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2016 Douglas Christopher Wilson
* MIT Licensed
*/var i=t(710);e.exports=status;status.STATUS_CODES=i;status.codes=populateStatusesMap(status,i);status.redirect={300:true,301:true,302:true,303:true,305:true,307:true,308:true};status.empty={204:true,205:true,304:true};status.retry={502:true,503:true,504:true};function populateStatusesMap(e,a){var t=[];Object.keys(a).forEach((function forEachCode(i){var n=a[i];var r=Number(i);e[r]=n;e[n]=r;e[n.toLowerCase()]=r;t.push(r)}));return t}function status(e){if(typeof e==="number"){if(!status[e])throw new Error("invalid status code: "+e);return e}if(typeof e!=="string"){throw new TypeError("code must be a number or string")}var a=parseInt(e,10);if(!isNaN(a)){if(!status[a])throw new Error("invalid status code: "+a);return a}a=status[e.toLowerCase()];if(!a)throw new Error('invalid status message: "'+e+'"');return a}},473:e=>{
/*!
* toidentifier
* Copyright(c) 2016 Douglas Christopher Wilson
* MIT Licensed
*/
e.exports=toIdentifier;function toIdentifier(e){return e.split(" ").map((function(e){return e.slice(0,1).toUpperCase()+e.slice(1)})).join("").replace(/[^ _0-9a-z]/gi,"")}},361:e=>{"use strict";e.exports=require("events")},147:e=>{"use strict";e.exports=require("fs")},937:e=>{"use strict";e.exports=require("next/dist/compiled/debug")},865:e=>{"use strict";e.exports=require("next/dist/compiled/etag")},890:e=>{"use strict";e.exports=require("next/dist/compiled/fresh")},17:e=>{"use strict";e.exports=require("path")},781:e=>{"use strict";e.exports=require("stream")},837:e=>{"use strict";e.exports=require("util")},797:e=>{"use strict";e.exports=JSON.parse('{"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomsvc+xml":["atomsvc"],"application/bdoc":["bdoc"],"application/ccxml+xml":["ccxml"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/font-tdpfr":["pfr"],"application/font-woff":[],"application/font-woff2":[],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/prs.cww":["cww"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"applica