\n\n\n \nError \n\n\n'+Ua(e).replace(Ga," ").replace(Wa," ")+" \n\n\n"}(i);n.statusCode=t,n.statusMessage=$a.message[t],n.removeHeader("Content-Encoding"),n.removeHeader("Content-Language"),n.removeHeader("Content-Range"),function(e,n){if(!n)return;for(var t=Object.keys(n),a=0;a0)return function(o){if((o=String(o)).length>100)return;var r=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(o);if(!r)return;var s=parseFloat(r[1]);switch((r[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return s*i;case"days":case"day":case"d":return s*a;case"hours":case"hour":case"hrs":case"hr":case"h":return s*t;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(r);if("number"===c&&!1===isNaN(r))return s.long?function(i){return o(i,a,"day")||o(i,t,"hour")||o(i,n,"minute")||o(i,e,"second")||i+" ms"}(r):function(i){if(i>=a)return Math.round(i/a)+"d";if(i>=t)return Math.round(i/t)+"h";if(i>=n)return Math.round(i/n)+"m";if(i>=e)return Math.round(i/e)+"s";return i+"ms"}(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))},Qa}function si(){return ei||(ei=1,function(e,n){var t;function a(e){function a(){if(a.enabled){var e=a,i=+new Date,o=i-(t||i);e.diff=o,e.prev=t,e.curr=i,t=i;for(var r=new Array(arguments.length),s=0;s=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},n.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],n.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},n.enable(t())}(0,ii.exports)),ii.exports):ai.exports=(ci||(ci=1,function(e,n){var t=a,s=i;(n=pi.exports=si()).init=function(e){e.inspectOpts={};for(var t=Object.keys(n.inspectOpts),a=0;a0&&Array.isArray(i)?di(i,n,t-1):n.push(i)}return n}function fi(e,n){for(var t=0;tp&&t[a].offset>n;)t[a].offset+=3;return"(.*)"}));for(;i=vi.exec(n);){for(var d=0,f=i.index;"\\"===n.charAt(--f);)d++;d%2!=1&&((p+l===t.length||t[p+l].offset>i.index)&&t.splice(p+l,0,{name:u++,optional:!1,offset:i.index}),l++)}return n+=r?"$":"/"===n[n.length-1]?"":"(?=\\/|$)",new RegExp(n,s)}
/*!
* express
* Copyright(c) 2009-2013 TJ Holowaychuk
* Copyright(c) 2013 Roman Shtylman
* Copyright(c) 2014-2015 Douglas Christopher Wilson
* MIT Licensed
*/,vi=/\((?!\?)/g;var hi=mi,xi=li("express:router:layer"),gi=Object.prototype.hasOwnProperty,bi=yi;function yi(e,n,t){if(!(this instanceof yi))return new yi(e,n,t);xi("new %o",e);var a=n||{};this.handle=t,this.name=t.name||"",this.params=void 0,this.path=void 0,this.regexp=hi(e,this.keys=[],a),this.regexp.fast_star="*"===e,this.regexp.fast_slash="/"===e&&!1===a.end}function wi(e){if("string"!=typeof e||0===e.length)return e;try{return decodeURIComponent(e)}catch(n){throw n instanceof URIError&&(n.message="Failed to decode param '"+e+"'",n.status=n.statusCode=400),n}}
/*!
* methods
* Copyright(c) 2013-2014 TJ Holowaychuk
* Copyright(c) 2015-2016 Douglas Christopher Wilson
* MIT Licensed
*/yi.prototype.handle_error=function(e,n,t,a){var i=this.handle;if(4!==i.length)return a(e);try{i(e,n,t,a)}catch(e){a(e)}},yi.prototype.handle_request=function(e,n,t){var a=this.handle;if(a.length>3)return t();try{a(e,n,t)}catch(e){t(e)}},yi.prototype.match=function(e){var n;if(null!=e){if(this.regexp.fast_slash)return this.params={},this.path="",!0;if(this.regexp.fast_star)return this.params={0:wi(e)},this.path=e,!0;n=this.regexp.exec(e)}if(!n)return this.params=void 0,this.path=void 0,!1;this.params={},this.path=n[0];for(var t=this.keys,a=this.params,i=1;i100)return setImmediate(s,c);var p=i[a++];if(!p)return t(c);p.method&&p.method!==r?s(c):c?p.handle_error(c,e,n,s):p.handle_request(e,n,s);o=0}()},qi.prototype.all=function(){for(var e=Si(Ci.call(arguments)),n=0;n=f.length)setImmediate(h,i);else{if(++l>100)return setImmediate(x,t);var o,g,b,y=function(e){try{return Ui(e).pathname}catch(e){return}}(e);if(null==y)return h(i);for(;!0!==g&&r=0;a--)e[a+i]=e[a],a=r.length?i():(f=0,c=r[d++],s=c.name,p=t.params[s],l=o[s],u=n[s],void 0!==p&&l?u&&(u.match===p||u.error&&"route"!==u.error)?(t.params[s]=u.value,m(u.error)):(n[s]=u={error:null,match:p,value:p},void v()):m())}function v(e){var n=l[f++];if(u.value=t.params[c.name],e)return u.error=e,void m(e);if(!n)return m();try{n(t,a,v,p,c.name)}catch(e){v(e)}}m()},Wi.use=function(e){var n=0,t="/";if("function"!=typeof e){for(var a=e;Array.isArray(a)&&0!==a.length;)a=a[0];"function"!=typeof a&&(n=1,t=e)}var i=Mi($i.call(arguments,n));if(0===i.length)throw new TypeError("Router.use() requires a middleware function");for(var o=0;o");var r=new Ri(t,{sensitive:this.caseSensitive,strict:!1,end:!1},e);r.route=void 0,this.stack.push(r)}return this},Wi.route=function(e){var n=new Pi(e),t=new Ri(e,{sensitive:this.caseSensitive,strict:this.strict,end:!0},n.dispatch.bind(n));return t.route=n,this.stack.push(t),n},Di.concat("all").forEach((function(e){Wi[e]=function(n){var t=this.route(n);return t[e].apply(t,$i.call(arguments,1)),this}}));var Yi,Xi,Qi=ti.exports,Ki={},eo=X;function no(){if(Xi)return Yi;Xi=1;var e=Ii,n=Na,t=sa();return Yi=function(a){var i=e({},a),o=t.parse;return"function"==typeof a&&(o=a,i=void 0),void 0!==i&&void 0===i.allowPrototypes&&(i.allowPrototypes=!0),function(e,t,a){if(!e.query){var r=n(e).query;e.query=o(r,i)}a()}},Yi}Ki.init=function(e){return function(n,t,a){e.enabled("x-powered-by")&&t.setHeader("X-Powered-By","Express"),n.res=t,t.req=n,n.next=a,eo(n,e.request),eo(t,e.response),t.locals=t.locals||Object.create(null),a()}};
/*!
* express
* Copyright(c) 2009-2013 TJ Holowaychuk
* Copyright(c) 2013 Roman Shtylman
* Copyright(c) 2014-2015 Douglas Christopher Wilson
* MIT Licensed
*/
var to=li("express:view"),ao=t,io=o,oo=ao.dirname,ro=ao.basename,so=ao.extname,co=ao.join,po=ao.resolve,lo=uo;function uo(e,n){var t=n||{};if(this.defaultEngine=t.defaultEngine,this.ext=so(e),this.name=e,this.root=t.root,!this.ext&&!this.defaultEngine)throw new Error("No default engine was specified and no extension was provided.");var a=e;if(this.ext||(this.ext="."!==this.defaultEngine[0]?"."+this.defaultEngine:this.defaultEngine,a+=this.ext),!t.engines[this.ext]){var i=this.ext.slice(1);to('require "%s"',i);var o=function(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}(i).__express;if("function"!=typeof o)throw new Error('Module "'+i+'" does not provide a view engine.');t.engines[this.ext]=o}this.engine=t.engines[this.ext],this.path=this.lookup(a)}function fo(e){to('stat "%s"',e);try{return io.statSync(e)}catch(e){return}}uo.prototype.lookup=function(e){var n,t=[].concat(this.root);to('lookup "%s"',e);for(var a=0;a */
!function(e,n){var t=l,a=t.Buffer;function i(e,n){for(var t in e)n[t]=e[t]}function o(e,n,t){return a(e,n,t)}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?e.exports=t:(i(t,n),n.Buffer=o),o.prototype=Object.create(a.prototype),i(a,o),o.from=function(e,n,t){if("number"==typeof e)throw new TypeError("Argument must not be a number");return a(e,n,t)},o.alloc=function(e,n,t){if("number"!=typeof e)throw new TypeError("Argument must be a number");var i=a(e);return void 0!==n?"string"==typeof t?i.fill(n,t):i.fill(n):i.fill(0),i},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return a(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return t.SlowBuffer(e)}}(vo,vo.exports);var ho=vo.exports,xo={exports:{}};
/*!
* content-disposition
* Copyright(c) 2014-2017 Douglas Christopher Wilson
* MIT Licensed
*/
xo.exports=function(e,n){var t=n||{},a=t.type||"attachment",i=function(e,n){if(void 0===e)return;var t={};if("string"!=typeof e)throw new TypeError("filename must be a string");void 0===n&&(n=!0);if("string"!=typeof n&&"boolean"!=typeof n)throw new TypeError("fallback must be a string or boolean");if("string"==typeof n&&jo.test(n))throw new TypeError("fallback must be ISO-8859-1 string");var a=go(e),i=Ao.test(a),o="string"!=typeof n?n&&zo(a):go(n),r="string"==typeof o&&o!==a;(r||!i||wo.test(a))&&(t["filename*"]=a);(i||r)&&(t.filename=r?o:a);return t}(e,t.fallback);return function(e){var n=e.parameters,t=e.type;if(!t||"string"!=typeof t||!Co.test(t))throw new TypeError("invalid type");var a=String(t).toLowerCase();if(n&&"object"==typeof n)for(var i,o=Object.keys(n).sort(),r=0;r?@[\\\]{}\x7f]/g,wo=/%[0-9A-Fa-f]{2}/,ko=/%([0-9A-Fa-f]{2})/g,jo=/[^\x20-\x7e\xa0-\xff]/g,Eo=/\\([\u0000-\u007f])/g,So=/([\\"])/g,Oo=/;[\x09\x20]*([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*=[\x09\x20]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*/g,Ao=/^[\x20-\x7e\x80-\xff]+$/,Co=/^[!#$%&'*+.0-9A-Z^_`a-z|~-]+$/,_o=/^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+.^_`|~-])+)$/,To=/^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/;function qo(e){var n=_o.exec(e);if(!n)throw new TypeError("invalid extended field value");var t,a=n[1].toLowerCase(),i=n[2].replace(ko,Io);switch(a){case"iso-8859-1":t=zo(i);break;case"utf-8":t=bo.from(i,"binary").toString("utf8");break;default:throw new TypeError("unsupported charset in extended field")}return t}function zo(e){return String(e).replace(jo,"?")}function Io(e,n){return String.fromCharCode(parseInt(n,16))}function Po(e){return"%"+String(e).charCodeAt(0).toString(16).toUpperCase()}function Ro(e){return'"'+String(e).replace(So,"\\$1")+'"'}function Do(e){var n=String(e);return"UTF-8''"+encodeURIComponent(n).replace(yo,Po)}function Bo(e,n){this.type=e,this.parameters=n}var No,Lo,Mo,Uo,Fo=xo.exports,Ho={exports:{}},$o={exports:{}},Vo={exports:{}},Wo={exports:{}};function Go(){if(Lo)return No;Lo=1;var e=1e3,n=60*e,t=60*n,a=24*t,i=365.25*a;function o(e,n,t){if(!(e0)return function(o){if((o=String(o)).length>100)return;var r=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(o);if(!r)return;var s=parseFloat(r[1]);switch((r[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return s*i;case"days":case"day":case"d":return s*a;case"hours":case"hour":case"hrs":case"hr":case"h":return s*t;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(r);if("number"===c&&!1===isNaN(r))return s.long?function(i){return o(i,a,"day")||o(i,t,"hour")||o(i,n,"minute")||o(i,e,"second")||i+" ms"}(r):function(i){if(i>=a)return Math.round(i/a)+"d";if(i>=t)return Math.round(i/t)+"h";if(i>=n)return Math.round(i/n)+"m";if(i>=e)return Math.round(i/e)+"s";return i+"ms"}(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))},No}function Zo(){return Mo||(Mo=1,function(e,n){var t;function a(e){function a(){if(a.enabled){var e=a,i=+new Date,o=i-(t||i);e.diff=o,e.prev=t,e.curr=i,t=i;for(var r=new Array(arguments.length),s=0;s=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},n.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],n.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},n.enable(t())}(0,Vo.exports)),Vo.exports):$o.exports=(Jo||(Jo=1,function(e,n){var t=a,s=i;(n=Yo.exports=Zo()).init=function(e){e.inspectOpts={};for(var t=Object.keys(n.inspectOpts),a=0;a=1.5*t;return Math.round(e/t)+" "+a+(i?"s":"")}
/*!
* range-parser
* Copyright(c) 2012-2014 TJ Holowaychuk
* Copyright(c) 2015-2016 Douglas Christopher Wilson
* MIT Licensed
*/var hr=function(e,n,t){if("string"!=typeof n)throw new TypeError("argument str must be a string");var a=n.indexOf("=");if(-1===a)return-2;var i=n.slice(a+1).split(","),o=[];o.type=n.slice(0,a);for(var r=0;re-1&&(p=e-1),isNaN(c)||isNaN(p)||c>p||c<0||o.push({start:c,end:p})}if(o.length<1)return-1;return t&&t.combine?function(e){for(var n=e.map(xr).sort(yr),t=0,a=1;ao.end+1?n[++t]=i:i.end>o.end&&(o.end=i.end,o.index=Math.min(o.index,i.index))}n.length=t+1;var r=n.sort(br).map(gr);return r.type=e.type,r}(o):o};function xr(e,n){return{start:e.start,end:e.end,index:n}}function gr(e){return{start:e.start,end:e.end}}function br(e,n){return e.index-n.index}function yr(e,n){return e.start-n.start}
/*!
* send
* Copyright(c) 2012 TJ Holowaychuk
* Copyright(c) 2014-2022 Douglas Christopher Wilson
* MIT Licensed
*/var wr=de,kr=Xo("send"),jr=j("send"),Er=Oe,Sr=Sa,Or=Ta,Ar=Qo,Cr=ar,_r=o,Tr=cr,qr=function(e,n){n=n||{};var t=typeof e;if("string"===t&&e.length>0)return function(e){if((e=String(e)).length>100)return;var n=/^(-?(?:\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(!n)return;var t=parseFloat(n[1]);switch((n[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return t*mr;case"weeks":case"week":case"w":return t*fr;case"days":case"day":case"d":return t*dr;case"hours":case"hour":case"hrs":case"hr":case"h":return t*ur;case"minutes":case"minute":case"mins":case"min":case"m":return t*lr;case"seconds":case"second":case"secs":case"sec":case"s":return t*pr;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}(e);if("number"===t&&isFinite(e))return n.long?function(e){var n=Math.abs(e);if(n>=dr)return vr(e,n,dr,"day");if(n>=ur)return vr(e,n,ur,"hour");if(n>=lr)return vr(e,n,lr,"minute");if(n>=pr)return vr(e,n,pr,"second");return e+" ms"}(e):function(e){var n=Math.abs(e);if(n>=dr)return Math.round(e/dr)+"d";if(n>=ur)return Math.round(e/ur)+"h";if(n>=lr)return Math.round(e/lr)+"m";if(n>=pr)return Math.round(e/pr)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))},zr=Pn,Ir=hr,Pr=t,Rr=K,Dr=c,Br=i,Nr=Pr.extname,Lr=Pr.join,Mr=Pr.normalize,Ur=Pr.resolve,Fr=Pr.sep,Hr=/^ *bytes=/,$r=31536e6,Vr=/(?:^|[\\/])\.\.(?:[\\/]|$)/;function Wr(e,n,t){Dr.call(this);var a=t||{};if(this.options=a,this.path=n,this.req=e,this._acceptRanges=void 0===a.acceptRanges||Boolean(a.acceptRanges),this._cacheControl=void 0===a.cacheControl||Boolean(a.cacheControl),this._etag=void 0===a.etag||Boolean(a.etag),this._dotfiles=void 0!==a.dotfiles?a.dotfiles:"ignore","ignore"!==this._dotfiles&&"allow"!==this._dotfiles&&"deny"!==this._dotfiles)throw new TypeError('dotfiles option must be "allow", "deny", or "ignore"');this._hidden=Boolean(a.hidden),void 0!==a.hidden&&jr("hidden: use dotfiles: '"+(this._hidden?"allow":"ignore")+"' instead"),void 0===a.dotfiles&&(this._dotfiles=void 0),this._extensions=void 0!==a.extensions?Yr(a.extensions,"extensions option"):[],this._immutable=void 0!==a.immutable&&Boolean(a.immutable),this._index=void 0!==a.index?Yr(a.index,"index option"):["index.html"],this._lastModified=void 0===a.lastModified||Boolean(a.lastModified),this._maxage=a.maxAge||a.maxage,this._maxage="string"==typeof this._maxage?qr(this._maxage):Number(this._maxage),this._maxage=isNaN(this._maxage)?0:Math.min(Math.max(0,this._maxage),$r),this._root=a.root?Ur(a.root):null,!this._root&&a.from&&this.from(a.from)}function Gr(e,n,t){return e+" "+(t?t.start+"-"+t.end:"*")+"/"+n}function Zr(e,n){return'\n\n\n \n'+e+" \n\n\n"+n+" \n\n\n"}function Jr(e,n){return("function"!=typeof e.listenerCount?e.listeners(n).length:e.listenerCount(n))>0}function Yr(e,n){for(var t=[].concat(e||[]),a=0;ai}return!1},Wr.prototype.removeContentHeaderFields=function(){var e=this.res;e.removeHeader("Content-Encoding"),e.removeHeader("Content-Language"),e.removeHeader("Content-Length"),e.removeHeader("Content-Range"),e.removeHeader("Content-Type")},Wr.prototype.notModified=function(){var e=this.res;kr("not modified"),this.removeContentHeaderFields(),e.statusCode=304,e.end()},Wr.prototype.headersAlreadySent=function(){var e=new Error("Can't set headers after they are sent.");kr("headers already sent"),this.error(500,e)},Wr.prototype.isCachable=function(){var e=this.res.statusCode;return e>=200&&e<300||304===e},Wr.prototype.onStatError=function(e){switch(e.code){case"ENAMETOOLONG":case"ENOENT":case"ENOTDIR":this.error(404,e);break;default:this.error(500,e)}},Wr.prototype.isFresh=function(){return Cr(this.req.headers,{etag:this.res.getHeader("ETag"),"last-modified":this.res.getHeader("Last-Modified")})},Wr.prototype.isRangeFresh=function(){var e=this.req.headers["if-range"];if(!e)return!0;if(-1!==e.indexOf('"')){var n=this.res.getHeader("ETag");return Boolean(n&&-1!==e.indexOf(n))}return Xr(this.res.getHeader("Last-Modified"))<=Xr(e)},Wr.prototype.redirect=function(e){var n=this.res;if(Jr(this,"directory"))this.emit("directory",n,e);else if(this.hasTrailingSlash())this.error(403);else{var t=Sr(function(e){for(var n=0;n1?"/"+e.substr(n):e}(this.path+"/")),a=Zr("Redirecting",'Redirecting to '+Or(t)+" ");n.statusCode=301,n.setHeader("Content-Type","text/html; charset=UTF-8"),n.setHeader("Content-Length",Buffer.byteLength(a)),n.setHeader("Content-Security-Policy","default-src 'none'"),n.setHeader("X-Content-Type-Options","nosniff"),n.setHeader("Location",t),n.end(a)}},Wr.prototype.pipe=function(e){var n=this._root;this.res=e;var t,a=function(e){try{return decodeURIComponent(e)}catch(e){return-1}}(this.path);if(-1===a)return this.error(400),e;if(~a.indexOf("\0"))return this.error(400),e;if(null!==n){if(a&&(a=Mr("."+Fr+a)),Vr.test(a))return kr('malicious path "%s"',a),this.error(403),e;t=a.split(Fr),a=Mr(Lr(n,a))}else{if(Vr.test(a))return kr('malicious path "%s"',a),this.error(403),e;t=Mr(a).split(Fr),a=Ur(a)}if(function(e){for(var n=0;n1&&"."===t[0])return!0}return!1}(t)){var i=this._dotfiles;switch(void 0===i&&(i="."===t[t.length-1][0]?this._hidden?"allow":"ignore":"allow"),kr('%s dotfile "%s"',i,a),i){case"allow":break;case"deny":return this.error(403),e;default:return this.error(404),e}}return this._index.length&&this.hasTrailingSlash()?(this.sendIndex(a),e):(this.sendFile(a),e)},Wr.prototype.send=function(e,n){var t=n.size,a=this.options,i={},o=this.res,r=this.req,s=r.headers.range,c=a.start||0;if(function(e){return"boolean"!=typeof e.headersSent?Boolean(e._header):e.headersSent}(o))this.headersAlreadySent();else{if(kr('pipe "%s"',e),this.setHeader(e,n),this.type(e),this.isConditionalGET()){if(this.isPreconditionFailure())return void this.error(412);if(this.isCachable()&&this.isFresh())return void this.notModified()}if(t=Math.max(0,t-c),void 0!==a.end){var p=a.end-c+1;t>p&&(t=p)}if(this._acceptRanges&&Hr.test(s)){if(s=Ir(t,s,{combine:!0}),this.isRangeFresh()||(kr("range stale"),s=-2),-1===s)return kr("range unsatisfiable"),o.setHeader("Content-Range",Gr("bytes",t)),this.error(416,{headers:{"Content-Range":o.getHeader("Content-Range")}});-2!==s&&1===s.length&&(kr("range %j",s),o.statusCode=206,o.setHeader("Content-Range",Gr("bytes",t,s[0])),c+=s[0].start,t=s[0].end-s[0].start+1)}for(var l in a)i[l]=a[l];i.start=c,i.end=Math.max(c,c+t-1),o.setHeader("Content-Length",t),"HEAD"!==r.method?this.stream(e,i):o.end()}},Wr.prototype.sendFile=function(e){var n=0,t=this;function a(i){if(t._extensions.length<=n)return i?t.onStatError(i):t.error(404);var o=e+"."+t._extensions[n++];kr('stat "%s"',o),_r.stat(o,(function(e,n){return e?a(e):n.isDirectory()?a():(t.emit("file",o,n),void t.send(o,n))}))}kr('stat "%s"',e),_r.stat(e,(function(n,i){return n&&"ENOENT"===n.code&&!Nr(e)&&e[e.length-1]!==Fr?a(n):n?t.onStatError(n):i.isDirectory()?t.redirect(e):(t.emit("file",e,i),void t.send(e,i))}))},Wr.prototype.sendIndex=function(e){var n=-1,t=this;!function a(i){if(++n>=t._index.length)return i?t.onStatError(i):t.error(404);var o=Lr(e,t._index[n]);kr('stat "%s"',o),_r.stat(o,(function(e,n){return e?a(e):n.isDirectory()?a():(t.emit("file",o,n),void t.send(o,n))}))}()},Wr.prototype.stream=function(e,n){var t=this,a=this.res,i=_r.createReadStream(e,n);function o(){Er(i,!0)}this.emit("stream",i),i.pipe(a),zr(a,o),i.on("error",(function(e){o(),t.onStatError(e)})),i.on("end",(function(){t.emit("end")}))},Wr.prototype.type=function(e){var n=this.res;if(!n.getHeader("Content-Type")){var t=Tr.lookup(e);if(t){var a=Tr.charsets.lookup(t);kr("content-type %s",t),n.setHeader("Content-Type",t+(a?"; charset="+a:""))}else kr("no content-type")}},Wr.prototype.setHeader=function(e,n){var t=this.res;if(this.emit("headers",t,e,n),this._acceptRanges&&!t.getHeader("Accept-Ranges")&&(kr("accept ranges"),t.setHeader("Accept-Ranges","bytes")),this._cacheControl&&!t.getHeader("Cache-Control")){var a="public, max-age="+Math.floor(this._maxage/1e3);this._immutable&&(a+=", immutable"),kr("cache-control %s",a),t.setHeader("Cache-Control",a)}if(this._lastModified&&!t.getHeader("Last-Modified")){var i=n.mtime.toUTCString();kr("modified %s",i),t.setHeader("Last-Modified",i)}if(this._etag&&!t.getHeader("ETag")){var o=Ar(n);kr("etag %s",o),t.setHeader("ETag",o)}};var Qr=Ho.exports,Kr={exports:{}},es=function(e){if(!e)throw new TypeError("argument req is required");var n=function(e){for(var n=e.length,t=[],a=e.length,i=e.length-1;i>=0;i--)switch(e.charCodeAt(i)){case 32:a===n&&(a=n=i);break;case 44:a!==n&&t.push(e.substring(a,n)),a=n=i;break;default:a=i}a!==n&&t.push(e.substring(a,n));return t}(e.headers["x-forwarded-for"]||""),t=function(e){return e.socket?e.socket.remoteAddress:e.connection.remoteAddress}(e);return[t].concat(n)};var ns={exports:{}};!function(e){(function(){var n,t,a,i,o,r,s,c;t={},null!==e&&e.exports?e.exports=t:this.ipaddr=t,s=function(e,n,t,a){var i,o;if(e.length!==n.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");for(i=0;a>0;){if((o=t-a)<0&&(o=0),e[i]>>o!=n[i]>>o)return!1;a-=t,i+=1}return!0},t.subnetMatch=function(e,n,t){var a,i,o,r,s;for(o in null==t&&(t="unicast"),n)for(!(r=n[o])[0]||r[0]instanceof Array||(r=[r]),a=0,i=r.length;a=0;n=t+=-1){if(!((a=this.octets[n])in r))return null;if(o=r[a],i&&0!==o)return null;8!==o&&(i=!0),e+=o}return 32-e},e}(),a="(0?\\d+|0x[a-f0-9]+)",i={fourOctet:new RegExp("^"+a+"\\."+a+"\\."+a+"\\."+a+"$","i"),longValue:new RegExp("^"+a+"$","i")},t.IPv4.parser=function(e){var n,t,a,o,r;if(t=function(e){return"0"===e[0]&&"x"!==e[1]?parseInt(e,8):parseInt(e)},n=e.match(i.fourOctet))return function(){var e,i,o,r;for(r=[],e=0,i=(o=n.slice(1,6)).length;e4294967295||r<0)throw new Error("ipaddr: address outside defined range");return function(){var e,n;for(n=[],o=e=0;e<=24;o=e+=8)n.push(r>>o&255);return n}().reverse()}return null},t.IPv6=function(){function e(e,n){var t,a,i,o,r,s;if(16===e.length)for(this.parts=[],t=a=0;a<=14;t=a+=2)this.parts.push(e[t]<<8|e[t+1]);else{if(8!==e.length)throw new Error("ipaddr: ipv6 part count should be 8 or 16");this.parts=e}for(i=0,o=(s=this.parts).length;in&&(e=t.index,n=t[0].length);return n<0?i:i.substring(0,e)+"::"+i.substring(e+n)},e.prototype.toByteArray=function(){var e,n,t,a,i;for(e=[],n=0,t=(i=this.parts).length;n>8),e.push(255&a);return e},e.prototype.toNormalizedString=function(){var e,n,t;return e=function(){var e,t,a,i;for(i=[],e=0,t=(a=this.parts).length;e>8,255&e,n>>8,255&n])},e.prototype.prefixLengthFromSubnetMask=function(){var e,n,t,a,i,o,r;for(r={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},e=0,i=!1,n=t=7;t>=0;n=t+=-1){if(!((a=this.parts[n])in r))return null;if(o=r[a],i&&0!==o)return null;16!==o&&(i=!0),e+=o}return 128-e},e}(),o="(?:[0-9a-f]+::?)+",c="%[0-9a-z]{1,}",r={zoneIndex:new RegExp(c,"i"),native:new RegExp("^(::)?("+o+")?([0-9a-f]+)?(::)?("+c+")?$","i"),transitional:new RegExp("^((?:"+o+")|(?:::)(?:"+o+")?)"+a+"\\."+a+"\\."+a+"\\."+a+"("+c+")?$","i")},n=function(e,n){var t,a,i,o,s,c;if(e.indexOf("::")!==e.lastIndexOf("::"))return null;for((c=(e.match(r.zoneIndex)||[])[0])&&(c=c.substring(1),e=e.replace(/%.+$/,"")),t=0,a=-1;(a=e.indexOf(":",a+1))>=0;)t++;if("::"===e.substr(0,2)&&t--,"::"===e.substr(-2,2)&&t--,t>n)return null;for(s=n-t,o=":";s--;)o+="0:";return":"===(e=e.replace("::",o))[0]&&(e=e.slice(1)),":"===e[e.length-1]&&(e=e.slice(0,-1)),{parts:n=function(){var n,t,a,o;for(o=[],n=0,t=(a=e.split(":")).length;n=0&&n<=32)return a=[this.parse(t[1]),n],Object.defineProperty(a,"toString",{value:function(){return this.join("/")}}),a;throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},t.IPv4.subnetMaskFromPrefixLength=function(e){var n,t,a;if((e=parseInt(e))<0||e>32)throw new Error("ipaddr: invalid IPv4 prefix length");for(a=[0,0,0,0],t=0,n=Math.floor(e/8);t=0&&n<=128)return a=[this.parse(t[1]),n],Object.defineProperty(a,"toString",{value:function(){return this.join("/")}}),a;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},t.isValid=function(e){return t.IPv6.isValid(e)||t.IPv4.isValid(e)},t.parse=function(e){if(t.IPv6.isValid(e))return t.IPv6.parse(e);if(t.IPv4.isValid(e))return t.IPv4.parse(e);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},t.parseCIDR=function(e){try{return t.IPv6.parseCIDR(e)}catch(n){try{return t.IPv4.parseCIDR(e)}catch(e){throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},t.fromByteArray=function(e){var n;if(4===(n=e.length))return new t.IPv4(e);if(16===n)return new t.IPv6(e);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},t.process=function(e){var n;return"ipv6"===(n=this.parse(e)).kind()&&n.isIPv4MappedAddress()?n.toIPv4Address():n}}).call(g)}(ns);var ts=ns.exports;
/*!
* proxy-addr
* Copyright(c) 2014-2016 Douglas Christopher Wilson
* MIT Licensed
*/Kr.exports=function(e,n){if(!e)throw new TypeError("req argument is required");if(!n)throw new TypeError("trust argument is required");var t=ps(e,n);return t[t.length-1]},Kr.exports.all=ps,Kr.exports.compile=ls;var as=es,is=ts,os=/^[0-9]+$/,rs=is.isValid,ss=is.parse,cs={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 ps(e,n){var t=as(e);if(!n)return t;"function"!=typeof n&&(n=ls(n));for(var a=0;ai)throw new TypeError("invalid range on address: "+e);return[a,o]}function ds(){return!1}var fs=Kr.exports;
/*!
* express
* Copyright(c) 2009-2013 TJ Holowaychuk
* Copyright(c) 2014-2015 Douglas Christopher Wilson
* MIT Licensed
*/!function(e){var n=ho.Buffer,t=Fo,a=U,i=j("express"),o=ui,r=Qr.mime,s=Qo,c=fs,p=sa(),l=d;function u(e){return function(t,a){var i=n.isBuffer(t)?t:n.from(t,a);return s(i,e)}}function f(e){return p.parse(e,{allowPrototypes:!0})}function m(){return{}}e.etag=u({weak:!1}),e.wetag=u({weak:!0}),e.isAbsolute=function(e){return"/"===e[0]||(":"===e[1]&&("\\"===e[2]||"/"===e[2])||("\\\\"===e.substring(0,2)||void 0))},e.flatten=i.function(o,"utils.flatten: use array-flatten npm module instead"),e.normalizeType=function(e){return~e.indexOf("/")?function(e,n){for(var t=e.split(/ *; */),a={value:t[0],quality:1,params:{},originalIndex:n},i=1;i1?'directories "'+a.root.slice(0,-1).join('", "')+'" or "'+a.root[a.root.length-1]+'"':'directory "'+a.root+'"',l=new Error('Failed to lookup view "'+e+'" in views '+p);return l.view=a,o(l)}c.cache&&(i[e]=a)}!function(e,n,t){try{e.render(n,t)}catch(e){t(e)}}(a,c,o)},k.listen=function(){var e=l.createServer(this);return e.listen.apply(e,arguments)}}(ha);var ms=ha.exports,vs={exports:{}},hs={exports:{}};hs.exports=ys,hs.exports.preferredCharsets=ys;var xs=/^\s*([^\s;]+)\s*(?:;(.*))?$/;function gs(e,n){var t=xs.exec(e);if(!t)return null;var a=t[1],i=1;if(t[2])for(var o=t[2].split(";"),r=0;r0}var Es=hs.exports,Ss={exports:{}};Ss.exports=_s,Ss.exports.preferredEncodings=_s;var Os=/^\s*([^\s;]+)\s*(?:;(.*))?$/;function As(e,n){var t=Os.exec(e);if(!t)return null;var a=t[1],i=1;if(t[2])for(var o=t[2].split(";"),r=0;r0}var Is=Ss.exports,Ps={exports:{}};Ps.exports=Ns,Ps.exports.preferredLanguages=Ns;var Rs=/^\s*([^\s\-;]+)(?:-([^\s;]+))?\s*(?:;(.*))?$/;function Ds(e,n){var t=Rs.exec(e);if(!t)return null;var a=t[1],i=t[2],o=a;i&&(o+="-"+i);var r=1;if(t[3])for(var s=t[3].split(";"),c=0;c0}var Fs=Ps.exports,Hs={exports:{}};Hs.exports=Zs,Hs.exports.preferredMediaTypes=Zs;var $s=/^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/;function Vs(e){for(var n=function(e){for(var n=e.split(","),t=1,a=0;t0){if(!o.every((function(e){return"*"==n.params[e]||(n.params[e]||"").toLowerCase()==(a.params[e]||"").toLowerCase()})))return null;i|=1}return{i:t,o:n.i,q:n.q,s:i}}function Zs(e,n){var t=Vs(void 0===e?"*/*":e||"");if(!n)return t.filter(Xs).sort(Js).map(Ys);var a=n.map((function(e,n){return function(e,n,t){for(var a={o:-1,q:0,s:0},i=0;i0}function Qs(e){for(var n=0,t=0;-1!==(t=e.indexOf('"',t));)n++,t++;return n}function Ks(e){var n,t,a=e.indexOf("=");return-1===a?n=e:(n=e.substr(0,a),t=e.substr(a+1)),[n,t]}var ec=Hs.exports,nc=Es,tc=Is,ac=Fs,ic=ec;
/*!
* negotiator
* Copyright(c) 2012 Federico Romero
* Copyright(c) 2012-2014 Isaac Z. Schlueter
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/function oc(e){if(!(this instanceof oc))return new oc(e);this.request=e}vs.exports=oc,vs.exports.Negotiator=oc,oc.prototype.charset=function(e){var n=this.charsets(e);return n&&n[0]},oc.prototype.charsets=function(e){return nc(this.request.headers["accept-charset"],e)},oc.prototype.encoding=function(e){var n=this.encodings(e);return n&&n[0]},oc.prototype.encodings=function(e){return tc(this.request.headers["accept-encoding"],e)},oc.prototype.language=function(e){var n=this.languages(e);return n&&n[0]},oc.prototype.languages=function(e){return ac(this.request.headers["accept-language"],e)},oc.prototype.mediaType=function(e){var n=this.mediaTypes(e);return n&&n[0]},oc.prototype.mediaTypes=function(e){return ic(this.request.headers.accept,e)},oc.prototype.preferredCharset=oc.prototype.charset,oc.prototype.preferredCharsets=oc.prototype.charsets,oc.prototype.preferredEncoding=oc.prototype.encoding,oc.prototype.preferredEncodings=oc.prototype.encodings,oc.prototype.preferredLanguage=oc.prototype.language,oc.prototype.preferredLanguages=oc.prototype.languages,oc.prototype.preferredMediaType=oc.prototype.mediaType,oc.prototype.preferredMediaTypes=oc.prototype.mediaTypes;var rc=vs.exports,sc=Gn,cc=pc;
/*!
* accepts
* Copyright(c) 2014 Jonathan Ong
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/function pc(e){if(!(this instanceof pc))return new pc(e);this.headers=e.headers,this.negotiator=new rc(e)}function lc(e){return-1===e.indexOf("/")?sc.lookup(e):e}function uc(e){return"string"==typeof e}
/*!
* express
* Copyright(c) 2009-2013 TJ Holowaychuk
* Copyright(c) 2013 Roman Shtylman
* Copyright(c) 2014-2015 Douglas Christopher Wilson
* MIT Licensed
*/pc.prototype.type=pc.prototype.types=function(e){var n=e;if(n&&!Array.isArray(n)){n=new Array(arguments.length);for(var t=0;t=200&&t<300||304===t)&&xc(this.headers,{etag:n.get("ETag"),"last-modified":n.get("Last-Modified")}))})),jc(wc,"stale",(function(){return!this.fresh})),jc(wc,"xhr",(function(){return"xmlhttprequest"===(this.get("X-Requested-With")||"").toLowerCase()}));var Ec={};!function(e){var t=n;function a(e){return t.createHash("sha1").update(e).digest("hex")}e.sign=function(e,n){if("string"!=typeof e)throw new TypeError("Cookie value must be provided as a string.");if("string"!=typeof n)throw new TypeError("Secret string must be provided.");return e+"."+t.createHmac("sha256",n).update(e).digest("base64").replace(/\=+$/,"")},e.unsign=function(n,t){if("string"!=typeof n)throw new TypeError("Signed cookie string must be provided.");if("string"!=typeof t)throw new TypeError("Secret string must be provided.");var i=n.slice(0,n.lastIndexOf("."));return a(e.sign(i,t))==a(n)&&i}}(Ec);var Sc={
/*!
* cookie
* Copyright(c) 2012-2014 Roman Shtylman
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/
parse:function(e,n){if("string"!=typeof e)throw new TypeError("argument str must be a string");var t={},a=(n||{}).decode||Cc,i=0;for(;i&]/g,(function(e){switch(e.charCodeAt(0)){case 60:return"\\u003c";case 62:return"\\u003e";case 38:return"\\u0026";default:return e}}))),i}ip.status=function(e){return("string"==typeof e||Math.floor(e)!==e)&&e>99&&e<1e3&&Lc("res.status("+JSON.stringify(e)+"): use res.status("+Math.floor(e)+") instead"),this.statusCode=e,this},ip.links=function(e){var n=this.get("Link")||"";return n&&(n+=", "),this.set("Link",n+Object.keys(e).map((function(n){return"<"+e[n]+'>; rel="'+n+'"'})).join(", "))},ip.send=function(e){var n,t,a=e,i=this.req,o=this.app;switch(2===arguments.length&&("number"!=typeof arguments[0]&&"number"==typeof arguments[1]?(Lc("res.send(body, status): Use res.status(status).send(body) instead"),this.statusCode=arguments[1]):(Lc("res.send(status, body): Use res.status(status).send(body) instead"),this.statusCode=arguments[0],a=arguments[1])),"number"==typeof a&&1===arguments.length&&(this.get("Content-Type")||this.type("txt"),Lc("res.send(status): Use res.sendStatus(status) instead"),this.statusCode=a,a=Wc.message[a]),typeof a){case"string":this.get("Content-Type")||this.type("html");break;case"boolean":case"number":case"object":if(null===a)a="";else{if(!Dc.isBuffer(a))return this.json(a);this.get("Content-Type")||this.type("bin")}}"string"==typeof a&&(n="utf8","string"==typeof(t=this.get("Content-Type"))&&this.set("Content-Type",Xc(t,"utf-8")));var r,s,c=o.get("etag fn"),p=!this.get("ETag")&&"function"==typeof c;return void 0!==a&&(Dc.isBuffer(a)?r=a.length:!p&&a.length<1e3?r=Dc.byteLength(a,n):(a=Dc.from(a,n),n=void 0,r=a.length),this.set("Content-Length",r)),p&&void 0!==r&&(s=c(a,n))&&this.set("ETag",s),i.fresh&&(this.statusCode=304),204!==this.statusCode&&304!==this.statusCode||(this.removeHeader("Content-Type"),this.removeHeader("Content-Length"),this.removeHeader("Transfer-Encoding"),a=""),205===this.statusCode&&(this.set("Content-Length","0"),this.removeHeader("Transfer-Encoding"),a=""),"HEAD"===i.method?this.end():this.end(a,n),this},ip.json=function(e){var n=e;2===arguments.length&&("number"==typeof arguments[1]?(Lc("res.json(obj, status): Use res.status(status).json(obj) instead"),this.statusCode=arguments[1]):(Lc("res.json(status, obj): Use res.status(status).json(obj) instead"),this.statusCode=arguments[0],n=arguments[1]));var t=this.app,a=t.get("json escape"),i=cp(n,t.get("json replacer"),t.get("json spaces"),a);return this.get("Content-Type")||this.set("Content-Type","application/json"),this.send(i)},ip.jsonp=function(e){var n=e;2===arguments.length&&("number"==typeof arguments[1]?(Lc("res.jsonp(obj, status): Use res.status(status).jsonp(obj) instead"),this.statusCode=arguments[1]):(Lc("res.jsonp(status, obj): Use res.status(status).jsonp(obj) instead"),this.statusCode=arguments[0],n=arguments[1]));var t=this.app,a=t.get("json escape"),i=cp(n,t.get("json replacer"),t.get("json spaces"),a),o=this.req.query[t.get("jsonp callback name")];return this.get("Content-Type")||(this.set("X-Content-Type-Options","nosniff"),this.set("Content-Type","application/json")),Array.isArray(o)&&(o=o[0]),"string"==typeof o&&0!==o.length&&(this.set("X-Content-Type-Options","nosniff"),this.set("Content-Type","text/javascript"),o=o.replace(/[^\[\]\w$.]/g,""),void 0===i?i="":"string"==typeof i&&(i=i.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")),i="/**/ typeof "+o+" === 'function' && "+o+"("+i+");"),this.send(i)},ip.sendStatus=function(e){var n=Wc.message[e]||String(e);return this.statusCode=e,this.type("txt"),this.send(n)},ip.sendFile=function(e,n,t){var a=t,i=this.req,o=i.next,r=n||{};if(!e)throw new TypeError("path argument is required to res.sendFile");if("string"!=typeof e)throw new TypeError("path must be a string to res.sendFile");if("function"==typeof n&&(a=n,r={}),!r.root&&!Hc(e))throw new TypeError("path must be absolute or specify root to res.sendFile");var s=encodeURI(e);sp(this,Kc(i,s,r),r,(function(e){return a?a(e):e&&"EISDIR"===e.code?o():void(e&&"ECONNABORTED"!==e.code&&"write"!==e.syscall&&o(e))}))},ip.sendfile=function(e,n,t){var a=t,i=this.req,o=i.next,r=n||{};"function"==typeof n&&(a=n,r={}),sp(this,Kc(i,e,r),r,(function(e){return a?a(e):e&&"EISDIR"===e.code?o():void(e&&"ECONNABORTED"!==e.code&&"write"!==e.syscall&&o(e))}))},ip.sendfile=Lc.function(ip.sendfile,"res.sendfile: Use res.sendFile instead"),ip.download=function(e,n,t,a){var i=a,o=n,r=t||null;"function"==typeof n?(i=n,o=null,r=null):"function"==typeof t&&(i=t,r=null),"object"!=typeof n||"function"!=typeof t&&void 0!==t||(o=null,r=n);var s={"Content-Disposition":Bc(o||e)};if(r&&r.headers)for(var c=Object.keys(r.headers),p=0;p0&&n.accepts(a);return this.vary("Accept"),i?(this.set("Content-Type",Jc(i).value),e[i](n,this,t)):e.default?e.default(n,this,t):t(Nc(406,{types:Yc(a).map((function(e){return e.value}))})),this},ip.attachment=function(e){return e&&this.type(ep(e)),this.set("Content-Disposition",Bc(e)),this},ip.append=function(e,n){var t=this.get(e),a=n;return t&&(a=Array.isArray(t)?t.concat(n):Array.isArray(n)?[t].concat(n):[t,n]),this.set(e,a)},ip.set=ip.header=function(e,n){if(2===arguments.length){var t=Array.isArray(n)?n.map(String):String(n);if("content-type"===e.toLowerCase()){if(Array.isArray(t))throw new TypeError("Content-Type cannot be set to an Array");if(!rp.test(t)){var a=np.charsets.lookup(t.split(";")[0]);a&&(t+="; charset="+a.toLowerCase())}}this.setHeader(e,t)}else for(var i in e)this.set(i,e[i]);return this},ip.get=function(e){return this.getHeader(e)},ip.clearCookie=function(e,n){var t=Gc({expires:new Date(1),path:"/"},n);return this.cookie(e,"",t)},ip.cookie=function(e,n,t){var a=Gc({},t),i=this.req.secret,o=a.signed;if(o&&!i)throw new Error('cookieParser("secret") required for signed cookies');var r="object"==typeof n?"j:"+JSON.stringify(n):String(n);if(o&&(r="s:"+Zc(r,i)),null!=a.maxAge){var s=a.maxAge-0;isNaN(s)||(a.expires=new Date(Date.now()+s),a.maxAge=Math.floor(s/1e3))}return null==a.path&&(a.path="/"),this.append("Set-Cookie",Qc.serialize(e,String(r),a)),this},ip.location=function(e){var n=e;return"back"===e&&(n=this.req.get("Referrer")||"/"),this.set("Location",Mc(n))},ip.redirect=function(e){var n,t=e,a=302;2===arguments.length&&("number"==typeof arguments[0]?(a=arguments[0],t=arguments[1]):(Lc("res.redirect(url, status): Use res.redirect(status, url) instead"),a=arguments[1])),t=this.location(t).get("Location"),this.format({text:function(){n=Wc.message[a]+". Redirecting to "+t},html:function(){var e=Uc(t);n=""+Wc.message[a]+'. Redirecting to '+e+"
"},default:function(){n=""}}),this.statusCode=a,this.set("Content-Length",Dc.byteLength(n)),"HEAD"===this.req.method?this.end():this.end(n)},ip.vary=function(e){return!e||Array.isArray(e)&&!e.length?(Lc("res.vary(): Provide a field name"),this):(ap(this,e),this)},ip.render=function(e,n,t){var a=this.req.app,i=t,o=n||{},r=this.req,s=this;"function"==typeof n&&(i=n,o={}),o._locals=s.locals,i=i||function(e,n){if(e)return r.next(e);s.send(n)},a.render(e,o,i)};var pp,lp={exports:{}};
/*!
* serve-static
* Copyright(c) 2010 Sencha Inc.
* Copyright(c) 2011 TJ Holowaychuk
* Copyright(c) 2014-2016 Douglas Christopher Wilson
* MIT Licensed
*/function up(){if(pp)return lp.exports;pp=1;var e=Sa,n=Ta,a=Na,i=t.resolve,o=Qr,r=f;return lp.exports=function(t,s){if(!t)throw new TypeError("root path required");if("string"!=typeof t)throw new TypeError("root path must be a string");var c=Object.create(s||null),p=!1!==c.fallthrough,l=!1!==c.redirect,u=c.setHeaders;if(u&&"function"!=typeof u)throw new TypeError("option setHeaders must be function");c.maxage=c.maxage||c.maxAge||0,c.root=i(t);var d=l?function(t){if(this.hasTrailingSlash())this.error(404);else{var i=a.original(this.req);i.path=null,i.pathname=function(e){for(var n=0;n1?"/"+e.substr(n):e}(i.pathname+"/");var o,s,c=e(r.format(i)),p=(o="Redirecting",s='Redirecting to '+n(c)+" ",'\n\n\n \n'+o+" \n\n\n"+s+" \n\n\n");t.statusCode=301,t.setHeader("Content-Type","text/html; charset=UTF-8"),t.setHeader("Content-Length",Buffer.byteLength(p)),t.setHeader("Content-Security-Policy","default-src 'none'"),t.setHeader("X-Content-Type-Options","nosniff"),t.setHeader("Location",c),t.end(p)}}:function(){this.error(404)};return function(e,n,t){if("GET"!==e.method&&"HEAD"!==e.method)return p?t():(n.statusCode=405,n.setHeader("Allow","GET, HEAD"),n.setHeader("Content-Length","0"),void n.end());var i=!p,r=a.original(e),s=a(e).pathname;"/"===s&&"/"!==r.pathname.substr(-1)&&(s="");var l=o(e,s,c);l.on("directory",d),u&&l.on("headers",u),p&&l.on("file",(function(){i=!0})),l.on("error",(function(e){!i&&e.statusCode<500?t():t(e)})),l.pipe(n)}},lp.exports.mime=o.mime,lp.exports}
/*!
* express
* Copyright(c) 2009-2013 TJ Holowaychuk
* Copyright(c) 2013 Roman Shtylman
* Copyright(c) 2014-2015 Douglas Christopher Wilson
* MIT Licensed
*/!function(e,n){var t=pa,a=s.EventEmitter,i=la,o=ms,r=Ti,c=Qi,p=kc,l=op;(n=e.exports=function(){var e=function(n,t,a){e.handle(n,t,a)};return i(e,a.prototype,!1),i(e,o,!1),e.request=Object.create(p,{app:{configurable:!0,enumerable:!0,writable:!0,value:e}}),e.response=Object.create(l,{app:{configurable:!0,enumerable:!0,writable:!0,value:e}}),e.init(),e}).application=o,n.request=p,n.response=l,n.Route=r,n.Router=c,n.json=t.json,n.query=no(),n.raw=t.raw,n.static=up(),n.text=t.text,n.urlencoded=t.urlencoded;["bodyParser","compress","cookieSession","session","logger","cookieParser","favicon","responseTime","errorHandler","timeout","methodOverride","vhost","csrf","directory","limit","multipart","staticCache"].forEach((function(e){Object.defineProperty(n,e,{get:function(){throw new Error("Most middleware (like "+e+") is no longer bundled with Express and must be installed separately. Please see https://github.com/senchalabs/connect#middleware.")},configurable:!0})}))}(y,y.exports);var dp=b(y.exports),fp={exports:{}},mp={
/*!
* cookie
* Copyright(c) 2012-2014 Roman Shtylman
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/
parse:function(e,n){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var t={},a=n||{},i=e.split(";"),o=a.decode||vp,r=0;r0)return function(o){if((o=String(o)).length>100)return;var r=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(o);if(!r)return;var s=parseFloat(r[1]);switch((r[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return s*i;case"days":case"day":case"d":return s*a;case"hours":case"hour":case"hrs":case"hr":case"h":return s*t;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(r);if("number"===c&&!1===isNaN(r))return s.long?function(i){return o(i,a,"day")||o(i,t,"hour")||o(i,n,"minute")||o(i,e,"second")||i+" ms"}(r):function(i){if(i>=a)return Math.round(i/a)+"d";if(i>=t)return Math.round(i/t)+"h";if(i>=n)return Math.round(i/n)+"m";if(i>=e)return Math.round(i/e)+"s";return i+"ms"}(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))}}function Ap(){return wp||(wp=1,function(e,n){var t;function a(e){function a(){if(a.enabled){var e=a,i=+new Date,o=i-(t||i);e.diff=o,e.prev=t,e.curr=i,t=i;for(var r=new Array(arguments.length),s=0;s=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},n.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],n.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},n.enable(t())}(0,Ep.exports)),Ep.exports):jp.exports=(Cp||(Cp=1,function(e,n){var t=a,s=i;(n=_p.exports=Ap()).init=function(e){e.inspectOpts={};for(var t=Object.keys(n.inspectOpts),a=0;a1&&"string"==typeof arguments[1]?2:1,a=n>=t+1?arguments[t]:void 0;this.statusCode=e,Array.isArray(a)?function(e,n){for(var t=0;t0&&(t=a.isBuffer(t)?t:a.from(t,i),i=void 0,0!==t.length)?(r("split response"),s=z.call(n,t.slice(0,t.length-1)),t=t.slice(t.length-1,t.length),s):(s=z.call(n,t,i),c=!1,s)}return function(e){return e.sessionID&&C&&null==e.session}(e)?(r("destroying"),v.destroy(e.sessionID,(function(e){e&&g(o,e),r("destroyed"),p()})),l()):e.session?(x||(e.session.touch(),x=!0),B(e)?(e.session.save((function(e){e&&g(o,e),p()})),l()):_&&function(e){if("string"!=typeof e.sessionID)return r("session ignored because of bogus req.sessionID %o",e.sessionID),!1;return b===e.sessionID&&!B(e)}(e)?(r("touching"),v.touch(e.sessionID,e.session,(function(e){e&&g(o,e),r("touched"),p()})),l()):q.call(n,t,i)):(r("no session"),q.call(n,t,i))},!e.sessionID)return r("no SID sent, generating session"),P(),void o();r("fetching %s",e.sessionID),v.get(e.sessionID,(function(n,t){if(n&&"ENOENT"!==n.code)return r("error %j",n),void o(n);try{n||!t?(r("no session found"),P()):(r("session found"),function(e,n){v.createSession(e,n),f=e.sessionID,d=y(n),E||(m=d),R(e.session)}(e,t))}catch(e){return void o(e)}o()}))}else o(new Error("secret option required for sessions"))}function P(){v.generate(e),f=e.sessionID,d=y(e.session),R(e.session)}function R(n){var t=n.reload,a=n.save;Object.defineProperty(n,"reload",{configurable:!0,enumerable:!1,value:function(n){r("reloading %s",this.id),t.call(this,function(n,t){return function(){e.session!==n&&R(e.session),t.apply(this,arguments)}}(this,n))},writable:!0}),Object.defineProperty(n,"save",{configurable:!0,enumerable:!1,value:function(){r("saving %s",this.id),m=y(this),a.apply(this,arguments)},writable:!0})}function D(e){return f!==e.id||d!==y(e)}function B(e){return"string"!=typeof e.sessionID?(r("session ignored because of bogus req.sessionID %o",e.sessionID),!1):O||m||b===e.sessionID?(n=e.session,!(f===n.id&&m===y(n))):D(e.session);var n}}},t.Store=v,t.Cookie=d,t.Session=m,t.MemoryStore=f;var x="Warning: connect.session() MemoryStore is not\ndesigned for a production environment, as it will leak\nmemory, and will not scale past a single process.",g="function"==typeof setImmediate?setImmediate:function(e){process.nextTick(e.bind.apply(e,arguments))};function b(e){return u(24)}function y(e){var n=JSON.stringify(e,(function(n,t){if(this!==e||"cookie"!==n)return t}));return o.createHash("sha1").update(n,"utf8").digest("hex")}function w(e,n){if(e.connection&&e.connection.encrypted)return!0;if(!1===n)return!1;if(!0!==n)return!0===e.secure;var t=e.headers["x-forwarded-proto"]||"",a=t.indexOf(",");return"https"===(-1!==a?t.substr(0,a).toLowerCase().trim():t.toLowerCase().trim())}function k(e,n){for(var t=0;tclearTimeout(n)}}else{const e=n?0:200,t=setTimeout(this.onRender.bind(this),e);this.queued={high:!e,cancel:()=>clearTimeout(t)}}},this.plugin.register((()=>{e.MarkdownPreviewRenderer.prototype.queueRender=n}))}getOrCreateRootDomElement(){const e=document.querySelector("body .html-server-rendering-element");if(!e){const e=document.body.createEl("div");return e.addClass("html-server-rendering-element"),e}return e}async renderHtmlFromMarkdown(n){const t=new e.WorkspaceLeaf(this.app),a=this.rootElement.createDiv();t.containerEl=a;const i=new e.MarkdownView(t);t.view=i,i.currentMode=new e.MarkdownPreviewView(t.view),i.currentMode.type="preview";let o=0;const r=new Promise(((e,n)=>{i.currentMode.onRenderComplete=()=>{if(i.currentMode.renderer.queued)return;if(!o++){return i.currentMode.renderer.previewEl.querySelectorAll(".callout-icon svg").forEach((e=>{e.parentElement?.removeChild(e)})),i.currentMode.renderer.sections.forEach((e=>{const n=[];i.currentMode.renderer.owner.postProcess(e,n,i.currentMode.renderer.frontmatter),n.length&&(i.currentMode.renderer.asyncSections.push(e),Promise.all(n).then((function(){i.currentMode.renderer.asyncSections.remove(e),e.resetCompute(),i.currentMode.renderer.queueRender()})))})),void i.currentMode.renderer.onRender()}this.postProcess(i.currentMode.renderer.previewEl);const n=i.currentMode.renderer.previewEl.innerHTML;t.detach(),this.rootElement.removeChild(a),e(n)}}));return i.currentMode.renderer.set(n),r}postProcess(e){e.querySelectorAll("a.internal-link").forEach((e=>{e.target=""}));e.querySelectorAll("span.internal-embed.markdown-embed.inline-embed").forEach((e=>{e.parentElement&&e.parentElement.parentElement&&(e.parentElement.parentElement.style.position="relative")}));e.querySelectorAll(".internal-embed.media-embed.image-embed").forEach((e=>{const n=e.getAttribute("src")||"",t=e.querySelector("img");t&&(t.src=n)}))}}var ul={exports:{}},dl={exports:{}};function fl(){}fl.prototype.authenticate=function(e,n){throw new Error("Strategy#authenticate must be overridden by subclass")};var ml=fl;!function(e,n){var t=ml;(dl.exports=t).Strategy=t}();var vl=dl.exports,hl=function(e){var n,t,a=[];return e.on("data",n=function(e,n){a.push(["data",e,n])}),e.on("end",t=function(e,n){a.push(["end",e,n])}),{end:function(){e.removeListener("data",n),e.removeListener("end",t)},resume:function(){this.end();for(var n=0,t=a.length;n{if([Zl,Jl].includes(e))return e;const a=t.metadataCache.getFirstLinkpathDest(e.substring(1),n);return a?a.path:global.app.fileManager[e.substring(1)]},Xl=async(e,n,t,a,i=[])=>{if(e==Zl){return{contentType:"text/css",payload:Array.from(document.styleSheets).flatMap((e=>Array.from(e.cssRules).map((e=>e.cssText)))).join("\n")+"\n.markdown-preview-view, .markdown-embed-content {height: unset !important;}"}}if(e==Jl){return{contentType:"text/css",payload:Ql('\n\n\n \n \n #VAR{HTML_TITLE} \n \n \n\n\n \n