Files
CyberChef/modules/Serialise.js
github-actions[bot] af8017b2c0 Deploy to GitHub pages
2026-03-02 13:03:20 +00:00

2 lines
550 KiB
JavaScript
Executable File
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*! For license information please see Serialise.js.LICENSE.txt */
(()=>{var e={94148(e,t,r){"use strict";var n=r(65606);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function s(e,t,r){return t&&o(e.prototype,t),r&&o(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=function(e){if("object"!==i(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===i(t)?t:String(t)}var u,c,f=r(69597).codes,l=f.ERR_AMBIGUOUS_ARGUMENT,h=f.ERR_INVALID_ARG_TYPE,p=f.ERR_INVALID_ARG_VALUE,d=f.ERR_INVALID_RETURN_VALUE,y=f.ERR_MISSING_ARGS,g=r(3918),m=r(94591).inspect,v=r(94591).types,b=v.isPromise,w=v.isRegExp,_=r(11514)(),E=r(9394)(),x=r(38075)("RegExp.prototype.test");function S(){var e=r(82299);u=e.isDeepEqual,c=e.isDeepStrictEqual}new Map;var A=!1,B=e.exports=I,O={};function k(e){if(e.message instanceof Error)throw e.message;throw new g(e)}function T(e,t,r,n){if(!r){var i=!1;if(0===t)i=!0,n="No value argument passed to `assert.ok()`";else if(n instanceof Error)throw n;var o=new g({actual:r,expected:!0,message:n,operator:"==",stackStartFn:e});throw o.generatedMessage=i,o}}function I(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];T.apply(void 0,[I,t.length].concat(t))}B.fail=function e(t,r,i,o,s){var a,u=arguments.length;if(0===u?a="Failed":1===u?(i=t,t=void 0):(!1===A&&(A=!0,(n.emitWarning?n.emitWarning:console.warn.bind(console))("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")),2===u&&(o="!=")),i instanceof Error)throw i;var c={actual:t,expected:r,operator:void 0===o?"fail":o,stackStartFn:s||e};void 0!==i&&(c.message=i);var f=new g(c);throw a&&(f.message=a,f.generatedMessage=!0),f},B.AssertionError=g,B.ok=I,B.equal=function e(t,r,n){if(arguments.length<2)throw new y("actual","expected");t!=r&&k({actual:t,expected:r,message:n,operator:"==",stackStartFn:e})},B.notEqual=function e(t,r,n){if(arguments.length<2)throw new y("actual","expected");t==r&&k({actual:t,expected:r,message:n,operator:"!=",stackStartFn:e})},B.deepEqual=function e(t,r,n){if(arguments.length<2)throw new y("actual","expected");void 0===u&&S(),u(t,r)||k({actual:t,expected:r,message:n,operator:"deepEqual",stackStartFn:e})},B.notDeepEqual=function e(t,r,n){if(arguments.length<2)throw new y("actual","expected");void 0===u&&S(),u(t,r)&&k({actual:t,expected:r,message:n,operator:"notDeepEqual",stackStartFn:e})},B.deepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new y("actual","expected");void 0===u&&S(),c(t,r)||k({actual:t,expected:r,message:n,operator:"deepStrictEqual",stackStartFn:e})},B.notDeepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new y("actual","expected");void 0===u&&S(),c(t,r)&&k({actual:t,expected:r,message:n,operator:"notDeepStrictEqual",stackStartFn:e})},B.strictEqual=function e(t,r,n){if(arguments.length<2)throw new y("actual","expected");E(t,r)||k({actual:t,expected:r,message:n,operator:"strictEqual",stackStartFn:e})},B.notStrictEqual=function e(t,r,n){if(arguments.length<2)throw new y("actual","expected");E(t,r)&&k({actual:t,expected:r,message:n,operator:"notStrictEqual",stackStartFn:e})};var N=s(function e(t,r,n){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r.forEach(function(e){e in t&&(void 0!==n&&"string"==typeof n[e]&&w(t[e])&&x(t[e],n[e])?i[e]=n[e]:i[e]=t[e])})});function F(e,t,r,n){if("function"!=typeof t){if(w(t))return x(t,e);if(2===arguments.length)throw new h("expected",["Function","RegExp"],t);if("object"!==i(e)||null===e){var o=new g({actual:e,expected:t,message:r,operator:"deepStrictEqual",stackStartFn:n});throw o.operator=n.name,o}var s=Object.keys(t);if(t instanceof Error)s.push("name","message");else if(0===s.length)throw new p("error",t,"may not be an empty object");return void 0===u&&S(),s.forEach(function(i){"string"==typeof e[i]&&w(t[i])&&x(t[i],e[i])||function(e,t,r,n,i,o){if(!(r in e)||!c(e[r],t[r])){if(!n){var s=new N(e,i),a=new N(t,i,e),u=new g({actual:s,expected:a,operator:"deepStrictEqual",stackStartFn:o});throw u.actual=e,u.expected=t,u.operator=o.name,u}k({actual:e,expected:t,message:n,operator:o.name,stackStartFn:o})}}(e,t,i,r,s,n)}),!0}return void 0!==t.prototype&&e instanceof t||!Error.isPrototypeOf(t)&&!0===t.call({},e)}function R(e){if("function"!=typeof e)throw new h("fn","Function",e);try{e()}catch(e){return e}return O}function j(e){return b(e)||null!==e&&"object"===i(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function L(e){return Promise.resolve().then(function(){var t;if("function"==typeof e){if(!j(t=e()))throw new d("instance of Promise","promiseFn",t)}else{if(!j(e))throw new h("promiseFn",["Function","Promise"],e);t=e}return Promise.resolve().then(function(){return t}).then(function(){return O}).catch(function(e){return e})})}function U(e,t,r,n){if("string"==typeof r){if(4===arguments.length)throw new h("error",["Object","Error","Function","RegExp"],r);if("object"===i(t)&&null!==t){if(t.message===r)throw new l("error/message",'The error message "'.concat(t.message,'" is identical to the message.'))}else if(t===r)throw new l("error/message",'The error "'.concat(t,'" is identical to the message.'));n=r,r=void 0}else if(null!=r&&"object"!==i(r)&&"function"!=typeof r)throw new h("error",["Object","Error","Function","RegExp"],r);if(t===O){var o="";r&&r.name&&(o+=" (".concat(r.name,")")),o+=n?": ".concat(n):".";var s="rejects"===e.name?"rejection":"exception";k({actual:void 0,expected:r,operator:e.name,message:"Missing expected ".concat(s).concat(o),stackStartFn:e})}if(r&&!F(t,r,n,e))throw t}function P(e,t,r,n){if(t!==O){if("string"==typeof r&&(n=r,r=void 0),!r||F(t,r)){var i=n?": ".concat(n):".",o="doesNotReject"===e.name?"rejection":"exception";k({actual:t,expected:r,operator:e.name,message:"Got unwanted ".concat(o).concat(i,"\n")+'Actual message: "'.concat(t&&t.message,'"'),stackStartFn:e})}throw t}}function C(e,t,r,n,o){if(!w(t))throw new h("regexp","RegExp",t);var s="match"===o;if("string"!=typeof e||x(t,e)!==s){if(r instanceof Error)throw r;var a=!r;r=r||("string"!=typeof e?'The "string" argument must be of type string. Received type '+"".concat(i(e)," (").concat(m(e),")"):(s?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(m(t),". Input:\n\n").concat(m(e),"\n"));var u=new g({actual:e,expected:t,message:r,operator:o,stackStartFn:n});throw u.generatedMessage=a,u}}function M(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];T.apply(void 0,[M,t.length].concat(t))}B.throws=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];U.apply(void 0,[e,R(t)].concat(n))},B.rejects=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return L(t).then(function(t){return U.apply(void 0,[e,t].concat(n))})},B.doesNotThrow=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];P.apply(void 0,[e,R(t)].concat(n))},B.doesNotReject=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return L(t).then(function(t){return P.apply(void 0,[e,t].concat(n))})},B.ifError=function e(t){if(null!=t){var r="ifError got unwanted exception: ";"object"===i(t)&&"string"==typeof t.message?0===t.message.length&&t.constructor?r+=t.constructor.name:r+=t.message:r+=m(t);var n=new g({actual:t,expected:null,operator:"ifError",message:r,stackStartFn:e}),o=t.stack;if("string"==typeof o){var s=o.split("\n");s.shift();for(var a=n.stack.split("\n"),u=0;u<s.length;u++){var c=a.indexOf(s[u]);if(-1!==c){a=a.slice(0,c);break}}n.stack="".concat(a.join("\n"),"\n").concat(s.join("\n"))}throw n}},B.match=function e(t,r,n){C(t,r,n,e,"match")},B.doesNotMatch=function e(t,r,n){C(t,r,n,e,"doesNotMatch")},B.strict=_(M,B,{equal:B.strictEqual,deepEqual:B.deepStrictEqual,notEqual:B.notStrictEqual,notDeepEqual:B.notDeepStrictEqual}),B.strict.strict=B.strict},3918(e,t,r){"use strict";var n=r(65606);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach(function(t){var n,i,o;n=e,i=t,o=r[t],(i=a(i))in n?Object.defineProperty(n,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[i]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var t=function(e){if("object"!==y(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!==y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===y(t)?t:String(t)}function u(e,t){if(t&&("object"===y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return c(e)}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e){var t="function"==typeof Map?new Map:void 0;return f=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return l(e,arguments,d(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),p(n,e)},f(e)}function l(e,t,r){return l=h()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&p(i,r.prototype),i},l.apply(null,arguments)}function h(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}var g=r(94591).inspect,m=r(69597).codes.ERR_INVALID_ARG_TYPE;function v(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}var b="",w="",_="",E="",x={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function S(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach(function(t){r[t]=e[t]}),Object.defineProperty(r,"message",{value:e.message}),r}function A(e){return g(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var B=function(e,t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(B,e);var r,i,a,f,l=(r=B,i=h(),function(){var e,t=d(r);if(i){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return u(this,e)});function B(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,B),"object"!==y(e)||null===e)throw new m("options","Object",e);var r=e.message,i=e.operator,o=e.stackStartFn,s=e.actual,a=e.expected,f=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=r)t=l.call(this,String(r));else if(n.stderr&&n.stderr.isTTY&&(n.stderr&&n.stderr.getColorDepth&&1!==n.stderr.getColorDepth()?(b="",w="",E="",_=""):(b="",w="",E="",_="")),"object"===y(s)&&null!==s&&"object"===y(a)&&null!==a&&"stack"in s&&s instanceof Error&&"stack"in a&&a instanceof Error&&(s=S(s),a=S(a)),"deepStrictEqual"===i||"strictEqual"===i)t=l.call(this,function(e,t,r){var i="",o="",s=0,a="",u=!1,c=A(e),f=c.split("\n"),l=A(t).split("\n"),h=0,p="";if("strictEqual"===r&&"object"===y(e)&&"object"===y(t)&&null!==e&&null!==t&&(r="strictEqualObject"),1===f.length&&1===l.length&&f[0]!==l[0]){var d=f[0].length+l[0].length;if(d<=10){if(!("object"===y(e)&&null!==e||"object"===y(t)&&null!==t||0===e&&0===t))return"".concat(x[r],"\n\n")+"".concat(f[0]," !== ").concat(l[0],"\n")}else if("strictEqualObject"!==r&&d<(n.stderr&&n.stderr.isTTY?n.stderr.columns:80)){for(;f[0][h]===l[0][h];)h++;h>2&&(p="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,r-e.length)}(" ",h),"^"),h=0)}}for(var g=f[f.length-1],m=l[l.length-1];g===m&&(h++<2?a="\n ".concat(g).concat(a):i=g,f.pop(),l.pop(),0!==f.length&&0!==l.length);)g=f[f.length-1],m=l[l.length-1];var S=Math.max(f.length,l.length);if(0===S){var B=c.split("\n");if(B.length>30)for(B[26]="".concat(b,"...").concat(E);B.length>27;)B.pop();return"".concat(x.notIdentical,"\n\n").concat(B.join("\n"),"\n")}h>3&&(a="\n".concat(b,"...").concat(E).concat(a),u=!0),""!==i&&(a="\n ".concat(i).concat(a),i="");var O=0,k=x[r]+"\n".concat(w,"+ actual").concat(E," ").concat(_,"- expected").concat(E),T=" ".concat(b,"...").concat(E," Lines skipped");for(h=0;h<S;h++){var I=h-s;if(f.length<h+1)I>1&&h>2&&(I>4?(o+="\n".concat(b,"...").concat(E),u=!0):I>3&&(o+="\n ".concat(l[h-2]),O++),o+="\n ".concat(l[h-1]),O++),s=h,i+="\n".concat(_,"-").concat(E," ").concat(l[h]),O++;else if(l.length<h+1)I>1&&h>2&&(I>4?(o+="\n".concat(b,"...").concat(E),u=!0):I>3&&(o+="\n ".concat(f[h-2]),O++),o+="\n ".concat(f[h-1]),O++),s=h,o+="\n".concat(w,"+").concat(E," ").concat(f[h]),O++;else{var N=l[h],F=f[h],R=F!==N&&(!v(F,",")||F.slice(0,-1)!==N);R&&v(N,",")&&N.slice(0,-1)===F&&(R=!1,F+=","),R?(I>1&&h>2&&(I>4?(o+="\n".concat(b,"...").concat(E),u=!0):I>3&&(o+="\n ".concat(f[h-2]),O++),o+="\n ".concat(f[h-1]),O++),s=h,o+="\n".concat(w,"+").concat(E," ").concat(F),i+="\n".concat(_,"-").concat(E," ").concat(N),O+=2):(o+=i,i="",1!==I&&0!==h||(o+="\n ".concat(F),O++))}if(O>20&&h<S-2)return"".concat(k).concat(T,"\n").concat(o,"\n").concat(b,"...").concat(E).concat(i,"\n")+"".concat(b,"...").concat(E)}return"".concat(k).concat(u?T:"","\n").concat(o).concat(i).concat(a).concat(p)}(s,a,i));else if("notDeepStrictEqual"===i||"notStrictEqual"===i){var h=x[i],p=A(s).split("\n");if("notStrictEqual"===i&&"object"===y(s)&&null!==s&&(h=x.notStrictEqualObject),p.length>30)for(p[26]="".concat(b,"...").concat(E);p.length>27;)p.pop();t=1===p.length?l.call(this,"".concat(h," ").concat(p[0])):l.call(this,"".concat(h,"\n\n").concat(p.join("\n"),"\n"))}else{var d=A(s),g="",O=x[i];"notDeepEqual"===i||"notEqual"===i?(d="".concat(x[i],"\n\n").concat(d)).length>1024&&(d="".concat(d.slice(0,1021),"...")):(g="".concat(A(a)),d.length>512&&(d="".concat(d.slice(0,509),"...")),g.length>512&&(g="".concat(g.slice(0,509),"...")),"deepEqual"===i||"equal"===i?d="".concat(O,"\n\n").concat(d,"\n\nshould equal\n\n"):g=" ".concat(i," ").concat(g)),t=l.call(this,"".concat(d).concat(g))}return Error.stackTraceLimit=f,t.generatedMessage=!r,Object.defineProperty(c(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),t.code="ERR_ASSERTION",t.actual=s,t.expected=a,t.operator=i,Error.captureStackTrace&&Error.captureStackTrace(c(t),o),t.stack,t.name="AssertionError",u(t)}return a=B,(f=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(e,t){return g(this,o(o({},t),{},{customInspect:!1,depth:0}))}}])&&s(a.prototype,f),Object.defineProperty(a,"prototype",{writable:!1}),B}(f(Error),g.custom);e.exports=B},69597(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}var s,a,u={};function c(e,t,r){r||(r=Error);var s=function(r){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&i(e,t)}(f,r);var s,a,u,c=(a=f,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=o(a);if(u){var r=o(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function f(r,n,i){var o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),o=c.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,i)),o.code=e,o}return s=f,Object.defineProperty(s,"prototype",{writable:!1}),s}(r);u[e]=s}function f(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(e){return String(e)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}c("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),c("ERR_INVALID_ARG_TYPE",function(e,t,i){var o,a,u,c,l;if(void 0===s&&(s=r(94148)),s("string"==typeof e,"'name' must be a string"),"string"==typeof t&&(a="not ",t.substr(0,4)===a)?(o="must not be",t=t.replace(/^not /,"")):o="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-9,r)===t}(e," argument"))u="The ".concat(e," ").concat(o," ").concat(f(t,"type"));else{var h=("number"!=typeof l&&(l=0),l+1>(c=e).length||-1===c.indexOf(".",l)?"argument":"property");u='The "'.concat(e,'" ').concat(h," ").concat(o," ").concat(f(t,"type"))}return u+". Received type ".concat(n(i))},TypeError),c("ERR_INVALID_ARG_VALUE",function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===a&&(a=r(94591));var i=a.inspect(t);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(n,". Received ").concat(i)},TypeError,RangeError),c("ERR_INVALID_RETURN_VALUE",function(e,t,r){var i;return i=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(i,".")},TypeError),c("ERR_MISSING_ARGS",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];void 0===s&&(s=r(94148)),s(t.length>0,"At least one arg needs to be specified");var i="The ",o=t.length;switch(t=t.map(function(e){return'"'.concat(e,'"')}),o){case 1:i+="".concat(t[0]," argument");break;case 2:i+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:i+=t.slice(0,o-1).join(", "),i+=", and ".concat(t[o-1]," arguments")}return"".concat(i," must be specified")},TypeError),e.exports.codes=u},82299(e,t,r){"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,s,a=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(a.push(n.value),a.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}var s=void 0!==/a/g.flags,a=function(e){var t=[];return e.forEach(function(e){return t.push(e)}),t},u=function(e){var t=[];return e.forEach(function(e,r){return t.push([r,e])}),t},c=Object.is?Object.is:r(37653),f=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},l=Number.isNaN?Number.isNaN:r(24133);function h(e){return e.call.bind(e)}var p=h(Object.prototype.hasOwnProperty),d=h(Object.prototype.propertyIsEnumerable),y=h(Object.prototype.toString),g=r(94591).types,m=g.isAnyArrayBuffer,v=g.isArrayBufferView,b=g.isDate,w=g.isMap,_=g.isRegExp,E=g.isSet,x=g.isNativeError,S=g.isBoxedPrimitive,A=g.isNumberObject,B=g.isStringObject,O=g.isBooleanObject,k=g.isBigIntObject,T=g.isSymbolObject,I=g.isFloat32Array,N=g.isFloat64Array;function F(e){if(0===e.length||e.length>10)return!0;for(var t=0;t<e.length;t++){var r=e.charCodeAt(t);if(r<48||r>57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function R(e){return Object.keys(e).filter(F).concat(f(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function j(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0}function L(e,t,r,n){if(e===t)return 0!==e||!r||c(e,t);if(r){if("object"!==o(e))return"number"==typeof e&&l(e)&&l(t);if("object"!==o(t)||null===e||null===t)return!1;if(Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1}else{if(null===e||"object"!==o(e))return(null===t||"object"!==o(t))&&e==t;if(null===t||"object"!==o(t))return!1}var i,a,u,f,h=y(e);if(h!==y(t))return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;var p=R(e),d=R(t);return p.length===d.length&&P(e,t,r,n,1,p)}if("[object Object]"===h&&(!w(e)&&w(t)||!E(e)&&E(t)))return!1;if(b(e)){if(!b(t)||Date.prototype.getTime.call(e)!==Date.prototype.getTime.call(t))return!1}else if(_(e)){if(!_(t)||(u=e,f=t,!(s?u.source===f.source&&u.flags===f.flags:RegExp.prototype.toString.call(u)===RegExp.prototype.toString.call(f))))return!1}else if(x(e)||e instanceof Error){if(e.message!==t.message||e.name!==t.name)return!1}else{if(v(e)){if(r||!I(e)&&!N(e)){if(!function(e,t){return e.byteLength===t.byteLength&&0===j(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}(e,t))return!1}else if(!function(e,t){if(e.byteLength!==t.byteLength)return!1;for(var r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0}(e,t))return!1;var g=R(e),F=R(t);return g.length===F.length&&P(e,t,r,n,0,g)}if(E(e))return!(!E(t)||e.size!==t.size)&&P(e,t,r,n,2);if(w(e))return!(!w(t)||e.size!==t.size)&&P(e,t,r,n,3);if(m(e)){if(a=t,(i=e).byteLength!==a.byteLength||0!==j(new Uint8Array(i),new Uint8Array(a)))return!1}else if(S(e)&&!function(e,t){return A(e)?A(t)&&c(Number.prototype.valueOf.call(e),Number.prototype.valueOf.call(t)):B(e)?B(t)&&String.prototype.valueOf.call(e)===String.prototype.valueOf.call(t):O(e)?O(t)&&Boolean.prototype.valueOf.call(e)===Boolean.prototype.valueOf.call(t):k(e)?k(t)&&BigInt.prototype.valueOf.call(e)===BigInt.prototype.valueOf.call(t):T(t)&&Symbol.prototype.valueOf.call(e)===Symbol.prototype.valueOf.call(t)}(e,t))return!1}return P(e,t,r,n,0)}function U(e,t){return t.filter(function(t){return d(e,t)})}function P(e,t,r,i,s,c){if(5===arguments.length){c=Object.keys(e);var l=Object.keys(t);if(c.length!==l.length)return!1}for(var h=0;h<c.length;h++)if(!p(t,c[h]))return!1;if(r&&5===arguments.length){var y=f(e);if(0!==y.length){var g=0;for(h=0;h<y.length;h++){var m=y[h];if(d(e,m)){if(!d(t,m))return!1;c.push(m),g++}else if(d(t,m))return!1}var v=f(t);if(y.length!==v.length&&U(t,v).length!==g)return!1}else{var b=f(t);if(0!==b.length&&0!==U(t,b).length)return!1}}if(0===c.length&&(0===s||1===s&&0===e.length||0===e.size))return!0;if(void 0===i)i={val1:new Map,val2:new Map,position:0};else{var w=i.val1.get(e);if(void 0!==w){var _=i.val2.get(t);if(void 0!==_)return w===_}i.position++}i.val1.set(e,i.position),i.val2.set(t,i.position);var E=function(e,t,r,i,s,c){var f=0;if(2===c){if(!function(e,t,r,n){for(var i=null,s=a(e),u=0;u<s.length;u++){var c=s[u];if("object"===o(c)&&null!==c)null===i&&(i=new Set),i.add(c);else if(!t.has(c)){if(r)return!1;if(!D(e,t,c))return!1;null===i&&(i=new Set),i.add(c)}}if(null!==i){for(var f=a(t),l=0;l<f.length;l++){var h=f[l];if("object"===o(h)&&null!==h){if(!C(i,h,r,n))return!1}else if(!r&&!e.has(h)&&!C(i,h,r,n))return!1}return 0===i.size}return!0}(e,t,r,s))return!1}else if(3===c){if(!function(e,t,r,i){for(var s=null,a=u(e),c=0;c<a.length;c++){var f=n(a[c],2),l=f[0],h=f[1];if("object"===o(l)&&null!==l)null===s&&(s=new Set),s.add(l);else{var p=t.get(l);if(void 0===p&&!t.has(l)||!L(h,p,r,i)){if(r)return!1;if(!$(e,t,l,h,i))return!1;null===s&&(s=new Set),s.add(l)}}}if(null!==s){for(var d=u(t),y=0;y<d.length;y++){var g=n(d[y],2),m=g[0],v=g[1];if("object"===o(m)&&null!==m){if(!z(s,e,m,v,r,i))return!1}else if(!(r||e.has(m)&&L(e.get(m),v,!1,i)||z(s,e,m,v,!1,i)))return!1}return 0===s.size}return!0}(e,t,r,s))return!1}else if(1===c)for(;f<e.length;f++){if(!p(e,f)){if(p(t,f))return!1;for(var l=Object.keys(e);f<l.length;f++){var h=l[f];if(!p(t,h)||!L(e[h],t[h],r,s))return!1}return l.length===Object.keys(t).length}if(!p(t,f)||!L(e[f],t[f],r,s))return!1}for(f=0;f<i.length;f++){var d=i[f];if(!L(e[d],t[d],r,s))return!1}return!0}(e,t,r,c,i,s);return i.val1.delete(e),i.val2.delete(t),E}function C(e,t,r,n){for(var i=a(e),o=0;o<i.length;o++){var s=i[o];if(L(t,s,r,n))return e.delete(s),!0}return!1}function M(e){switch(o(e)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":e=+e;case"number":if(l(e))return!1}return!0}function D(e,t,r){var n=M(r);return null!=n?n:t.has(n)&&!e.has(n)}function $(e,t,r,n,i){var o=M(r);if(null!=o)return o;var s=t.get(o);return!(void 0===s&&!t.has(o)||!L(n,s,!1,i))&&!e.has(o)&&L(n,s,!1,i)}function z(e,t,r,n,i,o){for(var s=a(e),u=0;u<s.length;u++){var c=s[u];if(L(r,c,i,o)&&L(n,t.get(c),i,o))return e.delete(c),!0}return!1}e.exports={isDeepEqual:function(e,t){return L(e,t,!1)},isDeepStrictEqual:function(e,t){return L(e,t,!0)}}},33845(e){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},12078(e,t,r){"use strict";var n=r(47244),i=r(48184),o=r(25767),s=r(35680);function a(e){return e.call.bind(e)}var u="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,f=a(Object.prototype.toString),l=a(Number.prototype.valueOf),h=a(String.prototype.valueOf),p=a(Boolean.prototype.valueOf);if(u)var d=a(BigInt.prototype.valueOf);if(c)var y=a(Symbol.prototype.valueOf);function g(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function m(e){return"[object Map]"===f(e)}function v(e){return"[object Set]"===f(e)}function b(e){return"[object WeakMap]"===f(e)}function w(e){return"[object WeakSet]"===f(e)}function _(e){return"[object ArrayBuffer]"===f(e)}function E(e){return"undefined"!=typeof ArrayBuffer&&(_.working?_(e):e instanceof ArrayBuffer)}function x(e){return"[object DataView]"===f(e)}function S(e){return"undefined"!=typeof DataView&&(x.working?x(e):e instanceof DataView)}t.isArgumentsObject=n,t.isGeneratorFunction=i,t.isTypedArray=s,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):s(e)||S(e)},t.isUint8Array=function(e){return"Uint8Array"===o(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===o(e)},t.isUint16Array=function(e){return"Uint16Array"===o(e)},t.isUint32Array=function(e){return"Uint32Array"===o(e)},t.isInt8Array=function(e){return"Int8Array"===o(e)},t.isInt16Array=function(e){return"Int16Array"===o(e)},t.isInt32Array=function(e){return"Int32Array"===o(e)},t.isFloat32Array=function(e){return"Float32Array"===o(e)},t.isFloat64Array=function(e){return"Float64Array"===o(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===o(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===o(e)},m.working="undefined"!=typeof Map&&m(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(m.working?m(e):e instanceof Map)},v.working="undefined"!=typeof Set&&v(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(v.working?v(e):e instanceof Set)},b.working="undefined"!=typeof WeakMap&&b(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(b.working?b(e):e instanceof WeakMap)},w.working="undefined"!=typeof WeakSet&&w(new WeakSet),t.isWeakSet=function(e){return w(e)},_.working="undefined"!=typeof ArrayBuffer&&_(new ArrayBuffer),t.isArrayBuffer=E,x.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&x(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=S;var A="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function B(e){return"[object SharedArrayBuffer]"===f(e)}function O(e){return void 0!==A&&(void 0===B.working&&(B.working=B(new A)),B.working?B(e):e instanceof A)}function k(e){return g(e,l)}function T(e){return g(e,h)}function I(e){return g(e,p)}function N(e){return u&&g(e,d)}function F(e){return c&&g(e,y)}t.isSharedArrayBuffer=O,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===f(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===f(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===f(e)},t.isGeneratorObject=function(e){return"[object Generator]"===f(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===f(e)},t.isNumberObject=k,t.isStringObject=T,t.isBooleanObject=I,t.isBigIntObject=N,t.isSymbolObject=F,t.isBoxedPrimitive=function(e){return k(e)||T(e)||I(e)||N(e)||F(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(E(e)||O(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})},94591(e,t,r){var n=r(65606),i=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},o=/%[sdj%]/g;t.format=function(e){if(!b(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(c(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,i=n.length,s=String(e).replace(o,function(e){if("%%"===e)return"%";if(r>=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),a=n[r];r<i;a=n[++r])m(a)||!E(a)?s+=" "+a:s+=" "+c(a);return s},t.deprecate=function(e,r){if(void 0!==n&&!0===n.noDeprecation)return e;if(void 0===n)return function(){return t.deprecate(e,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(n.throwDeprecation)throw new Error(r);n.traceDeprecation?console.trace(r):console.error(r),i=!0}return e.apply(this,arguments)}};var s={},a=/^$/;if(n.env.NODE_DEBUG){var u=n.env.NODE_DEBUG;u=u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),a=new RegExp("^"+u+"$","i")}function c(e,r){var n={seen:[],stylize:l};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&t._extend(n,r),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=f),h(n,e,n.depth)}function f(e,t){var r=c.styles[t];return r?"["+c.colors[r][0]+"m"+e+"["+c.colors[r][1]+"m":e}function l(e,t){return e}function h(e,r,n){if(e.customInspect&&r&&A(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return b(i)||(i=h(e,i,n)),i}var o=function(e,t){if(w(t))return e.stylize("undefined","undefined");if(b(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return v(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,r);if(o)return o;var s=Object.keys(r),a=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),S(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return p(r);if(0===s.length){if(A(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(_(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(x(r))return e.stylize(Date.prototype.toString.call(r),"date");if(S(r))return p(r)}var c,f="",l=!1,E=["{","}"];return y(r)&&(l=!0,E=["[","]"]),A(r)&&(f=" [Function"+(r.name?": "+r.name:"")+"]"),_(r)&&(f=" "+RegExp.prototype.toString.call(r)),x(r)&&(f=" "+Date.prototype.toUTCString.call(r)),S(r)&&(f=" "+p(r)),0!==s.length||l&&0!=r.length?n<0?_(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=l?function(e,t,r,n,i){for(var o=[],s=0,a=t.length;s<a;++s)T(t,String(s))?o.push(d(e,t,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(d(e,t,r,n,i,!0))}),o}(e,r,n,a,s):s.map(function(t){return d(e,r,n,a,t,l)}),e.seen.pop(),function(e,t,r){return e.reduce(function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(c,f,E)):E[0]+f+E[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,r,n,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),T(n,i)||(s="["+i+"]"),a||(e.seen.indexOf(u.value)<0?(a=m(r)?h(e,u.value,null):h(e,u.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map(function(e){return" "+e}).join("\n").slice(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n")):a=e.stylize("[Circular]","special")),w(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.slice(1,-1),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function y(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function m(e){return null===e}function v(e){return"number"==typeof e}function b(e){return"string"==typeof e}function w(e){return void 0===e}function _(e){return E(e)&&"[object RegExp]"===B(e)}function E(e){return"object"==typeof e&&null!==e}function x(e){return E(e)&&"[object Date]"===B(e)}function S(e){return E(e)&&("[object Error]"===B(e)||e instanceof Error)}function A(e){return"function"==typeof e}function B(e){return Object.prototype.toString.call(e)}function O(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!s[e])if(a.test(e)){var r=n.pid;s[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else s[e]=function(){};return s[e]},t.inspect=c,c.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]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(12078),t.isArray=y,t.isBoolean=g,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=v,t.isString=b,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=w,t.isRegExp=_,t.types.isRegExp=_,t.isObject=E,t.isDate=x,t.types.isDate=x,t.isError=S,t.types.isNativeError=S,t.isFunction=A,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(33845);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(r=[O((e=new Date).getHours()),O(e.getMinutes()),O(e.getSeconds())].join(":"),[e.getDate(),k[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(56698),t._extend=function(e,t){if(!t||!E(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var I="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function N(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(I&&e[I]){var t;if("function"!=typeof(t=e[I]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,I,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise(function(e,n){t=e,r=n}),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push(function(e,n){e?r(e):t(n)});try{e.apply(this,i)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),I&&Object.defineProperty(t,I,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,i(e))},t.promisify.custom=I,t.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var i=t.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var o=this,s=function(){return i.apply(o,arguments)};e.apply(this,t).then(function(e){n.nextTick(s.bind(null,null,e))},function(e){n.nextTick(N.bind(null,e,s))})}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,i(e)),t}},34138(e,t,r){"use strict";var n=r(91185),i=r(75942),o=r(78412),s=r(22561);e.exports={Service:i.Service,assembleProtocol:o.assembleProtocol,discoverProtocol:i.discoverProtocol,parse:function(e,t){var r=o.read(e);return r.protocol?i.Service.forProtocol(r,t):n.Type.forSchema(r,t)},readProtocol:o.readProtocol,readSchema:o.readSchema},s.copyOwnProperties(n,e.exports)},91185(e,t,r){"use strict";var n=r(106);e.exports={Type:n.Type,parse:function(e,t){var r;if("string"==typeof e)try{r=JSON.parse(e)}catch(t){r=e}else r=e;return n.Type.forSchema(r,t)},types:n.builtins,combine:n.Type.forTypes,infer:n.Type.forValue}},23809(e,t,r){"use strict";var n=r(34138),i=r(21946),o=r(22561),s=r(88310),a=r(40537);function u(e,t){s.Readable.call(this),t=t||{},this._batchSize=t.batchSize||65536,this._blob=e,this._pos=0}function c(){s.Transform.call(this,{readableObjectMode:!0}),this._bufs=[]}a.inherits(u,s.Readable),u.prototype._read=function(){var e=this._pos;if(e>=this._blob.size)this.push(null);else{this._pos+=this._batchSize;var t=this._blob.slice(e,this._pos,this._blob.type),r=new FileReader,n=this;r.addEventListener("loadend",function e(t){r.removeEventListener("loadend",e,!1),t.error?n.emit("error",t.error):n.push(o.bufferFrom(r.result))},!1),r.readAsArrayBuffer(t)}},a.inherits(c,s.Transform),c.prototype._transform=function(e,t,r){this._bufs.push(e),r()},c.prototype._flush=function(e){this.push(new Blob(this._bufs,{type:"application/octet-binary"})),e()},e.exports={createBlobDecoder:function(e,t){return new u(e).pipe(new i.streams.BlockDecoder(t))},createBlobEncoder:function(e,t){var r=new i.streams.BlockEncoder(e,t),n=new c;return r.pipe(n),new s.Duplex({objectMode:!0,read:function(){var e=n.read();e?r(e):n.once("readable",r);var t=this;function r(e){t.push(e||n.read()),t.push(null)}},write:function(e,t,n){return r.write(e,t,n)}}).on("finish",function(){r.end()})},streams:i.streams},o.copyOwnProperties(n,e.exports)},78505(e,t,r){"use strict";var n=r(48287).Buffer;function i(){this.data=void 0}function o(e,t){var r=e[0],n=e[1],i=e[2],o=e[3];r=a(r,n,i,o,t[0],7,-680876936),o=a(o,r,n,i,t[1],12,-389564586),i=a(i,o,r,n,t[2],17,606105819),n=a(n,i,o,r,t[3],22,-1044525330),r=a(r,n,i,o,t[4],7,-176418897),o=a(o,r,n,i,t[5],12,1200080426),i=a(i,o,r,n,t[6],17,-1473231341),n=a(n,i,o,r,t[7],22,-45705983),r=a(r,n,i,o,t[8],7,1770035416),o=a(o,r,n,i,t[9],12,-1958414417),i=a(i,o,r,n,t[10],17,-42063),n=a(n,i,o,r,t[11],22,-1990404162),r=a(r,n,i,o,t[12],7,1804603682),o=a(o,r,n,i,t[13],12,-40341101),i=a(i,o,r,n,t[14],17,-1502002290),r=u(r,n=a(n,i,o,r,t[15],22,1236535329),i,o,t[1],5,-165796510),o=u(o,r,n,i,t[6],9,-1069501632),i=u(i,o,r,n,t[11],14,643717713),n=u(n,i,o,r,t[0],20,-373897302),r=u(r,n,i,o,t[5],5,-701558691),o=u(o,r,n,i,t[10],9,38016083),i=u(i,o,r,n,t[15],14,-660478335),n=u(n,i,o,r,t[4],20,-405537848),r=u(r,n,i,o,t[9],5,568446438),o=u(o,r,n,i,t[14],9,-1019803690),i=u(i,o,r,n,t[3],14,-187363961),n=u(n,i,o,r,t[8],20,1163531501),r=u(r,n,i,o,t[13],5,-1444681467),o=u(o,r,n,i,t[2],9,-51403784),i=u(i,o,r,n,t[7],14,1735328473),r=c(r,n=u(n,i,o,r,t[12],20,-1926607734),i,o,t[5],4,-378558),o=c(o,r,n,i,t[8],11,-2022574463),i=c(i,o,r,n,t[11],16,1839030562),n=c(n,i,o,r,t[14],23,-35309556),r=c(r,n,i,o,t[1],4,-1530992060),o=c(o,r,n,i,t[4],11,1272893353),i=c(i,o,r,n,t[7],16,-155497632),n=c(n,i,o,r,t[10],23,-1094730640),r=c(r,n,i,o,t[13],4,681279174),o=c(o,r,n,i,t[0],11,-358537222),i=c(i,o,r,n,t[3],16,-722521979),n=c(n,i,o,r,t[6],23,76029189),r=c(r,n,i,o,t[9],4,-640364487),o=c(o,r,n,i,t[12],11,-421815835),i=c(i,o,r,n,t[15],16,530742520),r=f(r,n=c(n,i,o,r,t[2],23,-995338651),i,o,t[0],6,-198630844),o=f(o,r,n,i,t[7],10,1126891415),i=f(i,o,r,n,t[14],15,-1416354905),n=f(n,i,o,r,t[5],21,-57434055),r=f(r,n,i,o,t[12],6,1700485571),o=f(o,r,n,i,t[3],10,-1894986606),i=f(i,o,r,n,t[10],15,-1051523),n=f(n,i,o,r,t[1],21,-2054922799),r=f(r,n,i,o,t[8],6,1873313359),o=f(o,r,n,i,t[15],10,-30611744),i=f(i,o,r,n,t[6],15,-1560198380),n=f(n,i,o,r,t[13],21,1309151649),r=f(r,n,i,o,t[4],6,-145523070),o=f(o,r,n,i,t[11],10,-1120210379),i=f(i,o,r,n,t[2],15,718787259),n=f(n,i,o,r,t[9],21,-343485551),e[0]=h(r,e[0]),e[1]=h(n,e[1]),e[2]=h(i,e[2]),e[3]=h(o,e[3])}function s(e,t,r,n,i,o){return t=h(h(t,e),h(n,o)),h(t<<i|t>>>32-i,r)}function a(e,t,r,n,i,o,a){return s(t&r|~t&n,e,t,i,o,a)}function u(e,t,r,n,i,o,a){return s(t&n|r&~n,e,t,i,o,a)}function c(e,t,r,n,i,o,a){return s(t^r^n,e,t,i,o,a)}function f(e,t,r,n,i,o,a){return s(r^(t|~n),e,t,i,o,a)}function l(e){var t,r=[];for(t=0;t<64;t+=4)r[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return r}function h(e,t){return e+t&4294967295}i.prototype.end=function(e){this.data=e},i.prototype.read=function(){return function(e){var t,r=function(e){var t,r=e.length,n=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=e.length;t+=64)o(n,l(e.substring(t-64,t)));e=e.substring(t-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<e.length;t++)i[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(i[t>>2]|=128<<(t%4<<3),t>55)for(o(n,i),t=0;t<16;t++)i[t]=0;return i[14]=8*r,o(n,i),n}(e),i=n.alloc?n.alloc(16):new n(16);for(t=0;t<4;t++)i.writeIntLE(r[t],4*t,4);return i}(this.data)},e.exports={createHash:function(e){if("md5"!==e)throw new Error("only md5 is supported in the browser");return new i}}},36161(e){"use strict";function t(){return new Error("unsupported in the browser")}e.exports={createImportHook:function(){return function(e,r,n){n(t())}},createSyncImportHook:function(){return function(){throw t()}},existsSync:function(){return!1},readFileSync:function(){throw t()}}},21946(e,t,r){"use strict";var n=r(65606),i=r(106),o=r(22561),s=r(48287),a=r(88310),u=r(40537),c=r(78559),f=s.Buffer,l={namespace:"org.apache.avro.file"},h=i.Type.forSchema("long",l),p=i.Type.forSchema({type:"map",values:"bytes"},l),d=i.Type.forSchema({name:"Header",type:"record",fields:[{name:"magic",type:{type:"fixed",name:"Magic",size:4}},{name:"meta",type:p},{name:"sync",type:{type:"fixed",name:"Sync",size:16}}]},l),y=i.Type.forSchema({name:"Block",type:"record",fields:[{name:"count",type:"long"},{name:"data",type:"bytes"},{name:"sync",type:"Sync"}]},l),g=o.bufferFrom("Obj"),m=u.format,v=o.Tap;function b(e,t){var r=!!(t=t||{}).noDecode;a.Duplex.call(this,{readableObjectMode:!r,allowHalfOpen:!1}),this._type=i.Type.forSchema(e),this._tap=new v(o.newBuffer(0)),this._writeCb=null,this._needPush=!1,this._readValue=B(r,this._type),this._finished=!1,this.on("finish",function(){this._finished=!0,this._read()})}function w(e){var t=!!(e=e||{}).noDecode;a.Duplex.call(this,{allowHalfOpen:!0,readableObjectMode:!t}),this._rType=void 0!==e.readerSchema?i.Type.forSchema(e.readerSchema):void 0,this._wType=null,this._codecs=e.codecs,this._codec=void 0,this._parseHook=e.parseHook,this._tap=new v(o.newBuffer(0)),this._blockTap=new v(o.newBuffer(0)),this._syncMarker=null,this._readValue=null,this._noDecode=t,this._queue=new o.OrderedQueue,this._decompress=null,this._index=0,this._remaining=void 0,this._needPush=!1,this._finished=!1,this.on("finish",function(){this._finished=!0,this._needPush&&this._read()})}function _(e,t){t=t||{},a.Transform.call(this,{writableObjectMode:!0,allowHalfOpen:!1}),this._type=i.Type.forSchema(e),this._writeValue=function(e,t){try{this._type._write(e,t)}catch(e){this.emit("typeError",e,t,this._type)}},this._tap=new v(o.newBuffer(t.batchSize||65536)),this.on("typeError",function(e){this.emit("error",e)})}function E(e,t){var r;if(t=t||{},a.Duplex.call(this,{allowHalfOpen:!0,writableObjectMode:!0}),i.Type.isType(e)?(r=e,e=void 0):r=i.Type.forSchema(e),this._schema=e,this._type=r,this._writeValue=function(e,t){try{this._type._write(e,t)}catch(e){return this.emit("typeError",e,t,this._type),!1}return!0},this._blockSize=t.blockSize||65536,this._tap=new v(o.newBuffer(this._blockSize)),this._codecs=t.codecs,this._codec=t.codec||"null",this._blockCount=0,this._syncMarker=t.syncMarker||(new o.Lcg).nextBuffer(16),this._queue=new o.OrderedQueue,this._pending=0,this._finished=!1,this._needHeader=!1,this._needPush=!1,this._metadata=t.metadata||{},!p.isValid(this._metadata))throw new Error("invalid metadata");var n=this._codec;if(this._compress=(this._codecs||E.getDefaultCodecs())[n],!this._compress)throw new Error(m("unsupported codec: %s",n));switch(void 0!==t.omitHeader&&(t.writeHeader=t.omitHeader?"never":"auto"),t.writeHeader){case!1:case"never":break;case void 0:case"auto":this._needHeader=!0;break;default:this._writeHeader()}this.on("finish",function(){this._finished=!0,this._blockCount?this._flushChunk():this._finished&&this._needPush&&this.push(null)}),this.on("typeError",function(e){this.emit("error",e)})}function x(e,t,r){this.valueCount=e,this.rawDataLength=t,this.compressedDataLength=r}function S(e,t,r,n){this.index=e,this.buf=t,this.cb=r,this.count=0|n}function A(e){var t=e.pos,r=y._read(e);return e.isValid()?r:(e.pos=t,null)}function B(e,t,r){if(e)return i=t._skip,function(e){var t=e.pos;return i(e),e.buf.slice(t,e.pos)};if(r){var n=r.createResolver(t);return function(e){return n._read(e)}}return function(e){return t._read(e)};var i}u.inherits(b,a.Duplex),b.prototype._write=function(e,t,r){this._writeCb=r;var n=this._tap;n.buf=f.concat([n.buf.slice(n.pos),e]),n.pos=0,this._needPush&&(this._needPush=!1,this._read())},b.prototype._read=function(){this._needPush=!1;var e=this._tap,t=e.pos,r=this._readValue(e);e.isValid()?this.push(r):this._finished?this.push(null):(e.pos=t,this._needPush=!0,this._writeCb&&this._writeCb())},u.inherits(w,a.Duplex),w.defaultCodecs=function(){return{null:function(e,t){t(null,e)},deflate:c.inflateRaw}},w.getDefaultCodecs=w.defaultCodecs,w.prototype._decodeHeader=function(){var e=this._tap;if(e.buf.length<g.length)return!1;if(!g.equals(e.buf.slice(0,g.length)))return this.emit("error",new Error("invalid magic bytes")),!1;var t=d._read(e);if(!e.isValid())return!1;this._codec=(t.meta["avro.codec"]||"null").toString();var r=this._codecs||w.getDefaultCodecs();if(this._decompress=r[this._codec],this._decompress){try{var n=JSON.parse(t.meta["avro.schema"].toString());this._parseHook&&(n=this._parseHook(n)),this._wType=i.Type.forSchema(n)}catch(e){return void this.emit("error",e)}try{this._readValue=B(this._noDecode,this._wType,this._rType)}catch(e){return void this.emit("error",e)}return this._syncMarker=t.sync,this.emit("metadata",this._wType,this._codec,t),!0}this.emit("error",new Error(m("unknown codec: %s",this._codec)))},w.prototype._write=function(e,t,r){var i=this._tap;i.buf=f.concat([i.buf,e]),i.pos=0,this._decodeHeader()?(this._write=this._writeChunk,this._write(o.newBuffer(0),t,r)):n.nextTick(r)},w.prototype._writeChunk=function(e,t,r){var n=this._tap;n.buf=f.concat([n.buf.slice(n.pos),e]),n.pos=0;for(var i,o=1;i=A(n);){if(!this._syncMarker.equals(i.sync))return void this.emit("error",new Error("invalid sync marker"));o++,this._decompress(i.data,this._createBlockCallback(i.data.length,i.count,s))}function s(){--o||r()}s()},w.prototype._createBlockCallback=function(e,t,r){var n=this,i=this._index++;return function(o,s){if(o){var a=new Error(m("%s codec decompression error",n._codec));a.cause=o,n.emit("error",a),r()}else n.emit("block",new x(t,s.length,e)),n._queue.push(new S(i,s,r,t)),n._needPush&&n._read()}},w.prototype._read=function(){this._needPush=!1;var e,t=this._blockTap;if(!this._remaining){var r=this._queue.pop();if(!r||!r.count)return this._finished?this.push(null):this._needPush=!0,void(r&&r.cb());r.cb(),this._remaining=r.count,t.buf=r.buf,t.pos=0}this._remaining--;try{if(e=this._readValue(t),!t.isValid())throw new Error("truncated block")}catch(e){return this._remaining=0,void this.emit("error",e)}this.push(e)},u.inherits(_,a.Transform),_.prototype._transform=function(e,t,r){var n=this._tap,i=n.buf,s=n.pos;if(this._writeValue(n,e),!n.isValid()){s&&this.push(function(e,t,r){var n=o.newBuffer(r);return e.copy(n,0,0,0+r),n}(n.buf,0,s));var a=n.pos-s;a>i.length&&(n.buf=o.newBuffer(2*a)),n.pos=0,this._writeValue(n,e)}r()},_.prototype._flush=function(e){var t=this._tap,r=t.pos;r&&this.push(t.buf.slice(0,r)),e()},u.inherits(E,a.Duplex),E.defaultCodecs=function(){return{null:function(e,t){t(null,e)},deflate:c.deflateRaw}},E.getDefaultCodecs=E.defaultCodecs,E.prototype._writeHeader=function(){var e=JSON.stringify(this._schema?this._schema:this._type.getSchema({exportAttrs:!0})),t=o.copyOwnProperties(this._metadata,{"avro.schema":o.bufferFrom(e),"avro.codec":o.bufferFrom(this._codec)},!0),r=new(d.getRecordConstructor())(g,t,this._syncMarker);this.push(r.toBuffer())},E.prototype._write=function(e,t,r){this._needHeader&&(this._writeHeader(),this._needHeader=!1);var n=this._tap,i=n.pos,s=!1;if(this._writeValue(n,e)){if(!n.isValid()){i&&(this._flushChunk(i,r),s=!0);var a=n.pos-i;a>this._blockSize&&(this._blockSize=2*a),n.buf=o.newBuffer(this._blockSize),n.pos=0,this._writeValue(n,e)}this._blockCount++}else n.pos=i;s||r()},E.prototype._flushChunk=function(e,t){var r=this._tap;e=e||r.pos,this._compress(r.buf.slice(0,e),this._createBlockCallback(e,t)),this._blockCount=0},E.prototype._read=function(){var e=this,t=this._queue.pop();t?(this.push(h.toBuffer(t.count,!0)),this.push(h.toBuffer(t.buf.length,!0)),this.push(t.buf),this.push(this._syncMarker),this._finished||t.cb()):this._finished&&!this._pending?n.nextTick(function(){e.push(null)}):this._needPush=!0},E.prototype._createBlockCallback=function(e,t){var r=this,n=this._index++,i=this._blockCount;return this._pending++,function(o,s){if(o){var a=new Error(m("%s codec compression error",r._codec));return a.cause=o,void r.emit("error",a)}r._pending--,r.emit("block",new x(i,e,s.length)),r._queue.push(new S(n,s,t,i)),r._needPush&&(r._needPush=!1,r._read())}},e.exports={BLOCK_TYPE:y,HEADER_TYPE:d,MAGIC_BYTES:g,streams:{BlockDecoder:w,BlockEncoder:E,RawDecoder:b,RawEncoder:_}}},75942(e,t,r){"use strict";var n=r(65606),i=r(106),o=r(22561),s=r(48287),a=r(37007),u=r(88310),c=r(40537),f=s.Buffer,l=o.Tap,h=i.Type,p=c.debuglog("avsc:services"),d=c.format,y={namespace:"org.apache.avro.ipc"},g=h.forSchema("boolean",y),m=h.forSchema({type:"map",values:"bytes"},y),v=h.forSchema("string",y),b=h.forSchema({name:"HandshakeRequest",type:"record",fields:[{name:"clientHash",type:{name:"MD5",type:"fixed",size:16}},{name:"clientProtocol",type:["null","string"],default:null},{name:"serverHash",type:"MD5"},{name:"meta",type:["null",m],default:null}]},y),w=h.forSchema({name:"HandshakeResponse",type:"record",fields:[{name:"match",type:{name:"HandshakeMatch",type:"enum",symbols:["BOTH","CLIENT","NONE"]}},{name:"serverProtocol",type:["null","string"],default:null},{name:"serverHash",type:["null","MD5"],default:null},{name:"meta",type:["null",m],default:null}]},y),_=new E("",h.forSchema({name:"PingRequest",type:"record",fields:[]},y),h.forSchema(["string"],y),h.forSchema("null",y));function E(e,t,r,n,i,o){if(this.name=e,!h.isType(t,"record"))throw new Error("invalid request type");if(this.requestType=t,!h.isType(r,"union")||!h.isType(r.getTypes()[0],"string"))throw new Error("invalid error type");if(this.errorType=r,i&&(!h.isType(n,"null")||r.getTypes().length>1))throw new Error("inapplicable one-way parameter");this.responseType=n,this.oneWay=!!i,this.doc=void 0!==o?""+o:void 0,Object.freeze(this)}function x(e,t,r,n,i){if("string"!=typeof e)return x.forProtocol(e,t);this.name=e,this._messagesByName=t||{},this.messages=Object.freeze(o.objectValues(this._messagesByName)),this._typesByName=r||{},this.types=Object.freeze(o.objectValues(this._typesByName)),this.protocol=n,this._hashStr=o.getHash(JSON.stringify(n)).toString("binary"),this.doc=n.doc?""+n.doc:void 0,this._server=i||this.createServer({silent:!0}),Object.freeze(this)}function S(e,t){t=t||{},a.EventEmitter.call(this),this._svc$=e,this._channels$=[],this._fns$=[],this._buffering$=!!t.buffering,this._cache$=t.cache||{},this._policy$=t.channelPolicy,this._strict$=!!t.strictTypes,this._timeout$=o.getOption(t,"timeout",1e4),t.remoteProtocols&&q(this._cache$,t.remoteProtocols,e,!0),this._svc$.messages.forEach(function(e){this[e.name]=this._createMessageHandler$(e)},this)}function A(e,t){t=t||{},a.EventEmitter.call(this),this.service=e,this._handlers={},this._fns=[],this._channels={},this._nextChannelId=1,this._cache=t.cache||{},this._defaultHandler=t.defaultHandler,this._sysErrFormatter=t.systemErrorFormatter,this._silent=!!t.silent,this._strict=!!t.strictTypes,t.remoteProtocols&&q(this._cache,t.remoteProtocols,e,!1),e.messages.forEach(function(e){var r=e.name;t.noCapitalize||(r=o.capitalize(r)),this["on"+r]=this._createMessageHandler(e)},this)}function B(e,t){t=t||{},a.EventEmitter.call(this),this.client=e,this.timeout=o.getOption(t,"timeout",e._timeout$),this._endWritable=!!o.getOption(t,"endWritable",!0),this._prefix=K(t.scope);var r=e._cache$,n=e._svc$,i=t.serverHash;i||(i=n.hash);var s=r[i];s||(s=r[i=n.hash]=new U(n,n,i)),this._adapter=s,this._registry=new L(this,16),this.pending=0,this.destroyed=!1,this.draining=!1,this.once("_eot",function(e,t){p("client channel EOT"),this.destroyed=!0,this.emit("eot",e,t)})}function O(e,t,r){B.call(this,e,r),this._writableFactory=t,r&&r.noPing||(p("emitting ping request"),this.ping())}function k(e,t,r,i){B.call(this,e,i),this._readable=t,this._writable=r,this._connected=!(!i||!i.noPing),this._readable.on("end",d),this._writable.on("finish",y);var s,a=this,u=null;function c(e){if(!a.destroyed){s=a._createHandshakeRequest(a._adapter,!e);var t=[b.toBuffer(s),o.bufferFrom([0,0])];a._writable.write({id:a._prefix,payload:t})}}function l(e){if(a._matchesPrefix(e.id)){var t=f.concat(e.payload);try{var r=z(w,t).head;r.serverHash&&(a._adapter=a._getAdapter(r))}catch(e){return void a.destroy(e)}var i=r.match;p("handshake match: %s",i),a.emit("handshake",s,r),"NONE"===i?n.nextTick(function(){c(!0)}):(p("successfully connected"),u&&(clearTimeout(u),u=null),a._readable.removeListener("data",l).on("data",h),a._connected=!0,a.emit("_ready"),s=null)}else p("discarding unscoped response %s (still connecting)",e.id)}function h(e){var t=e.id;if(a._matchesPrefix(t)){var r=a._registry.get(t);r&&n.nextTick(function(){p("received message %s",t),r(null,f.concat(e.payload),a._adapter)})}else p("discarding unscoped message %s",t)}function d(){a.destroy(!0)}function y(){a.destroy()}this.once("eot",function(){u&&(clearTimeout(u),u=null),a._connected||a.emit("_ready"),this._writable.removeListener("finish",y),this._endWritable&&(p("ending transport"),this._writable.end()),this._readable.removeListener("data",l).removeListener("data",h).removeListener("end",d)}),this._connected?this._readable.on("data",h):(this._readable.on("data",l),n.nextTick(c),a.timeout&&(u=setTimeout(function(){a.destroy(new Error("timeout"))},a.timeout)))}function T(e,t){t=t||{},a.EventEmitter.call(this),this.server=e,this._endWritable=!!o.getOption(t,"endWritable",!0),this._prefix=K(t.scope);var r=e._cache,n=e.service,i=n.hash;r[i]||(r[i]=new U(n,n,i)),this._adapter=null,this.destroyed=!1,this.draining=!1,this.pending=0,this.once("_eot",function(e,t){p("server channel EOT"),this.emit("eot",e,t)})}function I(e,t,r){T.call(this,e,r),this._writable=void 0;var i,o=this;function s(e){var t,r=e.id,n=f.concat(e.payload);try{var i=z(b,n),s=i.head,a=o._getAdapter(s)}catch(e){t=J("INVALID_HANDSHAKE_REQUEST",e)}var u=o._createHandshakeResponse(t,s);function c(e){if(!o.destroyed){if(!o._writable)return void o.once("_writable",function(){c(e)});o._writable.write({id:r,payload:[w.toBuffer(u),e]})}o._writable&&o._endWritable&&o._writable.end()}o.emit("handshake",s,u),t?c(o._encodeSystemError(t)):o._receive(i.tail,a,c)}function a(){o.destroy()}function u(e){i.removeListener("data",s).removeListener("end",a),o.destroy(e||!0)}n.nextTick(function(){i=t.call(o,function(e,t){n.nextTick(function(){e?u(e):(o._writable=t.on("finish",u),o.emit("_writable"))})}).on("data",s).on("end",a)})}function N(e,t,r,n){T.call(this,e,n),this._adapter=void 0,this._writable=r.on("finish",u),this._readable=t.on("data",o).on("end",a),this.once("_drain",function(){this._readable.removeListener("data",o).removeListener("data",s).removeListener("end",a)}).once("eot",function(){this._writable.removeListener("finish",u),this._endWritable&&this._writable.end()});var i=this;function o(e){var t=e.id;if(i._matchesPrefix(t)){var r,n=f.concat(e.payload);try{var a=z(b,n),u=a.head;i._adapter=i._getAdapter(u)}catch(e){r=J("INVALID_HANDSHAKE_REQUEST",e)}var c=i._createHandshakeResponse(r,u);i.emit("handshake",u,c),r?l(i._encodeSystemError(r)):(i._readable.removeListener("data",o).on("data",s),i._receive(a.tail,i._adapter,l))}function l(e){i.destroyed||i._writable.write({id:t,payload:[w.toBuffer(c),e]})}}function s(e){var t=e.id;if(i._matchesPrefix(t)){var r=f.concat(e.payload);i._receive(r,i._adapter,function(e,r){i.destroyed||r||i._writable.write({id:t,payload:[e]})})}}function a(){i.destroy()}function u(){i.destroy(!0)}}function F(e,t,r){this._msg=e,this.headers=t||{},this.request=r||{}}function R(e,t,r,n){this._msg=e,this.headers=t,this.error=r,this.response=n}function j(e,t){this.channel=t,this.locals={},this.message=e,Object.freeze(this)}function L(e,t){this._ctx=e,this._mask=-1>>>(0|t),this._id=0,this._n=0,this._cbs={}}function U(e,t,r,n){this._clientSvc=e,this._serverSvc=t,this._hash=r,this._isRemote=!!n,this._readers=V(e,t)}function P(){u.Transform.call(this,{readableObjectMode:!0}),this._id=void 0,this._buf=o.newBuffer(0),this._bufs=[],this.on("finish",function(){this.push(null)})}function C(){u.Transform.call(this,{writableObjectMode:!0}),this.on("finish",function(){this.push(null)})}function M(){u.Transform.call(this,{readableObjectMode:!0}),this._id=void 0,this._frameCount=0,this._buf=o.newBuffer(0),this._bufs=[],this.on("finish",function(){this.push(null)})}function D(){u.Transform.call(this,{writableObjectMode:!0}),this.on("finish",function(){this.push(null)})}function $(e){var t=o.newBuffer(4);return t.writeInt32BE(e),t}function z(e,t){var r=new l(t),n=e._read(r);if(!r.isValid())throw new Error(d("truncated %j",e.schema()));return{head:n,tail:r.buf.slice(r.pos)}}function H(e,t){return e.equals(t)?e:e.createResolver(t)}function V(e,t){var r={};return e.messages.forEach(function(e){var n=e.name,i=t.message(n);try{if(!i)throw new Error(d("missing server message: %s",n));if(i.oneWay!==e.oneWay)throw new Error(d("inconsistent one-way message: %s",n));r[n+"?"]=H(i.requestType,e.requestType),r[n+"*"]=H(e.errorType,i.errorType),r[n+"!"]=H(e.responseType,i.responseType)}catch(e){throw J("INCOMPATIBLE_PROTOCOL",e)}}),r}function q(e,t,r,n){Object.keys(t).forEach(function(i){var o,s,a=t[i];n?(o=r,s=x.forProtocol(a)):(o=x.forProtocol(a),s=r),e[i]=new U(o,s,i,!0)})}function G(e,t){var r={};return Object.keys(e).forEach(function(n){var i=e[n];if(i._isRemote){var o=t?i._serverSvc:i._clientSvc;r[n]=o.protocol}}),r}function W(e){return!!e&&"[object Error]"===Object.prototype.toString.call(e)}function Z(e,t){var r=new Error(e);return r.cause=t,r}function J(e,t){var r=Z(e.toLowerCase().replace(/_/g," "),t);return r.rpcCode=t&&t.rpcCode?t.rpcCode:e,r}function Y(e,t,r){var n,i,o,s=[];for(n=0,i=r.length;n<i;n++)(o=r[n]).type.isValid(t[o.name],{errorHook:c});var a=s.map(function(e){return d("%s = %j but expected %s",e.path,e.value,e.type)}).join(", "),u=new Error(d("%s (%s)",e,a));return u.details=s,u;function c(e,t,r){var n,i,a,u=[];for(n=0,i=e.length;n<i;n++)a=e[n],isNaN(a)?u.push("."+a):u.push("["+a+"]");s.push({path:o.name+u.join(""),value:t,type:r})}}function K(e){return e?o.getHash(e).readInt16BE(0)<<16:0}function X(e,t){return!((e^t)>>16)}function Q(e){return!(!e||!e.pipe)}function ee(e,t){var r=e.message(t);if(!r)throw new Error(d("unknown message: %s",t));return r}function te(e){var t,r=[e.wreq,e.wres],i=[];function o(){var r=i.pop();if(r){var n=!1;r.call(e.ctx,t,function(r){n?e.onError(Z("duplicate backward middleware call",r)):(t=r,n=!0,o())})}else e.onCompletion.call(e.ctx,t)}!function s(a){var u=!1;a<e.fns.length?e.fns[a].apply(e.ctx,r.concat(function(r,n){if(u)e.onError(Z("duplicate forward middleware call",r));else{if(u=!0,r||e.wres&&(void 0!==e.wres.error||void 0!==e.wres.response))return t=r,void o();n&&i.push(n),s(++a)}})):e.onTransition.apply(e.ctx,r.concat(function(r){u?e.onError(Z("duplicate handler call",r)):(u=!0,t=r,n.nextTick(o))}))}(0)}E.forSchema=function(e,t,r){if(r=r||{},!o.isValidName(e))throw new Error(d("invalid message name: %s",e));if(!Array.isArray(t.request))throw new Error(d("invalid message request: %s",e));var n=d("%s.%sRequest",y.namespace,o.capitalize(e)),i=h.forSchema({name:n,type:"record",namespace:r.namespace||"",fields:t.request},r);if(delete r.registry[n],!t.response)throw new Error(d("invalid message response: %s",e));var s=h.forSchema(t.response,r);if(void 0!==t.errors&&!Array.isArray(t.errors))throw new Error(d("invalid message errors: %s",e));return new E(e,i,h.forSchema(["string"].concat(t.errors||[]),r),s,!!t["one-way"],t.doc)},E.prototype.schema=h.prototype.getSchema,E.prototype._attrs=function(e){var t={request:this.requestType._attrs(e).fields,response:this.responseType._attrs(e)},r=this.doc;void 0!==r&&(t.doc=r);var n=this.errorType._attrs(e);return n.length>1&&(t.errors=n.slice(1)),this.oneWay&&(t["one-way"]=!0),t},o.addDeprecatedGetters(E,["name","errorType","requestType","responseType"]),E.prototype.isOneWay=c.deprecate(function(){return this.oneWay},"use `.oneWay` directly instead of `.isOneWay()`"),x.Client=S,x.Server=A,x.compatible=function(e,t){try{V(e,t)}catch(e){return!1}return!0},x.forProtocol=function(e,t){t=t||{};var r,n=e.protocol;if(!n)throw new Error("missing protocol name");if(void 0!==e.namespace)t.namespace=e.namespace;else{var i=/^(.*)\.[^.]+$/.exec(n);i&&(t.namespace=i[1])}return n=o.qualify(n,t.namespace),e.types&&e.types.forEach(function(e){h.forSchema(e,t)}),e.messages&&(r={},Object.keys(e.messages).forEach(function(n){r[n]=E.forSchema(n,e.messages[n],t)})),new x(n,r,t.registry,e)},x.isService=function(e){return!!e&&e.hasOwnProperty("_hashStr")},x.prototype.createClient=function(e){var t=new S(this,e);return n.nextTick(function(){if(e&&e.server){var r={objectMode:!0},n=[new u.PassThrough(r),new u.PassThrough(r)];e.server.createChannel({readable:n[0],writable:n[1]},r),t.createChannel({readable:n[1],writable:n[0]},r)}else e&&e.transport&&t.createChannel(e.transport)}),t},x.prototype.createServer=function(e){return new A(this,e)},Object.defineProperty(x.prototype,"hash",{enumerable:!0,get:function(){return o.bufferFrom(this._hashStr,"binary")}}),x.prototype.message=function(e){return this._messagesByName[e]},x.prototype.type=function(e){return this._typesByName[e]},x.prototype.inspect=function(){return d("<Service %j>",this.name)},o.addDeprecatedGetters(x,["message","messages","name","type","types"]),x.prototype.createEmitter=c.deprecate(function(e,t){t=t||{};var r,n,i=this.createClient({cache:t.cache,buffering:!1,strictTypes:t.strictErrors,timeout:t.timeout}),o=i.createChannel(e,t);return n=o,(r=i).on("error",function(e){n.emit("error",e,r)}),o},"use `.createClient()` instead of `.createEmitter()`"),x.prototype.createListener=c.deprecate(function(e,t){if(t&&t.strictErrors)throw new Error("use `.createServer()` to support strict errors");return this._server.createChannel(e,t)},"use `.createServer().createChannel()` instead of `.createListener()`"),x.prototype.emit=c.deprecate(function(e,t,r,n){if(!r||!this.equals(r.client._svc$))throw new Error("invalid emitter");var i=r.client;return S.prototype.emitMessage.call(i,e,t,n&&n.bind(this)),r.getPending()},"create a client via `.createClient()` to emit messages instead of `.emit()`"),x.prototype.equals=c.deprecate(function(e){return x.isService(e)&&this.getFingerprint().equals(e.getFingerprint())},"equality testing is deprecated, compare the `.protocol`s instead"),x.prototype.getFingerprint=c.deprecate(function(e){return o.getHash(JSON.stringify(this.protocol),e)},"use `.hash` instead of `.getFingerprint()`"),x.prototype.getSchema=c.deprecate(h.prototype.getSchema,"use `.protocol` instead of `.getSchema()`"),x.prototype.on=c.deprecate(function(e,t){var r=this;return this._server.onMessage(e,function(e,n){return t.call(r,e,this.channel,n)}),this},"use `.createServer().onMessage()` instead of `.on()`"),x.prototype.subprotocol=c.deprecate(function(){var e=this._server,t={strictTypes:e._strict,cache:e._cache},r=new A(e.service,t);return r._handlers=Object.create(e._handlers),new x(this.name,this._messagesByName,this._typesByName,this.protocol,r)},"`.subprotocol()` will be removed in 5.1"),x.prototype._attrs=function(e){var t={protocol:this.name},r=[];this.types.forEach(function(t){if(void 0!==t.getName()){var n=t._attrs(e);"string"!=typeof n&&r.push(n)}}),r.length&&(t.types=r);var n=Object.keys(this._messagesByName);return n.length&&(t.messages={},n.forEach(function(r){t.messages[r]=this._messagesByName[r]._attrs(e)},this)),e&&e.exportAttrs&&void 0!==this.doc&&(t.doc=this.doc),t},c.inherits(S,a.EventEmitter),S.prototype.activeChannels=function(){return this._channels$.slice()},S.prototype.createChannel=function(e,t){var r,n=t&&t.objectMode;if("function"==typeof e){var i;i=n?e:function(t){var n=new C,i=e(function(e,n){if(e)t(e);else{var i=(new P).once("error",function(e){r.destroy(e)});t(null,n.pipe(i))}});if(i)return n.pipe(i),n},r=new O(this,i,t)}else{var o,s;if(Q(e)?o=s=e:(o=e.readable,s=e.writable),!n){var a=new M;o=o.pipe(a);var u=new D;u.pipe(s),s=u}r=new k(this,o,s,t),n||(r.once("eot",function(){o.unpipe(a),u.unpipe(s)}),a.once("error",function(e){r.destroy(e)}))}var c=this._channels$;return c.push(r),r.once("_drain",function(){c.splice(c.indexOf(this),1)}),this._buffering$=!1,this.emit("channel",r),r},S.prototype.destroyChannels=function(e){this._channels$.forEach(function(t){t.destroy(e&&e.noWait)})},S.prototype.emitMessage=function(e,t,r,n){var i=new F(ee(this._svc$,e),{},t);this._emitMessage$(i,r,n)},S.prototype.remoteProtocols=function(){return G(this._cache$,!0)},Object.defineProperty(S.prototype,"service",{enumerable:!0,get:function(){return this._svc$}}),S.prototype.use=function(){var e,t,r;for(e=0,t=arguments.length;e<t;e++)r=arguments[e],this._fns$.push(r.length<3?r(this):r);return this},S.prototype._emitMessage$=function(e,t,r){r||"function"!=typeof t||(r=t,t=void 0);var i=this,o=this._channels$,s=o.length;if(s){var a;if(void 0===(t=t||{}).timeout&&(t.timeout=this._timeout$),1===s)a=o[0];else if(this._policy$){if(!(a=this._policy$(this._channels$.slice())))return void p("policy returned no channel, skipping call")}else a=o[Math.floor(Math.random()*s)];a._emit(e,t,function(e,t){var n=this,o=n.message.errorType;if(e)return i._strict$&&(e=o.clone(e.message,{wrapUnions:!0})),void s(e);function s(e,t){r?r.call(n,e,t):e&&i.emit("error",e)}t?(e=t.error,i._strict$||(void 0===e?e=null:h.isType(o,"union:unwrapped")?"string"==typeof e&&(e=new Error(e)):e&&e.string&&"string"==typeof e.string&&(e=new Error(e.string))),s(e,t.response)):s()})}else if(this._buffering$)p("no active client channels, buffering call"),this.once("channel",function(){this._emitMessage$(e,t,r)});else{var u=new Error("no active channels");n.nextTick(function(){r?r.call(new j(e._msg),u):i.emit("error",u)})}},S.prototype._createMessageHandler$=function(e){var t=e.requestType.getFields().map(function(e){return e.getName()}),r="return function "+e.name+"(";return t.length&&(r+=t.join(", ")+", "),r+="opts, cb) {\n",r+=" var req = {",r+=t.map(function(e){return e+": "+e}).join(", "),r+="};\n",r+=" return this.emitMessage('"+e.name+"', req, opts, cb);\n",r+="};",new Function(r)()},c.inherits(A,a.EventEmitter),A.prototype.activeChannels=function(){return o.objectValues(this._channels)},A.prototype.createChannel=function(e,t){var r,n=t&&t.objectMode;if("function"==typeof e){var i;i=n?e:function(t){var n=(new P).once("error",function(e){r.destroy(e)});return e(function(e,r){if(e)t(e);else{var n=new C;n.pipe(r),t(null,n)}}).pipe(n)},r=new I(this,i,t)}else{var o,s;if(Q(e)?o=s=e:(o=e.readable,s=e.writable),!n){var a=new M;o=o.pipe(a);var u=new D;u.pipe(s),s=u}r=new N(this,o,s,t),n||(r.once("eot",function(){o.unpipe(a),u.unpipe(s)}),a.once("error",function(e){r.destroy(e)}))}this.listeners("error").length||this.on("error",this._onError);var c=this._nextChannelId++,f=this._channels;return f[c]=r.once("eot",function(){delete f[c]}),this.emit("channel",r),r},A.prototype.onMessage=function(e,t){return ee(this.service,e),this._handlers[e]=t,this},A.prototype.remoteProtocols=function(){return G(this._cache,!1)},A.prototype.use=function(){var e,t,r;for(e=0,t=arguments.length;e<t;e++)r=arguments[e],this._fns.push(r.length<3?r(this):r);return this},A.prototype._createMessageHandler=function(e){var t=e.name,r=e.requestType.fields,n=r.length,i=r.length?", "+r.map(function(e){return"req."+e.name}).join(", "):"",o="return function (handler) {\n";return o+=" if (handler.length > "+n+") {\n",o+=" return this.onMessage('"+t+"', function (req, cb) {\n",o+=" return handler.call(this"+i+", cb);\n",o+=" });\n",o+=" } else {\n",o+=" return this.onMessage('"+t+"', function (req) {\n",o+=" return handler.call(this"+i+");\n",o+=" });\n",o+=" }\n",o+="};\n",new Function(o)()},A.prototype._onError=function(e){this._silent||"UNKNOWN_PROTOCOL"===e.rpcCode||(console.error(),e.rpcCode?(console.error(e.rpcCode),console.error(e.cause)):(console.error("INTERNAL_SERVER_ERROR"),console.error(e)))},c.inherits(B,a.EventEmitter),B.prototype.destroy=function(e){p("destroying client channel"),this.draining||(this.draining=!0,this.emit("_drain"));var t=this._registry,r=this.pending;e&&t.clear(),e||!r?W(e)?(p("fatal client channel error: %s",e),this.emit("_eot",r,e)):this.emit("_eot",r):p("client channel entering drain mode (%s pending)",r)},B.prototype.ping=function(e,t){t||"function"!=typeof e||(t=e,e=void 0);var r=this,n=new F(_);this._emit(n,{timeout:e},function(e){t?t.call(r,e):e&&r.destroy(e)})},B.prototype._createHandshakeRequest=function(e,t){var r=this.client._svc$;return{clientHash:r.hash,clientProtocol:t?null:JSON.stringify(r.protocol),serverHash:e._hash}},B.prototype._emit=function(e,t,r){var i=e._msg,o=i.oneWay?void 0:new R(i,{}),s=new j(i,this),a=this;function u(e,r,n){var o,s;if(a.destroyed)o=new Error("channel destroyed");else try{s=e.toBuffer()}catch(t){o=Y(d("invalid %j request",i.name),e,[{name:"headers",type:m},{name:"request",type:i.requestType}])}if(o)n(o);else{var u=t&&void 0!==t.timeout?t.timeout:a.timeout,c=a._registry.add(u,function(e,t,o){if(!e&&!i.oneWay)try{o._decodeResponse(t,r,i)}catch(t){e=t}n(e)});c|=a._prefix,p("sending message %s",c),a._send(c,s,!!i&&i.oneWay)}}function c(e){a.pending--,r.call(s,e,o),!a.draining||a.destroyed||a.pending||a.destroy()}function f(e){a.client.emit("error",e,a)}this.pending++,n.nextTick(function(){if(i.name){a.emit("outgoingCall",s,t);var r=a.client._fns$;p("starting client middleware chain (%s middleware)",r.length),te({fns:r,ctx:s,wreq:e,wres:o,onTransition:u,onCompletion:c,onError:f})}else u(e,o,c)})},B.prototype._getAdapter=function(e){var t=e.serverHash,r=this.client._cache$,n=r[t];if(n)return n;var i=JSON.parse(e.serverProtocol),o=x.forProtocol(i);return n=new U(this.client._svc$,o,t,!0),r[t]=n},B.prototype._matchesPrefix=function(e){return X(e,this._prefix)},B.prototype._send=o.abstractFunction,o.addDeprecatedGetters(B,["pending","timeout"]),B.prototype.getCache=c.deprecate(function(){return this.client._cache$},"use `.remoteProtocols()` instead of `.getCache()`"),B.prototype.getProtocol=c.deprecate(function(){return this.client._svc$},"use `.service` instead or `.getProtocol()`"),B.prototype.isDestroyed=c.deprecate(function(){return this.destroyed},"use `.destroyed` instead of `.isDestroyed`"),c.inherits(O,B),O.prototype._send=function(e,t){var r=this._registry.get(e),i=this._adapter,o=this;return n.nextTick(function s(a){if(!o.destroyed){var u=o._createHandshakeRequest(i,!a),c=o._writableFactory.call(o,function(e,t){e?r(e):t.on("data",function(e){p("received response %s",e.id);var t=f.concat(e.payload);try{var a=z(w,t),c=a.head;c.serverHash&&(i=o._getAdapter(c))}catch(e){return void r(e)}var l=c.match;p("handshake match: %s",l),o.emit("handshake",u,c),"NONE"===l?n.nextTick(function(){s(!0)}):(o._adapter=i,r(null,a.tail,i))})});c?(c.write({id:e,payload:[b.toBuffer(u),t]}),o._endWritable&&c.end()):r(new Error("invalid writable stream"))}}),!0},c.inherits(k,B),k.prototype._emit=function(){if(this._connected||this.draining)B.prototype._emit.apply(this,arguments);else{p("queuing request");var e,t,r=[];for(e=0,t=arguments.length;e<t;e++)r.push(arguments[e]);this.once("_ready",function(){this._emit.apply(this,r)})}},k.prototype._send=function(e,t,r){if(r){var i=this;n.nextTick(function(){i._registry.get(e)(null,o.bufferFrom([0,0,0]),i._adapter)})}return this._writable.write({id:e,payload:[t]})},c.inherits(T,a.EventEmitter),T.prototype.destroy=function(e){this.draining||(this.draining=!0,this.emit("_drain")),!e&&this.pending||(this.destroyed=!0,W(e)?(p("fatal server channel error: %s",e),this.emit("_eot",this.pending,e)):this.emit("_eot",this.pending))},T.prototype._createHandshakeResponse=function(e,t){var r=this.server.service,n=r.hash,i=t&&t.serverHash.equals(n);return{match:e?"NONE":i?"BOTH":"CLIENT",serverProtocol:i?null:JSON.stringify(r.protocol),serverHash:i?null:n}},T.prototype._getAdapter=function(e){var t=e.clientHash,r=this.server._cache[t];if(r)return r;if(!e.clientProtocol)throw J("UNKNOWN_PROTOCOL");var n=JSON.parse(e.clientProtocol);return r=new U(x.forProtocol(n),this.server.service,t,!0),this.server._cache[t]=r},T.prototype._matchesPrefix=function(e){return X(e,this._prefix)},T.prototype._receive=function(e,t,r){var n,i=this;try{n=t._decodeRequest(e)}catch(e){return void r(i._encodeSystemError(J("INVALID_REQUEST",e)))}var o=n._msg,s=new R(o,{});if(!o.name)return s.response=null,void r(s.toBuffer(),!1);var a=new j(o,this);i.emit("incomingCall",a);var u=this.server._fns;function c(e){i.server.emit("error",e,i)}p("starting server middleware chain (%s middleware)",u.length),i.pending++,te({fns:u,ctx:a,wreq:n,wres:s,onTransition:function(e,t,r){var n=i.server._handlers[o.name];if(n){var s=!o.oneWay;try{s?n.call(a,e.request,function(e,n){s=!1,t.error=e,t.response=n,r()}):(n.call(a,e.request),r())}catch(e){s?(s=!1,r(e)):c(e)}}else{var u=i.server._defaultHandler;if(u)u.call(a,e,t,r);else{var f=new Error(d("no handler for %s",o.name));r(J("NOT_IMPLEMENTED",f))}}},onCompletion:function(e){i.pending--;var t,n=i.server;if(!e){var a=s.error;n._strict||(W(a)?s.error=o.errorType.clone(a.message,{wrapUnions:!0}):null===a&&(a=s.error=void 0),void 0===a&&void 0===s.response&&o.responseType.isValid(null)&&(s.response=null));try{t=s.toBuffer()}catch(t){e=void 0!==s.error?Y(d("invalid %j error",o.name),s,[{name:"headers",type:m},{name:"error",type:o.errorType}]):Y(d("invalid %j response",o.name),s,[{name:"headers",type:m},{name:"response",type:o.responseType}])}}t?void 0!==a&&n.emit("error",J("APPLICATION_ERROR",a)):t=i._encodeSystemError(e,s.headers),r(t,o.oneWay),i.draining&&!i.pending&&i.destroy()},onError:c})},o.addDeprecatedGetters(T,["pending"]),T.prototype.getCache=c.deprecate(function(){return this.server._cache},"use `.remoteProtocols()` instead of `.getCache()`"),T.prototype.getProtocol=c.deprecate(function(){return this.server.service},"use `.service` instead of `.getProtocol()`"),T.prototype.isDestroyed=c.deprecate(function(){return this.destroyed},"use `.destroyed` instead of `.isDestroyed`"),T.prototype._encodeSystemError=function(e,t){var r,n,i=this.server;if(i.emit("error",e,this),i._sysErrFormatter?r=i._sysErrFormatter.call(this,e):e.rpcCode&&(r=e.message),t)try{n=m.toBuffer(t)}catch(e){i.emit("error",e,this)}return f.concat([n||o.bufferFrom([0]),o.bufferFrom([1,0]),v.toBuffer(r||"internal server error")])},c.inherits(I,T),c.inherits(N,T),F.prototype.toBuffer=function(){var e=this._msg;return f.concat([m.toBuffer(this.headers),v.toBuffer(e.name),e.requestType.toBuffer(this.request)])},R.prototype.toBuffer=function(){var e=m.toBuffer(this.headers),t=void 0!==this.error;return f.concat([e,g.toBuffer(t),t?this._msg.errorType.toBuffer(this.error):this._msg.responseType.toBuffer(this.response)])},L.prototype.get=function(e){return this._cbs[e&this._mask]},L.prototype.add=function(e,t){this._id=this._id+1&this._mask;var r,n=this,i=this._id;return e>0&&(r=setTimeout(function(){o(new Error("timeout"))},e)),this._cbs[i]=o,this._n++,i;function o(){n._cbs[i]&&(delete n._cbs[i],n._n--,r&&clearTimeout(r),t.apply(n._ctx,arguments))}},L.prototype.clear=function(){Object.keys(this._cbs).forEach(function(e){this._cbs[e](new Error("interrupted"))},this)},U.prototype._decodeRequest=function(e){var t,r,n=new l(e),i=m._read(n),o=v._read(n);if(o?(t=this._serverSvc.message(o),r=this._readers[o+"?"]._read(n)):t=_,!n.isValid())throw new Error(d("truncated %s request",o||"ping$"));return new F(t,i,r)},U.prototype._decodeResponse=function(e,t,r){var n=new l(e);o.copyOwnProperties(m._read(n),t.headers,!0);var i=g._read(n),s=r.name;if(s){var a=this._readers[s+(i?"*":"!")];if(r=this._clientSvc.message(s),i?t.error=a._read(n):t.response=a._read(n),!n.isValid())throw new Error(d("truncated %s response",s))}else r=_},c.inherits(P,u.Transform),P.prototype._transform=function(e,t,r){var n;for(e=f.concat([this._buf,e]);e.length>=4&&e.length>=(n=e.readInt32BE(0))+4;){if(n)this._bufs.push(e.slice(4,n+4));else{var i=this._bufs;this._bufs=[],this.push({id:null,payload:i})}e=e.slice(n+4)}this._buf=e,r()},P.prototype._flush=function(e){if(this._buf.length||this._bufs.length){var t=this._bufs.slice();t.unshift(this._buf);var r=J("TRAILING_DATA");r.trailingData=f.concat(t).toString(),this.emit("error",r)}e()},c.inherits(C,u.Transform),C.prototype._transform=function(e,t,r){var n,i,o,s=e.payload;for(n=0,i=s.length;n<i;n++)o=s[n],this.push($(o.length)),this.push(o);this.push($(0)),r()},c.inherits(M,u.Transform),M.prototype._transform=function(e,t,r){for(e=f.concat([this._buf,e]);;){if(void 0===this._id){if(e.length<8)return this._buf=e,void r();this._id=e.readInt32BE(0),this._frameCount=e.readInt32BE(4),e=e.slice(8)}for(var n;this._frameCount&&e.length>=4&&e.length>=(n=e.readInt32BE(0))+4;)this._frameCount--,this._bufs.push(e.slice(4,n+4)),e=e.slice(n+4);if(this._frameCount)return this._buf=e,void r();var i={id:this._id,payload:this._bufs};this._bufs=[],this._id=void 0,this.push(i)}},M.prototype._flush=P.prototype._flush,c.inherits(D,u.Transform),D.prototype._transform=function(e,t,r){var n,i,s=e.payload,a=s.length;for((n=o.newBuffer(8)).writeInt32BE(e.id,0),n.writeInt32BE(a,4),this.push(n),i=0;i<a;i++)n=s[i],this.push($(n.length)),this.push(n);r()},e.exports={Adapter:U,HANDSHAKE_REQUEST_TYPE:b,HANDSHAKE_RESPONSE_TYPE:w,Message:E,Registry:L,Service:x,discoverProtocol:function(e,t,r){var n;void 0===r&&"function"==typeof t&&(r=t,t=void 0),new x({protocol:"Empty"},y).createClient({timeout:t&&t.timeout}).createChannel(e,{scope:t&&t.scope,endWritable:"function"==typeof e}).once("handshake",function(e,t){n=t.serverProtocol,this.destroy(!0)}).once("eot",function(e,t){t&&!/interrupted/.test(t)?r(t):r(null,JSON.parse(n))})},streams:{FrameDecoder:P,FrameEncoder:C,NettyDecoder:M,NettyEncoder:D}}},78412(e,t,r){"use strict";var n=r(36161),i=r(22561),o=r(43627),s=r(40537).format,a={date:{type:"int",logicalType:"date"},decimal:{type:"bytes",logicalType:"decimal"},time_ms:{type:"long",logicalType:"time-millis"},timestamp_ms:{type:"long",logicalType:"timestamp-millis"}};function u(e,t,r){r||"function"!=typeof t||(r=t,t=void 0),(t=t||{}).importHook||(t.importHook=n.createImportHook()),function e(r,n){t.importHook(r,"idl",function(i,a){if(i)n(i);else if(void 0!==a){try{var u=new c(a,t)._readProtocol(a,t)}catch(i){return i.path=r,void n(i)}!function(r,n,i,a){var u=[];!function c(){var f=n.shift();if(f){var l=o.join(i,f.name);"idl"===f.kind?e(l,function(e,t){e?a(e):(t&&u.push(t),c())}):t.importHook(l,f.kind,function(e,t){if(e)a(e);else switch(f.kind){case"protocol":case"schema":if(void 0===t)return void c();try{var r=JSON.parse(t)}catch(e){return e.path=l,void a(e)}var n="schema"===f.kind?{types:[r]}:r;return u.push(n),void c();default:a(new Error(s("invalid import kind: %s",f.kind)))}})}else{u.reverse();try{u.forEach(function(e){!function(e,t){var r=t.types||[];r.reverse(),r.forEach(function(r){e.types||(e.types=[]),void 0===r.namespace&&(r.namespace=h(t)||""),e.types.unshift(r)}),Object.keys(t.messages||{}).forEach(function(r){if(e.messages||(e.messages={}),e.messages[r])throw new Error(s("duplicate message: %s",r));e.messages[r]=t.messages[r]})}(r,e)})}catch(e){return void a(e)}a(null,r)}}()}(u.protocol,u.imports,o.dirname(r),n)}else n()})}(e,function(e,t){if(e)r(e);else if(t){var n=t.types;if(n){var i=h(t)||"";n.forEach(function(e){e.namespace===i&&delete e.namespace})}r(null,t)}else r(new Error("empty root import"))})}function c(e,t){t=t||{},this._tk=new f(e),this._ackVoidMessages=!!t.ackVoidMessages,this._implicitTags=!t.delimitedCollections,this._typeRefs=t.typeRefs||a}function f(e){this._str=e,this.pos=0}function l(e){for(var t=e.replace(/^[ \t]+|[ \t]+$/g,"").split("\n").map(function(e,t){return t?e.replace(/^\s*\*\s?/,""):e});t.length&&!t[0];)t.shift();for(;t.length&&!t[t.length-1];)t.pop();return t.join("\n")}function h(e){if(e.namespace)return e.namespace;var t=/^(.*)\.[^.]+$/.exec(e.protocol);return t?t[1]:void 0}c.readProtocol=function(e,t){var r=new c(e,t)._readProtocol();if(r.imports.length)throw new Error("unresolvable import");return r.protocol},c.readSchema=function(e,t){var r=new c(e,t),n=r._readJavadoc(),i=r._readType(void 0===n?{}:{doc:n},!0);return r._tk.next({id:"(eof)"}),i},c.prototype._readProtocol=function(){var e,t=this._tk,r=[],n=[],i={};this._readImports(r);var o={},a=this._readJavadoc();for(void 0!==a&&(o.doc=a),this._readAnnotations(o),t.next({val:"protocol"}),t.next({val:"{",silent:!0})||(o.protocol=t.next({id:"name"}).val,t.next({val:"{"}));!t.next({val:"}",silent:!0});)if(!this._readImports(r)){var u=this._readJavadoc(),c=this._readType({},!0),f=this._readImports(r,!0),l=void 0;if(e=t.pos,!f&&(l=this._readMessage(c))){void 0!==u&&void 0===l.schema.doc&&(l.schema.doc=u);var h=!1;if("void"!==l.schema.response&&"void"!==l.schema.response.type||(h=!this._ackVoidMessages&&!l.schema.errors,"void"===l.schema.response?l.schema.response="null":l.schema.response.type="null"),h&&(l.schema["one-way"]=!0),i[l.name])throw new Error(s("duplicate message: %s",l.name));i[l.name]=l.schema}else u&&("string"==typeof c?c={doc:u,type:c}:void 0===c.doc&&(c.doc=u)),n.push(c),t.pos=e,t.next({val:";",silent:!0});u=void 0}return t.next({id:"(eof)"}),n.length&&(o.types=n),Object.keys(i).length&&(o.messages=i),{protocol:o,imports:r}},c.prototype._readAnnotations=function(e){for(var t=this._tk;t.next({val:"@",silent:!0});){for(var r=[];!t.next({val:"(",silent:!0});)r.push(t.next().val);e[r.join("")]=t.next({id:"json"}).val,t.next({val:")"})}},c.prototype._readMessage=function(e){var t=this._tk,r={request:[],response:e};this._readAnnotations(r);var n=t.next().val;if("("===t.next().val){if(!t.next({val:")",silent:!0}))do{r.request.push(this._readField())}while(!t.next({val:")",silent:!0})&&t.next({val:","}));var i=t.next();switch(i.val){case"throws":r.errors=[];do{r.errors.push(this._readType())}while(!t.next({val:";",silent:!0})&&t.next({val:","}));break;case"oneway":r["one-way"]=!0,t.next({val:";"});break;case";":break;default:throw t.error("invalid message suffix",i)}return{name:n,schema:r}}},c.prototype._readJavadoc=function(){var e=this._tk.next({id:"javadoc",emitJavadoc:!0,silent:!0});if(e)return e.val},c.prototype._readField=function(){var e=this._tk,t=this._readJavadoc(),r={type:this._readType()};return void 0!==t&&void 0===r.doc&&(r.doc=t),this._readAnnotations(r),r.name=e.next({id:"name"}).val,e.next({val:"=",silent:!0})&&(r.default=e.next({id:"json"}).val),r},c.prototype._readType=function(e,t){switch(e=e||{},this._readAnnotations(e),e.type=this._tk.next({id:"name"}).val,e.type){case"record":case"error":return this._readRecord(e);case"fixed":return this._readFixed(e);case"enum":return this._readEnum(e,t);case"map":return this._readMap(e);case"array":return this._readArray(e);case"union":if(Object.keys(e).length>1)throw new Error("union annotations are not supported");return this._readUnion();default:var r=this._typeRefs[e.type];return r&&(delete e.type,i.copyOwnProperties(r,e)),Object.keys(e).length>1?e:e.type}},c.prototype._readFixed=function(e){var t=this._tk;return t.next({val:"(",silent:!0})||(e.name=t.next({id:"name"}).val,t.next({val:"("})),e.size=parseInt(t.next({id:"number"}).val),t.next({val:")"}),e},c.prototype._readMap=function(e){var t=this._tk,r=this._implicitTags,n=void 0===t.next({val:"<",silent:r});return e.values=this._readType(),t.next({val:">",silent:n}),e},c.prototype._readArray=function(e){var t=this._tk,r=this._implicitTags,n=void 0===t.next({val:"<",silent:r});return e.items=this._readType(),t.next({val:">",silent:n}),e},c.prototype._readEnum=function(e,t){var r=this._tk;r.next({val:"{",silent:!0})||(e.name=r.next({id:"name"}).val,r.next({val:"{"})),e.symbols=[];do{e.symbols.push(r.next().val)}while(!r.next({val:"}",silent:!0})&&r.next({val:","}));return t&&r.next({val:"=",silent:!0})&&(e.default=r.next().val,r.next({val:";"})),e},c.prototype._readUnion=function(){var e=this._tk,t=[];e.next({val:"{"});do{t.push(this._readType())}while(!e.next({val:"}",silent:!0})&&e.next({val:","}));return t},c.prototype._readRecord=function(e){var t=this._tk;for(t.next({val:"{",silent:!0})||(e.name=t.next({id:"name"}).val,t.next({val:"{"})),e.fields=[];!t.next({val:"}",silent:!0});)e.fields.push(this._readField()),t.next({val:";"});return e},c.prototype._readImports=function(e,t){for(var r=this._tk,n=0,i=r.pos;r.next({val:"import",silent:!0});){if(!n&&t&&r.next({val:"(",silent:!0}))return void(r.pos=i);var o=r.next({id:"name"}).val,s=JSON.parse(r.next({id:"string"}).val);r.next({val:";"}),e.push({kind:o,name:s}),n++}return n},f.prototype.next=function(e){var t,r={pos:this.pos,id:void 0,val:void 0},n=this._skip(e&&e.emitJavadoc);if("string"==typeof n)r.id="javadoc",r.val=n;else{var i=this.pos,o=this._str,a=o.charAt(i);if(a)if(e&&"json"===e.id?(r.id="json",this.pos=this._endOfJson()):'"'===a?(r.id="string",this.pos=this._endOfString()):/[0-9]/.test(a)?(r.id="number",this.pos=this._endOf(/[0-9]/)):/[`A-Za-z_.]/.test(a)?(r.id="name",this.pos=this._endOf(/[`A-Za-z0-9_.]/)):(r.id="operator",this.pos=i+1),r.val=o.slice(i,this.pos),"json"===r.id)try{r.val=JSON.parse(r.val)}catch(t){throw this.error("invalid JSON",r)}else"name"===r.id&&(r.val=r.val.replace(/`/g,""));else r.id="(eof)"}if(e&&e.id&&e.id!==r.id?t=this.error(s("expected ID %s",e.id),r):e&&e.val&&e.val!==r.val&&(t=this.error(s("expected value %s",e.val),r)),t){if(e&&e.silent)return void(this.pos=r.pos);throw t}return r},f.prototype.error=function(e,t){var r,n="number"!=typeof t,i=n?t.pos:t,o=this._str,a=1,u=0;for(r=0;r<i;r++)"\n"===o.charAt(r)&&(a++,u=r);var c=n?s("invalid token %j: %s",t,e):e,f=new Error(c);return f.token=n?t:void 0,f.lineNum=a,f.colNum=i-u,f},f.prototype._skip=function(e){for(var t,r,n=this._str,i=!1;(r=n.charAt(this.pos))&&/\s/.test(r);)this.pos++;if(t=this.pos,"/"===r)switch(n.charAt(this.pos+1)){case"/":for(this.pos+=2;(r=n.charAt(this.pos))&&"\n"!==r;)this.pos++;return this._skip(e);case"*":for(this.pos+=2,"*"===n.charAt(this.pos)&&(i=!0);r=n.charAt(this.pos++);)if("*"===r&&"/"===n.charAt(this.pos))return this.pos++,i&&e?l(n.slice(t+3,this.pos-2)):this._skip(e);throw this.error("unterminated comment",t)}},f.prototype._endOf=function(e){for(var t=this.pos,r=this._str;e.test(r.charAt(t));)t++;return t},f.prototype._endOfString=function(){for(var e,t=this.pos+1,r=this._str;e=r.charAt(t);){if('"'===e)return t+1;"\\"===e?t+=2:t++}throw this.error("unterminated string",t-1)},f.prototype._endOfJson=function(){var e=i.jsonEnd(this._str,this.pos);if(e<0)throw this.error("invalid JSON",e);return e},e.exports={Tokenizer:f,assembleProtocol:u,read:function(e){var t;if("string"==typeof e&&~e.indexOf(o.sep)&&n.existsSync(e)){var r=n.readFileSync(e,{encoding:"utf8"});try{return JSON.parse(r)}catch(i){u(e,{importHook:n.createSyncImportHook()},function(e,n){t=e?r:n})}}else t=e;if("string"!=typeof t||"null"===t)return t;try{return JSON.parse(t)}catch(e){try{return c.readProtocol(t)}catch(e){try{return c.readSchema(t)}catch(e){return t}}}},readProtocol:c.readProtocol,readSchema:c.readSchema}},106(e,t,r){"use strict";var n=r(22561),i=r(48287),o=r(40537),s=i.Buffer,a=n.Tap,u=o.debuglog("avsc:types"),c=o.format,f={array:N,boolean:v,bytes:S,double:E,enum:k,error:F,fixed:T,float:_,int:b,long:w,map:I,null:m,record:F,string:x},l=new n.Lcg,h=new a(n.newSlowBuffer(1024)),p=null,d=[];function y(e,t){var r;if(p?(r=p,d.push([p,this]),p=null):r=this,this._hash=new P,this.name=void 0,this.aliases=void 0,this.doc=e&&e.doc?""+e.doc:void 0,e){var n=e.name,i=void 0===e.namespace?t&&t.namespace:e.namespace;if(void 0!==n){if($(n=W(n,i)))throw new Error(c("cannot rename primitive type: %j",n));var o=t&&t.registry;if(o){if(void 0!==o[n])throw new Error(c("duplicate type name: %s",n));o[n]=r}}else if(t&&t.noAnonymousTypes)throw new Error(c("missing name property in schema: %j",e));this.name=n,this.aliases=e.aliases?e.aliases.map(function(e){return W(e,i)}):[]}}function g(e){y.call(this),this._branchConstructor=this._createBranchConstructor(),e||Object.freeze(this)}function m(){g.call(this)}function v(){g.call(this)}function b(){g.call(this)}function w(){g.call(this)}function _(){g.call(this)}function E(){g.call(this)}function x(){g.call(this)}function S(){g.call(this)}function A(e,t){if(y.call(this),!Array.isArray(e))throw new Error(c("non-array union schema: %j",e));if(!e.length)throw new Error("empty union");this.types=Object.freeze(e.map(function(e){return y.forSchema(e,t)})),this._branchIndices={},this.types.forEach(function(e,t){if(y.isType(e,"union"))throw new Error("unions cannot be directly nested");var r=e.branchName;if(void 0!==this._branchIndices[r])throw new Error(c("duplicate union branch name: %j",r));this._branchIndices[r]=t},this)}function B(e,t){A.call(this,e,t),this._dynamicBranches=null,this._bucketIndices={},this.types.forEach(function(e,t){if(y.isType(e,"abstract","logical"))this._dynamicBranches||(this._dynamicBranches=[]),this._dynamicBranches.push({index:t,type:e});else{var r=Z(e);if(void 0!==this._bucketIndices[r])throw new Error(c("ambiguous unwrapped union: %j",this));this._bucketIndices[r]=t}},this),Object.freeze(this)}function O(e,t){A.call(this,e,t),Object.freeze(this)}function k(e,t){if(y.call(this,e,t),!Array.isArray(e.symbols)||!e.symbols.length)throw new Error(c("invalid enum symbols: %j",e.symbols));if(this.symbols=Object.freeze(e.symbols.slice()),this._indices={},this.symbols.forEach(function(e,t){if(!n.isValidName(e))throw new Error(c("invalid %s symbol: %j",this,e));if(void 0!==this._indices[e])throw new Error(c("duplicate %s symbol: %j",this,e));this._indices[e]=t},this),this.default=e.default,void 0!==this.default&&void 0===this._indices[this.default])throw new Error(c("invalid %s default: %j",this,this.default));this._branchConstructor=this._createBranchConstructor(),Object.freeze(this)}function T(e,t){if(y.call(this,e,t),e.size!==(0|e.size)||e.size<0)throw new Error(c("invalid %s size",this.branchName));this.size=0|e.size,this._branchConstructor=this._createBranchConstructor(),Object.freeze(this)}function I(e,t){if(y.call(this),!e.values)throw new Error(c("missing map values: %j",e));this.valuesType=y.forSchema(e.values,t),this._branchConstructor=this._createBranchConstructor(),Object.freeze(this)}function N(e,t){if(y.call(this),!e.items)throw new Error(c("missing array items: %j",e));this.itemsType=y.forSchema(e.items,t),this._branchConstructor=this._createBranchConstructor(),Object.freeze(this)}function F(e,t){var r=(t=t||{}).namespace;if(void 0!==e.namespace)t.namespace=e.namespace;else if(e.name){var i=n.impliedNamespace(e.name);void 0!==i&&(t.namespace=i)}if(y.call(this,e,t),!Array.isArray(e.fields))throw new Error(c("non-array record fields: %j",e.fields));if(n.hasDuplicates(e.fields,function(e){return e.name}))throw new Error(c("duplicate field name: %j",e.fields));this._fieldsByName={},this.fields=Object.freeze(e.fields.map(function(e){var r=new L(e,t);return this._fieldsByName[r.name]=r,r},this)),this._branchConstructor=this._createBranchConstructor(),this._isError="error"===e.type,this.recordConstructor=this._createConstructor(t.errorStackTraces,t.omitRecordMethods),this._read=this._createReader(),this._skip=this._createSkipper(),this._write=this._createWriter(),this._check=this._createChecker(),t.namespace=r,Object.freeze(this)}function R(e,t){this._logicalTypeName=e.logicalType,y.call(this),p=this;try{this._underlyingType=y.forSchema(e,t)}finally{p=null;var r=d.length;r&&d[r-1][0]===this&&d.pop()}y.isType(this.underlyingType,"union")?this._branchConstructor=this.underlyingType._branchConstructor:this._branchConstructor=this.underlyingType._createBranchConstructor()}function j(e){this._concreteTypeName="long",g.call(this,!0),this._noUnpack=!!e}function L(e,t){var r=e.name;if("string"!=typeof r||!n.isValidName(r))throw new Error(c("invalid field name: %s",r));this.name=r,this.type=y.forSchema(e.type,t),this.aliases=e.aliases||[],this.doc=void 0!==e.doc?""+e.doc:void 0,this._order=function(e){switch(e){case"ascending":return 1;case"descending":return-1;case"ignore":return 0;default:throw new Error(c("invalid order: %j",e))}}(void 0===e.order?"ascending":e.order);var i=e.default;if(void 0!==i){var o,s=this.type;try{o=s._copy(i,{coerce:2,wrap:2})}catch(e){var a=c("incompatible field default %j (%s)",i,e.message);throw y.isType(s,"union")&&(a+=c(", union defaults must match the first branch's type (%j)",s.types[0])),new Error(a)}$(s.typeName)&&"bytes"!==s.typeName?this.defaultValue=function(){return o}:this.defaultValue=function(){return s._copy(o)}}Object.freeze(this)}function U(e){this._readerType=e,this._read=null,this.itemsType=null,this.size=0,this.symbols=null,this.valuesType=null}function P(){this.str=void 0}function C(e,t,r,n){if(r){if(r._readerType!==e)throw new Error("invalid resolver");return r._read(t,n)}return e._read(t)}function M(e){var t={};e.name&&(t[e.name]=!0);var r,n,i=e.aliases;for(r=0,n=i.length;r<n;r++)t[i[r]]=!0;return Object.keys(t)}function D(e,t,r){if(!t.name)return!0;var i,o,s,a=r?t.name:n.unqualify(t.name),u=M(e);for(i=0,o=u.length;i<o;i++)if(s=u[i],r||(s=n.unqualify(s)),s===a)return!0;return!1}function $(e){var t=f[e];return t&&t.prototype instanceof g}function z(e){if("error"===e)e="record";else{var t=/^([^:]+):(.*)$/.exec(e);t&&(e="union"===t[1]?t[2]+"Union":t[1])}return n.capitalize(e)+"Type"}function H(e){var t=e.readLong();return t<0&&(t=-t,e.skipLong()),t}function V(e){return e>=-9007199254740990&&e<=9007199254740990}function q(e){return e&&"Buffer"===e.type&&Array.isArray(e.data)}function G(e,t){throw new Error(c("invalid %j: %j",t.schema(),e))}function W(e,t){var r=n.unqualify(e);return $(r)?r:n.qualify(e,t)}function Z(e){var t=e.typeName;switch(t){case"double":case"float":case"int":case"long":return"number";case"bytes":case"fixed":return"buffer";case"enum":return"string";case"map":case"error":case"record":return"object";default:return t}}function J(e){if(null===e)return"null";var t=typeof e;if("object"===t){if(Array.isArray(e))return"array";if(s.isBuffer(e))return"buffer"}return t}y.forSchema=function(e,t){(t=t||{}).registry=t.registry||{};var r,n=function(e){switch(!0===e?e="always":!1===e?e="never":void 0===e?e="auto":"string"==typeof e&&(e=e.toLowerCase()),e){case"always":return O;case"never":return B;case"auto":return;default:throw new Error(c("invalid wrap unions option: %j",e))}}(t.wrapUnions);if(null===e)throw new Error('invalid type: null (did you mean "null"?)');if(y.isType(e))return e;if(t.typeHook&&(r=t.typeHook(e,t))){if(!y.isType(r))throw new Error(c("invalid typehook return value: %j",r));return r}if("string"==typeof e){if(e=W(e,t.namespace),r=t.registry[e])return r;if($(e))return t.registry[e]=y.forSchema({type:e},t);throw new Error(c("undefined type name: %s",e))}if(e.logicalType&&t.logicalTypes&&!p){var i=t.logicalTypes[e.logicalType];if(i){var o=t.namespace,s={};Object.keys(t.registry).forEach(function(e){s[e]=t.registry[e]});try{return u("instantiating logical type for %s",e.logicalType),new i(e,t)}catch(r){if(u("failed to instantiate logical type for %s",e.logicalType),t.assertLogicalTypes)throw r;p=null,t.namespace=o,t.registry=s}}}if(Array.isArray(e)){var a=p;p=null;var l=e.map(function(e){return y.forSchema(e,t)});n||(n=function(e){var t,r,n,i,o={};for(t=0,r=e.length;t<r;t++)if(i=e[t],!y.isType(i,"logical")){if(o[n=Z(i)])return!0;o[n]=!0}return!1}(l)?O:B),p=a,r=new n(l,t)}else r=function(r){var n=f[r];if(void 0===n)throw new Error(c("unknown type: %j",r));return new n(e,t)}(e.type);return r},y.forValue=function(e,t){if((t=t||{}).emptyArrayType=t.emptyArrayType||y.forSchema({type:"array",items:"null"}),t.valueHook){var r=t.valueHook(e,t);if(void 0!==r){if(!y.isType(r))throw new Error(c("invalid value hook return value: %j",r));return r}}switch(typeof e){case"string":return y.forSchema("string",t);case"boolean":return y.forSchema("boolean",t);case"number":return(0|e)===e?y.forSchema("int",t):Math.abs(e)<9007199254740991?y.forSchema("float",t):y.forSchema("double",t);case"object":if(null===e)return y.forSchema("null",t);if(Array.isArray(e))return e.length?y.forSchema({type:"array",items:y.forTypes(e.map(function(e){return y.forValue(e,t)}),t)},t):t.emptyArrayType;if(s.isBuffer(e))return y.forSchema("bytes",t);var i=Object.keys(e);return i.some(function(e){return!n.isValidName(e)})?y.forSchema({type:"map",values:y.forTypes(i.map(function(r){return y.forValue(e[r],t)}),t)},t):y.forSchema({type:"record",fields:i.map(function(r){return{name:r,type:y.forValue(e[r],t)}})},t);default:throw new Error(c("cannot infer type from: %j",e))}},y.forTypes=function(e,t){if(!e.length)throw new Error("no types to combine");if(1===e.length)return e[0];t=t||{};var r=[],n=0,i=!0;if(e.forEach(function(e){switch(e.typeName){case"union:unwrapped":i=!1,r=r.concat(e.types);break;case"union:wrapped":n++,r=r.concat(e.types);break;case"null":r.push(e);break;default:i=!1,r.push(e)}}),n){if(!i)throw new Error("cannot combine wrapped union");var o={};r.forEach(function(e){var t=e.branchName,r=o[t];if(r){if(!e.equals(r))throw new Error("inconsistent branch type")}else o[t]=e});var s,a=t.wrapUnions;t.wrapUnions=!0;try{s=y.forSchema(Object.keys(o).map(function(e){return o[e]}),t)}catch(e){throw t.wrapUnions=a,e}return t.wrapUnions=a,s}var u={};r.forEach(function(e){var t=Z(e),r=u[t];r||(u[t]=r=[]),r.push(e)});var c=Object.keys(u).map(function(e){var r=u[e];if(1===r.length)return r[0];switch(e){case"null":case"boolean":return r[0];case"number":return function(e){var t,r,n,i,o=["int","long","float","double"],s=-1,a=null;for(t=0,r=e.length;t<r;t++)n=e[t],(i=o.indexOf(n.typeName))>s&&(s=i,a=n);return a}(r);case"string":return function(e,t){var r,n,i,o,s={};for(r=0,n=e.length;r<n;r++){if("string"===(i=e[r]).typeName)return i;var a,u;for(a=0,u=(o=i.symbols).length;a<u;a++)s[o[a]]=!0}return y.forSchema({type:"enum",symbols:Object.keys(s)},t)}(r,t);case"buffer":return function(e,t){var r,n,i,o=-1;for(r=0,n=e.length;r<n;r++){if("bytes"===(i=e[r]).typeName)return i;-1===o?o=i.size:i.size!==o&&(o=-2)}return o<0?y.forSchema("bytes",t):e[0]}(r,t);case"array":return(r=r.filter(function(e){return e!==t.emptyArrayType})).length?y.forSchema({type:"array",items:y.forTypes(r.map(function(e){return e.itemsType}),t)},t):t.emptyArrayType;default:return function(e,t){var r,n,i,o,s,a=[],u={},c={},f=!0;for(r=0,n=e.length;r<n;r++){var l,h,p,d,g,m;if("map"===(i=e[r]).typeName)f=!1,a.push(i.valuesType);else for(l=0,h=(o=i.fields).length;l<h;l++)g=(p=o[l]).name,m=p.type,a.push(m),f&&(u[g]||(u[g]=[]),u[g].push(m),void 0!==(d=p.defaultValue())&&(c[g]=d))}if(f){var v=Object.keys(u);for(r=0,n=v.length;r<n;r++)g=v[r],u[g].length<e.length&&void 0===c[g]&&(t&&t.strictDefaults?f=!1:(u[g].unshift(y.forSchema("null",t)),c[g]=null))}return s=f?{type:"record",fields:v.map(function(e){var r=y.forTypes(u[e],t),n=c[e];if(void 0!==n&&~r.typeName.indexOf("union")){var i,o,s=r.types.slice();for(i=0,o=s.length;i<o&&!s[i].isValid(n);i++);if(i>0){var a=s[0];s[0]=s[i],s[i]=a,r=y.forSchema(s,t)}}return{name:e,type:r,default:c[e]}})}:{type:"map",values:y.forTypes(a,t)},y.forSchema(s,t)}(r,t)}});return 1===c.length?c[0]:y.forSchema(c,t)},y.isType=function(){var e=arguments.length;if(!e)return!1;var t=arguments[0];if(!t||"function"!=typeof t._update||"function"!=typeof t.fingerprint)return!1;if(1===e)return!0;var r,n=t.typeName;for(r=1;r<e;r++)if(0===n.indexOf(arguments[r]))return!0;return!1},y.__reset=function(e){u("resetting type buffer to %d",e),h.buf=n.newSlowBuffer(e)},Object.defineProperty(y.prototype,"branchName",{enumerable:!0,get:function(){var e=y.isType(this,"logical")?this.underlyingType:this;return e.name?e.name:y.isType(e,"abstract")?e._concreteTypeName:y.isType(e,"union")?void 0:e.typeName}}),y.prototype.clone=function(e,t){return t?(t={coerce:0|!!t.coerceBuffers,fieldHook:t.fieldHook,qualifyNames:!!t.qualifyNames,skip:!!t.skipMissingFields,wrap:0|!!t.wrapUnions},this._copy(e,t)):this.fromBuffer(this.toBuffer(e))},y.prototype.compare=n.abstractFunction,y.prototype.compareBuffers=function(e,t){return this._match(new a(e),new a(t))},y.prototype.createResolver=function(e,t){if(!y.isType(e))throw new Error(c("not a type: %j",e));if(!y.isType(this,"union","logical")&&y.isType(e,"logical"))return this.createResolver(e.underlyingType,t);var r,n;if((t=t||{}).registry=t.registry||{},y.isType(this,"record","error")&&y.isType(e,"record","error")&&(n=this.name+":"+e.name,r=t.registry[n]))return r;if(r=new U(this),n&&(t.registry[n]=r),y.isType(e,"union")){var i=e.types.map(function(e){return this.createResolver(e,t)},this);r._read=function(e){var t=e.readLong();if(void 0===i[t])throw new Error(c("invalid union index: %s",t));return i[t]._read(e)}}else this._update(r,e,t);if(!r._read)throw new Error(c("cannot read %s as %s",e,this));return Object.freeze(r)},y.prototype.decode=function(e,t,r){var n=new a(e,t),i=C(this,n,r);return n.isValid()?{value:i,offset:n.pos}:{value:void 0,offset:-1}},y.prototype.encode=function(e,t,r){var n=new a(t,r);return this._write(n,e),n.isValid()?n.pos:t.length-n.pos},y.prototype.equals=function(e,t){var r=y.isType(e)&&this.fingerprint().equals(e.fingerprint());return r&&t&&t.strict?JSON.stringify(this.schema({exportAttrs:!0}))===JSON.stringify(e.schema({exportAttrs:!0})):r},y.prototype.fingerprint=function(e){if(e)return n.getHash(JSON.stringify(this.schema()),e);if(!this._hash.str){var t=JSON.stringify(this.schema());this._hash.str=n.getHash(t).toString("binary")}return n.bufferFrom(this._hash.str,"binary")},y.prototype.fromBuffer=function(e,t,r){var n=new a(e),i=C(this,n,t,r);if(!n.isValid())throw new Error("truncated buffer");if(!r&&n.pos<e.length)throw new Error("trailing data");return i},y.prototype.fromString=function(e){return this._copy(JSON.parse(e),{coerce:2})},y.prototype.inspect=function(){var e=this.typeName,t=z(e);if($(e))return c("<%s>",t);var r=this.schema({exportAttrs:!0,noDeref:!0});return"object"!=typeof r||y.isType(this,"logical")||(r.type=void 0),c("<%s %j>",t,r)},y.prototype.isValid=function(e,t){var r,n,i=0|(t&&t.noUndeclaredFields),o=t&&t.errorHook;return o&&(n=[],r=function(t,r){o.call(this,n.slice(),t,r,e)}),this._check(e,i,r,n)},y.prototype.random=n.abstractFunction,y.prototype.schema=function(e){return this._attrs({exportAttrs:!(!e||!e.exportAttrs),noDeref:!(!e||!e.noDeref)})},y.prototype.toBuffer=function(e){h.pos=0,this._write(h,e);var t=n.newBuffer(h.pos);return h.isValid()?h.buf.copy(t,0,0,h.pos):this._write(new a(t),e),t},y.prototype.toJSON=function(){return this.schema({exportAttrs:!0})},y.prototype.toString=function(e){return void 0===e?JSON.stringify(this.schema({noDeref:!0})):JSON.stringify(this._copy(e,{coerce:3}))},y.prototype.wrap=function(e){var t=this._branchConstructor;return null===t?null:new t(e)},y.prototype._attrs=function(e){e.derefed=e.derefed||{};var t=this.name;if(void 0!==t){if(e.noDeref||e.derefed[t])return t;e.derefed[t]=!0}var r={};void 0!==this.name&&(r.name=t),r.type=this.typeName;var n=this._deref(r,e);return void 0!==n&&(r=n),e.exportAttrs&&(this.aliases&&this.aliases.length&&(r.aliases=this.aliases),void 0!==this.doc&&(r.doc=this.doc)),r},y.prototype._createBranchConstructor=function(){var e=this.branchName;if("null"===e)return null;var t=~e.indexOf(".")?"this['"+e+"']":"this."+e,r=new Function("return function Branch$(val) { "+t+" = val; };")();return r.type=this,r.prototype.unwrap=new Function("return "+t+";"),r.prototype.unwrapped=r.prototype.unwrap,r},y.prototype._peek=function(e){var t=e.pos,r=this._read(e);return e.pos=t,r},y.prototype._check=n.abstractFunction,y.prototype._copy=n.abstractFunction,y.prototype._deref=n.abstractFunction,y.prototype._match=n.abstractFunction,y.prototype._read=n.abstractFunction,y.prototype._skip=n.abstractFunction,y.prototype._update=n.abstractFunction,y.prototype._write=n.abstractFunction,y.prototype.getAliases=function(){return this.aliases},y.prototype.getFingerprint=y.prototype.fingerprint,y.prototype.getName=function(e){return this.name||!e?this.name:this.branchName},y.prototype.getSchema=y.prototype.schema,y.prototype.getTypeName=function(){return this.typeName},o.inherits(g,y),g.prototype._update=function(e,t){t.typeName===this.typeName&&(e._read=this._read)},g.prototype._copy=function(e){return this._check(e,void 0,G),e},g.prototype._deref=function(){return this.typeName},g.prototype.compare=n.compare,o.inherits(m,g),m.prototype._check=function(e,t,r){var n=null===e;return!n&&r&&r(e,this),n},m.prototype._read=function(){return null},m.prototype._skip=function(){},m.prototype._write=function(e,t){null!==t&&G(t,this)},m.prototype._match=function(){return 0},m.prototype.compare=m.prototype._match,m.prototype.typeName="null",m.prototype.random=m.prototype._read,o.inherits(v,g),v.prototype._check=function(e,t,r){var n="boolean"==typeof e;return!n&&r&&r(e,this),n},v.prototype._read=function(e){return e.readBoolean()},v.prototype._skip=function(e){e.skipBoolean()},v.prototype._write=function(e,t){"boolean"!=typeof t&&G(t,this),e.writeBoolean(t)},v.prototype._match=function(e,t){return e.matchBoolean(t)},v.prototype.typeName="boolean",v.prototype.random=function(){return l.nextBoolean()},o.inherits(b,g),b.prototype._check=function(e,t,r){var n=e===(0|e);return!n&&r&&r(e,this),n},b.prototype._read=function(e){return e.readInt()},b.prototype._skip=function(e){e.skipInt()},b.prototype._write=function(e,t){t!==(0|t)&&G(t,this),e.writeInt(t)},b.prototype._match=function(e,t){return e.matchInt(t)},b.prototype.typeName="int",b.prototype.random=function(){return 0|l.nextInt(1e3)},o.inherits(w,g),w.prototype._check=function(e,t,r){var n="number"==typeof e&&e%1==0&&V(e);return!n&&r&&r(e,this),n},w.prototype._read=function(e){var t=e.readLong();if(!V(t))throw new Error("potential precision loss");return t},w.prototype._skip=function(e){e.skipLong()},w.prototype._write=function(e,t){("number"!=typeof t||t%1||!V(t))&&G(t,this),e.writeLong(t)},w.prototype._match=function(e,t){return e.matchLong(t)},w.prototype._update=function(e,t){switch(t.typeName){case"int":e._read=t._read;break;case"abstract:long":case"long":e._read=this._read}},w.prototype.typeName="long",w.prototype.random=function(){return l.nextInt()},w.__with=function(e,t){e=e||{};var r={toBuffer:"_toBuffer",fromBuffer:"_fromBuffer",fromJSON:"_fromJSON",toJSON:"_toJSON",isValid:"_isValid",compare:"compare"},n=new j(t);return Object.keys(r).forEach(function(t){if(void 0===e[t])throw new Error(c("missing method implementation: %s",t));n[r[t]]=e[t]}),Object.freeze(n)},o.inherits(_,g),_.prototype._check=function(e,t,r){var n="number"==typeof e;return!n&&r&&r(e,this),n},_.prototype._read=function(e){return e.readFloat()},_.prototype._skip=function(e){e.skipFloat()},_.prototype._write=function(e,t){"number"!=typeof t&&G(t,this),e.writeFloat(t)},_.prototype._match=function(e,t){return e.matchFloat(t)},_.prototype._update=function(e,t){switch(t.typeName){case"float":case"int":e._read=t._read;break;case"abstract:long":case"long":e._read=function(e){return e.readLong()}}},_.prototype.typeName="float",_.prototype.random=function(){return l.nextFloat(1e3)},o.inherits(E,g),E.prototype._check=function(e,t,r){var n="number"==typeof e;return!n&&r&&r(e,this),n},E.prototype._read=function(e){return e.readDouble()},E.prototype._skip=function(e){e.skipDouble()},E.prototype._write=function(e,t){"number"!=typeof t&&G(t,this),e.writeDouble(t)},E.prototype._match=function(e,t){return e.matchDouble(t)},E.prototype._update=function(e,t){switch(t.typeName){case"double":case"float":case"int":e._read=t._read;break;case"abstract:long":case"long":e._read=function(e){return e.readLong()}}},E.prototype.typeName="double",E.prototype.random=function(){return l.nextFloat()},o.inherits(x,g),x.prototype._check=function(e,t,r){var n="string"==typeof e;return!n&&r&&r(e,this),n},x.prototype._read=function(e){return e.readString()},x.prototype._skip=function(e){e.skipString()},x.prototype._write=function(e,t){"string"!=typeof t&&G(t,this),e.writeString(t)},x.prototype._match=function(e,t){return e.matchString(t)},x.prototype._update=function(e,t){switch(t.typeName){case"bytes":case"string":e._read=this._read}},x.prototype.typeName="string",x.prototype.random=function(){return l.nextString(l.nextInt(32))},o.inherits(S,g),S.prototype._check=function(e,t,r){var n=s.isBuffer(e);return!n&&r&&r(e,this),n},S.prototype._read=function(e){return e.readBytes()},S.prototype._skip=function(e){e.skipBytes()},S.prototype._write=function(e,t){s.isBuffer(t)||G(t,this),e.writeBytes(t)},S.prototype._match=function(e,t){return e.matchBytes(t)},S.prototype._update=x.prototype._update,S.prototype._copy=function(e,t){var r;switch(0|(t&&t.coerce)){case 3:return this._check(e,void 0,G),e.toString("binary");case 2:if("string"!=typeof e)throw new Error(c("cannot coerce to buffer: %j",e));return r=n.bufferFrom(e,"binary"),this._check(r,void 0,G),r;case 1:if(!q(e))throw new Error(c("cannot coerce to buffer: %j",e));return r=n.bufferFrom(e.data),this._check(r,void 0,G),r;default:return this._check(e,void 0,G),n.bufferFrom(e)}},S.prototype.compare=s.compare,S.prototype.typeName="bytes",S.prototype.random=function(){return l.nextBuffer(l.nextInt(32))},o.inherits(A,y),A.prototype._branchConstructor=function(){throw new Error("unions cannot be directly wrapped")},A.prototype._skip=function(e){this.types[e.readLong()]._skip(e)},A.prototype._match=function(e,t){var r=e.readLong(),n=t.readLong();return r===n?this.types[r]._match(e,t):r<n?-1:1},A.prototype._deref=function(e,t){return this.types.map(function(e){return e._attrs(t)})},A.prototype.getTypes=function(){return this.types},o.inherits(B,A),B.prototype._getIndex=function(e){var t=this._bucketIndices[J(e)];return this._dynamicBranches&&(t=this._getBranchIndex(e,t)),t},B.prototype._getBranchIndex=function(e,t){var r,n,i,o=this._dynamicBranches;for(r=0,n=o.length;r<n;r++)if((i=o[r]).type._check(e)){if(void 0!==t)throw new Error("ambiguous conversion");t=i.index}return t},B.prototype._check=function(e,t,r,n){var i=this._getIndex(e),o=void 0!==i;return o?this.types[i]._check(e,t,r,n):(r&&r(e,this),o)},B.prototype._read=function(e){var t=e.readLong(),r=this.types[t];if(r)return r._read(e);throw new Error(c("invalid union index: %s",t))},B.prototype._write=function(e,t){var r=this._getIndex(t);void 0===r&&G(t,this),e.writeLong(r),null!==t&&this.types[r]._write(e,t)},B.prototype._update=function(e,t,r){var n,i,o;for(n=0,i=this.types.length;n<i;n++){try{o=this.types[n].createResolver(t,r)}catch(e){continue}return void(e._read=function(e){return o._read(e)})}},B.prototype._copy=function(e,t){var r,n=t&&0|t.coerce,i=t&&0|t.wrap;if(2===i)r=0;else{switch(n){case 1:r=q(e)&&void 0!==this._bucketIndices.buffer?this._bucketIndices.buffer:this._getIndex(e);break;case 2:if(null===e)r=this._bucketIndices.null;else if("object"==typeof e){var o=Object.keys(e);1===o.length&&(r=this._branchIndices[o[0]],e=e[o[0]])}break;default:r=this._getIndex(e)}void 0===r&&G(e,this)}var s=this.types[r];if(null===e||3===i)return s._copy(e,t);if(3===n){var a={};return a[s.branchName]=s._copy(e,t),a}return s._copy(e,t)},B.prototype.compare=function(e,t){var r=this._getIndex(e),i=this._getIndex(t);if(void 0===r)G(e,this);else{if(void 0!==i)return r===i?this.types[r].compare(e,t):n.compare(r,i);G(t,this)}},B.prototype.typeName="union:unwrapped",B.prototype.random=function(){var e=l.nextInt(this.types.length);return this.types[e].random()},o.inherits(O,A),O.prototype._check=function(e,t,r,n){var i=!1;if(null===e)i=void 0!==this._branchIndices.null;else if("object"==typeof e){var o=Object.keys(e);if(1===o.length){var s=o[0],a=this._branchIndices[s];if(void 0!==a)return r?(n.push(s),i=this.types[a]._check(e[s],t,r,n),n.pop(),i):this.types[a]._check(e[s],t)}}return!i&&r&&r(e,this),i},O.prototype._read=function(e){var t=this.types[e.readLong()];if(!t)throw new Error(c("invalid union index"));var r=t._branchConstructor;return null===r?null:new r(t._read(e))},O.prototype._write=function(e,t){var r,n,i;null===t?(void 0===(r=this._branchIndices.null)&&G(t,this),e.writeLong(r)):(1===(n=Object.keys(t)).length&&(i=n[0],r=this._branchIndices[i]),void 0===r&&G(t,this),e.writeLong(r),this.types[r]._write(e,t[i]))},O.prototype._update=function(e,t,r){var n,i,o,s;for(n=0,i=this.types.length;n<i;n++){try{o=this.types[n].createResolver(t,r)}catch(e){continue}return s=this.types[n]._branchConstructor,void(e._read=s?function(e){return new s(o._read(e))}:function(){return null})}},O.prototype._copy=function(e,t){var r,i,o,s=t&&0|t.wrap;if(2===s){var a=this.types[0];return null===e&&"null"===a.typeName?null:new a._branchConstructor(a._copy(e,t))}if(null===e&&void 0!==this._branchIndices.null)return null;if("object"==typeof e){var u=Object.keys(e);if(1===u.length){var c,f,l=u[0];if(void 0===(r=this._branchIndices[l])&&t.qualifyNames)for(c=0,i=this.types.length;c<i;c++)if((f=this.types[c]).name&&l===n.unqualify(f.name)){r=c;break}void 0!==r&&(o=this.types[r]._copy(e[l],t))}}if(1===s&&void 0===o)for(r=0,i=this.types.length;r<i&&void 0===o;)try{o=this.types[r]._copy(e,t)}catch(e){r++}if(void 0!==o)return 3===s?o:new this.types[r]._branchConstructor(o);G(e,this)},O.prototype.compare=function(e,t){var r=null===e?"null":Object.keys(e)[0],i=null===t?"null":Object.keys(t)[0],o=this._branchIndices[r];return r===i?"null"===r?0:this.types[o].compare(e[r],t[r]):n.compare(o,this._branchIndices[i])},O.prototype.typeName="union:wrapped",O.prototype.random=function(){var e=l.nextInt(this.types.length),t=this.types[e],r=t._branchConstructor;return r?new r(t.random()):null},o.inherits(k,y),k.prototype._check=function(e,t,r){var n=void 0!==this._indices[e];return!n&&r&&r(e,this),n},k.prototype._read=function(e){var t=e.readLong(),r=this.symbols[t];if(void 0===r)throw new Error(c("invalid %s enum index: %s",this.name,t));return r},k.prototype._skip=function(e){e.skipLong()},k.prototype._write=function(e,t){var r=this._indices[t];void 0===r&&G(t,this),e.writeLong(r)},k.prototype._match=function(e,t){return e.matchLong(t)},k.prototype.compare=function(e,t){return n.compare(this._indices[e],this._indices[t])},k.prototype._update=function(e,t,r){var n=this.symbols;"enum"===t.typeName&&D(this,t,!r.ignoreNamespaces)&&(t.symbols.every(function(e){return~n.indexOf(e)})||void 0!==this.default)&&(e.symbols=t.symbols.map(function(e){return void 0===this._indices[e]?this.default:e},this),e._read=t._read)},k.prototype._copy=function(e){return this._check(e,void 0,G),e},k.prototype._deref=function(e){e.symbols=this.symbols},k.prototype.getSymbols=function(){return this.symbols},k.prototype.typeName="enum",k.prototype.random=function(){return l.choice(this.symbols)},o.inherits(T,y),T.prototype._check=function(e,t,r){var n=s.isBuffer(e)&&e.length===this.size;return!n&&r&&r(e,this),n},T.prototype._read=function(e){return e.readFixed(this.size)},T.prototype._skip=function(e){e.skipFixed(this.size)},T.prototype._write=function(e,t){s.isBuffer(t)&&t.length===this.size||G(t,this),e.writeFixed(t,this.size)},T.prototype._match=function(e,t){return e.matchFixed(t,this.size)},T.prototype.compare=s.compare,T.prototype._update=function(e,t,r){"fixed"===t.typeName&&this.size===t.size&&D(this,t,!r.ignoreNamespaces)&&(e.size=this.size,e._read=this._read)},T.prototype._copy=S.prototype._copy,T.prototype._deref=function(e){e.size=this.size},T.prototype.getSize=function(){return this.size},T.prototype.typeName="fixed",T.prototype.random=function(){return l.nextBuffer(this.size)},o.inherits(I,y),I.prototype._check=function(e,t,r,n){if(!e||"object"!=typeof e||Array.isArray(e))return r&&r(e,this),!1;var i,o,s,a,u=Object.keys(e),c=!0;if(r){for(s=n.length,n.push(""),i=0,o=u.length;i<o;i++)a=n[s]=u[i],this.valuesType._check(e[a],t,r,n)||(c=!1);n.pop()}else for(i=0,o=u.length;i<o;i++)if(!this.valuesType._check(e[u[i]],t))return!1;return c},I.prototype._read=function(e){for(var t,r=this.valuesType,n={};t=H(e);)for(;t--;)n[e.readString()]=r._read(e);return n},I.prototype._skip=function(e){for(var t,r,n=this.valuesType;r=e.readLong();)if(r<0)t=e.readLong(),e.pos+=t;else for(;r--;)e.skipString(),n._skip(e)},I.prototype._write=function(e,t){t&&"object"==typeof t&&!Array.isArray(t)||G(t,this);var r,n,i=this.valuesType,o=Object.keys(t),s=o.length;if(s)for(e.writeLong(s),r=0;r<s;r++)n=o[r],e.writeString(n),i._write(e,t[n]);e.writeLong(0)},I.prototype._match=function(){throw new Error("maps cannot be compared")},I.prototype._update=function(e,t,r){"map"===t.typeName&&(e.valuesType=this.valuesType.createResolver(t.valuesType,r),e._read=this._read)},I.prototype._copy=function(e,t){if(e&&"object"==typeof e&&!Array.isArray(e)){var r,n,i,o=this.valuesType,s=Object.keys(e),a={};for(r=0,n=s.length;r<n;r++)a[i=s[r]]=o._copy(e[i],t);return a}G(e,this)},I.prototype.compare=I.prototype._match,I.prototype.typeName="map",I.prototype.getValuesType=function(){return this.valuesType},I.prototype.random=function(){var e,t,r={};for(e=0,t=l.nextInt(10);e<t;e++)r[l.nextString(l.nextInt(20))]=this.valuesType.random();return r},I.prototype._deref=function(e,t){e.values=this.valuesType._attrs(t)},o.inherits(N,y),N.prototype._check=function(e,t,r,n){if(!Array.isArray(e))return r&&r(e,this),!1;var i,o,s,a=this.itemsType,u=!0;if(r){for(s=n.length,n.push(""),i=0,o=e.length;i<o;i++)n[s]=""+i,a._check(e[i],t,r,n)||(u=!1);n.pop()}else for(i=0,o=e.length;i<o;i++)if(!a._check(e[i],t))return!1;return u},N.prototype._read=function(e){for(var t,r,n=this.itemsType,i=0;r=e.readLong();)for(r<0&&(r=-r,e.skipLong()),t=t||new Array(r);r--;)t[i++]=n._read(e);return t||[]},N.prototype._skip=function(e){for(var t,r,n=this.itemsType;r=e.readLong();)if(r<0)t=e.readLong(),e.pos+=t;else for(;r--;)n._skip(e)},N.prototype._write=function(e,t){Array.isArray(t)||G(t,this);var r,n=this.itemsType,i=t.length;if(i)for(e.writeLong(i),r=0;r<i;r++)n._write(e,t[r]);e.writeLong(0)},N.prototype._match=function(e,t){for(var r,i=e.readLong(),o=t.readLong();i&&o;){if(r=this.itemsType._match(e,t))return r;--i||(i=H(e)),--o||(o=H(t))}return n.compare(i,o)},N.prototype._update=function(e,t,r){"array"===t.typeName&&(e.itemsType=this.itemsType.createResolver(t.itemsType,r),e._read=this._read)},N.prototype._copy=function(e,t){Array.isArray(e)||G(e,this);var r,n,i=new Array(e.length);for(r=0,n=e.length;r<n;r++)i[r]=this.itemsType._copy(e[r],t);return i},N.prototype._deref=function(e,t){e.items=this.itemsType._attrs(t)},N.prototype.compare=function(e,t){var r,i,o,s=e.length,a=t.length;for(r=0,i=Math.min(s,a);r<i;r++)if(o=this.itemsType.compare(e[r],t[r]))return o;return n.compare(s,a)},N.prototype.getItemsType=function(){return this.itemsType},N.prototype.typeName="array",N.prototype.random=function(){var e,t,r=[];for(e=0,t=l.nextInt(10);e<t;e++)r.push(this.itemsType.random());return r},o.inherits(F,y),F.prototype._getConstructorName=function(){return this.name?n.capitalize(n.unqualify(this.name)):this._isError?"Error$":"Record$"},F.prototype._createConstructor=function(e,t){var r,n,i,s,a,u,c,f=[],l=[],h=[],p="";for(r=0,n=this.fields.length;r<n;r++)u=void 0!==(a=(i=this.fields[r]).defaultValue)(),s=i.name,e&&this._isError&&"stack"===s&&y.isType(i.type,"string")&&!u&&(c=i),l.push("v"+r),p+=" ",u?(p+="if (v"+r+" === undefined) { ",p+="this."+s+" = d"+h.length+"(); ",p+="} else { this."+s+" = v"+r+"; }\n",f.push("d"+h.length),h.push(a)):p+="this."+s+" = v"+r+";\n";c&&(p+=" if (this.stack === undefined) { ","function"==typeof Error.captureStackTrace?p+="Error.captureStackTrace(this, this.constructor);":p+="this.stack = Error().stack;",p+=" }\n");var d="return function "+this._getConstructorName()+"(";d+=l.join()+") {\n"+p+"};";var g=new Function(f.join(),d).apply(void 0,h);if(t)return g;var m=this;return g.getType=function(){return m},g.type=m,this._isError&&(o.inherits(g,Error),g.prototype.name=this._getConstructorName()),g.prototype.clone=function(e){return m.clone(this,e)},g.prototype.compare=function(e){return m.compare(this,e)},g.prototype.isValid=function(e){return m.isValid(this,e)},g.prototype.toBuffer=function(){return m.toBuffer(this)},g.prototype.toString=function(){return m.toString(this)},g.prototype.wrap=function(){return m.wrap(this)},g.prototype.wrapped=g.prototype.wrap,g},F.prototype._createChecker=function(){var e=[],t=[],r="return function check"+this._getConstructorName()+"(v, f, h, p) {\n";if(r+=" if (\n",r+=" v === null ||\n",r+=" typeof v != 'object' ||\n",r+=" (f && !this._checkFields(v))\n",r+=" ) {\n",r+=" if (h) { h(v, this); }\n",r+=" return false;\n",r+=" }\n",this.fields.length){for(n=0,i=this.fields.length;n<i;n++)o=this.fields[n],e.push("t"+n),t.push(o.type),void 0!==o.defaultValue()&&(r+=" var v"+n+" = v."+o.name+";\n");var n,i,o;for(r+=" if (h) {\n",r+=" var b = 1;\n",r+=" var j = p.length;\n",r+=" p.push('');\n",n=0,i=this.fields.length;n<i;n++)r+=" p[j] = '"+(o=this.fields[n]).name+"';\n",r+=" b &= ",void 0===o.defaultValue()?r+="t"+n+"._check(v."+o.name+", f, h, p);\n":(r+="v"+n+" === undefined || ",r+="t"+n+"._check(v"+n+", f, h, p);\n");r+=" p.pop();\n",r+=" return !!b;\n",r+=" } else {\n return (\n ",r+=this.fields.map(function(e,t){return void 0===e.defaultValue()?"t"+t+"._check(v."+e.name+", f)":"(v"+t+" === undefined || t"+t+"._check(v"+t+", f))"}).join(" &&\n "),r+="\n );\n }\n"}else r+=" return true;\n";return r+="};",new Function(e.join(),r).apply(void 0,t)},F.prototype._createReader=function(){var e,t,r=[],n=[this.recordConstructor];for(e=0,t=this.fields.length;e<t;e++)r.push("t"+e),n.push(this.fields[e].type);var i=this._getConstructorName(),o="return function read"+i+"(t) {\n";return o+=" return new "+i+"(\n ",o+=r.map(function(e){return e+"._read(t)"}).join(",\n "),o+="\n );\n};",r.unshift(i),new Function(r.join(),o).apply(void 0,n)},F.prototype._createSkipper=function(){var e,t,r=[],n="return function skip"+this._getConstructorName()+"(t) {\n",i=[];for(e=0,t=this.fields.length;e<t;e++)r.push("t"+e),i.push(this.fields[e].type),n+=" t"+e+"._skip(t);\n";return n+="}",new Function(r.join(),n).apply(void 0,i)},F.prototype._createWriter=function(){var e,t,r,n,i=[],o="return function write"+this._getConstructorName()+"(t, v) {\n",s=[];for(e=0,t=this.fields.length;e<t;e++)r=this.fields[e],i.push("t"+e),s.push(r.type),o+=" ",void 0===r.defaultValue()?o+="t"+e+"._write(t, v."+r.name+");\n":(n=r.type.toBuffer(r.defaultValue()).toString("binary"),i.push("d"+e),s.push(n),o+="var v"+e+" = v."+r.name+";\n",o+="if (v"+e+" === undefined) {\n",o+=" t.writeBinary(d"+e+", "+n.length+");\n",o+=" } else {\n t"+e+"._write(t, v"+e+");\n }\n");return o+="}",new Function(i.join(),o).apply(void 0,s)},F.prototype._update=function(e,t,r){if(!D(this,t,!r.ignoreNamespaces))throw new Error(c("no alias found for %s",t.name));var i,o,s,a,u,f,l,h=this.fields,p=t.fields,d=n.toMap(p,function(e){return e.name}),y=[],g={};for(i=0;i<h.length;i++){for(u=M(s=h[i]),f=[],o=0;o<u.length;o++)d[a=u[o]]&&f.push(a);if(f.length>1)throw new Error(c("ambiguous aliasing for %s.%s (%s)",t.name,s.name,f));if(f.length)a=f[0],l={resolver:s.type.createResolver(d[a].type,r),name:"_"+s.name},g[a]?g[a].push(l):g[a]=[l],y.push(l.name);else{if(void 0===s.defaultValue())throw new Error(c("no matching field for default-less %s.%s",t.name,s.name));y.push("undefined")}}var m=-1;for(i=p.length;i&&void 0===g[p[--i].name];)m=i;var v=this._getConstructorName(),b=[v],w=[this.recordConstructor],_=" return function read"+v+"(t, b) {\n";for(i=0;i<p.length;i++)if(i===m&&(_+=" if (!b) {\n"),void 0===g[a=(s=t.fields[i]).name])_+=~m&&i>=m?" ":" ",b.push("r"+i),w.push(s.type),_+="r"+i+"._skip(t);\n";else for(o=g[a].length;o--;)_+=~m&&i>=m?" ":" ",b.push("r"+i+"f"+o),l=g[a][o],w.push(l.resolver),_+="var "+l.name+" = ",_+="r"+i+"f"+o+"._"+(o?"peek":"read")+"(t);\n";~m&&(_+=" }\n"),_+=" return new "+v+"("+y.join()+");\n};",e._read=new Function(b.join(),_).apply(void 0,w)},F.prototype._match=function(e,t){var r,n,i,o,s,a=this.fields;for(r=0,n=a.length;r<n;r++)if(o=(i=a[r])._order,s=i.type,o){if(o*=s._match(e,t))return o}else s._skip(e),s._skip(t);return 0},F.prototype._checkFields=function(e){var t,r,n=Object.keys(e);for(t=0,r=n.length;t<r;t++)if(!this._fieldsByName[n[t]])return!1;return!0},F.prototype._copy=function(e,t){var r,n,i,o,s=t&&t.fieldHook,a=[void 0];for(r=0,n=this.fields.length;r<n;r++)void 0===(o=e[(i=this.fields[r]).name])&&i.hasOwnProperty("defaultValue")&&(o=i.defaultValue()),(t&&!t.skip||void 0!==o)&&(o=i.type._copy(o,t)),s&&(o=s(i,o,this)),a.push(o);var u=this.recordConstructor;return new(u.bind.apply(u,a))},F.prototype._deref=function(e,t){e.fields=this.fields.map(function(e){var r=e.type,n={name:e.name,type:r._attrs(t)};if(t.exportAttrs){var i=e.defaultValue();void 0!==i&&(n.default=r._copy(i,{coerce:3,wrap:3}));var o=e.order;"ascending"!==o&&(n.order=o);var s=e.aliases;s.length&&(n.aliases=s);var a=e.doc;void 0!==a&&(n.doc=a)}return n})},F.prototype.compare=function(e,t){var r,n,i,o,s,a,u=this.fields;for(r=0,n=u.length;r<n;r++)if(o=(i=u[r]).name,s=i._order,a=i.type,s&&(s*=a.compare(e[o],t[o])))return s;return 0},F.prototype.random=function(){var e=this.fields.map(function(e){return e.type.random()});e.unshift(void 0);var t=this.recordConstructor;return new(t.bind.apply(t,e))},F.prototype.field=function(e){return this._fieldsByName[e]},F.prototype.getField=F.prototype.field,F.prototype.getFields=function(){return this.fields},F.prototype.getRecordConstructor=function(){return this.recordConstructor},Object.defineProperty(F.prototype,"typeName",{enumerable:!0,get:function(){return this._isError?"error":"record"}}),o.inherits(R,y),Object.defineProperty(R.prototype,"typeName",{enumerable:!0,get:function(){return"logical:"+this._logicalTypeName}}),Object.defineProperty(R.prototype,"underlyingType",{enumerable:!0,get:function(){if(this._underlyingType)return this._underlyingType;var e,t,r;for(e=0,t=d.length;e<t;e++)if((r=d[e])[0]===this)return r[1]}}),R.prototype.getUnderlyingType=function(){return this.underlyingType},R.prototype._read=function(e){return this._fromValue(this.underlyingType._read(e))},R.prototype._write=function(e,t){this.underlyingType._write(e,this._toValue(t))},R.prototype._check=function(e,t,r,n){try{var i=this._toValue(e)}catch(e){}return void 0===i?(r&&r(e,this),!1):this.underlyingType._check(i,t,r,n)},R.prototype._copy=function(e,t){var r=this.underlyingType;switch(t&&t.coerce){case 3:return r._copy(this._toValue(e),t);case 2:return this._fromValue(r._copy(e,t));default:return this._fromValue(r._copy(this._toValue(e),t))}},R.prototype._update=function(e,t,r){var n=this._resolve(t,r);n&&(e._read=function(e){return n(t._read(e))})},R.prototype.compare=function(e,t){var r=this._toValue(e),n=this._toValue(t);return this.underlyingType.compare(r,n)},R.prototype.random=function(){return this._fromValue(this.underlyingType.random())},R.prototype._deref=function(e,t){var r=this.underlyingType,n=void 0!==r.name&&t.derefed[r.name];return e=r._attrs(t),!n&&t.exportAttrs&&("string"==typeof e&&(e={type:e}),e.logicalType=this._logicalTypeName,this._export(e)),e},R.prototype._skip=function(e){this.underlyingType._skip(e)},R.prototype._export=function(){},R.prototype._fromValue=n.abstractFunction,R.prototype._toValue=n.abstractFunction,R.prototype._resolve=n.abstractFunction,o.inherits(j,w),j.prototype.typeName="abstract:long",j.prototype._check=function(e,t,r){var n=this._isValid(e);return!n&&r&&r(e,this),n},j.prototype._read=function(e){var t,r;if(this._noUnpack?(r=e.pos,e.skipLong(),t=e.buf.slice(r,e.pos)):t=e.unpackLongBytes(e),e.isValid())return this._fromBuffer(t)},j.prototype._write=function(e,t){this._isValid(t)||G(t,this);var r=this._toBuffer(t);this._noUnpack?e.writeFixed(r):e.packLongBytes(r)},j.prototype._copy=function(e,t){switch(t&&t.coerce){case 3:return this._toJSON(e);case 2:return this._fromJSON(e);default:return this._fromJSON(this._toJSON(e))}},j.prototype._deref=function(){return"long"},j.prototype._update=function(e,t){var r=this;switch(t.typeName){case"int":e._read=function(e){return r._fromJSON(t._read(e))};break;case"abstract:long":case"long":e._read=function(e){return r._read(e)}}},j.prototype.random=function(){return this._fromJSON(w.prototype.random())},j.prototype._fromBuffer=n.abstractFunction,j.prototype._toBuffer=n.abstractFunction,j.prototype._fromJSON=n.abstractFunction,j.prototype._toJSON=n.abstractFunction,j.prototype._isValid=n.abstractFunction,j.prototype.compare=n.abstractFunction,L.prototype.defaultValue=function(){},Object.defineProperty(L.prototype,"order",{enumerable:!0,get:function(){return["descending","ignore","ascending"][this._order+1]}}),L.prototype.getAliases=function(){return this.aliases},L.prototype.getDefault=L.prototype.defaultValue,L.prototype.getName=function(){return this.name},L.prototype.getOrder=function(){return this.order},L.prototype.getType=function(){return this.type},U.prototype._peek=y.prototype._peek,U.prototype.inspect=function(){return"<Resolver>"},e.exports={Type:y,getTypeBucket:Z,getValueBucket:J,isPrimitive:$,builtins:function(){var e,t,r,n={LogicalType:R,UnwrappedUnionType:B,WrappedUnionType:O},i=Object.keys(f);for(e=0,t=i.length;e<t;e++)n[z(r=i[e])]=f[r];return n}()}},22561(e,t,r){"use strict";var n=r(48287),i=r(78505),o=r(40537),s=n.Buffer,a=new d(4096),u=/^[A-Za-z_][A-Za-z0-9_]*$/,c=o.format;function f(e){return"function"==typeof s.alloc?s.alloc(e):new s(e)}function l(e,t){return"function"==typeof s.from?s.from(e,t):new s(e,t)}function h(e){return e.charAt(0).toUpperCase()+e.slice(1)}function p(e){return u.test(e)}function d(e){this._len=0|e,this._pos=0,this._slab=f(this._len)}function y(e){var t=Math.pow(2,31),r=Math.floor(e||Math.random()*(t-1));this._max=t,this._nextInt=function(){return r=(1103515245*r+12345)%t}}function g(){this._index=0,this._items=[]}function m(e,t){if(this.buf=e,this.pos=0|t,this.pos<0)throw new Error("negative offset")}function v(e,t){for(;t--;)e[t]=~e[t]}d.prototype.alloc=function(e){if(e<0)throw new Error("negative length");var t=this._len;return e>t?f(e):(this._pos+e>t&&(this._slab=f(t),this._pos=0),this._slab.slice(this._pos,this._pos+=e))},y.prototype.nextBoolean=function(){return!!(this._nextInt()%2)},y.prototype.nextInt=function(e,t){return void 0===t&&(t=e,e=0),t=void 0===t?this._max:t,e+Math.floor(this.nextFloat()*(t-e))},y.prototype.nextFloat=function(e,t){return void 0===t&&(t=e,e=0),e+((t=void 0===t?1:t)-e)*this._nextInt()/this._max},y.prototype.nextString=function(e,t){e|=0;var r="";(t=t||"aA").indexOf("a")>-1&&(r+="abcdefghijklmnopqrstuvwxyz"),t.indexOf("A")>-1&&(r+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.indexOf("#")>-1&&(r+="0123456789"),t.indexOf("!")>-1&&(r+="~`!@#$%^&*()_+-={}[]:\";'<>?,./|\\");for(var n=[],i=0;i<e;i++)n.push(this.choice(r));return n.join("")},y.prototype.nextBuffer=function(e){var t,r=[];for(t=0;t<e;t++)r.push(this.nextInt(256));return l(r)},y.prototype.choice=function(e){var t=e.length;if(!t)throw new Error("choosing from empty array");return e[this.nextInt(t)]},g.prototype.push=function(e){var t,r=this._items,n=0|r.length;for(r.push(e);n>0&&r[n].index<r[t=n-1>>1].index;)e=r[n],r[n]=r[t],r[t]=e,n=t},g.prototype.pop=function(){var e=this._items,t=e.length-1|0,r=e[0];if(!r||r.index>this._index)return null;if(this._index++,!t)return e.pop(),r;e[0]=e.pop();for(var n,i,o,s,a,u,c,f=t>>1,l=0;l<f&&(s=e[l],i=l+1<<1,u=e[n=1+(l<<1)],!(c=e[i])||u.index<=c.index?(a=u,o=n):(a=c,o=i),!(a.index>=s.index));)e[o]=s,e[l]=a,l=o;return r},m.prototype.isValid=function(){return this.pos<=this.buf.length},m.prototype._invalidate=function(){this.pos=this.buf.length+1},m.prototype.readBoolean=function(){return!!this.buf[this.pos++]},m.prototype.skipBoolean=function(){this.pos++},m.prototype.writeBoolean=function(e){this.buf[this.pos++]=!!e},m.prototype.readInt=m.prototype.readLong=function(){var e,t,r,n,i=0,o=0,s=this.buf;do{t=128&(e=s[this.pos++]),i|=(127&e)<<o,o+=7}while(t&&o<28);if(t){r=i,n=268435456;do{r+=(127&(e=s[this.pos++]))*n,n*=128}while(128&e);return(r%2?-(r+1):r)/2}return i>>1^-(1&i)},m.prototype.skipInt=m.prototype.skipLong=function(){for(var e=this.buf;128&e[this.pos++];);},m.prototype.writeInt=m.prototype.writeLong=function(e){var t,r,n=this.buf;if(e>=-1073741824&&e<1073741824){r=e>=0?e<<1:~e<<1|1;do{n[this.pos]=127&r,r>>=7}while(r&&(n[this.pos++]|=128))}else{t=e>=0?2*e:2*-e-1;do{n[this.pos]=127&t,t/=128}while(t>=1&&(n[this.pos++]|=128))}this.pos++},m.prototype.readFloat=function(){var e=this.buf,t=this.pos;return this.pos+=4,this.pos>e.length?0:this.buf.readFloatLE(t)},m.prototype.skipFloat=function(){this.pos+=4},m.prototype.writeFloat=function(e){var t=this.buf,r=this.pos;if(this.pos+=4,!(this.pos>t.length))return this.buf.writeFloatLE(e,r)},m.prototype.readDouble=function(){var e=this.buf,t=this.pos;return this.pos+=8,this.pos>e.length?0:this.buf.readDoubleLE(t)},m.prototype.skipDouble=function(){this.pos+=8},m.prototype.writeDouble=function(e){var t=this.buf,r=this.pos;if(this.pos+=8,!(this.pos>t.length))return this.buf.writeDoubleLE(e,r)},m.prototype.readFixed=function(e){var t=this.pos;if(this.pos+=e,!(this.pos>this.buf.length)){var r=a.alloc(e);return this.buf.copy(r,0,t,t+e),r}},m.prototype.skipFixed=function(e){this.pos+=e},m.prototype.writeFixed=function(e,t){t=t||e.length;var r=this.pos;this.pos+=t,this.pos>this.buf.length||e.copy(this.buf,r,0,t)},m.prototype.readBytes=function(){var e=this.readLong();if(!(e<0))return this.readFixed(e);this._invalidate()},m.prototype.skipBytes=function(){var e=this.readLong();e<0?this._invalidate():this.pos+=e},m.prototype.writeBytes=function(e){var t=e.length;this.writeLong(t),this.writeFixed(e,t)},"function"==typeof s.prototype.utf8Slice?m.prototype.readString=function(){var e=this.readLong();if(e<0)return this._invalidate(),"";var t=this.pos,r=this.buf;return this.pos+=e,this.pos>r.length?void 0:this.buf.utf8Slice(t,t+e)}:m.prototype.readString=function(){var e=this.readLong();if(e<0)return this._invalidate(),"";var t=this.pos,r=this.buf;return this.pos+=e,this.pos>r.length?void 0:this.buf.slice(t,t+e).toString()},m.prototype.skipString=function(){var e=this.readLong();e<0?this._invalidate():this.pos+=e},m.prototype.writeString=function(e){var t=s.byteLength(e),r=this.buf;this.writeLong(t);var n,i,o,a,u=this.pos;if(this.pos+=t,!(this.pos>r.length))if(t>64&&"function"==typeof s.prototype.utf8Write)r.utf8Write(e,u,t);else for(n=0,i=t;n<i;n++)(o=e.charCodeAt(n))<128?r[u++]=o:o<2048?(r[u++]=o>>6|192,r[u++]=63&o|128):55296==(64512&o)&&56320==(64512&(a=e.charCodeAt(n+1)))?(o=65536+((1023&o)<<10)+(1023&a),n++,r[u++]=o>>18|240,r[u++]=o>>12&63|128,r[u++]=o>>6&63|128,r[u++]=63&o|128):(r[u++]=o>>12|224,r[u++]=o>>6&63|128,r[u++]=63&o|128)},"function"==typeof s.prototype.latin1Write?m.prototype.writeBinary=function(e,t){var r=this.pos;this.pos+=t,this.pos>this.buf.length||this.buf.latin1Write(e,r,t)}:"function"==typeof s.prototype.binaryWrite?m.prototype.writeBinary=function(e,t){var r=this.pos;this.pos+=t,this.pos>this.buf.length||this.buf.binaryWrite(e,r,t)}:m.prototype.writeBinary=function(e,t){var r=this.pos;this.pos+=t,this.pos>this.buf.length||this.buf.write(e,r,t,"binary")},m.prototype.matchBoolean=function(e){return this.buf[this.pos++]-e.buf[e.pos++]},m.prototype.matchInt=m.prototype.matchLong=function(e){var t=this.readLong(),r=e.readLong();return t===r?0:t<r?-1:1},m.prototype.matchFloat=function(e){var t=this.readFloat(),r=e.readFloat();return t===r?0:t<r?-1:1},m.prototype.matchDouble=function(e){var t=this.readDouble(),r=e.readDouble();return t===r?0:t<r?-1:1},m.prototype.matchFixed=function(e,t){return this.readFixed(t).compare(e.readFixed(t))},m.prototype.matchBytes=m.prototype.matchString=function(e){var t=this.readLong(),r=this.pos;this.pos+=t;var n=e.readLong(),i=e.pos;e.pos+=n;var o=this.buf.slice(r,this.pos),s=e.buf.slice(i,e.pos);return o.compare(s)},m.prototype.unpackLongBytes=function(){var e,t,r=f(8),n=0,i=0,o=6,s=this.buf;for(t=1&(e=s[this.pos++]),r.fill(0),n|=(127&e)>>1;128&e;)n|=(127&(e=s[this.pos++]))<<o,(o+=7)>=8&&(o-=8,r[i++]=n,n>>=8);return r[i]=n,t&&v(r,8),r},m.prototype.packLongBytes=function(e){var t,r=(128&e[7])>>7,n=this.buf,i=1,o=0,s=3;r?(v(e,8),t=1):t=0;for(var a=[e.readUIntLE(0,3),e.readUIntLE(3,3),e.readUIntLE(6,2)];s&&!a[--s];);for(;o<s;)for(t|=a[o++]<<i,i+=24;i>7;)n[this.pos++]=127&t|128,t>>=7,i-=7;t|=a[s]<<i;do{n[this.pos]=127&t,t>>=7}while(t&&(n[this.pos++]|=128));this.pos++,r&&v(e,8)},e.exports={abstractFunction:function(){throw new Error("abstract")},addDeprecatedGetters:function(e,t){var r,n,i,s,a=e.prototype;for(r=0,n=t.length;r<n;r++)a[s="get"+h(i=t[r])]=o.deprecate(u(i),"use `."+i+"` instead of `."+s+"()`");function u(e){return function(){var t=this[e];return"function"==typeof t?t.apply(this,arguments):t}}},bufferFrom:l,capitalize:h,copyOwnProperties:function(e,t,r){var n,i,o,s=Object.getOwnPropertyNames(e);for(n=0,i=s.length;n<i;n++)if(o=s[n],!t.hasOwnProperty(o)||r){var a=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,a)}return t},getHash:function(e,t){t=t||"md5";var r=i.createHash(t);return r.end(e),r.read()},compare:function(e,t){return e===t?0:e<t?-1:1},getOption:function(e,t,r){var n=e[t];return void 0===n?r:n},impliedNamespace:function(e){var t=/^(.*)\.[^.]+$/.exec(e);return t?t[1]:void 0},isValidName:p,jsonEnd:function(e,t){t|=0;var r=e.charAt(t++);if(/[\d-]/.test(r)){for(;/[eE\d.+-]/.test(e.charAt(t));)t++;return t}if(/true|null/.test(e.slice(t-1,t+3)))return t+3;if(/false/.test(e.slice(t-1,t+4)))return t+4;var n=0,i=!1;do{switch(r){case"{":case"[":i||n++;break;case"}":case"]":if(!i&&! --n)return t;break;case'"':if(i=!i,!n&&!i)return t;break;case"\\":t++}}while(r=e.charAt(t++));return-1},newBuffer:f,newSlowBuffer:function(e){return"function"==typeof s.allocUnsafeSlow?s.allocUnsafeSlow(e):new n.SlowBuffer(e)},objectValues:function(e){return Object.keys(e).map(function(t){return e[t]})},qualify:function(e,t){return~e.indexOf(".")?e=e.replace(/^\./,""):t&&(e=t+"."+e),e.split(".").forEach(function(t){if(!p(t))throw new Error(c("invalid name: %j",e))}),e},toMap:function(e,t){var r,n,i={};for(r=0;r<e.length;r++)i[t(n=e[r])]=n;return i},singleIndexOf:function(e,t){var r,n,i=-1;if(!e)return-1;for(r=0,n=e.length;r<n;r++)if(e[r]===t){if(i>=0)return-2;i=r}return i},hasDuplicates:function(e,t){var r,n,i,o=Object.create(null);for(r=0,n=e.length;r<n;r++){if(i=e[r],t&&(i=t(i)),o[i])return!0;o[i]=!0}return!1},unqualify:function(e){var t=e.split(".");return t[t.length-1]},BufferPool:d,Lcg:y,OrderedQueue:g,Tap:m}},67526(e,t){"use strict";t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=a(e),s=o[0],u=o[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,u)),f=0,l=u>0?s-4:s;for(r=0;r<l;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[f++]=t>>16&255,c[f++]=t>>8&255,c[f++]=255&t;return 2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[f++]=255&t),1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[f++]=t>>8&255,c[f++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,u=n-i;a<u;a+=s)o.push(c(e,a,a+s>u?u:a+s));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function c(e,t,r){for(var n,i=[],o=t;o<r;o+=3)n=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),i.push(u(n));return i.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},5974(e,t,r){"use strict";var n=r(48287).Buffer,i=r(65606),o=r(94148),s=r(44442),a=r(58411),u=r(71447),c=r(19681);for(var f in c)t[f]=c[f];function l(e){if("number"!=typeof e||e<t.DEFLATE||e>t.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=e,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}t.NONE=0,t.DEFLATE=1,t.INFLATE=2,t.GZIP=3,t.GUNZIP=4,t.DEFLATERAW=5,t.INFLATERAW=6,t.UNZIP=7,l.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,o(this.init_done,"close before init"),o(this.mode<=t.UNZIP),this.mode===t.DEFLATE||this.mode===t.GZIP||this.mode===t.DEFLATERAW?a.deflateEnd(this.strm):this.mode!==t.INFLATE&&this.mode!==t.GUNZIP&&this.mode!==t.INFLATERAW&&this.mode!==t.UNZIP||u.inflateEnd(this.strm),this.mode=t.NONE,this.dictionary=null)},l.prototype.write=function(e,t,r,n,i,o,s){return this._write(!0,e,t,r,n,i,o,s)},l.prototype.writeSync=function(e,t,r,n,i,o,s){return this._write(!1,e,t,r,n,i,o,s)},l.prototype._write=function(e,r,s,a,u,c,f,l){if(o.equal(arguments.length,8),o(this.init_done,"write before init"),o(this.mode!==t.NONE,"already finalized"),o.equal(!1,this.write_in_progress,"write already in progress"),o.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,o.equal(!1,void 0===r,"must provide flush value"),this.write_in_progress=!0,r!==t.Z_NO_FLUSH&&r!==t.Z_PARTIAL_FLUSH&&r!==t.Z_SYNC_FLUSH&&r!==t.Z_FULL_FLUSH&&r!==t.Z_FINISH&&r!==t.Z_BLOCK)throw new Error("Invalid flush value");if(null==s&&(s=n.alloc(0),u=0,a=0),this.strm.avail_in=u,this.strm.input=s,this.strm.next_in=a,this.strm.avail_out=l,this.strm.output=c,this.strm.next_out=f,this.flush=r,!e)return this._process(),this._checkError()?this._afterSync():void 0;var h=this;return i.nextTick(function(){h._process(),h._after()}),this},l.prototype._afterSync=function(){var e=this.strm.avail_out,t=this.strm.avail_in;return this.write_in_progress=!1,[t,e]},l.prototype._process=function(){var e=null;switch(this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=a.deflate(this.strm,this.flush);break;case t.UNZIP:switch(this.strm.avail_in>0&&(e=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===e)break;if(31!==this.strm.input[e]){this.mode=t.INFLATE;break}if(this.gzip_id_bytes_read=1,e++,1===this.strm.avail_in)break;case 1:if(null===e)break;139===this.strm.input[e]?(this.gzip_id_bytes_read=2,this.mode=t.GUNZIP):this.mode=t.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:for(this.err=u.inflate(this.strm,this.flush),this.err===t.Z_NEED_DICT&&this.dictionary&&(this.err=u.inflateSetDictionary(this.strm,this.dictionary),this.err===t.Z_OK?this.err=u.inflate(this.strm,this.flush):this.err===t.Z_DATA_ERROR&&(this.err=t.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===t.GUNZIP&&this.err===t.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=u.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},l.prototype._checkError=function(){switch(this.err){case t.Z_OK:case t.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===t.Z_FINISH)return this._error("unexpected end of file"),!1;break;case t.Z_STREAM_END:break;case t.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},l.prototype._after=function(){if(this._checkError()){var e=this.strm.avail_out,t=this.strm.avail_in;this.write_in_progress=!1,this.callback(t,e),this.pending_close&&this.close()}},l.prototype._error=function(e){this.strm.msg&&(e=this.strm.msg),this.onerror(e,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},l.prototype.init=function(e,r,n,i,s){o(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),o(e>=8&&e<=15,"invalid windowBits"),o(r>=-1&&r<=9,"invalid compression level"),o(n>=1&&n<=9,"invalid memlevel"),o(i===t.Z_FILTERED||i===t.Z_HUFFMAN_ONLY||i===t.Z_RLE||i===t.Z_FIXED||i===t.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(r,e,n,i,s),this._setDictionary()},l.prototype.params=function(){throw new Error("deflateParams Not supported")},l.prototype.reset=function(){this._reset(),this._setDictionary()},l.prototype._init=function(e,r,n,i,o){switch(this.level=e,this.windowBits=r,this.memLevel=n,this.strategy=i,this.flush=t.Z_NO_FLUSH,this.err=t.Z_OK,this.mode!==t.GZIP&&this.mode!==t.GUNZIP||(this.windowBits+=16),this.mode===t.UNZIP&&(this.windowBits+=32),this.mode!==t.DEFLATERAW&&this.mode!==t.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new s,this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=a.deflateInit2(this.strm,this.level,t.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:case t.UNZIP:this.err=u.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==t.Z_OK&&this._error("Init error"),this.dictionary=o,this.write_in_progress=!1,this.init_done=!0},l.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:this.err=a.deflateSetDictionary(this.strm,this.dictionary)}this.err!==t.Z_OK&&this._error("Failed to set dictionary")}},l.prototype._reset=function(){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:case t.GZIP:this.err=a.deflateReset(this.strm);break;case t.INFLATE:case t.INFLATERAW:case t.GUNZIP:this.err=u.inflateReset(this.strm)}this.err!==t.Z_OK&&this._error("Failed to reset stream")},t.Zlib=l},78559(e,t,r){"use strict";var n=r(65606),i=r(48287).Buffer,o=r(88310).Transform,s=r(5974),a=r(40537),u=r(94148).ok,c=r(48287).kMaxLength,f="Cannot create final Buffer. It would be larger than 0x"+c.toString(16)+" bytes";s.Z_MIN_WINDOWBITS=8,s.Z_MAX_WINDOWBITS=15,s.Z_DEFAULT_WINDOWBITS=15,s.Z_MIN_CHUNK=64,s.Z_MAX_CHUNK=1/0,s.Z_DEFAULT_CHUNK=16384,s.Z_MIN_MEMLEVEL=1,s.Z_MAX_MEMLEVEL=9,s.Z_DEFAULT_MEMLEVEL=8,s.Z_MIN_LEVEL=-1,s.Z_MAX_LEVEL=9,s.Z_DEFAULT_LEVEL=s.Z_DEFAULT_COMPRESSION;for(var l=Object.keys(s),h=0;h<l.length;h++){var p=l[h];p.match(/^Z/)&&Object.defineProperty(t,p,{enumerable:!0,value:s[p],writable:!1})}for(var d={Z_OK:s.Z_OK,Z_STREAM_END:s.Z_STREAM_END,Z_NEED_DICT:s.Z_NEED_DICT,Z_ERRNO:s.Z_ERRNO,Z_STREAM_ERROR:s.Z_STREAM_ERROR,Z_DATA_ERROR:s.Z_DATA_ERROR,Z_MEM_ERROR:s.Z_MEM_ERROR,Z_BUF_ERROR:s.Z_BUF_ERROR,Z_VERSION_ERROR:s.Z_VERSION_ERROR},y=Object.keys(d),g=0;g<y.length;g++){var m=y[g];d[d[m]]=m}function v(e,t,r){var n=[],o=0;function s(){for(var t;null!==(t=e.read());)n.push(t),o+=t.length;e.once("readable",s)}function a(){var t,s=null;o>=c?s=new RangeError(f):t=i.concat(n,o),n=[],e.close(),r(s,t)}e.on("error",function(t){e.removeListener("end",a),e.removeListener("readable",s),r(t)}),e.on("end",a),e.end(t),s()}function b(e,t){if("string"==typeof t&&(t=i.from(t)),!i.isBuffer(t))throw new TypeError("Not a string or buffer");var r=e._finishFlushFlag;return e._processChunk(t,r)}function w(e){if(!(this instanceof w))return new w(e);k.call(this,e,s.DEFLATE)}function _(e){if(!(this instanceof _))return new _(e);k.call(this,e,s.INFLATE)}function E(e){if(!(this instanceof E))return new E(e);k.call(this,e,s.GZIP)}function x(e){if(!(this instanceof x))return new x(e);k.call(this,e,s.GUNZIP)}function S(e){if(!(this instanceof S))return new S(e);k.call(this,e,s.DEFLATERAW)}function A(e){if(!(this instanceof A))return new A(e);k.call(this,e,s.INFLATERAW)}function B(e){if(!(this instanceof B))return new B(e);k.call(this,e,s.UNZIP)}function O(e){return e===s.Z_NO_FLUSH||e===s.Z_PARTIAL_FLUSH||e===s.Z_SYNC_FLUSH||e===s.Z_FULL_FLUSH||e===s.Z_FINISH||e===s.Z_BLOCK}function k(e,r){var n=this;if(this._opts=e=e||{},this._chunkSize=e.chunkSize||t.Z_DEFAULT_CHUNK,o.call(this,e),e.flush&&!O(e.flush))throw new Error("Invalid flush flag: "+e.flush);if(e.finishFlush&&!O(e.finishFlush))throw new Error("Invalid flush flag: "+e.finishFlush);if(this._flushFlag=e.flush||s.Z_NO_FLUSH,this._finishFlushFlag=void 0!==e.finishFlush?e.finishFlush:s.Z_FINISH,e.chunkSize&&(e.chunkSize<t.Z_MIN_CHUNK||e.chunkSize>t.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBits<t.Z_MIN_WINDOWBITS||e.windowBits>t.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.level<t.Z_MIN_LEVEL||e.level>t.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevel<t.Z_MIN_MEMLEVEL||e.memLevel>t.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=t.Z_FILTERED&&e.strategy!=t.Z_HUFFMAN_ONLY&&e.strategy!=t.Z_RLE&&e.strategy!=t.Z_FIXED&&e.strategy!=t.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!i.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new s.Zlib(r);var a=this;this._hadError=!1,this._handle.onerror=function(e,r){T(a),a._hadError=!0;var n=new Error(e);n.errno=r,n.code=t.codes[r],a.emit("error",n)};var u=t.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(u=e.level);var c=t.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(c=e.strategy),this._handle.init(e.windowBits||t.Z_DEFAULT_WINDOWBITS,u,e.memLevel||t.Z_DEFAULT_MEMLEVEL,c,e.dictionary),this._buffer=i.allocUnsafe(this._chunkSize),this._offset=0,this._level=u,this._strategy=c,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!n._handle},configurable:!0,enumerable:!0})}function T(e,t){t&&n.nextTick(t),e._handle&&(e._handle.close(),e._handle=null)}function I(e){e.emit("close")}Object.defineProperty(t,"codes",{enumerable:!0,value:Object.freeze(d),writable:!1}),t.Deflate=w,t.Inflate=_,t.Gzip=E,t.Gunzip=x,t.DeflateRaw=S,t.InflateRaw=A,t.Unzip=B,t.createDeflate=function(e){return new w(e)},t.createInflate=function(e){return new _(e)},t.createDeflateRaw=function(e){return new S(e)},t.createInflateRaw=function(e){return new A(e)},t.createGzip=function(e){return new E(e)},t.createGunzip=function(e){return new x(e)},t.createUnzip=function(e){return new B(e)},t.deflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),v(new w(t),e,r)},t.deflateSync=function(e,t){return b(new w(t),e)},t.gzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),v(new E(t),e,r)},t.gzipSync=function(e,t){return b(new E(t),e)},t.deflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),v(new S(t),e,r)},t.deflateRawSync=function(e,t){return b(new S(t),e)},t.unzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),v(new B(t),e,r)},t.unzipSync=function(e,t){return b(new B(t),e)},t.inflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),v(new _(t),e,r)},t.inflateSync=function(e,t){return b(new _(t),e)},t.gunzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),v(new x(t),e,r)},t.gunzipSync=function(e,t){return b(new x(t),e)},t.inflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),v(new A(t),e,r)},t.inflateRawSync=function(e,t){return b(new A(t),e)},a.inherits(k,o),k.prototype.params=function(e,r,i){if(e<t.Z_MIN_LEVEL||e>t.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(r!=t.Z_FILTERED&&r!=t.Z_HUFFMAN_ONLY&&r!=t.Z_RLE&&r!=t.Z_FIXED&&r!=t.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+r);if(this._level!==e||this._strategy!==r){var o=this;this.flush(s.Z_SYNC_FLUSH,function(){u(o._handle,"zlib binding closed"),o._handle.params(e,r),o._hadError||(o._level=e,o._strategy=r,i&&i())})}else n.nextTick(i)},k.prototype.reset=function(){return u(this._handle,"zlib binding closed"),this._handle.reset()},k.prototype._flush=function(e){this._transform(i.alloc(0),"",e)},k.prototype.flush=function(e,t){var r=this,o=this._writableState;("function"==typeof e||void 0===e&&!t)&&(t=e,e=s.Z_FULL_FLUSH),o.ended?t&&n.nextTick(t):o.ending?t&&this.once("end",t):o.needDrain?t&&this.once("drain",function(){return r.flush(e,t)}):(this._flushFlag=e,this.write(i.alloc(0),"",t))},k.prototype.close=function(e){T(this,e),n.nextTick(I,this)},k.prototype._transform=function(e,t,r){var n,o=this._writableState,a=(o.ending||o.ended)&&(!e||o.length===e.length);return null===e||i.isBuffer(e)?this._handle?(a?n=this._finishFlushFlag:(n=this._flushFlag,e.length>=o.length&&(this._flushFlag=this._opts.flush||s.Z_NO_FLUSH)),void this._processChunk(e,n,r)):r(new Error("zlib binding closed")):r(new Error("invalid input"))},k.prototype._processChunk=function(e,t,r){var n=e&&e.length,o=this._chunkSize-this._offset,s=0,a=this,l="function"==typeof r;if(!l){var h,p=[],d=0;this.on("error",function(e){h=e}),u(this._handle,"zlib binding closed");do{var y=this._handle.writeSync(t,e,s,n,this._buffer,this._offset,o)}while(!this._hadError&&v(y[0],y[1]));if(this._hadError)throw h;if(d>=c)throw T(this),new RangeError(f);var g=i.concat(p,d);return T(this),g}u(this._handle,"zlib binding closed");var m=this._handle.write(t,e,s,n,this._buffer,this._offset,o);function v(c,f){if(this&&(this.buffer=null,this.callback=null),!a._hadError){var h=o-f;if(u(h>=0,"have should not go down"),h>0){var y=a._buffer.slice(a._offset,a._offset+h);a._offset+=h,l?a.push(y):(p.push(y),d+=y.length)}if((0===f||a._offset>=a._chunkSize)&&(o=a._chunkSize,a._offset=0,a._buffer=i.allocUnsafe(a._chunkSize)),0===f){if(s+=n-c,n=c,!l)return!0;var g=a._handle.write(t,e,s,n,a._buffer,a._offset,a._chunkSize);return g.callback=v,void(g.buffer=e)}if(!l)return!1;r()}}m.buffer=e,m.callback=v},a.inherits(w,k),a.inherits(_,k),a.inherits(E,k),a.inherits(x,k),a.inherits(S,k),a.inherits(A,k),a.inherits(B,k)},48287(e,t,r){"use strict";const n=r(67526),i=r(251),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|y(e,t);let n=a(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(J(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(J(e,ArrayBuffer)||e&&J(e.buffer,ArrayBuffer))return p(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(J(e,SharedArrayBuffer)||e&&J(e.buffer,SharedArrayBuffer)))return p(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);const i=function(e){if(u.isBuffer(e)){const t=0|d(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||Y(e.length)?a(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return f(e),a(e<0?0:0|d(e))}function h(e){const t=e.length<0?0:0|d(e.length),r=a(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function p(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function d(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function y(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||J(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(e).length;default:if(i)return n?-1:G(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,r);case"utf8":case"utf-8":return B(this,t,r);case"ascii":return k(this,t,r);case"latin1":case"binary":return T(this,t,r);case"base64":return A(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function v(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){let o,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let n=-1;for(o=r;o<a;o++)if(c(e,o)===c(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===u)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){let r=!0;for(let n=0;n<u;n++)if(c(e,o+n)!==c(t,n)){r=!1;break}if(r)return o}return-1}function w(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=t.length;let s;for(n>o/2&&(n=o/2),s=0;s<n;++s){const n=parseInt(t.substr(2*s,2),16);if(Y(n))return s;e[r+s]=n}return s}function _(e,t,r,n){return Z(G(t,e.length-r),e,r,n)}function E(e,t,r,n){return Z(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function x(e,t,r,n){return Z(W(t),e,r,n)}function S(e,t,r,n){return Z(function(e,t){let r,n,i;const o=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function A(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function B(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let o=null,s=t>239?4:t>223?3:t>191?2:1;if(i+s<=r){let r,n,a,u;switch(s){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(o=u));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(e){const t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=O));return r}(n)}t.kMaxLength=s,u.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return function(e,t,r){return f(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},u.allocUnsafe=function(e){return l(e)},u.allocUnsafeSlow=function(e){return l(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(J(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),J(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=u.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(J(t,Uint8Array))i+t.length>n.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},u.byteLength=y,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)m(this,t,t+1);return this},u.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},u.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?B(this,0,e):g.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(J(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const a=Math.min(o,s),c=this.slice(n,i),f=e.slice(t,r);for(let e=0;e<a;++e)if(c[e]!==f[e]){o=c[e],s=f[e];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return v(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return v(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return x(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const O=4096;function k(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function T(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function I(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=K[e[n]];return i}function N(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function F(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function j(e,t,r,n,i){z(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function L(e,t,r,n,i){z(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function U(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function P(e,t,r,n,o){return t=+t,r>>>=0,o||U(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function C(e,t,r,n,o){return t=+t,r>>>=0,o||U(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||F(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||F(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||F(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=X(function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))}),u.prototype.readBigUInt64BE=X(function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)}),u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||F(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||F(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return e>>>=0,t||F(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||F(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||F(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=X(function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),u.prototype.readBigInt64BE=X(function(e){H(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)}),u.prototype.readFloatLE=function(e,t){return e>>>=0,t||F(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||F(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||F(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||F(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||R(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||R(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=X(function(e,t=0){return j(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=X(function(e,t=0){return L(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);R(this,e,t,r,n-1,-n)}let i=0,o=1,s=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);R(this,e,t,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=X(function(e,t=0){return j(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=X(function(e,t=0){return L(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeFloatLE=function(e,t,r){return P(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return P(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return C(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return C(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const o=u.isBuffer(e)?e:u.from(e,n),s=o.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%s]}return this};const M={};function D(e,t,r){M[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function $(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function z(e,t,r,n,i,o){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new M.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){H(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||V(t,e.length-(r+1))}(n,i,o)}function H(e,t){if("number"!=typeof e)throw new M.ERR_INVALID_ARG_TYPE(t,"number",e)}function V(e,t,r){if(Math.floor(e)!==e)throw H(e,r),new M.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new M.ERR_BUFFER_OUT_OF_BOUNDS;throw new M.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}D("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),D("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),D("ERR_OUT_OF_RANGE",function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=$(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=$(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);const q=/[^+/0-9A-Za-z-_]/g;function G(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let s=0;s<n;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function W(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(q,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Z(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function J(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}const K=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function X(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},13144(e,t,r){"use strict";var n=r(66743),i=r(11002),o=r(10076),s=r(47119);e.exports=s||n.call(o,i)},12205(e,t,r){"use strict";var n=r(66743),i=r(11002),o=r(13144);e.exports=function(){return o(n,i,arguments)}},11002(e){"use strict";e.exports=Function.prototype.apply},10076(e){"use strict";e.exports=Function.prototype.call},73126(e,t,r){"use strict";var n=r(66743),i=r(69675),o=r(10076),s=r(13144);e.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new i("a function is required");return s(n,o,e)}},47119(e){"use strict";e.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},38075(e,t,r){"use strict";var n=r(70453),i=r(10487),o=i(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?i(r):r}},10487(e,t,r){"use strict";var n=r(96897),i=r(30655),o=r(73126),s=r(12205);e.exports=function(e){var t=o(arguments),r=e.length-(arguments.length-1);return n(t,1+(r>0?r:0),!0)},i?i(e.exports,"apply",{value:s}):e.exports.apply=s},36556(e,t,r){"use strict";var n=r(70453),i=r(73126),o=i([n("%String.prototype.indexOf%")]);e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&o(e,".prototype.")>-1?i([r]):r}},49881(e,t,r){"use strict";const n=r(20893),i=r(79777),o=r(93737),s=r(72893),a=r(15059),u=r(53557),c=r(82903),f=r(207);e.exports={Commented:n,Diagnose:i,Decoder:o,Encoder:s,Simple:a,Tagged:u,Map:c,SharedValueEncoder:f,comment:n.comment,decodeAll:o.decodeAll,decodeFirst:o.decodeFirst,decodeAllSync:o.decodeAllSync,decodeFirstSync:o.decodeFirstSync,diagnose:i.diagnose,encode:s.encode,encodeCanonical:s.encodeCanonical,encodeOne:s.encodeOne,encodeAsync:s.encodeAsync,decode:o.decodeFirstSync,leveldb:{decode:o.decodeFirstSync,encode:s.encode,buffer:!0,name:"cbor"},reset(){s.reset(),u.reset()}}},20893(e,t,r){"use strict";const n=r(88310),i=r(27328),o=r(93737),s=r(5256),{MT:a,NUMBYTES:u,SYMS:c}=r(79452),{Buffer:f}=r(48287);function l(e){return e>1?"s":""}class h extends n.Transform{constructor(e={}){const{depth:t=1,max_depth:r=10,no_summary:n=!1,tags:i={},preferWeb:a,encoding:u,...c}=e;super({...c,readableObjectMode:!1,writableObjectMode:!1}),this.depth=t,this.max_depth=r,this.all=new s,i[24]||(i[24]=this._tag_24.bind(this)),this.parser=new o({tags:i,max_depth:r,preferWeb:a,encoding:u}),this.parser.on("value",this._on_value.bind(this)),this.parser.on("start",this._on_start.bind(this)),this.parser.on("start-string",this._on_start_string.bind(this)),this.parser.on("stop",this._on_stop.bind(this)),this.parser.on("more-bytes",this._on_more.bind(this)),this.parser.on("error",this._on_error.bind(this)),n||this.parser.on("data",this._on_data.bind(this)),this.parser.bs.on("read",this._on_read.bind(this))}_tag_24(e){const t=new h({depth:this.depth+1,no_summary:!0});t.on("data",e=>this.push(e)),t.on("error",e=>this.emit("error",e)),t.end(e)}_transform(e,t,r){this.parser.write(e,t,r)}_flush(e){return this.parser._flush(e)}static comment(e,t={},r=null){if(null==e)throw new Error("input required");({options:t,cb:r}=function(e,t){switch(typeof e){case"function":return{options:{},cb:e};case"string":return{options:{encoding:e},cb:t};case"number":return{options:{max_depth:e},cb:t};case"object":return{options:e||{},cb:t};default:throw new TypeError("Unknown option type")}}(t,r));const n=new s,{encoding:o="hex",...a}=t,u=new h(a);let c=null;return"function"==typeof r?(u.on("end",()=>{r(null,n.toString("utf8"))}),u.on("error",r)):c=new Promise((e,t)=>{u.on("end",()=>{e(n.toString("utf8"))}),u.on("error",t)}),u.pipe(n),i.guessEncoding(e,o).pipe(u),c}_on_error(e){this.push("ERROR: "),this.push(e.toString()),this.push("\n")}_on_read(e){this.all.write(e);const t=e.toString("hex");this.push(new Array(this.depth+1).join(" ")),this.push(t);let r=2*(this.max_depth-this.depth)-t.length;r<1&&(r=1),this.push(new Array(r+1).join(" ")),this.push("-- ")}_on_more(e,t,r,n){let i="";switch(this.depth++,e){case a.POS_INT:i="Positive number,";break;case a.NEG_INT:i="Negative number,";break;case a.ARRAY:i="Array, length";break;case a.MAP:i="Map, count";break;case a.BYTE_STRING:i="Bytes, length";break;case a.UTF8_STRING:i="String, length";break;case a.SIMPLE_FLOAT:i=1===t?"Simple value,":"Float,"}this.push(`${i} next ${t} byte${l(t)}\n`)}_on_start_string(e,t,r,n){let i="";switch(this.depth++,e){case a.BYTE_STRING:i=`Bytes, length: ${t}`;break;case a.UTF8_STRING:i=`String, length: ${t.toString()}`}this.push(`${i}\n`)}_on_start(e,t,r,n){switch(this.depth++,r){case a.ARRAY:this.push(`[${n}], `);break;case a.MAP:n%2?this.push(`{Val:${Math.floor(n/2)}}, `):this.push(`{Key:${Math.floor(n/2)}}, `)}switch(e){case a.TAG:this.push(`Tag #${t}`),24===t&&this.push(" Encoded CBOR data item");break;case a.ARRAY:t===c.STREAM?this.push("Array (streaming)"):this.push(`Array, ${t} item${l(t)}`);break;case a.MAP:t===c.STREAM?this.push("Map (streaming)"):this.push(`Map, ${t} pair${l(t)}`);break;case a.BYTE_STRING:this.push("Bytes (streaming)");break;case a.UTF8_STRING:this.push("String (streaming)")}this.push("\n")}_on_stop(e){this.depth--}_on_value(e,t,r,n){if(e!==c.BREAK)switch(t){case a.ARRAY:this.push(`[${r}], `);break;case a.MAP:r%2?this.push(`{Val:${Math.floor(r/2)}}, `):this.push(`{Key:${Math.floor(r/2)}}, `)}const o=i.cborValueToString(e,-1/0);switch("string"==typeof e||f.isBuffer(e)?(e.length>0&&(this.push(o),this.push("\n")),this.depth--):(this.push(o),this.push("\n")),n){case u.ONE:case u.TWO:case u.FOUR:case u.EIGHT:this.depth--}}_on_data(){this.push("0x"),this.push(this.all.read().toString("hex")),this.push("\n")}}e.exports=h},79452(e,t){"use strict";t.MT={POS_INT:0,NEG_INT:1,BYTE_STRING:2,UTF8_STRING:3,ARRAY:4,MAP:5,TAG:6,SIMPLE_FLOAT:7},t.TAG={DATE_STRING:0,DATE_EPOCH:1,POS_BIGINT:2,NEG_BIGINT:3,DECIMAL_FRAC:4,BIGFLOAT:5,BASE64URL_EXPECTED:21,BASE64_EXPECTED:22,BASE16_EXPECTED:23,CBOR:24,URI:32,BASE64URL:33,BASE64:34,REGEXP:35,MIME:36,SET:258},t.NUMBYTES={ZERO:0,ONE:24,TWO:25,FOUR:26,EIGHT:27,INDEFINITE:31},t.SIMPLE={FALSE:20,TRUE:21,NULL:22,UNDEFINED:23},t.SYMS={NULL:Symbol.for("github.com/hildjj/node-cbor/null"),UNDEFINED:Symbol.for("github.com/hildjj/node-cbor/undef"),PARENT:Symbol.for("github.com/hildjj/node-cbor/parent"),BREAK:Symbol.for("github.com/hildjj/node-cbor/break"),STREAM:Symbol.for("github.com/hildjj/node-cbor/stream")},t.SHIFT32=4294967296,t.BI={MINUS_ONE:BigInt(-1),NEG_MAX:BigInt(-1)-BigInt(Number.MAX_SAFE_INTEGER),MAXINT32:BigInt("0xffffffff"),MAXINT64:BigInt("0xffffffffffffffff"),SHIFT32:BigInt(t.SHIFT32)}},93737(e,t,r){"use strict";const n=r(54957),i=r(53557),o=r(15059),s=r(27328),a=r(5256),u=(r(88310),r(79452)),{MT:c,NUMBYTES:f,SYMS:l,BI:h}=u,{Buffer:p}=r(48287),d=Symbol("count"),y=Symbol("major type"),g=Symbol("error"),m=Symbol("not found");function v(e,t,r){const n=[];return n[d]=r,n[l.PARENT]=e,n[y]=t,n}function b(e,t){const r=new a;return r[d]=-1,r[l.PARENT]=e,r[y]=t,r}class w extends Error{constructor(e,t){super(`Unexpected data: 0x${e.toString(16)}`),this.name="UnexpectedDataError",this.byte=e,this.value=t}}function _(e,t){switch(typeof e){case"function":return{options:{},cb:e};case"string":return{options:{encoding:e},cb:t};case"object":return{options:e||{},cb:t};default:throw new TypeError("Unknown option type")}}class E extends n{constructor(e={}){const{tags:t={},max_depth:r=-1,preferMap:n=!1,preferWeb:i=!1,required:o=!1,encoding:s="hex",extendedResults:u=!1,preventDuplicateKeys:c=!1,...f}=e;super({defaultEncoding:s,...f}),this.running=!0,this.max_depth=r,this.tags=t,this.preferMap=n,this.preferWeb=i,this.extendedResults=u,this.required=o,this.preventDuplicateKeys=c,u&&(this.bs.on("read",this._onRead.bind(this)),this.valueBytes=new a)}static nullcheck(e){switch(e){case l.NULL:return null;case l.UNDEFINED:return;case m:throw new Error("Value not found");default:return e}}static decodeFirstSync(e,t={}){if(null==e)throw new TypeError("input required");({options:t}=_(t));const{encoding:r="hex",...n}=t,i=new E(n),o=s.guessEncoding(e,r),a=i._parse();let u=a.next();for(;!u.done;){const e=o.read(u.value);if(null==e||e.length!==u.value)throw new Error("Insufficient data");i.extendedResults&&i.valueBytes.write(e),u=a.next(e)}let c=null;if(i.extendedResults)c=u.value,c.unused=o.read();else if(c=E.nullcheck(u.value),o.length>0){const e=o.read(1);throw o.unshift(e),new w(e[0],c)}return c}static decodeAllSync(e,t={}){if(null==e)throw new TypeError("input required");({options:t}=_(t));const{encoding:r="hex",...n}=t,i=new E(n),o=s.guessEncoding(e,r),a=[];for(;o.length>0;){const e=i._parse();let t=e.next();for(;!t.done;){const r=o.read(t.value);if(null==r||r.length!==t.value)throw new Error("Insufficient data");i.extendedResults&&i.valueBytes.write(r),t=e.next(r)}a.push(E.nullcheck(t.value))}return a}static decodeFirst(e,t={},r=null){if(null==e)throw new TypeError("input required");({options:t,cb:r}=_(t,r));const{encoding:n="hex",required:i=!1,...o}=t,a=new E(o);let u=m;const c=s.guessEncoding(e,n),f=new Promise((e,t)=>{a.on("data",e=>{u=E.nullcheck(e),a.close()}),a.once("error",r=>a.extendedResults&&r instanceof w?(u.unused=a.bs.slice(),e(u)):(u!==m&&(r.value=u),u=g,a.close(),t(r))),a.once("end",()=>{switch(u){case m:return i?t(new Error("No CBOR found")):e(u);case g:return;default:return e(u)}})});return"function"==typeof r&&f.then(e=>r(null,e),r),c.pipe(a),f}static decodeAll(e,t={},r=null){if(null==e)throw new TypeError("input required");({options:t,cb:r}=_(t,r));const{encoding:n="hex",...i}=t,o=new E(i),a=[];o.on("data",e=>a.push(E.nullcheck(e)));const u=new Promise((e,t)=>{o.on("error",t),o.on("end",()=>e(a))});return"function"==typeof r&&u.then(e=>r(void 0,e),e=>r(e,void 0)),s.guessEncoding(e,n).pipe(o),u}close(){this.running=!1,this.__fresh=!0}_onRead(e){this.valueBytes.write(e)}*_parse(){let e=null,t=0,r=null;for(;;){if(this.max_depth>=0&&t>this.max_depth)throw new Error(`Maximum depth ${this.max_depth} exceeded`);const[n]=yield 1;if(!this.running)throw this.bs.unshift(p.from([n])),new w(n);const u=n>>5,g=31&n,m=null==e?void 0:e[y],_=null==e?void 0:e.length;switch(g){case f.ONE:this.emit("more-bytes",u,1,m,_),[r]=yield 1;break;case f.TWO:case f.FOUR:case f.EIGHT:{const e=1<<g-24;this.emit("more-bytes",u,e,m,_);const t=yield e;r=u===c.SIMPLE_FLOAT?t:s.parseCBORint(g,t);break}case 28:case 29:case 30:throw this.running=!1,new Error(`Additional info not implemented: ${g}`);case f.INDEFINITE:switch(u){case c.POS_INT:case c.NEG_INT:case c.TAG:throw new Error(`Invalid indefinite encoding for MT ${u}`)}r=-1;break;default:r=g}switch(u){case c.POS_INT:break;case c.NEG_INT:r=r===Number.MAX_SAFE_INTEGER?h.NEG_MAX:"bigint"==typeof r?h.MINUS_ONE-r:-1-r;break;case c.BYTE_STRING:case c.UTF8_STRING:switch(r){case 0:this.emit("start-string",u,r,m,_),r=u===c.UTF8_STRING?"":this.preferWeb?new Uint8Array(0):p.allocUnsafe(0);break;case-1:this.emit("start",u,l.STREAM,m,_),e=b(e,u),t++;continue;default:this.emit("start-string",u,r,m,_),r=yield r,u===c.UTF8_STRING?r=s.utf8(r):this.preferWeb&&(r=new Uint8Array(r.buffer,r.byteOffset,r.length))}break;case c.ARRAY:case c.MAP:switch(r){case 0:r=u===c.MAP?this.preferMap?new Map:{}:[];break;case-1:this.emit("start",u,l.STREAM,m,_),e=v(e,u,-1),t++;continue;default:this.emit("start",u,r,m,_),e=v(e,u,r*(u-3)),t++;continue}break;case c.TAG:this.emit("start",u,r,m,_),e=v(e,u,1),e.push(r),t++;continue;case c.SIMPLE_FLOAT:if("number"==typeof r){if(g===f.ONE&&r<32)throw new Error(`Invalid two-byte encoding of simple value ${r}`);const t=null!=e;r=o.decode(r,t,t&&e[d]<0)}else r=s.parseCBORfloat(r)}this.emit("value",r,m,_,g);let x=!1;for(;null!=e;){if(r===l.BREAK)e[d]=1;else if(Array.isArray(e))e.push(r);else{const t=e[y];if(null!=t&&t!==u)throw this.running=!1,new Error("Invalid major type in indefinite encoding");e.write(r)}if(0!==--e[d]){x=!0;break}if(--t,delete e[d],Array.isArray(e))switch(e[y]){case c.ARRAY:r=e;break;case c.MAP:{let t=!this.preferMap;if(e.length%2!=0)throw new Error(`Invalid map length: ${e.length}`);for(let r=0,n=e.length;t&&r<n;r+=2)if("string"!=typeof e[r]||"__proto__"===e[r]){t=!1;break}if(t){r={};for(let t=0,n=e.length;t<n;t+=2){if(this.preventDuplicateKeys&&Object.prototype.hasOwnProperty.call(r,e[t]))throw new Error("Duplicate keys in a map");r[e[t]]=e[t+1]}}else{r=new Map;for(let t=0,n=e.length;t<n;t+=2){if(this.preventDuplicateKeys&&r.has(e[t]))throw new Error("Duplicate keys in a map");r.set(e[t],e[t+1])}}break}case c.TAG:r=new i(e[0],e[1]).convert(this.tags)}else if(e instanceof a)switch(e[y]){case c.BYTE_STRING:r=e.slice(),this.preferWeb&&(r=new Uint8Array(r.buffer,r.byteOffset,r.length));break;case c.UTF8_STRING:r=e.toString("utf-8")}this.emit("stop",e[y]);const n=e;e=e[l.PARENT],delete n[l.PARENT],delete n[y]}if(!x){if(this.extendedResults){const e=this.valueBytes.slice(),t={value:E.nullcheck(r),bytes:e,length:e.length};return this.valueBytes=new a,t}return r}}}}E.NOT_FOUND=m,e.exports=E},79777(e,t,r){"use strict";const n=r(88310),i=r(93737),o=r(27328),s=r(5256),{MT:a,SYMS:u}=r(79452);class c extends n.Transform{constructor(e={}){const{separator:t="\n",stream_errors:r=!1,tags:n,max_depth:o,preferWeb:s,encoding:a,...u}=e;super({...u,readableObjectMode:!1,writableObjectMode:!1}),this.float_bytes=-1,this.separator=t,this.stream_errors=r,this.parser=new i({tags:n,max_depth:o,preferWeb:s,encoding:a}),this.parser.on("more-bytes",this._on_more.bind(this)),this.parser.on("value",this._on_value.bind(this)),this.parser.on("start",this._on_start.bind(this)),this.parser.on("stop",this._on_stop.bind(this)),this.parser.on("data",this._on_data.bind(this)),this.parser.on("error",this._on_error.bind(this))}_transform(e,t,r){this.parser.write(e,t,r)}_flush(e){this.parser._flush(t=>this.stream_errors?(t&&this._on_error(t),e()):e(t))}static diagnose(e,t={},r=null){if(null==e)throw new TypeError("input required");({options:t,cb:r}=function(e,t){switch(typeof e){case"function":return{options:{},cb:e};case"string":return{options:{encoding:e},cb:t};case"object":return{options:e||{},cb:t};default:throw new TypeError("Unknown option type")}}(t,r));const{encoding:n="hex",...i}=t,a=new s,u=new c(i);let f=null;return"function"==typeof r?(u.on("end",()=>r(null,a.toString("utf8"))),u.on("error",r)):f=new Promise((e,t)=>{u.on("end",()=>e(a.toString("utf8"))),u.on("error",t)}),u.pipe(a),o.guessEncoding(e,n).pipe(u),f}_on_error(e){this.stream_errors?this.push(e.toString()):this.emit("error",e)}_on_more(e,t,r,n){e===a.SIMPLE_FLOAT&&(this.float_bytes={2:1,4:2,8:3}[t])}_fore(e,t){switch(e){case a.BYTE_STRING:case a.UTF8_STRING:case a.ARRAY:t>0&&this.push(", ");break;case a.MAP:t>0&&(t%2?this.push(": "):this.push(", "))}}_on_value(e,t,r){if(e===u.BREAK)return;this._fore(t,r);const n=this.float_bytes;this.float_bytes=-1,this.push(o.cborValueToString(e,n))}_on_start(e,t,r,n){switch(this._fore(r,n),e){case a.TAG:this.push(`${t}(`);break;case a.ARRAY:this.push("[");break;case a.MAP:this.push("{");break;case a.BYTE_STRING:case a.UTF8_STRING:this.push("(")}t===u.STREAM&&this.push("_ ")}_on_stop(e){switch(e){case a.TAG:this.push(")");break;case a.ARRAY:this.push("]");break;case a.MAP:this.push("}");break;case a.BYTE_STRING:case a.UTF8_STRING:this.push(")")}}_on_data(){this.push(this.separator)}}e.exports=c},72893(e,t,r){"use strict";const n=r(88310),i=r(5256),o=r(27328),s=r(79452),{MT:a,NUMBYTES:u,SHIFT32:c,SIMPLE:f,SYMS:l,TAG:h,BI:p}=s,{Buffer:d}=r(48287),y=a.SIMPLE_FLOAT<<5|u.TWO,g=a.SIMPLE_FLOAT<<5|u.FOUR,m=a.SIMPLE_FLOAT<<5|u.EIGHT,v=a.SIMPLE_FLOAT<<5|f.TRUE,b=a.SIMPLE_FLOAT<<5|f.FALSE,w=a.SIMPLE_FLOAT<<5|f.UNDEFINED,_=a.SIMPLE_FLOAT<<5|f.NULL,E=d.from([255]),x=d.from("f97e00","hex"),S=d.from("f9fc00","hex"),A=d.from("f97c00","hex"),B=d.from("f98000","hex"),O={};let k={};class T extends n.Transform{constructor(e={}){const{canonical:t=!1,encodeUndefined:r,disallowUndefinedKeys:n=!1,dateType:i="number",collapseBigIntegers:o=!1,detectLoops:s=!1,omitUndefinedProperties:a=!1,genTypes:u=[],...c}=e;if(super({...c,readableObjectMode:!1,writableObjectMode:!0}),this.canonical=t,this.encodeUndefined=r,this.disallowUndefinedKeys=n,this.dateType=function(e){if(!e)return"number";switch(e.toLowerCase()){case"number":return"number";case"float":return"float";case"int":case"integer":return"int";case"string":return"string"}throw new TypeError(`dateType invalid, got "${e}"`)}(i),this.collapseBigIntegers=!!this.canonical||o,this.detectLoops=void 0,"boolean"==typeof s)s&&(this.detectLoops=new WeakSet);else{if(!(s instanceof WeakSet))throw new TypeError("detectLoops must be boolean or WeakSet");this.detectLoops=s}if(this.omitUndefinedProperties=a,this.semanticTypes={...T.SEMANTIC_TYPES},Array.isArray(u))for(let e=0,t=u.length;e<t;e+=2)this.addSemanticType(u[e],u[e+1]);else for(const[e,t]of Object.entries(u))this.addSemanticType(e,t)}_transform(e,t,r){r(!1===this.pushAny(e)?new Error("Push Error"):void 0)}_flush(e){e()}_pushUInt8(e){const t=d.allocUnsafe(1);return t.writeUInt8(e,0),this.push(t)}_pushUInt16BE(e){const t=d.allocUnsafe(2);return t.writeUInt16BE(e,0),this.push(t)}_pushUInt32BE(e){const t=d.allocUnsafe(4);return t.writeUInt32BE(e,0),this.push(t)}_pushFloatBE(e){const t=d.allocUnsafe(4);return t.writeFloatBE(e,0),this.push(t)}_pushDoubleBE(e){const t=d.allocUnsafe(8);return t.writeDoubleBE(e,0),this.push(t)}_pushNaN(){return this.push(x)}_pushInfinity(e){const t=e<0?S:A;return this.push(t)}_pushFloat(e){if(this.canonical){const t=d.allocUnsafe(2);if(o.writeHalf(t,e))return this._pushUInt8(y)&&this.push(t)}return Math.fround(e)===e?this._pushUInt8(g)&&this._pushFloatBE(e):this._pushUInt8(m)&&this._pushDoubleBE(e)}_pushInt(e,t,r){const n=t<<5;if(e<24)return this._pushUInt8(n|e);if(e<=255)return this._pushUInt8(n|u.ONE)&&this._pushUInt8(e);if(e<=65535)return this._pushUInt8(n|u.TWO)&&this._pushUInt16BE(e);if(e<=4294967295)return this._pushUInt8(n|u.FOUR)&&this._pushUInt32BE(e);let i=Number.MAX_SAFE_INTEGER;return t===a.NEG_INT&&i--,e<=i?this._pushUInt8(n|u.EIGHT)&&this._pushUInt32BE(Math.floor(e/c))&&this._pushUInt32BE(e%c):t===a.NEG_INT?this._pushFloat(r):this._pushFloat(e)}_pushIntNum(e){return Object.is(e,-0)?this.push(B):e<0?this._pushInt(-e-1,a.NEG_INT,e):this._pushInt(e,a.POS_INT)}_pushNumber(e){return isNaN(e)?this._pushNaN():isFinite(e)?Math.round(e)===e?this._pushIntNum(e):this._pushFloat(e):this._pushInfinity(e)}_pushString(e){const t=d.byteLength(e,"utf8");return this._pushInt(t,a.UTF8_STRING)&&this.push(e,"utf8")}_pushBoolean(e){return this._pushUInt8(e?v:b)}_pushUndefined(e){switch(typeof this.encodeUndefined){case"undefined":return this._pushUInt8(w);case"function":return this.pushAny(this.encodeUndefined(e));case"object":{const e=o.bufferishToBuffer(this.encodeUndefined);if(e)return this.push(e)}}return this.pushAny(this.encodeUndefined)}_pushNull(e){return this._pushUInt8(_)}_pushTag(e){return this._pushInt(e,a.TAG)}_pushJSBigint(e){let t=a.POS_INT,r=h.POS_BIGINT;if(e<0&&(e=-e+p.MINUS_ONE,t=a.NEG_INT,r=h.NEG_BIGINT),this.collapseBigIntegers&&e<=p.MAXINT64)return e<=4294967295?this._pushInt(Number(e),t):this._pushUInt8(t<<5|u.EIGHT)&&this._pushUInt32BE(Number(e/p.SHIFT32))&&this._pushUInt32BE(Number(e%p.SHIFT32));let n=e.toString(16);n.length%2&&(n=`0${n}`);const i=d.from(n,"hex");return this._pushTag(r)&&T._pushBuffer(this,i)}_pushObject(e,t){if(!e)return this._pushNull(e);if(!(t={indefinite:!1,skipTypes:!1,...t}).indefinite&&this.detectLoops){if(this.detectLoops.has(e))throw new Error("Loop detected while CBOR encoding.\nCall removeLoopDetectors before resuming.");this.detectLoops.add(e)}if(!t.skipTypes){const t=e.encodeCBOR;if("function"==typeof t)return t.call(e,this);const r=this.semanticTypes[e.constructor.name];if(r)return r.call(e,this,e)}const r=Object.keys(e).filter(t=>{const r=typeof e[t];return"function"!==r&&(!this.omitUndefinedProperties||"undefined"!==r)}),n={};if(this.canonical&&r.sort((e,t)=>{const r=n[e]||(n[e]=T.encode(e)),i=n[t]||(n[t]=T.encode(t));return r.compare(i)}),t.indefinite){if(!this._pushUInt8(a.MAP<<5|u.INDEFINITE))return!1}else if(!this._pushInt(r.length,a.MAP))return!1;let i=null;for(let t=0,o=r.length;t<o;t++){const o=r[t];if(this.canonical&&(i=n[o])){if(!this.push(i))return!1}else if(!this._pushString(o))return!1;if(!this.pushAny(e[o]))return!1}if(t.indefinite){if(!this.push(E))return!1}else this.detectLoops&&this.detectLoops.delete(e);return!0}_encodeAll(e){const t=new i({highWaterMark:this.readableHighWaterMark});this.pipe(t);for(const t of e)this.pushAny(t);return this.end(),t.read()}addSemanticType(e,t){const r="string"==typeof e?e:e.name,n=this.semanticTypes[r];if(t){if("function"!=typeof t)throw new TypeError("fun must be of type function");this.semanticTypes[r]=t}else n&&delete this.semanticTypes[r];return n}pushAny(e){switch(typeof e){case"number":return this._pushNumber(e);case"bigint":return this._pushJSBigint(e);case"string":return this._pushString(e);case"boolean":return this._pushBoolean(e);case"undefined":return this._pushUndefined(e);case"object":return this._pushObject(e);case"symbol":switch(e){case l.NULL:return this._pushNull(null);case l.UNDEFINED:return this._pushUndefined(void 0);default:throw new TypeError(`Unknown symbol: ${e.toString()}`)}default:throw new TypeError(`Unknown type: ${typeof e}, ${"function"==typeof e.toString?e.toString():""}`)}}static pushArray(e,t,r){r={indefinite:!1,...r};const n=t.length;if(r.indefinite){if(!e._pushUInt8(a.ARRAY<<5|u.INDEFINITE))return!1}else if(!e._pushInt(n,a.ARRAY))return!1;for(let r=0;r<n;r++)if(!e.pushAny(t[r]))return!1;return!(r.indefinite&&!e.push(E))}removeLoopDetectors(){return!!this.detectLoops&&(this.detectLoops=new WeakSet,!0)}static _pushDate(e,t){switch(e.dateType){case"string":return e._pushTag(h.DATE_STRING)&&e._pushString(t.toISOString());case"int":return e._pushTag(h.DATE_EPOCH)&&e._pushIntNum(Math.round(t.getTime()/1e3));case"float":return e._pushTag(h.DATE_EPOCH)&&e._pushFloat(t.getTime()/1e3);default:return e._pushTag(h.DATE_EPOCH)&&e.pushAny(t.getTime()/1e3)}}static _pushBuffer(e,t){return e._pushInt(t.length,a.BYTE_STRING)&&e.push(t)}static _pushNoFilter(e,t){return T._pushBuffer(e,t.slice())}static _pushRegexp(e,t){return e._pushTag(h.REGEXP)&&e.pushAny(t.source)}static _pushSet(e,t){if(!e._pushTag(h.SET))return!1;if(!e._pushInt(t.size,a.ARRAY))return!1;for(const r of t)if(!e.pushAny(r))return!1;return!0}static _pushURL(e,t){return e._pushTag(h.URI)&&e.pushAny(t.toString())}static _pushBoxed(e,t){return e.pushAny(t.valueOf())}static _pushMap(e,t,r){r={indefinite:!1,...r};let n=[...t.entries()];if(e.omitUndefinedProperties&&(n=n.filter(([e,t])=>void 0!==t)),r.indefinite){if(!e._pushUInt8(a.MAP<<5|u.INDEFINITE))return!1}else if(!e._pushInt(n.length,a.MAP))return!1;if(e.canonical){const t=new T({genTypes:e.semanticTypes,canonical:e.canonical,detectLoops:Boolean(e.detectLoops),dateType:e.dateType,disallowUndefinedKeys:e.disallowUndefinedKeys,collapseBigIntegers:e.collapseBigIntegers}),r=new i({highWaterMark:e.readableHighWaterMark});t.pipe(r),n.sort(([e],[n])=>{t.pushAny(e);const i=r.read();t.pushAny(n);const o=r.read();return i.compare(o)});for(const[t,r]of n){if(e.disallowUndefinedKeys&&void 0===t)throw new Error("Invalid Map key: undefined");if(!e.pushAny(t)||!e.pushAny(r))return!1}}else for(const[t,r]of n){if(e.disallowUndefinedKeys&&void 0===t)throw new Error("Invalid Map key: undefined");if(!e.pushAny(t)||!e.pushAny(r))return!1}return!(r.indefinite&&!e.push(E))}static _pushTypedArray(e,t){let r=64,n=t.BYTES_PER_ELEMENT;const{name:i}=t.constructor;return i.startsWith("Float")?(r|=16,n/=2):i.includes("U")||(r|=8),(i.includes("Clamped")||1!==n&&!o.isBigEndian())&&(r|=4),r|={1:0,2:1,4:2,8:3}[n],!!e._pushTag(r)&&T._pushBuffer(e,d.from(t.buffer,t.byteOffset,t.byteLength))}static _pushArrayBuffer(e,t){return T._pushBuffer(e,d.from(t))}static encodeIndefinite(e,t,r={}){if(null==t){if(null==this)throw new Error("No object to encode");t=this}const{chunkSize:n=4096}=r;let i=!0;const s=typeof t;let c=null;if("string"===s){i=i&&e._pushUInt8(a.UTF8_STRING<<5|u.INDEFINITE);let r=0;for(;r<t.length;){const o=r+n;i=i&&e._pushString(t.slice(r,o)),r=o}i=i&&e.push(E)}else if(c=o.bufferishToBuffer(t)){i=i&&e._pushUInt8(a.BYTE_STRING<<5|u.INDEFINITE);let t=0;for(;t<c.length;){const r=t+n;i=i&&T._pushBuffer(e,c.slice(t,r)),t=r}i=i&&e.push(E)}else if(Array.isArray(t))i=i&&T.pushArray(e,t,{indefinite:!0});else if(t instanceof Map)i=i&&T._pushMap(e,t,{indefinite:!0});else{if("object"!==s)throw new Error("Invalid indefinite encoding");i=i&&e._pushObject(t,{indefinite:!0,skipTypes:!0})}return i}static encode(...e){return(new T)._encodeAll(e)}static encodeCanonical(...e){return new T({canonical:!0})._encodeAll(e)}static encodeOne(e,t){return new T(t)._encodeAll([e])}static encodeAsync(e,t){return new Promise((r,n)=>{const i=[],o=new T(t);o.on("data",e=>i.push(e)),o.on("error",n),o.on("finish",()=>r(d.concat(i))),o.pushAny(e),o.end()})}static get SEMANTIC_TYPES(){return k}static set SEMANTIC_TYPES(e){k=e}static reset(){T.SEMANTIC_TYPES={...O}}}Object.assign(O,{Array:T.pushArray,Date:T._pushDate,Buffer:T._pushBuffer,[d.name]:T._pushBuffer,Map:T._pushMap,NoFilter:T._pushNoFilter,[i.name]:T._pushNoFilter,RegExp:T._pushRegexp,Set:T._pushSet,ArrayBuffer:T._pushArrayBuffer,Uint8ClampedArray:T._pushTypedArray,Uint8Array:T._pushTypedArray,Uint16Array:T._pushTypedArray,Uint32Array:T._pushTypedArray,Int8Array:T._pushTypedArray,Int16Array:T._pushTypedArray,Int32Array:T._pushTypedArray,Float32Array:T._pushTypedArray,Float64Array:T._pushTypedArray,URL:T._pushURL,Boolean:T._pushBoxed,Number:T._pushBoxed,String:T._pushBoxed}),"undefined"!=typeof BigUint64Array&&(O[BigUint64Array.name]=T._pushTypedArray),"undefined"!=typeof BigInt64Array&&(O[BigInt64Array.name]=T._pushTypedArray),T.reset(),e.exports=T},82903(e,t,r){"use strict";const{Buffer:n}=r(48287),i=r(72893),o=r(93737),{MT:s}=r(79452);class a extends Map{constructor(e){super(e)}static _encode(e){return i.encodeCanonical(e).toString("base64")}static _decode(e){return o.decodeFirstSync(e,"base64")}get(e){return super.get(a._encode(e))}set(e,t){return super.set(a._encode(e),t)}delete(e){return super.delete(a._encode(e))}has(e){return super.has(a._encode(e))}*keys(){for(const e of super.keys())yield a._decode(e)}*entries(){for(const e of super.entries())yield[a._decode(e[0]),e[1]]}[Symbol.iterator](){return this.entries()}forEach(e,t){if("function"!=typeof e)throw new TypeError("Must be function");for(const t of super.entries())e.call(this,t[1],a._decode(t[0]),this)}encodeCBOR(e){if(!e._pushInt(this.size,s.MAP))return!1;if(e.canonical){const t=Array.from(super.entries()).map(e=>[n.from(e[0],"base64"),e[1]]);t.sort((e,t)=>e[0].compare(t[0]));for(const r of t)if(!e.push(r[0])||!e.pushAny(r[1]))return!1}else for(const t of super.entries())if(!e.push(n.from(t[0],"base64"))||!e.pushAny(t[1]))return!1;return!0}}e.exports=a},69744(e){"use strict";class t{constructor(){this.clear()}clear(){this.map=new WeakMap,this.count=0,this.recording=!0}stop(){this.recording=!1}check(e){const r=this.map.get(e);if(r)return r.length>1?r[0]||this.recording?r[1]:(r[0]=!0,t.FIRST):this.recording?(r.push(this.count++),r[1]):t.NEVER;if(!this.recording)throw new Error("New object detected when not recording");return this.map.set(e,[!1]),t.NEVER}}t.NEVER=-1,t.FIRST=-2,e.exports=t},207(e,t,r){"use strict";const n=r(72893),i=r(69744),{Buffer:o}=r(48287);class s extends n{constructor(e){super(e),this.valueSharing=new i}_pushObject(e,t){if(null!==e){const t=this.valueSharing.check(e);switch(t){case i.FIRST:this._pushTag(28);break;case i.NEVER:break;default:return this._pushTag(29)&&this._pushIntNum(t)}}return super._pushObject(e,t)}stopRecording(){this.valueSharing.stop()}clearRecording(){this.valueSharing.clear()}static encode(...e){const t=new s;t.on("data",()=>{});for(const r of e)t.pushAny(r);return t.stopRecording(),t.removeAllListeners("data"),t._encodeAll(e)}static encodeCanonical(...e){throw new Error("Cannot encode canonically in a SharedValueEncoder, which serializes objects multiple times.")}static encodeOne(e,t){const r=new s(t);return r.on("data",()=>{}),r.pushAny(e),r.stopRecording(),r.removeAllListeners("data"),r._encodeAll([e])}static encodeAsync(e,t){return new Promise((r,n)=>{const i=[],a=new s(t);a.on("data",()=>{}),a.on("error",n),a.on("finish",()=>r(o.concat(i))),a.pushAny(e),a.stopRecording(),a.removeAllListeners("data"),a.on("data",e=>i.push(e)),a.pushAny(e),a.end()})}}e.exports=s},15059(e,t,r){"use strict";const{MT:n,SIMPLE:i,SYMS:o}=r(79452);class s{constructor(e){if("number"!=typeof e)throw new Error("Invalid Simple type: "+typeof e);if(e<0||e>255||(0|e)!==e)throw new Error(`value must be a small positive integer: ${e}`);this.value=e}toString(){return`simple(${this.value})`}[Symbol.for("nodejs.util.inspect.custom")](e,t){return`simple(${this.value})`}encodeCBOR(e){return e._pushInt(this.value,n.SIMPLE_FLOAT)}static isSimple(e){return e instanceof s}static decode(e,t=!0,r=!1){switch(e){case i.FALSE:return!1;case i.TRUE:return!0;case i.NULL:return t?null:o.NULL;case i.UNDEFINED:if(t)return;return o.UNDEFINED;case-1:if(!t||!r)throw new Error("Invalid BREAK");return o.BREAK;default:return new s(e)}}}e.exports=s},53557(e,t,r){"use strict";const n=r(79452),i=r(27328),o=Symbol("INTERNAL_JSON");function s(e,t){if(i.isBufferish(e))e.toJSON=t;else if(Array.isArray(e))for(const r of e)s(r,t);else if(e&&"object"==typeof e&&(!(e instanceof d)||e.tag<21||e.tag>23))for(const r of Object.values(e))s(r,t)}function a(){return i.base64(this)}function u(){return i.base64url(this)}function c(){return this.toString("hex")}const f={0:e=>new Date(e),1:e=>new Date(1e3*e),2:e=>i.bufferToBigInt(e),3:e=>n.BI.MINUS_ONE-i.bufferToBigInt(e),21:(e,t)=>(i.isBufferish(e)?t[o]=u:s(e,u),t),22:(e,t)=>(i.isBufferish(e)?t[o]=a:s(e,a),t),23:(e,t)=>(i.isBufferish(e)?t[o]=c:s(e,c),t),32:e=>new URL(e),33:(e,t)=>{if(!e.match(/^[a-zA-Z0-9_-]+$/))throw new Error("Invalid base64url characters");const r=e.length%4;if(1===r)throw new Error("Invalid base64url length");if(2===r){if(-1==="AQgw".indexOf(e[e.length-1]))throw new Error("Invalid base64 padding")}else if(3===r&&-1==="AEIMQUYcgkosw048".indexOf(e[e.length-1]))throw new Error("Invalid base64 padding");return t},34:(e,t)=>{const r=e.match(/^[a-zA-Z0-9+/]+(?<padding>={0,2})$/);if(!r)throw new Error("Invalid base64 characters");if(e.length%4!=0)throw new Error("Invalid base64 length");if("="===r.groups.padding){if(-1==="AQgw".indexOf(e[e.length-2]))throw new Error("Invalid base64 padding")}else if("=="===r.groups.padding&&-1==="AEIMQUYcgkosw048".indexOf(e[e.length-3]))throw new Error("Invalid base64 padding");return t},35:e=>new RegExp(e),258:e=>new Set(e)},l={64:Uint8Array,65:Uint16Array,66:Uint32Array,68:Uint8ClampedArray,69:Uint16Array,70:Uint32Array,72:Int8Array,73:Int16Array,74:Int32Array,77:Int16Array,78:Int32Array,81:Float32Array,82:Float64Array,85:Float32Array,86:Float64Array};function h(e,t){if(!i.isBufferish(e))throw new TypeError("val not a buffer");const{tag:r}=t,n=l[r];if(!n)throw new Error(`Invalid typed array tag: ${r}`);const o=2**(((16&r)>>4)+(3&r));return!(4&r)!==i.isBigEndian()&&o>1&&function(e,t,r,n){const i=new DataView(e),[o,s]={2:[i.getUint16,i.setUint16],4:[i.getUint32,i.setUint32],8:[i.getBigUint64,i.setBigUint64]}[t],a=r+n;for(let e=r;e<a;e+=t)s.call(i,e,o.call(i,e,!0))}(e.buffer,o,e.byteOffset,e.byteLength),new n(e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength))}"undefined"!=typeof BigUint64Array&&(l[67]=BigUint64Array,l[71]=BigUint64Array),"undefined"!=typeof BigInt64Array&&(l[75]=BigInt64Array,l[79]=BigInt64Array);for(const e of Object.keys(l))f[e]=h;let p={};class d{constructor(e,t,r){if(this.tag=e,this.value=t,this.err=r,"number"!=typeof this.tag)throw new Error(`Invalid tag type (${typeof this.tag})`);if(this.tag<0||(0|this.tag)!==this.tag)throw new Error(`Tag must be a positive integer: ${this.tag}`)}toJSON(){if(this[o])return this[o].call(this.value);const e={tag:this.tag,value:this.value};return this.err&&(e.err=this.err),e}toString(){return`${this.tag}(${JSON.stringify(this.value)})`}encodeCBOR(e){return e._pushTag(this.tag),e.pushAny(this.value)}convert(e){let t=null==e?void 0:e[this.tag];if(null===t)return this;if("function"!=typeof t&&(t=d.TAGS[this.tag],"function"!=typeof t))return this;try{return t.call(this,this.value,this)}catch(e){return e&&e.message&&e.message.length>0?this.err=e.message:this.err=e,this}}static get TAGS(){return p}static set TAGS(e){p=e}static reset(){d.TAGS={...f}}}d.INTERNAL_JSON=o,d.reset(),e.exports=d},27328(e,t,r){"use strict";const{Buffer:n}=r(48287),i=r(5256),o=r(88310),s=r(79452),{NUMBYTES:a,SHIFT32:u,BI:c,SYMS:f}=s,l=new TextDecoder("utf8",{fatal:!0,ignoreBOM:!0});t.utf8=e=>l.decode(e),t.utf8.checksUTF8=!0,t.isBufferish=function(e){return e&&"object"==typeof e&&(n.isBuffer(e)||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof ArrayBuffer||e instanceof DataView)},t.bufferishToBuffer=function(e){return n.isBuffer(e)?e:ArrayBuffer.isView(e)?n.from(e.buffer,e.byteOffset,e.byteLength):e instanceof ArrayBuffer?n.from(e):null},t.parseCBORint=function(e,t){switch(e){case a.ONE:return t.readUInt8(0);case a.TWO:return t.readUInt16BE(0);case a.FOUR:return t.readUInt32BE(0);case a.EIGHT:{const e=t.readUInt32BE(0),r=t.readUInt32BE(4);return e>2097151?BigInt(e)*c.SHIFT32+BigInt(r):e*u+r}default:throw new Error(`Invalid additional info for int: ${e}`)}},t.writeHalf=function(e,t){const r=n.allocUnsafe(4);r.writeFloatBE(t,0);const i=r.readUInt32BE(0);if(8191&i)return!1;let o=i>>16&32768;const s=i>>23&255,a=8388607&i;if(s>=113&&s<=142)o+=(s-112<<10)+(a>>13);else{if(!(s>=103&&s<113))return!1;if(a&(1<<126-s)-1)return!1;o+=a+8388608>>126-s}return e.writeUInt16BE(o),!0},t.parseHalf=function(e){const t=128&e[0]?-1:1,r=(124&e[0])>>2,n=(3&e[0])<<8|e[1];return r?31===r?t*(n?NaN:1/0):t*2**(r-25)*(1024+n):5.960464477539063e-8*t*n},t.parseCBORfloat=function(e){switch(e.length){case 2:return t.parseHalf(e);case 4:return e.readFloatBE(0);case 8:return e.readDoubleBE(0);default:throw new Error(`Invalid float size: ${e.length}`)}},t.hex=function(e){return n.from(e.replace(/^0x/,""),"hex")},t.bin=function(e){let t=0,r=(e=e.replace(/\s/g,"")).length%8||8;const i=[];for(;r<=e.length;)i.push(parseInt(e.slice(t,r),2)),t=r,r+=8;return n.from(i)},t.arrayEqual=function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.length===t.length&&e.every((e,r)=>e===t[r])},t.bufferToBigInt=function(e){return BigInt(`0x${e.toString("hex")}`)},t.cborValueToString=function(e,r=-1){switch(typeof e){case"symbol":{switch(e){case f.NULL:return"null";case f.UNDEFINED:return"undefined";case f.BREAK:return"BREAK"}if(e.description)return e.description;const t=e.toString().match(/^Symbol\((?<name>.*)\)/);return t&&t.groups.name?t.groups.name:"Symbol"}case"string":return JSON.stringify(e);case"bigint":return e.toString();case"number":{const t=Object.is(e,-0)?"-0":String(e);return r>0?`${t}_${r}`:t}case"object":{if(!e)return"null";const n=t.bufferishToBuffer(e);if(n){const e=n.toString("hex");return r===-1/0?e:`h'${e}'`}return e&&"function"==typeof e[Symbol.for("nodejs.util.inspect.custom")]?e[Symbol.for("nodejs.util.inspect.custom")]():Array.isArray(e)?"[]":"{}"}}return String(e)},t.guessEncoding=function(e,r){if("string"==typeof e)return new i(e,null==r?"hex":r);const n=t.bufferishToBuffer(e);if(n)return new i(n);if((s=e)instanceof o.Readable||["read","on","pipe"].every(e=>"function"==typeof s[e]))return e;var s;throw new Error("Unknown input type")};const h={"=":"","+":"-","/":"_"};t.base64url=function(e){return t.bufferishToBuffer(e).toString("base64").replace(/[=+/]/g,e=>h[e])},t.base64=function(e){return t.bufferishToBuffer(e).toString("base64")},t.isBigEndian=function(){const e=new Uint8Array(4);return!((new Uint32Array(e.buffer)[0]=1)&e[0])}},54957(e,t,r){"use strict";const n=r(88310),i=r(5256);class o extends n.Transform{constructor(e){super(e),this._writableState.objectMode=!1,this._readableState.objectMode=!0,this.bs=new i,this.__restart()}_transform(e,t,r){for(this.bs.write(e);this.bs.length>=this.__needed;){let e=null;const t=null===this.__needed?void 0:this.bs.read(this.__needed);try{e=this.__parser.next(t)}catch(e){return r(e)}this.__needed&&(this.__fresh=!1),e.done?(this.push(e.value),this.__restart()):this.__needed=e.value||1/0}return r()}*_parse(){throw new Error("Must be implemented in subclass")}__restart(){this.__needed=null,this.__parser=this._parse(),this.__fresh=!0}_flush(e){e(this.__fresh?null:new Error("unexpected end of input"))}}e.exports=o},30041(e,t,r){"use strict";var n=r(30655),i=r(58068),o=r(69675),s=r(75795);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new o("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new o("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new o("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,f=arguments.length>6&&arguments[6],l=!!s&&s(e,t);if(n)n(e,t,{configurable:null===c&&l?l.configurable:!c,enumerable:null===a&&l?l.enumerable:!a,value:r,writable:null===u&&l?l.writable:!u});else{if(!f&&(a||u||c))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},38452(e,t,r){"use strict";var n=r(1189),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,s=Array.prototype.concat,a=r(30041),u=r(30592)(),c=function(e,t,r,n){if(t in e)if(!0===n){if(e[t]===r)return}else if("function"!=typeof(i=n)||"[object Function]"!==o.call(i)||!n())return;var i;u?a(e,t,r,!0):a(e,t,r)},f=function(e,t){var r=arguments.length>2?arguments[2]:{},o=n(t);i&&(o=s.call(o,Object.getOwnPropertySymbols(t)));for(var a=0;a<o.length;a+=1)c(e,o[a],t[o[a]],r[o[a]])};f.supportsDescriptors=!!u,e.exports=f},7176(e,t,r){"use strict";var n,i=r(73126),o=r(75795);try{n=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var s=!!n&&o&&o(Object.prototype,"__proto__"),a=Object,u=a.getPrototypeOf;e.exports=s&&"function"==typeof s.get?i([s.get]):"function"==typeof u&&function(e){return u(null==e?e:a(e))}},30655(e){"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},41237(e){"use strict";e.exports=EvalError},69383(e){"use strict";e.exports=Error},79290(e){"use strict";e.exports=RangeError},79538(e){"use strict";e.exports=ReferenceError},58068(e){"use strict";e.exports=SyntaxError},69675(e){"use strict";e.exports=TypeError},35345(e){"use strict";e.exports=URIError},79612(e){"use strict";e.exports=Object},37007(e){"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise(function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}y(e,t,o,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&y(e,"error",t,{once:!0})}(e,i)})},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,r,n){var i,o,s,c;if(a(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=u(e))>0&&s.length>i&&!s.warned){s.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=e,f.type=t,f.count=s.length,c=f,console&&console.warn&&console.warn(c)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=f.bind(n);return i.listener=r,n.wrapFn=i,i}function h(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):d(i,i.length)}function p(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function d(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function y(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function i(o){n.once&&e.removeEventListener(t,i),r(o)})}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)n(u,this,t);else{var c=u.length,f=d(u,c);for(r=0;r<c;++r)n(f[r],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,l(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,l(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,s;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},60301(e,t,r){"use strict";var n=r(69600),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){if(!n(t))throw new TypeError("iterator must be a function");var s;arguments.length>=3&&(s=r),"[object Array]"===i.call(e)?function(e,t,r){for(var n=0,i=e.length;n<i;n++)o.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))}(e,t,s):"string"==typeof e?function(e,t,r){for(var n=0,i=e.length;n<i;n++)null==r?t(e.charAt(n),n,e):t.call(r,e.charAt(n),n,e)}(e,t,s):function(e,t,r){for(var n in e)o.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))}(e,t,s)}},89353(e){"use strict";var t=Object.prototype.toString,r=Math.max,n=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var i=0;i<t.length;i+=1)r[i+e.length]=t[i];return r};e.exports=function(e){var i=this;if("function"!=typeof i||"[object Function]"!==t.apply(i))throw new TypeError("Function.prototype.bind called on incompatible "+i);for(var o,s=function(e){for(var t=[],r=1,n=0;r<e.length;r+=1,n+=1)t[n]=e[r];return t}(arguments),a=r(0,i.length-s.length),u=[],c=0;c<a;c++)u[c]="$"+c;if(o=Function("binder","return function ("+function(e){for(var t="",r=0;r<e.length;r+=1)t+=e[r],r+1<e.length&&(t+=",");return t}(u)+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof o){var t=i.apply(this,n(s,arguments));return Object(t)===t?t:this}return i.apply(e,n(s,arguments))}),i.prototype){var f=function(){};f.prototype=i.prototype,o.prototype=new f,f.prototype=null}return o}},66743(e,t,r){"use strict";var n=r(89353);e.exports=Function.prototype.bind||n},4233(e){"use strict";const t=function*(){}.constructor;e.exports=()=>t},70453(e,t,r){"use strict";var n,i=r(79612),o=r(69383),s=r(41237),a=r(79290),u=r(79538),c=r(58068),f=r(69675),l=r(35345),h=r(71514),p=r(58968),d=r(6188),y=r(68002),g=r(75880),m=r(70414),v=r(73093),b=Function,w=function(e){try{return b('"use strict"; return ('+e+").constructor;")()}catch(e){}},_=r(75795),E=r(30655),x=function(){throw new f},S=_?function(){try{return x}catch(e){try{return _(arguments,"callee").get}catch(e){return x}}}():x,A=r(64039)(),B=r(93628),O=r(71064),k=r(48648),T=r(11002),I=r(10076),N={},F="undefined"!=typeof Uint8Array&&B?B(Uint8Array):n,R={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":A&&B?B([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":N,"%AsyncGenerator%":N,"%AsyncGeneratorFunction%":N,"%AsyncIteratorPrototype%":N,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":s,"%Float16Array%":"undefined"==typeof Float16Array?n:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":b,"%GeneratorFunction%":N,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":A&&B?B(B([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&A&&B?B((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":i,"%Object.getOwnPropertyDescriptor%":_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":a,"%ReferenceError%":u,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&A&&B?B((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":A&&B?B(""[Symbol.iterator]()):n,"%Symbol%":A?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":S,"%TypedArray%":F,"%TypeError%":f,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":l,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet,"%Function.prototype.call%":I,"%Function.prototype.apply%":T,"%Object.defineProperty%":E,"%Object.getPrototypeOf%":O,"%Math.abs%":h,"%Math.floor%":p,"%Math.max%":d,"%Math.min%":y,"%Math.pow%":g,"%Math.round%":m,"%Math.sign%":v,"%Reflect.getPrototypeOf%":k};if(B)try{null.error}catch(e){var j=B(B(e));R["%Error.prototype%"]=j}var L=function e(t){var r;if("%AsyncFunction%"===t)r=w("async function () {}");else if("%GeneratorFunction%"===t)r=w("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=w("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&B&&(r=B(i.prototype))}return R[t]=r,r},U={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},P=r(66743),C=r(9957),M=P.call(I,Array.prototype.concat),D=P.call(T,Array.prototype.splice),$=P.call(I,String.prototype.replace),z=P.call(I,String.prototype.slice),H=P.call(I,RegExp.prototype.exec),V=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,q=/\\(\\)?/g,G=function(e,t){var r,n=e;if(C(U,n)&&(n="%"+(r=U[n])[0]+"%"),C(R,n)){var i=R[n];if(i===N&&(i=L(n)),void 0===i&&!t)throw new f("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new c("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new f("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new f('"allowMissing" argument must be a boolean');if(null===H(/^%?[^%]*%?$/,e))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=z(e,0,1),r=z(e,-1);if("%"===t&&"%"!==r)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new c("invalid intrinsic syntax, expected opening `%`");var n=[];return $(e,V,function(e,t,r,i){n[n.length]=r?$(i,q,"$1"):t||e}),n}(e),n=r.length>0?r[0]:"",i=G("%"+n+"%",t),o=i.name,s=i.value,a=!1,u=i.alias;u&&(n=u[0],D(r,M([0,1],u)));for(var l=1,h=!0;l<r.length;l+=1){var p=r[l],d=z(p,0,1),y=z(p,-1);if(('"'===d||"'"===d||"`"===d||'"'===y||"'"===y||"`"===y)&&d!==y)throw new c("property names with quotes must have matching quotes");if("constructor"!==p&&h||(a=!0),C(R,o="%"+(n+="."+p)+"%"))s=R[o];else if(null!=s){if(!(p in s)){if(!t)throw new f("base intrinsic for "+e+" exists, but the property is not available.");return}if(_&&l+1>=r.length){var g=_(s,p);s=(h=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:s[p]}else h=C(s,p),s=s[p];h&&!a&&(R[o]=s)}}return s}},71064(e,t,r){"use strict";var n=r(79612);e.exports=n.getPrototypeOf||null},48648(e){"use strict";e.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},93628(e,t,r){"use strict";var n=r(48648),i=r(71064),o=r(7176);e.exports=n?function(e){return n(e)}:i?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return i(e)}:o?function(e){return o(e)}:null},6549(e){"use strict";e.exports=Object.getOwnPropertyDescriptor},75795(e,t,r){"use strict";var n=r(6549);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},30592(e,t,r){"use strict";var n=r(30655),i=function(){return!!n};i.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=i},64039(e,t,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(41333);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},41333(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},49092(e,t,r){"use strict";var n=r(41333);e.exports=function(){return n()&&!!Symbol.toStringTag}},9957(e,t,r){"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=r(66743);e.exports=o.call(n,i)},251(e,t){t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,f=-7,l=r?i-1:0,h=r?-1:1,p=e[t+l];for(l+=h,o=p&(1<<-f)-1,p>>=-f,f+=a;f>0;o=256*o+e[t+l],l+=h,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+e[t+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=c}return(p?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,u,c=8*o-i-1,f=(1<<c)-1,l=f>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=f):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(s++,u/=2),s+l>=f?(a=0,s=f):s+l>=1?(a=(t*u-1)*Math.pow(2,i),s+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;e[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[r+p]=255&s,p+=d,s/=256,c-=8);e[r+p-d]|=128*y}},56698(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},47244(e,t,r){"use strict";var n=r(49092)(),i=r(36556)("Object.prototype.toString"),o=function(e){return!(n&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===i(e)},s=function(e){return!!o(e)||null!==e&&"object"==typeof e&&"length"in e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==i(e)&&"callee"in e&&"[object Function]"===i(e.callee)},a=function(){return o(arguments)}();o.isLegacyArguments=s,e.exports=a?o:s},69600(e){"use strict";var t,r,n=Function.prototype.toString,i="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof i&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw r}}),r={},i(function(){throw 42},null,t)}catch(e){e!==r&&(i=null)}else i=null;var o=/^\s*class\b/,s=function(e){try{var t=n.call(e);return o.test(t)}catch(e){return!1}},a=function(e){try{return!s(e)&&(n.call(e),!0)}catch(e){return!1}},u=Object.prototype.toString,c="function"==typeof Symbol&&!!Symbol.toStringTag,f=!(0 in[,]),l=function(){return!1};if("object"==typeof document){var h=document.all;u.call(h)===u.call(document.all)&&(l=function(e){if((f||!e)&&(void 0===e||"object"==typeof e))try{var t=u.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=i?function(e){if(l(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{i(e,null,t)}catch(e){if(e!==r)return!1}return!s(e)&&a(e)}:function(e){if(l(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(c)return a(e);if(s(e))return!1;var t=u.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&a(e)}},48184(e,t,r){"use strict";var n=r(36556),i=r(99721)(/^\s*(?:function)?\*/),o=r(49092)(),s=r(93628),a=n("Object.prototype.toString"),u=n("Function.prototype.toString"),c=r(4233);e.exports=function(e){if("function"!=typeof e)return!1;if(i(u(e)))return!0;if(!o)return"[object GeneratorFunction]"===a(e);if(!s)return!1;var t=c();return t&&s(e)===t.prototype}},13003(e){"use strict";e.exports=function(e){return e!=e}},24133(e,t,r){"use strict";var n=r(10487),i=r(38452),o=r(13003),s=r(76642),a=r(92464),u=n(s(),Number);i(u,{getPolyfill:s,implementation:o,shim:a}),e.exports=u},76642(e,t,r){"use strict";var n=r(13003);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},92464(e,t,r){"use strict";var n=r(38452),i=r(76642);e.exports=function(){var e=i();return n(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},14035(e,t,r){"use strict";var n,i=r(36556),o=r(49092)(),s=r(9957),a=r(75795);if(o){var u=i("RegExp.prototype.exec"),c={},f=function(){throw c},l={toString:f,valueOf:f};"symbol"==typeof Symbol.toPrimitive&&(l[Symbol.toPrimitive]=f),n=function(e){if(!e||"object"!=typeof e)return!1;var t=a(e,"lastIndex");if(!t||!s(t,"value"))return!1;try{u(e,l)}catch(e){return e===c}}}else{var h=i("Object.prototype.toString");n=function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===h(e)}}e.exports=n},35680(e,t,r){"use strict";var n=r(25767);e.exports=function(e){return!!n(e)}},73065(e,t,r){var n,i;!function(){"use strict";n=function(){var e=function(){},t="undefined",r=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"],i={},o=null;function s(e,t){var r=e[t];if("function"==typeof r.bind)return r.bind(e);try{return Function.prototype.bind.call(r,e)}catch(t){return function(){return Function.prototype.apply.apply(r,[e,arguments])}}}function a(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function u(){for(var r=this.getLevel(),i=0;i<n.length;i++){var o=n[i];this[o]=i<r?e:this.methodFactory(o,r,this.name)}if(this.log=this.debug,typeof console===t&&r<this.levels.SILENT)return"No console available for logging"}function c(e){return function(){typeof console!==t&&(u.call(this),this[e].apply(this,arguments))}}function f(n,i,o){return function(n){return"debug"===n&&(n="log"),typeof console!==t&&("trace"===n&&r?a:void 0!==console[n]?s(console,n):void 0!==console.log?s(console,"log"):e)}(n)||c.apply(this,arguments)}function l(e,r){var s,a,c,l=this,h="loglevel";function p(){var e;if(typeof window!==t&&h){try{e=window.localStorage[h]}catch(e){}if(typeof e===t)try{var r=window.document.cookie,n=encodeURIComponent(h),i=r.indexOf(n+"=");-1!==i&&(e=/^([^;]+)/.exec(r.slice(i+n.length+1))[1])}catch(e){}return void 0===l.levels[e]&&(e=void 0),e}}function d(e){var t=e;if("string"==typeof t&&void 0!==l.levels[t.toUpperCase()]&&(t=l.levels[t.toUpperCase()]),"number"==typeof t&&t>=0&&t<=l.levels.SILENT)return t;throw new TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?h+=":"+e:"symbol"==typeof e&&(h=void 0),l.name=e,l.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},l.methodFactory=r||f,l.getLevel=function(){return null!=c?c:null!=a?a:s},l.setLevel=function(e,r){return c=d(e),!1!==r&&function(e){var r=(n[e]||"silent").toUpperCase();if(typeof window!==t&&h){try{return void(window.localStorage[h]=r)}catch(e){}try{window.document.cookie=encodeURIComponent(h)+"="+r+";"}catch(e){}}}(c),u.call(l)},l.setDefaultLevel=function(e){a=d(e),p()||l.setLevel(e,!1)},l.resetLevel=function(){c=null,function(){if(typeof window!==t&&h){try{window.localStorage.removeItem(h)}catch(e){}try{window.document.cookie=encodeURIComponent(h)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}(),u.call(l)},l.enableAll=function(e){l.setLevel(l.levels.TRACE,e)},l.disableAll=function(e){l.setLevel(l.levels.SILENT,e)},l.rebuild=function(){if(o!==l&&(s=d(o.getLevel())),u.call(l),o===l)for(var e in i)i[e].rebuild()},s=d(o?o.getLevel():"WARN");var y=p();null!=y&&(c=d(y)),u.call(l)}(o=new l).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=i[e];return t||(t=i[e]=new l(e,o.methodFactory)),t};var h=typeof window!==t?window.log:void 0;return o.noConflict=function(){return typeof window!==t&&window.log===o&&(window.log=h),o},o.getLoggers=function(){return i},o.default=o,o},void 0===(i=n.call(t,r,t,e))||(e.exports=i)}()},71514(e){"use strict";e.exports=Math.abs},58968(e){"use strict";e.exports=Math.floor},94459(e){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},6188(e){"use strict";e.exports=Math.max},68002(e){"use strict";e.exports=Math.min},75880(e){"use strict";e.exports=Math.pow},70414(e){"use strict";e.exports=Math.round},73093(e,t,r){"use strict";var n=r(94459);e.exports=function(e){return n(e)||0===e?e:e<0?-1:1}},5256(e,t,r){"use strict";const n=r(88310),{Buffer:i}=r(48287),o=new TextDecoder("utf8",{fatal:!0,ignoreBOM:!0});class s extends n.Transform{constructor(e,t,r={}){let n=null,o=null;switch(typeof e){case"object":i.isBuffer(e)?n=e:e&&(r=e);break;case"string":n=e;break;case"undefined":break;default:throw new TypeError("Invalid input")}switch(typeof t){case"object":t&&(r=t);break;case"string":o=t;break;case"undefined":break;default:throw new TypeError("Invalid inputEncoding")}if(!r||"object"!=typeof r)throw new TypeError("Invalid options");null==n&&(n=r.input),null==o&&(o=r.inputEncoding),delete r.input,delete r.inputEncoding;const s=null==r.watchPipe||r.watchPipe;delete r.watchPipe;const a=Boolean(r.readError);delete r.readError,super(r),this.readError=a,s&&this.on("pipe",e=>{const t=e._readableState.objectMode;if(this.length>0&&t!==this._readableState.objectMode)throw new Error("Do not switch objectMode in the middle of the stream");this._readableState.objectMode=t,this._writableState.objectMode=t}),null!=n&&this.end(n,o)}static isNoFilter(e){return e instanceof this}static compare(e,t){if(!(e instanceof this))throw new TypeError("Arguments must be NoFilters");return e===t?0:e.compare(t)}static concat(e,t){if(!Array.isArray(e))throw new TypeError("list argument must be an Array of NoFilters");if(0===e.length||0===t)return i.alloc(0);null==t&&(t=e.reduce((e,t)=>{if(!(t instanceof s))throw new TypeError("list argument must be an Array of NoFilters");return e+t.length},0));let r=!0,n=!0;const o=e.map(e=>{if(!(e instanceof s))throw new TypeError("list argument must be an Array of NoFilters");const t=e.slice();return i.isBuffer(t)?n=!1:r=!1,t});if(r)return i.concat(o,t);if(n)return[].concat(...o).slice(0,t);throw new Error("Concatenating mixed object and byte streams not supported")}_transform(e,t,r){this._readableState.objectMode||i.isBuffer(e)||(e=i.from(e,t)),this.push(e),r()}_bufArray(){let e=this._readableState.buffer;if(!Array.isArray(e)){let t=e.head;for(e=[];null!=t;)e.push(t.data),t=t.next}return e}read(e){const t=super.read(e);if(null!=t){if(this.emit("read",t),this.readError&&t.length<e)throw new Error(`Read ${t.length}, wanted ${e}`)}else if(this.readError)throw new Error(`No data available, wanted ${e}`);return t}readFull(e){let t=null,r=null,n=null;return new Promise((i,o)=>{this.length>=e?i(this.read(e)):this.writableFinished?o(new Error(`Stream finished before ${e} bytes were available`)):(t=t=>{this.length>=e&&i(this.read(e))},r=()=>{o(new Error(`Stream finished before ${e} bytes were available`))},n=o,this.on("readable",t),this.on("error",n),this.on("finish",r))}).finally(()=>{t&&(this.removeListener("readable",t),this.removeListener("error",n),this.removeListener("finish",r))})}promise(e){let t=!1;return new Promise((r,n)=>{this.on("finish",()=>{const n=this.read();null==e||t||(t=!0,e(null,n)),r(n)}),this.on("error",r=>{null==e||t||(t=!0,e(r)),n(r)})})}compare(e){if(!(e instanceof s))throw new TypeError("Arguments must be NoFilters");if(this===e)return 0;const t=this.slice(),r=e.slice();if(i.isBuffer(t)&&i.isBuffer(r))return t.compare(r);throw new Error("Cannot compare streams in object mode")}equals(e){return 0===this.compare(e)}slice(e,t){if(this._readableState.objectMode)return this._bufArray().slice(e,t);const r=this._bufArray();switch(r.length){case 0:return i.alloc(0);case 1:return r[0].slice(e,t);default:return i.concat(r).slice(e,t)}}get(e){return this.slice()[e]}toJSON(){const e=this.slice();return i.isBuffer(e)?e.toJSON():e}toString(e,t,r){const n=this.slice(t,r);return i.isBuffer(n)?e&&"utf8"!==e?n.toString(e):o.decode(n):JSON.stringify(n)}[Symbol.for("nodejs.util.inspect.custom")](e,t){const r=this._bufArray().map(e=>i.isBuffer(e)?t.stylize(e.toString("hex"),"string"):JSON.stringify(e)).join(", ");return`${this.constructor.name} [${r}]`}get length(){return this._readableState.length}writeBigInt(e){let t=e.toString(16);if(e<0){const r=BigInt(Math.floor(t.length/2));t=(e=(BigInt(1)<<r*BigInt(8))+e).toString(16)}return t.length%2&&(t=`0${t}`),this.push(i.from(t,"hex"))}readUBigInt(e){const t=this.read(e);return i.isBuffer(t)?BigInt(`0x${t.toString("hex")}`):null}readBigInt(e){const t=this.read(e);if(!i.isBuffer(t))return null;let r=BigInt(`0x${t.toString("hex")}`);return 128&t[0]&&(r-=BigInt(1)<<BigInt(t.length)*BigInt(8)),r}writeUInt8(e){const t=i.from([e]);return this.push(t)}writeUInt16LE(e){const t=i.alloc(2);return t.writeUInt16LE(e),this.push(t)}writeUInt16BE(e){const t=i.alloc(2);return t.writeUInt16BE(e),this.push(t)}writeUInt32LE(e){const t=i.alloc(4);return t.writeUInt32LE(e),this.push(t)}writeUInt32BE(e){const t=i.alloc(4);return t.writeUInt32BE(e),this.push(t)}writeInt8(e){const t=i.from([e]);return this.push(t)}writeInt16LE(e){const t=i.alloc(2);return t.writeUInt16LE(e),this.push(t)}writeInt16BE(e){const t=i.alloc(2);return t.writeUInt16BE(e),this.push(t)}writeInt32LE(e){const t=i.alloc(4);return t.writeUInt32LE(e),this.push(t)}writeInt32BE(e){const t=i.alloc(4);return t.writeUInt32BE(e),this.push(t)}writeFloatLE(e){const t=i.alloc(4);return t.writeFloatLE(e),this.push(t)}writeFloatBE(e){const t=i.alloc(4);return t.writeFloatBE(e),this.push(t)}writeDoubleLE(e){const t=i.alloc(8);return t.writeDoubleLE(e),this.push(t)}writeDoubleBE(e){const t=i.alloc(8);return t.writeDoubleBE(e),this.push(t)}writeBigInt64LE(e){const t=i.alloc(8);return t.writeBigInt64LE(e),this.push(t)}writeBigInt64BE(e){const t=i.alloc(8);return t.writeBigInt64BE(e),this.push(t)}writeBigUInt64LE(e){const t=i.alloc(8);return t.writeBigUInt64LE(e),this.push(t)}writeBigUInt64BE(e){const t=i.alloc(8);return t.writeBigUInt64BE(e),this.push(t)}readUInt8(){const e=this.read(1);return i.isBuffer(e)?e.readUInt8():null}readUInt16LE(){const e=this.read(2);return i.isBuffer(e)?e.readUInt16LE():null}readUInt16BE(){const e=this.read(2);return i.isBuffer(e)?e.readUInt16BE():null}readUInt32LE(){const e=this.read(4);return i.isBuffer(e)?e.readUInt32LE():null}readUInt32BE(){const e=this.read(4);return i.isBuffer(e)?e.readUInt32BE():null}readInt8(){const e=this.read(1);return i.isBuffer(e)?e.readInt8():null}readInt16LE(){const e=this.read(2);return i.isBuffer(e)?e.readInt16LE():null}readInt16BE(){const e=this.read(2);return i.isBuffer(e)?e.readInt16BE():null}readInt32LE(){const e=this.read(4);return i.isBuffer(e)?e.readInt32LE():null}readInt32BE(){const e=this.read(4);return i.isBuffer(e)?e.readInt32BE():null}readFloatLE(){const e=this.read(4);return i.isBuffer(e)?e.readFloatLE():null}readFloatBE(){const e=this.read(4);return i.isBuffer(e)?e.readFloatBE():null}readDoubleLE(){const e=this.read(8);return i.isBuffer(e)?e.readDoubleLE():null}readDoubleBE(){const e=this.read(8);return i.isBuffer(e)?e.readDoubleBE():null}readBigInt64LE(){const e=this.read(8);return i.isBuffer(e)?e.readBigInt64LE():null}readBigInt64BE(){const e=this.read(8);return i.isBuffer(e)?e.readBigInt64BE():null}readBigUInt64LE(){const e=this.read(8);return i.isBuffer(e)?e.readBigUInt64LE():null}readBigUInt64BE(){const e=this.read(8);return i.isBuffer(e)?e.readBigUInt64BE():null}}e.exports=s},89211(e){"use strict";var t=function(e){return e!=e};e.exports=function(e,r){return 0===e&&0===r?1/e==1/r:e===r||!(!t(e)||!t(r))}},37653(e,t,r){"use strict";var n=r(38452),i=r(10487),o=r(89211),s=r(9394),a=r(36576),u=i(s(),Object);n(u,{getPolyfill:s,implementation:o,shim:a}),e.exports=u},9394(e,t,r){"use strict";var n=r(89211);e.exports=function(){return"function"==typeof Object.is?Object.is:n}},36576(e,t,r){"use strict";var n=r(9394),i=r(38452);e.exports=function(){var e=n();return i(Object,{is:e},{is:function(){return Object.is!==e}}),e}},28875(e,t,r){"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,s=r(1093),a=Object.prototype.propertyIsEnumerable,u=!a.call({toString:null},"toString"),c=a.call(function(){},"prototype"),f=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(e){var t=e.constructor;return t&&t.prototype===e},h={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},p=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!h["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{l(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();n=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===o.call(e),n=s(e),a=t&&"[object String]"===o.call(e),h=[];if(!t&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var d=c&&r;if(a&&e.length>0&&!i.call(e,0))for(var y=0;y<e.length;++y)h.push(String(y));if(n&&e.length>0)for(var g=0;g<e.length;++g)h.push(String(g));else for(var m in e)d&&"prototype"===m||!i.call(e,m)||h.push(String(m));if(u)for(var v=function(e){if("undefined"==typeof window||!p)return l(e);try{return l(e)}catch(e){return!1}}(e),b=0;b<f.length;++b)v&&"constructor"===f[b]||!i.call(e,f[b])||h.push(f[b]);return h}}e.exports=n},1189(e,t,r){"use strict";var n=Array.prototype.slice,i=r(1093),o=Object.keys,s=o?function(e){return o(e)}:r(28875),a=Object.keys;s.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return i(e)?a(n.call(e)):a(e)})}else Object.keys=s;return Object.keys||s},e.exports=s},1093(e){"use strict";var t=Object.prototype.toString;e.exports=function(e){var r=t.call(e),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),n}},38403(e,t,r){"use strict";var n=r(1189),i=r(41333)(),o=r(36556),s=r(79612),a=o("Array.prototype.push"),u=o("Object.prototype.propertyIsEnumerable"),c=i?s.getOwnPropertySymbols:null;e.exports=function(e,t){if(null==e)throw new TypeError("target must be an object");var r=s(e);if(1===arguments.length)return r;for(var o=1;o<arguments.length;++o){var f=s(arguments[o]),l=n(f),h=i&&(s.getOwnPropertySymbols||c);if(h)for(var p=h(f),d=0;d<p.length;++d){var y=p[d];u(f,y)&&a(l,y)}for(var g=0;g<l.length;++g){var m=l[g];if(u(f,m)){var v=f[m];r[m]=v}}}return r}},11514(e,t,r){"use strict";var n=r(38403);e.exports=function(){return Object.assign?function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},n=0;n<t.length;++n)r[t[n]]=t[n];var i=Object.assign({},r),o="";for(var s in i)o+=s;return e!==o}()||function(){if(!Object.assign||!Object.preventExtensions)return!1;var e=Object.preventExtensions({1:2});try{Object.assign(e,"xy")}catch(t){return"y"===e[1]}return!1}()?n:Object.assign:n}},9805(e,t){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)n(r,i)&&(e[i]=r[i])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){var t,r,n,i,o,s;for(n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(s=new Uint8Array(n),i=0,t=0,r=e.length;t<r;t++)o=e[t],s.set(o,i),i+=o.length;return s}},o={arraySet:function(e,t,r,n,i){for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,i)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,o))},t.setTyped(r)},53269(e){"use strict";e.exports=function(e,t,r,n){for(var i=65535&e,o=e>>>16&65535,s=0;0!==r;){r-=s=r>2e3?2e3:r;do{o=o+(i=i+t[n++]|0)|0}while(--s);i%=65521,o%=65521}return i|o<<16}},19681(e){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},14823(e){"use strict";var t=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,r,n,i){var o=t,s=i+n;e^=-1;for(var a=i;a<s;a++)e=e>>>8^o[255&(e^r[a])];return-1^e}},58411(e,t,r){"use strict";var n,i=r(9805),o=r(23665),s=r(53269),a=r(14823),u=r(54674),c=-2,f=258,l=262,h=103,p=113,d=666;function y(e,t){return e.msg=u[t],t}function g(e){return(e<<1)-(e>4?9:0)}function m(e){for(var t=e.length;--t>=0;)e[t]=0}function v(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(i.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function b(e,t){o._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,v(e.strm)}function w(e,t){e.pending_buf[e.pending++]=t}function _(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function E(e,t,r,n){var o=e.avail_in;return o>n&&(o=n),0===o?0:(e.avail_in-=o,i.arraySet(t,e.input,e.next_in,o,r),1===e.state.wrap?e.adler=s(e.adler,t,o,r):2===e.state.wrap&&(e.adler=a(e.adler,t,o,r)),e.next_in+=o,e.total_in+=o,o)}function x(e,t){var r,n,i=e.max_chain_length,o=e.strstart,s=e.prev_length,a=e.nice_match,u=e.strstart>e.w_size-l?e.strstart-(e.w_size-l):0,c=e.window,h=e.w_mask,p=e.prev,d=e.strstart+f,y=c[o+s-1],g=c[o+s];e.prev_length>=e.good_match&&(i>>=2),a>e.lookahead&&(a=e.lookahead);do{if(c[(r=t)+s]===g&&c[r+s-1]===y&&c[r]===c[o]&&c[++r]===c[o+1]){o+=2,r++;do{}while(c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&o<d);if(n=f-(d-o),o=d-f,n>s){if(e.match_start=t,s=n,n>=a)break;y=c[o+s-1],g=c[o+s]}}}while((t=p[t&h])>u&&0!==--i);return s<=e.lookahead?s:e.lookahead}function S(e){var t,r,n,o,s,a=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=a+(a-l)){i.arraySet(e.window,e.window,a,a,0),e.match_start-=a,e.strstart-=a,e.block_start-=a,t=r=e.hash_size;do{n=e.head[--t],e.head[t]=n>=a?n-a:0}while(--r);t=r=a;do{n=e.prev[--t],e.prev[t]=n>=a?n-a:0}while(--r);o+=a}if(0===e.strm.avail_in)break;if(r=E(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=r,e.lookahead+e.insert>=3)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+3-1])&e.hash_mask,e.prev[s&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=s,s++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<l&&0!==e.strm.avail_in)}function A(e,t){for(var r,n;;){if(e.lookahead<l){if(S(e),e.lookahead<l&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-l&&(e.match_length=x(e,r)),e.match_length>=3)if(n=o._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!==--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(b(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(b(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(b(e,!1),0===e.strm.avail_out)?1:2}function B(e,t){for(var r,n,i;;){if(e.lookahead<l){if(S(e),e.lookahead<l&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-l&&(e.match_length=x(e,r),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,n=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!==--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(b(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((n=o._tr_tally(e,0,e.window[e.strstart-1]))&&b(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=o._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(b(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(b(e,!1),0===e.strm.avail_out)?1:2}function O(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}function k(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),m(this.dyn_ltree),m(this.dyn_dtree),m(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),m(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),m(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function T(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:p,e.adler=2===t.wrap?0:1,t.last_flush=0,o._tr_init(t),0):y(e,c)}function I(e){var t,r=T(e);return 0===r&&((t=e.state).window_size=2*t.w_size,m(t.head),t.max_lazy_match=n[t.level].max_lazy,t.good_match=n[t.level].good_length,t.nice_match=n[t.level].nice_length,t.max_chain_length=n[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),r}function N(e,t,r,n,o,s){if(!e)return c;var a=1;if(-1===t&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),o<1||o>9||8!==r||n<8||n>15||t<0||t>9||s<0||s>4)return y(e,c);8===n&&(n=9);var u=new k;return e.state=u,u.strm=e,u.wrap=a,u.gzhead=null,u.w_bits=n,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=o+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+3-1)/3),u.window=new i.Buf8(2*u.w_size),u.head=new i.Buf16(u.hash_size),u.prev=new i.Buf16(u.w_size),u.lit_bufsize=1<<o+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new i.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=t,u.strategy=s,u.method=r,I(e)}n=[new O(0,0,0,0,function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(S(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,b(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-l&&(b(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(b(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(b(e,!1),e.strm.avail_out),1)}),new O(4,4,8,4,A),new O(4,5,16,8,A),new O(4,6,32,32,A),new O(4,4,16,16,B),new O(8,16,32,32,B),new O(8,16,128,128,B),new O(8,32,128,256,B),new O(32,128,258,1024,B),new O(32,258,258,4096,B)],t.deflateInit=function(e,t){return N(e,t,8,15,8,0)},t.deflateInit2=N,t.deflateReset=I,t.deflateResetKeep=T,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?c:(e.state.gzhead=t,0):c},t.deflate=function(e,t){var r,i,s,u;if(!e||!e.state||t>5||t<0)return e?y(e,c):c;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===d&&4!==t)return y(e,0===e.avail_out?-5:c);if(i.strm=e,r=i.last_flush,i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,w(i,31),w(i,139),w(i,8),i.gzhead?(w(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),w(i,255&i.gzhead.time),w(i,i.gzhead.time>>8&255),w(i,i.gzhead.time>>16&255),w(i,i.gzhead.time>>24&255),w(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),w(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(w(i,255&i.gzhead.extra.length),w(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=a(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(w(i,0),w(i,0),w(i,0),w(i,0),w(i,0),w(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),w(i,3),i.status=p);else{var l=8+(i.w_bits-8<<4)<<8;l|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(l|=32),l+=31-l%31,i.status=p,_(i,l),0!==i.strstart&&(_(i,e.adler>>>16),_(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(s=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),v(e),s=i.pending,i.pending!==i.pending_buf_size));)w(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),v(e),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,w(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),v(e),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,w(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.status=h)}else i.status=h;if(i.status===h&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&v(e),i.pending+2<=i.pending_buf_size&&(w(i,255&e.adler),w(i,e.adler>>8&255),e.adler=0,i.status=p)):i.status=p),0!==i.pending){if(v(e),0===e.avail_out)return i.last_flush=-1,0}else if(0===e.avail_in&&g(t)<=g(r)&&4!==t)return y(e,-5);if(i.status===d&&0!==e.avail_in)return y(e,-5);if(0!==e.avail_in||0!==i.lookahead||0!==t&&i.status!==d){var E=2===i.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(S(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(b(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(b(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(b(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var r,n,i,s,a=e.window;;){if(e.lookahead<=f){if(S(e),e.lookahead<=f&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(n=a[i=e.strstart-1])===a[++i]&&n===a[++i]&&n===a[++i]){s=e.strstart+f;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&i<s);e.match_length=f-(s-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=o._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(b(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(b(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(b(e,!1),0===e.strm.avail_out)?1:2}(i,t):n[i.level].func(i,t);if(3!==E&&4!==E||(i.status=d),1===E||3===E)return 0===e.avail_out&&(i.last_flush=-1),0;if(2===E&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(m(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),v(e),0===e.avail_out))return i.last_flush=-1,0}return 4!==t?0:i.wrap<=0?1:(2===i.wrap?(w(i,255&e.adler),w(i,e.adler>>8&255),w(i,e.adler>>16&255),w(i,e.adler>>24&255),w(i,255&e.total_in),w(i,e.total_in>>8&255),w(i,e.total_in>>16&255),w(i,e.total_in>>24&255)):(_(i,e.adler>>>16),_(i,65535&e.adler)),v(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&t!==h&&t!==p&&t!==d?y(e,c):(e.state=null,t===p?y(e,-3):0):c},t.deflateSetDictionary=function(e,t){var r,n,o,a,u,f,l,h,p=t.length;if(!e||!e.state)return c;if(2===(a=(r=e.state).wrap)||1===a&&42!==r.status||r.lookahead)return c;for(1===a&&(e.adler=s(e.adler,t,p,0)),r.wrap=0,p>=r.w_size&&(0===a&&(m(r.head),r.strstart=0,r.block_start=0,r.insert=0),h=new i.Buf8(r.w_size),i.arraySet(h,t,p-r.w_size,r.w_size,0),t=h,p=r.w_size),u=e.avail_in,f=e.next_in,l=e.input,e.avail_in=p,e.next_in=0,e.input=t,S(r);r.lookahead>=3;){n=r.strstart,o=r.lookahead-2;do{r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+3-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++}while(--o);r.strstart=n,r.lookahead=2,S(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=f,e.input=l,e.avail_in=u,r.wrap=a,0},t.deflateInfo="pako deflate (from Nodeca project)"},47293(e){"use strict";e.exports=function(e,t){var r,n,i,o,s,a,u,c,f,l,h,p,d,y,g,m,v,b,w,_,E,x,S,A,B;r=e.state,n=e.next_in,A=e.input,i=n+(e.avail_in-5),o=e.next_out,B=e.output,s=o-(t-e.avail_out),a=o+(e.avail_out-257),u=r.dmax,c=r.wsize,f=r.whave,l=r.wnext,h=r.window,p=r.hold,d=r.bits,y=r.lencode,g=r.distcode,m=(1<<r.lenbits)-1,v=(1<<r.distbits)-1;e:do{d<15&&(p+=A[n++]<<d,d+=8,p+=A[n++]<<d,d+=8),b=y[p&m];t:for(;;){if(p>>>=w=b>>>24,d-=w,0==(w=b>>>16&255))B[o++]=65535&b;else{if(!(16&w)){if(64&w){if(32&w){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}b=y[(65535&b)+(p&(1<<w)-1)];continue t}for(_=65535&b,(w&=15)&&(d<w&&(p+=A[n++]<<d,d+=8),_+=p&(1<<w)-1,p>>>=w,d-=w),d<15&&(p+=A[n++]<<d,d+=8,p+=A[n++]<<d,d+=8),b=g[p&v];;){if(p>>>=w=b>>>24,d-=w,16&(w=b>>>16&255)){if(E=65535&b,d<(w&=15)&&(p+=A[n++]<<d,(d+=8)<w&&(p+=A[n++]<<d,d+=8)),(E+=p&(1<<w)-1)>u){e.msg="invalid distance too far back",r.mode=30;break e}if(p>>>=w,d-=w,E>(w=o-s)){if((w=E-w)>f&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(x=0,S=h,0===l){if(x+=c-w,w<_){_-=w;do{B[o++]=h[x++]}while(--w);x=o-E,S=B}}else if(l<w){if(x+=c+l-w,(w-=l)<_){_-=w;do{B[o++]=h[x++]}while(--w);if(x=0,l<_){_-=w=l;do{B[o++]=h[x++]}while(--w);x=o-E,S=B}}}else if(x+=l-w,w<_){_-=w;do{B[o++]=h[x++]}while(--w);x=o-E,S=B}for(;_>2;)B[o++]=S[x++],B[o++]=S[x++],B[o++]=S[x++],_-=3;_&&(B[o++]=S[x++],_>1&&(B[o++]=S[x++]))}else{x=o-E;do{B[o++]=B[x++],B[o++]=B[x++],B[o++]=B[x++],_-=3}while(_>2);_&&(B[o++]=B[x++],_>1&&(B[o++]=B[x++]))}break}if(64&w){e.msg="invalid distance code",r.mode=30;break e}b=g[(65535&b)+(p&(1<<w)-1)]}}break}}while(n<i&&o<a);n-=_=d>>3,p&=(1<<(d-=_<<3))-1,e.next_in=n,e.next_out=o,e.avail_in=n<i?i-n+5:5-(n-i),e.avail_out=o<a?a-o+257:257-(o-a),r.hold=p,r.bits=d}},71447(e,t,r){"use strict";var n=r(9805),i=r(53269),o=r(14823),s=r(47293),a=r(21998),u=-2,c=12,f=30;function l(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function h(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function p(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(852),t.distcode=t.distdyn=new n.Buf32(592),t.sane=1,t.back=-1,0):u}function d(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,p(e)):u}function y(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?u:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,d(e))):u}function g(e,t){var r,n;return e?(n=new h,e.state=n,n.window=null,0!==(r=y(e,t))&&(e.state=null),r):u}var m,v,b=!0;function w(e){if(b){var t;for(m=new n.Buf32(512),v=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(a(1,e.lens,0,288,m,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;a(2,e.lens,0,32,v,0,e.work,{bits:5}),b=!1}e.lencode=m,e.lenbits=9,e.distcode=v,e.distbits=5}function _(e,t,r,i){var o,s=e.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new n.Buf8(s.wsize)),i>=s.wsize?(n.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((o=s.wsize-s.wnext)>i&&(o=i),n.arraySet(s.window,t,r-i,o,s.wnext),(i-=o)?(n.arraySet(s.window,t,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=o))),0}t.inflateReset=d,t.inflateReset2=y,t.inflateResetKeep=p,t.inflateInit=function(e){return g(e,15)},t.inflateInit2=g,t.inflate=function(e,t){var r,h,p,d,y,g,m,v,b,E,x,S,A,B,O,k,T,I,N,F,R,j,L,U,P=0,C=new n.Buf8(4),M=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return u;(r=e.state).mode===c&&(r.mode=13),y=e.next_out,p=e.output,m=e.avail_out,d=e.next_in,h=e.input,g=e.avail_in,v=r.hold,b=r.bits,E=g,x=m,j=0;e:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;b<16;){if(0===g)break e;g--,v+=h[d++]<<b,b+=8}if(2&r.wrap&&35615===v){r.check=0,C[0]=255&v,C[1]=v>>>8&255,r.check=o(r.check,C,2,0),v=0,b=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&v)<<8)+(v>>8))%31){e.msg="incorrect header check",r.mode=f;break}if(8!=(15&v)){e.msg="unknown compression method",r.mode=f;break}if(b-=4,R=8+(15&(v>>>=4)),0===r.wbits)r.wbits=R;else if(R>r.wbits){e.msg="invalid window size",r.mode=f;break}r.dmax=1<<R,e.adler=r.check=1,r.mode=512&v?10:c,v=0,b=0;break;case 2:for(;b<16;){if(0===g)break e;g--,v+=h[d++]<<b,b+=8}if(r.flags=v,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=f;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=f;break}r.head&&(r.head.text=v>>8&1),512&r.flags&&(C[0]=255&v,C[1]=v>>>8&255,r.check=o(r.check,C,2,0)),v=0,b=0,r.mode=3;case 3:for(;b<32;){if(0===g)break e;g--,v+=h[d++]<<b,b+=8}r.head&&(r.head.time=v),512&r.flags&&(C[0]=255&v,C[1]=v>>>8&255,C[2]=v>>>16&255,C[3]=v>>>24&255,r.check=o(r.check,C,4,0)),v=0,b=0,r.mode=4;case 4:for(;b<16;){if(0===g)break e;g--,v+=h[d++]<<b,b+=8}r.head&&(r.head.xflags=255&v,r.head.os=v>>8),512&r.flags&&(C[0]=255&v,C[1]=v>>>8&255,r.check=o(r.check,C,2,0)),v=0,b=0,r.mode=5;case 5:if(1024&r.flags){for(;b<16;){if(0===g)break e;g--,v+=h[d++]<<b,b+=8}r.length=v,r.head&&(r.head.extra_len=v),512&r.flags&&(C[0]=255&v,C[1]=v>>>8&255,r.check=o(r.check,C,2,0)),v=0,b=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((S=r.length)>g&&(S=g),S&&(r.head&&(R=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,h,d,S,R)),512&r.flags&&(r.check=o(r.check,h,S,d)),g-=S,d+=S,r.length-=S),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===g)break e;S=0;do{R=h[d+S++],r.head&&R&&r.length<65536&&(r.head.name+=String.fromCharCode(R))}while(R&&S<g);if(512&r.flags&&(r.check=o(r.check,h,S,d)),g-=S,d+=S,R)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===g)break e;S=0;do{R=h[d+S++],r.head&&R&&r.length<65536&&(r.head.comment+=String.fromCharCode(R))}while(R&&S<g);if(512&r.flags&&(r.check=o(r.check,h,S,d)),g-=S,d+=S,R)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;b<16;){if(0===g)break e;g--,v+=h[d++]<<b,b+=8}if(v!==(65535&r.check)){e.msg="header crc mismatch",r.mode=f;break}v=0,b=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=c;break;case 10:for(;b<32;){if(0===g)break e;g--,v+=h[d++]<<b,b+=8}e.adler=r.check=l(v),v=0,b=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=y,e.avail_out=m,e.next_in=d,e.avail_in=g,r.hold=v,r.bits=b,2;e.adler=r.check=1,r.mode=c;case c:if(5===t||6===t)break e;case 13:if(r.last){v>>>=7&b,b-=7&b,r.mode=27;break}for(;b<3;){if(0===g)break e;g--,v+=h[d++]<<b,b+=8}switch(r.last=1&v,b-=1,3&(v>>>=1)){case 0:r.mode=14;break;case 1:if(w(r),r.mode=20,6===t){v>>>=2,b-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=f}v>>>=2,b-=2;break;case 14:for(v>>>=7&b,b-=7&b;b<32;){if(0===g)break e;g--,v+=h[d++]<<b,b+=8}if((65535&v)!=(v>>>16^65535)){e.msg="invalid stored block lengths",r.mode=f;break}if(r.length=65535&v,v=0,b=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(S=r.length){if(S>g&&(S=g),S>m&&(S=m),0===S)break e;n.arraySet(p,h,d,S,y),g-=S,d+=S,m-=S,y+=S,r.length-=S;break}r.mode=c;break;case 17:for(;b<14;){if(0===g)break e;g--,v+=h[d++]<<b,b+=8}if(r.nlen=257+(31&v),v>>>=5,b-=5,r.ndist=1+(31&v),v>>>=5,b-=5,r.ncode=4+(15&v),v>>>=4,b-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=f;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;b<3;){if(0===g)break e;g--,v+=h[d++]<<b,b+=8}r.lens[M[r.have++]]=7&v,v>>>=3,b-=3}for(;r.have<19;)r.lens[M[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,L={bits:r.lenbits},j=a(0,r.lens,0,19,r.lencode,0,r.work,L),r.lenbits=L.bits,j){e.msg="invalid code lengths set",r.mode=f;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;k=(P=r.lencode[v&(1<<r.lenbits)-1])>>>16&255,T=65535&P,!((O=P>>>24)<=b);){if(0===g)break e;g--,v+=h[d++]<<b,b+=8}if(T<16)v>>>=O,b-=O,r.lens[r.have++]=T;else{if(16===T){for(U=O+2;b<U;){if(0===g)break e;g--,v+=h[d++]<<b,b+=8}if(v>>>=O,b-=O,0===r.have){e.msg="invalid bit length repeat",r.mode=f;break}R=r.lens[r.have-1],S=3+(3&v),v>>>=2,b-=2}else if(17===T){for(U=O+3;b<U;){if(0===g)break e;g--,v+=h[d++]<<b,b+=8}b-=O,R=0,S=3+(7&(v>>>=O)),v>>>=3,b-=3}else{for(U=O+7;b<U;){if(0===g)break e;g--,v+=h[d++]<<b,b+=8}b-=O,R=0,S=11+(127&(v>>>=O)),v>>>=7,b-=7}if(r.have+S>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=f;break}for(;S--;)r.lens[r.have++]=R}}if(r.mode===f)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=f;break}if(r.lenbits=9,L={bits:r.lenbits},j=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,L),r.lenbits=L.bits,j){e.msg="invalid literal/lengths set",r.mode=f;break}if(r.distbits=6,r.distcode=r.distdyn,L={bits:r.distbits},j=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,L),r.distbits=L.bits,j){e.msg="invalid distances set",r.mode=f;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(g>=6&&m>=258){e.next_out=y,e.avail_out=m,e.next_in=d,e.avail_in=g,r.hold=v,r.bits=b,s(e,x),y=e.next_out,p=e.output,m=e.avail_out,d=e.next_in,h=e.input,g=e.avail_in,v=r.hold,b=r.bits,r.mode===c&&(r.back=-1);break}for(r.back=0;k=(P=r.lencode[v&(1<<r.lenbits)-1])>>>16&255,T=65535&P,!((O=P>>>24)<=b);){if(0===g)break e;g--,v+=h[d++]<<b,b+=8}if(k&&!(240&k)){for(I=O,N=k,F=T;k=(P=r.lencode[F+((v&(1<<I+N)-1)>>I)])>>>16&255,T=65535&P,!(I+(O=P>>>24)<=b);){if(0===g)break e;g--,v+=h[d++]<<b,b+=8}v>>>=I,b-=I,r.back+=I}if(v>>>=O,b-=O,r.back+=O,r.length=T,0===k){r.mode=26;break}if(32&k){r.back=-1,r.mode=c;break}if(64&k){e.msg="invalid literal/length code",r.mode=f;break}r.extra=15&k,r.mode=22;case 22:if(r.extra){for(U=r.extra;b<U;){if(0===g)break e;g--,v+=h[d++]<<b,b+=8}r.length+=v&(1<<r.extra)-1,v>>>=r.extra,b-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;k=(P=r.distcode[v&(1<<r.distbits)-1])>>>16&255,T=65535&P,!((O=P>>>24)<=b);){if(0===g)break e;g--,v+=h[d++]<<b,b+=8}if(!(240&k)){for(I=O,N=k,F=T;k=(P=r.distcode[F+((v&(1<<I+N)-1)>>I)])>>>16&255,T=65535&P,!(I+(O=P>>>24)<=b);){if(0===g)break e;g--,v+=h[d++]<<b,b+=8}v>>>=I,b-=I,r.back+=I}if(v>>>=O,b-=O,r.back+=O,64&k){e.msg="invalid distance code",r.mode=f;break}r.offset=T,r.extra=15&k,r.mode=24;case 24:if(r.extra){for(U=r.extra;b<U;){if(0===g)break e;g--,v+=h[d++]<<b,b+=8}r.offset+=v&(1<<r.extra)-1,v>>>=r.extra,b-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=f;break}r.mode=25;case 25:if(0===m)break e;if(S=x-m,r.offset>S){if((S=r.offset-S)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=f;break}S>r.wnext?(S-=r.wnext,A=r.wsize-S):A=r.wnext-S,S>r.length&&(S=r.length),B=r.window}else B=p,A=y-r.offset,S=r.length;S>m&&(S=m),m-=S,r.length-=S;do{p[y++]=B[A++]}while(--S);0===r.length&&(r.mode=21);break;case 26:if(0===m)break e;p[y++]=r.length,m--,r.mode=21;break;case 27:if(r.wrap){for(;b<32;){if(0===g)break e;g--,v|=h[d++]<<b,b+=8}if(x-=m,e.total_out+=x,r.total+=x,x&&(e.adler=r.check=r.flags?o(r.check,p,x,y-x):i(r.check,p,x,y-x)),x=m,(r.flags?v:l(v))!==r.check){e.msg="incorrect data check",r.mode=f;break}v=0,b=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;b<32;){if(0===g)break e;g--,v+=h[d++]<<b,b+=8}if(v!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=f;break}v=0,b=0}r.mode=29;case 29:j=1;break e;case f:j=-3;break e;case 31:return-4;default:return u}return e.next_out=y,e.avail_out=m,e.next_in=d,e.avail_in=g,r.hold=v,r.bits=b,(r.wsize||x!==e.avail_out&&r.mode<f&&(r.mode<27||4!==t))&&_(e,e.output,e.next_out,x-e.avail_out)?(r.mode=31,-4):(E-=e.avail_in,x-=e.avail_out,e.total_in+=E,e.total_out+=x,r.total+=x,r.wrap&&x&&(e.adler=r.check=r.flags?o(r.check,p,x,e.next_out-x):i(r.check,p,x,e.next_out-x)),e.data_type=r.bits+(r.last?64:0)+(r.mode===c?128:0)+(20===r.mode||15===r.mode?256:0),(0===E&&0===x||4===t)&&0===j&&(j=-5),j)},t.inflateEnd=function(e){if(!e||!e.state)return u;var t=e.state;return t.window&&(t.window=null),e.state=null,0},t.inflateGetHeader=function(e,t){var r;return e&&e.state&&2&(r=e.state).wrap?(r.head=t,t.done=!1,0):u},t.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?u:11===r.mode&&i(1,t,n,0)!==r.check?-3:_(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,0):u},t.inflateInfo="pako inflate (from Nodeca project)"},21998(e,t,r){"use strict";var n=r(9805),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(e,t,r,u,c,f,l,h){var p,d,y,g,m,v,b,w,_,E=h.bits,x=0,S=0,A=0,B=0,O=0,k=0,T=0,I=0,N=0,F=0,R=null,j=0,L=new n.Buf16(16),U=new n.Buf16(16),P=null,C=0;for(x=0;x<=15;x++)L[x]=0;for(S=0;S<u;S++)L[t[r+S]]++;for(O=E,B=15;B>=1&&0===L[B];B--);if(O>B&&(O=B),0===B)return c[f++]=20971520,c[f++]=20971520,h.bits=1,0;for(A=1;A<B&&0===L[A];A++);for(O<A&&(O=A),I=1,x=1;x<=15;x++)if(I<<=1,(I-=L[x])<0)return-1;if(I>0&&(0===e||1!==B))return-1;for(U[1]=0,x=1;x<15;x++)U[x+1]=U[x]+L[x];for(S=0;S<u;S++)0!==t[r+S]&&(l[U[t[r+S]]++]=S);if(0===e?(R=P=l,v=19):1===e?(R=i,j-=257,P=o,C-=257,v=256):(R=s,P=a,v=-1),F=0,S=0,x=A,m=f,k=O,T=0,y=-1,g=(N=1<<O)-1,1===e&&N>852||2===e&&N>592)return 1;for(;;){b=x-T,l[S]<v?(w=0,_=l[S]):l[S]>v?(w=P[C+l[S]],_=R[j+l[S]]):(w=96,_=0),p=1<<x-T,A=d=1<<k;do{c[m+(F>>T)+(d-=p)]=b<<24|w<<16|_}while(0!==d);for(p=1<<x-1;F&p;)p>>=1;if(0!==p?(F&=p-1,F+=p):F=0,S++,0===--L[x]){if(x===B)break;x=t[r+l[S]]}if(x>O&&(F&g)!==y){for(0===T&&(T=O),m+=A,I=1<<(k=x-T);k+T<B&&!((I-=L[k+T])<=0);)k++,I<<=1;if(N+=1<<k,1===e&&N>852||2===e&&N>592)return 1;c[y=F&g]=O<<24|k<<16|m-f}}return 0!==F&&(c[m+F]=x-T<<24|64<<16),h.bits=O,0}},54674(e){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},23665(e,t,r){"use strict";var n=r(9805);function i(e){for(var t=e.length;--t>=0;)e[t]=0}var o=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],s=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],u=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],c=new Array(576);i(c);var f=new Array(60);i(f);var l=new Array(512);i(l);var h=new Array(256);i(h);var p=new Array(29);i(p);var d,y,g,m=new Array(30);function v(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function b(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function w(e){return e<256?l[e]:l[256+(e>>>7)]}function _(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function E(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t<<e.bi_valid&65535,_(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function x(e,t,r){E(e,r[2*t],r[2*t+1])}function S(e,t){var r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1}function A(e,t,r){var n,i,o=new Array(16),s=0;for(n=1;n<=15;n++)o[n]=s=s+r[n-1]<<1;for(i=0;i<=t;i++){var a=e[2*i+1];0!==a&&(e[2*i]=S(o[a]++,a))}}function B(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function O(e){e.bi_valid>8?_(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function k(e,t,r,n){var i=2*t,o=2*r;return e[i]<e[o]||e[i]===e[o]&&n[t]<=n[r]}function T(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&k(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!k(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function I(e,t,r){var n,i,a,u,c=0;if(0!==e.last_lit)do{n=e.pending_buf[e.d_buf+2*c]<<8|e.pending_buf[e.d_buf+2*c+1],i=e.pending_buf[e.l_buf+c],c++,0===n?x(e,i,t):(x(e,(a=h[i])+256+1,t),0!==(u=o[a])&&E(e,i-=p[a],u),x(e,a=w(--n),r),0!==(u=s[a])&&E(e,n-=m[a],u))}while(c<e.last_lit);x(e,256,t)}function N(e,t){var r,n,i,o=t.dyn_tree,s=t.stat_desc.static_tree,a=t.stat_desc.has_stree,u=t.stat_desc.elems,c=-1;for(e.heap_len=0,e.heap_max=573,r=0;r<u;r++)0!==o[2*r]?(e.heap[++e.heap_len]=c=r,e.depth[r]=0):o[2*r+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=c<2?++c:0)]=1,e.depth[i]=0,e.opt_len--,a&&(e.static_len-=s[2*i+1]);for(t.max_code=c,r=e.heap_len>>1;r>=1;r--)T(e,o,r);i=u;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],T(e,o,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,o[2*i]=o[2*r]+o[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,o[2*r+1]=o[2*n+1]=i,e.heap[1]=i++,T(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,o,s,a,u=t.dyn_tree,c=t.max_code,f=t.stat_desc.static_tree,l=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,d=t.stat_desc.max_length,y=0;for(o=0;o<=15;o++)e.bl_count[o]=0;for(u[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)(o=u[2*u[2*(n=e.heap[r])+1]+1]+1)>d&&(o=d,y++),u[2*n+1]=o,n>c||(e.bl_count[o]++,s=0,n>=p&&(s=h[n-p]),a=u[2*n],e.opt_len+=a*(o+s),l&&(e.static_len+=a*(f[2*n+1]+s)));if(0!==y){do{for(o=d-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[d]--,y-=2}while(y>0);for(o=d;0!==o;o--)for(n=e.bl_count[o];0!==n;)(i=e.heap[--r])>c||(u[2*i+1]!==o&&(e.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),n--)}}(e,t),A(o,c,e.bl_count)}function F(e,t,r){var n,i,o=-1,s=t[1],a=0,u=7,c=4;for(0===s&&(u=138,c=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=s,s=t[2*(n+1)+1],++a<u&&i===s||(a<c?e.bl_tree[2*i]+=a:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):a<=10?e.bl_tree[34]++:e.bl_tree[36]++,a=0,o=i,0===s?(u=138,c=3):i===s?(u=6,c=3):(u=7,c=4))}function R(e,t,r){var n,i,o=-1,s=t[1],a=0,u=7,c=4;for(0===s&&(u=138,c=3),n=0;n<=r;n++)if(i=s,s=t[2*(n+1)+1],!(++a<u&&i===s)){if(a<c)do{x(e,i,e.bl_tree)}while(0!==--a);else 0!==i?(i!==o&&(x(e,i,e.bl_tree),a--),x(e,16,e.bl_tree),E(e,a-3,2)):a<=10?(x(e,17,e.bl_tree),E(e,a-3,3)):(x(e,18,e.bl_tree),E(e,a-11,7));a=0,o=i,0===s?(u=138,c=3):i===s?(u=6,c=3):(u=7,c=4)}}i(m);var j=!1;function L(e,t,r,i){E(e,0+(i?1:0),3),function(e,t,r){O(e),_(e,r),_(e,~r),n.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}(e,t,r)}t._tr_init=function(e){j||(function(){var e,t,r,n,i,u=new Array(16);for(r=0,n=0;n<28;n++)for(p[n]=r,e=0;e<1<<o[n];e++)h[r++]=n;for(h[r-1]=n,i=0,n=0;n<16;n++)for(m[n]=i,e=0;e<1<<s[n];e++)l[i++]=n;for(i>>=7;n<30;n++)for(m[n]=i<<7,e=0;e<1<<s[n]-7;e++)l[256+i++]=n;for(t=0;t<=15;t++)u[t]=0;for(e=0;e<=143;)c[2*e+1]=8,e++,u[8]++;for(;e<=255;)c[2*e+1]=9,e++,u[9]++;for(;e<=279;)c[2*e+1]=7,e++,u[7]++;for(;e<=287;)c[2*e+1]=8,e++,u[8]++;for(A(c,287,u),e=0;e<30;e++)f[2*e+1]=5,f[2*e]=S(e,5);d=new v(c,o,257,286,15),y=new v(f,s,0,30,15),g=new v(new Array(0),a,0,19,7)}(),j=!0),e.l_desc=new b(e.dyn_ltree,d),e.d_desc=new b(e.dyn_dtree,y),e.bl_desc=new b(e.bl_tree,g),e.bi_buf=0,e.bi_valid=0,B(e)},t._tr_stored_block=L,t._tr_flush_block=function(e,t,r,n){var i,o,s=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),N(e,e.l_desc),N(e,e.d_desc),s=function(e){var t;for(F(e,e.dyn_ltree,e.l_desc.max_code),F(e,e.dyn_dtree,e.d_desc.max_code),N(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*u[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(o=e.static_len+3+7>>>3)<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!==t?L(e,t,r,n):4===e.strategy||o===i?(E(e,2+(n?1:0),3),I(e,c,f)):(E(e,4+(n?1:0),3),function(e,t,r,n){var i;for(E(e,t-257,5),E(e,r-1,5),E(e,n-4,4),i=0;i<n;i++)E(e,e.bl_tree[2*u[i]+1],3);R(e,e.dyn_ltree,t-1),R(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),I(e,e.dyn_ltree,e.dyn_dtree)),B(e),n&&O(e)},t._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(h[r]+256+1)]++,e.dyn_dtree[2*w(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){E(e,2,3),x(e,256,c),function(e){16===e.bi_valid?(_(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},44442(e){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},43627(e,t,r){"use strict";var n=r(65606),i="win32"===n.platform,o=r(40537);function s(e,t){for(var r=[],n=0;n<e.length;n++){var i=e[n];i&&"."!==i&&(".."===i?r.length&&".."!==r[r.length-1]?r.pop():t&&r.push(".."):r.push(i))}return r}function a(e){for(var t=e.length-1,r=0;r<=t&&!e[r];r++);for(var n=t;n>=0&&!e[n];n--);return 0===r&&n===t?e:r>n?[]:e.slice(r,n+1)}var u=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/,c=/^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/,f={};function l(e){var t=u.exec(e),r=(t[1]||"")+(t[2]||""),n=t[3]||"",i=c.exec(n);return[r,i[1],i[2],i[3]]}function h(e){var t=u.exec(e),r=t[1]||"",n=!!r&&":"!==r[1];return{device:r,isUnc:n,isAbsolute:n||!!t[2],tail:t[3]}}function p(e){return"\\\\"+e.replace(/^[\\\/]+/,"").replace(/[\\\/]+/g,"\\")}f.resolve=function(){for(var e="",t="",r=!1,i=arguments.length-1;i>=-1;i--){var a;if(i>=0?a=arguments[i]:e?(a=n.env["="+e])&&a.substr(0,3).toLowerCase()===e.toLowerCase()+"\\"||(a=e+"\\"):a=n.cwd(),!o.isString(a))throw new TypeError("Arguments to path.resolve must be strings");if(a){var u=h(a),c=u.device,f=u.isUnc,l=u.isAbsolute,d=u.tail;if((!c||!e||c.toLowerCase()===e.toLowerCase())&&(e||(e=c),r||(t=d+"\\"+t,r=l),e&&r))break}}return f&&(e=p(e)),e+(r?"\\":"")+(t=s(t.split(/[\\\/]+/),!r).join("\\"))||"."},f.normalize=function(e){var t=h(e),r=t.device,n=t.isUnc,i=t.isAbsolute,o=t.tail,a=/[\\\/]$/.test(o);return(o=s(o.split(/[\\\/]+/),!i).join("\\"))||i||(o="."),o&&a&&(o+="\\"),n&&(r=p(r)),r+(i?"\\":"")+o},f.isAbsolute=function(e){return h(e).isAbsolute},f.join=function(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(!o.isString(r))throw new TypeError("Arguments to path.join must be strings");r&&e.push(r)}var n=e.join("\\");return/^[\\\/]{2}[^\\\/]/.test(e[0])||(n=n.replace(/^[\\\/]{2,}/,"\\")),f.normalize(n)},f.relative=function(e,t){e=f.resolve(e),t=f.resolve(t);for(var r=e.toLowerCase(),n=t.toLowerCase(),i=a(t.split("\\")),o=a(r.split("\\")),s=a(n.split("\\")),u=Math.min(o.length,s.length),c=u,l=0;l<u;l++)if(o[l]!==s[l]){c=l;break}if(0==c)return t;var h=[];for(l=c;l<o.length;l++)h.push("..");return(h=h.concat(i.slice(c))).join("\\")},f._makeLong=function(e){if(!o.isString(e))return e;if(!e)return"";var t=f.resolve(e);return/^[a-zA-Z]\:\\/.test(t)?"\\\\?\\"+t:/^\\\\[^?.]/.test(t)?"\\\\?\\UNC\\"+t.substring(2):e},f.dirname=function(e){var t=l(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},f.basename=function(e,t){var r=l(e)[2];return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},f.extname=function(e){return l(e)[3]},f.format=function(e){if(!o.isObject(e))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof e);var t=e.root||"";if(!o.isString(t))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof e.root);var r=e.dir,n=e.base||"";return r?r[r.length-1]===f.sep?r+n:r+f.sep+n:n},f.parse=function(e){if(!o.isString(e))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=l(e);if(!t||4!==t.length)throw new TypeError("Invalid path '"+e+"'");return{root:t[0],dir:t[0]+t[1].slice(0,-1),base:t[2],ext:t[3],name:t[2].slice(0,t[2].length-t[3].length)}},f.sep="\\",f.delimiter=";";var d=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,y={};function g(e){return d.exec(e).slice(1)}y.resolve=function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var i=r>=0?arguments[r]:n.cwd();if(!o.isString(i))throw new TypeError("Arguments to path.resolve must be strings");i&&(e=i+"/"+e,t="/"===i[0])}return(t?"/":"")+(e=s(e.split("/"),!t).join("/"))||"."},y.normalize=function(e){var t=y.isAbsolute(e),r=e&&"/"===e[e.length-1];return(e=s(e.split("/"),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},y.isAbsolute=function(e){return"/"===e.charAt(0)},y.join=function(){for(var e="",t=0;t<arguments.length;t++){var r=arguments[t];if(!o.isString(r))throw new TypeError("Arguments to path.join must be strings");r&&(e+=e?"/"+r:r)}return y.normalize(e)},y.relative=function(e,t){e=y.resolve(e).substr(1),t=y.resolve(t).substr(1);for(var r=a(e.split("/")),n=a(t.split("/")),i=Math.min(r.length,n.length),o=i,s=0;s<i;s++)if(r[s]!==n[s]){o=s;break}var u=[];for(s=o;s<r.length;s++)u.push("..");return(u=u.concat(n.slice(o))).join("/")},y._makeLong=function(e){return e},y.dirname=function(e){var t=g(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},y.basename=function(e,t){var r=g(e)[2];return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},y.extname=function(e){return g(e)[3]},y.format=function(e){if(!o.isObject(e))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof e);var t=e.root||"";if(!o.isString(t))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof e.root);return(e.dir?e.dir+y.sep:"")+(e.base||"")},y.parse=function(e){if(!o.isString(e))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof e);var t=g(e);if(!t||4!==t.length)throw new TypeError("Invalid path '"+e+"'");return t[1]=t[1]||"",t[2]=t[2]||"",t[3]=t[3]||"",{root:t[0],dir:t[0]+t[1].slice(0,-1),base:t[2],ext:t[3],name:t[2].slice(0,t[2].length-t[3].length)}},y.sep="/",y.delimiter=":",e.exports=i?f:y,e.exports.posix=y,e.exports.win32=f},76578(e){"use strict";e.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},65606(e){var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var a,u=[],c=!1,f=-1;function l(){c&&a&&(c=!1,a.length?u=a.concat(u):f=-1,u.length&&h())}function h(){if(!c){var e=s(l);c=!0;for(var t=u.length;t;){for(a=u,u=[];++f<t;)a&&a[f].run();f=-1,t=u.length}a=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function d(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new p(e,t)),1!==u.length||c||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=d,n.addListener=d,n.once=d,n.off=d,n.removeListener=d,n.removeAllListeners=d,n.emit=d,n.prependListener=d,n.prependOnceListener=d,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},99721(e,t,r){"use strict";var n=r(36556),i=r(14035),o=n("RegExp.prototype.exec"),s=r(69675);e.exports=function(e){if(!i(e))throw new s("`regex` must be a RegExp");return function(t){return null!==o(e,t)}}},96897(e,t,r){"use strict";var n=r(70453),i=r(30041),o=r(30592)(),s=r(75795),a=r(69675),u=n("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new a("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||u(t)!==t)throw new a("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,c=!0;if("length"in e&&s){var f=s(e,"length");f&&!f.configurable&&(n=!1),f&&!f.writable&&(c=!1)}return(n||c||!r)&&(o?i(e,"length",t,!0,!0):i(e,"length",t)),e}},88310(e,t,r){e.exports=i;var n=r(37007).EventEmitter;function i(){n.call(this)}r(56698)(i,n),i.Readable=r(46891),i.Writable=r(81999),i.Duplex=r(88101),i.Transform=r(59083),i.PassThrough=r(3681),i.finished=r(14257),i.pipeline=r(5267),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",a),r.on("close",u));var s=!1;function a(){s||(s=!0,e.end())}function u(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(f(),0===n.listenerCount(this,"error"))throw e}function f(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",f),r.removeListener("close",f),e.removeListener("close",f)}return r.on("error",c),e.on("error",c),r.on("end",f),r.on("close",f),e.on("close",f),e.emit("pipe",r),e}},12463(e){"use strict";var t={};function r(e,r,n){n||(n=Error);var i=function(e){var t,n;function i(t,n,i){return e.call(this,function(e,t,n){return"string"==typeof r?r:r(e,t,n)}(t,n,i))||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=e,t[e]=i}function n(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(e){return String(e)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}r("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(e,t,r){var i,o,s,a,u;if("string"==typeof t&&(o="not ",t.substr(0,4)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-9,r)===t}(e," argument"))s="The ".concat(e," ").concat(i," ").concat(n(t,"type"));else{var c=("number"!=typeof u&&(u=0),u+1>(a=e).length||-1===a.indexOf(".",u)?"argument":"property");s='The "'.concat(e,'" ').concat(c," ").concat(i," ").concat(n(t,"type"))}return s+". Received type ".concat(typeof r)},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.F=t},88101(e,t,r){"use strict";var n=r(65606),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=f;var o=r(46891),s=r(81999);r(56698)(f,o);for(var a=i(s.prototype),u=0;u<a.length;u++){var c=a[u];f.prototype[c]||(f.prototype[c]=s.prototype[c])}function f(e){if(!(this instanceof f))return new f(e);o.call(this,e),s.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||n.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},3681(e,t,r){"use strict";e.exports=i;var n=r(59083);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(56698)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},46891(e,t,r){"use strict";var n,i=r(65606);e.exports=A,A.ReadableState=S,r(37007).EventEmitter;var o,s=function(e,t){return e.listeners(t).length},a=r(41396),u=r(48287).Buffer,c=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},f=r(77199);o=f&&f.debuglog?f.debuglog("stream"):function(){};var l,h,p,d=r(81766),y=r(54347),g=r(66644).getHighWaterMark,m=r(12463).F,v=m.ERR_INVALID_ARG_TYPE,b=m.ERR_STREAM_PUSH_AFTER_EOF,w=m.ERR_METHOD_NOT_IMPLEMENTED,_=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(56698)(A,a);var E=y.errorOrDestroy,x=["error","close","destroy","pause","resume"];function S(e,t,i){n=n||r(88101),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,"readableHighWaterMark",i),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(l||(l=r(83141).I),this.decoder=new l(e.encoding),this.encoding=e.encoding)}function A(e){if(n=n||r(88101),!(this instanceof A))return new A(e);var t=this instanceof n;this._readableState=new S(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function B(e,t,r,n,i){o("readableAddChunk",t);var s,a=e._readableState;if(null===t)a.reading=!1,function(e,t){if(o("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?I(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,N(e)))}}(e,a);else if(i||(s=function(e,t){var r,n;return n=t,u.isBuffer(n)||n instanceof c||"string"==typeof t||void 0===t||e.objectMode||(r=new v("chunk",["string","Buffer","Uint8Array"],t)),r}(a,t)),s)E(e,s);else if(a.objectMode||t&&t.length>0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n)a.endEmitted?E(e,new _):O(e,a,t,!0);else if(a.ended)E(e,new b);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?O(e,a,t,!1):F(e,a)):O(e,a,t,!1)}else n||(a.reading=!1,F(e,a));return!a.ended&&(a.length<a.highWaterMark||0===a.length)}function O(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&I(e)),F(e,t)}Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),A.prototype.destroy=y.destroy,A.prototype._undestroy=y.undestroy,A.prototype._destroy=function(e,t){t(e)},A.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=u.from(e,t),t=""),r=!0),B(this,e,t,!1,r)},A.prototype.unshift=function(e){return B(this,e,null,!0,!1)},A.prototype.isPaused=function(){return!1===this._readableState.flowing},A.prototype.setEncoding=function(e){l||(l=r(83141).I);var t=new l(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var k=1073741824;function T(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=k?e=k:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function I(e){var t=e._readableState;o("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(o("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(N,e))}function N(e){var t=e._readableState;o("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,P(e)}function F(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(R,e,t))}function R(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(o("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function j(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function L(e){o("readable nexttick read 0"),e.read(0)}function U(e,t){o("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),P(e),t.flowing&&!t.reading&&e.read(0)}function P(e){var t=e._readableState;for(o("flow",t.flowing);t.flowing&&null!==e.read(););}function C(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function M(e){var t=e._readableState;o("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(D,t,e))}function D(e,t){if(o("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function $(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}A.prototype.read=function(e){o("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return o("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?M(this):I(this),null;if(0===(e=T(e,t))&&t.ended)return 0===t.length&&M(this),null;var n,i=t.needReadable;return o("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&o("length less than watermark",i=!0),t.ended||t.reading?o("reading or ended",i=!1):i&&(o("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=T(r,t))),null===(n=e>0?C(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&M(this)),null!==n&&this.emit("data",n),n},A.prototype._read=function(e){E(this,new w("_read()"))},A.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,o("pipe count=%d opts=%j",n.pipesCount,t);var a=t&&!1===t.end||e===i.stdout||e===i.stderr?y:u;function u(){o("onend"),e.end()}n.endEmitted?i.nextTick(a):r.once("end",a),e.on("unpipe",function t(i,s){o("onunpipe"),i===r&&s&&!1===s.hasUnpiped&&(s.hasUnpiped=!0,o("cleanup"),e.removeListener("close",p),e.removeListener("finish",d),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",t),r.removeListener("end",u),r.removeListener("end",y),r.removeListener("data",l),f=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||c())});var c=function(e){return function(){var t=e._readableState;o("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,P(e))}}(r);e.on("drain",c);var f=!1;function l(t){o("ondata");var i=e.write(t);o("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==$(n.pipes,e))&&!f&&(o("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(t){o("onerror",t),y(),e.removeListener("error",h),0===s(e,"error")&&E(e,t)}function p(){e.removeListener("finish",d),y()}function d(){o("onfinish"),e.removeListener("close",p),y()}function y(){o("unpipe"),r.unpipe(e)}return r.on("data",l),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",p),e.once("finish",d),e.emit("pipe",r),n.flowing||(o("pipe resume"),r.resume()),e},A.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=$(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},A.prototype.on=function(e,t){var r=a.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,o("on readable",n.length,n.reading),n.length?I(this):n.reading||i.nextTick(L,this))),r},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(j,this),r},A.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(j,this),t},A.prototype.resume=function(){var e=this._readableState;return e.flowing||(o("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(U,e,t))}(this,e)),e.paused=!1,this},A.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},A.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",function(){if(o("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){o("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<x.length;s++)e.on(x[s],this.emit.bind(this,x[s]));return this._read=function(t){o("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(A.prototype[Symbol.asyncIterator]=function(){return void 0===h&&(h=r(65034)),h(this)}),Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(A.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(A.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),A._fromList=C,Object.defineProperty(A.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(A.from=function(e,t){return void 0===p&&(p=r(90968)),p(A,e,t)})},59083(e,t,r){"use strict";e.exports=f;var n=r(12463).F,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(88101);function c(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function f(e){if(!(this instanceof f))return new f(e);u.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",l)}function l(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush(function(t,r){h(e,t,r)})}function h(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new a;if(e._transformState.transforming)throw new s;return e.push(null)}r(56698)(f,u),f.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},f.prototype._transform=function(e,t,r){r(new i("_transform()"))},f.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},f.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},f.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,function(e){t(e)})}},81999(e,t,r){"use strict";var n,i=r(65606);function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t){var r=e.entry;for(e.entry=null;r;){var n=r.callback;t.pendingcb--,n(void 0),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=A,A.WritableState=S;var s,a={deprecate:r(94643)},u=r(41396),c=r(48287).Buffer,f=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},l=r(54347),h=r(66644).getHighWaterMark,p=r(12463).F,d=p.ERR_INVALID_ARG_TYPE,y=p.ERR_METHOD_NOT_IMPLEMENTED,g=p.ERR_MULTIPLE_CALLBACK,m=p.ERR_STREAM_CANNOT_PIPE,v=p.ERR_STREAM_DESTROYED,b=p.ERR_STREAM_NULL_VALUES,w=p.ERR_STREAM_WRITE_AFTER_END,_=p.ERR_UNKNOWN_ENCODING,E=l.errorOrDestroy;function x(){}function S(e,t,s){n=n||r(88101),e=e||{},"boolean"!=typeof s&&(s=t instanceof n),this.objectMode=!!e.objectMode,s&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=h(this,e,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if("function"!=typeof o)throw new g;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,o){--t.pendingcb,r?(i.nextTick(o,n),i.nextTick(N,e,t),e._writableState.errorEmitted=!0,E(e,n)):(o(n),e._writableState.errorEmitted=!0,E(e,n),N(e,t))}(e,r,n,t,o);else{var s=T(r)||e.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||k(e,r),n?i.nextTick(O,e,r,s,o):O(e,r,s,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function A(e){var t=this instanceof(n=n||r(88101));if(!t&&!s.call(A,this))return new A(e);this._writableState=new S(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),u.call(this)}function B(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new v("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function O(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),N(e,t)}function k(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),s=t.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,B(e,t,!0,t.length,i,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,f=r.encoding,l=r.callback;if(B(e,t,!1,t.objectMode?1:c.length,c,f,l),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function T(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function I(e,t){e._final(function(r){t.pendingcb--,r&&E(e,r),t.prefinished=!0,e.emit("prefinish"),N(e,t)})}function N(e,t){var r=T(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,i.nextTick(I,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(56698)(A,u),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(S.prototype,"buffer",{get:a.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(e){return!!s.call(this,e)||this===A&&e&&e._writableState instanceof S}})):s=function(e){return e instanceof this},A.prototype.pipe=function(){E(this,new m)},A.prototype.write=function(e,t,r){var n,o=this._writableState,s=!1,a=!o.objectMode&&(n=e,c.isBuffer(n)||n instanceof f);return a&&!c.isBuffer(e)&&(e=function(e){return c.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=x),o.ending?function(e,t){var r=new w;E(e,r),i.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var o;return null===r?o=new b:"string"==typeof r||t.objectMode||(o=new d("chunk",["string","Buffer"],r)),!o||(E(e,o),i.nextTick(n,o),!1)}(this,o,e,r))&&(o.pendingcb++,s=function(e,t,r,n,i,o){if(!r){var s=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=c.from(t,r)),t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var f=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},f?f.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else B(e,t,!1,a,n,i,o);return u}(this,o,a,e,t,r)),s},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||k(this,e))},A.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(e,t,r){r(new y("_write()"))},A.prototype._writev=null,A.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,N(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),A.prototype.destroy=l.destroy,A.prototype._undestroy=l.undestroy,A.prototype._destroy=function(e,t){t(e)}},65034(e,t,r){"use strict";var n,i=r(65606);function o(e,t,r){return(t=function(e){var t=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=r(14257),a=Symbol("lastResolve"),u=Symbol("lastReject"),c=Symbol("error"),f=Symbol("ended"),l=Symbol("lastPromise"),h=Symbol("handlePromise"),p=Symbol("stream");function d(e,t){return{value:e,done:t}}function y(e){var t=e[a];if(null!==t){var r=e[p].read();null!==r&&(e[l]=null,e[a]=null,e[u]=null,t(d(r,!1)))}}function g(e){i.nextTick(y,e)}var m=Object.getPrototypeOf(function(){}),v=Object.setPrototypeOf((o(n={get stream(){return this[p]},next:function(){var e=this,t=this[c];if(null!==t)return Promise.reject(t);if(this[f])return Promise.resolve(d(void 0,!0));if(this[p].destroyed)return new Promise(function(t,r){i.nextTick(function(){e[c]?r(e[c]):t(d(void 0,!0))})});var r,n=this[l];if(n)r=new Promise(function(e,t){return function(r,n){e.then(function(){t[f]?r(d(void 0,!0)):t[h](r,n)},n)}}(n,this));else{var o=this[p].read();if(null!==o)return Promise.resolve(d(o,!1));r=new Promise(this[h])}return this[l]=r,r}},Symbol.asyncIterator,function(){return this}),o(n,"return",function(){var e=this;return new Promise(function(t,r){e[p].destroy(null,function(e){e?r(e):t(d(void 0,!0))})})}),n),m);e.exports=function(e){var t,r=Object.create(v,(o(t={},p,{value:e,writable:!0}),o(t,a,{value:null,writable:!0}),o(t,u,{value:null,writable:!0}),o(t,c,{value:null,writable:!0}),o(t,f,{value:e._readableState.endEmitted,writable:!0}),o(t,h,{value:function(e,t){var n=r[p].read();n?(r[l]=null,r[a]=null,r[u]=null,e(d(n,!1))):(r[a]=e,r[u]=t)},writable:!0}),t));return r[l]=null,s(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[u];return null!==t&&(r[l]=null,r[a]=null,r[u]=null,t(e)),void(r[c]=e)}var n=r[a];null!==n&&(r[l]=null,r[a]=null,r[u]=null,n(d(void 0,!0))),r[f]=!0}),e.on("readable",g.bind(null,r)),r}},81766(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){o(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function o(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var t=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}var u=r(48287).Buffer,c=r(63779).inspect,f=c&&c.custom||"inspect";function l(e,t,r){u.prototype.copy.call(e,t,r)}e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r;return t=e,(r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return u.alloc(0);for(var t=u.allocUnsafe(e>>>0),r=this.head,n=0;r;)l(r.data,t,n),n+=r.data.length,r=r.next;return t}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0===(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=u.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0===(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:f,value:function(e,t){return c(this,i(i({},t),{},{depth:0,customInspect:!1}))}}])&&s(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},54347(e,t,r){"use strict";var n=r(65606);function i(e,t){s(e,t),o(e)}function o(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function s(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(s,this,e)):n.nextTick(s,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?r._writableState?r._writableState.errorEmitted?n.nextTick(o,r):(r._writableState.errorEmitted=!0,n.nextTick(i,r,e)):n.nextTick(i,r,e):t?(n.nextTick(o,r),t(e)):n.nextTick(o,r)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},14257(e,t,r){"use strict";var n=r(12463).F.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&t.readable,a=r.writable||!1!==r.writable&&t.writable,u=function(){t.writable||f()},c=t._writableState&&t._writableState.finished,f=function(){a=!1,c=!0,s||o.call(t)},l=t._readableState&&t._readableState.endEmitted,h=function(){s=!1,l=!0,a||o.call(t)},p=function(e){o.call(t,e)},d=function(){var e;return s&&!l?(t._readableState&&t._readableState.ended||(e=new n),o.call(t,e)):a&&!c?(t._writableState&&t._writableState.ended||(e=new n),o.call(t,e)):void 0},y=function(){t.req.on("finish",f)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",f),t.on("abort",d),t.req?y():t.on("request",y)):a&&!t._writableState&&(t.on("end",u),t.on("close",u)),t.on("end",h),t.on("finish",f),!1!==r.error&&t.on("error",p),t.on("close",d),function(){t.removeListener("complete",f),t.removeListener("abort",d),t.removeListener("request",y),t.req&&t.req.removeListener("finish",f),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",f),t.removeListener("end",h),t.removeListener("error",p),t.removeListener("close",d)}}},90968(e){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},5267(e,t,r){"use strict";var n,i=r(12463).F,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function u(e){e()}function c(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var f,l=function(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o("streams");var h=t.map(function(e,i){var o=i<t.length-1;return function(e,t,i,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var a=!1;e.on("close",function(){a=!0}),void 0===n&&(n=r(14257)),n(e,{readable:t,writable:i},function(e){if(e)return o(e);a=!0,o()});var u=!1;return function(t){if(!a&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void o(t||new s("pipe"))}}(e,o,i>0,function(e){f||(f=e),e&&h.forEach(u),o||(h.forEach(u),l(f))})});return t.reduce(c)}},66644(e,t,r){"use strict";var n=r(12463).F.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},41396(e,t,r){e.exports=r(37007).EventEmitter},83141(e,t,r){"use strict";var n=r(15003).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=f,this.end=l,t=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"<22>";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"<22>";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"<22>"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function f(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function l(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function p(e){return e&&e.length?this.write(e):""}t.I=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"<22>":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=s(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=s(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=s(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},15003(e,t,r){var n=r(48287),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=s),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},90031(e,t){!function(e){var t,r,n,i=String.fromCharCode;function o(e){for(var t,r,n=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(r=e.charCodeAt(i++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--):n.push(t);return n}function s(e){if(e>=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}function a(e,t){return i(e>>t&63|128)}function u(e){if(!(4294967168&e))return i(e);var t="";return 4294965248&e?4294901760&e?4292870144&e||(t=i(e>>18&7|240),t+=a(e,12),t+=a(e,6)):(s(e),t=i(e>>12&15|224),t+=a(e,6)):t=i(e>>6&31|192),t+i(63&e|128)}function c(){if(n>=r)throw Error("Invalid byte index");var e=255&t[n];if(n++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function f(){var e,i;if(n>r)throw Error("Invalid byte index");if(n==r)return!1;if(e=255&t[n],n++,!(128&e))return e;if(192==(224&e)){if((i=(31&e)<<6|c())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&e)){if((i=(15&e)<<12|c()<<6|c())>=2048)return s(i),i;throw Error("Invalid continuation byte")}if(240==(248&e)&&(i=(7&e)<<18|c()<<12|c()<<6|c())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}e.version="3.0.0",e.encode=function(e){for(var t=o(e),r=t.length,n=-1,i="";++n<r;)i+=u(t[n]);return i},e.decode=function(e){t=o(e),r=t.length,n=0;for(var s,a=[];!1!==(s=f());)a.push(s);return function(e){for(var t,r=e.length,n=-1,o="";++n<r;)(t=e[n])>65535&&(o+=i((t-=65536)>>>10&1023|55296),t=56320|1023&t),o+=i(t);return o}(a)}}(t)},94643(e,t,r){function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},36622(e){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},81135(e){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},40537(e,t,r){var n=r(65606),i=/%[sdj%]/g;t.format=function(e){if(!m(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(a(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,o=n.length,s=String(e).replace(i,function(e){if("%%"===e)return"%";if(r>=o)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),u=n[r];r<o;u=n[++r])y(u)||!w(u)?s+=" "+u:s+=" "+a(u);return s},t.deprecate=function(e,i){if(v(r.g.process))return function(){return t.deprecate(e,i).apply(this,arguments)};if(!0===n.noDeprecation)return e;var o=!1;return function(){if(!o){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),o=!0}return e.apply(this,arguments)}};var o,s={};function a(e,r){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&t._extend(n,r),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),f(n,e,n.depth)}function u(e,t){var r=a.styles[t];return r?"["+a.colors[r][0]+"m"+e+"["+a.colors[r][1]+"m":e}function c(e,t){return e}function f(e,r,n){if(e.customInspect&&r&&x(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return m(i)||(i=f(e,i,n)),i}var o=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(m(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return g(t)?e.stylize(""+t,"number"):d(t)?e.stylize(""+t,"boolean"):y(t)?e.stylize("null","null"):void 0}(e,r);if(o)return o;var s=Object.keys(r),a=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),E(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(r);if(0===s.length){if(x(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(b(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(_(r))return e.stylize(Date.prototype.toString.call(r),"date");if(E(r))return l(r)}var c,w="",S=!1,A=["{","}"];return p(r)&&(S=!0,A=["[","]"]),x(r)&&(w=" [Function"+(r.name?": "+r.name:"")+"]"),b(r)&&(w=" "+RegExp.prototype.toString.call(r)),_(r)&&(w=" "+Date.prototype.toUTCString.call(r)),E(r)&&(w=" "+l(r)),0!==s.length||S&&0!=r.length?n<0?b(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),c=S?function(e,t,r,n,i){for(var o=[],s=0,a=t.length;s<a;++s)O(t,String(s))?o.push(h(e,t,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(h(e,t,r,n,i,!0))}),o}(e,r,n,a,s):s.map(function(t){return h(e,r,n,a,t,S)}),e.seen.pop(),function(e,t,r){return e.reduce(function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(c,w,A)):A[0]+w+A[1]}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,n,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?a=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),O(n,i)||(s="["+i+"]"),a||(e.seen.indexOf(u.value)<0?(a=y(r)?f(e,u.value,null):f(e,u.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+a.split("\n").map(function(e){return" "+e}).join("\n")):a=e.stylize("[Circular]","special")),v(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function p(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function y(e){return null===e}function g(e){return"number"==typeof e}function m(e){return"string"==typeof e}function v(e){return void 0===e}function b(e){return w(e)&&"[object RegExp]"===S(e)}function w(e){return"object"==typeof e&&null!==e}function _(e){return w(e)&&"[object Date]"===S(e)}function E(e){return w(e)&&("[object Error]"===S(e)||e instanceof Error)}function x(e){return"function"==typeof e}function S(e){return Object.prototype.toString.call(e)}function A(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(v(o)&&(o=n.env.NODE_DEBUG||""),e=e.toUpperCase(),!s[e])if(new RegExp("\\b"+e+"\\b","i").test(o)){var r=n.pid;s[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else s[e]=function(){};return s[e]},t.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"},t.isArray=p,t.isBoolean=d,t.isNull=y,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=m,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=v,t.isRegExp=b,t.isObject=w,t.isDate=_,t.isError=E,t.isFunction=x,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(81135);var B=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(r=[A((e=new Date).getHours()),A(e.getMinutes()),A(e.getSeconds())].join(":"),[e.getDate(),B[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(36622),t._extend=function(e,t){if(!t||!w(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}},25767(e,t,r){"use strict";var n=r(60301),i=r(39209),o=r(10487),s=r(36556),a=r(75795),u=s("Object.prototype.toString"),c=r(49092)(),f="undefined"==typeof globalThis?r.g:globalThis,l=i(),h=s("String.prototype.slice"),p=Object.getPrototypeOf,d=s("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return-1},y={__proto__:null};n(l,c&&a&&p?function(e){var t=new f[e];if(Symbol.toStringTag in t){var r=p(t),n=a(r,Symbol.toStringTag);if(!n){var i=p(r);n=a(i,Symbol.toStringTag)}y["$"+e]=o(n.get)}}:function(e){var t=new f[e],r=t.slice||t.set;r&&(y["$"+e]=o(r))}),e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!c){var t=h(u(e),8,-1);return d(l,t)>-1?t:"Object"===t&&function(e){var t=!1;return n(y,function(r,n){if(!t)try{r(e),t=h(n,1)}catch(e){}}),t}(e)}return a?function(e){var t=!1;return n(y,function(r,n){if(!t)try{"$"+r(e)===n&&(t=h(n,1))}catch(e){}}),t}(e):null}},63779(){},77199(){},25172(e){e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},16993(e,t,r){var n=r(75546);function i(){var t,r,o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.toStringTag||"@@toStringTag";function u(e,i,o,s){var a=i&&i.prototype instanceof f?i:f,u=Object.create(a.prototype);return n(u,"_invoke",function(e,n,i){var o,s,a,u=0,f=i||[],l=!1,h={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,r){return o=e,s=0,a=t,h.n=r,c}};function p(e,n){for(s=e,a=n,r=0;!l&&u&&!i&&r<f.length;r++){var i,o=f[r],p=h.p,d=o[2];e>3?(i=d===n)&&(a=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=p&&((i=e<2&&p<o[1])?(s=0,h.v=n,h.n=o[1]):p<d&&(i=e<3||o[0]>n||n>d)&&(o[4]=e,o[5]=n,h.n=d,s=0))}if(i||e>1)return c;throw l=!0,n}return function(i,f,d){if(u>1)throw TypeError("Generator is already running");for(l&&1===f&&p(f,d),s=f,a=d;(r=s<2?t:a)||!l;){o||(s?s<3?(s>1&&(h.n=-1),p(s,a)):h.n=a:h.v=a);try{if(u=2,o){if(s||(i="next"),r=o[i]){if(!(r=r.call(o,a)))throw TypeError("iterator result is not an object");if(!r.done)return r;a=r.value,s<2&&(s=0)}else 1===s&&(r=o.return)&&r.call(o),s<2&&(a=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((r=(l=h.n<0)?a:e.call(n,h))!==c)break}catch(e){o=t,s=1,a=e}finally{u=1}}return{value:r,done:l}}}(e,o,s),!0),u}var c={};function f(){}function l(){}function h(){}r=Object.getPrototypeOf;var p=[][s]?r(r([][s]())):(n(r={},s,function(){return this}),r),d=h.prototype=f.prototype=Object.create(p);function y(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,n(e,a,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=h,n(d,"constructor",h),n(h,"constructor",l),l.displayName="GeneratorFunction",n(h,a,"GeneratorFunction"),n(d),n(d,a,"Generator"),n(d,s,function(){return this}),n(d,"toString",function(){return"[object Generator]"}),(e.exports=i=function(){return{w:u,m:y}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},55869(e,t,r){var n=r(887);e.exports=function(e,t,r,i,o){var s=n(e,t,r,i,o);return s.next().then(function(e){return e.done?e.value:s.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},887(e,t,r){var n=r(16993),i=r(11791);e.exports=function(e,t,r,o,s){return new i(n().w(e,t,r,o),s||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},11791(e,t,r){var n=r(25172),i=r(75546);e.exports=function e(t,r){function o(e,i,s,a){try{var u=t[e](i),c=u.value;return c instanceof n?r.resolve(c.v).then(function(e){o("next",e,s,a)},function(e){o("throw",e,s,a)}):r.resolve(c).then(function(e){u.value=e,s(u)},function(e){return o("throw",e,s,a)})}catch(e){a(e)}}var s;this.next||(i(e.prototype),i(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),i(this,"_invoke",function(e,t,n){function i(){return new r(function(t,r){o(e,n,t,r)})}return s=s?s.then(i,i):i()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},75546(e){function t(r,n,i,o){var s=Object.defineProperty;try{s({},"",{})}catch(r){s=0}e.exports=t=function(e,r,n,i){function o(r,n){t(e,r,function(e){return this._invoke(r,n,e)})}r?s?s(e,r,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[r]=n:(o("next",0),o("throw",1),o("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n,i,o)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4373(e){e.exports=function(e){var t=Object(e),r=[];for(var n in t)r.unshift(n);return function e(){for(;r.length;)if((n=r.pop())in t)return e.value=n,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},4633(e,t,r){var n=r(25172),i=r(16993),o=r(55869),s=r(887),a=r(11791),u=r(4373),c=r(30579);function f(){"use strict";var t=i(),r=t.m(f),l=(Object.getPrototypeOf?Object.getPrototypeOf(r):r.__proto__).constructor;function h(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===l||"GeneratorFunction"===(t.displayName||t.name))}var p={throw:1,return:2,break:3,continue:3};function d(e){var t,r;return function(n){t||(t={stop:function(){return r(n.a,2)},catch:function(){return n.v},abrupt:function(e,t){return r(n.a,p[e],t)},delegateYield:function(e,i,o){return t.resultName=i,r(n.d,c(e),o)},finish:function(e){return r(n.f,e)}},r=function(e,r,i){n.p=t.prev,n.n=t.next;try{return e(r,i)}finally{t.next=n.n}}),t.resultName&&(t[t.resultName]=n.v,t.resultName=void 0),t.sent=n.v,t.next=n.n;try{return e.call(this,t)}finally{n.p=t.prev,n.n=t.next}}}return(e.exports=f=function(){return{wrap:function(e,r,n,i){return t.w(d(e),r,n,i&&i.reverse())},isGeneratorFunction:h,mark:t.m,awrap:function(e,t){return new n(e,t)},AsyncIterator:a,async:function(e,t,r,n,i){return(h(t)?s:o)(d(e),t,r,n,i)},keys:u,values:c}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=f,e.exports.__esModule=!0,e.exports.default=e.exports},30579(e,t,r){var n=r(73738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(n(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},73738(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},54756(e,t,r){var n=r(4633)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},39209(e,t,r){"use strict";var n=r(76578),i="undefined"==typeof globalThis?r.g:globalThis;e.exports=function(){for(var e=[],t=0;t<n.length;t++)"function"==typeof i[n[t]]&&(e[e.length]=n[t]);return e}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e){var r=function(e){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t(r)?r:r+""}function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,n(i.key),i)}}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,r){if(r&&("object"==t(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}function f(e,t,r,n,i,o,s){try{var a=e[o](s),u=a.value}catch(e){return void r(e)}a.done?t(u):Promise.resolve(u).then(n,i)}function l(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function s(e){f(o,n,i,s,a,"next",e)}function a(e){f(o,n,i,s,a,"throw",e)}s(void 0)})}}var h=r(54756),p=r.n(h);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function y(e,t){if(e){if("string"==typeof e)return d(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}function g(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||y(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var m=r(73065),v=r.n(m),b=r(90031),w=r.n(b);function _(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_=function(){return!!e})()}function E(e){var t="function"==typeof Map?new Map:void 0;return E=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(_())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&u(i,r.prototype),i}(e,arguments,a(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),u(r,e)},E(e)}function x(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(x=function(){return!!e})()}const S=function(t){function r(){var t,n,i,o;e(this,r);for(var u=arguments.length,c=new Array(u),f=0;f<u;f++)c[f]=arguments[f];return n=this,i=r,o=[].concat(c),i=a(i),(t=s(n,x()?Reflect.construct(i,o||[],a(n).constructor):i.apply(n,o))).type="OperationError",Error.captureStackTrace&&Error.captureStackTrace(t,r),t}return c(r,t),o(r)}(E(Error));function A(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"A-Za-z0-9+/=";if(!e)return"";if("string"==typeof e&&(e=U.strToArrayBuffer(e)),e instanceof ArrayBuffer&&(e=new Uint8Array(e)),64!==(t=U.expandAlphRange(t).join("")).length&&65!==t.length)throw new S(`Invalid Base64 alphabet length (${t.length}): ${t}`);for(var r,n,i,o,s,a,u,c="",f=0;f<e.length;)o=(r=e[f++])>>2,s=(3&r)<<4|(n=e[f++])>>4,a=(15&n)<<2|(i=e[f++])>>6,u=63&i,isNaN(n)?a=u=64:isNaN(i)&&(u=64),c+=t.charAt(o)+t.charAt(s)+t.charAt(a)+t.charAt(u);return c}function B(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"A-Za-z0-9+/=",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"string",n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(!e)return"string"===r?"":[];if(t=t||"A-Za-z0-9+/=",64!==(t=U.expandAlphRange(t).join("")).length&&65!==t.length)throw new S(`Error: Base64 alphabet should be 64 characters long, or 65 with a padding character. Found ${t.length}: ${t}`);if(n){var o=new RegExp("[^"+t.replace(/[[\]\\\-^$]/g,"\\$&")+"]","g");e=e.replace(o,"")}if(i){if(e.length%4==1)throw new S(`Error: Invalid Base64 input length (${e.length}). Cannot be 4n+1, even without padding chars.`);if(65===t.length){var s=t.charAt(64),a=e.indexOf(s);if(a>=0){if(a<e.length-2||e.charAt(e.length-1)!==s)throw new S(`Error: Base64 padding character (${s}) not used in the correct place.`);if(e.length%4!=0)throw new S("Error: Base64 not padded to a multiple of 4.")}}}for(var u,c,f,l,h,p,d,y=[],g=0;g<e.length;){if(l=t.indexOf(e.charAt(g++)||null),h=t.indexOf(e.charAt(g++)||null),p=t.indexOf(e.charAt(g++)||null),d=t.indexOf(e.charAt(g++)||null),i&&(l<0||h<0||p<0||d<0))throw new S("Error: Base64 input contains non-alphabet char(s)");c=(15&h)<<4|p>>2,f=(3&p)<<6|d,(u=l<<2|h>>4)>=0&&u<256&&y.push(u),c>=0&&c<256&&64!==p&&y.push(c),f>=0&&f<256&&64!==d&&y.push(f)}return"string"===r?U.byteArrayToUtf8(y):y}function O(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Auto",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;if(r<1||Math.round(r)!==r)throw new S("Byte length must be a positive integer");if("None"!==t){var n="Auto"===t?/[^a-f\d]|0x/gi:U.regexRep(t);e=e.split(n)}else e=[e];for(var i=[],o=0;o<e.length;o++)for(var s=0;s<e[o].length;s+=r)i.push(parseInt(e[o].substr(s,r),16));return i}function k(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Auto";t=U.charRep(t);var r=[],n=e.split(t);""===n[n.length-1]&&(n=n.slice(0,n.length-1));for(var i=0;i<n.length;i++)r[i]=parseInt(n[i],10);return r}function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Space",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8;if(r<1||Math.round(r)!==r)throw new S("Byte length must be a positive integer");var n=U.regexRep(t);e=e.replace(n,"");for(var i=[],o=0;o<e.length;o+=r)i.push(parseInt(e.substr(o,r),2));return i}["Auto"].concat(["Space","Percent","Comma","Semi-colon","Colon","Line feed","CRLF","0x","0x with comma","\\x","None"]);var I=r(48287).Buffer,N=r(65606),F=function(){function t(){e(this,t)}return o(t,null,[{key:"chr",value:function(e){if(e>65535){e-=65536;var t=String.fromCharCode(e>>>10&1023|55296);return e=56320|1023&e,t+String.fromCharCode(e)}return String.fromCharCode(e)}},{key:"ord",value:function(e){if(2===e.length){var t=e.charCodeAt(0),r=e.charCodeAt(1);if(t>=55296&&t<56320&&r>=56320&&r<57344)return 1024*(t-55296)+r-56320+65536}return e.charCodeAt(0)}},{key:"padBytesRight",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=new Array(t);return n.fill(r),g(e).forEach(function(e,t){n[t]=e}),n}},{key:"truncate",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";return e.length>t&&(e=e.slice(0,t-r.length)+r),e}},{key:"hex",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return(e="string"==typeof e?t.ord(e):e).toString(16).padStart(r,"0")}},{key:"bin",value:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;return(e="string"==typeof e?t.ord(e):e).toString(2).padStart(r,"0")}},{key:"printable",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?e.replace(/[^\x20-\x7e]/g,"."):(e=e.replace(/[\0-\x08\x0B-\x0C\x0E-\x1F\x7F-\x9F\xAD\u0378\u0379\u037F-\u0383\u038B\u038D\u03A2\u0528-\u0530\u0557\u0558\u0560\u0588\u058B-\u058E\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08A1\u08AD-\u08E3\u08FF\u0978\u0980\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0C00\u0C04\u0C0D\u0C11\u0C29\u0C34\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5A-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C80\u0C81\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0D01\u0D04\u0D0D\u0D11\u0D3B\u0D3C\u0D45\u0D49\u0D4F-\u0D56\u0D58-\u0D5F\u0D64\u0D65\u0D76-\u0D78\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F5-\u13FF\u169D-\u169F\u16F1-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191D-\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C80-\u1CBF\u1CC8-\u1CCF\u1CF7-\u1CFF\u1DE7-\u1DFB\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u209F\u20BB-\u20CF\u20F1-\u20FF\u218A-\u218F\u23F4-\u23FF\u2427-\u243F\u244B-\u245F\u2700\u2B4D-\u2B4F\u2B5A-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E3C-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FCD-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA698-\uA69E\uA6F8-\uA6FF\uA78F\uA794-\uA79F\uA7AB-\uA7F7\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C5-\uA8CD\uA8DA-\uA8DF\uA8FC-\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9E0-\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAA7C-\uAA7F\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F-\uABBF\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE27-\uFE2F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD-\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]/g,"."),t||(e=e.replace(/[\x09-\x10\u2028\u2029]/g,".")),e)}},{key:"escapeWhitespace",value:function(e){return e.replace(/[\x09-\x10]/g,function(e){return String.fromCharCode(57344+e.charCodeAt(0))})}},{key:"parseEscapedChars",value:function(e){return e.replace(/\\([abfnrtv'"]|[0-3][0-7]{2}|[0-7]{1,2}|x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]{1,6}\}|\\)/g,function(e,t){switch(t[0]){case"\\":return"\\";case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":return String.fromCharCode(parseInt(t,8));case"a":return String.fromCharCode(7);case"b":return"\b";case"t":return"\t";case"n":return"\n";case"v":return"\v";case"f":return"\f";case"r":return"\r";case'"':return'"';case"'":return"'";case"x":return String.fromCharCode(parseInt(t.substr(1),16));case"u":return"{"===t[1]?String.fromCodePoint(parseInt(t.slice(2,-1),16)):String.fromCharCode(parseInt(t.substr(1),16))}})}},{key:"escapeRegex",value:function(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}},{key:"expandAlphRange",value:function(e){for(var r=[],n=0;n<e.length;n++)if(n<e.length-2&&"-"===e[n+1]&&"\\"!==e[n]){for(var i=t.ord(e[n]),o=t.ord(e[n+2]),s=i;s<=o;s++)r.push(t.chr(s));n+=2}else n<e.length-2&&"\\"===e[n]&&"-"===e[n+1]?(r.push("-"),n++):r.push(e[n]);return r}},{key:"convertToByteArray",value:function(e,r){switch(r.toLowerCase()){case"binary":return T(e);case"hex":return O(e);case"decimal":return k(e);case"base64":return B(e,null,"byteArray");case"utf8":return t.strToUtf8ByteArray(e);default:return t.strToByteArray(e)}}},{key:"convertToByteString",value:function(e,r){switch(r.toLowerCase()){case"binary":return t.byteArrayToChars(T(e));case"hex":return t.byteArrayToChars(O(e));case"decimal":return t.byteArrayToChars(k(e));case"base64":return t.byteArrayToChars(B(e,null,"byteArray"));case"utf8":return w().encode(e);default:return e}}},{key:"byteArrayToInt",value:function(e,t){var r=0;if("big"===t)for(var n=0;n<e.length;n++)r=256*r+e[n];else for(var i=e.length-1;i>=0;i--)r=256*r+e[i];return r}},{key:"intToByteArray",value:function(e,t,r){var n=new Array(t);if("little"===r)for(var i=0;i<t;i++)n[i]=255&e,e>>>=8;else for(var o=t-1;o>=0;o--)n[o]=255&e,e>>>=8;return n}},{key:"strToArrayBuffer",value:function(e){if(v().debug(`Converting string[${null==e?void 0:e.length}] to array buffer`),!e)return new ArrayBuffer;for(var r,n=new Uint8Array(e.length),i=e.length;i--;)if(r=e.charCodeAt(i),n[i]=r,r>255)return t.strToUtf8ArrayBuffer(e);return n.buffer}},{key:"strToUtf8ArrayBuffer",value:function(e){if(v().debug(`Converting string[${null==e?void 0:e.length}] to UTF8 array buffer`),!e)return new ArrayBuffer;var t=new TextEncoder("utf-8").encode(e);return e.length!==t.length&&(L()&&self&&"function"==typeof self.setOption?self.setOption("attemptHighlight",!1):j()&&(window.app.options.attemptHighlight=!1)),t.buffer}},{key:"strToByteArray",value:function(e){if(v().debug(`Converting string[${null==e?void 0:e.length}] to byte array`),!e)return[];for(var r,n=new Array(e.length),i=e.length;i--;)if(r=e.charCodeAt(i),n[i]=r,r>255)return t.strToUtf8ByteArray(e);return n}},{key:"strToUtf8ByteArray",value:function(e){if(v().debug(`Converting string[${null==e?void 0:e.length}] to UTF8 byte array`),!e)return[];var r=w().encode(e);return e.length!==r.length&&(L()?self.setOption("attemptHighlight",!1):j()&&(window.app.options.attemptHighlight=!1)),t.strToByteArray(r)}},{key:"strToCharcode",value:function(e){if(v().debug(`Converting string[${null==e?void 0:e.length}] to charcode`),!e)return[];for(var r=[],n=0;n<e.length;n++){var i=e.charCodeAt(n);if(n<e.length-1&&i>=55296&&i<56320){var o=e[n+1].charCodeAt(0);o>=56320&&o<57344&&(i=t.ord(e[n]+e[++n]))}r.push(i)}return r}},{key:"byteArrayToUtf8",value:function(e){var r;if(v().debug(`Converting byte array[${null===(r=e)||void 0===r?void 0:r.length}] to UTF8`),!e||!e.length)return"";e instanceof Uint8Array||(e=new Uint8Array(e));try{var n=new TextDecoder("utf-8",{fatal:!0}).decode(e);return n.length!==e.length&&(L()?self.setOption("attemptHighlight",!1):j()&&(window.app.options.attemptHighlight=!1)),n}catch(r){return t.byteArrayToChars(e)}}},{key:"byteArrayToChars",value:function(e){if(v().debug(`Converting byte array[${null==e?void 0:e.length}] to chars`),!e||!e.length)return"";for(var t="",r=0;r<e.length;r+=2e4)t+=String.fromCharCode.apply(String,g(e.slice(r,r+2e4)));return t}},{key:"arrayBufferToStr",value:function(e){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(v().debug(`Converting array buffer[${null==e?void 0:e.byteLength}] to str`),!e||!e.byteLength)return"";var n=new Uint8Array(e);return r?t.byteArrayToUtf8(n):t.byteArrayToChars(n)}},{key:"calculateShannonEntropy",value:function(e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var t,r=[],n=new Array(256).fill(0);for(t=0;t<e.length;t++)n[e[t]]++;for(t=0;t<n.length;t++)n[t]>0&&r.push(n[t]/e.length);var i,o=0;for(t=0;t<r.length;t++)o+=(i=r[t])*Math.log(i)/Math.log(2);return-o}},{key:"parseCSV",value:function(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[","],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["\n","\r"],o=!1,s=!1,a="",u=[],c=[];e.length&&"\ufeff"===e[0]&&(e=e.substr(1));for(var f=0;f<e.length;f++)t=e[f],r=e[f+1]||"",o?(a+=t,o=!1):'"'!==t||s?'"'===t&&s?'"'===r?o=!0:s=!1:!s&&n.indexOf(t)>=0?(u.push(a),a=""):!s&&i.indexOf(t)>=0?(u.push(a),a="",c.push(u),u=[],i.indexOf(r)>=0&&r!==t&&f++):a+=t:s=!0;return u.length&&(u.push(a),c.push(u)),c}},{key:"stripHtmlTags",value:function(e){function t(e,r){var n=r.replace(e,"");return n.length===r.length?n:t(e,n)}return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(e=t(/<script[^>]*>(\s|\S)*?<\/script[^>]*>/gi,e),e=t(/<style[^>]*>(\s|\S)*?<\/style[^>]*>/gi,e)),t(/<[^>]+>/g,e)}},{key:"escapeHtml",value:function(e){var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","\0":""};return e?e.replace(/[&<>"'`\u0000]/g,function(e){return t[e]}):e}},{key:"unescapeHtml",value:function(e){var t={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#x27;":"'","&#x2F;":"/","&#x60;":"`","":"\0"};return e.replace(/(&#?x?[a-z0-9]{2,4};|\ue000)/gi,function(e){return t[e]||e})}},{key:"toTitleCase",value:function(e){return e.replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})}},{key:"encodeURIFragment",value:function(e){var t={"%2D":"-","%2E":".","%5F":"_","%7E":"~","%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2C":",","%3B":";","%3A":":","%40":"@","%2F":"/","%3F":"?"};return(e=encodeURIComponent(e)).replace(/%[0-9A-F]{2}/g,function(e){return t[e]||e})}},{key:"generatePrettyRecipe",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r="",n="",i="",o="",s="";return e.forEach(function(e){n=e.op.replace(/ /g,"_"),i=JSON.stringify(e.args).slice(1,-1).replace(/'/g,"\\'").replace(/"((?:[^"\\]|\\.)*)"/g,"'$1'").replace(/\\"/g,'"'),o=e.disabled?"/disabled":"",s=e.breakpoint?"/breakpoint":"",r+=`${n}(${i}${o}${s})`,t&&(r+="\n")}),r}},{key:"parseRecipeConfig",value:function(e){if(0===(e=e.trim()).length)return[];if("["===e[0])return JSON.parse(e);var t,r;e=e.replace(/\n/g,"");for(var n=/([^(]+)\(((?:'[^'\\]*(?:\\.[^'\\]*)*'|[^)/'])*)(\/[^)]+)?\)/g,i=[];t=n.exec(e);){r="["+(r=t[2].replace(/"/g,'\\"').replace(/(^|,|{|:)'/g,'$1"').replace(/([^\\]|(?:\\\\)+)'(,|:|}|$)/g,'$1"$2').replace(/\\'/g,"'"))+"]";var o={op:t[1].replace(/_/g," "),args:JSON.parse(r)};t[3]&&t[3].indexOf("disabled")>0&&(o.disabled=!0),t[3]&&t[3].indexOf("breakpoint")>0&&(o.breakpoint=!0),i.push(o)}return i}},{key:"displayFilesAsHTML",value:(r=l(p().mark(function e(r){var n,i,o,s,a,u;return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=function(e){return`<div class='card' style='white-space: normal;'>\n <div class='card-header'>\n <h6 class="mb-0">\n ${t.escapeHtml(e.name)}\n </h6>\n </div>\n </div>`},i=function(e,r){if(r.startsWith("image")){var n="data:";return n+=r+";","<img style='max-width: 100%;' src='"+(n+="base64,"+A(e))+"'>"}return`<pre>${t.escapeHtml(t.arrayBufferToStr(e.buffer))}</pre>`},o=function(){var e=l(p().mark(function e(r,n){var o,s,a,u;return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,t.readFile(r);case 1:return o=e.sent,s=new Blob([o],{type:r.type||"octet/stream"}),a=URL.createObjectURL(s),u=`<div class='card' style='white-space: normal;'>\n <div class='card-header' id='heading${n}'>\n <h6 class='mb-0'>\n <a class='collapsed'\n data-toggle='collapse'\n href='#collapse${n}'\n aria-expanded='false'\n aria-controls='collapse${n}'\n title="Show/hide contents of '${t.escapeHtml(r.name)}'">\n ${t.escapeHtml(r.name)}</a>\n <span class='float-right' style="margin-top: -3px">\n ${r.size.toLocaleString()} bytes\n <a title="Download ${t.escapeHtml(r.name)}"\n href="${a}"\n download="${t.escapeHtml(r.name)}"\n data-toggle="tooltip">\n <i class="material-icons" style="vertical-align: bottom">save</i>\n </a>\n <a title="Move to input"\n href="#"\n blob-url="${a}"\n file-name="${t.escapeHtml(r.name)}"\n class="extract-file"\n data-toggle="tooltip">\n <i class="material-icons" style="vertical-align: bottom">open_in_browser</i>\n </a>\n </span>\n </h6>\n </div>\n <div id='collapse${n}' class='collapse' aria-labelledby='heading${n}' data-parent="#files">\n <div class='card-body'>\n ${i(o,r.type)}\n </div>\n </div>\n </div>`,e.abrupt("return",u);case 2:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}(),s=`<div style='padding: 5px; white-space: normal;'>\n ${r.length} file(s) found\n </div><div id="files" style="padding: 20px">`,a=0;case 1:if(!(a<r.length)){e.next=5;break}if(!r[a].name.endsWith("/")){e.next=2;break}s+=n(r[a]),e.next=4;break;case 2:return u=s,e.next=3,o(r[a],a);case 3:s=u+=e.sent;case 4:a++,e.next=1;break;case 5:return e.abrupt("return",s+="</div>");case 6:case"end":return e.stop()}},e)})),function(e){return r.apply(this,arguments)})},{key:"parseURIParams",value:function(e){if(""===e)return{};"?"!==e[0]&&"#"!==e[0]||(e=e.substr(1));for(var t=e.split("&"),r={},n=0;n<t.length;n++){var i=t[n].split("=");2!==i.length?r[t[n]]=!0:r[i[0]]=decodeURIComponent(i[1].replace(/\+/g," "))}return r}},{key:"readFile",value:function(e){return R()?I.from(e).buffer:new Promise(function(t,r){var n=new FileReader,i=new Uint8Array(e.size),o=0,s=10485760,a=function(){if(o>=e.size)t(i);else{var r=e.slice(o,o+s);n.readAsArrayBuffer(r)}};n.onload=function(e){i.set(new Uint8Array(n.result),o),o+=s,a()},n.onerror=function(e){r(n.error.message)},a()})}},{key:"readFileSync",value:function(e){if(!R())throw new TypeError("Browser environment cannot support readFileSync");return Uint8Array.from(e.data).buffer}},{key:"mod",value:function(e,t){return(e%t+t)%t}},{key:"gcd",value:function(e,r){return r?t.gcd(r,e%r):e}},{key:"modInv",value:function(e,t){e%=t;for(var r=1;r<t;r++)if(e*r%26==1)return r}},{key:"charRep",value:function(e){return{Space:" ",Percent:"%",Comma:",","Semi-colon":";",Colon:":",Tab:"\t","Line feed":"\n",CRLF:"\r\n","Forward slash":"/",Backslash:"\\","0x":"0x","\\x":"\\x","Nothing (separate chars)":"",None:""}[e]}},{key:"regexRep",value:function(e){return{Space:/\s+/g,Percent:/%/g,Comma:/,/g,"Semi-colon":/;/g,Colon:/:/g,"Line feed":/\n/g,CRLF:/\r\n/g,"Forward slash":/\//g,Backslash:/\\/g,"0x with comma":/,?0x/g,"0x":/0x/g,"\\x":/\\x/g,None:/\s+/g}[e]}},{key:"chunked",value:p().mark(function e(t,r){var n,i,o,s;return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=t[Symbol.iterator]();case 1:i=[],o=0;case 2:if(!(o<r)){e.next=5;break}if(!(s=n.next()).done){e.next=3;break}return e.abrupt("continue",5);case 3:i.push(s.value);case 4:o++,e.next=2;break;case 5:if(!i.length){e.next=7;break}return e.next=6,i;case 6:e.next=8;break;case 7:return e.abrupt("return");case 8:e.next=1;break;case 9:case"end":return e.stop()}},e)})}]);var r}();function R(){return void 0!==N&&null!=N.versions&&null!=N.versions.node}function j(){return"object"==typeof window}function L(){return"function"==typeof importScripts}const U=F;function P(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(P=function(){return!!e})()}Array.prototype.unique=function(){for(var e={},t=[],r=0,n=this.length;r<n;r++)Object.prototype.hasOwnProperty.call(e,this[r])||(t.push(this[r]),e[this[r]]=1);return t},Array.prototype.max=function(){return Math.max.apply(null,this)},Array.prototype.min=function(){return Math.min.apply(null,this)},Array.prototype.sum=function(){return this.reduce(function(e,t){return e+t},0)},Array.prototype.equals=function(e){if(!e)return!1;var t=this.length;if(t!==e.length)return!1;for(;t--;)if(this[t]!==e[t])return!1;return!0},String.prototype.count=function(e){return this.split(e).length-1},String.prototype.padStart||(String.prototype.padStart=function(e,t){return e|=0,t=String(void 0!==t?t:" "),this.length>e?String(this):((e-=this.length)>t.length&&(t+=t.repeat(e/t.length)),t.slice(0,e)+String(this))}),String.prototype.padEnd||(String.prototype.padEnd=function(e,t){return e|=0,t=String(void 0!==t?t:" "),this.length>e?String(this):((e-=this.length)>t.length&&(t+=t.repeat(e/t.length)),String(this)+t.slice(0,e))});const C=function(t){function r(){var t,n,i,o;e(this,r);for(var u=arguments.length,c=new Array(u),f=0;f<u;f++)c[f]=arguments[f];return n=this,i=r,o=[].concat(c),i=a(i),(t=s(n,P()?Reflect.construct(i,o||[],a(n).constructor):i.apply(n,o))).type="DishError",Error.captureStackTrace&&Error.captureStackTrace(t,r),t}return c(r,t),o(r)}(E(Error));var M=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,D=Math.ceil,$=Math.floor,z="[BigNumber Error] ",H=z+"Number primitive has more than 15 significant digits: ",V=1e14,q=14,G=9007199254740991,W=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],Z=1e7,J=1e9;function Y(e){var t=0|e;return e>0||e===t?t:t-1}function K(e){for(var t,r,n=1,i=e.length,o=e[0]+"";n<i;){for(t=e[n++]+"",r=q-t.length;r--;t="0"+t);o+=t}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function X(e,t){var r,n,i=e.c,o=t.c,s=e.s,a=t.s,u=e.e,c=t.e;if(!s||!a)return null;if(r=i&&!i[0],n=o&&!o[0],r||n)return r?n?0:-a:s;if(s!=a)return s;if(r=s<0,n=u==c,!i||!o)return n?0:!i^r?1:-1;if(!n)return u>c^r?1:-1;for(a=(u=i.length)<(c=o.length)?u:c,s=0;s<a;s++)if(i[s]!=o[s])return i[s]>o[s]^r?1:-1;return u==c?0:u>c^r?1:-1}function Q(e,t,r,n){if(e<t||e>r||e!==$(e))throw Error(z+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function ee(e){var t=e.c.length-1;return Y(e.e/q)==t&&e.c[t]%2!=0}function te(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function re(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var ne=function e(t){var r,n,i,o,s,a,u,c,f,l,h=B.prototype={constructor:B,toString:null,valueOf:null},p=new B(1),d=20,y=4,g=-7,m=21,v=-1e7,b=1e7,w=!1,_=1,E=0,x={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},S="0123456789abcdefghijklmnopqrstuvwxyz",A=!0;function B(e,t){var r,o,s,a,u,c,f,l,h=this;if(!(h instanceof B))return new B(e,t);if(null==t){if(e&&!0===e._isBigNumber)return h.s=e.s,void(!e.c||e.e>b?h.c=h.e=null:e.e<v?h.c=[h.e=0]:(h.e=e.e,h.c=e.c.slice()));if((c="number"==typeof e)&&0*e==0){if(h.s=1/e<0?(e=-e,-1):1,e===~~e){for(a=0,u=e;u>=10;u/=10,a++);return void(a>b?h.c=h.e=null:(h.e=a,h.c=[e]))}l=String(e)}else{if(!M.test(l=String(e)))return i(h,l,c);h.s=45==l.charCodeAt(0)?(l=l.slice(1),-1):1}(a=l.indexOf("."))>-1&&(l=l.replace(".","")),(u=l.search(/e/i))>0?(a<0&&(a=u),a+=+l.slice(u+1),l=l.substring(0,u)):a<0&&(a=l.length)}else{if(Q(t,2,S.length,"Base"),10==t&&A)return I(h=new B(e),d+h.e+1,y);if(l=String(e),c="number"==typeof e){if(0*e!=0)return i(h,l,c,t);if(h.s=1/e<0?(l=l.slice(1),-1):1,B.DEBUG&&l.replace(/^0\.0*|\./,"").length>15)throw Error(H+e)}else h.s=45===l.charCodeAt(0)?(l=l.slice(1),-1):1;for(r=S.slice(0,t),a=u=0,f=l.length;u<f;u++)if(r.indexOf(o=l.charAt(u))<0){if("."==o){if(u>a){a=f;continue}}else if(!s&&(l==l.toUpperCase()&&(l=l.toLowerCase())||l==l.toLowerCase()&&(l=l.toUpperCase()))){s=!0,u=-1,a=0;continue}return i(h,String(e),c,t)}c=!1,(a=(l=n(l,t,10,h.s)).indexOf("."))>-1?l=l.replace(".",""):a=l.length}for(u=0;48===l.charCodeAt(u);u++);for(f=l.length;48===l.charCodeAt(--f););if(l=l.slice(u,++f)){if(f-=u,c&&B.DEBUG&&f>15&&(e>G||e!==$(e)))throw Error(H+h.s*e);if((a=a-u-1)>b)h.c=h.e=null;else if(a<v)h.c=[h.e=0];else{if(h.e=a,h.c=[],u=(a+1)%q,a<0&&(u+=q),u<f){for(u&&h.c.push(+l.slice(0,u)),f-=q;u<f;)h.c.push(+l.slice(u,u+=q));u=q-(l=l.slice(u)).length}else u-=f;for(;u--;l+="0");h.c.push(+l)}}else h.c=[h.e=0]}function O(e,t,r,n){var i,o,s,a,u;if(null==r?r=y:Q(r,0,8),!e.c)return e.toString();if(i=e.c[0],s=e.e,null==t)u=K(e.c),u=1==n||2==n&&(s<=g||s>=m)?te(u,s):re(u,s,"0");else if(o=(e=I(new B(e),t,r)).e,a=(u=K(e.c)).length,1==n||2==n&&(t<=o||o<=g)){for(;a<t;u+="0",a++);u=te(u,o)}else if(t-=s+(2===n&&o>s),u=re(u,o,"0"),o+1>a){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=o-a)>0)for(o+1==a&&(u+=".");t--;u+="0");return e.s<0&&i?"-"+u:u}function k(e,t){for(var r,n,i=1,o=new B(e[0]);i<e.length;i++)(!(n=new B(e[i])).s||(r=X(o,n))===t||0===r&&o.s===t)&&(o=n);return o}function T(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*q-1)>b?e.c=e.e=null:r<v?e.c=[e.e=0]:(e.e=r,e.c=t),e}function I(e,t,r,n){var i,o,s,a,u,c,f,l=e.c,h=W;if(l){e:{for(i=1,a=l[0];a>=10;a/=10,i++);if((o=t-i)<0)o+=q,s=t,u=l[c=0],f=$(u/h[i-s-1]%10);else if((c=D((o+1)/q))>=l.length){if(!n)break e;for(;l.length<=c;l.push(0));u=f=0,i=1,s=(o%=q)-q+1}else{for(u=a=l[c],i=1;a>=10;a/=10,i++);f=(s=(o%=q)-q+i)<0?0:$(u/h[i-s-1]%10)}if(n=n||t<0||null!=l[c+1]||(s<0?u:u%h[i-s-1]),n=r<4?(f||n)&&(0==r||r==(e.s<0?3:2)):f>5||5==f&&(4==r||n||6==r&&(o>0?s>0?u/h[i-s]:0:l[c-1])%10&1||r==(e.s<0?8:7)),t<1||!l[0])return l.length=0,n?(t-=e.e+1,l[0]=h[(q-t%q)%q],e.e=-t||0):l[0]=e.e=0,e;if(0==o?(l.length=c,a=1,c--):(l.length=c+1,a=h[q-o],l[c]=s>0?$(u/h[i-s]%h[s])*a:0),n)for(;;){if(0==c){for(o=1,s=l[0];s>=10;s/=10,o++);for(s=l[0]+=a,a=1;s>=10;s/=10,a++);o!=a&&(e.e++,l[0]==V&&(l[0]=1));break}if(l[c]+=a,l[c]!=V)break;l[c--]=0,a=1}for(o=l.length;0===l[--o];l.pop());}e.e>b?e.c=e.e=null:e.e<v&&(e.c=[e.e=0])}return e}function N(e){var t,r=e.e;return null===r?e.toString():(t=K(e.c),t=r<=g||r>=m?te(t,r):re(t,r,"0"),e.s<0?"-"+t:t)}return B.clone=e,B.ROUND_UP=0,B.ROUND_DOWN=1,B.ROUND_CEIL=2,B.ROUND_FLOOR=3,B.ROUND_HALF_UP=4,B.ROUND_HALF_DOWN=5,B.ROUND_HALF_EVEN=6,B.ROUND_HALF_CEIL=7,B.ROUND_HALF_FLOOR=8,B.EUCLID=9,B.config=B.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(z+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(Q(r=e[t],0,J,t),d=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(Q(r=e[t],0,8,t),y=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(Q(r[0],-J,0,t),Q(r[1],0,J,t),g=r[0],m=r[1]):(Q(r,-J,J,t),g=-(m=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)Q(r[0],-J,-1,t),Q(r[1],1,J,t),v=r[0],b=r[1];else{if(Q(r,-J,J,t),!r)throw Error(z+t+" cannot be zero: "+r);v=-(b=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(z+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw w=!r,Error(z+"crypto unavailable");w=r}else w=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(Q(r=e[t],0,9,t),_=r),e.hasOwnProperty(t="POW_PRECISION")&&(Q(r=e[t],0,J,t),E=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(z+t+" not an object: "+r);x=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(z+t+" invalid: "+r);A="0123456789"==r.slice(0,10),S=r}}return{DECIMAL_PLACES:d,ROUNDING_MODE:y,EXPONENTIAL_AT:[g,m],RANGE:[v,b],CRYPTO:w,MODULO_MODE:_,POW_PRECISION:E,FORMAT:x,ALPHABET:S}},B.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!B.DEBUG)return!0;var t,r,n=e.c,i=e.e,o=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&i>=-J&&i<=J&&i===$(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break e}if((t=(i+1)%q)<1&&(t+=q),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=V||r!==$(r))break e;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(z+"Invalid BigNumber: "+e)},B.maximum=B.max=function(){return k(arguments,-1)},B.minimum=B.min=function(){return k(arguments,1)},B.random=(o=9007199254740992,s=Math.random()*o&2097151?function(){return $(Math.random()*o)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,i,o,a=0,u=[],c=new B(p);if(null==e?e=d:Q(e,0,J),i=D(e/q),w)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));a<i;)(o=131072*t[a]+(t[a+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[a]=r[0],t[a+1]=r[1]):(u.push(o%1e14),a+=2);a=i/2}else{if(!crypto.randomBytes)throw w=!1,Error(z+"crypto unavailable");for(t=crypto.randomBytes(i*=7);a<i;)(o=281474976710656*(31&t[a])+1099511627776*t[a+1]+4294967296*t[a+2]+16777216*t[a+3]+(t[a+4]<<16)+(t[a+5]<<8)+t[a+6])>=9e15?crypto.randomBytes(7).copy(t,a):(u.push(o%1e14),a+=7);a=i/7}if(!w)for(;a<i;)(o=s())<9e15&&(u[a++]=o%1e14);for(i=u[--a],e%=q,i&&e&&(o=W[q-e],u[a]=$(i/o)*o);0===u[a];u.pop(),a--);if(a<0)u=[n=0];else{for(n=-1;0===u[0];u.splice(0,1),n-=q);for(a=1,o=u[0];o>=10;o/=10,a++);a<q&&(n-=q-a)}return c.e=n,c.c=u,c}),B.sum=function(){for(var e=1,t=arguments,r=new B(t[0]);e<t.length;)r=r.plus(t[e++]);return r},n=function(){var e="0123456789";function t(e,t,r,n){for(var i,o,s=[0],a=0,u=e.length;a<u;){for(o=s.length;o--;s[o]*=t);for(s[0]+=n.indexOf(e.charAt(a++)),i=0;i<s.length;i++)s[i]>r-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/r|0,s[i]%=r)}return s.reverse()}return function(n,i,o,s,a){var u,c,f,l,h,p,g,m,v=n.indexOf("."),b=d,w=y;for(v>=0&&(l=E,E=0,n=n.replace(".",""),p=(m=new B(i)).pow(n.length-v),E=l,m.c=t(re(K(p.c),p.e,"0"),10,o,e),m.e=m.c.length),f=l=(g=t(n,i,o,a?(u=S,e):(u=e,S))).length;0==g[--l];g.pop());if(!g[0])return u.charAt(0);if(v<0?--f:(p.c=g,p.e=f,p.s=s,g=(p=r(p,m,b,w,o)).c,h=p.r,f=p.e),v=g[c=f+b+1],l=o/2,h=h||c<0||null!=g[c+1],h=w<4?(null!=v||h)&&(0==w||w==(p.s<0?3:2)):v>l||v==l&&(4==w||h||6==w&&1&g[c-1]||w==(p.s<0?8:7)),c<1||!g[0])n=h?re(u.charAt(1),-b,u.charAt(0)):u.charAt(0);else{if(g.length=c,h)for(--o;++g[--c]>o;)g[c]=0,c||(++f,g=[1].concat(g));for(l=g.length;!g[--l];);for(v=0,n="";v<=l;n+=u.charAt(g[v++]));n=re(n,f,u.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,i,o,s,a=0,u=e.length,c=t%Z,f=t/Z|0;for(e=e.slice();u--;)a=((i=c*(o=e[u]%Z)+(n=f*o+(s=e[u]/Z|0)*c)%Z*Z+a)/r|0)+(n/Z|0)+f*s,e[u]=i%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;i<r;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,i,o,s,a){var u,c,f,l,h,p,d,y,g,m,v,b,w,_,E,x,S,A=n.s==i.s?1:-1,O=n.c,k=i.c;if(!(O&&O[0]&&k&&k[0]))return new B(n.s&&i.s&&(O?!k||O[0]!=k[0]:k)?O&&0==O[0]||!k?0*A:A/0:NaN);for(g=(y=new B(A)).c=[],A=o+(c=n.e-i.e)+1,a||(a=V,c=Y(n.e/q)-Y(i.e/q),A=A/q|0),f=0;k[f]==(O[f]||0);f++);if(k[f]>(O[f]||0)&&c--,A<0)g.push(1),l=!0;else{for(_=O.length,x=k.length,f=0,A+=2,(h=$(a/(k[0]+1)))>1&&(k=e(k,h,a),O=e(O,h,a),x=k.length,_=O.length),w=x,v=(m=O.slice(0,x)).length;v<x;m[v++]=0);S=k.slice(),S=[0].concat(S),E=k[0],k[1]>=a/2&&E++;do{if(h=0,(u=t(k,m,x,v))<0){if(b=m[0],x!=v&&(b=b*a+(m[1]||0)),(h=$(b/E))>1)for(h>=a&&(h=a-1),d=(p=e(k,h,a)).length,v=m.length;1==t(p,m,d,v);)h--,r(p,x<d?S:k,d,a),d=p.length,u=1;else 0==h&&(u=h=1),d=(p=k.slice()).length;if(d<v&&(p=[0].concat(p)),r(m,p,v,a),v=m.length,-1==u)for(;t(k,m,x,v)<1;)h++,r(m,x<v?S:k,v,a),v=m.length}else 0===u&&(h++,m=[0]);g[f++]=h,m[0]?m[v++]=O[w]||0:(m=[O[w]],v=1)}while((w++<_||null!=m[0])&&A--);l=null!=m[0],g[0]||g.splice(0,1)}if(a==V){for(f=1,A=g[0];A>=10;A/=10,f++);I(y,o+(y.e=f+c*q-1)+1,s,l)}else y.e=c,y.r=+l;return y}}(),a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,u=/^([^.]+)\.$/,c=/^\.([^.]+)$/,f=/^-?(Infinity|NaN)$/,l=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,r,n){var i,o=r?t:t.replace(l,"");if(f.test(o))e.s=isNaN(o)?null:o<0?-1:1;else{if(!r&&(o=o.replace(a,function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t}),n&&(i=n,o=o.replace(u,"$1").replace(c,"0.$1")),t!=o))return new B(o,i);if(B.DEBUG)throw Error(z+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},h.absoluteValue=h.abs=function(){var e=new B(this);return e.s<0&&(e.s=1),e},h.comparedTo=function(e,t){return X(this,new B(e,t))},h.decimalPlaces=h.dp=function(e,t){var r,n,i,o=this;if(null!=e)return Q(e,0,J),null==t?t=y:Q(t,0,8),I(new B(o),e+o.e+1,t);if(!(r=o.c))return null;if(n=((i=r.length-1)-Y(this.e/q))*q,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},h.dividedBy=h.div=function(e,t){return r(this,new B(e,t),d,y)},h.dividedToIntegerBy=h.idiv=function(e,t){return r(this,new B(e,t),0,1)},h.exponentiatedBy=h.pow=function(e,t){var r,n,i,o,s,a,u,c,f=this;if((e=new B(e)).c&&!e.isInteger())throw Error(z+"Exponent not an integer: "+N(e));if(null!=t&&(t=new B(t)),s=e.e>14,!f.c||!f.c[0]||1==f.c[0]&&!f.e&&1==f.c.length||!e.c||!e.c[0])return c=new B(Math.pow(+N(f),s?e.s*(2-ee(e)):+N(e))),t?c.mod(t):c;if(a=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new B(NaN);(n=!a&&f.isInteger()&&t.isInteger())&&(f=f.mod(t))}else{if(e.e>9&&(f.e>0||f.e<-1||(0==f.e?f.c[0]>1||s&&f.c[1]>=24e7:f.c[0]<8e13||s&&f.c[0]<=9999975e7)))return o=f.s<0&&ee(e)?-0:0,f.e>-1&&(o=1/o),new B(a?1/o:o);E&&(o=D(E/q+2))}for(s?(r=new B(.5),a&&(e.s=1),u=ee(e)):u=(i=Math.abs(+N(e)))%2,c=new B(p);;){if(u){if(!(c=c.times(f)).c)break;o?c.c.length>o&&(c.c.length=o):n&&(c=c.mod(t))}if(i){if(0===(i=$(i/2)))break;u=i%2}else if(I(e=e.times(r),e.e+1,1),e.e>14)u=ee(e);else{if(0===(i=+N(e)))break;u=i%2}f=f.times(f),o?f.c&&f.c.length>o&&(f.c.length=o):n&&(f=f.mod(t))}return n?c:(a&&(c=p.div(c)),t?c.mod(t):o?I(c,E,y,void 0):c)},h.integerValue=function(e){var t=new B(this);return null==e?e=y:Q(e,0,8),I(t,t.e+1,e)},h.isEqualTo=h.eq=function(e,t){return 0===X(this,new B(e,t))},h.isFinite=function(){return!!this.c},h.isGreaterThan=h.gt=function(e,t){return X(this,new B(e,t))>0},h.isGreaterThanOrEqualTo=h.gte=function(e,t){return 1===(t=X(this,new B(e,t)))||0===t},h.isInteger=function(){return!!this.c&&Y(this.e/q)>this.c.length-2},h.isLessThan=h.lt=function(e,t){return X(this,new B(e,t))<0},h.isLessThanOrEqualTo=h.lte=function(e,t){return-1===(t=X(this,new B(e,t)))||0===t},h.isNaN=function(){return!this.s},h.isNegative=function(){return this.s<0},h.isPositive=function(){return this.s>0},h.isZero=function(){return!!this.c&&0==this.c[0]},h.minus=function(e,t){var r,n,i,o,s=this,a=s.s;if(t=(e=new B(e,t)).s,!a||!t)return new B(NaN);if(a!=t)return e.s=-t,s.plus(e);var u=s.e/q,c=e.e/q,f=s.c,l=e.c;if(!u||!c){if(!f||!l)return f?(e.s=-t,e):new B(l?s:NaN);if(!f[0]||!l[0])return l[0]?(e.s=-t,e):new B(f[0]?s:3==y?-0:0)}if(u=Y(u),c=Y(c),f=f.slice(),a=u-c){for((o=a<0)?(a=-a,i=f):(c=u,i=l),i.reverse(),t=a;t--;i.push(0));i.reverse()}else for(n=(o=(a=f.length)<(t=l.length))?a:t,a=t=0;t<n;t++)if(f[t]!=l[t]){o=f[t]<l[t];break}if(o&&(i=f,f=l,l=i,e.s=-e.s),(t=(n=l.length)-(r=f.length))>0)for(;t--;f[r++]=0);for(t=V-1;n>a;){if(f[--n]<l[n]){for(r=n;r&&!f[--r];f[r]=t);--f[r],f[n]+=V}f[n]-=l[n]}for(;0==f[0];f.splice(0,1),--c);return f[0]?T(e,f,c):(e.s=3==y?-1:1,e.c=[e.e=0],e)},h.modulo=h.mod=function(e,t){var n,i,o=this;return e=new B(e,t),!o.c||!e.s||e.c&&!e.c[0]?new B(NaN):!e.c||o.c&&!o.c[0]?new B(o):(9==_?(i=e.s,e.s=1,n=r(o,e,0,3),e.s=i,n.s*=i):n=r(o,e,0,_),(e=o.minus(n.times(e))).c[0]||1!=_||(e.s=o.s),e)},h.multipliedBy=h.times=function(e,t){var r,n,i,o,s,a,u,c,f,l,h,p,d,y,g,m=this,v=m.c,b=(e=new B(e,t)).c;if(!(v&&b&&v[0]&&b[0]))return!m.s||!e.s||v&&!v[0]&&!b||b&&!b[0]&&!v?e.c=e.e=e.s=null:(e.s*=m.s,v&&b?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=Y(m.e/q)+Y(e.e/q),e.s*=m.s,(u=v.length)<(l=b.length)&&(d=v,v=b,b=d,i=u,u=l,l=i),i=u+l,d=[];i--;d.push(0));for(y=V,g=Z,i=l;--i>=0;){for(r=0,h=b[i]%g,p=b[i]/g|0,o=i+(s=u);o>i;)r=((c=h*(c=v[--s]%g)+(a=p*c+(f=v[s]/g|0)*h)%g*g+d[o]+r)/y|0)+(a/g|0)+p*f,d[o--]=c%y;d[o]=r}return r?++n:d.splice(0,1),T(e,d,n)},h.negated=function(){var e=new B(this);return e.s=-e.s||null,e},h.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new B(e,t)).s,!i||!t)return new B(NaN);if(i!=t)return e.s=-t,n.minus(e);var o=n.e/q,s=e.e/q,a=n.c,u=e.c;if(!o||!s){if(!a||!u)return new B(i/0);if(!a[0]||!u[0])return u[0]?e:new B(a[0]?n:0*i)}if(o=Y(o),s=Y(s),a=a.slice(),i=o-s){for(i>0?(s=o,r=u):(i=-i,r=a),r.reverse();i--;r.push(0));r.reverse()}for((i=a.length)-(t=u.length)<0&&(r=u,u=a,a=r,t=i),i=0;t;)i=(a[--t]=a[t]+u[t]+i)/V|0,a[t]=V===a[t]?0:a[t]%V;return i&&(a=[i].concat(a),++s),T(e,a,s)},h.precision=h.sd=function(e,t){var r,n,i,o=this;if(null!=e&&e!==!!e)return Q(e,1,J),null==t?t=y:Q(t,0,8),I(new B(o),e,t);if(!(r=o.c))return null;if(n=(i=r.length-1)*q+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&o.e+1>n&&(n=o.e+1),n},h.shiftedBy=function(e){return Q(e,-9007199254740991,G),this.times("1e"+e)},h.squareRoot=h.sqrt=function(){var e,t,n,i,o,s=this,a=s.c,u=s.s,c=s.e,f=d+4,l=new B("0.5");if(1!==u||!a||!a[0])return new B(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(u=Math.sqrt(+N(s)))||u==1/0?(((t=K(a)).length+c)%2==0&&(t+="0"),u=Math.sqrt(+t),c=Y((c+1)/2)-(c<0||c%2),n=new B(t=u==1/0?"5e"+c:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=new B(u+""),n.c[0])for((u=(c=n.e)+f)<3&&(u=0);;)if(o=n,n=l.times(o.plus(r(s,o,f,1))),K(o.c).slice(0,u)===(t=K(n.c)).slice(0,u)){if(n.e<c&&--u,"9999"!=(t=t.slice(u-3,u+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(I(n,n.e+d+2,1),e=!n.times(n).eq(s));break}if(!i&&(I(o,o.e+d+2,0),o.times(o).eq(s))){n=o;break}f+=4,u+=4,i=1}return I(n,n.e+d+1,y,e)},h.toExponential=function(e,t){return null!=e&&(Q(e,0,J),e++),O(this,e,t,1)},h.toFixed=function(e,t){return null!=e&&(Q(e,0,J),e=e+this.e+1),O(this,e,t)},h.toFormat=function(e,t,r){var n,i=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=x;else if("object"!=typeof r)throw Error(z+"Argument not an object: "+r);if(n=i.toFixed(e,t),i.c){var o,s=n.split("."),a=+r.groupSize,u=+r.secondaryGroupSize,c=r.groupSeparator||"",f=s[0],l=s[1],h=i.s<0,p=h?f.slice(1):f,d=p.length;if(u&&(o=a,a=u,u=o,d-=o),a>0&&d>0){for(o=d%a||a,f=p.substr(0,o);o<d;o+=a)f+=c+p.substr(o,a);u>0&&(f+=c+p.slice(o)),h&&(f="-"+f)}n=l?f+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?l.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):l):f}return(r.prefix||"")+n+(r.suffix||"")},h.toFraction=function(e){var t,n,i,o,s,a,u,c,f,l,h,d,g=this,m=g.c;if(null!=e&&(!(u=new B(e)).isInteger()&&(u.c||1!==u.s)||u.lt(p)))throw Error(z+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+N(u));if(!m)return new B(g);for(t=new B(p),f=n=new B(p),i=c=new B(p),d=K(m),s=t.e=d.length-g.e-1,t.c[0]=W[(a=s%q)<0?q+a:a],e=!e||u.comparedTo(t)>0?s>0?t:f:u,a=b,b=1/0,u=new B(d),c.c[0]=0;l=r(u,t,0,1),1!=(o=n.plus(l.times(i))).comparedTo(e);)n=i,i=o,f=c.plus(l.times(o=f)),c=o,t=u.minus(l.times(o=t)),u=o;return o=r(e.minus(n),i,0,1),c=c.plus(o.times(f)),n=n.plus(o.times(i)),c.s=f.s=g.s,h=r(f,i,s*=2,y).minus(g).abs().comparedTo(r(c,n,s,y).minus(g).abs())<1?[f,i]:[c,n],b=a,h},h.toNumber=function(){return+N(this)},h.toPrecision=function(e,t){return null!=e&&Q(e,1,J),O(this,e,t,2)},h.toString=function(e){var t,r=this,i=r.s,o=r.e;return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=o<=g||o>=m?te(K(r.c),o):re(K(r.c),o,"0"):10===e&&A?t=re(K((r=I(new B(r),d+o+1,y)).c),r.e,"0"):(Q(e,2,S.length,"Base"),t=n(re(K(r.c),o,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},h.valueOf=h.toJSON=function(){return N(this)},h._isBigNumber=!0,h[Symbol.toStringTag]="BigNumber",h[Symbol.for("nodejs.util.inspect.custom")]=h.valueOf,null!=t&&B.set(t),B}();const ie=ne;var oe=function(){function t(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;e(this,t),this.bytes=r,this.length=this.bytes.length,this.position=n,this.bitPos=i}return o(t,[{key:"clone",value:function(){return new t(this.bytes,this.position,this.bitPos)}},{key:"getBytes",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!(this.position>this.length)){var t=null!==e?this.position+e:this.length,r=this.bytes.slice(this.position,t);return this.position=t,this.bitPos=0,r}}},{key:"readString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(!(this.position>this.length)){-1===e&&(e=this.length-this.position);for(var t="",r=this.position;r<this.position+e;r++){var n=this.bytes[r];if(0===n)break;t+=String.fromCharCode(n)}return this.position+=e,this.bitPos=0,t}}},{key:"readInt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"be";if(!(this.position>this.length)){var r=0;if("be"===t)for(var n=this.position;n<this.position+e;n++)r<<=8,r|=this.bytes[n];else for(var i=this.position+e-1;i>=this.position;i--)r<<=8,r|=this.bytes[i];return this.position+=e,this.bitPos=0,r}}},{key:"readBits",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"be";if(!(this.position>this.length)){var r,n=0,i=0;for(n=this.bytes[this.position++]&(r=this.bitPos,"be"===t?(1<<8-r)-1:256-(1<<r)),"be"!==t&&(n>>>=this.bitPos),i=8-this.bitPos,this.bitPos=0;i<e;)"be"===t?n=n<<i|this.bytes[this.position++]:n|=this.bytes[this.position++]<<i,i+=8;if(i>e){var o=i-e;"be"===t?n>>>=o:n&=(1<<e)-1,i-=o,this.position--,this.bitPos=8-o}return n}}},{key:"continueUntil",value:function(e){if(!(this.position>this.length))if(this.bitPos=0,"number"!=typeof e){var t=e.length,r=e[t-1];this.position=t;for(var n,i=function(e,t){var r=new Array;return e.forEach(function(e,n){r[e]=t-n}),r}(e,t);this.position<this.length;){for(;this.position<this.length&&this.bytes[this.position++]!==r;);n=!0;for(var o=t-1;o>=0;o--)if(this.bytes[this.position-t+o]!==e[o]){n=!1,this.position+=i[e[o]];break}if(n){this.position-=t;break}}}else for(;++this.position<this.length&&this.bytes[this.position]!==e;);}},{key:"consumeWhile",value:function(e){for(;this.position<this.length&&this.bytes[this.position]===e;)this.position++;this.bitPos=0}},{key:"consumeIf",value:function(e){this.bytes[this.position]===e&&(this.position++,this.bitPos=0)}},{key:"moveForwardsBy",value:function(e){var t=this.position+e;if(t<0||t>this.length)throw new Error("Cannot move to position "+t+" in stream. Out of bounds.");this.position=t,this.bitPos=0}},{key:"moveBackwardsBy",value:function(e){var t=this.position-e;if(t<0||t>this.length)throw new Error("Cannot move to position "+t+" in stream. Out of bounds.");this.position=t,this.bitPos=0}},{key:"moveBackwardsByBits",value:function(e){if(e<=this.bitPos)this.bitPos-=e;else for(this.bitPos>0&&(e-=this.bitPos,this.bitPos=0);e>0;)this.moveBackwardsBy(1),this.bitPos=8,this.moveBackwardsByBits(e),e-=8}},{key:"moveTo",value:function(e){if(e<0||e>this.length)throw new Error("Cannot move to position "+e+" in stream. Out of bounds.");this.position=e,this.bitPos=0}},{key:"hasMore",value:function(){return this.position<this.length}},{key:"carve",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.position;return this.bitPos>0&&t++,this.bytes.slice(e,t)}}])}();function se(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return ae(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ae(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw o}}}}function ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var ue={Images:[{name:"Joint Photographic Experts Group image",extension:"jpg,jpeg,jpe,thm,mpo",mime:"image/jpeg",description:"",signature:{0:255,1:216,2:255,3:[192,196,219,221,224,225,226,227,228,229,231,232,234,235,236,237,238,254]},extractor:function(e,t){for(var r=new oe(e.slice(t));r.hasMore();){var n=r.getBytes(2);if(255!==n[0])throw new Error(`Invalid marker while parsing JPEG at pos ${r.position}: ${n}`);var i=0;switch(n[1]){case 216:case 1:break;case 217:return r.carve();case 192:case 193:case 194:case 195:case 196:case 197:case 198:case 199:case 200:case 201:case 202:case 203:case 204:case 205:case 206:case 207:case 219:case 222:case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:case 254:i=r.readInt(2,"be"),r.position+=i-2;break;case 223:r.position++;break;case 220:case 221:r.position+=2;break;case 218:i=r.readInt(2,"be"),r.position+=i-2,r.continueUntil(255);break;default:r.continueUntil(255)}}throw new Error("Unable to parse JPEG successfully")}},{name:"Graphics Interchange Format image",extension:"gif",mime:"image/gif",description:"",signature:{0:71,1:73,2:70,3:56,4:[55,57],5:97},extractor:function(e,t){var r=new oe(e.slice(t));for(r.continueUntil([33,255]),r.continueUntil([33,249]),r.moveForwardsBy(2);r.hasMore();){for(r.moveForwardsBy(r.readInt(1)+1),r.moveForwardsBy(11);!Array.from(r.getBytes(2)).equals([33,249])&&(r.moveBackwardsBy(2),r.moveForwardsBy(r.readInt(1)),r.readInt(1));)r.moveBackwardsBy(1);if(59===r.readInt(1))break;r.moveForwardsBy(1)}return r.carve()}},{name:"Portable Network Graphics image",extension:"png",mime:"image/png",description:"",signature:{0:137,1:80,2:78,3:71,4:13,5:10,6:26,7:10},extractor:function(e,t){var r=new oe(e.slice(t));r.moveForwardsBy(8);for(var n=0,i="";"IEND"!==i;)n=r.readInt(4,"be"),i=r.readString(4),r.moveForwardsBy(n+4);return r.carve()}},{name:"WEBP Image",extension:"webp",mime:"image/webp",description:"",signature:{8:87,9:69,10:66,11:80},extractor:function(e,t){var r=new oe(e.slice(t));r.moveForwardsBy(4);var n=r.readInt(4,"le");return r.moveForwardsBy(n),r.carve()}},{name:"High Efficiency Image File Format",extension:"heic,heif",mime:"image/heif",description:"",signature:{0:0,1:0,2:0,3:[36,24],4:102,5:116,6:121,7:112,8:104,9:101,10:105,11:99},extractor:null},{name:"Camera Image File Format",extension:"crw",mime:"image/x-canon-crw",description:"",signature:{6:72,7:69,8:65,9:80,10:67,11:67,12:68,13:82},extractor:null},{name:"Canon CR2 raw image",extension:"cr2",mime:"image/x-canon-cr2",description:"",signature:[{0:73,1:73,2:42,3:0,8:67,9:82},{0:77,1:77,2:0,3:42,8:67,9:82}],extractor:null},{name:"Tagged Image File Format image",extension:"tif",mime:"image/tiff",description:"",signature:[{0:73,1:73,2:42,3:0},{0:77,1:77,2:0,3:42}],extractor:null},{name:"Bitmap image",extension:"bmp",mime:"image/bmp",description:"",signature:{0:66,1:77,7:0,9:0,14:[12,40,56,64,108,124],15:0,16:0,17:0},extractor:function(e,t){var r=new oe(e.slice(t));r.moveForwardsBy(2);var n=r.readInt(4,"le");return r.moveForwardsBy(n-6),r.carve()}},{name:"JPEG Extended Range image",extension:"jxr",mime:"image/vnd.ms-photo",description:"",signature:{0:73,1:73,2:188},extractor:null},{name:"Photoshop image",extension:"psd",mime:"image/vnd.adobe.photoshop",description:"",signature:{0:56,1:66,2:80,3:83,4:0,5:1,6:0,7:0,8:0,9:0,10:0,11:0},extractor:null},{name:"Photoshop Large Document",extension:"psb",mime:"application/x-photoshop",description:"",signature:{0:56,1:66,2:80,3:83,4:0,5:2,6:0,7:0,8:0,9:0,10:0,11:0,12:0},extractor:null},{name:"Paint Shop Pro image",extension:"psp",mime:"image/psp",description:"",signature:[{0:80,1:97,2:105,3:110,4:116,5:32,6:83,7:104,8:111,9:112,10:32,11:80,12:114,13:111,14:32,15:73,16:109},{0:126,1:66,2:75,3:0}],extractor:null},{name:"The GIMP image",extension:"xcf",mime:"image/x-xcf",description:"",signature:{0:103,1:105,2:109,3:112,4:32,5:120,6:99,7:102,8:32,9:[102,118],10:[105,48],11:[108,48],12:[101,49,50,51]},extractor:null},{name:"Icon image",extension:"ico",mime:"image/x-icon",description:"",signature:{0:0,1:0,2:1,3:0,4:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21],5:0,6:[16,32,48,64,128],7:[16,32,48,64,128],9:0,10:[0,1]},extractor:function(e,t){var r=new oe(e.slice(t));r.moveTo(4);var n=r.readInt(2,"le");r.moveForwardsBy(8+16*(n-1));var i=r.readInt(4,"le"),o=r.readInt(4,"le");return r.moveTo(o+i),r.carve()}},{name:"Radiance High Dynamic Range image",extension:"hdr",mime:"image/vnd.radiance",description:"",signature:{0:35,1:63,2:82,3:65,4:68,5:73,6:65,7:78,8:67,9:69,10:10},extractor:null},{name:"Sony ARW image",extension:"arw",mime:"image/x-raw",description:"",signature:{0:5,1:0,2:0,3:0,4:65,5:87,6:49,7:46},extractor:null},{name:"Fujifilm Raw Image",extension:"raf",mime:"image/x-raw",description:"",signature:{0:70,1:85,2:74,3:73,4:70,5:73,6:76,7:77,8:67,9:67,10:68,11:45,12:82,13:65,14:87},extractor:null},{name:"Minolta RAW image",extension:"mrw",mime:"image/x-raw",description:"",signature:{0:0,1:77,2:82,3:77},extractor:null},{name:"Adobe Bridge Thumbnail Cache",extension:"bct",mime:"application/octet-stream",description:"",signature:{0:108,1:110,2:98,3:116,4:2,5:0,6:0,7:0},extractor:null},{name:"Microsoft Document Imaging",extension:"mdi",mime:"image/vnd.ms-modi",description:"",signature:{0:69,1:80,2:42,3:0},extractor:null},{name:"Joint Photographic Experts Group image (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:47,1:57,2:106,3:47,4:52},extractor:null},{name:"Portable Network Graphics image (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:105,1:86,2:66,3:79,4:82,5:119,6:48},extractor:null},{name:"AutoCAD Drawing",extension:"dwg,123d",mime:"application/acad",description:"",signature:{0:65,1:67,2:49,3:48,4:[48,49],5:[48,49,50,51,52,53],6:0},extractor:null},{name:"AutoCAD Drawing",extension:"dwg,dwt",mime:"application/acad",description:"",signature:[{0:65,1:67,2:49,3:48,4:49,5:56,6:0},{0:65,1:67,2:49,3:48,4:50,5:52,6:0},{0:65,1:67,2:49,3:48,4:50,5:55,6:0}],extractor:null},{name:"Targa Image",extension:"tga",mime:"image/x-targa",description:"",signature:[{0:84,1:82,2:85,3:69,4:86,5:73,6:83,7:73,8:79,9:78,10:45,11:88,12:70,13:73,14:76,15:69,16:46}],extractor:function(e,t){var r=new oe(e);r.moveTo(t-8);var n=r.readInt(4,"le"),i=r.readInt(4,"le");function o(e,t){for(var n=0;n<e;n++){r.moveBackwardsBy(1);var i=r.readInt(t,"le")-1;if(r.moveBackwardsBy(t),i===n)break}}return r.moveBackwardsBy(8),n||i?n?(o(65535,2),r.moveBackwardsBy(n)):i&&(o(4294967295,4),r.moveBackwardsBy(6),r.moveBackwardsBy(i)):(function(){r.moveBackwardsBy(5);for(var e=0;e<1048576&&r.readInt(2,"le")*r.readInt(2,"le")*r.readInt(1)/8!=e-1;e++)r.moveBackwardsBy(6)}(),r.moveBackwardsBy(17)),r.carve(r.position,t+18)}}],Video:[{name:"Matroska Multimedia Container",extension:"mkv",mime:"video/x-matroska",description:"",signature:{31:109,32:97,33:116,34:114,35:111,36:115,37:107,38:97},extractor:null},{name:"WEBM video",extension:"webm",mime:"video/webm",description:"",signature:{0:26,1:69,2:223,3:163},extractor:null},{name:"Flash MP4 video",extension:"f4v",mime:"video/mp4",description:"",signature:{4:102,5:116,6:121,7:112,8:[102,70],9:52,10:[118,86],11:32},extractor:null},{name:"MPEG-4 video",extension:"mp4",mime:"video/mp4",description:"",signature:[{0:0,1:0,2:0,3:[24,32],4:102,5:116,6:121,7:112},{0:51,1:103,2:112,3:53},{0:0,1:0,2:0,3:28,4:102,5:116,6:121,7:112,8:109,9:112,10:52,11:50,16:109,17:112,18:52,19:49,20:109,21:112,22:52,23:50,24:105,25:115,26:111,27:109}],extractor:null},{name:"M4V video",extension:"m4v",mime:"video/x-m4v",description:"",signature:{0:0,1:0,2:0,3:28,4:102,5:116,6:121,7:112,8:77,9:52,10:86},extractor:null},{name:"Quicktime video",extension:"mov",mime:"video/quicktime",description:"",signature:{0:0,1:0,2:0,3:20,4:102,5:116,6:121,7:112},extractor:null},{name:"Audio Video Interleave",extension:"avi",mime:"video/x-msvideo",description:"",signature:{0:82,1:73,2:70,3:70,8:65,9:86,10:73},extractor:null},{name:"Windows Media Video",extension:"wmv",mime:"video/x-ms-wmv",description:"",signature:{0:48,1:38,2:178,3:117,4:142,5:102,6:207,7:17,8:166,9:217},extractor:null},{name:"MPEG video",extension:"mpg",mime:"video/mpeg",description:"",signature:{0:0,1:0,2:1,3:186},extractor:null},{name:"Flash Video",extension:"flv",mime:"video/x-flv",description:"",signature:{0:70,1:76,2:86,3:1},extractor:function(e,t){var r=new oe(e.slice(t));r.moveForwardsBy(5);var n=r.readInt(4,"be");r.moveForwardsBy(n-9);for(var i=-11;r.hasMore();){var o=r.readInt(4,"be"),s=r.readInt(1);if([8,9,18].indexOf(s)<0){r.moveBackwardsBy(1);break}if(o!==i+11){r.moveBackwardsBy(i+11+5);break}i=r.readInt(3,"be"),r.moveForwardsBy(7+i)}return r.carve()}},{name:"OGG Video",extension:"ogv,ogm,opus,ogx",mime:"video/ogg",description:"",signature:[{0:79,1:103,2:103,3:83,4:0,5:2,28:1,29:118,30:105,31:100,32:101,33:111},{0:79,1:103,2:103,3:83,4:0,5:2,28:128,29:116,30:104,31:101,32:111,33:114,34:97},{0:79,1:103,2:103,3:83,4:0,5:2,28:102,29:105,30:115,31:104,32:101,33:97,34:100}],extractor:null}],Audio:[{name:"Waveform Audio",extension:"wav",mime:"audio/x-wav",description:"",signature:{0:82,1:73,2:70,3:70,8:87,9:65,10:86,11:69},extractor:function(e,t){var r=new oe(e.slice(t));return r.moveTo(4),r.moveTo(r.readInt(4,"le")+8),r.carve()}},{name:"OGG audio",extension:"ogg",mime:"audio/ogg",description:"",signature:{0:79,1:103,2:103,3:83},extractor:null},{name:"Musical Instrument Digital Interface audio",extension:"midi",mime:"audio/midi",description:"",signature:{0:77,1:84,2:104,3:100},extractor:null},{name:"MPEG-3 audio",extension:"mp3",mime:"audio/mpeg",description:"",signature:[{0:73,1:68,2:51},{0:255,1:251}],extractor:function(e,t){var r=new oe(e.slice(t)),n=["free",32e3,4e4,48e3,56e3,64e3,8e4,96e3,112e3,128e3,16e4,192e3,224e3,256e3,32e4,"bad"],i=[44100,48e3,32e3,"reserved"];if(r.getBytes(3).toString()===[73,68,51].toString()){r.moveTo(6);var o=r.readInt(1)<<21|r.readInt(1)<<14|r.readInt(1)<<7|r.readInt(1);r.moveForwardsBy(o)}else r.moveTo(0);for(;r.hasMore();){if(r.getBytes(3)===[84,65,71].toString()){r.moveForwardsBy(125);break}if(r.getBytes(2).toString()!==[255,251].toString()){r.moveBackwardsBy(2);break}var s=r.readInt(1),a=n[s>>4],u=i[(15&s)>>2],c=(2&s)>>1;if("free"===a||"bad"===a||"reserved"===u){r.moveBackwardsBy(1);break}var f=Math.floor(144*a/u+c);if(r.position+f>r.length){r.moveTo(r.length);break}r.moveForwardsBy(f-3)}return r.carve()}},{name:"MPEG-4 Part 14 audio",extension:"m4a",mime:"audio/m4a",description:"",signature:[{4:102,5:116,6:121,7:112,8:77,9:52,10:65},{0:77,1:52,2:65,3:32}],extractor:null},{name:"Free Lossless Audio Codec",extension:"flac",mime:"audio/x-flac",description:"",signature:{0:102,1:76,2:97,3:67},extractor:null},{name:"Adaptive Multi-Rate audio codec",extension:"amr",mime:"audio/amr",description:"",signature:{0:35,1:33,2:65,3:77,4:82,5:10},extractor:null},{name:"Audacity",extension:"au",mime:"audio/x-au",description:"",signature:{0:100,1:110,2:115,3:46,24:65,25:117,26:100,27:97,28:99,29:105,30:116,31:121,32:66,33:108,34:111,35:99,36:107,37:70,38:105,39:108,40:101},extractor:null},{name:"Audacity Block",extension:"auf",mime:"application/octet-stream",description:"",signature:{0:65,1:117,2:100,3:97,4:99,5:105,6:116,7:121,8:66,9:108,10:111,11:99,12:107,13:70,14:105,15:108,16:101},extractor:null},{name:"Audio Interchange File",extension:"aif",mime:"audio/x-aiff",description:"",signature:{0:70,1:79,2:82,3:77,8:65,9:73,10:70,11:70},extractor:null},{name:"Audio Interchange File (compressed)",extension:"aifc",mime:"audio/x-aifc",description:"",signature:{0:70,1:79,2:82,3:77,8:65,9:73,10:70,11:67},extractor:null}],Documents:[{name:"Portable Document Format",extension:"pdf",mime:"application/pdf",description:"",signature:{0:37,1:80,2:68,3:70},extractor:function(e,t){var r=new oe(e.slice(t));return r.continueUntil([37,37,69,79,70]),r.moveForwardsBy(5),r.consumeIf(13),r.consumeIf(10),r.carve()}},{name:"Portable Document Format (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:65,1:74,2:86,3:66,4:69,5:82,6:105},extractor:null},{name:"Adobe PostScript",extension:"ps,eps,ai,pfa",mime:"application/postscript",description:"",signature:{0:37,1:33,2:80,3:83,4:45,5:65,6:100,7:111,8:98,9:101},extractor:null},{name:"PostScript",extension:"ps",mime:"application/postscript",description:"",signature:{0:37,1:33},extractor:null},{name:"Encapsulated PostScript",extension:"eps,ai",mime:"application/eps",description:"",signature:{0:197,1:208,2:211,3:198},extractor:null},{name:"Rich Text Format",extension:"rtf",mime:"application/rtf",description:"",signature:{0:123,1:92,2:114,3:116},extractor:function(e,t){var r=new oe(e.slice(t)),n=0;if(123!==r.readInt(1))throw new Error("Not a valid RTF file");for(n++;n>0&&r.hasMore();)switch(r.readInt(1)){case 123:n++;break;case 125:n--;break;case 92:r.consumeIf(92),r.position++}return r.carve()}},{name:"Microsoft Office document/OLE2",extension:"ole2,doc,xls,dot,ppt,xla,ppa,pps,pot,msi,sdw,db,vsd,msg",mime:"application/msword,application/vnd.ms-excel,application/vnd.ms-powerpoint",description:"Microsoft Office documents",signature:{0:208,1:207,2:17,3:224,4:161,5:177,6:26,7:225},extractor:null},{name:"Microsoft Office document/OLE2 (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:48,1:77,2:56,3:82,4:52,5:75,6:71,7:120},extractor:null},{name:"Microsoft Office 2007+ document",extension:"docx,xlsx,pptx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.presentationml.presentation",description:"",signature:{38:95,39:84,40:121,41:112,42:101,43:115,44:93,45:46,46:120,47:109,48:108},extractor:ce},{name:"Microsoft Access database",extension:"mdb,mda,mde,mdt,fdb,psa",mime:"application/msaccess",description:"",signature:{0:0,1:1,2:0,3:0,4:83,5:116,6:97,7:110,8:100,9:97,10:114,11:100,12:32,13:74,14:101,15:116},extractor:null},{name:"Microsoft Access 2007+ database",extension:"accdb,accde,accda,accdu",mime:"application/msaccess",description:"",signature:{0:0,1:1,2:0,3:0,4:83,5:116,6:97,7:110,8:100,9:97,10:114,11:100,12:32,13:65,14:67,15:69,16:32},extractor:null},{name:"Microsoft OneNote document",extension:"one",mime:"application/onenote",description:"",signature:{0:228,1:82,2:92,3:123,4:140,5:216,6:167,7:77,8:174,9:177,10:83,11:120,12:208,13:41,14:150,15:211},extractor:null},{name:"Outlook Express database",extension:"dbx",mime:"application/octet-stream",description:"",signature:{0:207,1:173,2:18,3:254,4:[48,197,198,199],11:17},extractor:null},{name:"Personal Storage Table (Outlook)",extension:"pst,ost,fdb,pab",mime:"application/octet-stream",description:"",signature:{0:33,1:66,2:68,3:78},extractor:null},{name:"Microsoft Exchange Database",extension:"edb",mime:"application/octet-stream",description:"",signature:{4:239,5:205,6:171,7:137,8:[32,35],9:6,10:0,11:0,12:[0,1],13:0,14:0,15:0},extractor:null},{name:"WordPerfect document",extension:"wpd,wp,wp5,wp6,wpp,bk!,wcm",mime:"application/wordperfect",description:"",signature:{0:255,1:87,2:80,3:67,7:[0,1,2],8:1,9:10},extractor:null},{name:"EPUB e-book",extension:"epub",mime:"application/epub+zip",description:"",signature:{0:80,1:75,2:3,3:4,30:109,31:105,32:109,33:101,34:116,35:121,36:112,37:101,38:97,39:112,40:112,41:108,42:105,43:99,44:97,45:116,46:105,47:111,48:110,49:47,50:101,51:112,52:117,53:98,54:43,55:122,56:105,57:112},extractor:ce}],Applications:[{name:"Windows Portable Executable",extension:"exe,dll,drv,vxd,sys,ocx,vbx,com,fon,scr",mime:"application/vnd.microsoft.portable-executable",description:"",signature:{0:77,1:90,3:[0,1,2],5:[0,1,2]},extractor:function(e,t){var r=new oe(e.slice(t));r.moveTo(60);var n=r.readInt(4,"le");r.moveTo(n),r.moveForwardsBy(6);var i=r.readInt(2,"le");r.moveForwardsBy(16);var o=523===r.readInt(2,"le")?112:96;r.moveForwardsBy(o-2),r.moveForwardsBy(32);var s=r.readInt(4,"le"),a=r.readInt(4,"le");if(s>0)return r.moveTo(s+a),r.carve();r.moveForwardsBy(88),r.moveForwardsBy(40*(i-1)),r.moveForwardsBy(16);var u=r.readInt(4,"le"),c=r.readInt(4,"le");return r.moveTo(c+u),r.carve()}},{name:"Executable and Linkable Format",extension:"elf,bin,axf,o,prx,so",mime:"application/x-executable",description:"Executable and Linkable Format file. No standard file extension.",signature:{0:127,1:69,2:76,3:70},extractor:function(e,t){var r=new oe(e.slice(t));r.moveForwardsBy(4);var n=1===r.readInt(1),i=1===r.readInt(1)?"le":"be";r.moveForwardsBy(n?26:34);var o=n?r.readInt(4,i):r.readInt(8,i);r.moveForwardsBy(10);var s=r.readInt(2,i),a=r.readInt(2,i);return r.moveTo(o),r.moveForwardsBy(s*a),r.carve()}},{name:"MacOS Mach-O object",extension:"dylib",mime:"application/octet-stream",description:"",signature:[{0:202,1:254,2:186,3:190,4:0,5:0,6:0,7:[1,2,3]},{0:206,1:250,2:237,3:254,4:7,5:0,6:0,7:0,8:[1,2,3]}],extractor:fe},{name:"MacOS Mach-O 64-bit object",extension:"dylib",mime:"application/octet-stream",description:"",signature:{0:207,1:250,2:237,3:254},extractor:fe},{name:"Adobe Flash",extension:"swf",mime:"application/x-shockwave-flash",description:"",signature:{0:[67,70],1:87,2:83},extractor:null},{name:"Java Class",extension:"class",mime:"application/java-vm",description:"",signature:{0:202,1:254,2:186,3:190},extractor:null},{name:"Dalvik Executable",extension:"dex",mime:"application/octet-stream",description:"Dalvik Executable as used by Android",signature:{0:100,1:101,2:120,3:10,4:48,5:51,6:53,7:0},extractor:null},{name:"Google Chrome Extension",extension:"crx",mime:"application/crx",description:"Google Chrome extension or packaged app",signature:{0:67,1:114,2:50,3:52},extractor:null}],Archives:[{name:"PKZIP archive",extension:"zip",mime:"application/zip",description:"",signature:{0:80,1:75,2:[3,5,7],3:[4,6,8]},extractor:ce},{name:"PKZIP archive (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:85,1:69,2:115,3:68,4:66,5:66},extractor:null},{name:"TAR archive",extension:"tar",mime:"application/x-tar",description:"",signature:{257:117,258:115,259:116,260:97,261:114},extractor:function(e,t){for(var r=new oe(e.slice(t)),n=function(){if(r.moveForwardsBy(257),r.getBytes(5).join("")!==[117,115,116,97,114].join(""))return r.moveBackwardsBy(262),1;r.moveBackwardsBy(138);var e=0;r.getBytes(11).forEach(function(t,r){e+=(t-48).toString()}),e=512*Math.ceil(parseInt(e,8)/512),r.moveForwardsBy(e+377)};r.hasMore()&&!n(););return r.consumeWhile(0),r.carve()}},{name:"Roshal Archive",extension:"rar",mime:"application/x-rar-compressed",description:"",signature:{0:82,1:97,2:114,3:33,4:26,5:7,6:[0,1]},extractor:null},{name:"Gzip",extension:"gz",mime:"application/gzip",description:"",signature:{0:31,1:139,2:8},extractor:function(e,t){var r=new oe(e.slice(t));r.moveForwardsBy(3);var n=r.readInt(1);if(r.moveForwardsBy(4),r.readInt(1),r.moveForwardsBy(1),4&n){var i=r.readInt(2,"le");r.moveForwardsby(i)}return 8&n&&(r.continueUntil(0),r.moveForwardsBy(1)),16&n&&(r.continueUntil(0),r.moveForwardsBy(1)),2&n&&r.moveForwardsBy(2),ge(r),r.moveForwardsBy(8),r.carve()}},{name:"Bzip2",extension:"bz2",mime:"application/x-bzip2",description:"",signature:{0:66,1:90,2:104},extractor:function(e,t){for(var r=new oe(e.slice(t)),n=[[119,36,83,133,9],[238,72,167,10,18],[220,145,78,20,36],[185,34,156,40,72],[114,69,56,80,144],[187,146,41,194,132],[93,201,20,225,66],[46,228,138,112,161],[23,114,69,56,80]],i=0;i<n.length&&(r.continueUntil(n[i]),r.getBytes(5).join("")!==n[i].join(""));i++)r.moveTo(0);return r.moveForwardsBy(4),r.carve()}},{name:"7zip",extension:"7z",mime:"application/x-7z-compressed",description:"",signature:{0:55,1:122,2:188,3:175,4:39,5:28},extractor:null},{name:"Zlib Deflate",extension:"zlib",mime:"application/x-deflate",description:"",signature:{0:120,1:[1,156,218,94]},extractor:function(e,t){var r=new oe(e.slice(t));return r.moveForwardsBy(1),32&r.readInt(1)&&r.moveForwardsBy(4),ge(r),r.moveForwardsBy(4),r.carve()}},{name:"xz compression",extension:"xz",mime:"application/x-xz",description:"",signature:{0:253,1:55,2:122,3:88,4:90,5:0},extractor:function(e,t){var r=new oe(e.slice(t));return r.continueUntil([0,0,0,0,4,89,90]),r.moveForwardsBy(7),r.carve()}},{name:"Tarball",extension:"tar.z",mime:"application/x-gtar",description:"",signature:{0:31,1:[157,160]},extractor:null},{name:"ISO disk image",extension:"iso",mime:"application/octet-stream",description:"ISO 9660 CD/DVD image file",signature:[{32769:67,32770:68,32771:48,32772:48,32773:49},{34817:67,34818:68,34819:48,34820:48,34821:49},{36865:67,36866:68,36867:48,36868:48,36869:49}],extractor:null},{name:"Virtual Machine Disk",extension:"vmdk",mime:"application/vmdk,application/x-virtualbox-vmdk",description:"",signature:{0:75,1:68,2:77,3:86,5:0,6:0,7:0},extractor:null},{name:"Virtual Hard Drive",extension:"vhd",mime:"application/x-vhd",description:"",signature:{0:99,1:111,2:110,3:101,4:99,5:116,6:105,7:120},extractor:null},{name:"Macintosh disk image",extension:"dmf,dmg",mime:"application/octet-stream",description:"",signature:{0:120,1:1,2:115,3:13,4:98,5:98,6:96,7:96},extractor:null},{name:"ARJ Archive",extension:"arj",mime:"application/x-arj-compressed",description:"",signature:{0:96,1:234,8:[0,16,20],9:0,10:2},extractor:null},{name:"WinAce Archive",extension:"ace",mime:"application/x-ace-compressed",description:"",signature:{7:42,8:42,9:65,10:67,11:69,12:42,13:42},extractor:null},{name:"Macintosh BinHex Encoded File",extension:"hqx",mime:"application/mac-binhex",description:"",signature:{11:109,12:117,13:115,14:116,15:32,16:98,17:101,18:32,19:99,20:111,21:110,22:118,23:101,24:114,25:116,26:101,27:100,28:32,29:119,30:105,31:116,32:104,33:32,34:66,35:105,36:110,37:72,38:101,39:120},extractor:null},{name:"ALZip Archive",extension:"alz",mime:"application/octet-stream",description:"",signature:{0:65,1:76,2:90,3:1,4:10,5:0,6:0,7:0},extractor:null},{name:"KGB Compressed Archive",extension:"kgb",mime:"application/x-kgb-compressed",description:"",signature:{0:75,1:71,2:66,3:95,4:97,5:114,6:99,7:104,8:32,9:45},extractor:null},{name:"Microsoft Cabinet",extension:"cab",mime:"vnd.ms-cab-compressed",description:"",signature:{0:77,1:83,2:67,3:70,4:0,5:0,6:0,7:0},extractor:null},{name:"Jar Archive",extension:"jar",mime:"application/java-archive",description:"",signature:{0:95,1:39,2:168,3:137},extractor:null},{name:"Jar Archive",extension:"jar",mime:"application/java-archive",description:"",signature:{0:80,1:75,2:3,3:4,4:20,5:0,6:8,7:0,8:8,9:0},extractor:ce},{name:"lzop compressed",extension:"lzop,lzo",mime:"application/x-lzop",description:"",signature:{0:137,1:76,2:90,3:79,4:0,5:13,6:10,7:26},extractor:function(e,t){var r=new oe(e.slice(t)),n=0,i=0;r.moveForwardsBy(9);var o=r.readInt(2,"be");r.moveForwardsBy(6);var s=r.readInt(4,"be");2048&o&&r.moveForwardsBy(4),2&s&&n++,512&s&&n++,1&s&&i++,256&s&&i++,r.moveForwardsBy(8),o>=2368&&r.moveForwardsBy(4);var a=r.readInt(1,"be");if(r.moveForwardsBy(a),64&s){var u=r.readInt(4,"be");r.moveForwardsBy(u)}for(r.moveForwardsBy(4);r.hasMore();){var c=r.readInt(4,"be");if(0===c)break;var f=r.readInt(4,"be"),l=c===f?i:i+n;r.moveForwardsBy(f+4*l)}return r.carve()}},{name:"Linux deb package",extension:"deb",mime:"application/vnd.debian.binary-package",description:"",signature:{0:33,1:60,2:97,3:114,4:99,5:104,6:62},extractor:function(e,t){var r=new oe(e.slice(t));for(r.moveForwardsBy(8);r.hasMore();){r.moveForwardsBy(48);var n,i="",o=se(r.getBytes(10));try{for(o.s();!(n=o.n()).done;){var s=n.value;i+=String.fromCharCode(s)}}catch(e){o.e(e)}finally{o.f()}i=parseInt(i.trim(),10),r.moveForwardsBy(2),r.moveForwardsBy(i)}return r.carve()}},{name:"Apple Disk Image",extension:"dmg",mime:"application/x-apple-diskimage",description:"",signature:{0:120,1:1,2:115,3:13,4:98,5:98,6:96},extractor:null}],Miscellaneous:[{name:"UTF-8 text",extension:"txt",mime:"text/plain",description:"UTF-8 encoded Unicode byte order mark, commonly but not exclusively seen in text files.",signature:{0:239,1:187,2:191},extractor:null},{name:"UTF-32 LE text",extension:"utf32le",mime:"charset/utf32le",description:"Little-endian UTF-32 encoded Unicode byte order mark.",signature:{0:255,1:254,2:0,3:0},extractor:null},{name:"UTF-16 LE text",extension:"utf16le",mime:"charset/utf16le",description:"Little-endian UTF-16 encoded Unicode byte order mark.",signature:{0:255,1:254},extractor:null},{name:"Web Open Font Format",extension:"woff",mime:"application/font-woff",description:"",signature:{0:119,1:79,2:70,3:70,4:0,5:1,6:0,7:0},extractor:null},{name:"Web Open Font Format 2",extension:"woff2",mime:"application/font-woff",description:"",signature:{0:119,1:79,2:70,3:50,4:0,5:1,6:0,7:0},extractor:null},{name:"Embedded OpenType font",extension:"eot",mime:"application/octet-stream",description:"",signature:[{8:2,9:0,10:1,34:76,35:80},{8:1,9:0,10:0,34:76,35:80},{8:2,9:0,10:2,34:76,35:80}],extractor:null},{name:"TrueType Font",extension:"ttf",mime:"application/font-sfnt",description:"",signature:{0:0,1:1,2:0,3:0,4:0},extractor:null},{name:"OpenType Font",extension:"otf",mime:"application/font-sfnt",description:"",signature:{0:79,1:84,2:84,3:79,4:0},extractor:null},{name:"SQLite",extension:"sqlite",mime:"application/x-sqlite3",description:"",signature:{0:83,1:81,2:76,3:105},extractor:function(e,t){var r=new oe(e.slice(t));r.moveTo(16);var n=r.readInt(2);r.moveTo(28);var i=r.readInt(4);return r.moveTo(n*i),r.carve()}},{name:"BitTorrent link",extension:"torrent",mime:"application/x-bittorrent",description:"",signature:[{0:100,1:56,2:58,3:97,4:110,5:110,6:111,7:117,8:110,9:99,10:101,11:35,12:35,13:58},{0:100,1:52,2:58,3:105,4:110,5:102,6:111,7:100,8:[52,53,54],9:58}],extractor:null},{name:"Cryptocurrency wallet",extension:"wallet",mime:"application/octet-stream",description:"",signature:{0:0,1:0,2:0,3:0,4:1,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:98,13:49,14:5,15:0},extractor:null},{name:"Registry fragment",extension:"hbin",mime:"application/octet-stream",description:"",signature:{0:104,1:98,2:105,3:110,4:0},extractor:null},{name:"Registry script",extension:"rgs",mime:"application/octet-stream",description:"",signature:{0:72,1:75,2:67,3:82,4:13,5:10,6:92,7:123},extractor:null},{name:"WinNT Registry Hive",extension:"registry",mime:"application/octet-stream",description:"",signature:{0:114,1:101,2:103,3:102},extractor:null},{name:"Windows Event Log",extension:"evt",mime:"application/octet-stream",description:"",signature:{0:48,1:0,2:0,3:0,4:76,5:102,6:76,7:101},extractor:function(e,t){var r=new oe(e.slice(t));r.moveTo(20);var n=r.readInt(4,"le");r.moveTo(n);var i=r.readInt(4,"le");return r.moveForwardsBy(i-4),r.carve()}},{name:"Windows Event Log",extension:"evtx",mime:"application/octet-stream",description:"",signature:{0:69,1:108,2:102,3:70,4:105,5:108,6:101},extractor:function(e,t){var r=new oe(e.slice(t));r.moveTo(40);var n=r.readInt(4,"le")-44;for(r.moveForwardsBy(n);r.hasMore()&&r.getBytes(7).join("")===[69,108,102,67,104,110,107].join("");)r.moveForwardsBy(65529);return r.consumeWhile(0),r.carve()}},{name:"Windows Pagedump",extension:"dmp",mime:"application/octet-stream",description:"",signature:{0:80,1:65,2:71,3:69,4:68,5:85,6:[77,54],7:[80,52]},extractor:function(e,t){var r=new oe(e.slice(t));return r.moveTo(112),r.moveTo(4096*(r.readInt(4,"le")+1)),r.carve()}},{name:"Windows Prefetch",extension:"pf",mime:"application/x-pf",description:"",signature:{0:[17,23,26],1:0,2:0,3:0,4:83,5:67,6:67,7:65},extractor:function(e,t){var r=new oe(e.slice(t));return r.moveTo(12),r.moveTo(r.readInt(4,"be")),r.carve()}},{name:"Windows Prefetch (Win 10)",extension:"pf",mime:"application/x-pf",description:"",signature:{0:77,1:65,2:77,3:4,7:0},extractor:function(e,t){var r=new oe(e.slice(t));return r.moveTo(r.readInt(4,"be")),r.carve()}},{name:"PList (XML)",extension:"plist",mime:"application/xml",description:"",signature:{39:60,40:33,41:68,42:79,43:67,44:84,45:89,46:80,47:69,48:32,49:112,50:108,51:105,52:115,53:116},extractor:function(e,t){var r=new oe(e.slice(t)),n=0;for(r.continueUntil([60,112,108,105,115,116]),r.moveForwardsBy(6),n++;n>0&&r.hasMore();)60===r.readInt(1)&&(r.getBytes(5).join("")===[112,108,105,115,116].join("")?n++:r.moveBackwardsBy(5),r.getBytes(7).join("")===[47,112,108,105,115,116,62].join("")?n--:r.moveBackwardsBy(7));return r.consumeIf(10),r.carve()}},{name:"PList (binary)",extension:"bplist,plist,ipmeta,abcdp,mdbackup,mdinfo,strings,nib,ichat,qtz,webbookmark,webhistory",mime:"application/x-plist",description:"",signature:{0:98,1:112,2:108,3:105,4:115,5:116,6:48,7:48},extractor:null},{name:"MacOS X Keychain",extension:"keychain",mime:"application/octet-stream",description:"",signature:{0:107,1:121,2:99,3:104,4:0,5:1},extractor:function(e,t){var r=new oe(e.slice(t));return r.moveTo(20),r.moveForwardsBy(r.readInt(4)),r.carve()}},{name:"TCP Packet",extension:"tcp",mime:"application/tcp",description:"",signature:{12:8,13:0,14:69,15:0,21:0,22:function(e){return e>=1&&e<=128},23:6},extractor:null},{name:"UDP Packet",extension:"udp",mime:"application/udp",description:"",signature:{12:8,13:0,14:69,15:0,16:[0,1,2,3,4,5],22:function(e){return e>=1&&e<=128},23:17},extractor:null},{name:"Compiled HTML",extension:"chm,chw,chi",mime:"application/vnd.ms-htmlhelp",description:"",signature:{0:73,1:84,2:83,3:70,4:3,5:0,6:0,7:0},extractor:null},{name:"Windows Password",extension:"pwl",mime:"application/octet-stream",description:"",signature:{0:227,1:130,2:133,3:150},extractor:null},{name:"Bitlocker recovery key",extension:"bitlocker",mime:"application/octet-stream",description:"",signature:{0:255,1:254,2:66,3:0,4:105,5:0,6:116,7:0,8:76,9:0,10:111,11:0,12:99,13:0,14:107,15:0,16:101,17:0,18:114,19:0,20:32,21:0},extractor:null},{name:"Certificate",extension:"cer,cat,p7b,p7c,p7m,p7s,swz,rsa,crl,crt,der",mime:"application/pkix-cert",description:"",signature:{0:48,1:130,4:[6,10,48]},extractor:null},{name:"Certificate",extension:"cat,swz,p7m",mime:"application/vnd.ms-pki.seccat",description:"",signature:{0:48,1:131,2:function(e){return 0!==e},5:6,6:9},extractor:null},{name:"PGP pubring",extension:"pkr,gpg",mime:"application/pgp-keys",description:"",signature:{0:153,1:1,2:[13,162],3:4},extractor:null},{name:"PGP secring",extension:"skr",mime:"application/pgp-keys",description:"",signature:[{0:149,1:1,2:207,3:4},{0:149,1:3,2:198,3:4},{0:149,1:5,2:134,3:4}],extractor:null},{name:"PGP Safe",extension:"pgd",mime:"application/pgp-keys",description:"",signature:{0:80,1:71,2:80,3:100,4:77,5:65,6:73,7:78,8:96,9:1,10:0},extractor:null},{name:"Task Scheduler",extension:"job",mime:"application/octet-stream",description:"",signature:{0:[0,1,2,3],1:[5,6],2:1,3:0,20:70,21:0},extractor:null},{name:"Windows Shortcut",extension:"lnk",mime:"application/x-ms-shortcut",description:"",signature:{0:76,1:0,2:0,3:0,4:1,5:20,6:2,7:0,8:0,9:0,10:0,11:0,12:192,13:0,14:0,15:0,16:0,17:0,18:0,19:70},extractor:function(e,t){var r=new oe(e.slice(t));return r.moveTo(52),r.moveTo(r.readInt(4,"le")),r.carve()}},{name:"Bash",extension:"bash",mime:"application/bash",description:"",signature:{0:35,1:33,2:47,3:98,4:105,5:110,6:47,7:98,8:97,9:115,10:104},extractor:null},{name:"Shell",extension:"sh",mime:"application/sh",description:"",signature:{0:35,1:33,2:47,3:98,4:105,5:110,6:47,7:115,8:104},extractor:null},{name:"Python",extension:"py,pyc,pyd,pyo,pyw,pyz",mime:"application/python",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:112,12:121,13:116,14:104,15:111,16:110,17:[50,51,10,13]},extractor:null},{name:"Ruby",extension:"rb",mime:"application/ruby",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:114,12:117,13:98,14:121},extractor:null},{name:"perl",extension:"pl,pm,t,pod",mime:"application/perl",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:112,12:101,13:114,14:108},extractor:null},{name:"php",extension:"php,phtml,php3,php4,php5,php7,phps,php-s,pht,phar",mime:"application/php",description:"",signature:{0:60,1:63,2:112,3:104,4:112},extractor:null},{name:"Smile",extension:"sml",mime:"\tapplication/x-jackson-smile",description:"",signature:{0:58,1:41,2:10},extractor:null},{name:"Lua Bytecode",extension:"luac",mime:"application/x-lua",description:"",signature:{0:27,1:76,2:117,3:97},extractor:null},{name:"WebAssembly binary",extension:"wasm",mime:"application/octet-stream",description:"",signature:{0:0,1:97,2:115,3:109},extractor:null}]};function ce(e,t){var r=new oe(e.slice(t));r.continueUntil([80,75,5,6]),r.moveForwardsBy(20);var n=r.readInt(2,"le");return r.moveForwardsBy(n),r.carve()}function fe(e,t){var r="207250237254",n=new oe(e.slice(t)),i=n.getBytes(4).join("");return n.moveTo(function(e,t,r){var n=28;t&&(n+=4),e.moveTo(16);var i=e.readInt(4,r);return function(e,t,r,n){for(var i=0,o=0;o<n;o++){e.moveTo(t);var s=e.readInt(4,r);25===s?(e.moveTo(t+48),i+=e.readInt(8,r),e.moveTo(t+4),t+=e.readInt(4,r)):1===s&&(e.moveTo(t+36),i+=e.readInt(4,r),e.moveTo(t+4),t+=e.readInt(4,r))}return i}(e,n,r,i)}(n,function(e){return e===r||"254237250207"===e}(i),function(e){return"206250237254"===e||e===r}(i)?"le":"be")),n.carve()}for(var le=new Array(288),he=0;he<le.length;he++)le[he]=he<=143?8:he<=255?9:he<=279?7:8;var pe=we(le),de=we(new Array(30).fill(5)),ye=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function ge(e){for(var t=0;!t;){t=e.readBits(1,"le");var r=e.readBits(2,"le");if(0===r){e.moveForwardsBy(1);var n=e.readInt(2,"le");e.moveForwardsBy(2+n)}else if(1===r)be(e,pe,de);else{if(2!==r)throw new Error(`Invalid block type while parsing DEFLATE stream at pos ${e.position}`);for(var i=e.readBits(5,"le")+257,o=e.readBits(5,"le")+1,s=e.readBits(4,"le")+4,a=new Uint8Array(ye.length),u=0;u<s;u++)a[ye[u]]=e.readBits(3,"le");for(var c=we(a),f=new Uint8Array(i+o),l=void 0,h=void 0,p=void 0,d=0;d<i+o;)switch(l=_e(e,c)){case 16:for(h=3+e.readBits(2,"le");h--;)f[d++]=p;break;case 17:for(h=3+e.readBits(3,"le");h--;)f[d++]=0;p=0;break;case 18:for(h=11+e.readBits(7,"le");h--;)f[d++]=0;p=0;break;default:f[d++]=l,p=l}be(e,we(f.subarray(0,i)),we(f.subarray(i)))}}e.bitPos>0&&e.moveForwardsBy(1)}var me=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],ve=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function be(e,t,r){for(var n,i=0;(n=_e(e,t))&&256!==n;){if(++i>1e4)throw new Error("Caught in probable infinite loop while parsing Huffman Block");n<256||(e.readBits(me[n-257],"le"),n=_e(e,r),e.readBits(ve[n],"le"))}}function we(e){for(var t=Math.max.apply(Math,e),r=Math.min.apply(Math,e),n=1<<t,i=new Uint32Array(n),o=1,s=0,a=2;o<=t;){for(var u=0;u<e.length;u++)if(e[u]===o){var c=void 0,f=void 0,l=void 0;for(c=0,f=s,l=0;l<o;l++)c=c<<1|1&f,f>>=1;for(var h=o<<16|u,p=c;p<n;p+=a)i[p]=h;s++}o++,s<<=1,a<<=1}return[i,t,r]}function _e(e,t){var r,n,i=(n=2,function(e){if(Array.isArray(e))return e}(r=t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,s,a=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(a.push(n.value),a.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}(r,n)||y(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=i[0],s=i[1],a=o[e.readBits(s,"le")&(1<<s)-1],u=a>>>16;if(u>s)throw new Error(`Invalid Huffman Code length while parsing DEFLATE block at pos ${e.position}: ${u}`);return e.moveBackwardsByBits(s-u),65535&a}function Ee(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(e.length){for(var n=0;n<e.length;n++)if(xe(e[n],t,r))return!0;return!1}return xe(e,t,r)}function xe(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;for(var n in e){var i=parseInt(n,10)+r;switch(typeof e[n]){case"number":if(t[i]!==e[n])return!1;break;case"object":if(e[n].indexOf(t[i])<0)return!1;break;case"function":if(!e[n](t[i]))return!1;break;default:throw new Error(`Unrecognised signature type at offset ${n}`)}}return!0}const Se=function(){return o(function t(){e(this,t)},null,[{key:"checkForValue",value:function(e){if(void 0===e)throw new Error("only use translation methods with .bind")}},{key:"toArrayBuffer",value:function(){throw new Error("toArrayBuffer has not been implemented")}},{key:"fromArrayBuffer",value:function(){throw new Error("fromArrayBuffer has not been implemented")}}])}();function Ae(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ae=function(){return!!e})()}const Be=function(t){function r(){return e(this,r),t=this,i=arguments,n=a(n=r),s(t,Ae()?Reflect.construct(n,i||[],a(t).constructor):n.apply(t,i));var t,n,i}return c(r,t),o(r,null,[{key:"toArrayBuffer",value:function(){r.checkForValue(this.value),this.value=new Uint8Array(this.value).buffer}},{key:"fromArrayBuffer",value:function(){r.checkForValue(this.value),this.value=Array.prototype.slice.call(new Uint8Array(this.value))}}])}(Se);function Oe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Oe=function(){return!!e})()}const ke=function(t){function r(){return e(this,r),t=this,i=arguments,n=a(n=r),s(t,Oe()?Reflect.construct(n,i||[],a(t).constructor):n.apply(t,i));var t,n,i}return c(r,t),o(r,null,[{key:"toArrayBuffer",value:function(){r.checkForValue(this.value),this.value=ie.isBigNumber(this.value)?U.strToArrayBuffer(this.value.toFixed()):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(){r.checkForValue(this.value);try{this.value=new ie(U.arrayBufferToStr(this.value))}catch(e){this.value=new ie(NaN)}}}])}(Se);function Te(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Te=function(){return!!e})()}const Ie=function(t){function r(){return e(this,r),t=this,i=arguments,n=a(n=r),s(t,Te()?Reflect.construct(n,i||[],a(t).constructor):n.apply(t,i));var t,n,i}return c(r,t),o(r,null,[{key:"toArrayBuffer",value:function(){var e=this;if(r.checkForValue(this.value),!R())return new Promise(function(t,r){U.readFile(e.value).then(function(t){return e.value=t.buffer}).then(t).catch(r)});this.value=U.readFileSync(this.value)}},{key:"fromArrayBuffer",value:function(){r.checkForValue(this.value),this.value=new File(this.value,"unknown")}}])}(Se);function Ne(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ne=function(){return!!e})()}const Fe=function(t){function r(){return e(this,r),t=this,i=arguments,n=a(n=r),s(t,Ne()?Reflect.construct(n,i||[],a(t).constructor):n.apply(t,i));var t,n,i}return c(r,t),o(r,null,[{key:"toArrayBuffer",value:function(){r.checkForValue(this.value),this.value=this.value?U.strToArrayBuffer(this.value):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(){r.checkForValue(this.value),this.value=this.value?U.arrayBufferToStr(this.value):""}}])}(Se);function Re(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Re=function(){return!!e})()}const je=function(t){function r(){return e(this,r),t=this,i=arguments,n=a(n=r),s(t,Re()?Reflect.construct(n,i||[],a(t).constructor):n.apply(t,i));var t,n,i}return c(r,t),o(r,null,[{key:"toArrayBuffer",value:function(){r.checkForValue(this.value),this.value=this.value?U.strToArrayBuffer(U.unescapeHtml(U.stripHtmlTags(this.value,!0))):new ArrayBuffer}}])}(Fe);function Le(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Le=function(){return!!e})()}const Ue=function(t){function r(){return e(this,r),t=this,i=arguments,n=a(n=r),s(t,Le()?Reflect.construct(n,i||[],a(t).constructor):n.apply(t,i));var t,n,i}return c(r,t),o(r,null,[{key:"toArrayBuffer",value:function(){r.checkForValue(this.value),this.value=void 0!==this.value?U.strToArrayBuffer(JSON.stringify(this.value,null,4)):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(){r.checkForValue(this.value),this.value=JSON.parse(U.arrayBufferToStr(this.value))}}])}(Se);function Pe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Pe=function(){return!!e})()}const Ce=function(t){function r(){return e(this,r),t=this,i=arguments,n=a(n=r),s(t,Pe()?Reflect.construct(n,i||[],a(t).constructor):n.apply(t,i));var t,n,i}return c(r,t),o(r,null,[{key:"toArrayBuffer",value:(i=l(p().mark(function e(){return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r.checkForValue(this.value),!R()){e.next=1;break}this.value=this.value.map(function(e){return Uint8Array.from(e.data)}),e.next=3;break;case 1:return e.next=2,r.concatenateTypedArraysWithTypedElements.apply(r,g(this.value));case 2:this.value=e.sent;case 3:case"end":return e.stop()}},e,this)})),function(){return i.apply(this,arguments)})},{key:"fromArrayBuffer",value:function(){r.checkForValue(this.value),this.value=[new File(this.value,"unknown")]}},{key:"concatenateTypedArraysWithTypedElements",value:(n=l(p().mark(function e(){var t,r,n,i,o,s,a,u,c,f,l,h,d,y=arguments;return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=0,r=y.length,n=new Array(r),i=0;i<r;i++)n[i]=y[i];for(o=0,s=n;o<s.length;o++)a=s[o],t+=a.size;u=new Uint8Array(t),c=0,f=0,l=n;case 1:if(!(f<l.length)){e.next=4;break}return h=l[f],e.next=2,U.readFile(h);case 2:d=e.sent,u.set(d,c),c+=d.length;case 3:f++,e.next=1;break;case 4:return e.abrupt("return",u);case 5:case"end":return e.stop()}},e)})),function(){return n.apply(this,arguments)})},{key:"concatenateTypedArrays",value:function(){for(var e=0,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];for(var i=0,o=r;i<o.length;i++)e+=o[i].length;for(var s=new Uint8Array(e),a=0,u=0,c=r;u<c.length;u++){var f=c[u];s.set(f,a),a+=f.length}return s}}]);var n,i}(Se);function Me(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Me=function(){return!!e})()}const De=function(t){function r(){return e(this,r),t=this,i=arguments,n=a(n=r),s(t,Me()?Reflect.construct(n,i||[],a(t).constructor):n.apply(t,i));var t,n,i}return c(r,t),o(r,null,[{key:"toArrayBuffer",value:function(){r.checkForValue(this.value),this.value="number"==typeof this.value?U.strToArrayBuffer(this.value.toString()):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(){r.checkForValue(this.value),this.value=this.value?parseFloat(U.arrayBufferToStr(this.value)):0}}])}(Se);var $e=function(){function t(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(e(this,t),this.value=new ArrayBuffer(0),this.type=t.ARRAY_BUFFER,r&&Object.prototype.hasOwnProperty.call(r,"value")&&Object.prototype.hasOwnProperty.call(r,"type"))this.set(r.value,r.type);else if(r&&null!==n)this.set(r,n);else if(r){var i=t.typeEnum(r.constructor.name);this.set(r,i)}}return o(t,[{key:"get",value:function(e){var r=this;return"string"==typeof e&&(e=t.typeEnum(e)),this.type!==e?R()?(this._translate(e),this.value):new Promise(function(t,n){r._translate(e).then(function(){t(r.value)}).catch(n)}):this.value}},{key:"set",value:function(e,r){if("string"==typeof r&&(r=t.typeEnum(r)),v().debug("Dish type: "+t.enumLookup(r)),this.value=e,this.type=r,!this.valid()){var n=U.truncate(JSON.stringify(this.value),25);throw new C(`Data is not a valid ${t.enumLookup(r)}: ${n}`)}}},{key:"presentAs",value:function(e){return this.clone().get(e)}},{key:"detectDishType",value:function(){var e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object.keys(ue);if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),!(e&&e.length>1))return[];var r=[],n={};for(var i in ue)t.includes(i)&&(n[i]=ue[i]);for(var o in n)n[o].forEach(function(t){Ee(t.signature,e)&&r.push(t)});return r}(new Uint8Array(this.value.slice(0,2048)));return e.length&&e[0].mime&&"text/plain"===e[0].mime?e[0].mime:null}},{key:"getTitle",value:(r=l(p().mark(function e(r){var n,i,o,s;return p().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n="",o=this.type,e.next=o===t.FILE?1:o===t.LIST_FILE?2:o===t.JSON?3:o===t.NUMBER||o===t.BIG_NUMBER?4:o===t.ARRAY_BUFFER||o===t.BYTE_ARRAY?5:6;break;case 1:return n=this.value.name,e.abrupt("continue",9);case 2:return n=`${this.value.length} file(s)`,e.abrupt("continue",9);case 3:return n="application/json",e.abrupt("continue",9);case 4:return n=this.value.toString(),e.abrupt("continue",9);case 5:if(null===(n=this.detectDishType())){e.next=6;break}return e.abrupt("continue",9);case 6:return e.prev=6,(i=this.clone()).value=i.value.slice(0,256),e.next=7,i.get(t.STRING);case 7:n=e.sent,e.next=9;break;case 8:e.prev=8,s=e.catch(6),v().error(`${t.enumLookup(this.type)} cannot be sliced. ${s}`);case 9:return e.abrupt("return",n.slice(0,r));case 10:case"end":return e.stop()}},e,this,[[6,8]])})),function(e){return r.apply(this,arguments)})},{key:"valid",value:function(){switch(this.type){case t.BYTE_ARRAY:if(!(this.value instanceof Uint8Array||this.value instanceof Array))return!1;for(var e=0;e<this.value.length;e++)if("number"!=typeof this.value[e]||this.value[e]<0||this.value[e]>255)return!1;return!0;case t.STRING:case t.HTML:return"string"==typeof this.value;case t.NUMBER:return"number"==typeof this.value;case t.ARRAY_BUFFER:return this.value instanceof ArrayBuffer;case t.BIG_NUMBER:if(ie.isBigNumber(this.value))return!0;if(Object.keys(this.value).sort().equals(["c","e","s"])){var r=new ie;return r.c=this.value.c,r.e=this.value.e,r.s=this.value.s,this.value=r,!0}return!1;case t.JSON:return!0;case t.FILE:return this.value instanceof File;case t.LIST_FILE:return this.value instanceof Array&&this.value.reduce(function(e,t){return e&&t instanceof File},!0);default:return!1}}},{key:"size",get:function(){switch(this.type){case t.BYTE_ARRAY:case t.STRING:case t.HTML:return this.value.length;case t.NUMBER:case t.BIG_NUMBER:return this.value.toString().length;case t.ARRAY_BUFFER:return this.value.byteLength;case t.JSON:return JSON.stringify(this.value).length;case t.FILE:return this.value.size;case t.LIST_FILE:return this.value.reduce(function(e,t){return e+t.size},0);default:return-1}}},{key:"clone",value:function(){var e=new t;switch(this.type){case t.STRING:case t.HTML:case t.NUMBER:case t.BIG_NUMBER:e.set(this.value,this.type);break;case t.BYTE_ARRAY:case t.JSON:e.set(JSON.parse(JSON.stringify(this.value)),this.type);break;case t.ARRAY_BUFFER:e.set(this.value.slice(0),this.type);break;case t.FILE:e.set(new File([this.value],this.value.name,{type:this.value.type,lastModified:this.value.lastModified}),this.type);break;case t.LIST_FILE:e.set(this.value.map(function(e){return new File([e],e.name,{type:e.type,lastModified:e.lastModified})}),this.type);break;default:throw new C("Cannot clone Dish, unknown type")}return e}},{key:"_translate",value:function(e){var r=this;if(v().debug(`Translating Dish from ${t.enumLookup(this.type)} to ${t.enumLookup(e)}`),!R())return new Promise(function(n,i){r._toArrayBuffer().then(function(){return r.type=t.ARRAY_BUFFER}).then(function(){r._fromArrayBuffer(e),n()}).catch(i)});this._toArrayBuffer(),this.type=t.ARRAY_BUFFER,this._fromArrayBuffer(e)}},{key:"_toArrayBuffer",value:function(){var e=this,r={browser:{[t.STRING]:function(){return Promise.resolve(Fe.toArrayBuffer.bind(e)())},[t.NUMBER]:function(){return Promise.resolve(De.toArrayBuffer.bind(e)())},[t.HTML]:function(){return Promise.resolve(je.toArrayBuffer.bind(e)())},[t.ARRAY_BUFFER]:function(){return Promise.resolve()},[t.BIG_NUMBER]:function(){return Promise.resolve(ke.toArrayBuffer.bind(e)())},[t.JSON]:function(){return Promise.resolve(Ue.toArrayBuffer.bind(e)())},[t.FILE]:function(){return Ie.toArrayBuffer.bind(e)()},[t.LIST_FILE]:function(){return Promise.resolve(Ce.toArrayBuffer.bind(e)())},[t.BYTE_ARRAY]:function(){return Promise.resolve(Be.toArrayBuffer.bind(e)())}},node:{[t.STRING]:function(){return Fe.toArrayBuffer.bind(e)()},[t.NUMBER]:function(){return De.toArrayBuffer.bind(e)()},[t.HTML]:function(){return je.toArrayBuffer.bind(e)()},[t.ARRAY_BUFFER]:function(){},[t.BIG_NUMBER]:function(){return ke.toArrayBuffer.bind(e)()},[t.JSON]:function(){return Ue.toArrayBuffer.bind(e)()},[t.FILE]:function(){return Ie.toArrayBuffer.bind(e)()},[t.LIST_FILE]:function(){return Ce.toArrayBuffer.bind(e)()},[t.BYTE_ARRAY]:function(){return Be.toArrayBuffer.bind(e)()}}};try{return r[R()?"node":"browser"][this.type]()}catch(e){throw new C(`Error translating from ${t.enumLookup(this.type)} to ArrayBuffer: ${e}`)}}},{key:"_fromArrayBuffer",value:function(e){var r=this,n={[t.STRING]:function(){return Fe.fromArrayBuffer.bind(r)()},[t.NUMBER]:function(){return De.fromArrayBuffer.bind(r)()},[t.HTML]:function(){return je.fromArrayBuffer.bind(r)()},[t.ARRAY_BUFFER]:function(){},[t.BIG_NUMBER]:function(){return ke.fromArrayBuffer.bind(r)()},[t.JSON]:function(){return Ue.fromArrayBuffer.bind(r)()},[t.FILE]:function(){return Ie.fromArrayBuffer.bind(r)()},[t.LIST_FILE]:function(){return Ce.fromArrayBuffer.bind(r)()},[t.BYTE_ARRAY]:function(){return Be.fromArrayBuffer.bind(r)()}};try{n[e](),this.type=e}catch(r){throw new C(`Error translating from ArrayBuffer to ${t.enumLookup(e)}: ${r}`)}}}],[{key:"typeEnum",value:function(e){switch(e.toLowerCase()){case"bytearray":case"byte array":return t.BYTE_ARRAY;case"string":return t.STRING;case"number":return t.NUMBER;case"html":return t.HTML;case"arraybuffer":case"array buffer":return t.ARRAY_BUFFER;case"bignumber":case"big number":return t.BIG_NUMBER;case"json":case"object":return t.JSON;case"file":return t.FILE;case"list<file>":return t.LIST_FILE;default:throw new C("Invalid data type string. No matching enum.")}}},{key:"enumLookup",value:function(e){switch(e){case t.BYTE_ARRAY:return"byteArray";case t.STRING:return"string";case t.NUMBER:return"number";case t.HTML:return"html";case t.ARRAY_BUFFER:return"ArrayBuffer";case t.BIG_NUMBER:return"BigNumber";case t.JSON:return"JSON";case t.FILE:return"File";case t.LIST_FILE:return"List<File>";default:throw new C("Invalid data type enum. No matching type.")}}}]);var r}();$e.BYTE_ARRAY=0,$e.STRING=1,$e.NUMBER=2,$e.HTML=3,$e.ARRAY_BUFFER=4,$e.BIG_NUMBER=5,$e.JSON=6,$e.FILE=7,$e.LIST_FILE=8;const ze=$e,He=function(){function t(r){e(this,t),this.name="",this.type="",this._value=null,this.disabled=!1,this.hint="",this.rows=0,this.toggleValues=[],this.target=null,this.defaultIndex=0,this.maxLength=null,this.min=null,this.max=null,this.step=1,r&&this._parseConfig(r)}return o(t,[{key:"_parseConfig",value:function(e){this.name=e.name,this.type=e.type,this.defaultValue=e.value,this.disabled=!!e.disabled,this.hint=e.hint||!1,this.rows=e.rows||!1,this.toggleValues=e.toggleValues,this.target=void 0!==e.target?e.target:null,this.defaultIndex=void 0!==e.defaultIndex?e.defaultIndex:0,this.maxLength=e.maxLength||null,this.min=e.min,this.max=e.max,this.step=e.step}},{key:"config",get:function(){return this._value}},{key:"value",get:function(){return this._value},set:function(e){this._value=t.prepare(e,this.type)}}],[{key:"prepare",value:function(e,t){var r;switch(t){case"binaryString":case"binaryShortString":case"editableOption":case"editableOptionShort":return U.parseEscapedChars(e);case"byteArray":return"string"==typeof e?O(e=e.replace(/\s+/g,"")):e;case"number":if(null===e)return e;if(r=parseFloat(e),isNaN(r))throw"Invalid ingredient value. Not a number: "+U.truncate(e.toString(),10);return r;default:return e}}}])}();var Ve=function(){return o(function t(){e(this,t),this._inputType=-1,this._outputType=-1,this._presentType=-1,this._breakpoint=!1,this._disabled=!1,this._flowControl=!1,this._manualBake=!1,this._ingList=[],this.name="",this.module="",this.description="",this.infoURL=null},[{key:"run",value:function(e,t){return e}},{key:"highlight",value:function(e,t){return!1}},{key:"highlightReverse",value:function(e,t){return!1}},{key:"present",value:function(e,t){return e}},{key:"inputType",get:function(){return ze.enumLookup(this._inputType)},set:function(e){this._inputType=ze.typeEnum(e)}},{key:"outputType",get:function(){return ze.enumLookup(this._outputType)},set:function(e){this._outputType=ze.typeEnum(e),this._presentType<0&&(this._presentType=this._outputType)}},{key:"presentType",get:function(){return ze.enumLookup(this._presentType)},set:function(e){this._presentType=ze.typeEnum(e)}},{key:"args",get:function(){return this._ingList.map(function(e){var t={name:e.name,type:e.type,value:e.defaultValue};return e.toggleValues&&(t.toggleValues=e.toggleValues),e.hint&&(t.hint=e.hint),e.rows&&(t.rows=e.rows),e.disabled&&(t.disabled=e.disabled),e.target&&(t.target=e.target),e.defaultIndex&&(t.defaultIndex=e.defaultIndex),e.maxLength&&(t.maxLength=e.maxLength),"number"==typeof e.min&&(t.min=e.min),"number"==typeof e.max&&(t.max=e.max),e.step&&(t.step=e.step),t})},set:function(e){var t=this;e.forEach(function(e){var r=new He(e);t.addIngredient(r)})}},{key:"config",get:function(){return{op:this.name,args:this._ingList.map(function(e){return e.config})}}},{key:"addIngredient",value:function(e){this._ingList.push(e)}},{key:"ingValues",get:function(){return this._ingList.map(function(e){return e.value})},set:function(e){var t=this;e.forEach(function(e,r){t._ingList[r].value=e})}},{key:"breakpoint",get:function(){return this._breakpoint},set:function(e){this._breakpoint=!!e}},{key:"disabled",get:function(){return this._disabled},set:function(e){this._disabled=!!e}},{key:"flowControl",get:function(){return this._flowControl},set:function(e){this._flowControl=!!e}},{key:"manualBake",get:function(){return this._manualBake},set:function(e){this._manualBake=!!e}}])}();const qe=Ve;var Ge=r(23809),We=r.n(Ge);function Ze(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ze=function(){return!!e})()}const Je=function(t){function r(){var t,n,i,o;return e(this,r),n=this,i=a(i=r),(t=s(n,Ze()?Reflect.construct(i,[],a(n).constructor):i.apply(n,o))).name="Avro to JSON",t.module="Serialise",t.description="Converts Avro encoded data into JSON.",t.infoURL="https://wikipedia.org/wiki/Apache_Avro",t.inputType="ArrayBuffer",t.outputType="string",t.args=[{name:"Force Valid JSON",type:"boolean",value:!0}],t}return c(r,t),o(r,[{key:"run",value:function(e,t){if(e.byteLength<=0)throw new S("Please provide an input.");var r=t[0];return new Promise(function(t,n){var i=[],o=new Uint8Array(e),s=new(We().streams.BlockDecoder);s.on("data",function(e){i.push(e)}).on("error",function(){n(new S("Error parsing Avro file."))}).on("end",function(){if(r)t(1===i.length?JSON.stringify(i[0],null,4):JSON.stringify(i,null,4));else{var e=i.reduce(function(e,t){return e+JSON.stringify(t)+"\n"},"");t(e)}}),s.write(o),s.end()})}}])}(qe);for(var Ye=[],Ke=[],Xe="undefined"!=typeof Uint8Array?Uint8Array:Array,Qe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",et=0;et<64;++et)Ye[et]=Qe[et],Ke[Qe.charCodeAt(et)]=et;function tt(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function rt(e){return Ye[e>>18&63]+Ye[e>>12&63]+Ye[e>>6&63]+Ye[63&e]}function nt(e,t,r){for(var n,i=[],o=t;o<r;o+=3)n=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),i.push(rt(n));return i.join("")}Ke["-".charCodeAt(0)]=62,Ke["_".charCodeAt(0)]=63;var it,ot,st=function(e){var t,r,n=tt(e),i=n[0],o=n[1],s=new Xe(function(e,t,r){return 3*(t+r)/4-r}(0,i,o)),a=0,u=o>0?i-4:i;for(r=0;r<u;r+=4)t=Ke[e.charCodeAt(r)]<<18|Ke[e.charCodeAt(r+1)]<<12|Ke[e.charCodeAt(r+2)]<<6|Ke[e.charCodeAt(r+3)],s[a++]=t>>16&255,s[a++]=t>>8&255,s[a++]=255&t;return 2===o&&(t=Ke[e.charCodeAt(r)]<<2|Ke[e.charCodeAt(r+1)]>>4,s[a++]=255&t),1===o&&(t=Ke[e.charCodeAt(r)]<<10|Ke[e.charCodeAt(r+1)]<<4|Ke[e.charCodeAt(r+2)]>>2,s[a++]=t>>8&255,s[a++]=255&t),s},at=function(e){for(var t,r=e.length,n=r%3,i=[],o=16383,s=0,a=r-n;s<a;s+=o)i.push(nt(e,s,s+o>a?a:s+o));return 1===n?(t=e[r-1],i.push(Ye[t>>2]+Ye[t<<4&63]+"==")):2===n&&(t=(e[r-2]<<8)+e[r-1],i.push(Ye[t>>10]+Ye[t>>4&63]+Ye[t<<2&63]+"=")),i.join("")},ut=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,f=-7,l=r?i-1:0,h=r?-1:1,p=e[t+l];for(l+=h,o=p&(1<<-f)-1,p>>=-f,f+=a;f>0;o=256*o+e[t+l],l+=h,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+e[t+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=c}return(p?-1:1)*s*Math.pow(2,o-n)},ct=function(e,t,r,n,i,o){var s,a,u,c=8*o-i-1,f=(1<<c)-1,l=f>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=f):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(s++,u/=2),s+l>=f?(a=0,s=f):s+l>=1?(a=(t*u-1)*Math.pow(2,i),s+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;e[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[r+p]=255&s,p+=d,s/=256,c-=8);e[r+p-d]|=128*y},ft=(it=function(e,t){var r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=o,t.SlowBuffer=function(e){return+e!=e&&(e=0),o.alloc(+e)},t.INSPECT_MAX_BYTES=50;var n=2147483647;function i(e){if(e>n)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,o.prototype),t}function o(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return s(e,t,r)}function s(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!o.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|h(e,t),n=i(r),s=n.write(e,t);return s!==r&&(n=n.slice(0,s)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(C(e,Uint8Array)){var t=new Uint8Array(e);return f(t.buffer,t.byteOffset,t.byteLength)}return c(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(e));if(C(e,ArrayBuffer)||e&&C(e.buffer,ArrayBuffer))return f(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(C(e,SharedArrayBuffer)||e&&C(e.buffer,SharedArrayBuffer)))return f(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return o.from(n,t,r);var s=function(e){if(o.isBuffer(e)){var t=0|l(e.length),r=i(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||M(e.length)?i(0):c(e):"Buffer"===e.type&&Array.isArray(e.data)?c(e.data):void 0}(e);if(s)return s;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(e))}function a(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return a(e),i(e<0?0:0|l(e))}function c(e){for(var t=e.length<0?0:0|l(e.length),r=i(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function f(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,o.prototype),n}function l(e){if(e>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return 0|e}function h(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||C(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+babelHelpers.typeof(e));var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return L(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return U(e).length;default:if(i)return n?-1:L(e).length;t=(""+t).toLowerCase(),i=!0}}function p(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return A(this,t,r);case"latin1":case"binary":return B(this,t,r);case"base64":return E(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function d(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function y(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),M(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=o.from(t,n)),o.isBuffer(t))return 0===t.length?-1:g(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):g(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function g(e,t,r,n,i){var o,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var f=-1;for(o=r;o<a;o++)if(c(e,o)===c(t,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===u)return f*s}else-1!==f&&(o-=o-f),f=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var l=!0,h=0;h<u;h++)if(c(e,o+h)!==c(t,h)){l=!1;break}if(l)return o}return-1}function m(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(M(a))return s;e[r+s]=a}return s}function v(e,t,r,n){return P(L(t,e.length-r),e,r,n)}function b(e,t,r,n){return P(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function w(e,t,r,n){return P(U(t),e,r,n)}function _(e,t,r,n){return P(function(e,t){for(var r,n,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=(r=e.charCodeAt(s))>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function E(e,t,r){return 0===t&&r===e.length?at(e):at(e.slice(t,r))}function x(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,s,a,u,c=e[i],f=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return function(e){var t=e.length;if(t<=S)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=S));return r}(n)}t.kMaxLength=n,o.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),o.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}}),o.poolSize=8192,o.from=function(e,t,r){return s(e,t,r)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array),o.alloc=function(e,t,r){return function(e,t,r){return a(e),e<=0?i(e):void 0!==t?"string"==typeof r?i(e).fill(t,r):i(e).fill(t):i(e)}(e,t,r)},o.allocUnsafe=function(e){return u(e)},o.allocUnsafeSlow=function(e){return u(e)},o.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==o.prototype},o.compare=function(e,t){if(C(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),C(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=o.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var s=e[r];if(C(s,Uint8Array))i+s.length>n.length?o.from(s).copy(n,i):Uint8Array.prototype.set.call(n,s,i);else{if(!o.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i)}i+=s.length}return n},o.byteLength=h,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)d(this,t,t+1);return this},o.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)d(this,t,t+3),d(this,t+1,t+2);return this},o.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)d(this,t,t+7),d(this,t+1,t+6),d(this,t+2,t+5),d(this,t+3,t+4);return this},o.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?x(this,0,e):p.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},r&&(o.prototype[r]=o.prototype.inspect),o.prototype.compare=function(e,t,r,n,i){if(C(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(e));if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var s=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),u=Math.min(s,a),c=this.slice(n,i),f=e.slice(t,r),l=0;l<u;++l)if(c[l]!==f[l]){s=c[l],a=f[l];break}return s<a?-1:a<s?1:0},o.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},o.prototype.indexOf=function(e,t,r){return y(this,e,t,r,!0)},o.prototype.lastIndexOf=function(e,t,r){return y(this,e,t,r,!1)},o.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return m(this,e,t,r);case"utf8":case"utf-8":return v(this,e,t,r);case"ascii":case"latin1":case"binary":return b(this,e,t,r);case"base64":return w(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var S=4096;function A(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function B(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function O(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=D[e[o]];return i}function k(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function T(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,r,n,i,s){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function N(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function F(e,t,r,n,i){return t=+t,r>>>=0,i||N(e,0,r,4),ct(e,t,r,n,23,4),r+4}function R(e,t,r,n,i){return t=+t,r>>>=0,i||N(e,0,r,8),ct(e,t,r,n,52,8),r+8}o.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,o.prototype),n},o.prototype.readUintLE=o.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},o.prototype.readUintBE=o.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},o.prototype.readUint8=o.prototype.readUInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),this[e]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},o.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},o.prototype.readInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||T(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(e,t){e>>>=0,t||T(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return e>>>=0,t||T(e,4,this.length),ut(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||T(e,4,this.length),ut(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||T(e,8,this.length),ut(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||T(e,8,this.length),ut(this,e,!1,52,8)},o.prototype.writeUintLE=o.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||I(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||I(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},o.prototype.writeUint8=o.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);I(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<r&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s|0)-a&255;return t+r},o.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);I(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s|0)-a&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeFloatLE=function(e,t,r){return F(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return F(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return R(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return R(this,e,t,!1,r)},o.prototype.copy=function(e,t,r,n){if(!o.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},o.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!o.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var i=e.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var s;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(s=t;s<r;++s)this[s]=e;else{var a=o.isBuffer(e)?e:o.from(e,n),u=a.length;if(0===u)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(s=0;s<r-t;++s)this[s+t]=a[s%u]}return this};var j=/[^+/0-9A-Za-z-_]/g;function L(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function U(e){return st(function(e){if((e=(e=e.split("=")[0]).trim().replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function P(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function C(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function M(e){return e!=e}var D=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},it(ot={exports:{}},ot.exports),ot.exports),lt=ft.Buffer;ft.SlowBuffer,ft.INSPECT_MAX_BYTES,ft.kMaxLength;var ht=function(e,t){return ht=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},ht(e,t)};function pt(e,t){function r(){this.constructor=e}ht(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var dt=function(){return dt=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},dt.apply(this,arguments)},yt=function(e){function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return pt(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),t}(Error),gt=function(e){function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return pt(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),t}(TypeError);function mt(e){return e&&e.Math==Math&&e}function vt(){return mt("object"==typeof globalThis&&globalThis)||mt("object"==typeof window&&window)||mt("object"==typeof self&&self)||mt("object"==typeof r.g&&r.g)||Function("return this")()}function bt(e){return e.toString().replace("function(","function (")}var wt=function(e){var t,r="object"==typeof(t=vt()).navigator&&"ReactNative"===t.navigator.product?"BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.":"BSON: No cryptographic implementation for random bytes present, falling back to a less secure implementation.";console.warn(r);for(var n=lt.alloc(e),i=0;i<e;++i)n[i]=Math.floor(256*Math.random());return n},_t=function(){if("undefined"!=typeof window){var e=window.crypto||window.msCrypto;if(e&&e.getRandomValues)return function(t){return e.getRandomValues(lt.alloc(t))}}return void 0!==r.g&&r.g.crypto&&r.g.crypto.getRandomValues?function(e){return r.g.crypto.getRandomValues(lt.alloc(e))}:wt}();function Et(e){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(e))}function xt(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)}function St(e){return"[object BigInt64Array]"===Object.prototype.toString.call(e)}function At(e){return"[object BigUint64Array]"===Object.prototype.toString.call(e)}function Bt(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function Ot(e){return kt(e)&&"[object Date]"===Object.prototype.toString.call(e)}function kt(e){return"object"==typeof e&&null!==e}function Tt(e,t){var r=!1;return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return r||(console.warn(t),r=!0),e.apply(this,n)}}function It(e){if(ArrayBuffer.isView(e))return lt.from(e.buffer,e.byteOffset,e.byteLength);if(Et(e))return lt.from(e);throw new gt("Must use either Buffer or TypedArray")}var Nt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15})$/i,Ft=function(e){return"string"==typeof e&&Nt.test(e)},Rt=function(e){if(!Ft(e))throw new gt('UUID string representations must be a 32 or 36 character hex string (dashes excluded/included). Format: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" or "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".');var t=e.replace(/-/g,"");return lt.from(t,"hex")},jt=function(e,t){return void 0===t&&(t=!0),t?e.toString("hex",0,4)+"-"+e.toString("hex",4,6)+"-"+e.toString("hex",6,8)+"-"+e.toString("hex",8,10)+"-"+e.toString("hex",10,16):e.toString("hex")},Lt=2147483647,Ut=-2147483648,Pt=(Math.pow(2,63),Math.pow(2,63),Math.pow(2,53)),Ct=-Math.pow(2,53),Mt=function(){function e(t,r){if(!(this instanceof e))return new e(t,r);if(!(null==t||"string"==typeof t||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||Array.isArray(t)))throw new gt("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=null!=r?r:e.BSON_BINARY_SUBTYPE_DEFAULT,null==t?(this.buffer=lt.alloc(e.BUFFER_SIZE),this.position=0):("string"==typeof t?this.buffer=lt.from(t,"binary"):Array.isArray(t)?this.buffer=lt.from(t):this.buffer=It(t),this.position=this.buffer.byteLength)}return e.prototype.put=function(t){if("string"==typeof t&&1!==t.length)throw new gt("only accepts single character String");if("number"!=typeof t&&1!==t.length)throw new gt("only accepts single character Uint8Array or Array");var r;if((r="string"==typeof t?t.charCodeAt(0):"number"==typeof t?t:t[0])<0||r>255)throw new gt("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=r;else{var n=lt.alloc(e.BUFFER_SIZE+this.buffer.length);this.buffer.copy(n,0,0,this.buffer.length),this.buffer=n,this.buffer[this.position++]=r}},e.prototype.write=function(e,t){if(t="number"==typeof t?t:this.position,this.buffer.length<t+e.length){var r=lt.alloc(this.buffer.length+e.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r}ArrayBuffer.isView(e)?(this.buffer.set(It(e),t),this.position=t+e.byteLength>this.position?t+e.length:this.position):"string"==typeof e&&(this.buffer.write(e,t,e.length,"binary"),this.position=t+e.length>this.position?t+e.length:this.position)},e.prototype.read=function(e,t){return t=t&&t>0?t:this.position,this.buffer.slice(e,e+t)},e.prototype.value=function(e){return(e=!!e)&&this.buffer.length===this.position?this.buffer:e?this.buffer.slice(0,this.position):this.buffer.toString("binary",0,this.position)},e.prototype.length=function(){return this.position},e.prototype.toJSON=function(){return this.buffer.toString("base64")},e.prototype.toString=function(e){return this.buffer.toString(e)},e.prototype.toExtendedJSON=function(e){e=e||{};var t=this.buffer.toString("base64"),r=Number(this.sub_type).toString(16);return e.legacy?{$binary:t,$type:1===r.length?"0"+r:r}:{$binary:{base64:t,subType:1===r.length?"0"+r:r}}},e.prototype.toUUID=function(){if(this.sub_type===e.SUBTYPE_UUID)return new Dt(this.buffer.slice(0,this.position));throw new yt('Binary sub_type "'.concat(this.sub_type,'" is not supported for converting to UUID. Only "').concat(e.SUBTYPE_UUID,'" is currently supported.'))},e.fromExtendedJSON=function(t,r){var n,i;if(r=r||{},"$binary"in t?r.legacy&&"string"==typeof t.$binary&&"$type"in t?(i=t.$type?parseInt(t.$type,16):0,n=lt.from(t.$binary,"base64")):"string"!=typeof t.$binary&&(i=t.$binary.subType?parseInt(t.$binary.subType,16):0,n=lt.from(t.$binary.base64,"base64")):"$uuid"in t&&(i=4,n=Rt(t.$uuid)),!n)throw new gt("Unexpected Binary Extended JSON format ".concat(JSON.stringify(t)));return 4===i?new Dt(n):new e(n,i)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=this.value(!0);return'new Binary(Buffer.from("'.concat(e.toString("hex"),'", "hex"), ').concat(this.sub_type,")")},e.BSON_BINARY_SUBTYPE_DEFAULT=0,e.BUFFER_SIZE=256,e.SUBTYPE_DEFAULT=0,e.SUBTYPE_FUNCTION=1,e.SUBTYPE_BYTE_ARRAY=2,e.SUBTYPE_UUID_OLD=3,e.SUBTYPE_UUID=4,e.SUBTYPE_MD5=5,e.SUBTYPE_ENCRYPTED=6,e.SUBTYPE_COLUMN=7,e.SUBTYPE_USER_DEFINED=128,e}();Object.defineProperty(Mt.prototype,"_bsontype",{value:"Binary"});var Dt=function(e){function t(r){var n,i,o=this;if(null==r)n=t.generate();else if(r instanceof t)n=lt.from(r.buffer),i=r.__id;else if(ArrayBuffer.isView(r)&&16===r.byteLength)n=It(r);else{if("string"!=typeof r)throw new gt("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");n=Rt(r)}return(o=e.call(this,n,4)||this).__id=i,o}return pt(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this.buffer},set:function(e){this.buffer=e,t.cacheHexString&&(this.__id=jt(e))},enumerable:!1,configurable:!0}),t.prototype.toHexString=function(e){if(void 0===e&&(e=!0),t.cacheHexString&&this.__id)return this.__id;var r=jt(this.id,e);return t.cacheHexString&&(this.__id=r),r},t.prototype.toString=function(e){return e?this.id.toString(e):this.toHexString()},t.prototype.toJSON=function(){return this.toHexString()},t.prototype.equals=function(e){if(!e)return!1;if(e instanceof t)return e.id.equals(this.id);try{return new t(e).id.equals(this.id)}catch(e){return!1}},t.prototype.toBinary=function(){return new Mt(this.id,Mt.SUBTYPE_UUID)},t.generate=function(){var e=_t(16);return e[6]=15&e[6]|64,e[8]=63&e[8]|128,lt.from(e)},t.isValid=function(e){return!!e&&(e instanceof t||("string"==typeof e?Ft(e):!(!xt(e)||16!==e.length||64!=(240&e[6])||128&~e[8])))},t.createFromHexString=function(e){return new t(Rt(e))},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},t}(Mt),$t=function(){function e(t,r){if(!(this instanceof e))return new e(t,r);this.code=t,this.scope=r}return e.prototype.toJSON=function(){return{code:this.code,scope:this.scope}},e.prototype.toExtendedJSON=function(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}},e.fromExtendedJSON=function(t){return new e(t.$code,t.$scope)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=this.toJSON();return'new Code("'.concat(String(e.code),'"').concat(e.scope?", ".concat(JSON.stringify(e.scope)):"",")")},e}();function zt(e){return kt(e)&&null!=e.$id&&"string"==typeof e.$ref&&(null==e.$db||"string"==typeof e.$db)}Object.defineProperty($t.prototype,"_bsontype",{value:"Code"});var Ht=function(){function e(t,r,n,i){if(!(this instanceof e))return new e(t,r,n,i);var o=t.split(".");2===o.length&&(n=o.shift(),t=o.shift()),this.collection=t,this.oid=r,this.db=n,this.fields=i||{}}return Object.defineProperty(e.prototype,"namespace",{get:function(){return this.collection},set:function(e){this.collection=e},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){var e=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return null!=this.db&&(e.$db=this.db),e},e.prototype.toExtendedJSON=function(e){e=e||{};var t={$ref:this.collection,$id:this.oid};return e.legacy?t:(this.db&&(t.$db=this.db),t=Object.assign(t,this.fields))},e.fromExtendedJSON=function(t){var r=Object.assign({},t);return delete r.$ref,delete r.$id,delete r.$db,new e(t.$ref,t.$id,t.$db,r)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=void 0===this.oid||void 0===this.oid.toString?this.oid:this.oid.toString();return'new DBRef("'.concat(this.namespace,'", new ObjectId("').concat(String(e),'")').concat(this.db?', "'.concat(this.db,'"'):"",")")},e}();Object.defineProperty(Ht.prototype,"_bsontype",{value:"DBRef"});var Vt=void 0;try{Vt=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}var qt=4294967296,Gt=0x10000000000000000,Wt=Gt/2,Zt={},Jt={},Yt=function(){function e(t,r,n){if(void 0===t&&(t=0),!(this instanceof e))return new e(t,r,n);"bigint"==typeof t?Object.assign(this,e.fromBigInt(t,!!r)):"string"==typeof t?Object.assign(this,e.fromString(t,!!r)):(this.low=0|t,this.high=0|r,this.unsigned=!!n),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return e.fromBits=function(t,r,n){return new e(t,r,n)},e.fromInt=function(t,r){var n,i,o;return r?(o=0<=(t>>>=0)&&t<256)&&(i=Jt[t])?i:(n=e.fromBits(t,(0|t)<0?-1:0,!0),o&&(Jt[t]=n),n):(o=-128<=(t|=0)&&t<128)&&(i=Zt[t])?i:(n=e.fromBits(t,t<0?-1:0,!1),o&&(Zt[t]=n),n)},e.fromNumber=function(t,r){if(isNaN(t))return r?e.UZERO:e.ZERO;if(r){if(t<0)return e.UZERO;if(t>=Gt)return e.MAX_UNSIGNED_VALUE}else{if(t<=-Wt)return e.MIN_VALUE;if(t+1>=Wt)return e.MAX_VALUE}return t<0?e.fromNumber(-t,r).neg():e.fromBits(t%qt|0,t/qt|0,r)},e.fromBigInt=function(t,r){return e.fromString(t.toString(),r)},e.fromString=function(t,r,n){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return e.ZERO;if("number"==typeof r?(n=r,r=!1):r=!!r,(n=n||10)<2||36<n)throw RangeError("radix");var i;if((i=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===i)return e.fromString(t.substring(1),r,n).neg();for(var o=e.fromNumber(Math.pow(n,8)),s=e.ZERO,a=0;a<t.length;a+=8){var u=Math.min(8,t.length-a),c=parseInt(t.substring(a,a+u),n);if(u<8){var f=e.fromNumber(Math.pow(n,u));s=s.mul(f).add(e.fromNumber(c))}else s=(s=s.mul(o)).add(e.fromNumber(c))}return s.unsigned=r,s},e.fromBytes=function(t,r,n){return n?e.fromBytesLE(t,r):e.fromBytesBE(t,r)},e.fromBytesLE=function(t,r){return new e(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,r)},e.fromBytesBE=function(t,r){return new e(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],r)},e.isLong=function(e){return kt(e)&&!0===e.__isLong__},e.fromValue=function(t,r){return"number"==typeof t?e.fromNumber(t,r):"string"==typeof t?e.fromString(t,r):e.fromBits(t.low,t.high,"boolean"==typeof r?r:t.unsigned)},e.prototype.add=function(t){e.isLong(t)||(t=e.fromValue(t));var r=this.high>>>16,n=65535&this.high,i=this.low>>>16,o=65535&this.low,s=t.high>>>16,a=65535&t.high,u=t.low>>>16,c=0,f=0,l=0,h=0;return l+=(h+=o+(65535&t.low))>>>16,h&=65535,f+=(l+=i+u)>>>16,l&=65535,c+=(f+=n+a)>>>16,f&=65535,c+=r+s,c&=65535,e.fromBits(l<<16|h,c<<16|f,this.unsigned)},e.prototype.and=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low&t.low,this.high&t.high,this.unsigned)},e.prototype.compare=function(t){if(e.isLong(t)||(t=e.fromValue(t)),this.eq(t))return 0;var r=this.isNegative(),n=t.isNegative();return r&&!n?-1:!r&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},e.prototype.comp=function(e){return this.compare(e)},e.prototype.divide=function(t){if(e.isLong(t)||(t=e.fromValue(t)),t.isZero())throw Error("division by zero");if(Vt){if(!this.unsigned&&-2147483648===this.high&&-1===t.low&&-1===t.high)return this;var r=(this.unsigned?Vt.div_u:Vt.div_s)(this.low,this.high,t.low,t.high);return e.fromBits(r,Vt.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var n,i,o;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return e.UZERO;if(t.gt(this.shru(1)))return e.UONE;o=e.UZERO}else{if(this.eq(e.MIN_VALUE))return t.eq(e.ONE)||t.eq(e.NEG_ONE)?e.MIN_VALUE:t.eq(e.MIN_VALUE)?e.ONE:(n=this.shr(1).div(t).shl(1)).eq(e.ZERO)?t.isNegative()?e.ONE:e.NEG_ONE:(i=this.sub(t.mul(n)),o=n.add(i.div(t)));if(t.eq(e.MIN_VALUE))return this.unsigned?e.UZERO:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();o=e.ZERO}for(i=this;i.gte(t);){n=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var s=Math.ceil(Math.log(n)/Math.LN2),a=s<=48?1:Math.pow(2,s-48),u=e.fromNumber(n),c=u.mul(t);c.isNegative()||c.gt(i);)n-=a,c=(u=e.fromNumber(n,this.unsigned)).mul(t);u.isZero()&&(u=e.ONE),o=o.add(u),i=i.sub(c)}return o},e.prototype.div=function(e){return this.divide(e)},e.prototype.equals=function(t){return e.isLong(t)||(t=e.fromValue(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low},e.prototype.eq=function(e){return this.equals(e)},e.prototype.getHighBits=function(){return this.high},e.prototype.getHighBitsUnsigned=function(){return this.high>>>0},e.prototype.getLowBits=function(){return this.low},e.prototype.getLowBitsUnsigned=function(){return this.low>>>0},e.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.eq(e.MIN_VALUE)?64:this.neg().getNumBitsAbs();var t,r=0!==this.high?this.high:this.low;for(t=31;t>0&&!(r&1<<t);t--);return 0!==this.high?t+33:t+1},e.prototype.greaterThan=function(e){return this.comp(e)>0},e.prototype.gt=function(e){return this.greaterThan(e)},e.prototype.greaterThanOrEqual=function(e){return this.comp(e)>=0},e.prototype.gte=function(e){return this.greaterThanOrEqual(e)},e.prototype.ge=function(e){return this.greaterThanOrEqual(e)},e.prototype.isEven=function(){return!(1&this.low)},e.prototype.isNegative=function(){return!this.unsigned&&this.high<0},e.prototype.isOdd=function(){return!(1&~this.low)},e.prototype.isPositive=function(){return this.unsigned||this.high>=0},e.prototype.isZero=function(){return 0===this.high&&0===this.low},e.prototype.lessThan=function(e){return this.comp(e)<0},e.prototype.lt=function(e){return this.lessThan(e)},e.prototype.lessThanOrEqual=function(e){return this.comp(e)<=0},e.prototype.lte=function(e){return this.lessThanOrEqual(e)},e.prototype.modulo=function(t){if(e.isLong(t)||(t=e.fromValue(t)),Vt){var r=(this.unsigned?Vt.rem_u:Vt.rem_s)(this.low,this.high,t.low,t.high);return e.fromBits(r,Vt.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))},e.prototype.mod=function(e){return this.modulo(e)},e.prototype.rem=function(e){return this.modulo(e)},e.prototype.multiply=function(t){if(this.isZero())return e.ZERO;if(e.isLong(t)||(t=e.fromValue(t)),Vt){var r=Vt.mul(this.low,this.high,t.low,t.high);return e.fromBits(r,Vt.get_high(),this.unsigned)}if(t.isZero())return e.ZERO;if(this.eq(e.MIN_VALUE))return t.isOdd()?e.MIN_VALUE:e.ZERO;if(t.eq(e.MIN_VALUE))return this.isOdd()?e.MIN_VALUE:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(e.TWO_PWR_24)&&t.lt(e.TWO_PWR_24))return e.fromNumber(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,i=65535&this.high,o=this.low>>>16,s=65535&this.low,a=t.high>>>16,u=65535&t.high,c=t.low>>>16,f=65535&t.low,l=0,h=0,p=0,d=0;return p+=(d+=s*f)>>>16,d&=65535,h+=(p+=o*f)>>>16,p&=65535,h+=(p+=s*c)>>>16,p&=65535,l+=(h+=i*f)>>>16,h&=65535,l+=(h+=o*c)>>>16,h&=65535,l+=(h+=s*u)>>>16,h&=65535,l+=n*f+i*c+o*u+s*a,l&=65535,e.fromBits(p<<16|d,l<<16|h,this.unsigned)},e.prototype.mul=function(e){return this.multiply(e)},e.prototype.negate=function(){return!this.unsigned&&this.eq(e.MIN_VALUE)?e.MIN_VALUE:this.not().add(e.ONE)},e.prototype.neg=function(){return this.negate()},e.prototype.not=function(){return e.fromBits(~this.low,~this.high,this.unsigned)},e.prototype.notEquals=function(e){return!this.equals(e)},e.prototype.neq=function(e){return this.notEquals(e)},e.prototype.ne=function(e){return this.notEquals(e)},e.prototype.or=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low|t.low,this.high|t.high,this.unsigned)},e.prototype.shiftLeft=function(t){return e.isLong(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?e.fromBits(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):e.fromBits(0,this.low<<t-32,this.unsigned)},e.prototype.shl=function(e){return this.shiftLeft(e)},e.prototype.shiftRight=function(t){return e.isLong(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?e.fromBits(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):e.fromBits(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},e.prototype.shr=function(e){return this.shiftRight(e)},e.prototype.shiftRightUnsigned=function(t){if(e.isLong(t)&&(t=t.toInt()),0==(t&=63))return this;var r=this.high;if(t<32){var n=this.low;return e.fromBits(n>>>t|r<<32-t,r>>>t,this.unsigned)}return 32===t?e.fromBits(r,0,this.unsigned):e.fromBits(r>>>t-32,0,this.unsigned)},e.prototype.shr_u=function(e){return this.shiftRightUnsigned(e)},e.prototype.shru=function(e){return this.shiftRightUnsigned(e)},e.prototype.subtract=function(t){return e.isLong(t)||(t=e.fromValue(t)),this.add(t.neg())},e.prototype.sub=function(e){return this.subtract(e)},e.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},e.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*qt+(this.low>>>0):this.high*qt+(this.low>>>0)},e.prototype.toBigInt=function(){return BigInt(this.toString())},e.prototype.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},e.prototype.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},e.prototype.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},e.prototype.toSigned=function(){return this.unsigned?e.fromBits(this.low,this.high,!1):this},e.prototype.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(e.MIN_VALUE)){var r=e.fromNumber(t),n=this.div(r),i=n.mul(r).sub(this);return n.toString(t)+i.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var o=e.fromNumber(Math.pow(t,6),this.unsigned),s=this,a="";;){var u=s.div(o),c=(s.sub(u.mul(o)).toInt()>>>0).toString(t);if((s=u).isZero())return c+a;for(;c.length<6;)c="0"+c;a=""+c+a}},e.prototype.toUnsigned=function(){return this.unsigned?this:e.fromBits(this.low,this.high,!0)},e.prototype.xor=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low^t.low,this.high^t.high,this.unsigned)},e.prototype.eqz=function(){return this.isZero()},e.prototype.le=function(e){return this.lessThanOrEqual(e)},e.prototype.toExtendedJSON=function(e){return e&&e.relaxed?this.toNumber():{$numberLong:this.toString()}},e.fromExtendedJSON=function(t,r){var n=e.fromString(t.$numberLong);return r&&r.relaxed?n.toNumber():n},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Long("'.concat(this.toString(),'"').concat(this.unsigned?", true":"",")")},e.TWO_PWR_24=e.fromInt(16777216),e.MAX_UNSIGNED_VALUE=e.fromBits(-1,-1,!0),e.ZERO=e.fromInt(0),e.UZERO=e.fromInt(0,!0),e.ONE=e.fromInt(1),e.UONE=e.fromInt(1,!0),e.NEG_ONE=e.fromInt(-1),e.MAX_VALUE=e.fromBits(-1,2147483647,!1),e.MIN_VALUE=e.fromBits(0,-2147483648,!1),e}();Object.defineProperty(Yt.prototype,"__isLong__",{value:!0}),Object.defineProperty(Yt.prototype,"_bsontype",{value:"Long"});var Kt=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,Xt=/^(\+|-)?(Infinity|inf)$/i,Qt=/^(\+|-)?NaN$/i,er=6111,tr=-6176,rr=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),nr=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),ir=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),or=/^([-+])?(\d+)?$/;function sr(e){return!isNaN(parseInt(e,10))}function ar(e){var t=Yt.fromNumber(1e9),r=Yt.fromNumber(0);if(!(e.parts[0]||e.parts[1]||e.parts[2]||e.parts[3]))return{quotient:e,rem:r};for(var n=0;n<=3;n++)r=(r=r.shiftLeft(32)).add(new Yt(e.parts[n],0)),e.parts[n]=r.div(t).low,r=r.modulo(t);return{quotient:e,rem:r}}function ur(e,t){throw new gt('"'.concat(e,'" is not a valid Decimal128 string - ').concat(t))}var cr=function(){function e(t){if(!(this instanceof e))return new e(t);if("string"==typeof t)this.bytes=e.fromString(t).bytes;else{if(!xt(t))throw new gt("Decimal128 must take a Buffer or string");if(16!==t.byteLength)throw new gt("Decimal128 must take a Buffer of 16 bytes");this.bytes=t}}return e.fromString=function(t){var r,n=!1,i=!1,o=!1,s=0,a=0,u=0,c=0,f=0,l=[0],h=0,p=0,d=0,y=0,g=0,m=0,v=new Yt(0,0),b=new Yt(0,0),w=0;if(t.length>=7e3)throw new gt(t+" not a valid Decimal128 string");var _=t.match(Kt),E=t.match(Xt),x=t.match(Qt);if(!_&&!E&&!x||0===t.length)throw new gt(t+" not a valid Decimal128 string");if(_){var S=_[2],A=_[4],B=_[5],O=_[6];A&&void 0===O&&ur(t,"missing exponent power"),A&&void 0===S&&ur(t,"missing exponent base"),void 0===A&&(B||O)&&ur(t,"missing e before exponent")}if("+"!==t[w]&&"-"!==t[w]||(n="-"===t[w++]),!sr(t[w])&&"."!==t[w]){if("i"===t[w]||"I"===t[w])return new e(lt.from(n?nr:ir));if("N"===t[w])return new e(lt.from(rr))}for(;sr(t[w])||"."===t[w];)"."!==t[w]?(h<34&&("0"!==t[w]||o)&&(o||(f=a),o=!0,l[p++]=parseInt(t[w],10),h+=1),o&&(u+=1),i&&(c+=1),a+=1,w+=1):(i&&ur(t,"contains multiple periods"),i=!0,w+=1);if(i&&!a)throw new gt(t+" not a valid Decimal128 string");if("e"===t[w]||"E"===t[w]){var k=t.substr(++w).match(or);if(!k||!k[2])return new e(lt.from(rr));g=parseInt(k[0],10),w+=k[0].length}if(t[w])return new e(lt.from(rr));if(d=0,h){if(y=h-1,1!==(s=u))for(;0===l[f+s-1];)s-=1}else d=0,y=0,l[0]=0,u=1,h=1,s=0;for(g<=c&&c-g>16384?g=tr:g-=c;g>er;){if((y+=1)-d>34){if(l.join("").match(/^0+$/)){g=er;break}ur(t,"overflow")}g-=1}for(;g<tr||h<u;){if(0===y&&s<h){g=tr,s=0;break}if(h<u?u-=1:y-=1,g<er)g+=1;else{if(l.join("").match(/^0+$/)){g=er;break}ur(t,"overflow")}}if(y-d+1<s){var T=a;i&&(f+=1,T+=1),n&&(f+=1,T+=1);var I=parseInt(t[f+y+1],10),N=0;if(I>=5&&(N=1,5===I))for(N=l[y]%2==1?1:0,m=f+y+2;m<T;m++)if(parseInt(t[m],10)){N=1;break}if(N)for(var F=y;F>=0;F--)if(++l[F]>9&&(l[F]=0,0===F)){if(!(g<er))return new e(lt.from(n?nr:ir));g+=1,l[F]=1}}if(v=Yt.fromNumber(0),b=Yt.fromNumber(0),0===s)v=Yt.fromNumber(0),b=Yt.fromNumber(0);else if(y-d<17)for(F=d,b=Yt.fromNumber(l[F++]),v=new Yt(0,0);F<=y;F++)b=(b=b.multiply(Yt.fromNumber(10))).add(Yt.fromNumber(l[F]));else{for(F=d,v=Yt.fromNumber(l[F++]);F<=y-17;F++)v=(v=v.multiply(Yt.fromNumber(10))).add(Yt.fromNumber(l[F]));for(b=Yt.fromNumber(l[F++]);F<=y;F++)b=(b=b.multiply(Yt.fromNumber(10))).add(Yt.fromNumber(l[F]))}var R,j,L,U,P=function(e,t){if(!e&&!t)return{high:Yt.fromNumber(0),low:Yt.fromNumber(0)};var r=e.shiftRightUnsigned(32),n=new Yt(e.getLowBits(),0),i=t.shiftRightUnsigned(32),o=new Yt(t.getLowBits(),0),s=r.multiply(i),a=r.multiply(o),u=n.multiply(i),c=n.multiply(o);return s=s.add(a.shiftRightUnsigned(32)),a=new Yt(a.getLowBits(),0).add(u).add(c.shiftRightUnsigned(32)),{high:s=s.add(a.shiftRightUnsigned(32)),low:c=a.shiftLeft(32).add(new Yt(c.getLowBits(),0))}}(v,Yt.fromString("100000000000000000"));P.low=P.low.add(b),j=b,((L=(R=P.low).high>>>0)<(U=j.high>>>0)||L===U&&R.low>>>0<j.low>>>0)&&(P.high=P.high.add(Yt.fromNumber(1))),r=g+6176;var C={low:Yt.fromNumber(0),high:Yt.fromNumber(0)};P.high.shiftRightUnsigned(49).and(Yt.fromNumber(1)).equals(Yt.fromNumber(1))?(C.high=C.high.or(Yt.fromNumber(3).shiftLeft(61)),C.high=C.high.or(Yt.fromNumber(r).and(Yt.fromNumber(16383).shiftLeft(47))),C.high=C.high.or(P.high.and(Yt.fromNumber(0x7fffffffffff)))):(C.high=C.high.or(Yt.fromNumber(16383&r).shiftLeft(49)),C.high=C.high.or(P.high.and(Yt.fromNumber(562949953421311)))),C.low=P.low,n&&(C.high=C.high.or(Yt.fromString("9223372036854775808")));var M=lt.alloc(16);return w=0,M[w++]=255&C.low.low,M[w++]=C.low.low>>8&255,M[w++]=C.low.low>>16&255,M[w++]=C.low.low>>24&255,M[w++]=255&C.low.high,M[w++]=C.low.high>>8&255,M[w++]=C.low.high>>16&255,M[w++]=C.low.high>>24&255,M[w++]=255&C.high.low,M[w++]=C.high.low>>8&255,M[w++]=C.high.low>>16&255,M[w++]=C.high.low>>24&255,M[w++]=255&C.high.high,M[w++]=C.high.high>>8&255,M[w++]=C.high.high>>16&255,M[w++]=C.high.high>>24&255,new e(M)},e.prototype.toString=function(){for(var e,t=0,r=new Array(36),n=0;n<r.length;n++)r[n]=0;var i,o,s,a=0,u=!1,c={parts:[0,0,0,0]},f=[];a=0;var l=this.bytes,h=l[a++]|l[a++]<<8|l[a++]<<16|l[a++]<<24,p=l[a++]|l[a++]<<8|l[a++]<<16|l[a++]<<24,d=l[a++]|l[a++]<<8|l[a++]<<16|l[a++]<<24,y=l[a++]|l[a++]<<8|l[a++]<<16|l[a++]<<24;a=0,(new Yt(h,p),new Yt(d,y)).lessThan(Yt.ZERO)&&f.push("-");var g=y>>26&31;if(g>>3==3){if(30===g)return f.join("")+"Infinity";if(31===g)return"NaN";e=y>>15&16383,i=8+(y>>14&1)}else i=y>>14&7,e=y>>17&16383;var m=e-6176;if(c.parts[0]=(16383&y)+((15&i)<<14),c.parts[1]=d,c.parts[2]=p,c.parts[3]=h,0===c.parts[0]&&0===c.parts[1]&&0===c.parts[2]&&0===c.parts[3])u=!0;else for(s=3;s>=0;s--){var v=0,b=ar(c);if(c=b.quotient,v=b.rem.low)for(o=8;o>=0;o--)r[9*s+o]=v%10,v=Math.floor(v/10)}if(u)t=1,r[a]=0;else for(t=36;!r[a];)t-=1,a+=1;var w=t-1+m;if(w>=34||w<=-7||m>0){if(t>34)return f.push("".concat(0)),m>0?f.push("E+".concat(m)):m<0&&f.push("E".concat(m)),f.join("");for(f.push("".concat(r[a++])),(t-=1)&&f.push("."),n=0;n<t;n++)f.push("".concat(r[a++]));f.push("E"),w>0?f.push("+".concat(w)):f.push("".concat(w))}else if(m>=0)for(n=0;n<t;n++)f.push("".concat(r[a++]));else{var _=t+m;if(_>0)for(n=0;n<_;n++)f.push("".concat(r[a++]));else f.push("0");for(f.push(".");_++<0;)f.push("0");for(n=0;n<t-Math.max(_-1,0);n++)f.push("".concat(r[a++]))}return f.join("")},e.prototype.toJSON=function(){return{$numberDecimal:this.toString()}},e.prototype.toExtendedJSON=function(){return{$numberDecimal:this.toString()}},e.fromExtendedJSON=function(t){return e.fromString(t.$numberDecimal)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Decimal128("'.concat(this.toString(),'")')},e}();Object.defineProperty(cr.prototype,"_bsontype",{value:"Decimal128"});var fr=function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=+t}return e.prototype.valueOf=function(){return this.value},e.prototype.toJSON=function(){return this.value},e.prototype.toString=function(e){return this.value.toString(e)},e.prototype.toExtendedJSON=function(e){return e&&(e.legacy||e.relaxed&&isFinite(this.value))?this.value:Object.is(Math.sign(this.value),-0)?{$numberDouble:"-".concat(this.value.toFixed(1))}:{$numberDouble:Number.isInteger(this.value)?this.value.toFixed(1):this.value.toString()}},e.fromExtendedJSON=function(t,r){var n=parseFloat(t.$numberDouble);return r&&r.relaxed?n:new e(n)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=this.toExtendedJSON();return"new Double(".concat(e.$numberDouble,")")},e}();Object.defineProperty(fr.prototype,"_bsontype",{value:"Double"});var lr=function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=0|+t}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(e){return this.value.toString(e)},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(e){return e&&(e.relaxed||e.legacy)?this.value:{$numberInt:this.value.toString()}},e.fromExtendedJSON=function(t,r){return r&&r.relaxed?parseInt(t.$numberInt,10):new e(t.$numberInt)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new Int32(".concat(this.valueOf(),")")},e}();Object.defineProperty(lr.prototype,"_bsontype",{value:"Int32"});var hr=function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$maxKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MaxKey()"},e}();Object.defineProperty(hr.prototype,"_bsontype",{value:"MaxKey"});var pr=function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$minKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MinKey()"},e}();Object.defineProperty(pr.prototype,"_bsontype",{value:"MinKey"});var dr=new RegExp("^[0-9a-fA-F]{24}$"),yr=null,gr=Symbol("id"),mr=function(){function e(t){if(!(this instanceof e))return new e(t);var r;if("object"==typeof t&&t&&"id"in t){if("string"!=typeof t.id&&!ArrayBuffer.isView(t.id))throw new gt("Argument passed in must have an id that is of type string or Buffer");r="toHexString"in t&&"function"==typeof t.toHexString?lt.from(t.toHexString(),"hex"):t.id}else r=t;if(null==r||"number"==typeof r)this[gr]=e.generate("number"==typeof r?r:void 0);else if(ArrayBuffer.isView(r)&&12===r.byteLength)this[gr]=r instanceof lt?r:It(r);else{if("string"!=typeof r)throw new gt("Argument passed in does not match the accepted types");if(12===r.length){var n=lt.from(r);if(12!==n.byteLength)throw new gt("Argument passed in must be a string of 12 bytes");this[gr]=n}else{if(24!==r.length||!dr.test(r))throw new gt("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");this[gr]=lt.from(r,"hex")}}e.cacheHexString&&(this.__id=this.id.toString("hex"))}return Object.defineProperty(e.prototype,"id",{get:function(){return this[gr]},set:function(t){this[gr]=t,e.cacheHexString&&(this.__id=t.toString("hex"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"generationTime",{get:function(){return this.id.readInt32BE(0)},set:function(e){this.id.writeUInt32BE(e,0)},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(){if(e.cacheHexString&&this.__id)return this.__id;var t=this.id.toString("hex");return e.cacheHexString&&!this.__id&&(this.__id=t),t},e.getInc=function(){return e.index=(e.index+1)%16777215},e.generate=function(t){"number"!=typeof t&&(t=Math.floor(Date.now()/1e3));var r=e.getInc(),n=lt.alloc(12);return n.writeUInt32BE(t,0),null===yr&&(yr=_t(5)),n[4]=yr[0],n[5]=yr[1],n[6]=yr[2],n[7]=yr[3],n[8]=yr[4],n[11]=255&r,n[10]=r>>8&255,n[9]=r>>16&255,n},e.prototype.toString=function(e){return e?this.id.toString(e):this.toHexString()},e.prototype.toJSON=function(){return this.toHexString()},e.prototype.equals=function(t){if(null==t)return!1;if(t instanceof e)return this[gr][11]===t[gr][11]&&this[gr].equals(t[gr]);if("string"==typeof t&&e.isValid(t)&&12===t.length&&xt(this.id))return t===lt.prototype.toString.call(this.id,"latin1");if("string"==typeof t&&e.isValid(t)&&24===t.length)return t.toLowerCase()===this.toHexString();if("string"==typeof t&&e.isValid(t)&&12===t.length)return lt.from(t).equals(this.id);if("object"==typeof t&&"toHexString"in t&&"function"==typeof t.toHexString){var r=t.toHexString(),n=this.toHexString().toLowerCase();return"string"==typeof r&&r.toLowerCase()===n}return!1},e.prototype.getTimestamp=function(){var e=new Date,t=this.id.readUInt32BE(0);return e.setTime(1e3*Math.floor(t)),e},e.createPk=function(){return new e},e.createFromTime=function(t){var r=lt.from([0,0,0,0,0,0,0,0,0,0,0,0]);return r.writeUInt32BE(t,0),new e(r)},e.createFromHexString=function(t){if(void 0===t||null!=t&&24!==t.length)throw new gt("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new e(lt.from(t,"hex"))},e.isValid=function(t){if(null==t)return!1;try{return new e(t),!0}catch(e){return!1}},e.prototype.toExtendedJSON=function(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}},e.fromExtendedJSON=function(t){return new e(t.$oid)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new ObjectId("'.concat(this.toHexString(),'")')},e.index=Math.floor(16777215*Math.random()),e}();Object.defineProperty(mr.prototype,"generate",{value:Tt(function(e){return mr.generate(e)},"Please use the static `ObjectId.generate(time)` instead")}),Object.defineProperty(mr.prototype,"getInc",{value:Tt(function(){return mr.getInc()},"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(mr.prototype,"get_inc",{value:Tt(function(){return mr.getInc()},"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(mr,"get_inc",{value:Tt(function(){return mr.getInc()},"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(mr.prototype,"_bsontype",{value:"ObjectID"});var vr=function(){function e(t,r){if(!(this instanceof e))return new e(t,r);if(this.pattern=t,this.options=(null!=r?r:"").split("").sort().join(""),-1!==this.pattern.indexOf("\0"))throw new yt("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(-1!==this.options.indexOf("\0"))throw new yt("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var n=0;n<this.options.length;n++)if("i"!==this.options[n]&&"m"!==this.options[n]&&"x"!==this.options[n]&&"l"!==this.options[n]&&"s"!==this.options[n]&&"u"!==this.options[n])throw new yt("The regular expression option [".concat(this.options[n],"] is not supported"))}return e.parseOptions=function(e){return e?e.split("").sort().join(""):""},e.prototype.toExtendedJSON=function(e){return(e=e||{}).legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}},e.fromExtendedJSON=function(t){if("$regex"in t){if("string"==typeof t.$regex)return new e(t.$regex,e.parseOptions(t.$options));if("BSONRegExp"===t.$regex._bsontype)return t}if("$regularExpression"in t)return new e(t.$regularExpression.pattern,e.parseOptions(t.$regularExpression.options));throw new gt("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(t)))},e}();Object.defineProperty(vr.prototype,"_bsontype",{value:"BSONRegExp"});var br=function(){function e(t){if(!(this instanceof e))return new e(t);this.value=t}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(){return this.value},e.prototype.inspect=function(){return'new BSONSymbol("'.concat(this.value,'")')},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(){return{$symbol:this.value}},e.fromExtendedJSON=function(t){return new e(t.$symbol)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e}();Object.defineProperty(br.prototype,"_bsontype",{value:"Symbol"});var wr=function(e){function t(r,n){var i=this;return i instanceof t?(i=Yt.isLong(r)?e.call(this,r.low,r.high,!0)||this:kt(r)&&void 0!==r.t&&void 0!==r.i?e.call(this,r.i,r.t,!0)||this:e.call(this,r,n,!0)||this,Object.defineProperty(i,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),i):new t(r,n)}return pt(t,e),t.prototype.toJSON=function(){return{$timestamp:this.toString()}},t.fromInt=function(e){return new t(Yt.fromInt(e,!0))},t.fromNumber=function(e){return new t(Yt.fromNumber(e,!0))},t.fromBits=function(e,r){return new t(e,r)},t.fromString=function(e,r){return new t(Yt.fromString(e,!0,r))},t.prototype.toExtendedJSON=function(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}},t.fromExtendedJSON=function(e){return new t(e.$timestamp)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new Timestamp({ t: ".concat(this.getHighBits(),", i: ").concat(this.getLowBits()," })")},t.MAX_VALUE=Yt.MAX_UNSIGNED_VALUE,t}(Yt);function _r(e){return kt(e)&&Reflect.has(e,"_bsontype")&&"string"==typeof e._bsontype}var Er=2147483647,xr=-2147483648,Sr=0x8000000000000000,Ar=-0x8000000000000000,Br={$oid:mr,$binary:Mt,$uuid:Mt,$symbol:br,$numberInt:lr,$numberDecimal:cr,$numberDouble:fr,$numberLong:Yt,$minKey:pr,$maxKey:hr,$regex:vr,$regularExpression:vr,$timestamp:wr};function Or(e,t){if(void 0===t&&(t={}),"number"==typeof e){if(t.relaxed||t.legacy)return e;if(Math.floor(e)===e){if(e>=xr&&e<=Er)return new lr(e);if(e>=Ar&&e<=Sr)return Yt.fromNumber(e)}return new fr(e)}if(null==e||"object"!=typeof e)return e;if(e.$undefined)return null;for(var r=Object.keys(e).filter(function(t){return t.startsWith("$")&&null!=e[t]}),n=0;n<r.length;n++){var i=Br[r[n]];if(i)return i.fromExtendedJSON(e,t)}if(null!=e.$date){var o=e.$date,s=new Date;return t.legacy?"number"==typeof o?s.setTime(o):"string"==typeof o&&s.setTime(Date.parse(o)):"string"==typeof o?s.setTime(Date.parse(o)):Yt.isLong(o)?s.setTime(o.toNumber()):"number"==typeof o&&t.relaxed&&s.setTime(o),s}if(null!=e.$code){var a=Object.assign({},e);return e.$scope&&(a.$scope=Or(e.$scope)),$t.fromExtendedJSON(e)}if(zt(e)||e.$dbPointer){var u=e.$ref?e:e.$dbPointer;if(u instanceof Ht)return u;var c=Object.keys(u).filter(function(e){return e.startsWith("$")}),f=!0;if(c.forEach(function(e){-1===["$ref","$id","$db"].indexOf(e)&&(f=!1)}),f)return Ht.fromExtendedJSON(u)}return e}function kr(e){var t=e.toISOString();return 0!==e.getUTCMilliseconds()?t:t.slice(0,-5)+"Z"}function Tr(e,t){if(("object"==typeof e||"function"==typeof e)&&null!==e){var r=t.seenObjects.findIndex(function(t){return t.obj===e});if(-1!==r){var n=t.seenObjects.map(function(e){return e.propertyName}),i=n.slice(0,r).map(function(e){return"".concat(e," -> ")}).join(""),o=n[r],s=" -> "+n.slice(r+1,n.length-1).map(function(e){return"".concat(e," -> ")}).join(""),a=n[n.length-1],u=" ".repeat(i.length+o.length/2),c="-".repeat(s.length+(o.length+a.length)/2-1);throw new gt("Converting circular structure to EJSON:\n"+" ".concat(i).concat(o).concat(s).concat(a,"\n")+" ".concat(u,"\\").concat(c,"/"))}t.seenObjects[t.seenObjects.length-1].obj=e}if(Array.isArray(e))return function(e,t){return e.map(function(e,r){t.seenObjects.push({propertyName:"index ".concat(r),obj:null});try{return Tr(e,t)}finally{t.seenObjects.pop()}})}(e,t);if(void 0===e)return null;if(e instanceof Date||Ot(e)){var f=e.getTime(),l=f>-1&&f<2534023188e5;return t.legacy?t.relaxed&&l?{$date:e.getTime()}:{$date:kr(e)}:t.relaxed&&l?{$date:kr(e)}:{$date:{$numberLong:e.getTime().toString()}}}if(!("number"!=typeof e||t.relaxed&&isFinite(e))){if(Math.floor(e)===e){var h=e>=Ar&&e<=Sr;if(e>=xr&&e<=Er)return{$numberInt:e.toString()};if(h)return{$numberLong:e.toString()}}return{$numberDouble:e.toString()}}if(e instanceof RegExp||Bt(e)){var p=e.flags;if(void 0===p){var d=e.toString().match(/[gimuy]*$/);d&&(p=d[0])}return new vr(e.source,p).toExtendedJSON(t)}return null!=e&&"object"==typeof e?function(e,t){if(null==e||"object"!=typeof e)throw new yt("not an object instance");var r=e._bsontype;if(void 0===r){var n={};for(var i in e){t.seenObjects.push({propertyName:i,obj:null});try{var o=Tr(e[i],t);"__proto__"===i?Object.defineProperty(n,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):n[i]=o}finally{t.seenObjects.pop()}}return n}if(_r(e)){var s=e;if("function"!=typeof s.toExtendedJSON){var a=Fr[e._bsontype];if(!a)throw new gt("Unrecognized or invalid _bsontype: "+e._bsontype);s=a(s)}return"Code"===r&&s.scope?s=new $t(s.code,Tr(s.scope,t)):"DBRef"===r&&s.oid&&(s=new Ht(Tr(s.collection,t),Tr(s.oid,t),Tr(s.db,t),Tr(s.fields,t))),s.toExtendedJSON(t)}throw new yt("_bsontype must be a string, but was: "+typeof r)}(e,t):e}var Ir,Nr,Fr={Binary:function(e){return new Mt(e.value(),e.sub_type)},Code:function(e){return new $t(e.code,e.scope)},DBRef:function(e){return new Ht(e.collection||e.namespace,e.oid,e.db,e.fields)},Decimal128:function(e){return new cr(e.bytes)},Double:function(e){return new fr(e.value)},Int32:function(e){return new lr(e.value)},Long:function(e){return Yt.fromBits(null!=e.low?e.low:e.low_,null!=e.low?e.high:e.high_,null!=e.low?e.unsigned:e.unsigned_)},MaxKey:function(){return new hr},MinKey:function(){return new pr},ObjectID:function(e){return new mr(e)},ObjectId:function(e){return new mr(e)},BSONRegExp:function(e){return new vr(e.pattern,e.options)},Symbol:function(e){return new br(e.value)},Timestamp:function(e){return wr.fromBits(e.low,e.high)}};!function(e){function t(e,t){var r=Object.assign({},{relaxed:!0,legacy:!1},t);return"boolean"==typeof r.relaxed&&(r.strict=!r.relaxed),"boolean"==typeof r.strict&&(r.relaxed=!r.strict),JSON.parse(e,function(e,t){if(-1!==e.indexOf("\0"))throw new yt("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(e)));return Or(t,r)})}function r(e,t,r,n){null!=r&&"object"==typeof r&&(n=r,r=0),null==t||"object"!=typeof t||Array.isArray(t)||(n=t,t=void 0,r=0);var i=Tr(e,Object.assign({relaxed:!0,legacy:!1},n,{seenObjects:[{propertyName:"(root)",obj:null}]}));return JSON.stringify(i,t,r)}e.parse=t,e.stringify=r,e.serialize=function(e,t){return t=t||{},JSON.parse(r(e,t))},e.deserialize=function(e,r){return r=r||{},t(JSON.stringify(e),r)}}(Ir||(Ir={}));var Rr=vt();function jr(e,t,r){var n=5;if(Array.isArray(e))for(var i=0;i<e.length;i++)n+=Lr(i.toString(),e[i],t,!0,r);else for(var o in"function"==typeof(null==e?void 0:e.toBSON)&&(e=e.toBSON()),e)n+=Lr(o,e[o],t,!1,r);return n}function Lr(e,t,r,n,i){switch(void 0===r&&(r=!1),void 0===n&&(n=!1),void 0===i&&(i=!1),"function"==typeof(null==t?void 0:t.toBSON)&&(t=t.toBSON()),typeof t){case"string":return 1+lt.byteLength(e,"utf8")+1+4+lt.byteLength(t,"utf8")+1;case"number":return Math.floor(t)===t&&t>=Ct&&t<=Pt&&t>=Ut&&t<=Lt?(null!=e?lt.byteLength(e,"utf8")+1:0)+5:(null!=e?lt.byteLength(e,"utf8")+1:0)+9;case"undefined":return n||!i?(null!=e?lt.byteLength(e,"utf8")+1:0)+1:0;case"boolean":return(null!=e?lt.byteLength(e,"utf8")+1:0)+2;case"object":if(null==t||"MinKey"===t._bsontype||"MaxKey"===t._bsontype)return(null!=e?lt.byteLength(e,"utf8")+1:0)+1;if("ObjectId"===t._bsontype||"ObjectID"===t._bsontype)return(null!=e?lt.byteLength(e,"utf8")+1:0)+13;if(t instanceof Date||Ot(t))return(null!=e?lt.byteLength(e,"utf8")+1:0)+9;if(ArrayBuffer.isView(t)||t instanceof ArrayBuffer||Et(t))return(null!=e?lt.byteLength(e,"utf8")+1:0)+6+t.byteLength;if("Long"===t._bsontype||"Double"===t._bsontype||"Timestamp"===t._bsontype)return(null!=e?lt.byteLength(e,"utf8")+1:0)+9;if("Decimal128"===t._bsontype)return(null!=e?lt.byteLength(e,"utf8")+1:0)+17;if("Code"===t._bsontype)return null!=t.scope&&Object.keys(t.scope).length>0?(null!=e?lt.byteLength(e,"utf8")+1:0)+1+4+4+lt.byteLength(t.code.toString(),"utf8")+1+jr(t.scope,r,i):(null!=e?lt.byteLength(e,"utf8")+1:0)+1+4+lt.byteLength(t.code.toString(),"utf8")+1;if("Binary"===t._bsontype){var o=t;return o.sub_type===Mt.SUBTYPE_BYTE_ARRAY?(null!=e?lt.byteLength(e,"utf8")+1:0)+(o.position+1+4+1+4):(null!=e?lt.byteLength(e,"utf8")+1:0)+(o.position+1+4+1)}if("Symbol"===t._bsontype)return(null!=e?lt.byteLength(e,"utf8")+1:0)+lt.byteLength(t.value,"utf8")+4+1+1;if("DBRef"===t._bsontype){var s=Object.assign({$ref:t.collection,$id:t.oid},t.fields);return null!=t.db&&(s.$db=t.db),(null!=e?lt.byteLength(e,"utf8")+1:0)+1+jr(s,r,i)}return t instanceof RegExp||Bt(t)?(null!=e?lt.byteLength(e,"utf8")+1:0)+1+lt.byteLength(t.source,"utf8")+1+(t.global?1:0)+(t.ignoreCase?1:0)+(t.multiline?1:0)+1:"BSONRegExp"===t._bsontype?(null!=e?lt.byteLength(e,"utf8")+1:0)+1+lt.byteLength(t.pattern,"utf8")+1+lt.byteLength(t.options,"utf8")+1:(null!=e?lt.byteLength(e,"utf8")+1:0)+jr(t,r,i)+1;case"function":if(t instanceof RegExp||Bt(t)||"[object RegExp]"===String.call(t))return(null!=e?lt.byteLength(e,"utf8")+1:0)+1+lt.byteLength(t.source,"utf8")+1+(t.global?1:0)+(t.ignoreCase?1:0)+(t.multiline?1:0)+1;if(r&&null!=t.scope&&Object.keys(t.scope).length>0)return(null!=e?lt.byteLength(e,"utf8")+1:0)+1+4+4+lt.byteLength(bt(t),"utf8")+1+jr(t.scope,r,i);if(r)return(null!=e?lt.byteLength(e,"utf8")+1:0)+1+4+lt.byteLength(bt(t),"utf8")+1}return 0}function Ur(e,t,r){for(var n=0,i=t;i<r;i+=1){var o=e[i];if(n){if(128!=(192&o))return!1;n-=1}else if(128&o)if(192==(224&o))n=1;else if(224==(240&o))n=2;else{if(240!=(248&o))return!1;n=3}}return!n}Nr=Rr.Map?Rr.Map:function(){function e(e){void 0===e&&(e=[]),this._keys=[],this._values={};for(var t=0;t<e.length;t++)if(null!=e[t]){var r=e[t],n=r[0],i=r[1];this._keys.push(n),this._values[n]={v:i,i:this._keys.length-1}}}return e.prototype.clear=function(){this._keys=[],this._values={}},e.prototype.delete=function(e){var t=this._values[e];return null!=t&&(delete this._values[e],this._keys.splice(t.i,1),!0)},e.prototype.entries=function(){var e=this,t=0;return{next:function(){var r=e._keys[t++];return{value:void 0!==r?[r,e._values[r].v]:void 0,done:void 0===r}}}},e.prototype.forEach=function(e,t){t=t||this;for(var r=0;r<this._keys.length;r++){var n=this._keys[r];e.call(t,this._values[n].v,n,t)}},e.prototype.get=function(e){return this._values[e]?this._values[e].v:void 0},e.prototype.has=function(e){return null!=this._values[e]},e.prototype.keys=function(){var e=this,t=0;return{next:function(){var r=e._keys[t++];return{value:void 0!==r?r:void 0,done:void 0===r}}}},e.prototype.set=function(e,t){return this._values[e]?(this._values[e].v=t,this):(this._keys.push(e),this._values[e]={v:t,i:this._keys.length-1},this)},e.prototype.values=function(){var e=this,t=0;return{next:function(){var r=e._keys[t++];return{value:void 0!==r?e._values[r].v:void 0,done:void 0===r}}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),e}();var Pr=Yt.fromNumber(Pt),Cr=Yt.fromNumber(Ct),Mr={};function Dr(e,t,r){var n=(t=null==t?{}:t)&&t.index?t.index:0,i=e[n]|e[n+1]<<8|e[n+2]<<16|e[n+3]<<24;if(i<5)throw new yt("bson size must be >= 5, is ".concat(i));if(t.allowObjectSmallerThanBufferSize&&e.length<i)throw new yt("buffer length ".concat(e.length," must be >= bson size ").concat(i));if(!t.allowObjectSmallerThanBufferSize&&e.length!==i)throw new yt("buffer length ".concat(e.length," must === bson size ").concat(i));if(i+n>e.byteLength)throw new yt("(bson size ".concat(i," + options.index ").concat(n," must be <= buffer length ").concat(e.byteLength,")"));if(0!==e[n+i-1])throw new yt("One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00");return zr(e,n,t,r)}var $r=/^\$ref$|^\$id$|^\$db$/;function zr(e,t,r,n){void 0===n&&(n=!1);var i,o=null!=r.evalFunctions&&r.evalFunctions,s=null!=r.cacheFunctions&&r.cacheFunctions,a=null==r.fieldsAsRaw?null:r.fieldsAsRaw,u=null!=r.raw&&r.raw,c="boolean"==typeof r.bsonRegExp&&r.bsonRegExp,f=null!=r.promoteBuffers&&r.promoteBuffers,l=null==r.promoteLongs||r.promoteLongs,h=null==r.promoteValues||r.promoteValues,p=null==r.validation?{utf8:!0}:r.validation,d=!0,y=new Set,g=p.utf8;if("boolean"==typeof g)i=g;else{d=!1;var m=Object.keys(g).map(function(e){return g[e]});if(0===m.length)throw new yt("UTF-8 validation setting cannot be empty");if("boolean"!=typeof m[0])throw new yt("Invalid UTF-8 validation option, must specify boolean values");if(i=m[0],!m.every(function(e){return e===i}))throw new yt("Invalid UTF-8 validation option - keys must be all true or all false")}if(!d)for(var v=0,b=Object.keys(g);v<b.length;v++){var w=b[v];y.add(w)}var _=t;if(e.length<5)throw new yt("corrupt bson message < 5 bytes long");var E=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;if(E<5||E>e.length)throw new yt("corrupt bson message");for(var x=n?[]:{},S=0,A=!n&&null,B=new DataView(e.buffer,e.byteOffset,e.byteLength);;){var O=e[t++];if(0===O)break;for(var k=t;0!==e[k]&&k<e.length;)k++;if(k>=e.byteLength)throw new yt("Bad BSON Document: illegal CString");var T,I=n?S++:e.toString("utf8",t,k);T=d||y.has(I)?i:!i,!1!==A&&"$"===I[0]&&(A=$r.test(I));var N=void 0;if(t=k+1,2===O){if((te=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||te>e.length-t||0!==e[t+te-1])throw new yt("bad string length in bson");N=Vr(e,t,t+te-1,T),t+=te}else if(7===O){var F=lt.alloc(12);e.copy(F,0,t,t+12),N=new mr(F),t+=12}else if(16===O&&!1===h)N=new lr(e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24);else if(16===O)N=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;else if(1===O&&!1===h)N=new fr(B.getFloat64(t,!0)),t+=8;else if(1===O)N=B.getFloat64(t,!0),t+=8;else if(9===O){var R=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,j=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;N=new Date(new Yt(R,j).toNumber())}else if(8===O){if(0!==e[t]&&1!==e[t])throw new yt("illegal boolean type value");N=1===e[t++]}else if(3===O){var L=t;if((Q=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)<=0||Q>e.length-t)throw new yt("bad embedded document length in bson");if(u)N=e.slice(t,t+Q);else{var U=r;d||(U=dt(dt({},r),{validation:{utf8:T}})),N=zr(e,L,U,!1)}t+=Q}else if(4===O){L=t;var P=r,C=t+(Q=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24);if(a&&a[I]){for(var M in P={},r)P[M]=r[M];P.raw=!0}if(d||(P=dt(dt({},P),{validation:{utf8:T}})),N=zr(e,L,P,!0),0!==e[(t+=Q)-1])throw new yt("invalid array terminator byte");if(t!==C)throw new yt("corrupted array bson")}else if(6===O)N=void 0;else if(10===O)N=null;else if(18===O){R=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,j=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;var D=new Yt(R,j);N=l&&!0===h&&D.lessThanOrEqual(Pr)&&D.greaterThanOrEqual(Cr)?D.toNumber():D}else if(19===O){var $=lt.alloc(16);e.copy($,0,t,t+16),t+=16;var z=new cr($);N="toObject"in z&&"function"==typeof z.toObject?z.toObject():z}else if(5===O){var H=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,V=H,q=e[t++];if(H<0)throw new yt("Negative binary type element size found");if(H>e.byteLength)throw new yt("Binary type size larger than document size");if(null!=e.slice){if(q===Mt.SUBTYPE_BYTE_ARRAY){if((H=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<0)throw new yt("Negative binary type element size found for subtype 0x02");if(H>V-4)throw new yt("Binary type with subtype 0x02 contains too long binary size");if(H<V-4)throw new yt("Binary type with subtype 0x02 contains too short binary size")}f&&h?N=e.slice(t,t+H):(N=new Mt(e.slice(t,t+H),q),4===q&&(N=N.toUUID()))}else{var G=lt.alloc(H);if(q===Mt.SUBTYPE_BYTE_ARRAY){if((H=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<0)throw new yt("Negative binary type element size found for subtype 0x02");if(H>V-4)throw new yt("Binary type with subtype 0x02 contains too long binary size");if(H<V-4)throw new yt("Binary type with subtype 0x02 contains too short binary size")}for(k=0;k<H;k++)G[k]=e[t+k];N=f&&h?G:4===q?new Mt(e.slice(t,t+H),q).toUUID():new Mt(e.slice(t,t+H),q)}t+=H}else if(11===O&&!1===c){for(k=t;0!==e[k]&&k<e.length;)k++;if(k>=e.length)throw new yt("Bad BSON Document: illegal CString");var W=e.toString("utf8",t,k);for(k=t=k+1;0!==e[k]&&k<e.length;)k++;if(k>=e.length)throw new yt("Bad BSON Document: illegal CString");var Z=e.toString("utf8",t,k);t=k+1;var J=new Array(Z.length);for(k=0;k<Z.length;k++)switch(Z[k]){case"m":J[k]="m";break;case"s":J[k]="g";break;case"i":J[k]="i"}N=new RegExp(W,J.join(""))}else if(11===O&&!0===c){for(k=t;0!==e[k]&&k<e.length;)k++;if(k>=e.length)throw new yt("Bad BSON Document: illegal CString");for(W=e.toString("utf8",t,k),k=t=k+1;0!==e[k]&&k<e.length;)k++;if(k>=e.length)throw new yt("Bad BSON Document: illegal CString");Z=e.toString("utf8",t,k),t=k+1,N=new vr(W,Z)}else if(14===O){if((te=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||te>e.length-t||0!==e[t+te-1])throw new yt("bad string length in bson");var Y=Vr(e,t,t+te-1,T);N=h?Y:new br(Y),t+=te}else if(17===O)R=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,j=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,N=new wr(R,j);else if(255===O)N=new pr;else if(127===O)N=new hr;else if(13===O){if((te=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||te>e.length-t||0!==e[t+te-1])throw new yt("bad string length in bson");var K=Vr(e,t,t+te-1,T);N=o?s?Hr(K,Mr,x):Hr(K):new $t(K),t+=te}else if(15===O){var X=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;if(X<13)throw new yt("code_w_scope total size shorter minimum expected length");if((te=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||te>e.length-t||0!==e[t+te-1])throw new yt("bad string length in bson");K=Vr(e,t,t+te-1,T),L=t+=te;var Q=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24,ee=zr(e,L,r,!1);if(t+=Q,X<8+Q+te)throw new yt("code_w_scope total size is too short, truncating scope");if(X>8+Q+te)throw new yt("code_w_scope total size is too long, clips outer document");o?(N=s?Hr(K,Mr,x):Hr(K)).scope=ee:N=new $t(K,ee)}else{if(12!==O)throw new yt("Detected unknown BSON type ".concat(O.toString(16),' for fieldname "').concat(I,'"'));var te;if((te=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||te>e.length-t||0!==e[t+te-1])throw new yt("bad string length in bson");if(null!=p&&p.utf8&&!Ur(e,t,t+te-1))throw new yt("Invalid UTF-8 string in BSON document");var re=e.toString("utf8",t,t+te-1);t+=te;var ne=lt.alloc(12);e.copy(ne,0,t,t+12),F=new mr(ne),t+=12,N=new Ht(re,F)}"__proto__"===I?Object.defineProperty(x,I,{value:N,writable:!0,enumerable:!0,configurable:!0}):x[I]=N}if(E!==t-_){if(n)throw new yt("corrupt array bson");throw new yt("corrupt object bson")}if(!A)return x;if(zt(x)){var ie=Object.assign({},x);return delete ie.$ref,delete ie.$id,delete ie.$db,new Ht(x.$ref,x.$id,x.$db,ie)}return x}function Hr(e,t,r){return t?(null==t[e]&&(t[e]=new Function(e)),t[e].bind(r)):new Function(e)}function Vr(e,t,r,n){var i=e.toString("utf8",t,r);if(n)for(var o=0;o<i.length;o++)if(65533===i.charCodeAt(o)){if(!Ur(e,t,r))throw new yt("Invalid UTF-8 string in BSON document");break}return i}var qr=/\x00/,Gr=new Set(["$db","$ref","$id","$clusterTime"]);function Wr(e,t,r,n,i){e[n++]=2;var o=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8");e[(n=n+o+1)-1]=0;var s=e.write(r,n+4,void 0,"utf8");return e[n+3]=s+1>>24&255,e[n+2]=s+1>>16&255,e[n+1]=s+1>>8&255,e[n]=s+1&255,n=n+4+s,e[n++]=0,n}var Zr=new Uint8Array(8),Jr=new DataView(Zr.buffer,Zr.byteOffset,Zr.byteLength);function Yr(e,t,r,n,i){return Number.isInteger(r)&&r>=Ut&&r<=Lt?(e[n++]=16,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,e[n++]=255&r,e[n++]=r>>8&255,e[n++]=r>>16&255,e[n++]=r>>24&255):(e[n++]=1,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,Jr.setFloat64(0,r,!0),e.set(Zr,n),n+=8),n}function Kr(e,t,r,n,i){return e[n++]=10,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,n}function Xr(e,t,r,n,i){return e[n++]=8,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,e[n++]=r?1:0,n}function Qr(e,t,r,n,i){e[n++]=9,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=Yt.fromNumber(r.getTime()),s=o.getLowBits(),a=o.getHighBits();return e[n++]=255&s,e[n++]=s>>8&255,e[n++]=s>>16&255,e[n++]=s>>24&255,e[n++]=255&a,e[n++]=a>>8&255,e[n++]=a>>16&255,e[n++]=a>>24&255,n}function en(e,t,r,n,i){if(e[n++]=11,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,r.source&&null!=r.source.match(qr))throw Error("value "+r.source+" must not contain null bytes");return n+=e.write(r.source,n,void 0,"utf8"),e[n++]=0,r.ignoreCase&&(e[n++]=105),r.global&&(e[n++]=115),r.multiline&&(e[n++]=109),e[n++]=0,n}function tn(e,t,r,n,i){if(e[n++]=11,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,null!=r.pattern.match(qr))throw Error("pattern "+r.pattern+" must not contain null bytes");return n+=e.write(r.pattern,n,void 0,"utf8"),e[n++]=0,n+=e.write(r.options.split("").sort().join(""),n,void 0,"utf8"),e[n++]=0,n}function rn(e,t,r,n,i){return null===r?e[n++]=10:"MinKey"===r._bsontype?e[n++]=255:e[n++]=127,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,n}function nn(e,t,r,n,i){if(e[n++]=7,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,"string"==typeof r.id)e.write(r.id,n,void 0,"binary");else{if(!xt(r.id))throw new gt("object ["+JSON.stringify(r)+"] is not a valid ObjectId");e.set(r.id.subarray(0,12),n)}return n+12}function on(e,t,r,n,i){e[n++]=5,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=r.length;return e[n++]=255&o,e[n++]=o>>8&255,e[n++]=o>>16&255,e[n++]=o>>24&255,e[n++]=0,e.set(It(r),n),n+o}function sn(e,t,r,n,i,o,s,a,u,c){void 0===i&&(i=!1),void 0===o&&(o=0),void 0===s&&(s=!1),void 0===a&&(a=!0),void 0===u&&(u=!1),void 0===c&&(c=[]);for(var f=0;f<c.length;f++)if(c[f]===r)throw new yt("cyclic dependency detected");c.push(r),e[n++]=Array.isArray(r)?4:3,n+=u?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var l=gn(e,r,i,n,o+1,s,a,c);return c.pop(),l}function an(e,t,r,n,i){return e[n++]=19,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,e.set(r.bytes.subarray(0,16),n),n+16}function un(e,t,r,n,i){e[n++]="Long"===r._bsontype?18:17,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=r.getLowBits(),s=r.getHighBits();return e[n++]=255&o,e[n++]=o>>8&255,e[n++]=o>>16&255,e[n++]=o>>24&255,e[n++]=255&s,e[n++]=s>>8&255,e[n++]=s>>16&255,e[n++]=s>>24&255,n}function cn(e,t,r,n,i){return r=r.valueOf(),e[n++]=16,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,e[n++]=255&r,e[n++]=r>>8&255,e[n++]=r>>16&255,e[n++]=r>>24&255,n}function fn(e,t,r,n,i){return e[n++]=1,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,Jr.setFloat64(0,r.value,!0),e.set(Zr,n),n+8}function ln(e,t,r,n,i,o,s){e[n++]=13,n+=s?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var a=bt(r),u=e.write(a,n+4,void 0,"utf8")+1;return e[n]=255&u,e[n+1]=u>>8&255,e[n+2]=u>>16&255,e[n+3]=u>>24&255,n=n+4+u-1,e[n++]=0,n}function hn(e,t,r,n,i,o,s,a,u){if(void 0===i&&(i=!1),void 0===o&&(o=0),void 0===s&&(s=!1),void 0===a&&(a=!0),void 0===u&&(u=!1),r.scope&&"object"==typeof r.scope){e[n++]=15,n+=u?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var c=n,f="string"==typeof r.code?r.code:r.code.toString();n+=4;var l=e.write(f,n+4,void 0,"utf8")+1;e[n]=255&l,e[n+1]=l>>8&255,e[n+2]=l>>16&255,e[n+3]=l>>24&255,e[n+4+l-1]=0,n=n+l+4;var h=gn(e,r.scope,i,n,o+1,s,a);n=h-1;var p=h-c;e[c++]=255&p,e[c++]=p>>8&255,e[c++]=p>>16&255,e[c++]=p>>24&255,e[n++]=0}else{e[n++]=13,n+=u?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,f=r.code.toString();var d=e.write(f,n+4,void 0,"utf8")+1;e[n]=255&d,e[n+1]=d>>8&255,e[n+2]=d>>16&255,e[n+3]=d>>24&255,n=n+4+d-1,e[n++]=0}return n}function pn(e,t,r,n,i){e[n++]=5,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=r.value(!0),s=r.position;return r.sub_type===Mt.SUBTYPE_BYTE_ARRAY&&(s+=4),e[n++]=255&s,e[n++]=s>>8&255,e[n++]=s>>16&255,e[n++]=s>>24&255,e[n++]=r.sub_type,r.sub_type===Mt.SUBTYPE_BYTE_ARRAY&&(s-=4,e[n++]=255&s,e[n++]=s>>8&255,e[n++]=s>>16&255,e[n++]=s>>24&255),e.set(o,n),n+r.position}function dn(e,t,r,n,i){e[n++]=14,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=e.write(r.value,n+4,void 0,"utf8")+1;return e[n]=255&o,e[n+1]=o>>8&255,e[n+2]=o>>16&255,e[n+3]=o>>24&255,n=n+4+o-1,e[n++]=0,n}function yn(e,t,r,n,i,o,s){e[n++]=3,n+=s?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var a=n,u={$ref:r.collection||r.namespace,$id:r.oid};null!=r.db&&(u.$db=r.db);var c=gn(e,u=Object.assign(u,r.fields),!1,n,i+1,o),f=c-a;return e[a++]=255&f,e[a++]=f>>8&255,e[a++]=f>>16&255,e[a++]=f>>24&255,c}function gn(e,t,r,n,i,o,s,a){void 0===r&&(r=!1),void 0===n&&(n=0),void 0===i&&(i=0),void 0===o&&(o=!1),void 0===s&&(s=!0),void 0===a&&(a=[]),n=n||0,(a=a||[]).push(t);var u,c=n+4;if(Array.isArray(t))for(var f=0;f<t.length;f++){var l="".concat(f);if("function"==typeof(null==(g=t[f])?void 0:g.toBSON)&&(g=g.toBSON()),"string"==typeof g)c=Wr(e,l,g,c,!0);else if("number"==typeof g)c=Yr(e,l,g,c,!0);else{if("bigint"==typeof g)throw new gt("Unsupported type BigInt, please use Decimal128");if("boolean"==typeof g)c=Xr(e,l,g,c,!0);else if(g instanceof Date||Ot(g))c=Qr(e,l,g,c,!0);else if(void 0===g)c=Kr(e,l,0,c,!0);else if(null===g)c=Kr(e,l,0,c,!0);else if("ObjectId"===g._bsontype||"ObjectID"===g._bsontype)c=nn(e,l,g,c,!0);else if(xt(g))c=on(e,l,g,c,!0);else if(g instanceof RegExp||Bt(g))c=en(e,l,g,c,!0);else if("object"==typeof g&&null==g._bsontype)c=sn(e,l,g,c,r,i,o,s,!0,a);else if("object"==typeof g&&_r(g)&&"Decimal128"===g._bsontype)c=an(e,l,g,c,!0);else if("Long"===g._bsontype||"Timestamp"===g._bsontype)c=un(e,l,g,c,!0);else if("Double"===g._bsontype)c=fn(e,l,g,c,!0);else if("function"==typeof g&&o)c=ln(e,l,g,c,0,0,!0);else if("Code"===g._bsontype)c=hn(e,l,g,c,r,i,o,s,!0);else if("Binary"===g._bsontype)c=pn(e,l,g,c,!0);else if("Symbol"===g._bsontype)c=dn(e,l,g,c,!0);else if("DBRef"===g._bsontype)c=yn(e,l,g,c,i,o,!0);else if("BSONRegExp"===g._bsontype)c=tn(e,l,g,c,!0);else if("Int32"===g._bsontype)c=cn(e,l,g,c,!0);else if("MinKey"===g._bsontype||"MaxKey"===g._bsontype)c=rn(e,l,g,c,!0);else if(void 0!==g._bsontype)throw new gt("Unrecognized or invalid _bsontype: ".concat(String(g._bsontype)))}}else if(t instanceof Nr||(u=t,"[object Map]"===Object.prototype.toString.call(u)))for(var h=t.entries(),p=!1;!p;){var d=h.next();if(!(p=!!d.done)){l=d.value[0];var y=typeof(g=d.value[1]);if("string"==typeof l&&!Gr.has(l)){if(null!=l.match(qr))throw Error("key "+l+" must not contain null bytes");if(r){if("$"===l[0])throw Error("key "+l+" must not start with '$'");if(~l.indexOf("."))throw Error("key "+l+" must not contain '.'")}}if("string"===y)c=Wr(e,l,g,c);else if("number"===y)c=Yr(e,l,g,c);else{if("bigint"===y||St(g)||At(g))throw new gt("Unsupported type BigInt, please use Decimal128");if("boolean"===y)c=Xr(e,l,g,c);else if(g instanceof Date||Ot(g))c=Qr(e,l,g,c);else if(null===g||void 0===g&&!1===s)c=Kr(e,l,0,c);else if("ObjectId"===g._bsontype||"ObjectID"===g._bsontype)c=nn(e,l,g,c);else if(xt(g))c=on(e,l,g,c);else if(g instanceof RegExp||Bt(g))c=en(e,l,g,c);else if("object"===y&&null==g._bsontype)c=sn(e,l,g,c,r,i,o,s,!1,a);else if("object"===y&&"Decimal128"===g._bsontype)c=an(e,l,g,c);else if("Long"===g._bsontype||"Timestamp"===g._bsontype)c=un(e,l,g,c);else if("Double"===g._bsontype)c=fn(e,l,g,c);else if("Code"===g._bsontype)c=hn(e,l,g,c,r,i,o,s);else if("function"==typeof g&&o)c=ln(e,l,g,c,0,0,o);else if("Binary"===g._bsontype)c=pn(e,l,g,c);else if("Symbol"===g._bsontype)c=dn(e,l,g,c);else if("DBRef"===g._bsontype)c=yn(e,l,g,c,i,o);else if("BSONRegExp"===g._bsontype)c=tn(e,l,g,c);else if("Int32"===g._bsontype)c=cn(e,l,g,c);else if("MinKey"===g._bsontype||"MaxKey"===g._bsontype)c=rn(e,l,g,c);else if(void 0!==g._bsontype)throw new gt("Unrecognized or invalid _bsontype: ".concat(String(g._bsontype)))}}}else{if("function"==typeof(null==t?void 0:t.toBSON)&&null!=(t=t.toBSON())&&"object"!=typeof t)throw new gt("toBSON function did not return an object");for(var l in t){var g;if("function"==typeof(null==(g=t[l])?void 0:g.toBSON)&&(g=g.toBSON()),y=typeof g,"string"==typeof l&&!Gr.has(l)){if(null!=l.match(qr))throw Error("key "+l+" must not contain null bytes");if(r){if("$"===l[0])throw Error("key "+l+" must not start with '$'");if(~l.indexOf("."))throw Error("key "+l+" must not contain '.'")}}if("string"===y)c=Wr(e,l,g,c);else if("number"===y)c=Yr(e,l,g,c);else{if("bigint"===y)throw new gt("Unsupported type BigInt, please use Decimal128");if("boolean"===y)c=Xr(e,l,g,c);else if(g instanceof Date||Ot(g))c=Qr(e,l,g,c);else if(void 0===g)!1===s&&(c=Kr(e,l,0,c));else if(null===g)c=Kr(e,l,0,c);else if("ObjectId"===g._bsontype||"ObjectID"===g._bsontype)c=nn(e,l,g,c);else if(xt(g))c=on(e,l,g,c);else if(g instanceof RegExp||Bt(g))c=en(e,l,g,c);else if("object"===y&&null==g._bsontype)c=sn(e,l,g,c,r,i,o,s,!1,a);else if("object"===y&&"Decimal128"===g._bsontype)c=an(e,l,g,c);else if("Long"===g._bsontype||"Timestamp"===g._bsontype)c=un(e,l,g,c);else if("Double"===g._bsontype)c=fn(e,l,g,c);else if("Code"===g._bsontype)c=hn(e,l,g,c,r,i,o,s);else if("function"==typeof g&&o)c=ln(e,l,g,c,0,0,o);else if("Binary"===g._bsontype)c=pn(e,l,g,c);else if("Symbol"===g._bsontype)c=dn(e,l,g,c);else if("DBRef"===g._bsontype)c=yn(e,l,g,c,i,o);else if("BSONRegExp"===g._bsontype)c=tn(e,l,g,c);else if("Int32"===g._bsontype)c=cn(e,l,g,c);else if("MinKey"===g._bsontype||"MaxKey"===g._bsontype)c=rn(e,l,g,c);else if(void 0!==g._bsontype)throw new gt("Unrecognized or invalid _bsontype: ".concat(String(g._bsontype)))}}}a.pop(),e[c++]=0;var m=c-n;return e[n++]=255&m,e[n++]=m>>8&255,e[n++]=m>>16&255,e[n++]=m>>24&255,c}var mn=17825792,vn=lt.alloc(mn),bn={Binary:Mt,Code:$t,DBRef:Ht,Decimal128:cr,Double:fr,Int32:lr,Long:Yt,UUID:Dt,Map:Nr,MaxKey:hr,MinKey:pr,ObjectId:mr,ObjectID:mr,BSONRegExp:vr,BSONSymbol:br,Timestamp:wr,EJSON:Ir,setInternalBufferSize:function(e){vn.length<e&&(vn=lt.alloc(e))},serialize:function(e,t){void 0===t&&(t={});var r="boolean"==typeof t.checkKeys&&t.checkKeys,n="boolean"==typeof t.serializeFunctions&&t.serializeFunctions,i="boolean"!=typeof t.ignoreUndefined||t.ignoreUndefined,o="number"==typeof t.minInternalBufferSize?t.minInternalBufferSize:mn;vn.length<o&&(vn=lt.alloc(o));var s=gn(vn,e,r,0,0,n,i,[]),a=lt.alloc(s);return vn.copy(a,0,0,a.length),a},serializeWithBufferAndIndex:function(e,t,r){void 0===r&&(r={});var n="boolean"==typeof r.checkKeys&&r.checkKeys,i="boolean"==typeof r.serializeFunctions&&r.serializeFunctions,o="boolean"!=typeof r.ignoreUndefined||r.ignoreUndefined,s="number"==typeof r.index?r.index:0,a=gn(vn,e,n,0,0,i,o);return vn.copy(t,s,0,a),s+a-1},deserialize:function(e,t){return void 0===t&&(t={}),Dr(e instanceof lt?e:It(e),t)},calculateObjectSize:function(e,t){return void 0===t&&(t={}),jr(e,"boolean"==typeof(t=t||{}).serializeFunctions&&t.serializeFunctions,"boolean"!=typeof t.ignoreUndefined||t.ignoreUndefined)},deserializeStream:function(e,t,r,n,i,o){for(var s=Object.assign({allowObjectSmallerThanBufferSize:!0,index:0},o),a=It(e),u=t,c=0;c<r;c++){var f=a[u]|a[u+1]<<8|a[u+2]<<16|a[u+3]<<24;s.index=u,n[i+c]=Dr(a,s),u+=f}return u},BSONError:yt,BSONTypeError:gt};const wn=bn;var _n=r(48287).Buffer;function En(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(En=function(){return!!e})()}const xn=function(t){function r(){var t,n,i,o;return e(this,r),n=this,i=a(i=r),(t=s(n,En()?Reflect.construct(i,[],a(n).constructor):i.apply(n,o))).name="BSON deserialise",t.module="Serialise",t.description="BSON is a computer data interchange format used mainly as a data storage and network transfer format in the MongoDB database. It is a binary form for representing simple data structures, associative arrays (called objects or documents in MongoDB), and various data types of specific interest to MongoDB. The name 'BSON' is based on the term JSON and stands for 'Binary JSON'.<br><br>Input data should be in a raw bytes format.",t.infoURL="https://wikipedia.org/wiki/BSON",t.inputType="ArrayBuffer",t.outputType="string",t.args=[],t}return c(r,t),o(r,[{key:"run",value:function(e,t){if(!e.byteLength)return"";try{var r=wn.deserialize(new _n(e));return JSON.stringify(r,null,2)}catch(e){throw new S(e.toString())}}}])}(qe);function Sn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Sn=function(){return!!e})()}const An=function(t){function r(){var t,n,i,o;return e(this,r),n=this,i=a(i=r),(t=s(n,Sn()?Reflect.construct(i,[],a(n).constructor):i.apply(n,o))).name="BSON serialise",t.module="Serialise",t.description="BSON is a computer data interchange format used mainly as a data storage and network transfer format in the MongoDB database. It is a binary form for representing simple data structures, associative arrays (called objects or documents in MongoDB), and various data types of specific interest to MongoDB. The name 'BSON' is based on the term JSON and stands for 'Binary JSON'.<br><br>Input data should be valid JSON.",t.infoURL="https://wikipedia.org/wiki/BSON",t.inputType="string",t.outputType="ArrayBuffer",t.args=[],t}return c(r,t),o(r,[{key:"run",value:function(e,t){if(!e)return new ArrayBuffer;try{var r=JSON.parse(e);return wn.serialize(r).buffer}catch(e){throw new S(e.toString())}}}])}(qe);var Bn=r(49881),On=r.n(Bn),kn=r(48287).Buffer;function Tn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Tn=function(){return!!e})()}const In=function(t){function r(){var t,n,i,o;return e(this,r),n=this,i=a(i=r),(t=s(n,Tn()?Reflect.construct(i,[],a(n).constructor):i.apply(n,o))).name="CBOR Decode",t.module="Serialise",t.description="Concise Binary Object Representation (CBOR) is a binary data serialization format loosely based on JSON. Like JSON it allows the transmission of data objects that contain namevalue pairs, but in a more concise manner. This increases processing and transfer speeds at the cost of human readability. It is defined in IETF RFC 8949.",t.infoURL="https://wikipedia.org/wiki/CBOR",t.inputType="ArrayBuffer",t.outputType="JSON",t.args=[],t}return c(r,t),o(r,[{key:"run",value:function(e,t){return On().decodeFirstSync(kn.from(e).toString("hex"))}}])}(qe);function Nn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Nn=function(){return!!e})()}const Fn=function(t){function r(){var t,n,i,o;return e(this,r),n=this,i=a(i=r),(t=s(n,Nn()?Reflect.construct(i,[],a(n).constructor):i.apply(n,o))).name="CBOR Encode",t.module="Serialise",t.description="Concise Binary Object Representation (CBOR) is a binary data serialization format loosely based on JSON. Like JSON it allows the transmission of data objects that contain namevalue pairs, but in a more concise manner. This increases processing and transfer speeds at the cost of human readability. It is defined in IETF RFC 8949.",t.infoURL="https://wikipedia.org/wiki/CBOR",t.inputType="JSON",t.outputType="ArrayBuffer",t.args=[],t}return c(r,t),o(r,[{key:"run",value:function(e,t){return new Uint8Array(On().encodeCanonical(e)).buffer}}])}(qe);function Rn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Rn=function(){return!!e})()}const jn=function(t){function r(){var t,n,i,o;return e(this,r),n=this,i=a(i=r),(t=s(n,Rn()?Reflect.construct(i,[],a(n).constructor):i.apply(n,o))).name="Parse ObjectID timestamp",t.module="Serialise",t.description="Parse timestamp from MongoDB/BSON ObjectID hex string.",t.infoURL="https://docs.mongodb.com/manual/reference/method/ObjectId.getTimestamp/",t.inputType="string",t.outputType="string",t.args=[],t}return c(r,t),o(r,[{key:"run",value:function(e,t){try{return new wn.ObjectID(e).getTimestamp().toISOString()}catch(e){throw new S(e)}}}])}(qe);("undefined"==typeof self?{}:self.OpModules||{}).Serialise={"Avro to JSON":Je,"BSON deserialise":xn,"BSON serialise":An,"CBOR Decode":In,"CBOR Encode":Fn,"Parse ObjectID timestamp":jn}})()})();