4294967295||h<0)throw new Error("ipaddr: address outside defined range");return(function(){var _,y;for(y=[],f=_=0;_<=24;f=_+=8)y.push(h>>f&255);return y})().reverse()}else return null},e.IPv6=(function(){function u(l,d){var p,f,h,_,y,m;if(l.length===16)for(this.parts=[],p=f=0;f<=14;p=f+=2)this.parts.push(l[p]<<8|l[p+1]);else if(l.length===8)this.parts=l;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(m=this.parts,h=0,_=m.length;h<_;h++)if(y=m[h],!(0<=y&&y<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");d&&(this.zoneId=d)}return u.prototype.kind=function(){return"ipv6"},u.prototype.toString=function(){return this.toNormalizedString().replace(/((^|:)(0(:|$))+)/,"::")},u.prototype.toRFC5952String=function(){var l,d,p,f,h;for(f=/((^|:)(0(:|$)){2,})/g,h=this.toNormalizedString(),l=0,d=-1;p=f.exec(h);)p[0].length>d&&(l=p.index,d=p[0].length);return d<0?h:h.substring(0,l)+"::"+h.substring(l+d)},u.prototype.toByteArray=function(){var l,d,p,f,h;for(l=[],h=this.parts,d=0,p=h.length;d>8),l.push(f&255);return l},u.prototype.toNormalizedString=function(){var l,d,p;return l=(function(){var f,h,_,y;for(_=this.parts,y=[],f=0,h=_.length;f>8,l&255,d>>8,d&255])},u.prototype.prefixLengthFromSubnetMask=function(){var l,d,p,f,h,_,y;for(y={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},l=0,h=!1,d=p=7;p>=0;d=p+=-1)if(f=this.parts[d],f in y){if(_=y[f],h&&_!==0)return null;_!==16&&(h=!0),l+=_}else return null;return 128-l},u})(),i="(?:[0-9a-f]+::?)+",c="%[0-9a-z]{1,}",a={zoneIndex:new RegExp(c,"i"),native:new RegExp("^(::)?("+i+")?([0-9a-f]+)?(::)?("+c+")?$","i"),transitional:new RegExp("^((?:"+i+")|(?:::)(?:"+i+")?)"+(r+"\\."+r+"\\."+r+"\\."+r)+("("+c+")?$"),"i")},t=function(u,l){var d,p,f,h,_,y;if(u.indexOf("::")!==u.lastIndexOf("::"))return null;for(y=(u.match(a.zoneIndex)||[])[0],y&&(y=y.substring(1),u=u.replace(/%.+$/,"")),d=0,p=-1;(p=u.indexOf(":",p+1))>=0;)d++;if(u.substr(0,2)==="::"&&d--,u.substr(-2,2)==="::"&&d--,d>l)return null;for(_=l-d,h=":";_--;)h+="0:";return u=u.replace("::",h),u[0]===":"&&(u=u.slice(1)),u[u.length-1]===":"&&(u=u.slice(0,-1)),l=(function(){var m,v,g,b;for(g=u.split(":"),b=[],m=0,v=g.length;m=0&&l<=32))return p=[this.parse(d[1]),l],Object.defineProperty(p,"toString",{value:function(){return this.join("/")}}),p;throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},e.IPv4.subnetMaskFromPrefixLength=function(u){var l,d,p;if(u=parseInt(u),u<0||u>32)throw new Error("ipaddr: invalid IPv4 prefix length");for(p=[0,0,0,0],d=0,l=Math.floor(u/8);d=0&&l<=128))return p=[this.parse(d[1]),l],Object.defineProperty(p,"toString",{value:function(){return this.join("/")}}),p;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},e.isValid=function(u){return e.IPv6.isValid(u)||e.IPv4.isValid(u)},e.parse=function(u){if(e.IPv6.isValid(u))return e.IPv6.parse(u);if(e.IPv4.isValid(u))return e.IPv4.parse(u);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},e.parseCIDR=function(u){var l;try{return e.IPv6.parseCIDR(u)}catch(d){l=d;try{return e.IPv4.parseCIDR(u)}catch(p){throw l=p,new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},e.fromByteArray=function(u){var l;if(l=u.length,l===4)return new e.IPv4(u);if(l===16)return new e.IPv6(u);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},e.process=function(u){var l;return l=this.parse(u),l.kind()==="ipv6"&&l.isIPv4MappedAddress()?l.toIPv4Address():l}}).call(kz)});var $w=j((_ke,rh)=>{"use strict";rh.exports=yee;rh.exports.all=Oz;rh.exports.compile=Rz;var pee=Ez(),Pz=Tz(),fee=/^[0-9]+$/,eh=Pz.isValid,th=Pz.parse,Iz={linklocal:["169.254.0.0/16","fe80::/10"],loopback:["127.0.0.1/8","::1/128"],uniquelocal:["10.0.0.0/8","172.16.0.0/12","192.168.0.0/16","fc00::/7"]};function Oz(t,e){var r=pee(t);if(!e)return r;typeof e!="function"&&(e=Rz(e));for(var n=0;ni)throw new TypeError("invalid range on address: "+t);return[n,a]}function vee(t){var e=th(t),r=e.kind();return r==="ipv4"?e.prefixLengthFromSubnetMask():null}function yee(t,e){if(!t)throw new TypeError("req argument is required");if(!e)throw new TypeError("trust argument is required");var r=Oz(t,e),n=r[r.length-1];return n}function _ee(){return!1}function bee(t){return function(r){if(!eh(r))return!1;for(var n=th(r),i,a=n.kind(),o=0;o{"use strict";var Cz=Wm().Buffer,See=mw(),Nz=hl(),jz=ui()("express"),wee=Zl(),$ee=Qm().mime,Eee=hw(),kee=$w(),Tee=Um(),Iee=require("querystring");Cr.etag=Az({weak:!1});Cr.wetag=Az({weak:!0});Cr.isAbsolute=function(t){if(t[0]==="/"||t[1]===":"&&(t[2]==="\\"||t[2]==="/")||t.substring(0,2)==="\\\\")return!0};Cr.flatten=jz.function(wee,"utils.flatten: use array-flatten npm module instead");Cr.normalizeType=function(t){return~t.indexOf("/")?Pee(t):{value:$ee.lookup(t),params:{}}};Cr.normalizeTypes=function(t){for(var e=[],r=0;r{"use strict";var Cee=yM(),Nee=lw(),kw=Zm(),jee=HM(),Aee=dw(),nh=_n()("express:application"),Mee=JM(),zee=require("http"),Dee=ya().compileETag,Uee=ya().compileQueryParser,qee=ya().compileTrust,Lee=ui()("express"),Fee=Zl(),Ew=Hl(),Zee=require("path").resolve,Vs=gl(),Hee=Object.prototype.hasOwnProperty,Iw=Array.prototype.slice,er=Mz=zz.exports={},Tw="@@symbol:trust_proxy_default";er.init=function(){this.cache={},this.engines={},this.settings={},this.defaultConfiguration()};er.defaultConfiguration=function(){var e=process.env.NODE_ENV||"development";this.enable("x-powered-by"),this.set("etag","weak"),this.set("env",e),this.set("query parser","extended"),this.set("subdomain offset",2),this.set("trust proxy",!1),Object.defineProperty(this.settings,Tw,{configurable:!0,value:!0}),nh("booting in %s mode",e),this.on("mount",function(n){this.settings[Tw]===!0&&typeof n.settings["trust proxy fn"]=="function"&&(delete this.settings["trust proxy"],delete this.settings["trust proxy fn"]),Vs(this.request,n.request),Vs(this.response,n.response),Vs(this.engines,n.engines),Vs(this.settings,n.settings)}),this.locals=Object.create(null),this.mountpath="/",this.locals.settings=this.settings,this.set("view",Mee),this.set("views",Zee("views")),this.set("jsonp callback name","callback"),e==="production"&&this.enable("view cache"),Object.defineProperty(this,"router",{get:function(){throw new Error(`'app.router' is deprecated!
-Please see the 3.x to 4.x migration guide for details on how to update your app.`)}})};er.lazyrouter=function(){this._router||(this._router=new Nee({caseSensitive:this.enabled("case sensitive routing"),strict:this.enabled("strict routing")}),this._router.use(Aee(this.get("query parser fn"))),this._router.use(jee.init(this)))};er.handle=function(e,r,n){var i=this._router,a=n||Cee(e,r,{env:this.get("env"),onerror:Bee.bind(this)});if(!i){nh("no routes defined on app"),a();return}i.handle(e,r,a)};er.use=function(e){var r=0,n="/";if(typeof e!="function"){for(var i=e;Array.isArray(i)&&i.length!==0;)i=i[0];typeof i!="function"&&(r=1,n=e)}var a=Fee(Iw.call(arguments,r));if(a.length===0)throw new TypeError("app.use() requires a middleware function");this.lazyrouter();var o=this._router;return a.forEach(function(s){if(!s||!s.handle||!s.set)return o.use(n,s);nh(".use app under %s",n),s.mountpath=n,s.parent=this,o.use(n,function(u,l,d){var p=u.app;s.handle(u,l,function(f){Vs(u,p.request),Vs(l,p.response),d(f)})}),s.emit("mount",this)},this),this};er.route=function(e){return this.lazyrouter(),this._router.route(e)};er.engine=function(e,r){if(typeof r!="function")throw new Error("callback function required");var n=e[0]!=="."?"."+e:e;return this.engines[n]=r,this};er.param=function(e,r){if(this.lazyrouter(),Array.isArray(e)){for(var n=0;n1?'directories "'+u.root.slice(0,-1).join('", "')+'" or "'+u.root[u.root.length-1]+'"':'directory "'+u.root+'"',p=new Error('Failed to lookup view "'+e+'" in views '+d);return p.view=u,a(p)}c.cache&&(i[e]=u)}Vee(u,c,a)};er.listen=function(){var e=zee.createServer(this);return e.listen.apply(e,arguments)};function Bee(t){this.get("env")!=="test"&&console.error(t.stack||t.toString())}function Vee(t,e,r){try{t.render(e,r)}catch(n){r(n)}}});var Fz=j((xke,Pw)=>{"use strict";Pw.exports=Lz;Pw.exports.preferredCharsets=Lz;var Gee=/^\s*([^\s;]+)\s*(?:;(.*))?$/;function Wee(t){for(var e=t.split(","),r=0,n=0;r0}});var Gz=j((Ske,Ow)=>{"use strict";Ow.exports=Vz;Ow.exports.preferredEncodings=Vz;var Qee=/^\s*([^\s;]+)\s*(?:;(.*))?$/;function ete(t){for(var e=t.split(","),r=!1,n=1,i=0,a=0;i0}});var Yz=j((wke,Rw)=>{"use strict";Rw.exports=Xz;Rw.exports.preferredLanguages=Xz;var ite=/^\s*([^\s\-;]+)(?:-([^\s;]+))?\s*(?:;(.*))?$/;function ate(t){for(var e=t.split(","),r=0,n=0;r0}});var iD=j(($ke,Cw)=>{"use strict";Cw.exports=rD;Cw.exports.preferredMediaTypes=rD;var ute=/^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/;function lte(t){for(var e=hte(t),r=0,n=0;r0)if(a.every(function(o){return e.params[o]=="*"||(e.params[o]||"").toLowerCase()==(n.params[o]||"").toLowerCase()}))i|=1;else return null;return{i:r,o:e.i,q:e.q,s:i}}function rD(t,e){var r=lte(t===void 0?"*/*":t||"");if(!e)return r.filter(eD).sort(Qz).map(fte);var n=e.map(function(a,o){return dte(a,r,o)});return n.filter(eD).sort(Qz).map(function(a){return e[n.indexOf(a)]})}function Qz(t,e){return e.q-t.q||e.s-t.s||t.o-e.o||t.i-e.i||0}function fte(t){return t.type+"/"+t.subtype}function eD(t){return t.q>0}function nD(t){for(var e=0,r=0;(r=t.indexOf('"',r))!==-1;)e++,r++;return e}function mte(t){var e=t.indexOf("="),r,n;return e===-1?r=t:(r=t.substr(0,e),n=t.substr(e+1)),[r,n]}function hte(t){for(var e=t.split(","),r=1,n=0;r{"use strict";var vte=Fz(),yte=Gz(),_te=Yz(),bte=iD();Nw.exports=St;Nw.exports.Negotiator=St;function St(t){if(!(this instanceof St))return new St(t);this.request=t}St.prototype.charset=function(e){var r=this.charsets(e);return r&&r[0]};St.prototype.charsets=function(e){return vte(this.request.headers["accept-charset"],e)};St.prototype.encoding=function(e){var r=this.encodings(e);return r&&r[0]};St.prototype.encodings=function(e){return yte(this.request.headers["accept-encoding"],e)};St.prototype.language=function(e){var r=this.languages(e);return r&&r[0]};St.prototype.languages=function(e){return _te(this.request.headers["accept-language"],e)};St.prototype.mediaType=function(e){var r=this.mediaTypes(e);return r&&r[0]};St.prototype.mediaTypes=function(e){return bte(this.request.headers.accept,e)};St.prototype.preferredCharset=St.prototype.charset;St.prototype.preferredCharsets=St.prototype.charsets;St.prototype.preferredEncoding=St.prototype.encoding;St.prototype.preferredEncodings=St.prototype.encodings;St.prototype.preferredLanguage=St.prototype.language;St.prototype.preferredLanguages=St.prototype.languages;St.prototype.preferredMediaType=St.prototype.mediaType;St.prototype.preferredMediaTypes=St.prototype.mediaTypes});var sD=j((kke,oD)=>{"use strict";var xte=aD(),Ste=TS();oD.exports=on;function on(t){if(!(this instanceof on))return new on(t);this.headers=t.headers,this.negotiator=new xte(t)}on.prototype.type=on.prototype.types=function(t){var e=t;if(e&&!Array.isArray(e)){e=new Array(arguments.length);for(var r=0;r{"use strict";var ih=sD(),Wl=ui()("express"),Ete=require("net").isIP,kte=Rs(),Tte=require("http"),Ite=gw(),Pte=vw(),Ote=Ds(),cD=$w(),Tt=Object.create(Tte.IncomingMessage.prototype);uD.exports=Tt;Tt.get=Tt.header=function(e){if(!e)throw new TypeError("name argument is required to req.get");if(typeof e!="string")throw new TypeError("name must be a string to req.get");var r=e.toLowerCase();switch(r){case"referer":case"referrer":return this.headers.referrer||this.headers.referer;default:return this.headers[r]}};Tt.accepts=function(){var t=ih(this);return t.types.apply(t,arguments)};Tt.acceptsEncodings=function(){var t=ih(this);return t.encodings.apply(t,arguments)};Tt.acceptsEncoding=Wl.function(Tt.acceptsEncodings,"req.acceptsEncoding: Use acceptsEncodings instead");Tt.acceptsCharsets=function(){var t=ih(this);return t.charsets.apply(t,arguments)};Tt.acceptsCharset=Wl.function(Tt.acceptsCharsets,"req.acceptsCharset: Use acceptsCharsets instead");Tt.acceptsLanguages=function(){var t=ih(this);return t.languages.apply(t,arguments)};Tt.acceptsLanguage=Wl.function(Tt.acceptsLanguages,"req.acceptsLanguage: Use acceptsLanguages instead");Tt.range=function(e,r){var n=this.get("Range");if(n)return Pte(e,n,r)};Tt.param=function(e,r){var n=this.params||{},i=this.body||{},a=this.query||{},o=arguments.length===1?"name":"name, default";return Wl("req.param("+o+"): Use req.params, req.body, or req.query instead"),n[e]!=null&&n.hasOwnProperty(e)?n[e]:i[e]!=null?i[e]:a[e]!=null?a[e]:r};Tt.is=function(e){var r=e;if(!Array.isArray(e)){r=new Array(arguments.length);for(var n=0;n=200&&r<300||r===304?Ite(this.headers,{etag:e.get("ETag"),"last-modified":e.get("Last-Modified")}):!1});Bn(Tt,"stale",function(){return!this.fresh});Bn(Tt,"xhr",function(){var e=this.get("X-Requested-With")||"";return e.toLowerCase()==="xmlhttprequest"});function Bn(t,e,r){Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:r})}});var fD=j(ah=>{var pD=require("crypto");ah.sign=function(t,e){if(typeof t!="string")throw new TypeError("Cookie value must be provided as a string.");if(e==null)throw new TypeError("Secret key must be provided.");return t+"."+pD.createHmac("sha256",e).update(t).digest("base64").replace(/\=+$/,"")};ah.unsign=function(t,e){if(typeof t!="string")throw new TypeError("Signed cookie string must be provided.");if(e==null)throw new TypeError("Secret key must be provided.");var r=t.slice(0,t.lastIndexOf(".")),n=ah.sign(r,e);return dD(n)==dD(t)?r:!1};function dD(t){return pD.createHash("sha1").update(t).digest("hex")}});var gD=j(jw=>{"use strict";jw.parse=zte;jw.serialize=Dte;var Rte=Object.prototype.toString,Cte=Object.prototype.hasOwnProperty,Nte=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,jte=/^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/,Ate=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,Mte=/^[\u0020-\u003A\u003D-\u007E]*$/;function zte(t,e){if(typeof t!="string")throw new TypeError("argument str must be a string");var r={},n=t.length;if(n<2)return r;var i=e&&e.decode||Ute,a=0,o=0,s=0;do{if(o=t.indexOf("=",a),o===-1)break;if(s=t.indexOf(";",a),s===-1)s=n;else if(o>s){a=t.lastIndexOf(";",o-1)+1;continue}var c=mD(t,a,o),u=hD(t,o,c),l=t.slice(c,u);if(!Cte.call(r,l)){var d=mD(t,o+1,s),p=hD(t,s,d);t.charCodeAt(d)===34&&t.charCodeAt(p-1)===34&&(d++,p--);var f=t.slice(d,p);r[l]=Lte(f,i)}a=s+1}while(ar;){var n=t.charCodeAt(--e);if(n!==32&&n!==9)return e+1}return r}function Dte(t,e,r){var n=r&&r.encode||encodeURIComponent;if(typeof n!="function")throw new TypeError("option encode is invalid");if(!Nte.test(t))throw new TypeError("argument name is invalid");var i=n(e);if(!jte.test(i))throw new TypeError("argument val is invalid");var a=t+"="+i;if(!r)return a;if(r.maxAge!=null){var o=Math.floor(r.maxAge);if(!isFinite(o))throw new TypeError("option maxAge is invalid");a+="; Max-Age="+o}if(r.domain){if(!Ate.test(r.domain))throw new TypeError("option domain is invalid");a+="; Domain="+r.domain}if(r.path){if(!Mte.test(r.path))throw new TypeError("option path is invalid");a+="; Path="+r.path}if(r.expires){var s=r.expires;if(!qte(s)||isNaN(s.valueOf()))throw new TypeError("option expires is invalid");a+="; Expires="+s.toUTCString()}if(r.httpOnly&&(a+="; HttpOnly"),r.secure&&(a+="; Secure"),r.partitioned&&(a+="; Partitioned"),r.priority){var c=typeof r.priority=="string"?r.priority.toLowerCase():r.priority;switch(c){case"low":a+="; Priority=Low";break;case"medium":a+="; Priority=Medium";break;case"high":a+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(r.sameSite){var u=typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite;switch(u){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return a}function Ute(t){return t.indexOf("%")!==-1?decodeURIComponent(t):t}function qte(t){return Rte.call(t)==="[object Date]"}function Lte(t,e){try{return e(t)}catch{return t}}});var Mw=j((Oke,Aw)=>{"use strict";Aw.exports=Zte;Aw.exports.append=yD;var Fte=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function yD(t,e){if(typeof t!="string")throw new TypeError("header argument is required");if(!e)throw new TypeError("field argument is required");for(var r=Array.isArray(e)?e:vD(String(e)),n=0;n{"use strict";var Kl=Wm().Buffer,_D=mw(),Hte=eo(),Hr=ui()("express"),Bte=Ll(),Vte=Fl(),Gte=require("http"),Wte=ya().isAbsolute,Kte=kl(),bD=require("path"),oh=vl(),xD=Hl(),Jte=fD().sign,Xte=ya().normalizeType,Yte=ya().normalizeTypes,Qte=ya().setCharset,ere=gD(),zw=Qm(),tre=bD.extname,SD=zw.mime,rre=bD.resolve,nre=Mw(),Ot=Object.create(Gte.ServerResponse.prototype);ED.exports=Ot;var ire=/;\s*charset\s*=/;Ot.status=function(e){return(typeof e=="string"||Math.floor(e)!==e)&&e>99&&e<1e3&&Hr("res.status("+JSON.stringify(e)+"): use res.status("+Math.floor(e)+") instead"),this.statusCode=e,this};Ot.links=function(t){var e=this.get("Link")||"";return e&&(e+=", "),this.set("Link",e+Object.keys(t).map(function(r){return"<"+t[r]+'>; rel="'+r+'"'}).join(", "))};Ot.send=function(e){var r=e,n,i=this.req,a,o=this.app;switch(arguments.length===2&&(typeof arguments[0]!="number"&&typeof arguments[1]=="number"?(Hr("res.send(body, status): Use res.status(status).send(body) instead"),this.statusCode=arguments[1]):(Hr("res.send(status, body): Use res.status(status).send(body) instead"),this.statusCode=arguments[0],r=arguments[1])),typeof r=="number"&&arguments.length===1&&(this.get("Content-Type")||this.type("txt"),Hr("res.send(status): Use res.sendStatus(status) instead"),this.statusCode=r,r=oh.message[r]),typeof r){case"string":this.get("Content-Type")||this.type("html");break;case"boolean":case"number":case"object":if(r===null)r="";else if(Kl.isBuffer(r))this.get("Content-Type")||this.type("bin");else return this.json(r);break}typeof r=="string"&&(n="utf8",a=this.get("Content-Type"),typeof a=="string"&&this.set("Content-Type",Qte(a,"utf-8")));var s=o.get("etag fn"),c=!this.get("ETag")&&typeof s=="function",u;r!==void 0&&(Kl.isBuffer(r)?u=r.length:!c&&r.length<1e3?u=Kl.byteLength(r,n):(r=Kl.from(r,n),n=void 0,u=r.length),this.set("Content-Length",u));var l;return c&&u!==void 0&&(l=s(r,n))&&this.set("ETag",l),i.fresh&&(this.statusCode=304),(this.statusCode===204||this.statusCode===304)&&(this.removeHeader("Content-Type"),this.removeHeader("Content-Length"),this.removeHeader("Transfer-Encoding"),r=""),this.statusCode===205&&(this.set("Content-Length","0"),this.removeHeader("Transfer-Encoding"),r=""),i.method==="HEAD"?this.end():this.end(r,n),this};Ot.json=function(e){var r=e;arguments.length===2&&(typeof arguments[1]=="number"?(Hr("res.json(obj, status): Use res.status(status).json(obj) instead"),this.statusCode=arguments[1]):(Hr("res.json(status, obj): Use res.status(status).json(obj) instead"),this.statusCode=arguments[0],r=arguments[1]));var n=this.app,i=n.get("json escape"),a=n.get("json replacer"),o=n.get("json spaces"),s=$D(r,a,o,i);return this.get("Content-Type")||this.set("Content-Type","application/json"),this.send(s)};Ot.jsonp=function(e){var r=e;arguments.length===2&&(typeof arguments[1]=="number"?(Hr("res.jsonp(obj, status): Use res.status(status).jsonp(obj) instead"),this.statusCode=arguments[1]):(Hr("res.jsonp(status, obj): Use res.status(status).jsonp(obj) instead"),this.statusCode=arguments[0],r=arguments[1]));var n=this.app,i=n.get("json escape"),a=n.get("json replacer"),o=n.get("json spaces"),s=$D(r,a,o,i),c=this.req.query[n.get("jsonp callback name")];return this.get("Content-Type")||(this.set("X-Content-Type-Options","nosniff"),this.set("Content-Type","application/json")),Array.isArray(c)&&(c=c[0]),typeof c=="string"&&c.length!==0&&(this.set("X-Content-Type-Options","nosniff"),this.set("Content-Type","text/javascript"),c=c.replace(/[^\[\]\w$.]/g,""),s===void 0?s="":typeof s=="string"&&(s=s.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")),s="/**/ typeof "+c+" === 'function' && "+c+"("+s+");"),this.send(s)};Ot.sendStatus=function(e){var r=oh.message[e]||String(e);return this.statusCode=e,this.type("txt"),this.send(r)};Ot.sendFile=function(e,r,n){var i=n,a=this.req,o=this,s=a.next,c=r||{};if(!e)throw new TypeError("path argument is required to res.sendFile");if(typeof e!="string")throw new TypeError("path must be a string to res.sendFile");if(typeof r=="function"&&(i=r,c={}),!c.root&&!Wte(e))throw new TypeError("path must be absolute or specify root to res.sendFile");var u=encodeURI(e),l=zw(a,u,c);wD(o,l,c,function(d){if(i)return i(d);if(d&&d.code==="EISDIR")return s();d&&d.code!=="ECONNABORTED"&&d.syscall!=="write"&&s(d)})};Ot.sendfile=function(t,e,r){var n=r,i=this.req,a=this,o=i.next,s=e||{};typeof e=="function"&&(n=e,s={});var c=zw(i,t,s);wD(a,c,s,function(u){if(n)return n(u);if(u&&u.code==="EISDIR")return o();u&&u.code!=="ECONNABORTED"&&u.syscall!=="write"&&o(u)})};Ot.sendfile=Hr.function(Ot.sendfile,"res.sendfile: Use res.sendFile instead");Ot.download=function(e,r,n,i){var a=i,o=r,s=n||null;typeof r=="function"?(a=r,o=null,s=null):typeof n=="function"&&(a=n,s=null),typeof r=="object"&&(typeof n=="function"||n===void 0)&&(o=null,s=r);var c={"Content-Disposition":_D(o||e)};if(s&&s.headers)for(var u=Object.keys(s.headers),l=0;l0?e.accepts(n):!1;return this.vary("Accept"),i?(this.set("Content-Type",Xte(i).value),t[i](e,this,r)):t.default?t.default(e,this,r):r(Hte(406,{types:Yte(n).map(function(a){return a.value})})),this};Ot.attachment=function(e){return e&&this.type(tre(e)),this.set("Content-Disposition",_D(e)),this};Ot.append=function(e,r){var n=this.get(e),i=r;return n&&(i=Array.isArray(n)?n.concat(r):Array.isArray(r)?[n].concat(r):[n,r]),this.set(e,i)};Ot.set=Ot.header=function(e,r){if(arguments.length===2){var n=Array.isArray(r)?r.map(String):String(r);if(e.toLowerCase()==="content-type"){if(Array.isArray(n))throw new TypeError("Content-Type cannot be set to an Array");if(!ire.test(n)){var i=SD.charsets.lookup(n.split(";")[0]);i&&(n+="; charset="+i.toLowerCase())}}this.setHeader(e,n)}else for(var a in e)this.set(a,e[a]);return this};Ot.get=function(t){return this.getHeader(t)};Ot.clearCookie=function(e,r){r&&(r.maxAge&&Hr('res.clearCookie: Passing "options.maxAge" is deprecated. In v5.0.0 of Express, this option will be ignored, as res.clearCookie will automatically set cookies to expire immediately. Please update your code to omit this option.'),r.expires&&Hr('res.clearCookie: Passing "options.expires" is deprecated. In v5.0.0 of Express, this option will be ignored, as res.clearCookie will automatically set cookies to expire immediately. Please update your code to omit this option.'));var n=xD({expires:new Date(1),path:"/"},r);return this.cookie(e,"",n)};Ot.cookie=function(t,e,r){var n=xD({},r),i=this.req.secret,a=n.signed;if(a&&!i)throw new Error('cookieParser("secret") required for signed cookies');var o=typeof e=="object"?"j:"+JSON.stringify(e):String(e);if(a&&(o="s:"+Jte(o,i)),n.maxAge!=null){var s=n.maxAge-0;isNaN(s)||(n.expires=new Date(Date.now()+s),n.maxAge=Math.floor(s/1e3))}return n.path==null&&(n.path="/"),this.append("Set-Cookie",ere.serialize(t,String(o),n)),this};Ot.location=function(e){var r;return e==="back"?(Hr('res.location("back"): use res.location(req.get("Referrer") || "/") and refer to https://dub.sh/security-redirect for best practices'),r=this.req.get("Referrer")||"/"):r=String(e),this.set("Location",Bte(r))};Ot.redirect=function(e){var r=e,n,i=302;arguments.length===2&&(typeof arguments[0]=="number"?(i=arguments[0],r=arguments[1]):(Hr("res.redirect(url, status): Use res.redirect(status, url) instead"),i=arguments[1])),r=this.location(r).get("Location"),this.format({text:function(){n=oh.message[i]+". Redirecting to "+r},html:function(){var a=Vte(r);n=""+oh.message[i]+". Redirecting to "+a+"
"},default:function(){n=""}}),this.statusCode=i,this.set("Content-Length",Kl.byteLength(n)),this.req.method==="HEAD"?this.end():this.end(n)};Ot.vary=function(t){return!t||Array.isArray(t)&&!t.length?(Hr("res.vary(): Provide a field name"),this):(nre(this,t),this)};Ot.render=function(e,r,n){var i=this.req.app,a=n,o=r||{},s=this.req,c=this;typeof r=="function"&&(a=r,o={}),o._locals=c.locals,a=a||function(u,l){if(u)return s.next(u);c.send(l)},i.render(e,o,a)};function wD(t,e,r,n){var i=!1,a;function o(){if(!i){i=!0;var f=new Error("Request aborted");f.code="ECONNABORTED",n(f)}}function s(){if(!i){i=!0;var f=new Error("EISDIR, read");f.code="EISDIR",n(f)}}function c(f){i||(i=!0,n(f))}function u(){i||(i=!0,n())}function l(){a=!1}function d(f){if(f&&f.code==="ECONNRESET")return o();if(f)return c(f);i||setImmediate(function(){if(a!==!1&&!i){o();return}i||(i=!0,n())})}function p(){a=!0}e.on("directory",s),e.on("end",u),e.on("error",c),e.on("file",l),e.on("stream",p),Kte(t,d),r.headers&&e.on("headers",function(h){for(var _=r.headers,y=Object.keys(_),m=0;m&]/g,function(a){switch(a.charCodeAt(0)){case 60:return"\\u003c";case 62:return"\\u003e";case 38:return"\\u0026";default:return a}})),i}});var ID=j((Cke,Uw)=>{"use strict";var are=Ll(),ore=Fl(),Dw=Ds(),sre=require("path").resolve,TD=Qm(),cre=require("url");Uw.exports=ure;Uw.exports.mime=TD.mime;function ure(t,e){if(!t)throw new TypeError("root path required");if(typeof t!="string")throw new TypeError("root path must be a string");var r=Object.create(e||null),n=r.fallthrough!==!1,i=r.redirect!==!1,a=r.setHeaders;if(a&&typeof a!="function")throw new TypeError("option setHeaders must be function");r.maxage=r.maxage||r.maxAge||0,r.root=sre(t);var o=i?fre():pre();return function(c,u,l){if(c.method!=="GET"&&c.method!=="HEAD"){if(n)return l();u.statusCode=405,u.setHeader("Allow","GET, HEAD"),u.setHeader("Content-Length","0"),u.end();return}var d=!n,p=Dw.original(c),f=Dw(c).pathname;f==="/"&&p.pathname.substr(-1)!=="/"&&(f="");var h=TD(c,f,r);h.on("directory",o),a&&h.on("headers",a),n&&h.on("file",function(){d=!0}),h.on("error",function(y){if(d||!(y.statusCode<500)){l(y);return}l()}),h.pipe(u)}}function lre(t){for(var e=0;e1?"/"+t.substr(e):t}function dre(t,e){return`
+`}function uee(t,e){return e?e instanceof Error?bw(t,e,{expose:!1}):bw(t,e):bw(t)}function lee(t){try{return decodeURIComponent(t)}catch{return-1}}function dee(t){return typeof t.getHeaderNames!="function"?Object.keys(t._headers||{}):t.getHeaderNames()}function $D(t,e){var r=typeof t.listenerCount!="function"?t.listeners(e).length:t.listenerCount(e);return r>0}function pee(t){return typeof t.headersSent!="boolean"?!!t._header:t.headersSent}function ww(t,e){for(var r=[].concat(t||[]),n=0;n{"use strict";ED.exports=hee;function hee(t){if(!t)throw new TypeError("argument req is required");var e=vee(t.headers["x-forwarded-for"]||""),r=gee(t),n=[r].concat(e);return n}function gee(t){return t.socket?t.socket.remoteAddress:t.connection.remoteAddress}function vee(t){for(var e=t.length,r=[],n=t.length,i=t.length-1;i>=0;i--)switch(t.charCodeAt(i)){case 32:n===e&&(n=e=i);break;case 44:n!==e&&r.push(t.substring(n,e)),n=e=i;break;default:n=i;break}return n!==e&&r.push(t.substring(n,e)),r}});var ID=j((TD,Jl)=>{(function(){var t,e,r,n,i,a,o,s,c;e={},s=this,typeof Jl<"u"&&Jl!==null&&Jl.exports?Jl.exports=e:s.ipaddr=e,o=function(u,l,d,p){var f,h;if(u.length!==l.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");for(f=0;p>0;){if(h=d-p,h<0&&(h=0),u[f]>>h!==l[f]>>h)return!1;p-=d,f+=1}return!0},e.subnetMatch=function(u,l,d){var p,f,h,_,g;d==null&&(d="unicast");for(h in l)for(_=l[h],_[0]&&!(_[0]instanceof Array)&&(_=[_]),p=0,f=_.length;p