orator 3.0.7 → 3.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/orator.js CHANGED
@@ -3073,7 +3073,7 @@
3073
3073
  "assert": 1,
3074
3074
  "fast-deep-equal": 22,
3075
3075
  "fast-querystring": 23,
3076
- "safe-regex2": 38
3076
+ "safe-regex2": 43
3077
3077
  }],
3078
3078
  30: [function (require, module, exports) {
3079
3079
  'use strict';
@@ -3997,54 +3997,6 @@
3997
3997
  };
3998
3998
  }, {}],
3999
3999
  38: [function (require, module, exports) {
4000
- 'use strict';
4001
-
4002
- var parse = require('ret');
4003
- var types = parse.types;
4004
- module.exports = function (re, opts) {
4005
- if (!opts) opts = {};
4006
- var replimit = opts.limit === undefined ? 25 : opts.limit;
4007
- if (isRegExp(re)) re = re.source;else if (typeof re !== 'string') re = String(re);
4008
- try {
4009
- re = parse(re);
4010
- } catch (err) {
4011
- return false;
4012
- }
4013
- var reps = 0;
4014
- return function walk(node, starHeight) {
4015
- var i;
4016
- var ok;
4017
- var len;
4018
- if (node.type === types.REPETITION) {
4019
- starHeight++;
4020
- reps++;
4021
- if (starHeight > 1) return false;
4022
- if (reps > replimit) return false;
4023
- }
4024
- if (node.options) {
4025
- for (i = 0, len = node.options.length; i < len; i++) {
4026
- ok = walk({
4027
- stack: node.options[i]
4028
- }, starHeight);
4029
- if (!ok) return false;
4030
- }
4031
- }
4032
- var stack = node.stack || node.value && node.value.stack;
4033
- if (!stack) return true;
4034
- for (i = 0; i < stack.length; i++) {
4035
- ok = walk(stack[i], starHeight);
4036
- if (!ok) return false;
4037
- }
4038
- return true;
4039
- }(re, 0);
4040
- };
4041
- function isRegExp(x) {
4042
- return {}.toString.call(x) === '[object RegExp]';
4043
- }
4044
- }, {
4045
- "ret": 39
4046
- }],
4047
- 39: [function (require, module, exports) {
4048
4000
  const util = require('./util');
4049
4001
  const types = require('./types');
4050
4002
  const sets = require('./sets');
@@ -4302,12 +4254,12 @@
4302
4254
  };
4303
4255
  module.exports.types = types;
4304
4256
  }, {
4305
- "./positions": 40,
4306
- "./sets": 41,
4307
- "./types": 42,
4308
- "./util": 43
4257
+ "./positions": 39,
4258
+ "./sets": 40,
4259
+ "./types": 41,
4260
+ "./util": 42
4309
4261
  }],
4310
- 40: [function (require, module, exports) {
4262
+ 39: [function (require, module, exports) {
4311
4263
  const types = require('./types');
4312
4264
  exports.wordBoundary = () => ({
4313
4265
  type: types.POSITION,
@@ -4326,9 +4278,9 @@
4326
4278
  value: '$'
4327
4279
  });
4328
4280
  }, {
4329
- "./types": 42
4281
+ "./types": 41
4330
4282
  }],
4331
- 41: [function (require, module, exports) {
4283
+ 40: [function (require, module, exports) {
4332
4284
  const types = require('./types');
4333
4285
  const INTS = () => [{
4334
4286
  type: types.RANGE,
@@ -4451,9 +4403,9 @@
4451
4403
  not: true
4452
4404
  });
4453
4405
  }, {
4454
- "./types": 42
4406
+ "./types": 41
4455
4407
  }],
4456
- 42: [function (require, module, exports) {
4408
+ 41: [function (require, module, exports) {
4457
4409
  module.exports = {
4458
4410
  ROOT: 0,
4459
4411
  GROUP: 1,
@@ -4465,7 +4417,7 @@
4465
4417
  CHAR: 7
4466
4418
  };
4467
4419
  }, {}],
4468
- 43: [function (require, module, exports) {
4420
+ 42: [function (require, module, exports) {
4469
4421
  const types = require('./types');
4470
4422
  const sets = require('./sets');
4471
4423
  const CTRL = '@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?';
@@ -4558,8 +4510,56 @@
4558
4510
  throw new SyntaxError('Invalid regular expression: /' + regexp + '/: ' + msg);
4559
4511
  };
4560
4512
  }, {
4561
- "./sets": 41,
4562
- "./types": 42
4513
+ "./sets": 40,
4514
+ "./types": 41
4515
+ }],
4516
+ 43: [function (require, module, exports) {
4517
+ 'use strict';
4518
+
4519
+ var parse = require('ret');
4520
+ var types = parse.types;
4521
+ module.exports = function (re, opts) {
4522
+ if (!opts) opts = {};
4523
+ var replimit = opts.limit === undefined ? 25 : opts.limit;
4524
+ if (isRegExp(re)) re = re.source;else if (typeof re !== 'string') re = String(re);
4525
+ try {
4526
+ re = parse(re);
4527
+ } catch (err) {
4528
+ return false;
4529
+ }
4530
+ var reps = 0;
4531
+ return function walk(node, starHeight) {
4532
+ var i;
4533
+ var ok;
4534
+ var len;
4535
+ if (node.type === types.REPETITION) {
4536
+ starHeight++;
4537
+ reps++;
4538
+ if (starHeight > 1) return false;
4539
+ if (reps > replimit) return false;
4540
+ }
4541
+ if (node.options) {
4542
+ for (i = 0, len = node.options.length; i < len; i++) {
4543
+ ok = walk({
4544
+ stack: node.options[i]
4545
+ }, starHeight);
4546
+ if (!ok) return false;
4547
+ }
4548
+ }
4549
+ var stack = node.stack || node.value && node.value.stack;
4550
+ if (!stack) return true;
4551
+ for (i = 0; i < stack.length; i++) {
4552
+ ok = walk(stack[i], starHeight);
4553
+ if (!ok) return false;
4554
+ }
4555
+ return true;
4556
+ }(re, 0);
4557
+ };
4558
+ function isRegExp(x) {
4559
+ return {}.toString.call(x) === '[object RegExp]';
4560
+ }
4561
+ }, {
4562
+ "ret": 38
4563
4563
  }],
4564
4564
  44: [function (require, module, exports) {
4565
4565
  (function (setImmediate, clearImmediate) {
@@ -4,13 +4,13 @@
4
4
  *
5
5
  * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
6
6
  * @license MIT
7
- */function i(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,s=Math.min(r,n);i<s;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0}function s(t){return r.Buffer&&"function"==typeof r.Buffer.isBuffer?r.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var o=t("util/"),a=Object.prototype.hasOwnProperty,u=Array.prototype.slice,c="foo"===function(){}.name;function l(t){return Object.prototype.toString.call(t)}function f(t){return!s(t)&&("function"==typeof r.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var h=e.exports=m,p=/\s*function\s+([^\(\s]*)\s*/;function d(t){if(o.isFunction(t)){if(c)return t.name;var e=t.toString().match(p);return e&&e[1]}}function g(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function y(t){if(c||!o.isFunction(t))return o.inspect(t);var e=d(t);return"[Function"+(e?": "+e:"")+"]"}function v(t,e,r,n,i){throw new h.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function m(t,e){t||v(t,!0,e,"==",h.ok)}function b(t,e,r,n){if(t===e)return!0;if(s(t)&&s(e))return 0===i(t,e);if(o.isDate(t)&&o.isDate(e))return t.getTime()===e.getTime();if(o.isRegExp(t)&&o.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(f(t)&&f(e)&&l(t)===l(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===i(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(s(t)!==s(e))return!1;var a=(n=n||{actual:[],expected:[]}).actual.indexOf(t);return-1!==a&&a===n.expected.indexOf(e)||(n.actual.push(t),n.expected.push(e),function(t,e,r,n){if(null==t||null==e)return!1;if(o.isPrimitive(t)||o.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=S(t),s=S(e);if(i&&!s||!i&&s)return!1;if(i)return b(t=u.call(t),e=u.call(e),r);var a,c,l=x(t),f=x(e);if(l.length!==f.length)return!1;for(l.sort(),f.sort(),c=l.length-1;c>=0;c--)if(l[c]!==f[c])return!1;for(c=l.length-1;c>=0;c--)if(!b(t[a=l[c]],e[a],r,n))return!1;return!0}(t,e,r,n))}return r?t===e:t==e}function S(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function w(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function C(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&v(i,r,"Missing expected exception"+n);var s="string"==typeof n,a=!t&&i&&!r;if((!t&&o.isError(i)&&s&&w(i,r)||a)&&v(i,r,"Got unwanted exception"+n),t&&i&&r&&!w(i,r)||!t&&i)throw i}h.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return g(y(t.actual),128)+" "+t.operator+" "+g(y(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||v;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=d(e),s=n.indexOf("\n"+i);if(s>=0){var o=n.indexOf("\n",s+1);n=n.substring(o+1)}this.stack=n}}},o.inherits(h.AssertionError,Error),h.fail=v,h.ok=m,h.equal=function(t,e,r){t!=e&&v(t,e,r,"==",h.equal)},h.notEqual=function(t,e,r){t==e&&v(t,e,r,"!=",h.notEqual)},h.deepEqual=function(t,e,r){b(t,e,!1)||v(t,e,r,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(t,e,r){b(t,e,!0)||v(t,e,r,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(t,e,r){b(t,e,!1)&&v(t,e,r,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function t(e,r,n){b(e,r,!0)&&v(e,r,n,"notDeepStrictEqual",t)},h.strictEqual=function(t,e,r){t!==e&&v(t,e,r,"===",h.strictEqual)},h.notStrictEqual=function(t,e,r){t===e&&v(t,e,r,"!==",h.notStrictEqual)},h.throws=function(t,e,r){C(!0,t,e,r)},h.doesNotThrow=function(t,e,r){C(!1,t,e,r)},h.ifError=function(t){if(t)throw t},h.strict=n((function t(e,r){e||v(e,!0,r,"==",t)}),h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var x=Object.keys||function(t){var e=[];for(var r in t)a.call(t,r)&&e.push(r);return e}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"object-assign":36,"util/":4}],2:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],3:[function(t,e,r){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],4:[function(t,e,r){(function(e,n){(function(){var i=/%[sdj%]/g;r.format=function(t){if(!v(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(a(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,s=n.length,o=String(t).replace(i,(function(t){if("%%"===t)return"%";if(r>=s)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),u=n[r];r<s;u=n[++r])g(u)||!S(u)?o+=" "+u:o+=" "+a(u);return o},r.deprecate=function(t,i){if(m(n.process))return function(){return r.deprecate(t,i).apply(this,arguments)};if(!0===e.noDeprecation)return t;var s=!1;return function(){if(!s){if(e.throwDeprecation)throw new Error(i);e.traceDeprecation?console.trace(i):console.error(i),s=!0}return t.apply(this,arguments)}};var s,o={};function a(t,e){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(e)?n.showHidden=e:e&&r._extend(n,e),m(n.showHidden)&&(n.showHidden=!1),m(n.depth)&&(n.depth=2),m(n.colors)&&(n.colors=!1),m(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),l(n,t,n.depth)}function u(t,e){var r=a.styles[e];return r?"["+a.colors[r][0]+"m"+t+"["+a.colors[r][1]+"m":t}function c(t,e){return t}function l(t,e,n){if(t.customInspect&&e&&x(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(n,t);return v(i)||(i=l(t,i,n)),i}var s=function(t,e){if(m(e))return t.stylize("undefined","undefined");if(v(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(y(e))return t.stylize(""+e,"number");if(d(e))return t.stylize(""+e,"boolean");if(g(e))return t.stylize("null","null")}(t,e);if(s)return s;var o=Object.keys(e),a=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),C(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return f(e);if(0===o.length){if(x(e)){var u=e.name?": "+e.name:"";return t.stylize("[Function"+u+"]","special")}if(b(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(w(e))return t.stylize(Date.prototype.toString.call(e),"date");if(C(e))return f(e)}var c,S="",O=!1,P=["{","}"];(p(e)&&(O=!0,P=["[","]"]),x(e))&&(S=" [Function"+(e.name?": "+e.name:"")+"]");return b(e)&&(S=" "+RegExp.prototype.toString.call(e)),w(e)&&(S=" "+Date.prototype.toUTCString.call(e)),C(e)&&(S=" "+f(e)),0!==o.length||O&&0!=e.length?n<0?b(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),c=O?function(t,e,r,n,i){for(var s=[],o=0,a=e.length;o<a;++o)j(e,String(o))?s.push(h(t,e,r,n,String(o),!0)):s.push("");return i.forEach((function(i){i.match(/^\d+$/)||s.push(h(t,e,r,n,i,!0))})),s}(t,e,n,a,o):o.map((function(r){return h(t,e,n,a,r,O)})),t.seen.pop(),function(t,e,r){var n=t.reduce((function(t,e){return e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(n>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(c,S,P)):P[0]+S+P[1]}function f(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i,s){var o,a,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),j(n,i)||(o="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=g(r)?l(t,u.value,null):l(t,u.value,r-1)).indexOf("\n")>-1&&(a=s?a.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+a.split("\n").map((function(t){return" "+t})).join("\n")):a=t.stylize("[Circular]","special")),m(o)){if(s&&i.match(/^\d+$/))return a;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+a}function p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function g(t){return null===t}function y(t){return"number"==typeof t}function v(t){return"string"==typeof t}function m(t){return void 0===t}function b(t){return S(t)&&"[object RegExp]"===O(t)}function S(t){return"object"==typeof t&&null!==t}function w(t){return S(t)&&"[object Date]"===O(t)}function C(t){return S(t)&&("[object Error]"===O(t)||t instanceof Error)}function x(t){return"function"==typeof t}function O(t){return Object.prototype.toString.call(t)}function P(t){return t<10?"0"+t.toString(10):t.toString(10)}r.debuglog=function(t){if(m(s)&&(s=e.env.NODE_DEBUG||""),t=t.toUpperCase(),!o[t])if(new RegExp("\\b"+t+"\\b","i").test(s)){var n=e.pid;o[t]=function(){var e=r.format.apply(r,arguments);console.error("%s %d: %s",t,n,e)}}else o[t]=function(){};return o[t]},r.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=p,r.isBoolean=d,r.isNull=g,r.isNullOrUndefined=function(t){return null==t},r.isNumber=y,r.isString=v,r.isSymbol=function(t){return"symbol"==typeof t},r.isUndefined=m,r.isRegExp=b,r.isObject=S,r.isDate=w,r.isError=C,r.isFunction=x,r.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},r.isBuffer=t("./support/isBuffer");var E=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function j(t,e){return Object.prototype.hasOwnProperty.call(t,e)}r.log=function(){var t,e;console.log("%s - %s",(t=new Date,e=[P(t.getHours()),P(t.getMinutes()),P(t.getSeconds())].join(":"),[t.getDate(),E[t.getMonth()],e].join(" ")),r.format.apply(r,arguments))},r.inherits=t("inherits"),r._extend=function(t,e){if(!e||!S(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(this)}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":3,_process:37,inherits:2}],5:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t){if((0,s.isAsync)(t))return function(...e){const r=e.pop();return a(t.apply(this,e),r)};return(0,n.default)((function(e,r){var n;try{n=t.apply(this,e)}catch(t){return r(t)}if(n&&"function"==typeof n.then)return a(n,r);r(null,n)}))};var n=o(t("./internal/initialParams.js")),i=o(t("./internal/setImmediate.js")),s=t("./internal/wrapAsync.js");function o(t){return t&&t.__esModule?t:{default:t}}function a(t,e){return t.then((t=>{u(e,null,t)}),(t=>{u(e,t&&t.message?t:new Error(t))}))}function u(t,e,r){try{t(e,r)}catch(t){(0,i.default)((t=>{throw t}),t)}}e.exports=r.default},{"./internal/initialParams.js":13,"./internal/setImmediate.js":18,"./internal/wrapAsync.js":19}],6:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=o(t("./internal/eachOfLimit.js")),i=o(t("./internal/wrapAsync.js")),s=o(t("./internal/awaitify.js"));function o(t){return t&&t.__esModule?t:{default:t}}r.default=(0,s.default)((function(t,e,r,s){return(0,n.default)(e)(t,(0,i.default)(r),s)}),4),e.exports=r.default},{"./internal/awaitify.js":9,"./internal/eachOfLimit.js":11,"./internal/wrapAsync.js":19}],7:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=s(t("./eachOfLimit.js")),i=s(t("./internal/awaitify.js"));function s(t){return t&&t.__esModule?t:{default:t}}r.default=(0,i.default)((function(t,e,r){return(0,n.default)(t,1,e,r)}),3),e.exports=r.default},{"./eachOfLimit.js":6,"./internal/awaitify.js":9}],8:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t,e,r,n){let i=!1,o=!1,a=!1,u=0,c=0;function l(){u>=e||a||i||(a=!0,t.next().then((({value:t,done:e})=>{if(!o&&!i){if(a=!1,e)return i=!0,void(u<=0&&n(null));u++,r(t,c,f),c++,l()}})).catch(h))}function f(t,e){if(u-=1,!o)return t?h(t):!1===t?(i=!0,void(o=!0)):e===s.default||i&&u<=0?(i=!0,n(null)):void l()}function h(t){o||(a=!1,i=!0,n(t))}l()};var n,i=t("./breakLoop.js"),s=(n=i)&&n.__esModule?n:{default:n};e.exports=r.default},{"./breakLoop.js":10}],9:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t,e=t.length){if(!e)throw new Error("arity is undefined");return function(...r){return"function"==typeof r[e-1]?t.apply(this,r):new Promise(((n,i)=>{r[e-1]=(t,...e)=>{if(t)return i(t);n(e.length>1?e:e[0])},t.apply(this,r)}))}},e.exports=r.default},{}],10:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.default={},e.exports=r.default},{}],11:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=c(t("./once.js")),i=c(t("./iterator.js")),s=c(t("./onlyOnce.js")),o=t("./wrapAsync.js"),a=c(t("./asyncEachOfLimit.js")),u=c(t("./breakLoop.js"));function c(t){return t&&t.__esModule?t:{default:t}}r.default=t=>(e,r,c)=>{if(c=(0,n.default)(c),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return c(null);if((0,o.isAsyncGenerator)(e))return(0,a.default)(e,t,r,c);if((0,o.isAsyncIterable)(e))return(0,a.default)(e[Symbol.asyncIterator](),t,r,c);var l=(0,i.default)(e),f=!1,h=!1,p=0,d=!1;function g(t,e){if(!h)if(p-=1,t)f=!0,c(t);else if(!1===t)f=!0,h=!0;else{if(e===u.default||f&&p<=0)return f=!0,c(null);d||y()}}function y(){for(d=!0;p<t&&!f;){var e=l();if(null===e)return f=!0,void(p<=0&&c(null));p+=1,r(e.value,e.key,(0,s.default)(g))}d=!1}y()},e.exports=r.default},{"./asyncEachOfLimit.js":8,"./breakLoop.js":10,"./iterator.js":15,"./once.js":16,"./onlyOnce.js":17,"./wrapAsync.js":19}],12:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()},e.exports=r.default},{}],13:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t){return function(...e){var r=e.pop();return t.call(this,e,r)}},e.exports=r.default},{}],14:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t){return t&&"number"==typeof t.length&&t.length>=0&&t.length%1==0},e.exports=r.default},{}],15:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t){if((0,n.default)(t))return function(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}(t);var e=(0,i.default)(t);return e?function(t){var e=-1;return function(){var r=t.next();return r.done?null:(e++,{value:r.value,key:e})}}(e):(r=t,s=r?Object.keys(r):[],o=-1,a=s.length,function t(){var e=s[++o];return"__proto__"===e?t():o<a?{value:r[e],key:e}:null});var r,s,o,a};var n=s(t("./isArrayLike.js")),i=s(t("./getIterator.js"));function s(t){return t&&t.__esModule?t:{default:t}}e.exports=r.default},{"./getIterator.js":12,"./isArrayLike.js":14}],16:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t){function e(...e){if(null!==t){var r=t;t=null,r.apply(this,e)}}return Object.assign(e,t),e},e.exports=r.default},{}],17:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t){return function(...e){if(null===t)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e)}},e.exports=r.default},{}],18:[function(t,e,r){(function(t,e){(function(){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.fallback=a,r.wrap=u;var n,i=r.hasQueueMicrotask="function"==typeof queueMicrotask&&queueMicrotask,s=r.hasSetImmediate="function"==typeof e&&e,o=r.hasNextTick="object"==typeof t&&"function"==typeof t.nextTick;function a(t){setTimeout(t,0)}function u(t){return(e,...r)=>t((()=>e(...r)))}n=i?queueMicrotask:s?e:o?t.nextTick:a,r.default=u(n)}).call(this)}).call(this,t("_process"),t("timers").setImmediate)},{_process:37,timers:44}],19:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isAsyncIterable=r.isAsyncGenerator=r.isAsync=void 0;var n,i=t("../asyncify.js"),s=(n=i)&&n.__esModule?n:{default:n};function o(t){return"AsyncFunction"===t[Symbol.toStringTag]}r.default=function(t){if("function"!=typeof t)throw new Error("expected a function");return o(t)?(0,s.default)(t):t},r.isAsync=o,r.isAsyncGenerator=function(t){return"AsyncGenerator"===t[Symbol.toStringTag]},r.isAsyncIterable=function(t){return"function"==typeof t[Symbol.asyncIterator]}},{"../asyncify.js":5}],20:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=a(t("./internal/once.js")),i=a(t("./internal/onlyOnce.js")),s=a(t("./internal/wrapAsync.js")),o=a(t("./internal/awaitify.js"));function a(t){return t&&t.__esModule?t:{default:t}}r.default=(0,o.default)((function(t,e){if(e=(0,n.default)(e),!Array.isArray(t))return e(new Error("First argument to waterfall must be an array of functions"));if(!t.length)return e();var r=0;function o(e){(0,s.default)(t[r++])(...e,(0,i.default)(a))}function a(n,...i){if(!1!==n)return n||r===t.length?e(n,...i):void o(i)}o([])})),e.exports=r.default},{"./internal/awaitify.js":9,"./internal/once.js":16,"./internal/onlyOnce.js":17,"./internal/wrapAsync.js":19}],21:[function(t,e,r){"use strict";var n=12,i=0,s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,7,7,7,7,7,7,7,7,7,7,7,7,8,7,7,10,9,9,9,11,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,24,36,48,60,72,84,96,0,12,12,12,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,24,24,24,0,0,0,0,0,0,0,0,0,24,24,0,0,0,0,0,0,0,0,0,0,48,48,48,0,0,0,0,0,0,0,0,0,0,48,48,0,0,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,127,63,63,63,0,31,15,15,15,7,7,7];var o={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};function a(t,e){var r=o[t];return void 0===r?255:r<<e}e.exports=function(t){var e=t.indexOf("%");if(-1===e)return t;for(var r=t.length,o="",u=0,c=0,l=e,f=n;e>-1&&e<r;){var h=a(t[e+1],4)|a(t[e+2],0),p=s[h];if(f=s[256+f+p],c=c<<6|h&s[364+p],f!==n){if(f===i)return null;if((e+=3)<r&&37===t.charCodeAt(e))continue;return null}o+=t.slice(u,l),o+=c<=65535?String.fromCharCode(c):String.fromCharCode(55232+(c>>10),56320+(1023&c)),c=0,u=e+3,e=l=t.indexOf("%",u)}return o+t.slice(u)}},{}],22:[function(t,e,r){"use strict";e.exports=function t(e,r){if(e===r)return!0;if(e&&r&&"object"==typeof e&&"object"==typeof r){if(e.constructor!==r.constructor)return!1;var n,i,s;if(Array.isArray(e)){if((n=e.length)!=r.length)return!1;for(i=n;0!=i--;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if((n=(s=Object.keys(e)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,s[i]))return!1;for(i=n;0!=i--;){var o=s[i];if(!t(e[o],r[o]))return!1}return!0}return e!=e&&r!=r}},{}],23:[function(t,e,r){"use strict";const n=t("./parse"),i=t("./stringify"),s={parse:n,stringify:i};e.exports=s,e.exports.default=s,e.exports.parse=n,e.exports.stringify=i},{"./parse":25,"./stringify":26}],24:[function(t,e,r){const n=Array.from({length:256},((t,e)=>"%"+((e<16?"0":"")+e.toString(16)).toUpperCase())),i=new Int8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0]);e.exports={encodeString:function(t){const e=t.length;if(0===e)return"";let r="",s=0,o=0;t:for(;o<e;o++){let a=t.charCodeAt(o);for(;a<128;){if(1!==i[a]&&(s<o&&(r+=t.slice(s,o)),s=o+1,r+=n[a]),++o===e)break t;a=t.charCodeAt(o)}if(s<o&&(r+=t.slice(s,o)),a<2048){s=o+1,r+=n[192|a>>6]+n[128|63&a];continue}if(a<55296||a>=57344){s=o+1,r+=n[224|a>>12]+n[128|a>>6&63]+n[128|63&a];continue}if(++o,o>=e)throw new Error("URI malformed");s=o+1,a=65536+((1023&a)<<10|1023&t.charCodeAt(o)),r+=n[240|a>>18]+n[128|a>>12&63]+n[128|a>>6&63]+n[128|63&a]}return 0===s?t:s<e?r+t.slice(s):r}}},{}],25:[function(t,e,r){"use strict";const n=t("fast-decode-uri-component"),i=/\+/g,s=function(){};s.prototype=Object.create(null),e.exports=function(t){const e=new s;if("string"!=typeof t)return e;let r=t.length,o="",a="",u=-1,c=-1,l=!1,f=!1,h=!1,p=!1,d=!1,g=0;for(let s=0;s<r+1;s++)if(g=s!==r?t.charCodeAt(s):38,38===g){if(d=c>u,d||(c=s),o=t.slice(u+1,c),d||o.length>0){h&&(o=o.replace(i," ")),l&&(o=n(o)||o),d&&(a=t.slice(c+1,s),p&&(a=a.replace(i," ")),f&&(a=n(a)||a));const r=e[o];void 0===r?e[o]=a:r.pop?r.push(a):e[o]=[r,a]}a="",u=s,c=s,l=!1,f=!1,h=!1,p=!1}else 61===g?c<=u?c=s:f=!0:43===g?c>u?p=!0:h=!0:37===g&&(c>u?f=!0:l=!0);return e}},{"fast-decode-uri-component":21}],26:[function(t,e,r){"use strict";const{encodeString:n}=t("./internals/querystring");function i(t){const e=typeof t;return"string"===e?n(t):"bigint"===e?t.toString():"boolean"===e?t?"true":"false":"number"===e&&Number.isFinite(t)?t<1e21?""+t:n(""+t):""}e.exports=function(t){let e="";if(null===t||"object"!=typeof t)return e;const r=Object.keys(t),s=r.length;let o=0;for(let a=0;a<s;a++){const s=r[a],u=t[s],c=n(s)+"=";if(a&&(e+="&"),Array.isArray(u)){o=u.length;for(let t=0;t<o;t++)t&&(e+="&"),e+=c,e+=i(u[t])}else e+=c,e+=i(u)}return e}},{"./internals/querystring":24}],27:[function(t,e,r){"use strict";const n=t("./handler_storage"),i={STATIC:0,PARAMETRIC:1,WILDCARD:2};class s{constructor(){this.handlerStorage=new n}}class o extends s{constructor(){super(),this.staticChildren={}}findStaticMatchingChild(t,e){const r=this.staticChildren[t.charAt(e)];return void 0!==r&&r.matchPrefix(t,e)?r:null}createStaticChild(t){if(0===t.length)return this;let e=this.staticChildren[t.charAt(0)];if(e){let r=1;for(;r<e.prefix.length;r++)if(t.charCodeAt(r)!==e.prefix.charCodeAt(r)){e=e.split(this,r);break}return e.createStaticChild(t.slice(r))}const r=t.charAt(0);return this.staticChildren[r]=new a(t),this.staticChildren[r]}}class a extends o{constructor(t){super(),this.prefix=t,this.wildcardChild=null,this.parametricChildren=[],this.kind=i.STATIC,this._compilePrefixMatch()}createParametricChild(t,e){const r=t&&t.source;let n=this.parametricChildren.find((t=>(t.regex&&t.regex.source)===r));return n||(n=new u(t,e),this.parametricChildren.push(n),this.parametricChildren.sort(((t,e)=>t.isRegex?e.isRegex?null===t.staticSuffix?1:null===e.staticSuffix?-1:e.staticSuffix.endsWith(t.staticSuffix)?1:t.staticSuffix.endsWith(e.staticSuffix)?-1:0:-1:1)),n)}createWildcardChild(){return this.wildcardChild||(this.wildcardChild=new c),this.wildcardChild}split(t,e){const r=this.prefix.slice(0,e),n=this.prefix.slice(e);this.prefix=n,this._compilePrefixMatch();const i=new a(r);return i.staticChildren[n.charAt(0)]=this,t.staticChildren[r.charAt(0)]=i,i}getNextNode(t,e,r,n){let i=this.findStaticMatchingChild(t,e),s=0;if(null===i){if(0===this.parametricChildren.length)return this.wildcardChild;i=this.parametricChildren[0],s=1}null!==this.wildcardChild&&r.push({paramsCount:n,brotherPathIndex:e,brotherNode:this.wildcardChild});for(let t=this.parametricChildren.length-1;t>=s;t--)r.push({paramsCount:n,brotherPathIndex:e,brotherNode:this.parametricChildren[t]});return i}_compilePrefixMatch(){if(1===this.prefix.length)return void(this.matchPrefix=()=>!0);const t=[];for(let e=1;e<this.prefix.length;e++){const r=this.prefix.charCodeAt(e);t.push(`path.charCodeAt(i + ${e}) === ${r}`)}this.matchPrefix=new Function("path","i",`return ${t.join(" && ")}`)}}class u extends o{constructor(t,e){super(),this.isRegex=!!t,this.regex=t||null,this.staticSuffix=e||null,this.kind=i.PARAMETRIC}getNextNode(t,e){return this.findStaticMatchingChild(t,e)}}class c extends s{constructor(){super(),this.kind=i.WILDCARD}getNextNode(){return null}}e.exports={StaticNode:a,ParametricNode:u,WildcardNode:c,NODE_TYPES:i}},{"./handler_storage":28}],28:[function(t,e,r){"use strict";e.exports=class{constructor(){this.unconstrainedHandler=null,this.constraints=[],this.handlers=[],this.constrainedHandlerStores=null}getMatchingHandler(t){return void 0===t?this.unconstrainedHandler:this._getHandlerMatchingConstraints(t)}addHandler(t,e,r,n,i){const s={handler:t,params:e,constraints:i,store:r||null,_createParamsObject:this._compileCreateParamsObject(e)};0===Object.keys(i).length&&(this.unconstrainedHandler=s);for(const t of Object.keys(i))this.constraints.includes(t)||("version"===t?this.constraints.unshift(t):this.constraints.push(t));if(this.handlers.length>=32)throw new Error("find-my-way supports a maximum of 32 route handlers per node when there are constraints, limit reached");this.handlers.push(s),this.handlers.sort(((t,e)=>Object.keys(t.constraints).length-Object.keys(e.constraints).length)),this._compileGetHandlerMatchingConstraints(n,i)}_compileCreateParamsObject(t){const e=[];for(let r=0;r<t.length;r++)e.push(`'${t[r]}': paramsArray[${r}]`);return new Function("paramsArray",`return {${e.join(",")}}`)}_getHandlerMatchingConstraints(){return null}_buildConstraintStore(t,e){for(let r=0;r<this.handlers.length;r++){const n=this.handlers[r].constraints[e];if(void 0!==n){let e=t.get(n)||0;e|=1<<r,t.set(n,e)}}}_constrainedIndexBitmask(t){let e=0;for(let r=0;r<this.handlers.length;r++){void 0!==this.handlers[r].constraints[t]&&(e|=1<<r)}return~e}_compileGetHandlerMatchingConstraints(t){this.constrainedHandlerStores={};for(const e of this.constraints){const r=t.newStoreForConstraint(e);this.constrainedHandlerStores[e]=r,this._buildConstraintStore(r,e)}const e=[];e.push(`\n let candidates = ${(1<<this.handlers.length)-1}\n let mask, matches\n `);for(const r of this.constraints){e.push(`\n mask = ${this._constrainedIndexBitmask(r)}\n value = derivedConstraints.${r}\n `);const n=t.strategies[r].mustMatchWhenDerived?"matches":"(matches | mask)";e.push(`\n if (value === undefined) {\n candidates &= mask\n } else {\n matches = this.constrainedHandlerStores.${r}.get(value) || 0\n candidates &= ${n}\n }\n if (candidates === 0) return null;\n `)}for(const r in t.strategies){t.strategies[r].mustMatchWhenDerived&&!this.constraints.includes(r)&&e.push(`if (derivedConstraints.${r} !== undefined) return null`)}e.push("return this.handlers[Math.floor(Math.log2(candidates))]"),this._getHandlerMatchingConstraints=new Function("derivedConstraints",e.join("\n"))}}},{}],29:[function(t,e,r){"use strict";const n=t("assert"),i=t("fast-querystring"),s=t("safe-regex2"),o=t("fast-deep-equal"),{flattenNode:a,compressFlattenedNode:u,prettyPrintFlattenedNode:c,prettyPrintRoutesArray:l}=t("./lib/pretty-print"),{StaticNode:f,NODE_TYPES:h}=t("./custom_node"),p=t("./lib/constrainer"),d=t("./lib/http-methods"),{safeDecodeURI:g,safeDecodeURIComponent:y}=t("./lib/url-sanitizer"),v=/^https?:\/\/.*?\//,m=/(\/:[^/()]*?)\?(\/?)/;if(!s(v))throw new Error("the FULL_PATH_REGEXP is not safe, update this module");if(!s(m))throw new Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");function b(t){if(!(this instanceof b))return new b(t);(t=t||{}).defaultRoute?(n("function"==typeof t.defaultRoute,"The default route must be a function"),this.defaultRoute=t.defaultRoute):this.defaultRoute=null,t.onBadUrl?(n("function"==typeof t.onBadUrl,"The bad url handler must be a function"),this.onBadUrl=t.onBadUrl):this.onBadUrl=null,t.buildPrettyMeta?(n("function"==typeof t.buildPrettyMeta,"buildPrettyMeta must be a function"),this.buildPrettyMeta=t.buildPrettyMeta):this.buildPrettyMeta=P,t.querystringParser?(n("function"==typeof t.querystringParser,"querystringParser must be a function"),this.querystringParser=t.querystringParser):this.querystringParser=t=>""===t?{}:i.parse(t),this.caseSensitive=void 0===t.caseSensitive||t.caseSensitive,this.ignoreTrailingSlash=t.ignoreTrailingSlash||!1,this.ignoreDuplicateSlashes=t.ignoreDuplicateSlashes||!1,this.maxParamLength=t.maxParamLength||100,this.allowUnsafeRegex=t.allowUnsafeRegex||!1,this.routes=[],this.trees={},this.constrainer=new p(t.constraints),this._routesPatterns={}}for(var S in b.prototype.on=function(t,e,r,i,s){"function"==typeof r&&(void 0!==i&&(s=i),i=r,r={}),n("string"==typeof e,"Path should be a string"),n(e.length>0,"The path could not be empty"),n("/"===e[0]||"*"===e[0],"The first character of a path should be `/` or `*`"),n("function"==typeof i,"Handler should be a function");const o=e.match(m);if(o){n(e.length===o.index+o[0].length,"Optional Parameter needs to be the last parameter of the path");const a=e.replace(m,"$1$2"),u=e.replace(m,"$2");return this.on(t,a,r,i,s),void this.on(t,u,r,i,s)}const a=e;this.ignoreDuplicateSlashes&&(e=w(e)),this.ignoreTrailingSlash&&(e=C(e));const u=Array.isArray(t)?t:[t];for(const t of u)this._on(t,e,r,i,s,a),this.routes.push({method:t,path:e,opts:r,handler:i,store:s})},b.prototype._on=function(t,e,r,i,a){n("string"==typeof t,"Method should be a string"),n(d.includes(t),`Method '${t}' is not an http method.`);let u={};if(void 0!==r.constraints&&(n("object"==typeof r.constraints&&null!==r.constraints,"Constraints should be an object"),0!==Object.keys(r.constraints).length&&(u=r.constraints)),this.constrainer.validateConstraints(u),this.constrainer.noteUsage(u),void 0===this.trees[t]&&(this.trees[t]=new f("/"),this._routesPatterns[t]=[]),"*"===e&&0!==this.trees[t].prefix.length){const e=this.trees[t];this.trees[t]=new f(""),this.trees[t].staticChildren["/"]=e}let c=this.trees[t],l=c.prefix.length;const h=[];for(let t=0;t<=e.length;t++){if(58===e.charCodeAt(t)&&58===e.charCodeAt(t+1)){t++;continue}const r=58===e.charCodeAt(t)&&58!==e.charCodeAt(t+1),i=42===e.charCodeAt(t);if(r||i||t===e.length&&t!==l){let r=e.slice(l,t);this.caseSensitive||(r=r.toLowerCase()),r=r.split("::").join(":"),r=r.split("%").join("%25"),c=c.createStaticChild(r)}if(r){let r=!1;const i=[];let o=t+1;for(let a=o;;a++){const u=e.charCodeAt(a),f=40===u,p=45===u||46===u,d=47===u||a===e.length;if(f||p||d){const u=e.slice(o,a);if(h.push(u),r=r||f||p,f){const t=O(e,a),r=e.slice(a,t+1);this.allowUnsafeRegex||n(s(new RegExp(r)),`The regex '${r}' is not safe!`),i.push(x(r)),a=t+1}else i.push("(.*?)");const g=a;for(;a<e.length;a++){const t=e.charCodeAt(a);if(47===t)break;if(58===t){if(58!==e.charCodeAt(a+1))break;a++}}let y=e.slice(g,a);if(y&&(y=y.split("::").join(":"),y=y.split("%").join("%25"),i.push(y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))),o=a+1,d||47===e.charCodeAt(a)||a===e.length){const n=r?"()"+y:y;e=e.slice(0,t+1)+n+e.slice(a),t+=n.length;const s=r?new RegExp("^"+i.join("")+"$"):null;c=c.createParametricChild(s,y||null),l=t+1;break}}}}else if(i&&(h.push("*"),c=c.createWildcardChild(),l=t+1,t!==e.length-1))throw new Error("Wildcard must be the last character in the route")}this.caseSensitive||(e=e.toLowerCase()),"*"===e&&(e="/*");for(const r of this._routesPatterns[t])if(r.path===e&&o(r.constraints,u))throw new Error(`Method '${t}' already declared for route '${e}' with constraints '${JSON.stringify(u)}'`);this._routesPatterns[t].push({path:e,params:h,constraints:u}),c.handlerStorage.addHandler(i,h,a,this.constrainer,u)},b.prototype.hasConstraintStrategy=function(t){return this.constrainer.hasConstraintStrategy(t)},b.prototype.addConstraintStrategy=function(t){this.constrainer.addConstraintStrategy(t),this._rebuild(this.routes)},b.prototype.reset=function(){this.trees={},this.routes=[],this._routesPatterns={}},b.prototype.off=function(t,e,r){n("string"==typeof e,"Path should be a string"),n(e.length>0,"The path could not be empty"),n("/"===e[0]||"*"===e[0],"The first character of a path should be `/` or `*`"),n(void 0===r||"object"==typeof r&&!Array.isArray(r)&&null!==r,"Constraints should be an object or undefined.");const i=e.match(m);if(i){n(e.length===i.index+i[0].length,"Optional Parameter needs to be the last parameter of the path");const s=e.replace(m,"$1$2"),o=e.replace(m,"$2");return this.off(t,s,r),void this.off(t,o,r)}this.ignoreDuplicateSlashes&&(e=w(e)),this.ignoreTrailingSlash&&(e=C(e));const s=Array.isArray(t)?t:[t];for(const t of s)this._off(t,e,r)},b.prototype._off=function(t,e,r){function i(r){return t!==r.method||e!==r.path}n("string"==typeof t,"Method should be a string"),n(d.includes(t),`Method '${t}' is not an http method.`);const s=r?function(t){return i(t)||!o(r,t.opts.constraints||{})}:i,a=this.routes.filter(s);this._rebuild(a)},b.prototype.lookup=function(t,e,r,n){if("function"==typeof r&&(n=r,r=void 0),void 0===n){const n=this.constrainer.deriveConstraints(t,r),i=this.find(t.method,t.url,n);return this.callHandler(i,t,e,r)}this.constrainer.deriveConstraints(t,r,((i,s)=>{if(null===i)try{const i=this.find(t.method,t.url,s),o=this.callHandler(i,t,e,r);n(null,o)}catch(i){n(i)}else n(i)}))},b.prototype.callHandler=function(t,e,r,n){return null===t?this._defaultRoute(e,r,n):void 0===n?t.handler(e,r,t.params,t.store,t.searchParams):t.handler.call(n,e,r,t.params,t.store,t.searchParams)},b.prototype.find=function(t,e,r){let n,i,s,o=this.trees[t];if(void 0===o)return null;47!==e.charCodeAt(0)&&(e=e.replace(v,"/")),this.ignoreDuplicateSlashes&&(e=w(e));try{n=g(e),e=n.path,i=n.querystring,s=n.shouldDecodeParam}catch(t){return this._onBadUrl(e)}this.ignoreTrailingSlash&&(e=C(e));const a=e;!1===this.caseSensitive&&(e=e.toLowerCase());const u=this.maxParamLength;let c=o.prefix.length;const l=[],f=e.length,p=[];for(;;){if(c===f){const t=o.handlerStorage.getMatchingHandler(r);if(null!==t)return{handler:t.handler,store:t.store,params:t._createParamsObject(l),searchParams:this.querystringParser(i)}}let t=o.getNextNode(e,c,p,l.length);if(null===t){if(0===p.length)return null;const e=p.pop();c=e.brotherPathIndex,l.splice(e.paramsCount),t=e.brotherNode}if(o=t,o.kind!==h.STATIC)if(o.kind!==h.WILDCARD){if(o.kind===h.PARAMETRIC){let t=a.indexOf("/",c);-1===t&&(t=f);let e=a.slice(c,t);if(s&&(e=y(e)),o.isRegex){const t=o.regex.exec(e);if(null===t)continue;for(let e=1;e<t.length;e++){const r=t[e];if(r.length>u)return null;l.push(r)}}else{if(e.length>u)return null;l.push(e)}c=t}}else{let t=a.slice(c);s&&(t=y(t)),l.push(t),c=f}else c+=o.prefix.length}},b.prototype._rebuild=function(t){this.reset();for(const e of t){const{method:t,path:r,opts:n,handler:i,store:s}=e;this._on(t,r,n,i,s),this.routes.push({method:t,path:r,opts:n,handler:i,store:s})}},b.prototype._defaultRoute=function(t,e,r){if(null!==this.defaultRoute)return void 0===r?this.defaultRoute(t,e):this.defaultRoute.call(r,t,e);e.statusCode=404,e.end()},b.prototype._onBadUrl=function(t){if(null===this.onBadUrl)return null;const e=this.onBadUrl;return{handler:(r,n,i)=>e(t,r,n),params:{},store:null}},b.prototype.prettyPrint=function(t={}){if(t.commonPrefix=void 0===t.commonPrefix||t.commonPrefix,!t.commonPrefix)return l.call(this,this.routes,t);const e={prefix:"/",nodes:[],children:{}};for(const t in this.trees){const r=this.trees[t];r&&a(e,r,t)}return u(e),c.call(this,e,"",!0,t)},d){if(!d.hasOwnProperty(S))continue;const t=d[S],e=t.toLowerCase();if(b.prototype[e])throw new Error("Method already exists: "+e);b.prototype[e]=function(e,r,n){return this.on(t,e,r,n)}}function w(t){return t.replace(/\/\/+/g,"/")}function C(t){return t.length>1&&47===t.charCodeAt(t.length-1)?t.slice(0,-1):t}function x(t){return 94===t.charCodeAt(1)&&(t=t.slice(0,1)+t.slice(2)),36===t.charCodeAt(t.length-2)&&(t=t.slice(0,t.length-2)+t.slice(t.length-1)),t}function O(t,e){for(var r=1;e<t.length;)if("\\"!==t[++e]){if(")"===t[e]?r--:"("===t[e]&&r++,!r)return e}else e++;throw new TypeError('Invalid regexp expression in "'+t+'"')}function P(t){return t&&t.store?Object.assign({},t.store):{}}b.prototype.all=function(t,e,r){this.on(d,t,e,r)},e.exports=b},{"./custom_node":27,"./lib/constrainer":30,"./lib/http-methods":31,"./lib/pretty-print":32,"./lib/url-sanitizer":35,assert:1,"fast-deep-equal":22,"fast-querystring":23,"safe-regex2":38}],30:[function(t,e,r){"use strict";const n=t("./strategies/accept-version"),i=t("./strategies/accept-host"),s=t("assert");e.exports=class{constructor(t){if(this.strategies={version:n,host:i},this.strategiesInUse=new Set,this.asyncStrategiesInUse=new Set,t)for(const e of Object.values(t))this.addConstraintStrategy(e)}isStrategyUsed(t){return this.strategiesInUse.has(t)||this.asyncStrategiesInUse.has(t)}hasConstraintStrategy(t){const e=this.strategies[t];return void 0!==e&&(e.isCustom||this.isStrategyUsed(t))}addConstraintStrategy(t){if(s("string"==typeof t.name&&""!==t.name,"strategy.name is required."),s(t.storage&&"function"==typeof t.storage,"strategy.storage function is required."),s(t.deriveConstraint&&"function"==typeof t.deriveConstraint,"strategy.deriveConstraint function is required."),this.strategies[t.name]&&this.strategies[t.name].isCustom)throw new Error(`There already exists a custom constraint with the name ${t.name}.`);if(this.isStrategyUsed(t.name))throw new Error(`There already exists a route with ${t.name} constraint.`);t.isCustom=!0,t.isAsync=3===t.deriveConstraint.length,this.strategies[t.name]=t,t.mustMatchWhenDerived&&this.noteUsage({[t.name]:t})}deriveConstraints(t,e,r){const n=this.deriveSyncConstraints(t,e);if(void 0===r)return n;this.deriveAsyncConstraints(n,t,e,r)}deriveSyncConstraints(t,e){}noteUsage(t){if(t){const e=this.strategiesInUse.size;for(const e in t){this.strategies[e].isAsync?this.asyncStrategiesInUse.add(e):this.strategiesInUse.add(e)}e!==this.strategiesInUse.size&&this._buildDeriveConstraints()}}newStoreForConstraint(t){if(!this.strategies[t])throw new Error(`No strategy registered for constraint key ${t}`);return this.strategies[t].storage()}validateConstraints(t){for(const e in t){const r=t[e];if(void 0===r)throw new Error("Can't pass an undefined constraint value, must pass null or no key at all");const n=this.strategies[e];if(!n)throw new Error(`No strategy registered for constraint key ${e}`);n.validate&&n.validate(r)}}deriveAsyncConstraints(t,e,r,n){let i=this.asyncStrategiesInUse.size;if(0!==i){t=t||{};for(const s of this.asyncStrategiesInUse){this.strategies[s].deriveConstraint(e,r,((e,r)=>{null===e?(t[s]=r,0==--i&&n(null,t)):n(e)}))}}else n(null,t)}_buildDeriveConstraints(){if(0===this.strategiesInUse.size)return;const t=["return {"];for(const e of this.strategiesInUse){const r=this.strategies[e];if(r.isCustom)t.push(` ${r.name}: this.strategies.${e}.deriveConstraint(req, ctx),`);else if("version"===e)t.push(" version: req.headers['accept-version'],");else{if("host"!==e)throw new Error("unknown non-custom strategy for compiling constraint derivation function");t.push(" host: req.headers.host || req.headers[':authority'],")}}t.push("}"),this.deriveSyncConstraints=new Function("req","ctx",t.join("\n")).bind(this)}}},{"./strategies/accept-host":33,"./strategies/accept-version":34,assert:1}],31:[function(t,e,r){"use strict";e.exports=["ACL","BIND","CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LINK","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCALENDAR","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REBIND","REPORT","SEARCH","SOURCE","SUBSCRIBE","TRACE","UNBIND","UNLINK","UNLOCK","UNSUBSCRIBE"]},{}],32:[function(t,e,r){"use strict";const n=" ",i="│ ",s="├── ",o="└── ",a="*",u="/",c=/(?=\/)/;function l(t){return Array.isArray(t)?t.map((t=>l(t))):"symbol"==typeof t?t.toString():"function"==typeof t?function(t){let e=t.name||"";return e=e.replace("bound","").trim(),e=(e||"anonymous")+"()",e}(t):t}function f(t,e){const r={},n=this.buildPrettyMeta(t);return Array.isArray(e)||(e=n?Reflect.ownKeys(n):[]),e.forEach((t=>{const e="symbol"==typeof t?t.toString():t;n&&n[t]&&(r[e]=l(n[t]))})),r}function h(t,e,r,a,u){let c="";if(a||u||(c+="\n"),a||(c+=`${e||""}${r?o:s}`),c+=`${t.path}`,t.handlers){const s=t.handlers.reduce(((t,e)=>{const r=t.findIndex((t=>JSON.stringify(t.opts)===JSON.stringify(e.opts)));return-1!==r?t[r].method=[t[r].method,e.method].join(", "):t.push(e),t}),[]);s.forEach(((o,u)=>{u>0&&(c+=`${a?"":e||""}${r?n:i}${t.path}`),c+=` (${o.method||"-"})`,o.opts&&"{}"!==JSON.stringify(o.opts)&&(c+=` ${JSON.stringify(o.opts)}`),o.meta&&Reflect.ownKeys(o.meta).forEach(((t,s)=>{c+=`\n${a?"":e||""}${r?n:i}`,c+=`• (${t}) ${JSON.stringify(o.meta[t])}`})),s.length>1&&u!==s.length-1&&(c+="\n")}))}else t.children.length>1&&(c+=" (-)");return a||(e=`${e||""}${r?n:i}`),t.children.forEach(((r,n)=>{const i=n===t.children.length-1,s=!t.handlers&&1===t.children.length;c+=h(r,e,i,s)})),c}e.exports={flattenNode:function t(e,r,n){if(0!==r.handlerStorage.handlers.length&&e.nodes.push({method:n,node:r}),r.parametricChildren&&r.parametricChildren[0]&&(e.children[":"]||(e.children[":"]={prefix:":",nodes:[],children:{}}),t(e.children[":"],r.parametricChildren[0],n)),r.wildcardChild&&(e.children["*"]||(e.children["*"]={prefix:"*",nodes:[],children:{}}),t(e.children["*"],r.wildcardChild,n)),r.staticChildren)for(const i of Object.values(r.staticChildren)){const r=i.prefix.split(c);let s,o=e;for(const t of r)s=o,o=o.children[t],o||(o={prefix:t,nodes:[],children:{}},s.children[t]=o);t(o,i,n)}},compressFlattenedNode:function t(e){const r=Object.keys(e.children);if(0===e.nodes.length&&1===r.length){const n=e.children[r[0]];if(n.nodes.length<=1)return t(n),e.nodes=n.nodes,e.prefix+=n.prefix,e.children=n.children,e}for(const r of Object.keys(e.children))t(e.children[r]);return e},prettyPrintFlattenedNode:function t(e,r,a,u){if(!this.buildPrettyMeta)throw new Error("buildPrettyMeta not defined");u.includeMeta=u.includeMeta||null;let c="";const l=[];for(const{node:t,method:r}of e.nodes)for(const e of t.handlerStorage.handlers)l.push({method:r,...e});l.length?l.forEach(((t,s)=>{let o=`(${t.method||"-"})`;Object.keys(t.constraints).length>0&&(o+=" "+JSON.stringify(t.constraints));let l="";const h=e.prefix.split("").map(((t,e)=>":"===t?e:null)).filter((t=>null!==t));if(h.length){let r=0;h.forEach(((n,i)=>{l+=e.prefix.slice(r,n+1),l+=t.params[t.params.length-h.length+i],i===h.length-1&&(l+=e.prefix.slice(n+1)),r=n+1}))}else l=e.prefix;if(c+=0===s?`${l} ${o}`:`\n${r}${a?n:i}${l} ${o}`,u.includeMeta){const e=f.call(this,t,u.includeMeta);Object.keys(e).forEach(((t,s)=>{c+=`\n${r||""}${a?n:i}`,c+=`• (${t}) ${JSON.stringify(e[t])}`}))}})):c=e.prefix;let h=`${r}${a?o:s}${c}\n`;r=`${r}${a?n:i}`;const p=Object.keys(e.children);for(let n=0;n<p.length;n++){const i=e.children[p[n]];h+=t.call(this,i,r,n===p.length-1,u)}return h},prettyPrintRoutesArray:function(t,e={}){if(!this.buildPrettyMeta)throw new Error("buildPrettyMeta not defined");e.includeMeta=e.includeMeta||null;const r=[];let n="";t.sort(((t,e)=>t.path&&e.path?t.path.localeCompare(e.path):0));for(let n=0;n<t.length;n++){const i=t[n],s=r.find((t=>i.path===t.path));if(s){s.handlers.push({method:i.method,opts:i.opts.constraints||void 0,meta:e.includeMeta?f.call(this,i,e.includeMeta):null});continue}const o={method:i.method,opts:i.opts.constraints||void 0,meta:e.includeMeta?f.call(this,i,e.includeMeta):null};r.push({path:i.path,methods:[i.method],opts:[i.opts],handlers:[o]})}if(!r.filter((t=>t.path===u)).length){const t={path:u,truncatedPath:"",methods:[],opts:[],handlers:[{}]};r.filter((t=>t.path===a)).length?r.splice(1,0,t):r.unshift(t)}const i=function(t){const e=[],r={result:e};return t.forEach(((t,e)=>{let n=t.path.split(c);n[0]!==u&&n[0]!==a&&(n=[u,n[0].slice(1),...n.slice(1)]),n.reduce(((e,r,i)=>{if(!e[r]){e[r]={result:[]};const s={path:r,children:e[r].result};i===n.length-1&&(s.handlers=t.handlers),e.result.push(s)}return e[r]}),r)})),e}(r);return i.forEach(((t,e)=>{n+=h(t,null,e===i.length-1,!1,!0),n+="\n"})),n}}},{}],33:[function(t,e,r){"use strict";const n=t("assert");e.exports={name:"host",mustMatchWhenDerived:!1,storage:function(){const t={},e=[];return{get:r=>{const n=t[r];if(n)return n;for(const t of e)if(t.host.test(r))return t.value},set:(r,n)=>{r instanceof RegExp?e.push({host:r,value:n}):t[r]=n}}},validate(t){n("string"==typeof t||"[object RegExp]"===Object.prototype.toString.call(t),"Host should be a string or a RegExp")}}},{assert:1}],34:[function(t,e,r){"use strict";const n=t("assert");function i(){if(!(this instanceof i))return new i;this.store={},this.maxMajor=0,this.maxMinors={},this.maxPatches={}}i.prototype.set=function(t,e){if("string"!=typeof t)throw new TypeError("Version should be a string");let[r,n,i]=t.split(".");return r=Number(r)||0,n=Number(n)||0,i=Number(i)||0,r>=this.maxMajor&&(this.maxMajor=r,this.store.x=e,this.store["*"]=e,this.store["x.x"]=e,this.store["x.x.x"]=e),n>=(this.maxMinors[r]||0)&&(this.maxMinors[r]=n,this.store[`${r}.x`]=e,this.store[`${r}.x.x`]=e),i>=(this.store[`${r}.${n}`]||0)&&(this.maxPatches[`${r}.${n}`]=i,this.store[`${r}.${n}.x`]=e),this.store[`${r}.${n}.${i}`]=e,this},i.prototype.get=function(t){return this.store[t]},e.exports={name:"version",mustMatchWhenDerived:!0,storage:i,validate(t){n("string"==typeof t,"Version should be a string")}}},{assert:1}],35:[function(t,e,r){"use strict";function n(t,e){return 50===t?53===e?"%":51===e?"#":52===e?"$":54===e?"&":66===e||98===e?"+":67===e||99===e?",":70===e||102===e?"/":null:51===t?65===e||97===e?":":66===e||98===e?";":68===e||100===e?"=":70===e||102===e?"?":null:52===t&&48===e?"@":null}e.exports={safeDecodeURI:function(t){let e=!1,r=!1,i="";for(let s=1;s<t.length;s++){const o=t.charCodeAt(s);if(37===o){const i=t.charCodeAt(s+1),o=t.charCodeAt(s+2);null===n(i,o)?e=!0:(r=!0,50===i&&53===o&&(e=!0,t=t.slice(0,s+1)+"25"+t.slice(s+1),s+=2),s+=2)}else if(63===o||59===o||35===o){i=t.slice(s+1),t=t.slice(0,s);break}}return{path:e?decodeURI(t):t,querystring:i,shouldDecodeParam:r}},safeDecodeURIComponent:function(t){const e=t.indexOf("%");if(-1===e)return t;let r="",i=e;for(let s=e;s<t.length;s++)if(37===t.charCodeAt(s)){const e=n(t.charCodeAt(s+1),t.charCodeAt(s+2));r+=t.slice(i,s)+e,i=s+3}return t.slice(0,e)+r+t.slice(i)}}},{}],36:[function(t,e,r){
7
+ */function i(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,s=Math.min(r,n);i<s;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0}function s(t){return r.Buffer&&"function"==typeof r.Buffer.isBuffer?r.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var o=t("util/"),a=Object.prototype.hasOwnProperty,u=Array.prototype.slice,c="foo"===function(){}.name;function l(t){return Object.prototype.toString.call(t)}function f(t){return!s(t)&&("function"==typeof r.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var h=e.exports=m,p=/\s*function\s+([^\(\s]*)\s*/;function d(t){if(o.isFunction(t)){if(c)return t.name;var e=t.toString().match(p);return e&&e[1]}}function g(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function y(t){if(c||!o.isFunction(t))return o.inspect(t);var e=d(t);return"[Function"+(e?": "+e:"")+"]"}function v(t,e,r,n,i){throw new h.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function m(t,e){t||v(t,!0,e,"==",h.ok)}function b(t,e,r,n){if(t===e)return!0;if(s(t)&&s(e))return 0===i(t,e);if(o.isDate(t)&&o.isDate(e))return t.getTime()===e.getTime();if(o.isRegExp(t)&&o.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(f(t)&&f(e)&&l(t)===l(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===i(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(s(t)!==s(e))return!1;var a=(n=n||{actual:[],expected:[]}).actual.indexOf(t);return-1!==a&&a===n.expected.indexOf(e)||(n.actual.push(t),n.expected.push(e),function(t,e,r,n){if(null==t||null==e)return!1;if(o.isPrimitive(t)||o.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=S(t),s=S(e);if(i&&!s||!i&&s)return!1;if(i)return b(t=u.call(t),e=u.call(e),r);var a,c,l=x(t),f=x(e);if(l.length!==f.length)return!1;for(l.sort(),f.sort(),c=l.length-1;c>=0;c--)if(l[c]!==f[c])return!1;for(c=l.length-1;c>=0;c--)if(!b(t[a=l[c]],e[a],r,n))return!1;return!0}(t,e,r,n))}return r?t===e:t==e}function S(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function w(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function C(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&v(i,r,"Missing expected exception"+n);var s="string"==typeof n,a=!t&&i&&!r;if((!t&&o.isError(i)&&s&&w(i,r)||a)&&v(i,r,"Got unwanted exception"+n),t&&i&&r&&!w(i,r)||!t&&i)throw i}h.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return g(y(t.actual),128)+" "+t.operator+" "+g(y(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||v;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=d(e),s=n.indexOf("\n"+i);if(s>=0){var o=n.indexOf("\n",s+1);n=n.substring(o+1)}this.stack=n}}},o.inherits(h.AssertionError,Error),h.fail=v,h.ok=m,h.equal=function(t,e,r){t!=e&&v(t,e,r,"==",h.equal)},h.notEqual=function(t,e,r){t==e&&v(t,e,r,"!=",h.notEqual)},h.deepEqual=function(t,e,r){b(t,e,!1)||v(t,e,r,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(t,e,r){b(t,e,!0)||v(t,e,r,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(t,e,r){b(t,e,!1)&&v(t,e,r,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function t(e,r,n){b(e,r,!0)&&v(e,r,n,"notDeepStrictEqual",t)},h.strictEqual=function(t,e,r){t!==e&&v(t,e,r,"===",h.strictEqual)},h.notStrictEqual=function(t,e,r){t===e&&v(t,e,r,"!==",h.notStrictEqual)},h.throws=function(t,e,r){C(!0,t,e,r)},h.doesNotThrow=function(t,e,r){C(!1,t,e,r)},h.ifError=function(t){if(t)throw t},h.strict=n((function t(e,r){e||v(e,!0,r,"==",t)}),h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var x=Object.keys||function(t){var e=[];for(var r in t)a.call(t,r)&&e.push(r);return e}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"object-assign":36,"util/":4}],2:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],3:[function(t,e,r){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],4:[function(t,e,r){(function(e,n){(function(){var i=/%[sdj%]/g;r.format=function(t){if(!v(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(a(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,s=n.length,o=String(t).replace(i,(function(t){if("%%"===t)return"%";if(r>=s)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),u=n[r];r<s;u=n[++r])g(u)||!S(u)?o+=" "+u:o+=" "+a(u);return o},r.deprecate=function(t,i){if(m(n.process))return function(){return r.deprecate(t,i).apply(this,arguments)};if(!0===e.noDeprecation)return t;var s=!1;return function(){if(!s){if(e.throwDeprecation)throw new Error(i);e.traceDeprecation?console.trace(i):console.error(i),s=!0}return t.apply(this,arguments)}};var s,o={};function a(t,e){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(e)?n.showHidden=e:e&&r._extend(n,e),m(n.showHidden)&&(n.showHidden=!1),m(n.depth)&&(n.depth=2),m(n.colors)&&(n.colors=!1),m(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),l(n,t,n.depth)}function u(t,e){var r=a.styles[e];return r?"["+a.colors[r][0]+"m"+t+"["+a.colors[r][1]+"m":t}function c(t,e){return t}function l(t,e,n){if(t.customInspect&&e&&x(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(n,t);return v(i)||(i=l(t,i,n)),i}var s=function(t,e){if(m(e))return t.stylize("undefined","undefined");if(v(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(y(e))return t.stylize(""+e,"number");if(d(e))return t.stylize(""+e,"boolean");if(g(e))return t.stylize("null","null")}(t,e);if(s)return s;var o=Object.keys(e),a=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),C(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return f(e);if(0===o.length){if(x(e)){var u=e.name?": "+e.name:"";return t.stylize("[Function"+u+"]","special")}if(b(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(w(e))return t.stylize(Date.prototype.toString.call(e),"date");if(C(e))return f(e)}var c,S="",O=!1,P=["{","}"];(p(e)&&(O=!0,P=["[","]"]),x(e))&&(S=" [Function"+(e.name?": "+e.name:"")+"]");return b(e)&&(S=" "+RegExp.prototype.toString.call(e)),w(e)&&(S=" "+Date.prototype.toUTCString.call(e)),C(e)&&(S=" "+f(e)),0!==o.length||O&&0!=e.length?n<0?b(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),c=O?function(t,e,r,n,i){for(var s=[],o=0,a=e.length;o<a;++o)j(e,String(o))?s.push(h(t,e,r,n,String(o),!0)):s.push("");return i.forEach((function(i){i.match(/^\d+$/)||s.push(h(t,e,r,n,i,!0))})),s}(t,e,n,a,o):o.map((function(r){return h(t,e,n,a,r,O)})),t.seen.pop(),function(t,e,r){var n=t.reduce((function(t,e){return e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(n>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(c,S,P)):P[0]+S+P[1]}function f(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i,s){var o,a,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),j(n,i)||(o="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=g(r)?l(t,u.value,null):l(t,u.value,r-1)).indexOf("\n")>-1&&(a=s?a.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+a.split("\n").map((function(t){return" "+t})).join("\n")):a=t.stylize("[Circular]","special")),m(o)){if(s&&i.match(/^\d+$/))return a;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+a}function p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function g(t){return null===t}function y(t){return"number"==typeof t}function v(t){return"string"==typeof t}function m(t){return void 0===t}function b(t){return S(t)&&"[object RegExp]"===O(t)}function S(t){return"object"==typeof t&&null!==t}function w(t){return S(t)&&"[object Date]"===O(t)}function C(t){return S(t)&&("[object Error]"===O(t)||t instanceof Error)}function x(t){return"function"==typeof t}function O(t){return Object.prototype.toString.call(t)}function P(t){return t<10?"0"+t.toString(10):t.toString(10)}r.debuglog=function(t){if(m(s)&&(s=e.env.NODE_DEBUG||""),t=t.toUpperCase(),!o[t])if(new RegExp("\\b"+t+"\\b","i").test(s)){var n=e.pid;o[t]=function(){var e=r.format.apply(r,arguments);console.error("%s %d: %s",t,n,e)}}else o[t]=function(){};return o[t]},r.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=p,r.isBoolean=d,r.isNull=g,r.isNullOrUndefined=function(t){return null==t},r.isNumber=y,r.isString=v,r.isSymbol=function(t){return"symbol"==typeof t},r.isUndefined=m,r.isRegExp=b,r.isObject=S,r.isDate=w,r.isError=C,r.isFunction=x,r.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},r.isBuffer=t("./support/isBuffer");var E=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function j(t,e){return Object.prototype.hasOwnProperty.call(t,e)}r.log=function(){var t,e;console.log("%s - %s",(t=new Date,e=[P(t.getHours()),P(t.getMinutes()),P(t.getSeconds())].join(":"),[t.getDate(),E[t.getMonth()],e].join(" ")),r.format.apply(r,arguments))},r.inherits=t("inherits"),r._extend=function(t,e){if(!e||!S(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(this)}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":3,_process:37,inherits:2}],5:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t){if((0,s.isAsync)(t))return function(...e){const r=e.pop();return a(t.apply(this,e),r)};return(0,n.default)((function(e,r){var n;try{n=t.apply(this,e)}catch(t){return r(t)}if(n&&"function"==typeof n.then)return a(n,r);r(null,n)}))};var n=o(t("./internal/initialParams.js")),i=o(t("./internal/setImmediate.js")),s=t("./internal/wrapAsync.js");function o(t){return t&&t.__esModule?t:{default:t}}function a(t,e){return t.then((t=>{u(e,null,t)}),(t=>{u(e,t&&t.message?t:new Error(t))}))}function u(t,e,r){try{t(e,r)}catch(t){(0,i.default)((t=>{throw t}),t)}}e.exports=r.default},{"./internal/initialParams.js":13,"./internal/setImmediate.js":18,"./internal/wrapAsync.js":19}],6:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=o(t("./internal/eachOfLimit.js")),i=o(t("./internal/wrapAsync.js")),s=o(t("./internal/awaitify.js"));function o(t){return t&&t.__esModule?t:{default:t}}r.default=(0,s.default)((function(t,e,r,s){return(0,n.default)(e)(t,(0,i.default)(r),s)}),4),e.exports=r.default},{"./internal/awaitify.js":9,"./internal/eachOfLimit.js":11,"./internal/wrapAsync.js":19}],7:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=s(t("./eachOfLimit.js")),i=s(t("./internal/awaitify.js"));function s(t){return t&&t.__esModule?t:{default:t}}r.default=(0,i.default)((function(t,e,r){return(0,n.default)(t,1,e,r)}),3),e.exports=r.default},{"./eachOfLimit.js":6,"./internal/awaitify.js":9}],8:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t,e,r,n){let i=!1,o=!1,a=!1,u=0,c=0;function l(){u>=e||a||i||(a=!0,t.next().then((({value:t,done:e})=>{if(!o&&!i){if(a=!1,e)return i=!0,void(u<=0&&n(null));u++,r(t,c,f),c++,l()}})).catch(h))}function f(t,e){if(u-=1,!o)return t?h(t):!1===t?(i=!0,void(o=!0)):e===s.default||i&&u<=0?(i=!0,n(null)):void l()}function h(t){o||(a=!1,i=!0,n(t))}l()};var n,i=t("./breakLoop.js"),s=(n=i)&&n.__esModule?n:{default:n};e.exports=r.default},{"./breakLoop.js":10}],9:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t,e=t.length){if(!e)throw new Error("arity is undefined");return function(...r){return"function"==typeof r[e-1]?t.apply(this,r):new Promise(((n,i)=>{r[e-1]=(t,...e)=>{if(t)return i(t);n(e.length>1?e:e[0])},t.apply(this,r)}))}},e.exports=r.default},{}],10:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.default={},e.exports=r.default},{}],11:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=c(t("./once.js")),i=c(t("./iterator.js")),s=c(t("./onlyOnce.js")),o=t("./wrapAsync.js"),a=c(t("./asyncEachOfLimit.js")),u=c(t("./breakLoop.js"));function c(t){return t&&t.__esModule?t:{default:t}}r.default=t=>(e,r,c)=>{if(c=(0,n.default)(c),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return c(null);if((0,o.isAsyncGenerator)(e))return(0,a.default)(e,t,r,c);if((0,o.isAsyncIterable)(e))return(0,a.default)(e[Symbol.asyncIterator](),t,r,c);var l=(0,i.default)(e),f=!1,h=!1,p=0,d=!1;function g(t,e){if(!h)if(p-=1,t)f=!0,c(t);else if(!1===t)f=!0,h=!0;else{if(e===u.default||f&&p<=0)return f=!0,c(null);d||y()}}function y(){for(d=!0;p<t&&!f;){var e=l();if(null===e)return f=!0,void(p<=0&&c(null));p+=1,r(e.value,e.key,(0,s.default)(g))}d=!1}y()},e.exports=r.default},{"./asyncEachOfLimit.js":8,"./breakLoop.js":10,"./iterator.js":15,"./once.js":16,"./onlyOnce.js":17,"./wrapAsync.js":19}],12:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()},e.exports=r.default},{}],13:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t){return function(...e){var r=e.pop();return t.call(this,e,r)}},e.exports=r.default},{}],14:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t){return t&&"number"==typeof t.length&&t.length>=0&&t.length%1==0},e.exports=r.default},{}],15:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t){if((0,n.default)(t))return function(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}(t);var e=(0,i.default)(t);return e?function(t){var e=-1;return function(){var r=t.next();return r.done?null:(e++,{value:r.value,key:e})}}(e):(r=t,s=r?Object.keys(r):[],o=-1,a=s.length,function t(){var e=s[++o];return"__proto__"===e?t():o<a?{value:r[e],key:e}:null});var r,s,o,a};var n=s(t("./isArrayLike.js")),i=s(t("./getIterator.js"));function s(t){return t&&t.__esModule?t:{default:t}}e.exports=r.default},{"./getIterator.js":12,"./isArrayLike.js":14}],16:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t){function e(...e){if(null!==t){var r=t;t=null,r.apply(this,e)}}return Object.assign(e,t),e},e.exports=r.default},{}],17:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t){return function(...e){if(null===t)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e)}},e.exports=r.default},{}],18:[function(t,e,r){(function(t,e){(function(){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.fallback=a,r.wrap=u;var n,i=r.hasQueueMicrotask="function"==typeof queueMicrotask&&queueMicrotask,s=r.hasSetImmediate="function"==typeof e&&e,o=r.hasNextTick="object"==typeof t&&"function"==typeof t.nextTick;function a(t){setTimeout(t,0)}function u(t){return(e,...r)=>t((()=>e(...r)))}n=i?queueMicrotask:s?e:o?t.nextTick:a,r.default=u(n)}).call(this)}).call(this,t("_process"),t("timers").setImmediate)},{_process:37,timers:44}],19:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isAsyncIterable=r.isAsyncGenerator=r.isAsync=void 0;var n,i=t("../asyncify.js"),s=(n=i)&&n.__esModule?n:{default:n};function o(t){return"AsyncFunction"===t[Symbol.toStringTag]}r.default=function(t){if("function"!=typeof t)throw new Error("expected a function");return o(t)?(0,s.default)(t):t},r.isAsync=o,r.isAsyncGenerator=function(t){return"AsyncGenerator"===t[Symbol.toStringTag]},r.isAsyncIterable=function(t){return"function"==typeof t[Symbol.asyncIterator]}},{"../asyncify.js":5}],20:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=a(t("./internal/once.js")),i=a(t("./internal/onlyOnce.js")),s=a(t("./internal/wrapAsync.js")),o=a(t("./internal/awaitify.js"));function a(t){return t&&t.__esModule?t:{default:t}}r.default=(0,o.default)((function(t,e){if(e=(0,n.default)(e),!Array.isArray(t))return e(new Error("First argument to waterfall must be an array of functions"));if(!t.length)return e();var r=0;function o(e){(0,s.default)(t[r++])(...e,(0,i.default)(a))}function a(n,...i){if(!1!==n)return n||r===t.length?e(n,...i):void o(i)}o([])})),e.exports=r.default},{"./internal/awaitify.js":9,"./internal/once.js":16,"./internal/onlyOnce.js":17,"./internal/wrapAsync.js":19}],21:[function(t,e,r){"use strict";var n=12,i=0,s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,7,7,7,7,7,7,7,7,7,7,7,7,8,7,7,10,9,9,9,11,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,24,36,48,60,72,84,96,0,12,12,12,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,24,24,24,0,0,0,0,0,0,0,0,0,24,24,0,0,0,0,0,0,0,0,0,0,48,48,48,0,0,0,0,0,0,0,0,0,0,48,48,0,0,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,127,63,63,63,0,31,15,15,15,7,7,7];var o={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};function a(t,e){var r=o[t];return void 0===r?255:r<<e}e.exports=function(t){var e=t.indexOf("%");if(-1===e)return t;for(var r=t.length,o="",u=0,c=0,l=e,f=n;e>-1&&e<r;){var h=a(t[e+1],4)|a(t[e+2],0),p=s[h];if(f=s[256+f+p],c=c<<6|h&s[364+p],f!==n){if(f===i)return null;if((e+=3)<r&&37===t.charCodeAt(e))continue;return null}o+=t.slice(u,l),o+=c<=65535?String.fromCharCode(c):String.fromCharCode(55232+(c>>10),56320+(1023&c)),c=0,u=e+3,e=l=t.indexOf("%",u)}return o+t.slice(u)}},{}],22:[function(t,e,r){"use strict";e.exports=function t(e,r){if(e===r)return!0;if(e&&r&&"object"==typeof e&&"object"==typeof r){if(e.constructor!==r.constructor)return!1;var n,i,s;if(Array.isArray(e)){if((n=e.length)!=r.length)return!1;for(i=n;0!=i--;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if((n=(s=Object.keys(e)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,s[i]))return!1;for(i=n;0!=i--;){var o=s[i];if(!t(e[o],r[o]))return!1}return!0}return e!=e&&r!=r}},{}],23:[function(t,e,r){"use strict";const n=t("./parse"),i=t("./stringify"),s={parse:n,stringify:i};e.exports=s,e.exports.default=s,e.exports.parse=n,e.exports.stringify=i},{"./parse":25,"./stringify":26}],24:[function(t,e,r){const n=Array.from({length:256},((t,e)=>"%"+((e<16?"0":"")+e.toString(16)).toUpperCase())),i=new Int8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0]);e.exports={encodeString:function(t){const e=t.length;if(0===e)return"";let r="",s=0,o=0;t:for(;o<e;o++){let a=t.charCodeAt(o);for(;a<128;){if(1!==i[a]&&(s<o&&(r+=t.slice(s,o)),s=o+1,r+=n[a]),++o===e)break t;a=t.charCodeAt(o)}if(s<o&&(r+=t.slice(s,o)),a<2048){s=o+1,r+=n[192|a>>6]+n[128|63&a];continue}if(a<55296||a>=57344){s=o+1,r+=n[224|a>>12]+n[128|a>>6&63]+n[128|63&a];continue}if(++o,o>=e)throw new Error("URI malformed");s=o+1,a=65536+((1023&a)<<10|1023&t.charCodeAt(o)),r+=n[240|a>>18]+n[128|a>>12&63]+n[128|a>>6&63]+n[128|63&a]}return 0===s?t:s<e?r+t.slice(s):r}}},{}],25:[function(t,e,r){"use strict";const n=t("fast-decode-uri-component"),i=/\+/g,s=function(){};s.prototype=Object.create(null),e.exports=function(t){const e=new s;if("string"!=typeof t)return e;let r=t.length,o="",a="",u=-1,c=-1,l=!1,f=!1,h=!1,p=!1,d=!1,g=0;for(let s=0;s<r+1;s++)if(g=s!==r?t.charCodeAt(s):38,38===g){if(d=c>u,d||(c=s),o=t.slice(u+1,c),d||o.length>0){h&&(o=o.replace(i," ")),l&&(o=n(o)||o),d&&(a=t.slice(c+1,s),p&&(a=a.replace(i," ")),f&&(a=n(a)||a));const r=e[o];void 0===r?e[o]=a:r.pop?r.push(a):e[o]=[r,a]}a="",u=s,c=s,l=!1,f=!1,h=!1,p=!1}else 61===g?c<=u?c=s:f=!0:43===g?c>u?p=!0:h=!0:37===g&&(c>u?f=!0:l=!0);return e}},{"fast-decode-uri-component":21}],26:[function(t,e,r){"use strict";const{encodeString:n}=t("./internals/querystring");function i(t){const e=typeof t;return"string"===e?n(t):"bigint"===e?t.toString():"boolean"===e?t?"true":"false":"number"===e&&Number.isFinite(t)?t<1e21?""+t:n(""+t):""}e.exports=function(t){let e="";if(null===t||"object"!=typeof t)return e;const r=Object.keys(t),s=r.length;let o=0;for(let a=0;a<s;a++){const s=r[a],u=t[s],c=n(s)+"=";if(a&&(e+="&"),Array.isArray(u)){o=u.length;for(let t=0;t<o;t++)t&&(e+="&"),e+=c,e+=i(u[t])}else e+=c,e+=i(u)}return e}},{"./internals/querystring":24}],27:[function(t,e,r){"use strict";const n=t("./handler_storage"),i={STATIC:0,PARAMETRIC:1,WILDCARD:2};class s{constructor(){this.handlerStorage=new n}}class o extends s{constructor(){super(),this.staticChildren={}}findStaticMatchingChild(t,e){const r=this.staticChildren[t.charAt(e)];return void 0!==r&&r.matchPrefix(t,e)?r:null}createStaticChild(t){if(0===t.length)return this;let e=this.staticChildren[t.charAt(0)];if(e){let r=1;for(;r<e.prefix.length;r++)if(t.charCodeAt(r)!==e.prefix.charCodeAt(r)){e=e.split(this,r);break}return e.createStaticChild(t.slice(r))}const r=t.charAt(0);return this.staticChildren[r]=new a(t),this.staticChildren[r]}}class a extends o{constructor(t){super(),this.prefix=t,this.wildcardChild=null,this.parametricChildren=[],this.kind=i.STATIC,this._compilePrefixMatch()}createParametricChild(t,e){const r=t&&t.source;let n=this.parametricChildren.find((t=>(t.regex&&t.regex.source)===r));return n||(n=new u(t,e),this.parametricChildren.push(n),this.parametricChildren.sort(((t,e)=>t.isRegex?e.isRegex?null===t.staticSuffix?1:null===e.staticSuffix?-1:e.staticSuffix.endsWith(t.staticSuffix)?1:t.staticSuffix.endsWith(e.staticSuffix)?-1:0:-1:1)),n)}createWildcardChild(){return this.wildcardChild||(this.wildcardChild=new c),this.wildcardChild}split(t,e){const r=this.prefix.slice(0,e),n=this.prefix.slice(e);this.prefix=n,this._compilePrefixMatch();const i=new a(r);return i.staticChildren[n.charAt(0)]=this,t.staticChildren[r.charAt(0)]=i,i}getNextNode(t,e,r,n){let i=this.findStaticMatchingChild(t,e),s=0;if(null===i){if(0===this.parametricChildren.length)return this.wildcardChild;i=this.parametricChildren[0],s=1}null!==this.wildcardChild&&r.push({paramsCount:n,brotherPathIndex:e,brotherNode:this.wildcardChild});for(let t=this.parametricChildren.length-1;t>=s;t--)r.push({paramsCount:n,brotherPathIndex:e,brotherNode:this.parametricChildren[t]});return i}_compilePrefixMatch(){if(1===this.prefix.length)return void(this.matchPrefix=()=>!0);const t=[];for(let e=1;e<this.prefix.length;e++){const r=this.prefix.charCodeAt(e);t.push(`path.charCodeAt(i + ${e}) === ${r}`)}this.matchPrefix=new Function("path","i",`return ${t.join(" && ")}`)}}class u extends o{constructor(t,e){super(),this.isRegex=!!t,this.regex=t||null,this.staticSuffix=e||null,this.kind=i.PARAMETRIC}getNextNode(t,e){return this.findStaticMatchingChild(t,e)}}class c extends s{constructor(){super(),this.kind=i.WILDCARD}getNextNode(){return null}}e.exports={StaticNode:a,ParametricNode:u,WildcardNode:c,NODE_TYPES:i}},{"./handler_storage":28}],28:[function(t,e,r){"use strict";e.exports=class{constructor(){this.unconstrainedHandler=null,this.constraints=[],this.handlers=[],this.constrainedHandlerStores=null}getMatchingHandler(t){return void 0===t?this.unconstrainedHandler:this._getHandlerMatchingConstraints(t)}addHandler(t,e,r,n,i){const s={handler:t,params:e,constraints:i,store:r||null,_createParamsObject:this._compileCreateParamsObject(e)};0===Object.keys(i).length&&(this.unconstrainedHandler=s);for(const t of Object.keys(i))this.constraints.includes(t)||("version"===t?this.constraints.unshift(t):this.constraints.push(t));if(this.handlers.length>=32)throw new Error("find-my-way supports a maximum of 32 route handlers per node when there are constraints, limit reached");this.handlers.push(s),this.handlers.sort(((t,e)=>Object.keys(t.constraints).length-Object.keys(e.constraints).length)),this._compileGetHandlerMatchingConstraints(n,i)}_compileCreateParamsObject(t){const e=[];for(let r=0;r<t.length;r++)e.push(`'${t[r]}': paramsArray[${r}]`);return new Function("paramsArray",`return {${e.join(",")}}`)}_getHandlerMatchingConstraints(){return null}_buildConstraintStore(t,e){for(let r=0;r<this.handlers.length;r++){const n=this.handlers[r].constraints[e];if(void 0!==n){let e=t.get(n)||0;e|=1<<r,t.set(n,e)}}}_constrainedIndexBitmask(t){let e=0;for(let r=0;r<this.handlers.length;r++){void 0!==this.handlers[r].constraints[t]&&(e|=1<<r)}return~e}_compileGetHandlerMatchingConstraints(t){this.constrainedHandlerStores={};for(const e of this.constraints){const r=t.newStoreForConstraint(e);this.constrainedHandlerStores[e]=r,this._buildConstraintStore(r,e)}const e=[];e.push(`\n let candidates = ${(1<<this.handlers.length)-1}\n let mask, matches\n `);for(const r of this.constraints){e.push(`\n mask = ${this._constrainedIndexBitmask(r)}\n value = derivedConstraints.${r}\n `);const n=t.strategies[r].mustMatchWhenDerived?"matches":"(matches | mask)";e.push(`\n if (value === undefined) {\n candidates &= mask\n } else {\n matches = this.constrainedHandlerStores.${r}.get(value) || 0\n candidates &= ${n}\n }\n if (candidates === 0) return null;\n `)}for(const r in t.strategies){t.strategies[r].mustMatchWhenDerived&&!this.constraints.includes(r)&&e.push(`if (derivedConstraints.${r} !== undefined) return null`)}e.push("return this.handlers[Math.floor(Math.log2(candidates))]"),this._getHandlerMatchingConstraints=new Function("derivedConstraints",e.join("\n"))}}},{}],29:[function(t,e,r){"use strict";const n=t("assert"),i=t("fast-querystring"),s=t("safe-regex2"),o=t("fast-deep-equal"),{flattenNode:a,compressFlattenedNode:u,prettyPrintFlattenedNode:c,prettyPrintRoutesArray:l}=t("./lib/pretty-print"),{StaticNode:f,NODE_TYPES:h}=t("./custom_node"),p=t("./lib/constrainer"),d=t("./lib/http-methods"),{safeDecodeURI:g,safeDecodeURIComponent:y}=t("./lib/url-sanitizer"),v=/^https?:\/\/.*?\//,m=/(\/:[^/()]*?)\?(\/?)/;if(!s(v))throw new Error("the FULL_PATH_REGEXP is not safe, update this module");if(!s(m))throw new Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");function b(t){if(!(this instanceof b))return new b(t);(t=t||{}).defaultRoute?(n("function"==typeof t.defaultRoute,"The default route must be a function"),this.defaultRoute=t.defaultRoute):this.defaultRoute=null,t.onBadUrl?(n("function"==typeof t.onBadUrl,"The bad url handler must be a function"),this.onBadUrl=t.onBadUrl):this.onBadUrl=null,t.buildPrettyMeta?(n("function"==typeof t.buildPrettyMeta,"buildPrettyMeta must be a function"),this.buildPrettyMeta=t.buildPrettyMeta):this.buildPrettyMeta=P,t.querystringParser?(n("function"==typeof t.querystringParser,"querystringParser must be a function"),this.querystringParser=t.querystringParser):this.querystringParser=t=>""===t?{}:i.parse(t),this.caseSensitive=void 0===t.caseSensitive||t.caseSensitive,this.ignoreTrailingSlash=t.ignoreTrailingSlash||!1,this.ignoreDuplicateSlashes=t.ignoreDuplicateSlashes||!1,this.maxParamLength=t.maxParamLength||100,this.allowUnsafeRegex=t.allowUnsafeRegex||!1,this.routes=[],this.trees={},this.constrainer=new p(t.constraints),this._routesPatterns={}}for(var S in b.prototype.on=function(t,e,r,i,s){"function"==typeof r&&(void 0!==i&&(s=i),i=r,r={}),n("string"==typeof e,"Path should be a string"),n(e.length>0,"The path could not be empty"),n("/"===e[0]||"*"===e[0],"The first character of a path should be `/` or `*`"),n("function"==typeof i,"Handler should be a function");const o=e.match(m);if(o){n(e.length===o.index+o[0].length,"Optional Parameter needs to be the last parameter of the path");const a=e.replace(m,"$1$2"),u=e.replace(m,"$2");return this.on(t,a,r,i,s),void this.on(t,u,r,i,s)}const a=e;this.ignoreDuplicateSlashes&&(e=w(e)),this.ignoreTrailingSlash&&(e=C(e));const u=Array.isArray(t)?t:[t];for(const t of u)this._on(t,e,r,i,s,a),this.routes.push({method:t,path:e,opts:r,handler:i,store:s})},b.prototype._on=function(t,e,r,i,a){n("string"==typeof t,"Method should be a string"),n(d.includes(t),`Method '${t}' is not an http method.`);let u={};if(void 0!==r.constraints&&(n("object"==typeof r.constraints&&null!==r.constraints,"Constraints should be an object"),0!==Object.keys(r.constraints).length&&(u=r.constraints)),this.constrainer.validateConstraints(u),this.constrainer.noteUsage(u),void 0===this.trees[t]&&(this.trees[t]=new f("/"),this._routesPatterns[t]=[]),"*"===e&&0!==this.trees[t].prefix.length){const e=this.trees[t];this.trees[t]=new f(""),this.trees[t].staticChildren["/"]=e}let c=this.trees[t],l=c.prefix.length;const h=[];for(let t=0;t<=e.length;t++){if(58===e.charCodeAt(t)&&58===e.charCodeAt(t+1)){t++;continue}const r=58===e.charCodeAt(t)&&58!==e.charCodeAt(t+1),i=42===e.charCodeAt(t);if(r||i||t===e.length&&t!==l){let r=e.slice(l,t);this.caseSensitive||(r=r.toLowerCase()),r=r.split("::").join(":"),r=r.split("%").join("%25"),c=c.createStaticChild(r)}if(r){let r=!1;const i=[];let o=t+1;for(let a=o;;a++){const u=e.charCodeAt(a),f=40===u,p=45===u||46===u,d=47===u||a===e.length;if(f||p||d){const u=e.slice(o,a);if(h.push(u),r=r||f||p,f){const t=O(e,a),r=e.slice(a,t+1);this.allowUnsafeRegex||n(s(new RegExp(r)),`The regex '${r}' is not safe!`),i.push(x(r)),a=t+1}else i.push("(.*?)");const g=a;for(;a<e.length;a++){const t=e.charCodeAt(a);if(47===t)break;if(58===t){if(58!==e.charCodeAt(a+1))break;a++}}let y=e.slice(g,a);if(y&&(y=y.split("::").join(":"),y=y.split("%").join("%25"),i.push(y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))),o=a+1,d||47===e.charCodeAt(a)||a===e.length){const n=r?"()"+y:y;e=e.slice(0,t+1)+n+e.slice(a),t+=n.length;const s=r?new RegExp("^"+i.join("")+"$"):null;c=c.createParametricChild(s,y||null),l=t+1;break}}}}else if(i&&(h.push("*"),c=c.createWildcardChild(),l=t+1,t!==e.length-1))throw new Error("Wildcard must be the last character in the route")}this.caseSensitive||(e=e.toLowerCase()),"*"===e&&(e="/*");for(const r of this._routesPatterns[t])if(r.path===e&&o(r.constraints,u))throw new Error(`Method '${t}' already declared for route '${e}' with constraints '${JSON.stringify(u)}'`);this._routesPatterns[t].push({path:e,params:h,constraints:u}),c.handlerStorage.addHandler(i,h,a,this.constrainer,u)},b.prototype.hasConstraintStrategy=function(t){return this.constrainer.hasConstraintStrategy(t)},b.prototype.addConstraintStrategy=function(t){this.constrainer.addConstraintStrategy(t),this._rebuild(this.routes)},b.prototype.reset=function(){this.trees={},this.routes=[],this._routesPatterns={}},b.prototype.off=function(t,e,r){n("string"==typeof e,"Path should be a string"),n(e.length>0,"The path could not be empty"),n("/"===e[0]||"*"===e[0],"The first character of a path should be `/` or `*`"),n(void 0===r||"object"==typeof r&&!Array.isArray(r)&&null!==r,"Constraints should be an object or undefined.");const i=e.match(m);if(i){n(e.length===i.index+i[0].length,"Optional Parameter needs to be the last parameter of the path");const s=e.replace(m,"$1$2"),o=e.replace(m,"$2");return this.off(t,s,r),void this.off(t,o,r)}this.ignoreDuplicateSlashes&&(e=w(e)),this.ignoreTrailingSlash&&(e=C(e));const s=Array.isArray(t)?t:[t];for(const t of s)this._off(t,e,r)},b.prototype._off=function(t,e,r){function i(r){return t!==r.method||e!==r.path}n("string"==typeof t,"Method should be a string"),n(d.includes(t),`Method '${t}' is not an http method.`);const s=r?function(t){return i(t)||!o(r,t.opts.constraints||{})}:i,a=this.routes.filter(s);this._rebuild(a)},b.prototype.lookup=function(t,e,r,n){if("function"==typeof r&&(n=r,r=void 0),void 0===n){const n=this.constrainer.deriveConstraints(t,r),i=this.find(t.method,t.url,n);return this.callHandler(i,t,e,r)}this.constrainer.deriveConstraints(t,r,((i,s)=>{if(null===i)try{const i=this.find(t.method,t.url,s),o=this.callHandler(i,t,e,r);n(null,o)}catch(i){n(i)}else n(i)}))},b.prototype.callHandler=function(t,e,r,n){return null===t?this._defaultRoute(e,r,n):void 0===n?t.handler(e,r,t.params,t.store,t.searchParams):t.handler.call(n,e,r,t.params,t.store,t.searchParams)},b.prototype.find=function(t,e,r){let n,i,s,o=this.trees[t];if(void 0===o)return null;47!==e.charCodeAt(0)&&(e=e.replace(v,"/")),this.ignoreDuplicateSlashes&&(e=w(e));try{n=g(e),e=n.path,i=n.querystring,s=n.shouldDecodeParam}catch(t){return this._onBadUrl(e)}this.ignoreTrailingSlash&&(e=C(e));const a=e;!1===this.caseSensitive&&(e=e.toLowerCase());const u=this.maxParamLength;let c=o.prefix.length;const l=[],f=e.length,p=[];for(;;){if(c===f){const t=o.handlerStorage.getMatchingHandler(r);if(null!==t)return{handler:t.handler,store:t.store,params:t._createParamsObject(l),searchParams:this.querystringParser(i)}}let t=o.getNextNode(e,c,p,l.length);if(null===t){if(0===p.length)return null;const e=p.pop();c=e.brotherPathIndex,l.splice(e.paramsCount),t=e.brotherNode}if(o=t,o.kind!==h.STATIC)if(o.kind!==h.WILDCARD){if(o.kind===h.PARAMETRIC){let t=a.indexOf("/",c);-1===t&&(t=f);let e=a.slice(c,t);if(s&&(e=y(e)),o.isRegex){const t=o.regex.exec(e);if(null===t)continue;for(let e=1;e<t.length;e++){const r=t[e];if(r.length>u)return null;l.push(r)}}else{if(e.length>u)return null;l.push(e)}c=t}}else{let t=a.slice(c);s&&(t=y(t)),l.push(t),c=f}else c+=o.prefix.length}},b.prototype._rebuild=function(t){this.reset();for(const e of t){const{method:t,path:r,opts:n,handler:i,store:s}=e;this._on(t,r,n,i,s),this.routes.push({method:t,path:r,opts:n,handler:i,store:s})}},b.prototype._defaultRoute=function(t,e,r){if(null!==this.defaultRoute)return void 0===r?this.defaultRoute(t,e):this.defaultRoute.call(r,t,e);e.statusCode=404,e.end()},b.prototype._onBadUrl=function(t){if(null===this.onBadUrl)return null;const e=this.onBadUrl;return{handler:(r,n,i)=>e(t,r,n),params:{},store:null}},b.prototype.prettyPrint=function(t={}){if(t.commonPrefix=void 0===t.commonPrefix||t.commonPrefix,!t.commonPrefix)return l.call(this,this.routes,t);const e={prefix:"/",nodes:[],children:{}};for(const t in this.trees){const r=this.trees[t];r&&a(e,r,t)}return u(e),c.call(this,e,"",!0,t)},d){if(!d.hasOwnProperty(S))continue;const t=d[S],e=t.toLowerCase();if(b.prototype[e])throw new Error("Method already exists: "+e);b.prototype[e]=function(e,r,n){return this.on(t,e,r,n)}}function w(t){return t.replace(/\/\/+/g,"/")}function C(t){return t.length>1&&47===t.charCodeAt(t.length-1)?t.slice(0,-1):t}function x(t){return 94===t.charCodeAt(1)&&(t=t.slice(0,1)+t.slice(2)),36===t.charCodeAt(t.length-2)&&(t=t.slice(0,t.length-2)+t.slice(t.length-1)),t}function O(t,e){for(var r=1;e<t.length;)if("\\"!==t[++e]){if(")"===t[e]?r--:"("===t[e]&&r++,!r)return e}else e++;throw new TypeError('Invalid regexp expression in "'+t+'"')}function P(t){return t&&t.store?Object.assign({},t.store):{}}b.prototype.all=function(t,e,r){this.on(d,t,e,r)},e.exports=b},{"./custom_node":27,"./lib/constrainer":30,"./lib/http-methods":31,"./lib/pretty-print":32,"./lib/url-sanitizer":35,assert:1,"fast-deep-equal":22,"fast-querystring":23,"safe-regex2":43}],30:[function(t,e,r){"use strict";const n=t("./strategies/accept-version"),i=t("./strategies/accept-host"),s=t("assert");e.exports=class{constructor(t){if(this.strategies={version:n,host:i},this.strategiesInUse=new Set,this.asyncStrategiesInUse=new Set,t)for(const e of Object.values(t))this.addConstraintStrategy(e)}isStrategyUsed(t){return this.strategiesInUse.has(t)||this.asyncStrategiesInUse.has(t)}hasConstraintStrategy(t){const e=this.strategies[t];return void 0!==e&&(e.isCustom||this.isStrategyUsed(t))}addConstraintStrategy(t){if(s("string"==typeof t.name&&""!==t.name,"strategy.name is required."),s(t.storage&&"function"==typeof t.storage,"strategy.storage function is required."),s(t.deriveConstraint&&"function"==typeof t.deriveConstraint,"strategy.deriveConstraint function is required."),this.strategies[t.name]&&this.strategies[t.name].isCustom)throw new Error(`There already exists a custom constraint with the name ${t.name}.`);if(this.isStrategyUsed(t.name))throw new Error(`There already exists a route with ${t.name} constraint.`);t.isCustom=!0,t.isAsync=3===t.deriveConstraint.length,this.strategies[t.name]=t,t.mustMatchWhenDerived&&this.noteUsage({[t.name]:t})}deriveConstraints(t,e,r){const n=this.deriveSyncConstraints(t,e);if(void 0===r)return n;this.deriveAsyncConstraints(n,t,e,r)}deriveSyncConstraints(t,e){}noteUsage(t){if(t){const e=this.strategiesInUse.size;for(const e in t){this.strategies[e].isAsync?this.asyncStrategiesInUse.add(e):this.strategiesInUse.add(e)}e!==this.strategiesInUse.size&&this._buildDeriveConstraints()}}newStoreForConstraint(t){if(!this.strategies[t])throw new Error(`No strategy registered for constraint key ${t}`);return this.strategies[t].storage()}validateConstraints(t){for(const e in t){const r=t[e];if(void 0===r)throw new Error("Can't pass an undefined constraint value, must pass null or no key at all");const n=this.strategies[e];if(!n)throw new Error(`No strategy registered for constraint key ${e}`);n.validate&&n.validate(r)}}deriveAsyncConstraints(t,e,r,n){let i=this.asyncStrategiesInUse.size;if(0!==i){t=t||{};for(const s of this.asyncStrategiesInUse){this.strategies[s].deriveConstraint(e,r,((e,r)=>{null===e?(t[s]=r,0==--i&&n(null,t)):n(e)}))}}else n(null,t)}_buildDeriveConstraints(){if(0===this.strategiesInUse.size)return;const t=["return {"];for(const e of this.strategiesInUse){const r=this.strategies[e];if(r.isCustom)t.push(` ${r.name}: this.strategies.${e}.deriveConstraint(req, ctx),`);else if("version"===e)t.push(" version: req.headers['accept-version'],");else{if("host"!==e)throw new Error("unknown non-custom strategy for compiling constraint derivation function");t.push(" host: req.headers.host || req.headers[':authority'],")}}t.push("}"),this.deriveSyncConstraints=new Function("req","ctx",t.join("\n")).bind(this)}}},{"./strategies/accept-host":33,"./strategies/accept-version":34,assert:1}],31:[function(t,e,r){"use strict";e.exports=["ACL","BIND","CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LINK","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCALENDAR","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REBIND","REPORT","SEARCH","SOURCE","SUBSCRIBE","TRACE","UNBIND","UNLINK","UNLOCK","UNSUBSCRIBE"]},{}],32:[function(t,e,r){"use strict";const n=" ",i="│ ",s="├── ",o="└── ",a="*",u="/",c=/(?=\/)/;function l(t){return Array.isArray(t)?t.map((t=>l(t))):"symbol"==typeof t?t.toString():"function"==typeof t?function(t){let e=t.name||"";return e=e.replace("bound","").trim(),e=(e||"anonymous")+"()",e}(t):t}function f(t,e){const r={},n=this.buildPrettyMeta(t);return Array.isArray(e)||(e=n?Reflect.ownKeys(n):[]),e.forEach((t=>{const e="symbol"==typeof t?t.toString():t;n&&n[t]&&(r[e]=l(n[t]))})),r}function h(t,e,r,a,u){let c="";if(a||u||(c+="\n"),a||(c+=`${e||""}${r?o:s}`),c+=`${t.path}`,t.handlers){const s=t.handlers.reduce(((t,e)=>{const r=t.findIndex((t=>JSON.stringify(t.opts)===JSON.stringify(e.opts)));return-1!==r?t[r].method=[t[r].method,e.method].join(", "):t.push(e),t}),[]);s.forEach(((o,u)=>{u>0&&(c+=`${a?"":e||""}${r?n:i}${t.path}`),c+=` (${o.method||"-"})`,o.opts&&"{}"!==JSON.stringify(o.opts)&&(c+=` ${JSON.stringify(o.opts)}`),o.meta&&Reflect.ownKeys(o.meta).forEach(((t,s)=>{c+=`\n${a?"":e||""}${r?n:i}`,c+=`• (${t}) ${JSON.stringify(o.meta[t])}`})),s.length>1&&u!==s.length-1&&(c+="\n")}))}else t.children.length>1&&(c+=" (-)");return a||(e=`${e||""}${r?n:i}`),t.children.forEach(((r,n)=>{const i=n===t.children.length-1,s=!t.handlers&&1===t.children.length;c+=h(r,e,i,s)})),c}e.exports={flattenNode:function t(e,r,n){if(0!==r.handlerStorage.handlers.length&&e.nodes.push({method:n,node:r}),r.parametricChildren&&r.parametricChildren[0]&&(e.children[":"]||(e.children[":"]={prefix:":",nodes:[],children:{}}),t(e.children[":"],r.parametricChildren[0],n)),r.wildcardChild&&(e.children["*"]||(e.children["*"]={prefix:"*",nodes:[],children:{}}),t(e.children["*"],r.wildcardChild,n)),r.staticChildren)for(const i of Object.values(r.staticChildren)){const r=i.prefix.split(c);let s,o=e;for(const t of r)s=o,o=o.children[t],o||(o={prefix:t,nodes:[],children:{}},s.children[t]=o);t(o,i,n)}},compressFlattenedNode:function t(e){const r=Object.keys(e.children);if(0===e.nodes.length&&1===r.length){const n=e.children[r[0]];if(n.nodes.length<=1)return t(n),e.nodes=n.nodes,e.prefix+=n.prefix,e.children=n.children,e}for(const r of Object.keys(e.children))t(e.children[r]);return e},prettyPrintFlattenedNode:function t(e,r,a,u){if(!this.buildPrettyMeta)throw new Error("buildPrettyMeta not defined");u.includeMeta=u.includeMeta||null;let c="";const l=[];for(const{node:t,method:r}of e.nodes)for(const e of t.handlerStorage.handlers)l.push({method:r,...e});l.length?l.forEach(((t,s)=>{let o=`(${t.method||"-"})`;Object.keys(t.constraints).length>0&&(o+=" "+JSON.stringify(t.constraints));let l="";const h=e.prefix.split("").map(((t,e)=>":"===t?e:null)).filter((t=>null!==t));if(h.length){let r=0;h.forEach(((n,i)=>{l+=e.prefix.slice(r,n+1),l+=t.params[t.params.length-h.length+i],i===h.length-1&&(l+=e.prefix.slice(n+1)),r=n+1}))}else l=e.prefix;if(c+=0===s?`${l} ${o}`:`\n${r}${a?n:i}${l} ${o}`,u.includeMeta){const e=f.call(this,t,u.includeMeta);Object.keys(e).forEach(((t,s)=>{c+=`\n${r||""}${a?n:i}`,c+=`• (${t}) ${JSON.stringify(e[t])}`}))}})):c=e.prefix;let h=`${r}${a?o:s}${c}\n`;r=`${r}${a?n:i}`;const p=Object.keys(e.children);for(let n=0;n<p.length;n++){const i=e.children[p[n]];h+=t.call(this,i,r,n===p.length-1,u)}return h},prettyPrintRoutesArray:function(t,e={}){if(!this.buildPrettyMeta)throw new Error("buildPrettyMeta not defined");e.includeMeta=e.includeMeta||null;const r=[];let n="";t.sort(((t,e)=>t.path&&e.path?t.path.localeCompare(e.path):0));for(let n=0;n<t.length;n++){const i=t[n],s=r.find((t=>i.path===t.path));if(s){s.handlers.push({method:i.method,opts:i.opts.constraints||void 0,meta:e.includeMeta?f.call(this,i,e.includeMeta):null});continue}const o={method:i.method,opts:i.opts.constraints||void 0,meta:e.includeMeta?f.call(this,i,e.includeMeta):null};r.push({path:i.path,methods:[i.method],opts:[i.opts],handlers:[o]})}if(!r.filter((t=>t.path===u)).length){const t={path:u,truncatedPath:"",methods:[],opts:[],handlers:[{}]};r.filter((t=>t.path===a)).length?r.splice(1,0,t):r.unshift(t)}const i=function(t){const e=[],r={result:e};return t.forEach(((t,e)=>{let n=t.path.split(c);n[0]!==u&&n[0]!==a&&(n=[u,n[0].slice(1),...n.slice(1)]),n.reduce(((e,r,i)=>{if(!e[r]){e[r]={result:[]};const s={path:r,children:e[r].result};i===n.length-1&&(s.handlers=t.handlers),e.result.push(s)}return e[r]}),r)})),e}(r);return i.forEach(((t,e)=>{n+=h(t,null,e===i.length-1,!1,!0),n+="\n"})),n}}},{}],33:[function(t,e,r){"use strict";const n=t("assert");e.exports={name:"host",mustMatchWhenDerived:!1,storage:function(){const t={},e=[];return{get:r=>{const n=t[r];if(n)return n;for(const t of e)if(t.host.test(r))return t.value},set:(r,n)=>{r instanceof RegExp?e.push({host:r,value:n}):t[r]=n}}},validate(t){n("string"==typeof t||"[object RegExp]"===Object.prototype.toString.call(t),"Host should be a string or a RegExp")}}},{assert:1}],34:[function(t,e,r){"use strict";const n=t("assert");function i(){if(!(this instanceof i))return new i;this.store={},this.maxMajor=0,this.maxMinors={},this.maxPatches={}}i.prototype.set=function(t,e){if("string"!=typeof t)throw new TypeError("Version should be a string");let[r,n,i]=t.split(".");return r=Number(r)||0,n=Number(n)||0,i=Number(i)||0,r>=this.maxMajor&&(this.maxMajor=r,this.store.x=e,this.store["*"]=e,this.store["x.x"]=e,this.store["x.x.x"]=e),n>=(this.maxMinors[r]||0)&&(this.maxMinors[r]=n,this.store[`${r}.x`]=e,this.store[`${r}.x.x`]=e),i>=(this.store[`${r}.${n}`]||0)&&(this.maxPatches[`${r}.${n}`]=i,this.store[`${r}.${n}.x`]=e),this.store[`${r}.${n}.${i}`]=e,this},i.prototype.get=function(t){return this.store[t]},e.exports={name:"version",mustMatchWhenDerived:!0,storage:i,validate(t){n("string"==typeof t,"Version should be a string")}}},{assert:1}],35:[function(t,e,r){"use strict";function n(t,e){return 50===t?53===e?"%":51===e?"#":52===e?"$":54===e?"&":66===e||98===e?"+":67===e||99===e?",":70===e||102===e?"/":null:51===t?65===e||97===e?":":66===e||98===e?";":68===e||100===e?"=":70===e||102===e?"?":null:52===t&&48===e?"@":null}e.exports={safeDecodeURI:function(t){let e=!1,r=!1,i="";for(let s=1;s<t.length;s++){const o=t.charCodeAt(s);if(37===o){const i=t.charCodeAt(s+1),o=t.charCodeAt(s+2);null===n(i,o)?e=!0:(r=!0,50===i&&53===o&&(e=!0,t=t.slice(0,s+1)+"25"+t.slice(s+1),s+=2),s+=2)}else if(63===o||59===o||35===o){i=t.slice(s+1),t=t.slice(0,s);break}}return{path:e?decodeURI(t):t,querystring:i,shouldDecodeParam:r}},safeDecodeURIComponent:function(t){const e=t.indexOf("%");if(-1===e)return t;let r="",i=e;for(let s=e;s<t.length;s++)if(37===t.charCodeAt(s)){const e=n(t.charCodeAt(s+1),t.charCodeAt(s+2));r+=t.slice(i,s)+e,i=s+3}return t.slice(0,e)+r+t.slice(i)}}},{}],36:[function(t,e,r){
8
8
  /*
9
9
  object-assign
10
10
  (c) Sindre Sorhus
11
11
  @license MIT
12
12
  */
13
- "use strict";var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,o,a=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),u=1;u<arguments.length;u++){for(var c in r=Object(arguments[u]))i.call(r,c)&&(a[c]=r[c]);if(n){o=n(r);for(var l=0;l<o.length;l++)s.call(r,o[l])&&(a[o[l]]=r[o[l]])}}return a}},{}],37:[function(t,e,r){var n,i,s=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(t){i=a}}();var c,l=[],f=!1,h=-1;function p(){f&&c&&(f=!1,c.length?l=c.concat(l):h=-1,l.length&&d())}function d(){if(!f){var t=u(p);f=!0;for(var e=l.length;e;){for(c=l,l=[];++h<e;)c&&c[h].run();h=-1,e=l.length}c=null,f=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{return i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function g(t,e){this.fun=t,this.array=e}function y(){}s.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];l.push(new g(t,e)),1!==l.length||f||u(d)},g.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=y,s.addListener=y,s.once=y,s.off=y,s.removeListener=y,s.removeAllListeners=y,s.emit=y,s.prependListener=y,s.prependOnceListener=y,s.listeners=function(t){return[]},s.binding=function(t){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(t){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},{}],38:[function(t,e,r){"use strict";var n=t("ret"),i=n.types;e.exports=function(t,e){e||(e={});var r,s=void 0===e.limit?25:e.limit;r=t,"[object RegExp]"==={}.toString.call(r)?t=t.source:"string"!=typeof t&&(t=String(t));try{t=n(t)}catch(t){return!1}var o=0;return function t(e,r){var n,a;if(e.type===i.REPETITION){if(r++,o++,r>1)return!1;if(o>s)return!1}if(e.options)for(n=0,a=e.options.length;n<a;n++)if(!t({stack:e.options[n]},r))return!1;var u=e.stack||e.value&&e.value.stack;if(!u)return!0;for(n=0;n<u.length;n++)if(!t(u[n],r))return!1;return!0}(t,0)}},{ret:39}],39:[function(t,e,r){const n=t("./util"),i=t("./types"),s=t("./sets"),o=t("./positions");e.exports=t=>{var e,r,a=0,u={type:i.ROOT,stack:[]},c=u,l=u.stack,f=[],h=e=>{n.error(t,"Nothing to repeat at column "+(e-1))},p=n.strToChars(t);for(e=p.length;a<e;)switch(r=p[a++]){case"\\":switch(r=p[a++]){case"b":l.push(o.wordBoundary());break;case"B":l.push(o.nonWordBoundary());break;case"w":l.push(s.words());break;case"W":l.push(s.notWords());break;case"d":l.push(s.ints());break;case"D":l.push(s.notInts());break;case"s":l.push(s.whitespace());break;case"S":l.push(s.notWhitespace());break;default:/\d/.test(r)?l.push({type:i.REFERENCE,value:parseInt(r,10)}):l.push({type:i.CHAR,value:r.charCodeAt(0)})}break;case"^":l.push(o.begin());break;case"$":l.push(o.end());break;case"[":var d;"^"===p[a]?(d=!0,a++):d=!1;var g=n.tokenizeClass(p.slice(a),t);a+=g[1],l.push({type:i.SET,set:g[0],not:d});break;case".":l.push(s.anyChar());break;case"(":var y={type:i.GROUP,stack:[],remember:!0};"?"===(r=p[a])&&(r=p[a+1],a+=2,"="===r?y.followedBy=!0:"!"===r?y.notFollowedBy=!0:":"!==r&&n.error(t,`Invalid group, character '${r}' after '?' at column `+(a-1)),y.remember=!1),l.push(y),f.push(c),c=y,l=y.stack;break;case")":0===f.length&&n.error(t,"Unmatched ) at column "+(a-1)),l=(c=f.pop()).options?c.options[c.options.length-1]:c.stack;break;case"|":c.options||(c.options=[c.stack],delete c.stack);var v=[];c.options.push(v),l=v;break;case"{":var m,b,S=/^(\d+)(,(\d+)?)?\}/.exec(p.slice(a));null!==S?(0===l.length&&h(a),m=parseInt(S[1],10),b=S[2]?S[3]?parseInt(S[3],10):1/0:m,a+=S[0].length,l.push({type:i.REPETITION,min:m,max:b,value:l.pop()})):l.push({type:i.CHAR,value:123});break;case"?":0===l.length&&h(a),l.push({type:i.REPETITION,min:0,max:1,value:l.pop()});break;case"+":0===l.length&&h(a),l.push({type:i.REPETITION,min:1,max:1/0,value:l.pop()});break;case"*":0===l.length&&h(a),l.push({type:i.REPETITION,min:0,max:1/0,value:l.pop()});break;default:l.push({type:i.CHAR,value:r.charCodeAt(0)})}return 0!==f.length&&n.error(t,"Unterminated group"),u},e.exports.types=i},{"./positions":40,"./sets":41,"./types":42,"./util":43}],40:[function(t,e,r){const n=t("./types");r.wordBoundary=()=>({type:n.POSITION,value:"b"}),r.nonWordBoundary=()=>({type:n.POSITION,value:"B"}),r.begin=()=>({type:n.POSITION,value:"^"}),r.end=()=>({type:n.POSITION,value:"$"})},{"./types":42}],41:[function(t,e,r){const n=t("./types"),i=()=>[{type:n.RANGE,from:48,to:57}],s=()=>[{type:n.CHAR,value:95},{type:n.RANGE,from:97,to:122},{type:n.RANGE,from:65,to:90}].concat(i()),o=()=>[{type:n.CHAR,value:9},{type:n.CHAR,value:10},{type:n.CHAR,value:11},{type:n.CHAR,value:12},{type:n.CHAR,value:13},{type:n.CHAR,value:32},{type:n.CHAR,value:160},{type:n.CHAR,value:5760},{type:n.RANGE,from:8192,to:8202},{type:n.CHAR,value:8232},{type:n.CHAR,value:8233},{type:n.CHAR,value:8239},{type:n.CHAR,value:8287},{type:n.CHAR,value:12288},{type:n.CHAR,value:65279}];r.words=()=>({type:n.SET,set:s(),not:!1}),r.notWords=()=>({type:n.SET,set:s(),not:!0}),r.ints=()=>({type:n.SET,set:i(),not:!1}),r.notInts=()=>({type:n.SET,set:i(),not:!0}),r.whitespace=()=>({type:n.SET,set:o(),not:!1}),r.notWhitespace=()=>({type:n.SET,set:o(),not:!0}),r.anyChar=()=>({type:n.SET,set:[{type:n.CHAR,value:10},{type:n.CHAR,value:13},{type:n.CHAR,value:8232},{type:n.CHAR,value:8233}],not:!0})},{"./types":42}],42:[function(t,e,r){e.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}},{}],43:[function(t,e,r){const n=t("./types"),i=t("./sets"),s={0:0,t:9,n:10,v:11,f:12,r:13};r.strToChars=function(t){return t=t.replace(/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g,(function(t,e,r,n,i,o,a,u){if(r)return t;var c=e?8:n?parseInt(n,16):i?parseInt(i,16):o?parseInt(o,8):a?"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?".indexOf(a):s[u],l=String.fromCharCode(c);return/[[\]{}^$.|?*+()]/.test(l)&&(l="\\"+l),l}))},r.tokenizeClass=(t,e)=>{for(var s,o,a=[],u=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g;null!=(s=u.exec(t));)if(s[1])a.push(i.words());else if(s[2])a.push(i.ints());else if(s[3])a.push(i.whitespace());else if(s[4])a.push(i.notWords());else if(s[5])a.push(i.notInts());else if(s[6])a.push(i.notWhitespace());else if(s[7])a.push({type:n.RANGE,from:(s[8]||s[9]).charCodeAt(0),to:s[10].charCodeAt(0)});else{if(!(o=s[12]))return[a,u.lastIndex];a.push({type:n.CHAR,value:o.charCodeAt(0)})}r.error(e,"Unterminated character class")},r.error=(t,e)=>{throw new SyntaxError("Invalid regular expression: /"+t+"/: "+e)}},{"./sets":41,"./types":42}],44:[function(t,e,r){(function(e,n){(function(){var i=t("process/browser.js").nextTick,s=Function.prototype.apply,o=Array.prototype.slice,a={},u=0;function c(t,e){this._id=t,this._clearFn=e}r.setTimeout=function(){return new c(s.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new c(s.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(t){t.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},r.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},r._unrefActive=r.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r.setImmediate="function"==typeof e?e:function(t){var e=u++,n=!(arguments.length<2)&&o.call(arguments,1);return a[e]=!0,i((function(){a[e]&&(n?t.apply(null,n):t.call(null),r.clearImmediate(e))})),e},r.clearImmediate="function"==typeof n?n:function(t){delete a[t]}}).call(this)}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":37,timers:44}],45:[function(t,e,r){
13
+ "use strict";var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,o,a=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),u=1;u<arguments.length;u++){for(var c in r=Object(arguments[u]))i.call(r,c)&&(a[c]=r[c]);if(n){o=n(r);for(var l=0;l<o.length;l++)s.call(r,o[l])&&(a[o[l]]=r[o[l]])}}return a}},{}],37:[function(t,e,r){var n,i,s=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(t){i=a}}();var c,l=[],f=!1,h=-1;function p(){f&&c&&(f=!1,c.length?l=c.concat(l):h=-1,l.length&&d())}function d(){if(!f){var t=u(p);f=!0;for(var e=l.length;e;){for(c=l,l=[];++h<e;)c&&c[h].run();h=-1,e=l.length}c=null,f=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{return i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function g(t,e){this.fun=t,this.array=e}function y(){}s.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];l.push(new g(t,e)),1!==l.length||f||u(d)},g.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=y,s.addListener=y,s.once=y,s.off=y,s.removeListener=y,s.removeAllListeners=y,s.emit=y,s.prependListener=y,s.prependOnceListener=y,s.listeners=function(t){return[]},s.binding=function(t){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(t){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},{}],38:[function(t,e,r){const n=t("./util"),i=t("./types"),s=t("./sets"),o=t("./positions");e.exports=t=>{var e,r,a=0,u={type:i.ROOT,stack:[]},c=u,l=u.stack,f=[],h=e=>{n.error(t,"Nothing to repeat at column "+(e-1))},p=n.strToChars(t);for(e=p.length;a<e;)switch(r=p[a++]){case"\\":switch(r=p[a++]){case"b":l.push(o.wordBoundary());break;case"B":l.push(o.nonWordBoundary());break;case"w":l.push(s.words());break;case"W":l.push(s.notWords());break;case"d":l.push(s.ints());break;case"D":l.push(s.notInts());break;case"s":l.push(s.whitespace());break;case"S":l.push(s.notWhitespace());break;default:/\d/.test(r)?l.push({type:i.REFERENCE,value:parseInt(r,10)}):l.push({type:i.CHAR,value:r.charCodeAt(0)})}break;case"^":l.push(o.begin());break;case"$":l.push(o.end());break;case"[":var d;"^"===p[a]?(d=!0,a++):d=!1;var g=n.tokenizeClass(p.slice(a),t);a+=g[1],l.push({type:i.SET,set:g[0],not:d});break;case".":l.push(s.anyChar());break;case"(":var y={type:i.GROUP,stack:[],remember:!0};"?"===(r=p[a])&&(r=p[a+1],a+=2,"="===r?y.followedBy=!0:"!"===r?y.notFollowedBy=!0:":"!==r&&n.error(t,`Invalid group, character '${r}' after '?' at column `+(a-1)),y.remember=!1),l.push(y),f.push(c),c=y,l=y.stack;break;case")":0===f.length&&n.error(t,"Unmatched ) at column "+(a-1)),l=(c=f.pop()).options?c.options[c.options.length-1]:c.stack;break;case"|":c.options||(c.options=[c.stack],delete c.stack);var v=[];c.options.push(v),l=v;break;case"{":var m,b,S=/^(\d+)(,(\d+)?)?\}/.exec(p.slice(a));null!==S?(0===l.length&&h(a),m=parseInt(S[1],10),b=S[2]?S[3]?parseInt(S[3],10):1/0:m,a+=S[0].length,l.push({type:i.REPETITION,min:m,max:b,value:l.pop()})):l.push({type:i.CHAR,value:123});break;case"?":0===l.length&&h(a),l.push({type:i.REPETITION,min:0,max:1,value:l.pop()});break;case"+":0===l.length&&h(a),l.push({type:i.REPETITION,min:1,max:1/0,value:l.pop()});break;case"*":0===l.length&&h(a),l.push({type:i.REPETITION,min:0,max:1/0,value:l.pop()});break;default:l.push({type:i.CHAR,value:r.charCodeAt(0)})}return 0!==f.length&&n.error(t,"Unterminated group"),u},e.exports.types=i},{"./positions":39,"./sets":40,"./types":41,"./util":42}],39:[function(t,e,r){const n=t("./types");r.wordBoundary=()=>({type:n.POSITION,value:"b"}),r.nonWordBoundary=()=>({type:n.POSITION,value:"B"}),r.begin=()=>({type:n.POSITION,value:"^"}),r.end=()=>({type:n.POSITION,value:"$"})},{"./types":41}],40:[function(t,e,r){const n=t("./types"),i=()=>[{type:n.RANGE,from:48,to:57}],s=()=>[{type:n.CHAR,value:95},{type:n.RANGE,from:97,to:122},{type:n.RANGE,from:65,to:90}].concat(i()),o=()=>[{type:n.CHAR,value:9},{type:n.CHAR,value:10},{type:n.CHAR,value:11},{type:n.CHAR,value:12},{type:n.CHAR,value:13},{type:n.CHAR,value:32},{type:n.CHAR,value:160},{type:n.CHAR,value:5760},{type:n.RANGE,from:8192,to:8202},{type:n.CHAR,value:8232},{type:n.CHAR,value:8233},{type:n.CHAR,value:8239},{type:n.CHAR,value:8287},{type:n.CHAR,value:12288},{type:n.CHAR,value:65279}];r.words=()=>({type:n.SET,set:s(),not:!1}),r.notWords=()=>({type:n.SET,set:s(),not:!0}),r.ints=()=>({type:n.SET,set:i(),not:!1}),r.notInts=()=>({type:n.SET,set:i(),not:!0}),r.whitespace=()=>({type:n.SET,set:o(),not:!1}),r.notWhitespace=()=>({type:n.SET,set:o(),not:!0}),r.anyChar=()=>({type:n.SET,set:[{type:n.CHAR,value:10},{type:n.CHAR,value:13},{type:n.CHAR,value:8232},{type:n.CHAR,value:8233}],not:!0})},{"./types":41}],41:[function(t,e,r){e.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}},{}],42:[function(t,e,r){const n=t("./types"),i=t("./sets"),s={0:0,t:9,n:10,v:11,f:12,r:13};r.strToChars=function(t){return t=t.replace(/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g,(function(t,e,r,n,i,o,a,u){if(r)return t;var c=e?8:n?parseInt(n,16):i?parseInt(i,16):o?parseInt(o,8):a?"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?".indexOf(a):s[u],l=String.fromCharCode(c);return/[[\]{}^$.|?*+()]/.test(l)&&(l="\\"+l),l}))},r.tokenizeClass=(t,e)=>{for(var s,o,a=[],u=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g;null!=(s=u.exec(t));)if(s[1])a.push(i.words());else if(s[2])a.push(i.ints());else if(s[3])a.push(i.whitespace());else if(s[4])a.push(i.notWords());else if(s[5])a.push(i.notInts());else if(s[6])a.push(i.notWhitespace());else if(s[7])a.push({type:n.RANGE,from:(s[8]||s[9]).charCodeAt(0),to:s[10].charCodeAt(0)});else{if(!(o=s[12]))return[a,u.lastIndex];a.push({type:n.CHAR,value:o.charCodeAt(0)})}r.error(e,"Unterminated character class")},r.error=(t,e)=>{throw new SyntaxError("Invalid regular expression: /"+t+"/: "+e)}},{"./sets":40,"./types":41}],43:[function(t,e,r){"use strict";var n=t("ret"),i=n.types;e.exports=function(t,e){e||(e={});var r,s=void 0===e.limit?25:e.limit;r=t,"[object RegExp]"==={}.toString.call(r)?t=t.source:"string"!=typeof t&&(t=String(t));try{t=n(t)}catch(t){return!1}var o=0;return function t(e,r){var n,a;if(e.type===i.REPETITION){if(r++,o++,r>1)return!1;if(o>s)return!1}if(e.options)for(n=0,a=e.options.length;n<a;n++)if(!t({stack:e.options[n]},r))return!1;var u=e.stack||e.value&&e.value.stack;if(!u)return!0;for(n=0;n<u.length;n++)if(!t(u[n],r))return!1;return!0}(t,0)}},{ret:38}],44:[function(t,e,r){(function(e,n){(function(){var i=t("process/browser.js").nextTick,s=Function.prototype.apply,o=Array.prototype.slice,a={},u=0;function c(t,e){this._id=t,this._clearFn=e}r.setTimeout=function(){return new c(s.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new c(s.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(t){t.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},r.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},r._unrefActive=r.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r.setImmediate="function"==typeof e?e:function(t){var e=u++,n=!(arguments.length<2)&&o.call(arguments,1);return a[e]=!0,i((function(){a[e]&&(n?t.apply(null,n):t.call(null),r.clearImmediate(e))})),e},r.clearImmediate="function"==typeof n?n:function(t){delete a[t]}}).call(this)}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":37,timers:44}],45:[function(t,e,r){
14
14
  /**
15
15
  * Simple browser shim loader - assign the npm module to a window global automatically
16
16
  *